Add support for Python 3.13 (#828)

* Update tests pipeline and setup.py

* Update tox coverage command

* Add setuptools to the dev requirements file

* Enforce coverage version in tox

* Leave coveralls CI/CD job on Python 3.12 because coveralls 4.0.1 doesn't support Python 3.13

* Update changelog and publishing jobs
This commit is contained in:
Roman Mogylatov 2024-11-04 00:01:28 -05:00 committed by GitHub
parent 37486900cd
commit c92129dcb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 16 additions and 13 deletions

View File

@ -15,11 +15,11 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: 3.12 python-version: 3.13
- run: pip install tox - run: pip install tox
- run: tox - run: tox
env: env:
TOXENV: 3.12 TOXENV: 3.13
linters: linters:
name: Run linters name: Run linters
@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: 3.12 python-version: 3.13
- run: pip install tox - run: pip install tox
- run: tox - run: tox
env: env:
@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: 3.12 python-version: 3.13
- run: | - run: |
python -m pip install --upgrade pip setuptools python -m pip install --upgrade pip setuptools
python setup.py sdist python setup.py sdist
@ -61,7 +61,7 @@ jobs:
matrix: matrix:
os: [ubuntu-22.04, windows-2019, macos-14] os: [ubuntu-22.04, windows-2019, macos-14]
env: env:
CIBW_SKIP: cp27-* cp313-* CIBW_SKIP: cp27-*
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Build wheels - name: Build wheels
@ -75,7 +75,7 @@ jobs:
needs: [tests, linters] needs: [tests, linters]
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
env: env:
CIBW_SKIP: cp27-* cp313-* CIBW_SKIP: cp27-*
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up QEMU - name: Set up QEMU
@ -114,7 +114,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: 3.12 python-version: 3.13
- run: pip install awscli - run: pip install awscli
- run: pip install -r requirements-doc.txt - run: pip install -r requirements-doc.txt
- run: pip install -e . - run: pip install -e .

View File

@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: [3.8, 3.9, "3.10", 3.11, 3.12] python-version: [3.8, 3.9, "3.10", 3.11, 3.12, 3.13]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
@ -65,7 +65,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: 3.12 python-version: 3.13
- run: pip install tox - run: pip install tox
- run: tox - run: tox
env: env:

View File

@ -9,6 +9,7 @@ follows `Semantic versioning`_
Develop Develop
-------- --------
- Add support for Python 3.13.
- Migrate to Cython 3 (version 3.0.11). Many thanks to `ZipFile <https://github.com/ZipFile>`_ for - Migrate to Cython 3 (version 3.0.11). Many thanks to `ZipFile <https://github.com/ZipFile>`_ for
this contribution `#813 <https://github.com/ets-labs/python-dependency-injector/pull/813>`_. this contribution `#813 <https://github.com/ets-labs/python-dependency-injector/pull/813>`_.

View File

@ -1,4 +1,5 @@
cython==3.0.11 cython==3.0.11
setuptools
pytest pytest
pytest-asyncio pytest-asyncio
tox tox

View File

@ -111,6 +111,7 @@ setup(name="dependency-injector",
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python :: Implementation :: PyPy",
"Framework :: AsyncIO", "Framework :: AsyncIO",

View File

@ -1,7 +1,7 @@
[tox] [tox]
parallel_show_output = true parallel_show_output = true
envlist= envlist=
coveralls, pylint, flake8, pydocstyle, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, pypy3.9, pypy3.10 coveralls, pylint, flake8, pydocstyle, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, pypy3.9, pypy3.10
[testenv] [testenv]
deps= deps=
@ -26,12 +26,12 @@ python_files = test_*_py3*.py
[testenv:coveralls] [testenv:coveralls]
passenv = GITHUB_*, COVERALLS_*, DEPENDENCY_INJECTOR_* passenv = GITHUB_*, COVERALLS_*, DEPENDENCY_INJECTOR_*
basepython=python3.12 basepython=python3.12 # TODO: Upgrade to version 3.13 is blocked by coveralls 4.0.1 not supporting Python 3.13
deps= deps=
{[testenv]deps} {[testenv]deps}
cython>=3,<4 cython>=3,<4
coverage coverage>=7
coveralls coveralls>=4
commands= commands=
coverage erase coverage erase
coverage run --rcfile=./.coveragerc -m pytest -c tests/.configs/pytest.ini coverage run --rcfile=./.coveragerc -m pytest -c tests/.configs/pytest.ini