From f7cda1ea00383124ec00d49437c4956819b12dc0 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Mon, 29 Jul 2024 11:21:42 +0200 Subject: [PATCH 1/2] ci: Workaround bug preventing Django test runs Workaround https://github.com/pypa/setuptools/issues/4519 by constraining `setuptools<72.0.0` when installing dependencies for Django tests. --- .github/workflows/test-integrations-web-frameworks-1.yml | 2 ++ constraints.txt | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 constraints.txt diff --git a/.github/workflows/test-integrations-web-frameworks-1.yml b/.github/workflows/test-integrations-web-frameworks-1.yml index 835dd724b3..0a73fb9de7 100644 --- a/.github/workflows/test-integrations-web-frameworks-1.yml +++ b/.github/workflows/test-integrations-web-frameworks-1.yml @@ -64,6 +64,7 @@ jobs: - name: Test django latest run: | set -x # print commands that are executed + export PIP_CONSTRAINT=constraints.txt ./scripts/runtox.sh "py${{ matrix.python-version }}-django-latest" - name: Test flask latest run: | @@ -140,6 +141,7 @@ jobs: - name: Test django pinned run: | set -x # print commands that are executed + export PIP_CONSTRAINT=constraints.txt ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-django" - name: Test flask pinned run: | diff --git a/constraints.txt b/constraints.txt new file mode 100644 index 0000000000..697aca1388 --- /dev/null +++ b/constraints.txt @@ -0,0 +1,3 @@ +# Workaround for https://github.com/pypa/setuptools/issues/4519. +# Applies only for Django tests. +setuptools<72.0.0 From 1418793e035c5f73a974c212cd610c868b2dbd62 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Mon, 29 Jul 2024 11:33:58 +0200 Subject: [PATCH 2/2] ci: Workaround bug preventing Django test runs Workaround https://github.com/pypa/setuptools/issues/4519 by constraining `setuptools<72.0.0` when installing dependencies for Django tests. --- .github/workflows/test-integrations-web-frameworks-1.yml | 2 -- tox.ini | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test-integrations-web-frameworks-1.yml b/.github/workflows/test-integrations-web-frameworks-1.yml index 0a73fb9de7..835dd724b3 100644 --- a/.github/workflows/test-integrations-web-frameworks-1.yml +++ b/.github/workflows/test-integrations-web-frameworks-1.yml @@ -64,7 +64,6 @@ jobs: - name: Test django latest run: | set -x # print commands that are executed - export PIP_CONSTRAINT=constraints.txt ./scripts/runtox.sh "py${{ matrix.python-version }}-django-latest" - name: Test flask latest run: | @@ -141,7 +140,6 @@ jobs: - name: Test django pinned run: | set -x # print commands that are executed - export PIP_CONSTRAINT=constraints.txt ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-django" - name: Test flask pinned run: | diff --git a/tox.ini b/tox.ini index 3ab1bae529..eae6f054b5 100644 --- a/tox.ini +++ b/tox.ini @@ -648,6 +648,7 @@ setenv = OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES COVERAGE_FILE=.coverage-{envname} django: DJANGO_SETTINGS_MODULE=tests.integrations.django.myapp.settings + py3.12-django: PIP_CONSTRAINT=constraints.txt common: TESTPATH=tests gevent: TESTPATH=tests