diff mbox series

[meta-python,7/9] python3-google-auth: Upgrade to 2.43.0

Message ID 20251119041235.2448193-7-raj.khem@gmail.com
State New
Headers show
Series [meta-python,1/9] python3-pytest-asyncio: Upgrade to 1.3.0 | expand

Commit Message

Khem Raj Nov. 19, 2025, 4:12 a.m. UTC
Skip ptests needing pyopenssl module when its not available

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ts-skip-when-pyopenssl-isn-t-availab.patch | 34 +++++++++++++++++++
 ....40.3.bb => python3-google-auth_2.43.0.bb} |  3 +-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-google-auth/0001-make-the-TLS-tests-skip-when-pyopenssl-isn-t-availab.patch
 rename meta-python/recipes-devtools/python/{python3-google-auth_2.40.3.bb => python3-google-auth_2.43.0.bb} (86%)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-google-auth/0001-make-the-TLS-tests-skip-when-pyopenssl-isn-t-availab.patch b/meta-python/recipes-devtools/python/python3-google-auth/0001-make-the-TLS-tests-skip-when-pyopenssl-isn-t-availab.patch
new file mode 100644
index 0000000000..5ee13f3d63
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-google-auth/0001-make-the-TLS-tests-skip-when-pyopenssl-isn-t-availab.patch
@@ -0,0 +1,34 @@ 
+From 35eea881e1aeb27fc12cfb301e497e72e59e720f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 18 Nov 2025 17:23:09 -0800
+Subject: [PATCH] make the TLS tests skip when pyopenssl isn't available
+
+In some distributions e.g. yocto
+pyOpenSSL is a packageconfig and disabled by default,
+and it means pyopenssl.py module is not installed as a result.
+
+This test fails plainly when it can not find urllib3.contrib.pyopenssl
+instead skip the test if it does not find the module.
+
+Upstream-Status: Submitted [https://github.com/googleapis/google-auth-library-python/pull/1873]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/transport/test__custom_tls_signer.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tests/transport/test__custom_tls_signer.py b/tests/transport/test__custom_tls_signer.py
+index 3a33c2c..6f88ddf 100644
+--- a/tests/transport/test__custom_tls_signer.py
++++ b/tests/transport/test__custom_tls_signer.py
+@@ -18,7 +18,10 @@ import os
+ import mock
+ import pytest  # type: ignore
+ from requests.packages.urllib3.util.ssl_ import create_urllib3_context  # type: ignore
+-import urllib3.contrib.pyopenssl  # type: ignore
++urllib3_pyopenssl = pytest.importorskip(
++    "urllib3.contrib.pyopenssl",
++    reason="urllib3.contrib.pyopenssl not available in this environment",
++)
+ 
+ from google.auth import exceptions
+ from google.auth.transport import _custom_tls_signer
diff --git a/meta-python/recipes-devtools/python/python3-google-auth_2.40.3.bb b/meta-python/recipes-devtools/python/python3-google-auth_2.43.0.bb
similarity index 86%
rename from meta-python/recipes-devtools/python/python3-google-auth_2.40.3.bb
rename to meta-python/recipes-devtools/python/python3-google-auth_2.43.0.bb
index b7498dcc99..aa94035eb6 100644
--- a/meta-python/recipes-devtools/python/python3-google-auth_2.40.3.bb
+++ b/meta-python/recipes-devtools/python/python3-google-auth_2.43.0.bb
@@ -5,10 +5,11 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
 inherit pypi setuptools3 ptest
 
-SRC_URI[sha256sum] = "500c3a29adedeb36ea9cf24b8d10858e152f2412e3ca37829b3fa18e33d63b77"
 SRC_URI += " \
+        file://0001-make-the-TLS-tests-skip-when-pyopenssl-isn-t-availab.patch \
         file://run-ptest \
 "
+SRC_URI[sha256sum] = "88228eee5fc21b62a1b5fe773ca15e67778cb07dc8363adcb4a8827b52d81483"
 
 PYPI_PACKAGE = "google_auth"
 UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"