Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/requests/files/
Date: Sun, 28 Nov 2021 07:06:17
Message-Id: 1638083163.e1677d9005fffa13c4998c7a868129c111b8d336.mgorny@gentoo
1 commit: e1677d9005fffa13c4998c7a868129c111b8d336
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 28 07:05:33 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 28 07:06:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1677d90
7
8 dev-python/requests: Update to upstream-approved patch
9
10 Upstream does not want to skip the test, so just move the import.
11 We are skipping it anyway because of Internet access.
12
13 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
14
15 .../files/requests-2.26.0-trustme-dep.patch | 30 ++++++++++------------
16 1 file changed, 14 insertions(+), 16 deletions(-)
17
18 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
19 index b3a81659a9be..5542bb68da90 100644
20 --- a/dev-python/requests/files/requests-2.26.0-trustme-dep.patch
21 +++ b/dev-python/requests/files/requests-2.26.0-trustme-dep.patch
22 @@ -1,22 +1,20 @@
23 -From 6a1b5cbc124e0c3362ddefae5939db5c216a74db Mon Sep 17 00:00:00 2001
24 +From 55da533a87afe188282b7f8dfbadeb30c21743d8 Mon Sep 17 00:00:00 2001
25 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
26 Date: Sat, 27 Nov 2021 10:33:35 +0100
27 -Subject: [PATCH] Skip the test requiring trustme when it is not available
28 +Subject: [PATCH] Defer the trustme import until inside the fixture
29
30 -Modify the nosan_server fixture to cause test_https_warnings to be
31 -skipped when trustme is not installed on the system, rather than causing
32 -the whole test suite to fail unconditionally. This makes it possible
33 -to run all the remaining tests on systems where trustme cannot be
34 -installed due to its dependencies.
35 +Move the trustme import from global scope into the nosan_server fixture
36 +in order to make it possible to deselect the test via command-line
37 +when trustme is not available.
38 ---
39 - tests/conftest.py | 2 +-
40 - 1 file changed, 1 insertion(+), 1 deletion(-)
41 + tests/conftest.py | 5 ++++-
42 + 1 file changed, 4 insertions(+), 1 deletion(-)
43
44 diff --git a/tests/conftest.py b/tests/conftest.py
45 -index 099462cf..5d38f254 100644
46 +index 099462cf52..4f9b2641b4 100644
47 --- a/tests/conftest.py
48 +++ b/tests/conftest.py
49 -@@ -13,7 +13,6 @@ import threading
50 +@@ -13,7 +13,6 @@
51
52 import pytest
53 from requests.compat import urljoin
54 @@ -24,14 +22,14 @@ index 099462cf..5d38f254 100644
55
56
57 def prepare_url(value):
58 -@@ -38,6 +37,7 @@ def httpbin_secure(httpbin_secure):
59 +@@ -38,6 +37,10 @@ def httpbin_secure(httpbin_secure):
60
61 @pytest.fixture
62 def nosan_server(tmp_path_factory):
63 -+ trustme = pytest.importorskip('trustme')
64 ++ # delay importing until the fixture in order to make it possible
65 ++ # to deselect the test via command-line when trustme is not available
66 ++ import trustme
67 ++
68 tmpdir = tmp_path_factory.mktemp("certs")
69 ca = trustme.CA()
70 # only commonName, no subjectAltName
71 ---
72 -2.34.1
73 -