Skip to content

Commit 5c44619

Browse files
committed
fix: 3.15.0a2 compatibility (python/cpython/pull/136395) [skip ci]
Signed-off-by: Élie Goudout <[email protected]>
1 parent 6572476 commit 5c44619

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t", "3.15.0-alpha.1"]
15+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t", "3.15.0-alpha.2"]
1616
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
1717

1818

@@ -26,7 +26,7 @@ jobs:
2626
- name: Install uv
2727
uses: astral-sh/setup-uv@v5
2828
with:
29-
version: "0.9.3"
29+
version: "0.9.11"
3030
- name: Run ruff
3131
run: |
3232
uvx ruff check

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
![OS Independant](https://img.shields.io/badge/OS_Independant-%E2%9C%93-blue)
2-
[![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/)
2+
[![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/)
33
[![license MIT](https://img.shields.io/github/license/eliegoudout/paramclasses)](https://opensource.org/licenses/MIT)
44
[![pypi](https://img.shields.io/pypi/v/paramclasses)](https://pypi.org/project/paramclasses/)
55
[![pipeline status](https://github.com/eliegoudout/paramclasses/actions/workflows/ci.yml/badge.svg)](https://github.com/eliegoudout/paramclasses/actions)

test/paramclasses/test_signature.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,25 +153,19 @@ def test_signature_call_non_unpackable(
153153

154154
accepts_args = pos_only or pos_or_kw or var_pos
155155
accepts_kwargs = pos_or_kw or kw_only or var_kw
156+
# >=3.15.0a2-compatible message (python/cpython/pull/136395)
157+
msg = " after * must be an iterable, not NoneType"
156158

157159
# Non-unpackable ``args``
158160
if accepts_args:
159-
msg = (
160-
f"{ParamWithPostInit.__name__}.__post_init__() argument after * must be an"
161-
" iterable, not NoneType"
162-
)
163161
args_kwargs = [None, {}] if accepts_kwargs else [None]
164-
with pytest.raises(TypeError, match=f"^{re.escape(msg)}$"):
162+
with pytest.raises(TypeError, match=f"{re.escape(msg)}$"):
165163
ParamWithPostInit(*args_kwargs)
166164

167165
# Non-unpackable ``kwargs``
168166
if accepts_kwargs:
169-
msg = (
170-
f"{ParamWithPostInit.__name__}.__post_init__() argument after ** must be a"
171-
" mapping, not NoneType"
172-
)
173167
args_kwargs = [[], None] if accepts_args else [None]
174-
with pytest.raises(TypeError, match=f"^{re.escape(msg)}$"):
168+
with pytest.raises(TypeError, match=f"{re.escape(msg)}$"):
175169
ParamWithPostInit(*args_kwargs)
176170

177171

0 commit comments

Comments
 (0)