lektor / lektor

The lektor static file content management system

Home Page:https://www.getlektor.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecated Werkzeug APIs in use

freakboy3742 opened this issue · comments

Werkzeug 2.3 deprecated a number of functions in the werkzeug.urls module. Lektor uses some of these methods:

  • werkzeug.urls.url_parse (in favor of urllib.parse.urlsplit)
  • werkzeug.urls.url_join (in favor of urllib.parse.urljoin)

It also removes the werkzeug.urls.URL wrapper class.

As a result, running Lektor with Werkzeug 2.3+ causes hundreds of deprecation warnings.

The duplication of deprecation warnings, as it turns out was due to changes in werkzeug and their interaction with a long-standing Python bug. (see pallets/werkzeug#2690).

I've prepared a PR for the stable 3.3 branch of Lektor at #1144. This PR adds a pin for werkzeug<2.4. It turns out that it is not trivial to completly disuse the deprecated parts of werkzeug.urls (for reasons described in #1144.) Does anyone anticipate that pin will cause problems down the road?

(Hopefully, a stable release of Lektor 3.4 should be out relatively soon. It won't have such a draconian version pin.)

This is fixed in Lektor 3.3.10 (and 3.4.0rc6).