summaryrefslogtreecommitdiff
path: root/dev-python/requests/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /dev-python/requests/files
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'dev-python/requests/files')
-rw-r--r--dev-python/requests/files/requests-2.26.0-trustme-dep.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-python/requests/files/requests-2.26.0-trustme-dep.patch b/dev-python/requests/files/requests-2.26.0-trustme-dep.patch
new file mode 100644
index 000000000000..5542bb68da90
--- /dev/null
+++ b/dev-python/requests/files/requests-2.26.0-trustme-dep.patch
@@ -0,0 +1,35 @@
+From 55da533a87afe188282b7f8dfbadeb30c21743d8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 27 Nov 2021 10:33:35 +0100
+Subject: [PATCH] Defer the trustme import until inside the fixture
+
+Move the trustme import from global scope into the nosan_server fixture
+in order to make it possible to deselect the test via command-line
+when trustme is not available.
+---
+ tests/conftest.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 099462cf52..4f9b2641b4 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -13,7 +13,6 @@
+
+ import pytest
+ from requests.compat import urljoin
+-import trustme
+
+
+ def prepare_url(value):
+@@ -38,6 +37,10 @@ def httpbin_secure(httpbin_secure):
+
+ @pytest.fixture
+ def nosan_server(tmp_path_factory):
++ # delay importing until the fixture in order to make it possible
++ # to deselect the test via command-line when trustme is not available
++ import trustme
++
+ tmpdir = tmp_path_factory.mktemp("certs")
+ ca = trustme.CA()
+ # only commonName, no subjectAltName