From 89f18f7b4cef266b9f972ab950a24e5ef25f1d0c Mon Sep 17 00:00:00 2001 From: Matt Wozniski Date: Tue, 30 Jun 2026 16:18:14 -0400 Subject: [PATCH 1/2] Set up bump2version and towncrier Signed-off-by: Matt Wozniski --- .bumpversion.cfg | 11 +++++++++++ Makefile | 30 ++++++++++++++++++++++++++++++ NEWS.rst | 33 +++++++++++++++++++++++++++++++++ news/.gitignore | 1 + pyproject.toml | 14 ++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 .bumpversion.cfg create mode 100644 NEWS.rst create mode 100644 news/.gitignore diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 0000000..26e500c --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,11 @@ +[bumpversion] +current_version = 1.0.2 +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..8d72eb2 --- /dev/null +++ b/NEWS.rst @@ -0,0 +1,33 @@ +.. 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.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..8968b88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 From 2e77b7b944a2c209bb5edbc441c24be6b8eea494 Mon Sep 17 00:00:00 2001 From: Matt Wozniski Date: Tue, 30 Jun 2026 16:33:28 -0400 Subject: [PATCH 2/2] Prepare for 1.1.0 release See NEWS.rst for more details. Signed-off-by: Matt Wozniski --- .bumpversion.cfg | 2 +- NEWS.rst | 15 +++++++++++++++ pyproject.toml | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 26e500c..302094d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.2 +current_version = 1.1.0 commit = True message = Prepare for {new_version} release diff --git a/NEWS.rst b/NEWS.rst index 8d72eb2..051c81c 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -8,6 +8,21 @@ 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) ---------------------------------- diff --git a/pyproject.toml b/pyproject.toml index 8968b88..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 = [