diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml new file mode 100644 index 0000000000..bdf7e4ed37 --- /dev/null +++ b/.github/workflows/downstream.yml @@ -0,0 +1,29 @@ +name: Downstream + +on: [push, pull_request, workflow_dispatch] + +permissions: "read-all" + +jobs: + downstream: + strategy: + fail-fast: false + matrix: + downstream: [botocore, requests] + runs-on: ubuntu-22.04 + timeout-minutes: 30 + + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + + - name: "Setup Python" + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: "Install dependencies" + run: python -m pip install --upgrade nox + + - name: "Run downstream tests" + run: nox -s downstream_${{ matrix.downstream }} diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml deleted file mode 100644 index 7753dcb308..0000000000 --- a/.github/workflows/integration.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Downstream - -on: - pull_request: - paths: - - "src/urllib3/_version.py" - -permissions: "read-all" - -jobs: - integration: - strategy: - fail-fast: false - matrix: - python-version: ["3.10"] - downstream: [botocore, requests] - - runs-on: ubuntu-22.04 - - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Set Up Python - ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Dependencies - run: python -m pip install --upgrade nox - - name: Run downstream tests - run: nox -s downstream_${{ matrix.downstream }}-${{ matrix.python-version }} diff --git a/ci/skip-hanging-requests-test.patch b/ci/skip-hanging-requests-test.patch new file mode 100644 index 0000000000..6769e45835 --- /dev/null +++ b/ci/skip-hanging-requests-test.patch @@ -0,0 +1,12 @@ +diff --git a/tests/test_requests.py b/tests/test_requests.py +index b4e9fe92..b150bb3f 100644 +--- a/tests/test_requests.py ++++ b/tests/test_requests.py +@@ -914,6 +914,7 @@ class TestRequests: + def test_unicode_get(self, httpbin, url, params): + requests.get(httpbin(url), params=params) + ++ @pytest.mark.skip(reason="https://github.com/psf/requests/issues/6734#issuecomment-2173121514") + def test_unicode_header_name(self, httpbin): + requests.put( + httpbin("put"), diff --git a/noxfile.py b/noxfile.py index a7dc62eca3..32366a57de 100644 --- a/noxfile.py +++ b/noxfile.py @@ -81,7 +81,7 @@ def git_clone(session, git_url): session.run("git", "clone", "--depth", "1", git_url, external=True) -@nox.session(python=["3.10"]) +@nox.session() def downstream_botocore(session): root = os.getcwd() tmp_dir = session.create_tmp() @@ -99,7 +99,7 @@ def downstream_botocore(session): session.run("python", "scripts/ci/run-tests") -@nox.session(python=["3.10"]) +@nox.session() def downstream_requests(session): root = os.getcwd() tmp_dir = session.create_tmp() @@ -107,6 +107,12 @@ def downstream_requests(session): session.cd(tmp_dir) git_clone(session, "https://github.com/psf/requests") session.chdir("requests") + + # https://github.com/psf/requests/issues/6734#issuecomment-2173121514 + session.run( + "git", "apply", f"{root}/ci/skip-hanging-requests-test.patch", external=True + ) + session.run("git", "rev-parse", "HEAD", external=True) session.install(".[socks]", silent=False) session.install("-r", "requirements-dev.txt", silent=False)