encukou / freezeyt

https://encukou.github.io/freezeyt/
MIT License
5 stars 9 forks source link

`werkzeug.urls.url_parse` is deprecated #356

Closed nappex closed 1 year ago

nappex commented 1 year ago

DeprecationWarning: werkzeug.urls.url_parse is deprecated and will be removed in Werkzeug 3.0. Use urllib.parse.urlsplit instead.

encukou commented 1 year ago

This was changed in https://github.com/pallets/werkzeug/issues/2600 The change is not always trivial, e.g. for ascii_host it seems we'll need to find out how to "idna decode". Perhaps we should add missing equivalents to the werkzeug docs, as we add them.

davidism commented 1 year ago

If you need an ASCII-only representation, you can use werkzeug.urls.iri_to_uri to ensure that the URL only contains ASCII characters, then call urllib.parse.urlsplit.