Skip to content

fix: ensure compatability with werkzeug 3.0.0#20

Merged
vmalloc merged 1 commit intovmalloc:developfrom
LiadOz:liadoz/cookies_fix
Jul 11, 2024
Merged

fix: ensure compatability with werkzeug 3.0.0#20
vmalloc merged 1 commit intovmalloc:developfrom
LiadOz:liadoz/cookies_fix

Conversation

@LiadOz
Copy link
Copy Markdown
Contributor

@LiadOz LiadOz commented May 23, 2024

I have disabled the internal cookies that the test client uses. When use_cookies is True, it overrides the cookie header that is passed with open_kwargs to the open function, so after setting use_cookies to False, there is no need to change the cookies. This is tested with in tests/test_cookies.py.
I took the liberty of adding a github workflow and removing old versions from setup.cfg, let me know if this should be changed.

@LiadOz LiadOz marked this pull request as ready for review May 27, 2024 06:29
@LiadOz
Copy link
Copy Markdown
Contributor Author

LiadOz commented Jul 9, 2024

@vmalloc can you review this PR?

Comment thread requirements.txt
@vmalloc
Copy link
Copy Markdown
Owner

vmalloc commented Jul 9, 2024

@LiadOz Sure, sorry that it slipped underneath the radar within all my notifications.

Can you explain what the problem is and why this actually fixes it? Thanks in advance!

@LiadOz
Copy link
Copy Markdown
Contributor Author

LiadOz commented Jul 10, 2024

The cookie_jar attribute was removed from the Werkzeug Client class. So it can't be used anymore. However, it's not really needed, since we already forward the headers of the request, the cookies should already be used, so that code wasn't actually needed.
I tested it with tests/test_cookies.py and it works as expected.

@vmalloc
Copy link
Copy Markdown
Owner

vmalloc commented Jul 10, 2024

Is it backwards compatible with older versions of Werkzeug/flask?

@LiadOz
Copy link
Copy Markdown
Contributor Author

LiadOz commented Jul 10, 2024

Werkzeug versions prior to 1.0.0 could have issues, it introduced some changes with cookies handling and I tested using that version. Should I add a version marker for it?

@vmalloc
Copy link
Copy Markdown
Owner

vmalloc commented Jul 10, 2024

At least worth constraining the version so that the conflict is clear to whomever installs it then

@LiadOz LiadOz force-pushed the liadoz/cookies_fix branch from 954f7de to 2736149 Compare July 10, 2024 05:22
@LiadOz
Copy link
Copy Markdown
Contributor Author

LiadOz commented Jul 10, 2024

At least worth constraining the version so that the conflict is clear to whomever installs it then

done

@vmalloc
Copy link
Copy Markdown
Owner

vmalloc commented Jul 11, 2024

Thanks @LiadOz !

@vmalloc vmalloc merged commit 5bd076e into vmalloc:develop Jul 11, 2024
@LiadOz
Copy link
Copy Markdown
Contributor Author

LiadOz commented Aug 12, 2024

@vmalloc Are you planning to release a new version of flask-loopback to pypi? I can set up a release job if you need.

@LiadOz LiadOz deleted the liadoz/cookies_fix branch August 12, 2024 04:38
@vmalloc
Copy link
Copy Markdown
Owner

vmalloc commented Aug 13, 2024

Hi! That would be greatly appreciated if you're up for it

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

Successfully merging this pull request may close these issues.

2 participants