From d635708a2a26e334226e9c171977e08d10aa5ca1 Mon Sep 17 00:00:00 2001 From: ZipFile Date: Mon, 19 May 2025 13:08:15 +0000 Subject: [PATCH 1/9] Fix file inclusion warnings from MANIFEST.in --- MANIFEST.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index b29eeb36..7205ddc5 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,9 +1,7 @@ -recursive-include src/dependency_injector *.py* *.c +recursive-include src/dependency_injector *.py* *.c py.typed recursive-include tests *.py include README.rst include CONTRIBUTORS.rst include LICENSE.rst -include requirements.txt include setup.py include tox.ini -include py.typed From 11cf80c6d00ae0d8f518db19cae8ff22dc12b3c3 Mon Sep 17 00:00:00 2001 From: ZipFile Date: Mon, 19 May 2025 13:27:05 +0000 Subject: [PATCH 2/9] Fix PyPy test runs in tox --- tox.ini | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/tox.ini b/tox.ini index b524b88d..705ea890 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] parallel_show_output = true envlist= - coveralls, pylint, flake8, pydocstyle, pydantic-v1, pydantic-v2, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, pypy3.9, pypy3.10 + coveralls, pylint, flake8, pydocstyle, pydantic-v1, pydantic-v2, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, pypy3.9, pypy3.10, pypy3.11 [testenv] deps= @@ -20,7 +20,6 @@ deps= extras= yaml commands = pytest -python_files = test_*_py3*.py setenv = COVERAGE_RCFILE = pyproject.toml @@ -61,22 +60,6 @@ commands= coverage report coveralls -[testenv:pypy3.9] -deps= - pytest - pytest-asyncio - httpx - flask - pydantic-settings - werkzeug - fastapi - boto3 - mypy_boto3_s3 -extras= - yaml -commands = pytest - - [testenv:pylint] deps= pylint From beb1f30a4880376028844830f72e30321b423eb4 Mon Sep 17 00:00:00 2001 From: ZipFile Date: Mon, 19 May 2025 13:29:40 +0000 Subject: [PATCH 3/9] Add wheelhouse to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a9f80bee..86ecf7c7 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ lib64/ parts/ sdist/ var/ +wheelhouse/ *.egg-info/ .installed.cfg *.egg From cd1c227662970c95a995d5590537b91f25753549 Mon Sep 17 00:00:00 2001 From: ZipFile Date: Mon, 19 May 2025 13:31:34 +0000 Subject: [PATCH 4/9] Require Cython>=3.1.1 --- .github/workflows/tests-and-linters.yml | 2 +- pyproject.toml | 2 +- requirements-dev.txt | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-and-linters.yml b/.github/workflows/tests-and-linters.yml index f43a2db8..4ee0d192 100644 --- a/.github/workflows/tests-and-linters.yml +++ b/.github/workflows/tests-and-linters.yml @@ -44,7 +44,7 @@ jobs: - uses: actions/setup-python@v4 with: python-version: 3.12 - - run: pip install tox 'cython>=3,<4' + - run: pip install tox - run: tox -vv env: TOXENV: coveralls diff --git a/pyproject.toml b/pyproject.toml index ec5daadd..80a054e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools", "Cython"] +requires = ["setuptools", "Cython>=3.1.1"] build-backend = "setuptools.build_meta" [project] diff --git a/requirements-dev.txt b/requirements-dev.txt index e0def494..47e3ca42 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -cython==3.1.0 +cython==3.1.1 setuptools pytest pytest-asyncio @@ -13,7 +13,8 @@ mypy pyyaml httpx fastapi -pydantic==1.10.17 +pydantic +pydantic-settings numpy scipy boto3 From d460e37128ff32a6d3c8d08fa5cc8b160232a834 Mon Sep 17 00:00:00 2001 From: ZipFile Date: Mon, 19 May 2025 13:32:00 +0000 Subject: [PATCH 5/9] Fix pytest-asyncio warning --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 80a054e7..7512cb94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,6 +102,7 @@ max-public-methods = 30 [tool.pytest.ini_options] testpaths = ["tests/unit/"] asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "function" markers = [ "pydantic: Tests with Pydantic as a dependency", ] From 7c5d0b21d83b7e22926f3eb58b02b72d1298ecd3 Mon Sep 17 00:00:00 2001 From: ZipFile Date: Mon, 19 May 2025 13:34:29 +0000 Subject: [PATCH 6/9] Limit ABI3 builds to CPython only --- setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 877d9472..5f4669e4 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,17 @@ """`Dependency injector` setup script.""" import os +import sys from Cython.Build import cythonize from Cython.Compiler import Options from setuptools import Extension, setup debug = os.environ.get("DEPENDENCY_INJECTOR_DEBUG_MODE") == "1" -limited_api = os.environ.get("DEPENDENCY_INJECTOR_LIMITED_API") == "1" +limited_api = ( + os.environ.get("DEPENDENCY_INJECTOR_LIMITED_API") == "1" + and sys.implementation.name == "cpython" +) defined_macros = [] options = {} compiler_directives = { @@ -31,7 +35,7 @@ if limited_api: options.setdefault("bdist_wheel", {}) options["bdist_wheel"]["py_limited_api"] = "cp38" - defined_macros.append(("Py_LIMITED_API", 0x03080000)) + defined_macros.append(("Py_LIMITED_API", "0x03080000")) setup( options=options, From cb559c8b6a68439ce270731b24aed58a9a5df003 Mon Sep 17 00:00:00 2001 From: ZipFile Date: Mon, 19 May 2025 13:35:23 +0000 Subject: [PATCH 7/9] Enable ABI3 builds --- .github/workflows/publishing.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publishing.yml b/.github/workflows/publishing.yml index f3bf1529..27bed3b7 100644 --- a/.github/workflows/publishing.yml +++ b/.github/workflows/publishing.yml @@ -62,11 +62,14 @@ jobs: matrix: os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2019, macos-14] env: - CIBW_SKIP: cp27-* + CIBW_ENABLE: pypy + CIBW_ENVIRONMENT: >- + PIP_CONFIG_SETTINGS="build_ext=-j4" + DEPENDENCY_INJECTOR_LIMITED_API="1" steps: - uses: actions/checkout@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.20.0 + uses: pypa/cibuildwheel@v2.23.3 - uses: actions/upload-artifact@v4 with: name: cibw-wheels-x86-${{ matrix.os }}-${{ strategy.job-index }} From 84e7ac7bf04b43fe2694f02b6a779f78f19ce47c Mon Sep 17 00:00:00 2001 From: ZipFile Date: Thu, 22 May 2025 20:02:39 +0000 Subject: [PATCH 8/9] Migrate to OIDC publishing --- .github/workflows/publishing.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publishing.yml b/.github/workflows/publishing.yml index 27bed3b7..893536a4 100644 --- a/.github/workflows/publishing.yml +++ b/.github/workflows/publishing.yml @@ -75,10 +75,13 @@ jobs: name: cibw-wheels-x86-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl - publish: - name: Publish on PyPI + test-publish: + name: Upload release to TestPyPI needs: [build-sdist, build-wheels] - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest + environment: test-pypi + permissions: + id-token: write steps: - uses: actions/download-artifact@v4 with: @@ -87,11 +90,22 @@ jobs: merge-multiple: true - 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/ + repository-url: https://test.pypi.org/legacy/ + + publish: + name: Upload release to PyPI + needs: [build-sdist, build-wheels, test-publish] + runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + pattern: cibw-* + path: dist + merge-multiple: true + - uses: pypa/gh-action-pypi-publish@release/v1 publish-docs: name: Publish docs From 6a04d79bddd5a94d27610ac376907c08d9f23a78 Mon Sep 17 00:00:00 2001 From: ZipFile Date: Thu, 22 May 2025 20:03:35 +0000 Subject: [PATCH 9/9] Test build v4.47.0a3 --- src/dependency_injector/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dependency_injector/__init__.py b/src/dependency_injector/__init__.py index faa905f5..b8352f95 100644 --- a/src/dependency_injector/__init__.py +++ b/src/dependency_injector/__init__.py @@ -1,6 +1,6 @@ """Top-level package.""" -__version__ = "4.46.0" +__version__ = "4.47.0a3" """Version number. :type: str