public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-geopy] rawhide: Backport upstream patch needed for compatibility with pytest 9.1.1
@ 2026-11-18 19:45 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-11-18 19:45 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-geopy
Branch : rawhide
Commit : 28ac4afce3795aa1ae8d2880d402e8e7e7ea4941
Author : Tomáš Hrnčiar <thrnciar@redhat.com>
Date   : 2026-11-18T19:44:39+00:00
Stats  : +35/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-geopy/c/28ac4afce3795aa1ae8d2880d402e8e7e7ea4941?branch=rawhide

Log:
Backport upstream patch needed for compatibility with pytest 9.1.1

---
diff --git a/609.patch b/609.patch
new file mode 100644
index 0000000..428bf49
--- /dev/null
+++ b/609.patch
@@ -0,0 +1,32 @@
+From 10534eb2bace3f96df857b7da4f591b17bd3d8fd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <tomas.hrnciar@me.com>
+Date: Wed, 1 Jul 2026 16:44:26 +0200
+Subject: [PATCH] Fix applying pytest mark to fixture
+
+pytest >= 9.1 enforces the deprecation that marks cannot be applied to
+fixtures. Move the skipif logic inside the fixture body using
+pytest.skip() instead.
+
+See https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function
+
+Assisted-by: Claude Opus 4.6
+---
+ test/adapters/each_adapter.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/test/adapters/each_adapter.py b/test/adapters/each_adapter.py
+index c49fce690..d440718f9 100644
+--- a/test/adapters/each_adapter.py
++++ b/test/adapters/each_adapter.py
+@@ -80,9 +80,10 @@ def proxy_url(request, proxy_server):
+     return proxy_server.get_proxy_url(with_scheme)
+ 
+ 
+-@pytest.mark.skipif(WITH_SYSTEM_PROXIES, reason="There're active system proxies")
+ @pytest.fixture
+ def inject_proxy_to_system_env(proxy_url):
++    if WITH_SYSTEM_PROXIES:
++        pytest.skip("There're active system proxies")
+     assert os.environ.get("http_proxy") is None
+     assert os.environ.get("https_proxy") is None
+     os.environ["http_proxy"] = proxy_url

diff --git a/python-geopy.spec b/python-geopy.spec
index a762f95..0efcbea 100644
--- a/python-geopy.spec
+++ b/python-geopy.spec
@@ -19,6 +19,9 @@ Patch:          0001-Downstream-only-drop-coverage-from-test-extra.patch
 # Applies on top of the coverage patch.
 Patch:          0002-Downstream-only-allow-newer-Sphinx-for-testing.patch
 
+# Fix pytest >= 9.1 error: marks cannot be applied to fixtures
+Patch:          https://github.com/geopy/geopy/pull/609.patch
+
 BuildArch:      noarch
 
 BuildRequires:  python3-devel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-18 19:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 19:45 [rpms/python-geopy] rawhide: Backport upstream patch needed for compatibility with pytest 9.1.1 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox