Skip to content

Commit f397cd4

Browse files
authored
Add support for Python 3.11 (#2239)
1 parent 8c1cc34 commit f397cd4

File tree

5 files changed

+27
-17
lines changed

5 files changed

+27
-17
lines changed

.github/workflows/tox.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
push: # only publishes pushes to the main branch to TestPyPI
99
branches: # any integration branch but not tag
1010
- "main"
11-
pull_request_target:
11+
pull_request:
1212
release:
1313
types:
1414
- published # It seems that you can publish directly without creating
@@ -111,24 +111,21 @@ jobs:
111111
# proof that we failed to catch a bug by not running it. Using
112112
# distribution should be preferred instead of custom builds.
113113
matrix:
114+
name:
115+
- py38
116+
tox_env:
117+
- py38
114118
python-version:
115-
# keep list sorted as it determines UI order too
116119
- 3.8
117-
- 3.9
118-
- "3.10"
119120
os:
120121
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
121122
- ubuntu-20.04
122123
# - windows-latest
123124
# - windows-2016
124125
include:
125-
# windows-2022 WSL does timeout running tests, likely caused but some
126-
# extreme (>10x) performance degradation compared with windows-2019
127-
# https://github.com/actions/virtual-environments/issues/4856
128-
- name: py39 (wsl)
129-
tox_env: py39
130-
os: windows-2019
131-
shell: "wsl-bash {0}"
126+
# keep list sorted as it determines UI order too
127+
# linux
128+
# py38 is first and comes from matrix
132129
- tox_env: py38
133130
os: ubuntu-20.04
134131
python-version: 3.8
@@ -141,6 +138,11 @@ jobs:
141138
os: ubuntu-20.04
142139
python-version: "3.10"
143140
devel: true
141+
- tox_env: py311
142+
os: ubuntu-20.04
143+
python-version: "~3.11.0-0" # see https://github.com/actions/setup-python/issues/213#issuecomment-1146676713
144+
devel: true
145+
# macos
144146
- name: py38 (macos)
145147
tox_env: py38
146148
os: macOS-latest
@@ -149,6 +151,13 @@ jobs:
149151
tox_env: py310
150152
os: macOS-latest
151153
python-version: "3.10"
154+
# windows-2022 WSL does timeout running tests, likely caused but some
155+
# extreme (>10x) performance degradation compared with windows-2019
156+
# https://github.com/actions/virtual-environments/issues/4856
157+
- name: py39 (wsl)
158+
tox_env: py39
159+
os: windows-2019
160+
shell: "wsl-bash {0}"
152161

153162
env:
154163
# vars safe to be passed to wsl:

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ repos:
128128
# empty args needed in order to match mypy cli behavior
129129
args: [--strict]
130130
additional_dependencies:
131-
- ansible-compat>=2.1.0
131+
- ansible-compat>=2.2.0
132132
- ansible-core
133133
- enrich
134134
- flaky
@@ -153,7 +153,7 @@ repos:
153153
hooks:
154154
- id: pylint
155155
additional_dependencies:
156-
- ansible-compat>=2.1.0
156+
- ansible-compat>=2.2.0
157157
- ansible-core
158158
- docutils
159159
- enrich

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# pip-compile --extra=docs --extra=test --no-annotate --output-file=requirements.txt --strip-extras setup.cfg
66
#
77
alabaster==0.7.12
8-
ansible-compat==2.1.0
8+
ansible-compat==2.2.0
99
ansible-core==2.13.0
1010
ansible-pygments==0.1.1
1111
astroid==2.11.5

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ classifiers =
3939
Programming Language :: Python :: 3.8
4040
Programming Language :: Python :: 3.9
4141
Programming Language :: Python :: 3.10
42+
Programming Language :: Python :: 3.11
4243
Programming Language :: Python :: Implementation
4344
Programming Language :: Python :: Implementation :: CPython
4445
Programming Language :: Python :: Implementation :: Jython
@@ -63,7 +64,7 @@ zip_safe = False
6364

6465
# These are required in actual runtime:
6566
install_requires =
66-
ansible-compat>=2.1.0 # GPLv3
67+
ansible-compat>=2.2.0 # GPLv3
6768
ansible-core>=2.12.0 # GPLv3
6869
enrich>=1.2.6
6970
jsonschema>=4.6.0 # MIT, first version to have ordered keys in output

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ envlist =
55
lint
66
packaging
77
docs
8-
py{310,39,38}
9-
py{310,39,38}-devel
8+
py
9+
py-devel
1010
isolated_build = true
1111
requires =
1212
setuptools >= 41.4.0

0 commit comments

Comments
 (0)