Skip to content

Commit 5bf9c56

Browse files
authored
Add Python 3.12 support & fix CI (#350)
* Add py3.12 support - CI - tox - requisite ignore for dateutil (at time of writing) - changelog item * Move pytest config into setup.cfg * Fix datetime deprecation warning pattern In pytest config -- using `datetime.datetime.utcfromtimestamp` is important for matching correctly. For some reason, the previous pattern (as well as the fixed one) works under a local dev environment with 3.12.
1 parent 3922665 commit 5bf9c56

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
strategy:
6363
matrix:
6464
os: [ubuntu-latest, windows-latest, macos-latest]
65-
py: ['3.8', '3.9', '3.10', '3.11']
65+
py: ['3.8', '3.9', '3.10', '3.11', '3.12']
6666
name: "Run tests on ${{ matrix.os }}, py${{ matrix.py }}"
6767
runs-on: ${{ matrix.os }}
6868
steps:

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Unreleased
1010

1111
.. vendor-insert-here
1212
13+
- Add official support for Python 3.12
14+
1315
0.27.1
1416
------
1517

setup.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@ disallow_untyped_defs = true
6161
ignore_missing_imports = true
6262
warn_unreachable = true
6363
warn_no_return = true
64+
65+
[tool:pytest]
66+
filterwarnings =
67+
error
68+
# dateutil has a Python 3.12 compatibility issue.
69+
ignore:datetime\.datetime\.utcfromtimestamp\(\) is deprecated:DeprecationWarning

tox.ini

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ envlist =
33
mypy
44
cov_clean
55
py38-mindeps
6-
py{311,310,39,38}
6+
py{312,311,310,39,38}
77
py310-{notoml,tomli-format}
8-
py{38,311}-{json5,pyjson5}
8+
py{38,312}-{json5,pyjson5}
99
cov
1010
skip_missing_interpreters = true
1111
minversion = 4.0.0
@@ -90,7 +90,3 @@ commands = python ./scripts/vendor-schemas.py
9090
[testenv:generate-hooks-config]
9191
description = "update autogenerated pre-commit hooks"
9292
commands = python ./scripts/generate-hooks-config.py
93-
94-
[pytest]
95-
filterwarnings =
96-
error

0 commit comments

Comments
 (0)