diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 0000000..302094d --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,11 @@ +[bumpversion] +current_version = 1.1.0 +commit = True +message = + Prepare for {new_version} release + + See NEWS.rst for more details. + +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/Makefile b/Makefile index 53310b2..6e52620 100644 --- a/Makefile +++ b/Makefile @@ -17,3 +17,33 @@ lint: $(PYTHON) -m ruff check $(python_files) $(PYTHON) -m isort --check $(python_files) $(PYTHON) -m black --check $(python_files) + +.PHONY: check_release_env +check_release_env: +ifndef RELEASE + $(error RELEASE is undefined. Please set it to either ["major", "minor", "patch"]) +endif + +.PHONY: bump_version +bump_version: check_release_env + uvx bump2version $(RELEASE) + $(eval NEW_VERSION := $(shell uvx bump2version \ + --allow-dirty \ + --dry-run \ + --list $(RELEASE) \ + | tail -1 \ + | sed s,"^.*=",,)) + git commit --amend --no-edit + +.PHONY: gen_news +gen_news: check_release_env + $(eval CURRENT_VERSION := $(shell uvx bump2version \ + --allow-dirty \ + --dry-run \ + --list $(RELEASE) \ + | grep current_version \ + | sed s,"^.*=",,)) + uvx towncrier build --version $(CURRENT_VERSION) --name pytest-pystack + +.PHONY: release +release: check_release_env bump_version gen_news ## Prepare release diff --git a/NEWS.rst b/NEWS.rst new file mode 100644 index 0000000..051c81c --- /dev/null +++ b/NEWS.rst @@ -0,0 +1,48 @@ +.. note + You should *NOT* add new change log entries to this file, this + file is managed by towncrier. You *may* edit previous change logs to + fix problems like typo corrections or such. + +Changelog +========= + +.. towncrier release notes start + +pytest-pystack 1.1.0 (2026-06-30) +--------------------------------- + +Features +~~~~~~~~ + +- Add Python 3.13 and 3.14 support. + +Bug Fixes +~~~~~~~~~ + +- Use the "spawn" start method unconditionally for the monitor process, + fixing compatibility issues with non-fork multiprocessing start methods. + + +pytest-pystack 1.0.2 (2024-11-16) +---------------------------------- + +Bug Fixes +~~~~~~~~~ + +- Disable pytest-pystack for tests depending on the ``pytester`` fixture. + + +pytest-pystack 1.0.1 (2023-08-21) +---------------------------------- + +Features +~~~~~~~~ + +- Add Python 3.12 support. + +Bug Fixes +~~~~~~~~~ + +- Use ``pytest_sessionfinish`` instead of ``atexit`` to stop the monitor + process. With Python 3.12, it is no longer possible to create a new thread + in an ``atexit`` handler. diff --git a/news/.gitignore b/news/.gitignore new file mode 100644 index 0000000..f935021 --- /dev/null +++ b/news/.gitignore @@ -0,0 +1 @@ +!.gitignore diff --git a/pyproject.toml b/pyproject.toml index 8d7b5b8..e265d39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = 'setuptools.build_meta' [project] name = "pytest-pystack" -version = "1.0.2" +version = "1.1.0" description = "Plugin to run pystack after a timeout for a test suite." requires-python = ">=3.8" dependencies = [ @@ -38,6 +38,20 @@ email = "mcorcherojim@bloomberg.net" pystack = "pytest_pystack.plugin" +[tool.towncrier] +package = "pytest_pystack" +package_dir = "src" +filename = "NEWS.rst" +directory = "news" +type = [ + { name = "Features", directory = "feature", showcontent = true }, + { name = "Deprecations and Removals", directory = "removal", showcontent = true }, + { name = "Bug Fixes", directory = "bugfix", showcontent = true }, + { name = "Improved Documentation", directory = "doc", showcontent = true }, + { name = "Miscellaneous", directory = "misc", showcontent = true }, +] +underlines = "-~" + [tool.isort] force_single_line = true multi_line_output = 3