Closed hluk closed 7 months ago
Ahh you beat me to it.
For all the people searching for this bug, this is the stacktrace:
File "/app/venv/lib64/python3.9/site-packages/flask_session/sessions.py", line 362, in save_session
response.set_cookie(app.config["SESSION_COOKIE_NAME"], session_id,
File "/app/venv/lib64/python3.9/site-packages/werkzeug/sansio/response.py", line 224, in set_cookie
dump_cookie(
File "/app/venv/lib64/python3.9/site-packages/werkzeug/http.py", line 1304, in dump_cookie
if not _cookie_no_quote_re.fullmatch(value):
TypeError: cannot use a string pattern on a bytes-like object
Which is breaking the functionality of SESSION_USE_SIGNER=True
Hi everyone, is it possible to know when this pull will be accepted and a new version will be released?
Hi everyone, are there any updates?
Hi everyone, is it possible to know when this pull will be accepted and a new version will be released?
Hi to all. A quick check in for any updates... or any solution?
Hello good developers, are there any changes or updates performed on this specific bug?
Hi @hluk thanks for the issue and thanks everyone else for the reminders. @hluk I seem unable to push to your PR branch. Are you able to manually add me as a contributer perhaps?
Hi @hluk thanks for the issue and thanks everyone else for the reminders. @hluk I seem unable to push to your PR branch. Are you able to manually add me as a contributer perhaps?
Sorry, I might have missed some contribution guidelines: Why do you need to push to my fork?
Is there anything you want me to fix in the PR?
No you didn't miss anything, I just wanted to take your implementation a step further and clean up some of the original logic.
Normally maintainers can push to a fork (can see it's checked on the right sidebar) but I think it's an issue with my maintainer permissions in this case.
I've put my additions in (https://github.com/Lxstr/flask-session/tree/werkzeug-3) for now. Let me know your thoughts. Also waiting from input from the team.
Ps. I'm thinking we will merge Black formatting PR before this one, hence the formatting additions.
I've put my additions in (https://github.com/Lxstr/flask-session/tree/werkzeug-3) for now. Let me know your thoughts. Also waiting from input from the team.
I've included your changes in this PR.
just a suggestion for future prs: using merge commits to bring a PR branch up to date results in a quite hard to read git log. it's much better to rebase a PR's branch or do a squash merge if the branch contains merge commits and there's no need to keep individual commits from the PR
Hello, any update on this? Still getting TypeError: cannot use a string pattern on a bytes-like object
today.
Hi everyone, are there any updates?
Hi all. A pre-release is imminent, sorry for the delay I've had to go through a lot of historical issues and PRs. If you are able to test the code on the current Development branch and give any feedback that would be appreciated
Hi @Lxstr. Do you have an ETA for the next release with this fix?
Hi all. A pre-release is imminent, sorry for the delay I've had to go through a lot of historical issues and PRs. If you are able to test the code on the current Development branch and give any feedback that would be appreciated
Hi @Lxstr, I am using your development branch on one of my projects, and seems to be stable for my use cases. I Am using Flask==3.0.0 and Werkzeug==3.0.1.
Looking forward to the pre-release. Thanks for the work on this!
Hi all 0.6.0rc1 is now available. Please try in development and let me know if there is any issues.
Using pip-compile
it pulled in flask-session==0.6.0
and it seems to work — at least no more TypeError: cannot use a string pattern on a bytes-like object
on startup
flask==3.0.1
# via
# -r requirements.in
# flask-babel
# flask-login
# flask-principal
# flask-session
flask-babel==4.0.0
# via -r requirements.in
flask-login==0.6.3
# via -r requirements.in
flask-principal==0.4.0
# via -r requirements.in
flask-session==0.6.0
# via -r requirements.in
werkzeug==3.0.1
# via
# flask
# flask-login
...and in turn Flask 3.0.0 which requires that version.
Werkzeug removed support for passing bytes where str is expected.
See: https://github.com/pallets/werkzeug/commit/5ff0a573f4b78d9724f1f063fb058fd6bc76b24d