Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

HTTPResponse strict attribute gone in urllib3>=2.0.0 #699

Closed
MadameMinty opened this issue May 4, 2023 · 5 comments · Fixed by #819
Closed

HTTPResponse strict attribute gone in urllib3>=2.0.0 #699

MadameMinty opened this issue May 4, 2023 · 5 comments · Fixed by #819
Assignees

Comments

@MadameMinty
Copy link

MadameMinty commented May 4, 2023

  • Operating System version: Debian 11
  • Firebase SDK version: 6.1.0
  • Firebase Product: auth
  • Python version: 3.11.3
  • Pip version: 23.1.2

Steps to reproduce:

firebase-admin==6.1.0 package requires urllib3<3,>=1.21.1 and so pip installs urllib3==2.0.2, but with urllib3>=2.0.0, which removed attribute 'strict' from 'HTTPResponse' object, firebase_admin.auth.verify_id_token(token) raises an error AttributeError: 'HTTPResponse' object has no attribute 'strict'.

Relevant Code:

import firebase_admin
from firebase_admin import auth
cred = firebase_admin.credentials.Certificate(GOOGLE_APPLICATION_CREDENTIALS)
firebase_admin.initialize_app(cred)
firebase_admin.auth.verify_id_token(token)
...
File "\Lib\site-packages\cachecontrol\serialize.py", line 54, in dumps
    u"strict": response.strict,
               ^^^^^^^^^^^^^^^
AttributeError: 'HTTPResponse' object has no attribute 'strict'
@Tom3652
Copy link

Tom3652 commented May 5, 2023

I have forced urllib3==1.26.15 in the meantime.

@davidtaddei
Copy link

Confirmed the same issue and pinning urllib3 to 1.26.15 works for now.

@JefersonParraVeredata
Copy link

Thanks, urllib3 to 1.26.15 works well

@joente
Copy link

joente commented Apr 17, 2024

Any updates on this issue? (We use urllib3<2.0.0) as a workaround)

@jonathanedey
Copy link
Contributor

jonathanedey commented Oct 2, 2024

This seems to have been an issue in the cachecontrol library and was tracked in psf/cachecontrol#292. It was resolved in psf/cachecontrol#301 and fixed in cachecontrol >= 0.12.13. We'll need to bump the minimum version to match that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants