Why doesn't flask set an upper bound for any dependencies? #5290
-
From the Flask/Werkzeug 3 release, there were several issues related to Flask 2.x users having Werkzeug 3 pulled in and getting runtime errors:
I know that pinning/locking dependencies solves the issue from a CI perspective. However, this specific issue with Werkzeug wouldn't have happened if Flask set an upper bound on its direct dependencies: Lines 23 to 28 in 1423251 It also impacted libraries that use Flask (e.g. plugins, instrumentation) which don't generally pin transitive dependencies. This looks like a conscious decision. Why doesn't flask set an upper bound for any dependencies? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Copying @davidism's comment from various issues first of all:
You are completely right that libraries should not pin dependencies - but the end applications that do use those libraries should absolutely do it, and by pinning transitive dependencies, they ensure that they do not end up with something like "flask 2 + werkzeug 3". Of course any new application should not use outdated versions, so a new application should be installing the latest flask, which pulls in the latest werkzeug, and at that point they are compatible with each other - and then you pin those dependencies to have a working set. At a later point you can easily use something like |
Beta Was this translation helpful? Give feedback.
Copying @davidism's comment from various issues first of all: