David Lord :python: · @davidism
825 followers · 364 posts · Server mas.to

Just finished a massive PR to deprecate bytes and charsets other than UTF-8 in Werkzeug 2.3. (You can still work with raw bytes in requests/responses, so it's still possible to use other charsets.) Surprisingly, very few tests failed due to it, which was a relief. Looking forward to making the PR removing all the deprecations 😈 github.com/pallets/werkzeug/pu

#pythonwerkzeug #pythonflask #Werkzeug #flask #Python

Last updated 2 years ago

David Lord :python: · @davidism
793 followers · 277 posts · Server mas.to

Last year at PyCon US 2022, @tonybaloney ran a basic benchmark of Flask. I finally got around to it, and achieved a ✨ 35% ✨ speedup to routing and environ processing.

Due to Python 2/3, Werkzeug had its own modified copy of `urlparse`/`urllib.parse`, with a lot of unnecessary encoding/decoding due to str/bytes support. I finally replaced that with the standard library, and got a huge speed boost.

github.com/pallets/werkzeug/pu

#pythonwerkzeug #pythonflask #flask #Python

Last updated 2 years ago