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 black from 22.1.0 to 22.3.0 #1039

Merged
merged 2 commits into from Apr 1, 2022
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 1, 2022

Bumps black from 22.1.0 to 22.3.0.

Release notes

Sourced from black's releases.

22.3.0

Preview style

  • Code cell separators #%% are now standardised to # %% (#2919)
  • Remove unnecessary parentheses from except statements (#2939)
  • Remove unnecessary parentheses from tuple unpacking in for loops (#2945)
  • Avoid magic-trailing-comma in single-element subscripts (#2942)

Configuration

  • Do not format __pypackages__ directories by default (#2836)
  • Add support for specifying stable version with --required-version (#2832).
  • Avoid crashing when the user has no homedir (#2814)
  • Avoid crashing when md5 is not available (#2905)
  • Fix handling of directory junctions on Windows (#2904)

Documentation

  • Update pylint config documentation (#2931)

Integrations

  • Move test to disable plugin in Vim/Neovim, which speeds up loading (#2896)

Output

  • In verbose, mode, log when Black is using user-level config (#2861)

Packaging

  • Fix Black to work with Click 8.1.0 (#2966)
  • On Python 3.11 and newer, use the standard library's tomllib instead of tomli (#2903)
  • black-primer, the deprecated internal devtool, has been removed and copied to a separate repository (#2924)

Parser

  • Black can now parse starred expressions in the target of for and async for statements, e.g for item in *items_1, *items_2: pass (#2879).
Changelog

Sourced from black's changelog.

22.3.0

Preview style

  • Code cell separators #%% are now standardised to # %% (#2919)
  • Remove unnecessary parentheses from except statements (#2939)
  • Remove unnecessary parentheses from tuple unpacking in for loops (#2945)
  • Avoid magic-trailing-comma in single-element subscripts (#2942)

Configuration

  • Do not format __pypackages__ directories by default (#2836)
  • Add support for specifying stable version with --required-version (#2832).
  • Avoid crashing when the user has no homedir (#2814)
  • Avoid crashing when md5 is not available (#2905)
  • Fix handling of directory junctions on Windows (#2904)

Documentation

  • Update pylint config documentation (#2931)

Integrations

  • Move test to disable plugin in Vim/Neovim, which speeds up loading (#2896)

Output

  • In verbose, mode, log when Black is using user-level config (#2861)

Packaging

  • Fix Black to work with Click 8.1.0 (#2966)
  • On Python 3.11 and newer, use the standard library's tomllib instead of tomli (#2903)
  • black-primer, the deprecated internal devtool, has been removed and copied to a separate repository (#2924)

Parser

  • Black can now parse starred expressions in the target of for and async for statements, e.g for item in *items_1, *items_2: pass (#2879).
Commits

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 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 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)

Bumps [black](https://github.com/psf/black) from 22.1.0 to 22.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@22.1.0...22.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies python Pull requests that update Python code labels Apr 1, 2022
@return42
Copy link
Member

return42 commented Apr 1, 2022

We need to update black first, before


updates:

The following issue raises up when upgrading from werkzeug==2.0.3 to werkzeug==2.1.0

======================================================================
FAIL: test_index_html_get (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/searxng/searxng/tests/unit/test_webapp.py", line 105, in test_index_html_get
    self.assertEqual(result.location, 'http://localhost/search?q=test')
AssertionError: '/search?q=test' != 'http://localhost/search?q=test'
- /search?q=test
+ http://localhost/search?q=test

If I am not wrong this (return absolute instead of relative URL) was an issue in werkzeug==2.0.3:

In v2.1.0 werkzeug [1] fixed an issue [2] to keep relative redirect locations by
default [3].  Since relative locations are returned, we need to fix out test
cases to avoid AssertionErrors like this one::

    ======================================================================
    FAIL: test_index_html_get (tests.unit.test_webapp.ViewsTestCase)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
    File "/home/runner/work/searxng/searxng/tests/unit/test_webapp.py", line 105, in test_index_html_get
      self.assertEqual(result.location, 'http://localhost/search?q=test')
    AssertionError: '/search?q=test' != 'http://localhost/search?q=test'
    - /search?q=test
    + http://localhost/search?q=test

[1] https://werkzeug.palletsprojects.com/
[2] pallets/werkzeug#2352 fixed in
[3] pallets/werkzeug#2354

Related-to: #1039 (comment)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42 return42 merged commit ed1454c into master Apr 1, 2022
@return42 return42 deleted the dependabot/pip/master/black-22.3.0 branch April 1, 2022 08:50
kvch pushed a commit to kvch/searx that referenced this pull request Apr 13, 2022
In v2.1.0 werkzeug [1] fixed an issue [2] to keep relative redirect locations by
default [3].  Since relative locations are returned, we need to fix out test
cases to avoid AssertionErrors like this one::

    ======================================================================
    FAIL: test_index_html_get (tests.unit.test_webapp.ViewsTestCase)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
    File "/home/runner/work/searxng/searxng/tests/unit/test_webapp.py", line 105, in test_index_html_get
      self.assertEqual(result.location, 'http://localhost/search?q=test')
    AssertionError: '/search?q=test' != 'http://localhost/search?q=test'
    - /search?q=test
    + http://localhost/search?q=test

[1] https://werkzeug.palletsprojects.com/
[2] pallets/werkzeug#2352 fixed in
[3] pallets/werkzeug#2354

Related-to: searxng/searxng#1039 (comment)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant