Carl Smedstad pushed to branch main at Arch Linux / Packaging / Packages / 
python-google-auth


Commits:
5f0773e0 by Carl Smedstad at 2024-12-25T13:16:37+01:00
upgpkg: 2.36.1-3: python-werkzeug 3.1 + python-flask 3.1

- - - - -


3 changed files:

- .SRCINFO
- PKGBUILD
- + python-pyopenssl-compatibility.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
 pkgbase = python-google-auth
        pkgdesc = Google Authentication Library
        pkgver = 2.36.1
-       pkgrel = 2
+       pkgrel = 3
        url = https://github.com/GoogleCloudPlatform/google-auth-library-python
        arch = any
        license = Apache-2.0
@@ -34,6 +34,8 @@ pkgbase = python-google-auth
        optdepends = python-pyu2f: for reauthentication support
        optdepends = python-requests: for async HTTP support
        source = 
https://github.com/GoogleCloudPlatform/google-auth-library-python/archive/v2.36.1/python-google-auth-2.36.1.tar.gz
+       source = python-pyopenssl-compatibility.patch
        sha512sums = 
3e7d62d798440ba810a631d1bcc4e592f2cca1a42614efa0a2260992132dbcd1ee1d80418eb9c9c8ce8c433c2724b8680e8eecbe249eeeb27868665a0ca1b189
+       sha512sums = 
4e23dfaeec6933b1fb6736b6402f1f3cce0fedc0967e527879bc1b3e6215d94c986c28ab9d6b9b4ba975f39316eb0159bb74144aca1f27345b0a9174857fcfff
 
 pkgname = python-google-auth


=====================================
PKGBUILD
=====================================
@@ -4,7 +4,7 @@
 _name=google-auth-library-python
 pkgname=python-google-auth
 pkgver=2.36.1
-pkgrel=2
+pkgrel=3
 pkgdesc="Google Authentication Library"
 url="https://github.com/GoogleCloudPlatform/google-auth-library-python";
 license=('Apache-2.0')
@@ -45,12 +45,18 @@ optdepends=(
   'python-pyu2f: for reauthentication support'
   'python-requests: for async HTTP support'
 )
-source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
-sha512sums=('3e7d62d798440ba810a631d1bcc4e592f2cca1a42614efa0a2260992132dbcd1ee1d80418eb9c9c8ce8c433c2724b8680e8eecbe249eeeb27868665a0ca1b189')
+source=(
+  "$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
+  "python-pyopenssl-compatibility.patch"
+)
+sha512sums=('3e7d62d798440ba810a631d1bcc4e592f2cca1a42614efa0a2260992132dbcd1ee1d80418eb9c9c8ce8c433c2724b8680e8eecbe249eeeb27868665a0ca1b189'
+            
'4e23dfaeec6933b1fb6736b6402f1f3cce0fedc0967e527879bc1b3e6215d94c986c28ab9d6b9b4ba975f39316eb0159bb74144aca1f27345b0a9174857fcfff')
 
 prepare() {
   cd $_name-$pkgver
 
+  patch -Np1 -i ../python-pyopenssl-compatibility.patch
+
   # Remove python-mock, upstream PR: 
https://github.com/googleapis/google-auth-library-python/pull/1361
   sed -i '/^mock$/d' testing/requirements.txt
   sed -i -e 's/^import mock$/from unittest import mock/' \


=====================================
python-pyopenssl-compatibility.patch
=====================================
@@ -0,0 +1,33 @@
+diff --git a/tests/transport/test__mtls_helper.py 
b/tests/transport/test__mtls_helper.py
+index f6e20b7..f899d0d 100644
+--- a/tests/transport/test__mtls_helper.py
++++ b/tests/transport/test__mtls_helper.py
+@@ -18,6 +18,8 @@ import re
+ import mock
+ from OpenSSL import crypto
+ import pytest  # type: ignore
++from cryptography.hazmat.primitives.asymmetric import ec
++from cryptography.hazmat.primitives import hashes
+ 
+ from google.auth import exceptions
+ from google.auth.transport import _mtls_helper
+@@ -630,8 +632,17 @@ class TestDecryptPrivateKey(object):
+         x509.set_pubkey(public_key)
+ 
+         # Test the decrypted key works by signing and verification.
+-        signature = crypto.sign(private_key, b"data", "sha256")
+-        crypto.verify(x509, signature, b"data", "sha256")
++        cryptography_key = private_key.to_cryptography_key()
++        signature = cryptography_key.sign(
++          data=b"data",
++          signature_algorithm=ec.ECDSA(hashes.SHA256()),
++        )
++        cryptography_public_key = public_key.to_cryptography_key()
++        cryptography_public_key.verify(
++          signature=signature,
++          data=b"data",
++          signature_algorithm=ec.ECDSA(hashes.SHA256())
++        )
+ 
+     def test_crypto_error(self):
+         with pytest.raises(crypto.Error):



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-google-auth/-/commit/5f0773e06a99a6cff8fe342ec5fa418bbe036ddf

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-google-auth/-/commit/5f0773e06a99a6cff8fe342ec5fa418bbe036ddf
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to