14
0

Accepting request 1320345 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1320345
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-google-auth?expand=0&rev=60
This commit is contained in:
2025-12-02 12:18:29 +00:00
committed by Git OBS Bridge
3 changed files with 57 additions and 0 deletions

50
pytest9.patch Normal file
View File

@@ -0,0 +1,50 @@
From 5c372a92bf5086f1b63eaa8979fc13c5c0ce9dc9 Mon Sep 17 00:00:00 2001
From: Lingqing Gan <lingqing.gan@gmail.com>
Date: Mon, 10 Nov 2025 15:58:56 -0800
Subject: [PATCH] chore: update secret and fix pytest issue (#1868)
---
system_tests/secrets.tar.enc | Bin 10324 -> 10324 bytes
tests/transport/aio/test_sessions.py | 22 ++++++++++++++++------
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/tests/transport/aio/test_sessions.py b/tests/transport/aio/test_sessions.py
index c91a7c40a..742f863d0 100644
--- a/tests/transport/aio/test_sessions.py
+++ b/tests/transport/aio/test_sessions.py
@@ -32,8 +32,13 @@
@pytest.fixture
-async def simple_async_task():
- return True
+def simple_async_task():
+ # Wrap async fixture within a synchronous fixture to suppress pytest.PytestRemovedIn9Warning
+ # See https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture
+ async def inner_fixture():
+ return True
+
+ return inner_fixture()
class MockRequest(Request):
@@ -151,10 +156,15 @@ class TestAsyncAuthorizedSession(object):
credentials = AnonymousCredentials()
@pytest.fixture
- async def mocked_content(self):
- content = [b"Cavefish ", b"have ", b"no ", b"sight."]
- for chunk in content:
- yield chunk
+ def mocked_content(self):
+ # Wrap async fixture within a synchronous fixture to suppress pytest.PytestRemovedIn9Warning
+ # See https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture
+ async def inner_fixture():
+ content = [b"Cavefish ", b"have ", b"no ", b"sight."]
+ for chunk in content:
+ yield chunk
+
+ return inner_fixture()
@pytest.mark.asyncio
async def test_constructor_with_default_auth_request(self):

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Nov 27 09:54:02 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Add upstream pytest9.patch to fix tests
-------------------------------------------------------------------
Mon Nov 10 09:08:33 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@@ -26,6 +26,8 @@ URL: https://github.com/googleapis/google-auth-library-python
Source: https://files.pythonhosted.org/packages/source/g/google_auth/google_auth-%{version}.tar.gz
# https://github.com/googleapis/google-auth-library-python/issues/1055
Patch1: python-google-auth-no-mock.patch
# PATCH-FIX-UPSTREAM https://github.com/googleapis/google-auth-library-python/pull/1868 chore: update secret and fix pytest issue
Patch2: pytest9.patch
BuildRequires: %{python_module Flask}
BuildRequires: %{python_module PyJWT >= 2.0}
BuildRequires: %{python_module aiohttp >= 3.6.2}