joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.42k stars 422 forks source link

Require Werkzeug and import safe_utils from there, not Flask #360

Closed bryce-carson closed 2 years ago

bryce-carson commented 2 years ago

Flask removed the already deprecated function safe_utils in 2.1.0.

This shoudl be enough to resolve #359

zodman commented 2 years ago

works for me!

joeyespo commented 2 years ago

Thanks for the PR, @bryce-carson!

I started looking at this after the 4.6.0 was released, but wanted to spend more time making sure it was still compatible with older Flask/Werkzeug versions. Crediting you in CHANGES.md since you got this PR up so quickly after Flask's recent release 😃

If you're curious, here's what was done for backwards compatibility

This should allow Grip to continue to function when using older versions Flask and Werkzeug (until support is officially dropped in the next major release of Grip).