From 6572476ac060c5cfba932f56dbf53822234ff516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Goudout?= Date: Fri, 17 Oct 2025 19:27:50 +0200 Subject: [PATCH 1/4] pkg: python 3.15.0a1 compat + free-threaded versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Élie Goudout --- .github/workflows/ci.yml | 4 ++-- README.md | 2 +- pyproject.toml | 3 ++- uv.lock | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c21d46..02d4fde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t", "3.15.0-alpha.1"] os: ["ubuntu-latest", "windows-latest", "macos-latest"] @@ -26,7 +26,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 with: - version: "0.9.0" + version: "0.9.3" - name: Run ruff run: | uvx ruff check diff --git a/README.md b/README.md index 7749451..fc56134 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ![OS Independant](https://img.shields.io/badge/OS_Independant-%E2%9C%93-blue) -[![python versions](https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13%20|%203.14-blue)](https://devguide.python.org/versions/) +[![python versions](https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13%20|%203.14%20|%203.15.0a1-blue)](https://devguide.python.org/versions/) [![license MIT](https://img.shields.io/github/license/eliegoudout/paramclasses)](https://opensource.org/licenses/MIT) [![pypi](https://img.shields.io/pypi/v/paramclasses)](https://pypi.org/project/paramclasses/) [![pipeline status](https://github.com/eliegoudout/paramclasses/actions/workflows/ci.yml/badge.svg)](https://github.com/eliegoudout/paramclasses/actions) diff --git a/pyproject.toml b/pyproject.toml index a8e384d..287630e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "paramclasses" version = "0.4.3.dev0" description = "Parameter-holding classes with robust subclassing protection" readme = "README.md" -requires-python = ">=3.10, <3.15" +requires-python = ">=3.10, <3.16" authors = [{name = "Élie Goudout", email = "eliegoudout@hotmail.com"}] license = {file = "LICENSE"} classifiers = [ @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Typing :: Typed", ] dependencies = [] diff --git a/uv.lock b/uv.lock index 875434b..e8946f4 100644 --- a/uv.lock +++ b/uv.lock @@ -1,6 +1,6 @@ version = 1 revision = 3 -requires-python = ">=3.10, <3.15" +requires-python = ">=3.10, <3.16" [[package]] name = "colorama" From 5c44619d3e979ba29326bd1142bd786219d48c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Goudout?= Date: Fri, 21 Nov 2025 10:02:10 +0100 Subject: [PATCH 2/4] fix: 3.15.0a2 compatibility (python/cpython/pull/136395) [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Élie Goudout --- .github/workflows/ci.yml | 4 ++-- README.md | 2 +- test/paramclasses/test_signature.py | 14 ++++---------- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02d4fde..3b1df78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t", "3.15.0-alpha.1"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t", "3.15.0-alpha.2"] os: ["ubuntu-latest", "windows-latest", "macos-latest"] @@ -26,7 +26,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 with: - version: "0.9.3" + version: "0.9.11" - name: Run ruff run: | uvx ruff check diff --git a/README.md b/README.md index fc56134..b745109 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ![OS Independant](https://img.shields.io/badge/OS_Independant-%E2%9C%93-blue) -[![python versions](https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13%20|%203.14%20|%203.15.0a1-blue)](https://devguide.python.org/versions/) +[![python versions](https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13%20|%203.14%20|%203.15.0a2-blue)](https://devguide.python.org/versions/) [![license MIT](https://img.shields.io/github/license/eliegoudout/paramclasses)](https://opensource.org/licenses/MIT) [![pypi](https://img.shields.io/pypi/v/paramclasses)](https://pypi.org/project/paramclasses/) [![pipeline status](https://github.com/eliegoudout/paramclasses/actions/workflows/ci.yml/badge.svg)](https://github.com/eliegoudout/paramclasses/actions) diff --git a/test/paramclasses/test_signature.py b/test/paramclasses/test_signature.py index 9608f19..e9ce5f1 100644 --- a/test/paramclasses/test_signature.py +++ b/test/paramclasses/test_signature.py @@ -153,25 +153,19 @@ def test_signature_call_non_unpackable( accepts_args = pos_only or pos_or_kw or var_pos accepts_kwargs = pos_or_kw or kw_only or var_kw + # >=3.15.0a2-compatible message (python/cpython/pull/136395) + msg = " after * must be an iterable, not NoneType" # Non-unpackable ``args`` if accepts_args: - msg = ( - f"{ParamWithPostInit.__name__}.__post_init__() argument after * must be an" - " iterable, not NoneType" - ) args_kwargs = [None, {}] if accepts_kwargs else [None] - with pytest.raises(TypeError, match=f"^{re.escape(msg)}$"): + with pytest.raises(TypeError, match=f"{re.escape(msg)}$"): ParamWithPostInit(*args_kwargs) # Non-unpackable ``kwargs`` if accepts_kwargs: - msg = ( - f"{ParamWithPostInit.__name__}.__post_init__() argument after ** must be a" - " mapping, not NoneType" - ) args_kwargs = [[], None] if accepts_args else [None] - with pytest.raises(TypeError, match=f"^{re.escape(msg)}$"): + with pytest.raises(TypeError, match=f"{re.escape(msg)}$"): ParamWithPostInit(*args_kwargs) From e58e5dcdae84cffec84f6177407b9c4bdef8be87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Goudout?= Date: Fri, 21 Nov 2025 10:03:47 +0100 Subject: [PATCH 3/4] dev: update ci versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Élie Goudout --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b1df78..3547bd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,14 +17,13 @@ jobs: steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - # uv doc: https://docs.astral.sh/uv/guides/integration/github/ - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v7 with: version: "0.9.11" - name: Run ruff From edfed6506bda77c6d86ea3bb0c0ca826fcfed5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Goudout?= Date: Fri, 21 Nov 2025 10:10:43 +0100 Subject: [PATCH 4/4] fix: revert bad factor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Élie Goudout --- test/paramclasses/test_signature.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/paramclasses/test_signature.py b/test/paramclasses/test_signature.py index e9ce5f1..9a0a579 100644 --- a/test/paramclasses/test_signature.py +++ b/test/paramclasses/test_signature.py @@ -153,17 +153,19 @@ def test_signature_call_non_unpackable( accepts_args = pos_only or pos_or_kw or var_pos accepts_kwargs = pos_or_kw or kw_only or var_kw - # >=3.15.0a2-compatible message (python/cpython/pull/136395) - msg = " after * must be an iterable, not NoneType" # Non-unpackable ``args`` if accepts_args: + # >=3.15.0a2-compatible message (python/cpython/pull/136395) + msg = " after * must be an iterable, not NoneType" args_kwargs = [None, {}] if accepts_kwargs else [None] with pytest.raises(TypeError, match=f"{re.escape(msg)}$"): ParamWithPostInit(*args_kwargs) # Non-unpackable ``kwargs`` if accepts_kwargs: + # >=3.15.0a2-compatible message (python/cpython/pull/136395) + msg = " after ** must be a mapping, not NoneType" args_kwargs = [[], None] if accepts_args else [None] with pytest.raises(TypeError, match=f"{re.escape(msg)}$"): ParamWithPostInit(*args_kwargs)