Skip to content

Python 3.11 Support #647

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

Merged
merged 19 commits into from
Dec 19, 2022
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
82 changes: 40 additions & 42 deletions .github/workflows/publishing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Publishing

on:
workflow_dispatch:
push:
tags:
- '*'
Expand All @@ -9,28 +10,28 @@ jobs:

tests:
name: Run tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: 3.11
- run: pip install tox
- run: tox
env:
TOXENV: "3.10"
TOXENV: 3.11

linters:
name: Run linters
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
toxenv: [flake8, pydocstyle, mypy, pylint]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: 3.11
- run: pip install tox
- run: tox
env:
Expand All @@ -39,14 +40,14 @@ jobs:
build-sdist:
name: Build source tarball
needs: [tests, linters]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: 3.11
- run: python setup.py sdist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./dist/*

Expand All @@ -56,63 +57,60 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macOS-10.15]
os: [ubuntu-22.04, windows-2019, macos-11]
env:
CIBW_SKIP: cp27-win*
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- run: pip install cibuildwheel==2.1.3
- run: cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build-wheels-linux-aarch64:
name: Build wheels (ubuntu-latest-aarch64)
name: Build wheels (ubuntu-22.04-aarch64)
needs: [tests, linters]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- run: pip install cibuildwheel==2.1.3
- run: cibuildwheel --archs aarch64 --output-dir wheelhouse
- uses: actions/upload-artifact@v2
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

publish:
name: Publish on PyPI
needs: [build-sdist, build-wheels, build-wheels-linux-aarch64]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@master
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# For publishing to Test PyPI, uncomment next two lines:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# For publishing to Test PyPI, uncomment next two lines:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/

publish-docs:
name: Publish docs
needs: [publish]
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: 3.11
- run: pip install -r requirements-doc.txt
- run: pip install awscli
- run: pip install -e .
Expand Down
34 changes: 25 additions & 9 deletions .github/workflows/tests-and-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,31 @@ on: [push, pull_request, workflow_dispatch]

jobs:

tests-on-legacy-versions:
name: Run tests on legacy versions
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, pypy2.7, pypy3.9]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox
- run: tox
env:
TOXENV: ${{ matrix.python-version }}

test-on-different-versions:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, "3.10", pypy2, pypy3]
python-version: [3.8, 3.9, "3.10", 3.11]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox
Expand All @@ -28,10 +44,10 @@ jobs:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: 3.11
- run: pip install tox cython
- run: make cythonize
- run: tox
Expand All @@ -45,10 +61,10 @@ jobs:
matrix:
toxenv: [flake8, pydocstyle, mypy, pylint]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: 3.11
- run: pip install tox
- run: tox
env:
Expand Down
8 changes: 8 additions & 0 deletions docs/main/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ that were made in every particular version.
From version 0.7.6 *Dependency Injector* framework strictly
follows `Semantic versioning`_

Development version
-------------------
- Add support of Python 3.11.
- Update CI/CD to use Ubuntu 22.04.
- Update CI/CD to ``actions/checkout@v3``, ``actions/setup-python@v4``, ``actions/upload-artifact@v3``, ``pypa/[email protected]``,
and ``actions/download-artifact@v3``.
- Regenerate C sources using Cython 0.29.32.

4.40.0
------
- Add ``Configuration.from_json()`` method to load configuration from a json file.
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cython==0.29.30
cython==0.29.32
pytest
pytest-asyncio
tox
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,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 :: PyPy",
"Framework :: AsyncIO",
Expand Down
54 changes: 51 additions & 3 deletions src/dependency_injector/_cwiring.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading