Skip to content

Commit 9716620

Browse files
authored
Add Python 3.13 and 3.14 tests and fixes (#296)
1 parent 533a102 commit 9716620

File tree

7 files changed

+25
-9
lines changed

7 files changed

+25
-9
lines changed

.github/workflows/tests.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
include:
21-
- { name: Linux, python: "3.12", os: ubuntu-latest, tox: py312 }
22-
- { name: Windows, python: "3.12", os: windows-latest, tox: py312 }
23-
- { name: Mac, python: "3.12", os: macos-latest, tox: py312 }
21+
- { name: Linux, python: "3.14", os: ubuntu-latest, tox: py314 }
22+
- { name: Windows, python: "3.14", os: windows-latest, tox: py314 }
23+
- { name: Mac, python: "3.14", os: macos-latest, tox: py314 }
24+
- { name: "3.13", python: "3.13", os: ubuntu-latest, tox: py313 }
25+
- { name: "3.12", python: "3.12", os: ubuntu-latest, tox: py312 }
2426
- { name: "3.11", python: "3.11", os: ubuntu-latest, tox: py311 }
2527
- { name: "3.10", python: "3.10", os: ubuntu-latest, tox: py310 }
2628
- { name: "3.9", python: "3.9", os: ubuntu-latest, tox: py39 }

.tox-coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ omit =
77
*/flycheck_*.py
88
*/chainmap_backport.py
99
*/perf_report.py
10+
*/conftest.py
1011

1112
[paths]
1213
source =

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ glom is a new and powerful way to handle real-world data, featuring:
1818
* Built-in data exploration and debugging features
1919

2020
All of that and more, available as a [fully-documented][rtd],
21-
pure-Python package, tested on Python 3.7+, as well as
21+
pure-Python package, tested on Python 3.7-3.14, as well as
2222
PyPy3. Installation is as easy as:
2323

2424
```

glom/test/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import os
2+
import sys
3+
4+
# Fix for pytest tmp_path on Windows + Python 3.14 where pwd module doesn't exist
5+
# and USERNAME env var may not be set in CI environments
6+
if sys.platform == 'win32' and not any(os.environ.get(n) for n in ('LOGNAME', 'USER', 'LNAME', 'USERNAME')):
7+
os.environ['USERNAME'] = 'user'

glom/test/test_error.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ def _norm_stack(formatted_stack, exc):
6868

6969
line = line.rstrip() # trailing whitespace shouldn't matter
7070

71+
# skip Python 3.11+ caret lines (e.g., " ~~~~^^^^^^^^^^^^^^")
72+
if line.strip() and frozenset(line.strip()) <= frozenset('~^'):
73+
continue
74+
7175
# qualify python2's unqualified error type names
7276
exc_type_name = exc.__class__.__name__
7377
if exc_type_name in line:

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ def import_path(module_name, path):
5656
'Programming Language :: Python :: 3.7',
5757
'Programming Language :: Python :: 3.8',
5858
'Programming Language :: Python :: 3.9',
59-
'Programming Language :: Python :: 3.10',
60-
'Programming Language :: Python :: 3.11',
61-
'Programming Language :: Python :: 3.12',
62-
'Programming Language :: Python :: Implementation :: CPython',
59+
'Programming Language :: Python :: 3.10',
60+
'Programming Language :: Python :: 3.11',
61+
'Programming Language :: Python :: 3.12',
62+
'Programming Language :: Python :: 3.13',
63+
'Programming Language :: Python :: 3.14',
64+
'Programming Language :: Python :: Implementation :: CPython',
6365
'Programming Language :: Python :: Implementation :: PyPy',
6466
'License :: OSI Approved :: BSD License',
6567
]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py37,py38,py39,py310,py311,py312,pypy3,coverage-report,packaging
2+
envlist = py37,py38,py39,py310,py311,py312,py313,py314,pypy3,coverage-report,packaging
33

44
[testenv]
55
changedir = .tox

0 commit comments

Comments
 (0)