Remove the Requests warning git patch
* Remove the Requests warning git patch
* Fix isort installation
See
MODIFY
.pre-commit-config.yaml
.pre-commit-config.yaml
@@ -12,7 +12,7 @@ repos:
args: ["--target-version", "py37"]
- repo: https://github.com/PyCQA/isort
- rev: 5.10.1
+ rev: 5.12.0
hooks:
- id: isort

DELETE
ci/0003-requests-removed-warnings.patch
-diff --git a/tests/__init__.py b/tests/__init__.py
-index 04385be1..e69de29b 100644
---- a/tests/__init__.py
-+++ b/tests/__init__.py
-@@ -1,10 +0,0 @@
--"""Requests test package initialisation."""
--
--import warnings
--
--from urllib3.exceptions import SNIMissingWarning
--
--# urllib3 sets SNIMissingWarning to only go off once,
--# while this test suite requires it to always fire
--# so that it occurs during test_requests.test_https_warnings
--warnings.simplefilter("always", SNIMissingWarning)
-diff --git a/tests/test_requests.py b/tests/test_requests.py
-index 5b4c3f53..2530b13b 100644
---- a/tests/test_requests.py
-+++ b/tests/test_requests.py
-@@ -974,6 +974,7 @@ class TestRequests:
- r = requests.get(httpbin(), cert=".")
- assert r.status_code == 200
-
-+ @pytest.mark.xfail
- def test_https_warnings(self, nosan_server):
- """warnings are emitted with requests.get"""
- host, port, ca_bundle = nosan_server

MODIFY
noxfile.py
noxfile.py
@@ -142,9 +142,6 @@ def downstream_requests(session: nox.Session) -> None:
session.cd(tmp_dir)
git_clone(session, "https://github.com/psf/requests")
session.chdir("requests")
- session.run(
- "git", "apply", f"{root}/ci/0003-requests-removed-warnings.patch", external=True
- )
session.run(
"git", "apply", f"{root}/ci/0004-requests-chunked-requests.patch", external=True
)

Remove the Requests warning git patch (#2906)

* Remove the Requests warning git patch

* Fix isort installation

See https://github.com/PyCQA/isort/pull/2078

---------

Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>