Skip to content

Commit 6216911

Browse files
authored
pkg: p315.0a2 compatibility (#44)
* pkg: python 3.15.0a1 compat + free-threaded versions Signed-off-by: Élie Goudout <[email protected]> * fix: 3.15.0a2 compatibility (python/cpython/pull/136395) [skip ci] Signed-off-by: Élie Goudout <[email protected]> * dev: update ci versions Signed-off-by: Élie Goudout <[email protected]> * fix: revert bad factor Signed-off-by: Élie Goudout <[email protected]> --------- Signed-off-by: Élie Goudout <[email protected]>
1 parent cfe0e69 commit 6216911

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,20 @@ 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

1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v6
2121
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@v6
2323
with:
2424
python-version: ${{ matrix.python-version }}
25-
# uv doc: https://docs.astral.sh/uv/guides/integration/github/
2625
- name: Install uv
27-
uses: astral-sh/setup-uv@v5
26+
uses: astral-sh/setup-uv@v7
2827
with:
29-
version: "0.9.3"
28+
version: "0.9.11"
3029
- name: Run ruff
3130
run: |
3231
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: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,22 +156,18 @@ def test_signature_call_non_unpackable(
156156

157157
# Non-unpackable ``args``
158158
if accepts_args:
159-
msg = (
160-
f"{ParamWithPostInit.__name__}.__post_init__() argument after * must be an"
161-
" iterable, not NoneType"
162-
)
159+
# >=3.15.0a2-compatible message (python/cpython/pull/136395)
160+
msg = " after * must be an iterable, not NoneType"
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-
)
167+
# >=3.15.0a2-compatible message (python/cpython/pull/136395)
168+
msg = " after ** must be a mapping, not NoneType"
173169
args_kwargs = [[], None] if accepts_args else [None]
174-
with pytest.raises(TypeError, match=f"^{re.escape(msg)}$"):
170+
with pytest.raises(TypeError, match=f"{re.escape(msg)}$"):
175171
ParamWithPostInit(*args_kwargs)
176172

177173

0 commit comments

Comments
 (0)