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

Bug with latest versions of requests (2.23.0) and urllib3 (2.0.2) #47

Closed
cthart opened this issue May 3, 2023 · 2 comments
Closed

Bug with latest versions of requests (2.23.0) and urllib3 (2.0.2) #47

cthart opened this issue May 3, 2023 · 2 comments

Comments

@cthart
Copy link
Contributor

cthart commented May 3, 2023

  • pybankid version: 0.13.1
  • Python version: 3.8.10
  • Operating System: Ubuntu 20.04.6 LTS

Description

After upgrading to the above mentioned just released versions of requests and urllib3, get an exception in pybankid code.

What I Did

~$ python
Python 3.8.10 (default, Mar 13 2023, 10:26:41) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from bankid import BankIDJSONClient
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/colin/venv/lib/python3.8/site-packages/bankid/__init__.py", line 24, in <module>
    from requests.packages.urllib3.exceptions import SubjectAltNameWarning as _sanw
ImportError: cannot import name 'SubjectAltNameWarning' from 'urllib3.exceptions' (/home/colin/venv/lib/python3.8/site-packages/urllib3/exceptions.py)
>>> 
@cthart
Copy link
Contributor Author

cthart commented May 3, 2023

This is a breaking change with the new version of urllib3, not requests.
I downgraded urllib3 to 1.26.15 (last version prior to the recent 2.0) but retained the latest version of requests (2.30.0) and now the import works fine:

$ python
Python 3.8.10 (default, Mar 13 2023, 10:26:41) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from bankid import BankIDJSONClient
>>> 

This was confirmed by a urllib3 developer: urllib3/urllib3#3015

@cthart cthart changed the title Bug with latest versions of requests (2.23.0) and urllib3 (2.0.1) Bug with latest versions of requests (2.23.0) and urllib3 (2.0.2) May 4, 2023
@cthart
Copy link
Contributor Author

cthart commented May 8, 2023

This is fixed now by version 0.14.0, see #49

@cthart cthart closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant