Группа :: Development/Python3
Пакет: python3-module-requests
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: requests-2.28.1-tests-Xfail-pysocks-tests-conflicting-with-eventle.patch
Скачать
Скачать
From 624215f184282cdfb506d3a3efb84413533d6779 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <slev@altlinux.org>
Date: Tue, 26 Jul 2022 14:02:44 +0300
Subject: [PATCH] tests: Xfail pysocks tests conflicting with eventlet
See https://github.com/eventlet/eventlet/issues/616 for details.
---
tests/test_lowlevel.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tests/test_lowlevel.py b/tests/test_lowlevel.py
index 859d07e8..808a6b85 100644
--- a/tests/test_lowlevel.py
+++ b/tests/test_lowlevel.py
@@ -286,7 +286,25 @@ for prefix, schemes in _schemes_by_var_prefix:
_proxy_combos += [(var.upper(), scheme) for var, scheme in _proxy_combos]
+def has_eventlet():
+ try:
+ import eventlet
+ except ImportError:
+ pass
+ else:
+ return True
+ return False
+
+
@pytest.mark.parametrize("var,scheme", _proxy_combos)
+@pytest.mark.xfail(
+ has_eventlet(),
+ reason=(
+ "eventlet conflicts with pysocks: "
+ "https://github.com/eventlet/eventlet/issues/616"
+ ),
+ strict=True,
+)
def test_use_proxy_from_environment(httpbin, var, scheme):
url = f"{scheme}://httpbin.org"
fake_proxy = Server() # do nothing with the requests; just close the socket
--
2.33.3