Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump werkzeug from 2.3.7 to 3.0.0 #1422

Merged
merged 3 commits into from
Oct 3, 2023
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 2, 2023

Bumps werkzeug from 2.3.7 to 3.0.0.

Release notes

Sourced from werkzeug's releases.

3.0.0

This is a feature release, which includes new features, removes previously deprecated code, and adds new deprecations. The 3.0.x branch is now the supported fix branch, the 2.3.x branch will become a tag marking the end of support for that branch. We encourage everyone to upgrade, and to use a tool such as pip-tools to pin all dependencies and control upgrades. Test with warnings treated as errors to be able to adapt to deprecation warnings early.

Changelog

Sourced from werkzeug's changelog.

Version 3.0.0

Released 2023-09-30

  • Remove previously deprecated code. :pr:2768
  • Deprecate the __version__ attribute. Use feature detection, or importlib.metadata.version("werkzeug"), instead. :issue:2770
  • generate_password_hash uses scrypt by default. :issue:2769
  • Add the "werkzeug.profiler" item to the WSGI environ dictionary passed to ProfilerMiddleware's filename_format function. It contains the elapsed and time values for the profiled request. :issue:2775
  • Explicitly marked the PathConverter as non path isolating. :pr:2784

Version 2.3.8

Unreleased

Commits
  • aa5088f Release version 3.0.0
  • 6427542 Default the PathConverter (and descendants) to be non part isolating
  • 4820d8c Provide elapsed and timestamp info to filename_format
  • 599993d Bump pypa/gh-action-pypi-publish from 1.8.8 to 1.8.10 (#2780)
  • a2394ed Bump slsa-framework/slsa-github-generator from 1.7.0 to 1.9.0 (#2779)
  • 1efd6f3 Bump actions/checkout from 3.5.3 to 3.6.0 (#2778)
  • 76a5419 Bump pypa/gh-action-pypi-publish from 1.8.8 to 1.8.10
  • ce8cfe7 Bump slsa-framework/slsa-github-generator from 1.7.0 to 1.9.0
  • 2b172cb Bump actions/checkout from 3.5.3 to 3.6.0
  • 3f9c1be Update helpful error message about AirPlay collision on macOS (#2776)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

Dependabot will merge this PR once CI passes on it, as requested by @jonathangreen.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Oct 2, 2023
@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (19d490a) 90.30% compared to head (b87aaf8) 90.30%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1422   +/-   ##
=======================================
  Coverage   90.30%   90.30%           
=======================================
  Files         232      232           
  Lines       29828    29828           
  Branches     6808     6808           
=======================================
  Hits        26937    26937           
  Misses       1847     1847           
  Partials     1044     1044           
Files Coverage Δ
api/admin/controller/sign_in.py 94.52% <100.00%> (ø)
api/admin/controller/view.py 96.07% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -153,7 +153,7 @@ def _check_redirect(target: str) -> Tuple[bool, str]:
we extract the URL path and forbid redirecting to external
hosts.
"""
redirect_url: BaseURL = url_parse(target)
redirect_url = urlsplit(target)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deprecation message for url_parse recommended to replace it with a call to urllib.parse.urlsplit

@@ -25,10 +26,12 @@ def __call__(self, collection, book, path=None):
redirect_url = flask.request.url
if collection:
redirect_url = redirect_url.replace(
collection, url_quote_plus(collection)
collection, quote_plus(collection, safe="()")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deprecation message for url_quote_plus recommended to replace it with a call to quote_plus.

This causes our tests to fail because we assume that this function doesn't quote (), so I added in the safe parameter to make sure that brackets are not escaped.

)
if book:
redirect_url = redirect_url.replace(book, url_quote_plus(book))
redirect_url = redirect_url.replace(
book, quote_plus(book, safe="()")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@@ -465,7 +465,7 @@ def authenticated_patron(
ProblemDetail if an error occurs.
"""
provider: AuthenticationProvider | None = None
provider_token: Dict[str, str] | str | None = None
provider_token: Dict[str, str | None] | str | None = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Werkzeug modified their type hints to allow a None to be returned, so we also need to update our hints.

@@ -148,7 +148,9 @@ def test_feed(
last_item.sort_author,
last_item.id,
]
expect = "key=%s" % url_quote_plus(json.dumps(expected_pagination_key))
expect = "key=%s" % quote_plus(
json.dumps(expected_pagination_key), safe=","
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url_quote_plus does not escape , while quote_plus does. So I add the safe="," parameter so that , are not escaped. This does not change the CM behaviour, just makes sure that the test creates the correct expected key.

@jonathangreen jonathangreen requested a review from tdilauro October 2, 2023 20:38
@jonathangreen
Copy link
Member

@tdilauro tagging you for a review on this one, since I had to push a couple extra commits to the base dependabot one in order to remove some deprecated functions we call to get the tests passing here.

@jonathangreen jonathangreen requested a review from a team October 2, 2023 21:21
Copy link
Contributor

@tdilauro tdilauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

dependabot bot and others added 3 commits October 3, 2023 07:00
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 2.3.7 to 3.0.0.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](pallets/werkzeug@2.3.7...3.0.0)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@jonathangreen jonathangreen force-pushed the dependabot/pip/werkzeug-3.0.0 branch from 5d8c092 to b87aaf8 Compare October 3, 2023 10:00
@jonathangreen
Copy link
Member

@dependabot squash and merge

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 3, 2023

One of your CI runs failed on this pull request, so Dependabot won't merge it.

Dependabot will still automatically merge this pull request if you amend it and your tests pass.

@dependabot dependabot bot merged commit 922fa7b into main Oct 3, 2023
30 checks passed
@dependabot dependabot bot deleted the dependabot/pip/werkzeug-3.0.0 branch October 3, 2023 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants