Skip to content

remove unused Werkzeug dependency pin - #61

Open
chishiki wants to merge 1 commit into
UWIT-IAM:mainfrom
chishiki:fix/relax-werkzeug-constraint
Open

remove unused Werkzeug dependency pin#61
chishiki wants to merge 1 commit into
UWIT-IAM:mainfrom
chishiki:fix/relax-werkzeug-constraint

Conversation

@chishiki

Copy link
Copy Markdown

Change Description:

Removes the unused Werkzeug = "^2.0.2" direct dependency from pyproject.toml. uw_saml2 never imports Werkzeug, cachelib is the package's actual cache dependency, but this stale pin (<3.0.0) forces pip's resolver to fall back to uw-saml==1.0.20 (June 2021) in any project that also needs Flask 3.x / Werkzeug 3.x, since no version of uw-saml since 1.1.0 can otherwise be selected alongside Werkzeug ≥3.0.

Also updates the README's replay-cache example, which called werkzeug.contrib.cache.RedisCache(), an API removed from Werkzeug in 1.0 (2019), to use cachelib.RedisCache() instead, which is both current and already a real dependency of this package.

Testing performed:

  • poetry lock regenerated with Werkzeug fully removed from the dependency graph
  • poetry run pytest — all 7 tests pass
  • ./scripts/pre-push.sh --check-only; passes (blackened, dockerized test suite green)
  • Reproduced the reported bug against the current PyPI release: installing flask + uw-saml today resolves to uw-saml==1.0.20. Built this branch's wheel and installed it alongside flask==3.1.3/Werkzeug==3.1.8 in a clean venv; resolved to uw-saml==1.2.9 (current) with pip check reporting no conflicts.

Pull Request checklist

  • run ./scripts/pre-push.sh
  • select a semver-guidance: label for this pull request

Werkzeug is never imported by uw_saml2 or its tests, cachelib is the
package's actual cache dependency. The stale `Werkzeug = "^2.0.2"` pin
(which resolves to <3.0.0) forces pip's resolver to fall back to
uw-saml 1.0.20 in any project that also needs Flask 3.x / Werkzeug
3.x, since newer uw-saml releases can't otherwise be selected.

Also update the README's replay-cache example, which referenced
werkzeug.contrib.cache.RedisCache(), removed from Werkzeug in 1.0
(2019), with the equivalent cachelib.RedisCache(), the package this
project already depends on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant