Skip to content

Commit

Permalink
chore: Python 3.11 preparation
Browse files Browse the repository at this point in the history
- Enable Python 3.11 in tox
- Enable Python 3.11 in Github CI
  • Loading branch information
offbyone committed Jul 21, 2022
1 parent f45af28 commit 149e62b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:

pull_request:
branches: ["main", "master"]

schedule:
- cron: '0 6 * * MON' # Every Monday morning
- cron: "0 6 * * MON" # Every Monday morning

workflow_dispatch:

Expand All @@ -28,7 +28,8 @@ jobs:
- "3.7"
- "3.8"
- "3.9"
- "3.10.0"
- "3.10"
- "3.11.0-beta.4"
- "pypy2"
- "pypy-3.7"
exclude:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/206.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added Python 3.11 testing
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def read(fname):
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: Jython",
"Programming Language :: Python :: Implementation :: PyPy",
Expand Down
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ python =
3.8: py38, py38-numpy
3.9: py39, py39-numpy, lint, manifest, typing, changelog, docs
3.10: py310
3.11: py311
pypy-2: pypy2
pypy-3: pypy3

Expand Down Expand Up @@ -96,6 +97,16 @@ setenv =
extras = {env:TOX_AP_TEST_EXTRAS:tests}
commands = coverage run -m pytest {posargs}

[testenv:py311]
# Python 3.6+ has a number of compile-time warnings on invalid string escapes.
# PYTHONWARNINGS=d and --no-compile below make them visible during the Tox run.
basepython = python3.10
install_command = pip install --no-compile {opts} {packages}
setenv =
PYTHONWARNINGS=d
extras = {env:TOX_AP_TEST_EXTRAS:tests}
commands = coverage run -m pytest {posargs}

[testenv:coverage-report]
basepython = python3.9
skip_install = true
Expand Down

0 comments on commit 149e62b

Please sign in to comment.