Skip to content

Commit 8528b63

Browse files
authored
[1.26] Fix downstream tests (#3409)
* Skip hanging requests test * [1.26] Backport downstream tests improvements This will run tests every time to catch regression earlier.
1 parent 40b6d16 commit 8528b63

File tree

4 files changed

+49
-34
lines changed

4 files changed

+49
-34
lines changed

.github/workflows/downstream.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Downstream
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions: "read-all"
6+
7+
jobs:
8+
downstream:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
downstream: [botocore, requests]
13+
runs-on: ubuntu-22.04
14+
timeout-minutes: 30
15+
16+
steps:
17+
- name: "Checkout repository"
18+
uses: actions/checkout@v4
19+
20+
- name: "Setup Python"
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.x"
24+
25+
- name: "Install dependencies"
26+
run: python -m pip install --upgrade nox
27+
28+
- name: "Run downstream tests"
29+
run: nox -s downstream_${{ matrix.downstream }}

.github/workflows/integration.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

ci/skip-hanging-requests-test.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/tests/test_requests.py b/tests/test_requests.py
2+
index b4e9fe92..b150bb3f 100644
3+
--- a/tests/test_requests.py
4+
+++ b/tests/test_requests.py
5+
@@ -914,6 +914,7 @@ class TestRequests:
6+
def test_unicode_get(self, httpbin, url, params):
7+
requests.get(httpbin(url), params=params)
8+
9+
+ @pytest.mark.skip(reason="https://github.com/psf/requests/issues/6734#issuecomment-2173121514")
10+
def test_unicode_header_name(self, httpbin):
11+
requests.put(
12+
httpbin("put"),

noxfile.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def git_clone(session, git_url):
8181
session.run("git", "clone", "--depth", "1", git_url, external=True)
8282

8383

84-
@nox.session(python=["3.10"])
84+
@nox.session()
8585
def downstream_botocore(session):
8686
root = os.getcwd()
8787
tmp_dir = session.create_tmp()
@@ -99,14 +99,20 @@ def downstream_botocore(session):
9999
session.run("python", "scripts/ci/run-tests")
100100

101101

102-
@nox.session(python=["3.10"])
102+
@nox.session()
103103
def downstream_requests(session):
104104
root = os.getcwd()
105105
tmp_dir = session.create_tmp()
106106

107107
session.cd(tmp_dir)
108108
git_clone(session, "https://github.com/psf/requests")
109109
session.chdir("requests")
110+
111+
# https://github.com/psf/requests/issues/6734#issuecomment-2173121514
112+
session.run(
113+
"git", "apply", f"{root}/ci/skip-hanging-requests-test.patch", external=True
114+
)
115+
110116
session.run("git", "rev-parse", "HEAD", external=True)
111117
session.install(".[socks]", silent=False)
112118
session.install("-r", "requirements-dev.txt", silent=False)

0 commit comments

Comments
 (0)