-
Notifications
You must be signed in to change notification settings - Fork 316
Port to Werkzeug 2.x #911
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
Port to Werkzeug 2.x #911
Conversation
lektor/builder.py
Outdated
| from werkzeug.posixemulation import rename | ||
| try: | ||
| from os import replace as rename | ||
| except ImportError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that Lektor no longer supported python < 3.6, os.replace should always be available. (I think?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't realize that, then I'll remove the fallback.
2dfde73 to
3203872
Compare
This function has been always internal, and has been removed from Werkzeug 2.x. Since 3.3, Python provides os.replace, a cross-platform atomic rename function. Ref: pallets/werkzeug#1759 Ref: https://bugs.python.org/issue8828
|
Hi! I believe this will install Werkzeug 2.x instead of 0.16. Is there a way to do it on my system manually? I'm running Ubuntu 20.04 by the way. |
|
@SrijanSriv you would need to download the source code, apply the patch from this PR, then install from there... |
|
Thanks a ton! I have had issues about this for a while now. One more thing, the lektor from this development version runs only through venv right? I have the faulty lektor installed from the above mentioned link(which I can't delete for some reason?) and I don't want it to interfere with a sudden error. |
You can also install it "normally" using
I think it uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! :)
Make Lektor compatible with Werkzeug 2.x.
Issue(s) Resolved
Related Issues / Links
Description of Changes
werkzeug.posixemulation.renamewithos.replaceWerkzeug<3