diff -Nru python-cryptography-3.4.8/debian/changelog python-cryptography-3.4.8/debian/changelog --- python-cryptography-3.4.8/debian/changelog 2022-03-25 20:52:05.000000000 +0000 +++ python-cryptography-3.4.8/debian/changelog 2023-08-28 15:03:33.000000000 +0000 @@ -1,3 +1,10 @@ +python-cryptography (3.4.8-1ubuntu2~cloud1) focal-yoga; urgency=low + + * Partially revert remove utils.int_from_bytes (LP: #2022372) + - d/p/lp2022372-partial-revert-utils.patch + + -- Heather Lemon Mon, 28 Aug 2023 15:03:33 +0000 + python-cryptography (3.4.8-1ubuntu2~cloud0) focal-yoga; urgency=medium * New update for the Ubuntu Cloud Archive. diff -Nru python-cryptography-3.4.8/debian/patches/lp2022372-partial-revert-utils.patch python-cryptography-3.4.8/debian/patches/lp2022372-partial-revert-utils.patch --- python-cryptography-3.4.8/debian/patches/lp2022372-partial-revert-utils.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-cryptography-3.4.8/debian/patches/lp2022372-partial-revert-utils.patch 2023-08-28 15:03:33.000000000 +0000 @@ -0,0 +1,58 @@ +From 5528a3182fdd6ed1c44c126d451a87bcf39e79de Mon Sep 17 00:00:00 2001 +From: Alex Gaynor +Date: Wed, 9 Dec 2020 02:16:01 -0500 +Subject: Partially revert remove utils.int_from_bytes (#5609) + + We chose to do a partial revert of this commit as bringing + in the unit tests would add an extra third-party dependency. In + addition, This code is entirely removed from newer upstream releases. + + There is an issue when using the combination of the debian + python3-secretstorage package with the UCA version of a third party dependency + called python3-cryptography. Executing openstack commands or running + `from secretstorage.dhcrypto import Session` shows warning messages like this + in the logs `CryptographyDeprecationWarning: int_from_bytes is deprecated, + use int.from_bytes instead`. + + Originally, it was suggested to backport two commits + (08c7010322ecec0de1e51cc51d5ed9db34a38aa3) and + (ad7c45e493fff48f897487d6aff63f4fff021d31) from python3-secretstorage but + later realized that the issue originates in the uca python3-cryptography + package and should only be fixed there. + + Thus, it was decided to un-deprecate the function call here in the + python3-cryptography package (5528a3182fdd6ed1c44c126d451a87bcf39e79de). + +Origin: vendor, https://github.com/pyca/cryptography/commit/5528a3182fdd6ed1c44c126d451a87bcf39e79de +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2022372 +Last-Update: 2023-08-28 +--- +Index: python-cryptography-3.4.8/src/cryptography/utils.py +=================================================================== +--- python-cryptography-3.4.8.orig/src/cryptography/utils.py ++++ python-cryptography-3.4.8/src/cryptography/utils.py +@@ -22,7 +22,8 @@ class CryptographyDeprecationWarning(Use + # cycle ends. + PersistentlyDeprecated2017 = CryptographyDeprecationWarning + PersistentlyDeprecated2019 = CryptographyDeprecationWarning +-DeprecatedIn34 = CryptographyDeprecationWarning ++ ++int_from_bytes = int.from_bytes + + + def _check_bytes(name: str, value: bytes): +@@ -157,14 +158,6 @@ def cached_property(func): + return property(inner) + + +-int_from_bytes = deprecated( +- int.from_bytes, +- __name__, +- "int_from_bytes is deprecated, use int.from_bytes instead", +- DeprecatedIn34, +-) +- +- + # Python 3.10 changed representation of enums. We use well-defined object + # representation and string representation from Python 3.9. + class Enum(enum.Enum): diff -Nru python-cryptography-3.4.8/debian/patches/series python-cryptography-3.4.8/debian/patches/series --- python-cryptography-3.4.8/debian/patches/series 2022-03-25 19:19:57.000000000 +0000 +++ python-cryptography-3.4.8/debian/patches/series 2023-08-28 15:01:16.000000000 +0000 @@ -8,3 +8,4 @@ openssl3/0006-remove-unneeded-binding-6150.patch openssl3/0007-openssl-3.0.1-ftbfs.patch skip-test-openssl-memleak.patch +lp2022372-partial-revert-utils.patch