Skip to content

Commit 56e8409

Browse files
authored
Add tests for 3.14 (#123)
Found a cpython bug along the way, python/cpython#141647.
1 parent 5203cc9 commit 56e8409

File tree

5 files changed

+148
-110
lines changed

5 files changed

+148
-110
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
fail-fast: false
4242
matrix:
4343
os: [ubuntu, macos]
44-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
44+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
4545
# test pypy on ubuntu only to speed up CI, no reason why macos X pypy should fail separately
4646
include:
4747
- os: "ubuntu"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ yarn-error.log*
1919
/.ruff_cache/
2020
/scratch/
2121
/site/
22+
/.python-version

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ classifiers = [
3030
'Programming Language :: Python :: 3.11',
3131
'Programming Language :: Python :: 3.12',
3232
'Programming Language :: Python :: 3.13',
33+
'Programming Language :: Python :: 3.14',
3334
'Topic :: Software Development :: Libraries :: Python Modules',
3435
'Topic :: Internet',
3536
'Typing :: Typed',

tests/test_other.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import uuid
23
from dataclasses import dataclass
34
from enum import Enum, auto
@@ -183,9 +184,21 @@ def test_json_both():
183184
'other,dirty',
184185
[
185186
(IPv4Address('127.0.0.1'), IsIP()),
186-
(IPv4Network('43.48.0.0/12'), IsIP()),
187+
pytest.param(
188+
IPv4Network('43.48.0.0/12'),
189+
IsIP(),
190+
marks=pytest.mark.xfail(
191+
sys.version_info >= (3, 14), reason='https://github.com/python/cpython/issues/141647'
192+
),
193+
),
187194
(IPv6Address('::eeff:ae3f:d473'), IsIP()),
188-
(IPv6Network('::eeff:ae3f:d473/128'), IsIP()),
195+
pytest.param(
196+
IPv6Network('::eeff:ae3f:d473/128'),
197+
IsIP(),
198+
marks=pytest.mark.xfail(
199+
sys.version_info >= (3, 14), reason='https://github.com/python/cpython/issues/141647'
200+
),
201+
),
189202
('2001:0db8:0a0b:12f0:0000:0000:0000:0001', IsIP()),
190203
('179.27.154.96', IsIP),
191204
('43.62.123.119', IsIP(version=4)),
@@ -199,6 +212,7 @@ def test_json_both():
199212
(338288524927261089654018896845572831328, IsIP(version=6)),
200213
(b'\x20\x01\x06\x58\x02\x2a\xca\xfe\x02\x00\x00\x00\x00\x00\x00\x01', IsIP(version=6)),
201214
],
215+
ids=repr,
202216
)
203217
def test_is_ip_true(other, dirty):
204218
assert other == dirty

0 commit comments

Comments
 (0)