Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Python 3.12 #391

Merged
merged 1 commit into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.head_ref }}" =~ ^release_ ]]; then \
echo "matrix={ \
\"os\": [ \"ubuntu-latest\", \"macos-latest\", \"windows-latest\" ], \
\"python-version\": [ \"3.6\", \"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\" ], \
\"python-version\": [ \"3.6\", \"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\" ], \
\"package_level\": [ \"minimum\", \"latest\" ], \
\"exclude\": [ \
{ \
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
else \
echo "matrix={ \
\"os\": [ \"ubuntu-latest\" ], \
\"python-version\": [ \"3.11\" ], \
\"python-version\": [ \"3.12\" ], \
\"package_level\": [ \"minimum\", \"latest\" ], \
\"include\": [ \
{ \
Expand All @@ -87,7 +87,12 @@ jobs:
}, \
{ \
\"os\": \"macos-latest\", \
\"python-version\": \"3.11\", \
\"python-version\": \"3.12\", \
\"package_level\": \"minimum\" \
}, \
{ \
\"os\": \"macos-latest\", \
\"python-version\": \"3.12\", \
\"package_level\": \"latest\" \
}, \
{ \
Expand All @@ -97,12 +102,12 @@ jobs:
}, \
{ \
\"os\": \"windows-latest\", \
\"python-version\": \"3.11\", \
\"python-version\": \"3.12\", \
\"package_level\": \"minimum\" \
}, \
{ \
\"os\": \"windows-latest\", \
\"python-version\": \"3.11\", \
\"python-version\": \"3.12\", \
\"package_level\": \"latest\" \
} \
] \
Expand Down
33 changes: 21 additions & 12 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ dparse>=0.6.2
pytest>=4.3.1; python_version == '3.6'
pytest>=4.4.0; python_version >= '3.7' and python_version <= '3.9'
pytest>=6.2.5; python_version >= '3.10'
importlib-metadata>=0.12,<5.0.0; python_version <= '3.7'
importlib-metadata>=1.1.0; python_version >= '3.8'
importlib-metadata>=2.1.3,<5; python_version == '3.6'
importlib-metadata>=4.8.3,<5; python_version >= '3.7'

# packaging is used by pytest, pip-check-reqs, sphinx
# packaging>=20.5 is needed by pip-check-reqs 2.4.3 but it requires only packaging>=16.0
Expand All @@ -28,7 +28,8 @@ packaging>=21.0
# Virtualenv
# build requires virtualenv.cli_run which was added in 20.1
# virtualenv 20.0 requires six<2,>=1.12.0
virtualenv>=20.1.0
virtualenv>=20.1.0; python_version <= '3.11'
virtualenv>=20.23.0; python_version >= '3.12'

# Coverage reporting (no imports, invoked via coveralls script):
coverage>=5.0
Expand All @@ -40,36 +41,43 @@ coveralls>=3.3.0
# well with its pinned dependencies, so we need to repeat these for py34.
# flake8 4.0.0 fixes an AttributeError on Python 3.10.
flake8>=3.8.0; python_version <= '3.9'
flake8>=4.0.0; python_version >= '3.10'
mccabe>=0.6.0
flake8>=5.0.0; python_version >= '3.10'
mccabe>=0.6.0; python_version <= '3.9'
mccabe>=0.7.0; python_version >= '3.10'
pycodestyle>=2.6.0; python_version <= '3.9'
pycodestyle>=2.8.0; python_version >= '3.10'
pycodestyle>=2.9.0; python_version >= '3.10'
pyflakes>=2.2.0; python_version <= '3.9'
pyflakes>=2.4.0; python_version >= '3.10'
pyflakes>=2.5.0; python_version >= '3.10'
entrypoints>=0.3.0

# PyLint (no imports, invoked via pylint script)
# Pylint requires astroid
# Pylint 2.7 / astroid 2.5 started requiring Python>=3.6
# Pylint 2.14 / astroid 2.12 started requiring Python>=3.7
# Pylint 3.0 / astroid 3.0 started requiring Python>=3.8
pylint>=2.13.0,<2.14.0; python_version == '3.6'
pylint>=2.13.0; python_version >= '3.7' and python_version <= '3.10'
pylint>=2.15.0; python_version >= '3.11'
pylint>=2.15.0; python_version == '3.11'
pylint>=3.0.1; python_version >= '3.12'
astroid>=2.11.0; python_version <= '3.10'
astroid>=2.12.4; python_version >= '3.11'
astroid>=2.12.4; python_version == '3.11'
astroid>=3.0.1; python_version >= '3.12'
typed-ast>=1.4.0,<1.5.0; python_version <= '3.7' and implementation_name=='cpython'
# lazy-object-proxy is used by astroid
lazy-object-proxy>=1.4.3
wrapt>=1.11.2; python_version <= '3.10'
wrapt>=1.14; python_version >= '3.11'
# platformdirs is used by pylint starting with its 2.10
platformdirs>=2.2.0
platformdirs>=2.2.0; python_version <= '3.11'
platformdirs>=3.2.0; python_version >= '3.12'
# isort 4.2.8 fixes a pylint issue with false positive on import order of ssl on Windows
# isort 4.3.8 fixes an issue with py310 and works on py310 (Note that isort 5.10.0 has official support for py310)
isort>=4.3.8
# Pylint 2.14 uses tomlkit>=0.10.1 and requires py>=3.7
tomlkit>=0.10.1; python_version >= '3.7'
# dill is used by pylint >=2.13
dill>=0.2; python_version <= '3.10'
dill>=0.3.6; python_version >= '3.11'
dill>=0.3.7; python_version >= '3.11'

# Sphinx (no imports, invoked via sphinx-build script):
# Keep in sync with rtd-requirements.txt
Expand Down Expand Up @@ -104,4 +112,5 @@ pipdeptree>=2.2.0
# pip-check-reqs 2.4.3 fixes a speed issue on Python 3.11 and requires pip>=21.2.4
# pip-check-reqs 2.5.0 has issue https://github.com/r1chardj0n3s/pip-check-reqs/issues/143
pip-check-reqs>=2.3.2; python_version <= '3.7'
pip-check-reqs>=2.4.3,!=2.5.0; python_version >= '3.8'
pip-check-reqs>=2.4.3,!=2.5.0; python_version >= '3.8' and python_version <= '3.11'
pip-check-reqs>=2.5.1; python_version >= '3.12'
5 changes: 5 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ Released: not yet

**Enhancements:**

* Added support for Python 3.12. Had to increase the minimum versions of
setuptools to 66.1.0 and pip to 23.1.2 in order to address removal of the
long deprecated pkgutils.ImpImporter in Python 3.12, as well as several
packages used only for development. (issue #388)

* Added a '--version' option for showing the versions of the exporter and
the zhmcclient library. (issue #298)

Expand Down
36 changes: 22 additions & 14 deletions minimum-constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
# Pip 20.2 introduced a new resolver whose backtracking had issues that were resolved only in 21.2.2.
# pip>=21.0 is needed for the cryptography package on Windows on GitHub Actions.
pip==21.2.4; python_version <= '3.9'
pip==23.0.1; python_version >= '3.10'
pip==23.0.1; python_version >= '3.10' and python_version <= '3.11'
pip==23.2.0; python_version >= '3.12'
# setuptools 59.7.0 removed support for py36
setuptools==59.6.0; python_version == '3.6'
setuptools==65.5.1; python_version >= '3.7'
setuptools==65.5.1; python_version >= '3.7' and python_version <= '3.11'
setuptools==66.1.0; python_version >= '3.12'
wheel==0.30.0; python_version == '3.6'
wheel==0.38.1; python_version >= '3.7'

Expand Down Expand Up @@ -91,13 +93,14 @@ pytest==6.2.5; python_version >= '3.10'
# Pluggy 0.12.0 has a bug causing pytest plugins to fail loading on py38
pluggy==0.7.1; python_version == '3.6'
pluggy==0.13.0; python_version >= '3.7'
importlib-metadata==0.22; python_version <= '3.7'
importlib-metadata==1.1.0; python_version >= '3.8'
importlib-metadata==2.1.3; python_version == '3.6'
importlib-metadata==4.8.3; python_version >= '3.7'

packaging==21.0

# Virtualenv
virtualenv==20.1.0
virtualenv==20.1.0; python_version <= '3.11'
virtualenv==20.23.0; python_version >= '3.12'

# Coverage reporting (no imports, invoked via coveralls script):
coverage==5.0
Expand All @@ -106,28 +109,32 @@ coveralls==3.3.0

# Flake8 (no imports, invoked via flake8 script):
flake8==3.8.0; python_version <= '3.9'
flake8==4.0.0; python_version >= '3.10'
mccabe==0.6.0
flake8==5.0.0; python_version >= '3.10'
mccabe==0.6.0; python_version <= '3.9'
mccabe==0.7.0; python_version >= '3.10'
pycodestyle==2.6.0; python_version <= '3.9'
pycodestyle==2.8.0; python_version >= '3.10'
pycodestyle==2.9.0; python_version >= '3.10'
pyflakes==2.2.0; python_version <= '3.9'
pyflakes==2.4.0; python_version >= '3.10'
pyflakes==2.5.0; python_version >= '3.10'
entrypoints==0.3.0

# PyLint (no imports, invoked via pylint script):
pylint==2.13.0; python_version <= '3.10'
pylint==2.15.0; python_version >= '3.11'
pylint==2.15.0; python_version == '3.11'
pylint==3.0.1; python_version >= '3.12'
astroid==2.11.0; python_version <= '3.10'
astroid==2.12.4; python_version >= '3.11'
astroid==2.12.4; python_version == '3.11'
astroid==3.0.1; python_version >= '3.12'
typed-ast==1.4.0; python_version <= '3.7' and implementation_name=='cpython'
lazy-object-proxy==1.4.3
wrapt==1.12; python_version <= '3.10'
wrapt==1.14; python_version >= '3.11'
platformdirs==2.2.0
platformdirs==2.2.0; python_version >= '3.6' and python_version <= '3.11'
platformdirs==3.2.0; python_version >= '3.12'
isort==4.3.8
tomlkit==0.10.1; python_version >= '3.7'
dill==0.2; python_version <= '3.10'
dill==0.3.6; python_version >= '3.11'
dill==0.3.7; python_version >= '3.11'

# Sphinx (no imports, invoked via sphinx-build script):
Sphinx==3.5.4; python_version <= '3.9'
Expand All @@ -152,7 +159,8 @@ readme-renderer==25.0
# Package dependency management tools (not used by any make rules)
pipdeptree==2.2.0
pip-check-reqs==2.3.2; python_version <= '3.7'
pip-check-reqs==2.4.3; python_version >= '3.8'
pip-check-reqs==2.4.3; python_version >= '3.8' and python_version <= '3.11'
pip-check-reqs==2.5.1; python_version >= '3.12'

# Indirect dependencies for development that require a version constraint (must be consistent with dev-requirements.txt)

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,6 @@ def read_file(a_file):
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
)