[Bug 2022372] Re: Backport for deprecated int_from_bytes to int.from_bytes
Mauricio Faria de Oliveira
2022372 at bugs.launchpad.net
Sat Sep 2 22:22:29 UTC 2023
** Patch added: "lp2022372-focal-yoga-v2.debdiff"
https://bugs.launchpad.net/ubuntu/+source/python-secretstorage/+bug/2022372/+attachment/5697365/+files/lp2022372-focal-yoga-v2.debdiff
** Description changed:
[ Impact ]
- 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`.
+ There is an issue when using the combination of the Ubuntu version of
+ python3-secretstorage (not available in UCA) and the UCA version of
+ python3-cryptography (dependency), that deprecated `int_from_bytes()`
+ (this isn't the case with the Ubuntu version of python3-cryptography).
- We chose to do a partial revert of this commit as bringing in the unit
- tests would add an extra third-party dependency.
+ 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`.
+
[ Test Plan ]
# This is the expected output
python3
>>> from secretstorage.dhcrypto import Session
>>> session = Session()
>>> exit()
- # install focal version of python3-secretstorage module from debian
+ # install focal version of python3-secretstorage module
sudo apt-get install python3-secretstorage=2.3.1-2ubuntu1
# install uca focal-yoga version of python3-cryptography
sudo apt-add-repository -y cloud-archive:yoga
sudo apt install -y python3-cryptography
Installing and running the dhcrypto module from python-secretstorage
shows after installing the package from the cloud-archive we see logger
warnings messages from the deprecated method. Yoga has the updated
python3-cryptography module with the upstream Debian fixes.
python3
>>> from secretstorage.dhcrypto import Session
/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
>>> exit()
Ensure unit tests pass and no regressions are found.
- Deploy focal yoga openstack instance. Execute openstack commands
- and ensure warning message like those above are no longer reported in the logs.
-
+ Deploy focal yoga openstack instance. Execute openstack commands
+ and ensure warning message like those above are no longer reported in the logs.
[ Where problems could occur ]
- The impact is low as this fixes a deprecated method from a 3rd party
- library.
+ The impact is low as this just removes a deprecation warning from a
+ method.
Ensure that python3-secretstorage has no regressions.
[ Other Info ]
[0] upstream debian link - https://salsa.debian.org/python-team/packages/python-secretstorage/-/commit/e24df79cf7d62f11c2906d5aa0f4885cefeafbbf
[1] Github conversation link - https://github.com/mitya57/secretstorage/pull/27
[2] upstream cherrypick author other - https://github.com/mitya57/secretstorage/pull/27
[3] https://github.com/pyca/cryptography/commit/5528a3182fdd6ed1c44c126d451a87bcf39e79de
** Tags removed: se-sponsor
** Tags added: se-sponsor-mfo
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/2022372
Title:
Backport for deprecated int_from_bytes to int.from_bytes
Status in Ubuntu Cloud Archive:
Invalid
Status in Ubuntu Cloud Archive yoga series:
In Progress
Status in python-secretstorage package in Ubuntu:
Invalid
Status in python-secretstorage source package in Bionic:
Invalid
Status in python-secretstorage source package in Focal:
Won't Fix
Status in python-secretstorage source package in Jammy:
Invalid
Status in python-secretstorage source package in Kinetic:
Invalid
Bug description:
[ Impact ]
There is an issue when using the combination of the Ubuntu version of
python3-secretstorage (not available in UCA) and the UCA version of
python3-cryptography (dependency), that deprecated `int_from_bytes()`
(this isn't the case with the Ubuntu version of 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`.
[ Test Plan ]
# This is the expected output
python3
>>> from secretstorage.dhcrypto import Session
>>> session = Session()
>>> exit()
# install focal version of python3-secretstorage module
sudo apt-get install python3-secretstorage=2.3.1-2ubuntu1
# install uca focal-yoga version of python3-cryptography
sudo apt-add-repository -y cloud-archive:yoga
sudo apt install -y python3-cryptography
Installing and running the dhcrypto module from python-secretstorage
shows after installing the package from the cloud-archive we see
logger warnings messages from the deprecated method. Yoga has the
updated python3-cryptography module with the upstream Debian fixes.
python3
>>> from secretstorage.dhcrypto import Session
/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
>>> exit()
Ensure unit tests pass and no regressions are found.
Deploy focal yoga openstack instance. Execute openstack commands
and ensure warning message like those above are no longer reported in the logs.
[ Where problems could occur ]
The impact is low as this just removes a deprecation warning from a
method.
Ensure that python3-secretstorage has no regressions.
[ Other Info ]
[0] upstream debian link - https://salsa.debian.org/python-team/packages/python-secretstorage/-/commit/e24df79cf7d62f11c2906d5aa0f4885cefeafbbf
[1] Github conversation link - https://github.com/mitya57/secretstorage/pull/27
[2] upstream cherrypick author other - https://github.com/mitya57/secretstorage/pull/27
[3] https://github.com/pyca/cryptography/commit/5528a3182fdd6ed1c44c126d451a87bcf39e79de
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/2022372/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list