Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CryptographyDeprecationWarning: int_from_bytes is deprecated #6605

Closed
randalb1991 opened this issue Aug 24, 2021 · 3 comments · Fixed by #6646
Closed

CryptographyDeprecationWarning: int_from_bytes is deprecated #6605

randalb1991 opened this issue Aug 24, 2021 · 3 comments · Fixed by #6646
Assignees
Labels
external This issue is blocked on a bug with the actual product. priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@randalb1991
Copy link

Executing the IAP sample https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/iap I'm getting the warning:

/usr/local/lib/python3.8/site-packages/google/auth/crypt/es256.py:56: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
r = utils.int_from_bytes(sig_bytes[:32], byteorder="big")

As a consequence, my code is failing. Is Someone else having this error?

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Aug 24, 2021
@parthea parthea added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. type: docs Improvement to the documentation for an API. and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Aug 25, 2021
@engelke
Copy link
Contributor

engelke commented Aug 27, 2021

This is from code in the google-auth package. A fix for this was merged by googleapis/google-auth-library-python#848. The next release of that package will fix this, if the requirements.txt file is updated to reference that release.

@engelke engelke removed the type: docs Improvement to the documentation for an API. label Aug 27, 2021
@busunkim96 busunkim96 added external This issue is blocked on a bug with the actual product. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Aug 30, 2021
@busunkim96
Copy link
Contributor

Pending release is googleapis/google-auth-library-python#847

@engelke
Copy link
Contributor

engelke commented Aug 31, 2021

Version 2.0.2 of google-auth fixes this, and the requirements.txt file should be updated to reflect that version. PR #6646 makes that change.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
external This issue is blocked on a bug with the actual product. priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
4 participants