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

Update dependency: Requests to v2.25.1 #27

Merged
merged 2 commits into from
Apr 10, 2021

Conversation

wp99cp
Copy link
Contributor

@wp99cp wp99cp commented Mar 26, 2021

After updating the dependencies, I found out that the http requests package (requests) introduced some breaking changes in version 24.0.0. At least I think the problem is in that version.

The error traceback I got:

Traceback (most recent call last):
  ...
  File "postcard_creator/token.py", line 123, in fetch_token
    access_token = self._get_access_token_swissid(session, username, password)
  File "postcard_creator/token.py", line 236, in _get_access_token_swissid
    goto_param = re.search(r'goto=(.*?)$', step1_goto_url.url).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

I think the problem has something to do with the redirecting during the sign-in process, whose handling has been changed in v2.24.0. A quick change in the sign-in process fixed the issue. With the new swiss-id sign-in it works fine for now. But I have no way to test out the legacy sign-in method. Can somebody do this step?

On top of that, I let run my script for a couple of days, to catch some corner cases...

Changes needed to support requests version 2.25.1 or higher. If I got it right, this is necessary as a result of the changes in version 2.24.0. See psf/requests#5500 for details.
@wp99cp wp99cp changed the title Update dependency: Requests v2.25.1 Update dependency: Requests to v2.25.1 Mar 26, 2021
@abertschi
Copy link
Owner

But I have no way to test out the legacy sign-in method. Can somebody do this step?

Works just fine with legacy wrappers. 👍

@wp99cp wp99cp marked this pull request as ready for review April 9, 2021 06:33
@wp99cp
Copy link
Contributor Author

wp99cp commented Apr 9, 2021

I have now sent several postcards. It seems to work without any issues. Ready to merge.

@abertschi
Copy link
Owner

M4N1PhL

merging .... :)

@abertschi abertschi merged commit 33692fb into abertschi:master Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants