Skip to content

Commit

Permalink
Add support for Python 3.11 (#2239)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Jul 15, 2022
1 parent 8c1cc34 commit f397cd4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 17 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
push: # only publishes pushes to the main branch to TestPyPI
branches: # any integration branch but not tag
- "main"
pull_request_target:
pull_request:
release:
types:
- published # It seems that you can publish directly without creating
Expand Down Expand Up @@ -111,24 +111,21 @@ jobs:
# proof that we failed to catch a bug by not running it. Using
# distribution should be preferred instead of custom builds.
matrix:
name:
- py38
tox_env:
- py38
python-version:
# keep list sorted as it determines UI order too
- 3.8
- 3.9
- "3.10"
os:
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
- ubuntu-20.04
# - windows-latest
# - windows-2016
include:
# windows-2022 WSL does timeout running tests, likely caused but some
# extreme (>10x) performance degradation compared with windows-2019
# https://github.com/actions/virtual-environments/issues/4856
- name: py39 (wsl)
tox_env: py39
os: windows-2019
shell: "wsl-bash {0}"
# keep list sorted as it determines UI order too
# linux
# py38 is first and comes from matrix
- tox_env: py38
os: ubuntu-20.04
python-version: 3.8
Expand All @@ -141,6 +138,11 @@ jobs:
os: ubuntu-20.04
python-version: "3.10"
devel: true
- tox_env: py311
os: ubuntu-20.04
python-version: "~3.11.0-0" # see https://github.com/actions/setup-python/issues/213#issuecomment-1146676713
devel: true
# macos
- name: py38 (macos)
tox_env: py38
os: macOS-latest
Expand All @@ -149,6 +151,13 @@ jobs:
tox_env: py310
os: macOS-latest
python-version: "3.10"
# windows-2022 WSL does timeout running tests, likely caused but some
# extreme (>10x) performance degradation compared with windows-2019
# https://github.com/actions/virtual-environments/issues/4856
- name: py39 (wsl)
tox_env: py39
os: windows-2019
shell: "wsl-bash {0}"

env:
# vars safe to be passed to wsl:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ repos:
# empty args needed in order to match mypy cli behavior
args: [--strict]
additional_dependencies:
- ansible-compat>=2.1.0
- ansible-compat>=2.2.0
- ansible-core
- enrich
- flaky
Expand All @@ -153,7 +153,7 @@ repos:
hooks:
- id: pylint
additional_dependencies:
- ansible-compat>=2.1.0
- ansible-compat>=2.2.0
- ansible-core
- docutils
- enrich
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# pip-compile --extra=docs --extra=test --no-annotate --output-file=requirements.txt --strip-extras setup.cfg
#
alabaster==0.7.12
ansible-compat==2.1.0
ansible-compat==2.2.0
ansible-core==2.13.0
ansible-pygments==0.1.1
astroid==2.11.5
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: Jython
Expand All @@ -63,7 +64,7 @@ zip_safe = False

# These are required in actual runtime:
install_requires =
ansible-compat>=2.1.0 # GPLv3
ansible-compat>=2.2.0 # GPLv3
ansible-core>=2.12.0 # GPLv3
enrich>=1.2.6
jsonschema>=4.6.0 # MIT, first version to have ordered keys in output
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ envlist =
lint
packaging
docs
py{310,39,38}
py{310,39,38}-devel
py
py-devel
isolated_build = true
requires =
setuptools >= 41.4.0
Expand Down

0 comments on commit f397cd4

Please sign in to comment.