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

Update most test/lint dependencies #12713

Merged
merged 2 commits into from
Oct 1, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 1, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence Type Update
aiohttp ==3.10.2 -> ==3.10.8 age adoption passing confidence patch
astral-sh/ruff-pre-commit v0.5.4 -> v0.6.8 age adoption passing confidence repository minor
black (changelog) ==24.4.2 -> ==24.8.0 age adoption passing confidence minor
flake8 (changelog) ==7.1.0 -> ==7.1.1 age adoption passing confidence patch
flake8-pyi (changelog) ==24.6.0 -> ==24.9.0 age adoption passing confidence minor
mypy (source, changelog) ==1.11.1 -> ==1.11.2 age adoption passing confidence patch
psf/black-pre-commit-mirror 24.4.2 -> 24.8.0 age adoption passing confidence repository minor
pycqa/flake8 7.1.0 -> 7.1.1 age adoption passing confidence repository patch
ruff (source, changelog) ==0.5.4 -> ==0.6.8 age adoption passing confidence minor
tomlkit ==0.13.0 -> ==0.13.2 age adoption passing confidence patch
uv (source, changelog) ==0.2.27 -> ==0.4.17 age adoption passing confidence minor

Note: The pre-commit manager in Renovate is not supported by the pre-commit maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.


Release Notes

aio-libs/aiohttp (aiohttp)

v3.10.8

Compare Source

===================

Bug fixes

  • Fixed cancellation leaking upwards on timeout -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9326.


v3.10.7

Compare Source

===================

Bug fixes

  • Fixed assembling the :class:~yarl.URL for web requests when the host contains a non-default port or IPv6 address -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9309.

Miscellaneous internal changes

  • Improved performance of determining if a URL is absolute -- by :user:bdraco.

    The property :attr:~yarl.URL.absolute is more performant than the method URL.is_absolute() and preferred when newer versions of yarl are used.

    Related issues and pull requests on GitHub:
    :issue:9171.

  • Replaced code that can now be handled by yarl -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9301.


v3.10.6

Compare Source

===================

Bug fixes

  • Added :exc:aiohttp.ClientConnectionResetError. Client code that previously threw :exc:ConnectionResetError
    will now throw this -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:9137.

  • Fixed an unclosed transport ResourceWarning on web handlers -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8875.

  • Fixed resolve_host() 'Task was destroyed but is pending' errors -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8967.

  • Fixed handling of some file-like objects (e.g. tarfile.extractfile()) which raise AttributeError instead of OSError when fileno fails for streaming payload data -- by :user:ReallyReivax.

    Related issues and pull requests on GitHub:
    :issue:6732.

  • Fixed web router not matching pre-encoded URLs (requires yarl 1.9.6+) -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8898, :issue:9267.

  • Fixed an error when trying to add a route for multiple methods with a path containing a regex pattern -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8998.

  • Fixed Response.text when body is a Payload -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:6485.

  • Fixed compressed requests failing when no body was provided -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:9108.

  • Fixed client incorrectly reusing a connection when the previous message had not been fully sent -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8992.

  • Fixed race condition that could cause server to close connection incorrectly at keepalive timeout -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:9140.

  • Fixed Python parser chunked handling with multiple Transfer-Encoding values -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8823.

  • Fixed error handling after 100-continue so server sends 500 response instead of disconnecting -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8876.

  • Stopped adding a default Content-Type header when response has no content -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8858.

  • Added support for URL credentials with empty (zero-length) username, e.g. https://:password@host -- by :user:shuckc

    Related issues and pull requests on GitHub:
    :issue:6494.

  • Stopped logging exceptions from web.run_app() that would be raised regardless -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:6807.

  • Implemented binding to IPv6 addresses in the pytest server fixture.

    Related issues and pull requests on GitHub:
    :issue:4650.

  • Fixed the incorrect use of flags for getnameinfo() in the Resolver --by :user:GitNMLee

    Link-Local IPv6 addresses can now be handled by the Resolver correctly.

    Related issues and pull requests on GitHub:
    :issue:9032.

  • Fixed StreamResponse.prepared to return True after EOF is sent -- by :user:arthurdarcet.

    Related issues and pull requests on GitHub:
    :issue:5343.

  • Changed make_mocked_request() to use empty payload by default -- by :user:rahulnht.

    Related issues and pull requests on GitHub:
    :issue:7167.

  • Used more precise type for ClientResponseError.headers, fixing some type errors when using them -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8768.

  • Changed behavior when returning an invalid response to send a 500 response -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8845.

  • Fixed response reading from closed session to throw an error immediately instead of timing out -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8878.

  • Fixed CancelledError from one cleanup context stopping other contexts from completing -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8908.

  • Fixed changing scheme/host in Response.clone() for absolute URLs -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8990.

  • Fixed Site.name when host is an empty string -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8929.

  • Updated Python parser to reject messages after a close message, matching C parser behaviour -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:9018.

  • Fixed creation of SSLContext inside of :py:class:aiohttp.TCPConnector with multiple event loops in different threads -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9029.

  • Fixed (on Python 3.11+) some edge cases where a task cancellation may get incorrectly suppressed -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:9030.

  • Fixed exception information getting lost on HttpProcessingError -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:9052.

  • Fixed If-None-Match not using weak comparison -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:9063.

  • Fixed badly encoded charset crashing when getting response text instead of falling back to charset detector.

    Related issues and pull requests on GitHub:
    :issue:9160.

  • Rejected \n in reason values to avoid sending broken HTTP messages -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:9167.

  • Changed :py:meth:ClientResponse.raise_for_status() <aiohttp.ClientResponse.raise_for_status> to only release the connection when invoked outside an async with context -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:9239.

Features

  • Improved type on params to match the underlying type allowed by yarl -- by :user:lpetre.

    Related issues and pull requests on GitHub:
    :issue:8564.

  • Declared Python 3.13 supported -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:8748.

Removals and backward incompatible breaking changes

  • Improved middleware performance -- by :user:bdraco.

    The set_current_app method was removed from UrlMappingMatchInfo because it is no longer used, and it was unlikely external caller would ever use it.

    Related issues and pull requests on GitHub:
    :issue:9200.

  • Increased minimum yarl version to 1.12.0 -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9267.

Improved documentation

  • Clarified that GracefulExit needs to be handled in AppRunner and ServerRunner when using handle_signals=True. -- by :user:Daste745

    Related issues and pull requests on GitHub:
    :issue:4414.

  • Clarified that auth parameter in ClientSession will persist and be included with any request to any origin, even during redirects to different origins. -- by :user:MaximZemskov.

    Related issues and pull requests on GitHub:
    :issue:6764.

  • Clarified which timeout exceptions happen on which timeouts -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8968.

  • Updated ClientSession parameters to match current code -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8991.

Packaging updates and notes for downstreams

  • Fixed test_client_session_timeout_zero to not require internet access -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:9004.

Miscellaneous internal changes

  • Improved performance of making requests when there are no auto headers to skip -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:8847.

  • Exported aiohttp.TraceRequestHeadersSentParams -- by :user:Hadock-is-ok.

    Related issues and pull requests on GitHub:
    :issue:8947.

  • Avoided tracing overhead in the http writer when there are no active traces -- by user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9031.

  • Improved performance of reify Cython implementation -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9054.

  • Use :meth:URL.extend_query() <yarl.URL.extend_query> to extend query params (requires yarl 1.11.0+) -- by :user:bdraco.

    If yarl is older than 1.11.0, the previous slower hand rolled version will be used.

    Related issues and pull requests on GitHub:
    :issue:9068.

  • Improved performance of checking if a host is an IP Address -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9095.

  • Significantly improved performance of middlewares -- by :user:bdraco.

    The construction of the middleware wrappers is now cached and is built once per handler instead of on every request.

    Related issues and pull requests on GitHub:
    :issue:9158, :issue:9170.

  • Improved performance of web requests -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9168, :issue:9169, :issue:9172, :issue:9174, :issue:9175, :issue:9241.

  • Improved performance of starting web requests when there is no response prepare hook -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9173.

  • Significantly improved performance of expiring cookies -- by :user:bdraco.

    Expiring cookies has been redesigned to use :mod:heapq instead of a linear search, to better scale.

    Related issues and pull requests on GitHub:
    :issue:9203.

  • Significantly sped up filtering cookies -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:9204.


v3.10.5

Compare Source

=========================

Bug fixes

  • Fixed :meth:aiohttp.ClientResponse.json() not setting status when :exc:aiohttp.ContentTypeError is raised -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:8742.

Miscellaneous internal changes

  • Improved performance of the WebSocket reader -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:8736, :issue:8747.


v3.10.4

Compare Source

v3.10.3

Compare Source

========================

Bug fixes

  • Fixed multipart reading when stream buffer splits the boundary over several read() calls -- by :user:Dreamsorcerer.

    Related issues and pull requests on GitHub:
    :issue:8653.

  • Fixed :py:class:aiohttp.TCPConnector doing blocking I/O in the event loop to create the SSLContext -- by :user:bdraco.

    The blocking I/O would only happen once per verify mode. However, it could cause the event loop to block for a long time if the SSLContext creation is slow, which is more likely during startup when the disk cache is not yet present.

    Related issues and pull requests on GitHub:
    :issue:8672.

Miscellaneous internal changes

  • Improved performance of :py:meth:~aiohttp.ClientWebSocketResponse.receive and :py:meth:~aiohttp.web.WebSocketResponse.receive when there is no timeout. -- by :user:bdraco.

    The timeout context manager is now avoided when there is no timeout as it accounted for up to 50% of the time spent in the :py:meth:~aiohttp.ClientWebSocketResponse.receive and :py:meth:~aiohttp.web.WebSocketResponse.receive methods.

    Related issues and pull requests on GitHub:
    :issue:8660.

  • Improved performance of starting request handlers with Python 3.12+ -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:8661.

  • Improved performance of HTTP keep-alive checks -- by :user:bdraco.

    Previously, when processing a request for a keep-alive connection, the keep-alive check would happen every second; the check is now rescheduled if it fires too early instead.

    Related issues and pull requests on GitHub:
    :issue:8662.

  • Improved performance of generating random WebSocket mask -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    :issue:8667.


astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit)

v0.6.8

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.6.8

v0.6.7

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.6.7

v0.6.6

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.6.6

v0.6.5

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.6.5

v0.6.4

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.6.4

v0.6.3

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.6.3

v0.6.2

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.6.2

v0.6.1

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.6.1

v0.6.0

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.6.0

v0.5.7

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.5.7

v0.5.6

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.5.6

v0.5.5

Compare Source

See: https://github.com/astral-sh/ruff/releases/tag/0.5.5

psf/black (black)

v24.8.0

Compare Source

Stable style
  • Fix crash when # fmt: off is used before a closing parenthesis or bracket. (#​4363)
Packaging
  • Packaging metadata updated: docs are explictly linked, the issue tracker is now also
    linked. This improves the PyPI listing for Black. (#​4345)
Parser
  • Fix regression where Black failed to parse a multiline f-string containing another
    multiline string (#​4339)
  • Fix regression where Black failed to parse an escaped single quote inside an f-string
    (#​4401)
  • Fix bug with Black incorrectly parsing empty lines with a backslash (#​4343)
  • Fix bugs with Black's tokenizer not handling \{ inside f-strings very well (#​4422)
  • Fix incorrect line numbers in the tokenizer for certain tokens within f-strings
    (#​4423)
Performance
  • Improve performance when a large directory is listed in .gitignore (#​4415)
Blackd
  • Fix blackd (and all extras installs) for docker container (#​4357)
pycqa/flake8 (flake8)

v7.1.1

Compare Source

PyCQA/flake8-pyi (flake8-pyi)

v24.9.0

Compare Source

Bugfixes

  • Don't emit Y053 for long strings inside Literal slices or
    metadata strings inside Annotated slices.

Other changes:

  • flake8-pyi no longer supports being run using Python 3.8.
    As a result, it not longer depends on the third-party
    ast_decompiler package.
python/mypy (mypy)

v1.11.2

Compare Source

psf/black-pre-commit-mirror (psf/black-pre-commit-mirror)

v24.8.0

Compare Source

astral-sh/ruff (ruff)

v0.6.8

Compare Source

Preview features
  • Remove unnecessary parentheses around match case clauses (#​13510)
  • Parenthesize overlong if guards in match..case clauses (#​13513)
  • Detect basic wildcard imports in ruff analyze graph (#​13486)
  • [pylint] Implement boolean-chained-comparison (R1716) (#​13435)
Rule changes
  • [lake8-simplify] Detect SIM910 when using variadic keyword arguments, i.e., **kwargs (#​13503)
  • [pyupgrade] Avoid false negatives with non-reference shadowed bindings of loop variables (UP028) (#​13504)
Bug fixes
  • Detect tuples bound to variadic positional arguments i.e. *args (#​13512)
  • Exit gracefully on broken pipe errors (#​13485)
  • Avoid panic when analyze graph hits broken pipe (#​13484)
Performance
  • Reuse BTreeSets in module resolver (#​13440)
  • Skip traversal for non-compound statements (#​13441)

v0.6.7

Compare Source

Preview features
  • Add Python version support to ruff analyze CLI (#​13426)
  • Add exclude support to ruff analyze (#​13425)
  • Fix parentheses around return type annotations (#​13381)
Rule changes
  • [pycodestyle] Fix: Don't autofix if the first line ends in a question mark? (D400) (#​13399)
Bug fixes
  • Respect lint.exclude in ruff check --add-noqa (#​13427)
Performance
  • Avoid tracking module resolver files in Salsa (#​13437)
  • Use forget for module resolver database (#​13438)

v0.6.6

Compare Source

Preview features
  • [refurb] Skip slice-to-remove-prefix-or-suffix (FURB188) when non-trivial slice steps are present (#​13405)
  • Add a subcommand to generate dependency graphs (#​13402)
Formatter
  • Fix placement of inline parameter comments (#​13379)
Server
  • Fix off-by one error in the LineIndex::offset calculation (#​13407)
Bug fixes
  • [fastapi] Respect FastAPI aliases in route definitions (#​13394)
  • [pydocstyle] Respect word boundaries when detecting function signature in docs (#​13388)
Documentation
  • Add backlinks to rule overview linter (#​13368)
  • Fix documentation for editor vim plugin ALE (#​13348)
  • Fix rendering of FURB188 docs (#​13406)

v0.6.5

Compare Source

Preview features
  • [pydoclint] Ignore DOC201 when function name is "new" (#​13300)
  • [refurb] Implement slice-to-remove-prefix-or-suffix (FURB188) (#​13256)
Rule changes
  • [eradicate] Ignore script-comments with multiple end-tags (ERA001) (#​13283)
  • [pyflakes] Improve error message for UndefinedName when a builtin was added in a newer version than specified in Ruff config (F821) (#​13293)
Server
  • Add support for extensionless Python files for server (#​13326)
  • Fix configuration inheritance for configurations specified in the LSP settings (#​13285)
Bug fixes
  • [ruff] Handle unary operators in decimal-from-float-literal (RUF032) (#​13275)
CLI
  • Only include rules with diagnostics in SARIF metadata (#​13268)
Playground
  • Add "Copy as pyproject.toml/ruff.toml" and "Paste from TOML" (#​13328)
  • Fix errors not shown for restored snippet on page load (#​13262)

v0.6.4

Compare Source

Preview features
  • [flake8-builtins] Use dynamic builtins list based on Python version (#​13172)
  • [pydoclint] Permit yielding None in DOC402 and DOC403 (#​13148)
  • [pylint] Update diagnostic message for PLW3201 (#​13194)
  • [ruff] Implement post-init-default (RUF033) (#​13192)
  • [ruff] Implement useless if-else (RUF034) (#​13218)
Rule changes
  • [flake8-pyi] Respect pep8_naming.classmethod-decorators settings when determining if a method is a classmethod in custom-type-var-return-type (PYI019) (#​13162)
  • [flake8-pyi] Teach various rules that annotations might be stringized (#​12951)
  • [pylint] Avoid no-self-use for attrs-style validators (#​13166)
  • [pylint] Recurse into subscript subexpressions when searching for list/dict lookups (PLR1733, PLR1736) (#​13186)
  • [pyupgrade] Detect aiofiles.open calls in UP015 (#​13173)
  • [pyupgrade] Mark sys.version_info[0] < 3 and similar comparisons as outdated (UP036) (#​13175)
CLI
  • Enrich messages of SARIF results (#​13180)
  • Handle singular case for incompatible rules warning in ruff format output (#​13212)
Bug fixes
  • [pydocstyle] Improve heuristics for detecting Google-style docstrings (#​13142)
  • [refurb] Treat sep arguments with effects as unsafe removals (FURB105) (#​13165)

v0.6.3

Compare Source

Preview features
  • [flake8-simplify] Extend open-file-with-context-handler to work with dbm.sqlite3 (SIM115) (#​13104)
  • [pycodestyle] Disable E741 in stub files (.pyi) (#​13119)
  • [pydoclint] Avoid DOC201 on explicit returns in functions that only return None (#​13064)
Rule changes
  • [flake8-async] Disable check for asyncio before Python 3.11 (ASYNC109) (#​13023)
Bug fixes
  • [FastAPI] Avoid introducing invalid syntax in fix for fast-api-non-annotated-dependency (FAST002) (#​13133)
  • [flake8-implicit-str-concat] Normalize octals before merging concatenated strings in single-line-implicit-string-concatenation (ISC001) (#​13118)
  • [flake8-pytest-style] Improve help message for pytest-incorrect-mark-parentheses-style (PT023) (#​13092)
  • [pylint] Avoid autofix for calls that aren't min or max as starred expression (PLW3301) (#​13089)
  • [ruff] Add datetime.time, datetime.tzinfo, and datetime.timezone as immutable function calls (RUF009) (#​13109)
  • [ruff] Extend comment deletion for RUF100 to include trailing text from noqa directives while preserving any following comments on the same line, if any (#​13105)
  • Fix dark theme on initial page load for the Ruff playground (#​13077)

v0.6.2

Compare Source

Preview features
  • [flake8-simplify] Extend open-file-with-context-handler to work with other standard-library IO modules (SIM115) (#​12959)
  • [ruff] Avoid unused-async for functions with FastAPI route decorator (RUF029) (#​12938)
  • [ruff] Ignore fstring-missing-syntax (RUF027) for fastAPI paths (#​12939)
  • [ruff] Implement check for Decimal called with a float literal (RUF032) (#​12909)
Rule changes
  • [flake8-bugbear] Update diagnostic message when expression is at the end of function (B015) (#​12944)
  • [flake8-pyi] Skip type annotations in string-or-bytes-too-long (PYI053) (#​13002)
  • [flake8-type-checking] Always recognise relative imports as first-party (#​12994)
  • [flake8-unused-arguments] Ignore unused arguments on stub functions (ARG001) (#​12966)
  • [pylint] Ignore augmented assignment for self-cls-assignment (PLW0642) (#​12957)
Server
  • Show full context in error log messages (#​13029)
Bug fixes
  • [pep8-naming] Don't flag from imports following conventional import names (N817) (#​12946)
  • [pylint] - Allow __new__ methods to have cls as their first argument even if decorated with @staticmethod for bad-staticmethod-argument (PLW0211) (#​12958)
Documentation
  • Add hyperfine installation instructions; update hyperfine code samples (#​13034)
  • Expand note to use Ruff with other language server in Kate (#​12806)
  • Update example for PT001 as per the new default behavior (#​13019)
  • [perflint] Improve docs for try-except-in-loop (PERF203) (#​12947)
  • [pydocstyle] Add reference to lint.pydocstyle.ignore-decorators setting to rule docs (#​12996)

v0.6.1

Compare Source

This is a hotfix release to address an issue with ruff-pre-commit. In v0.6,
Ruff changed its behavior to lint and format Jupyter notebooks by default;
however, due to an oversight, these files were still excluded by default if
Ruff was run via pre-commit, leading to inconsistent behavior.
This has now been fixed.

Preview features
  • [fastapi] Implement fast-api-unused-path-parameter (FAST003) (#​12638)
Rule changes
  • [pylint] Rename too-many-positional to too-many-positional-arguments (R0917) (#​12905)
Server
  • Fix crash when applying "fix-all" code-action to notebook cells (#​12929)
Other changes
  • [flake8-naming]: Respect import conventions (N817) (#​12922)

v0.6.0

Compare Source

Check out the blog post for a migration guide and overview of the changes!

Breaking changes

See also, the "Remapped rules" section which may result in disabled rules.

  • Lint and format Jupyter Notebook by default (#​12878).
  • Detect imports in src layouts by default for isort rules (#​12848)
  • The pytest rules PT001 and PT023 now default to omitting the decorator parentheses when there are no arguments (#​12838).
Deprecations

The following rules are now deprecated:

Remapped rules

The following rules have been remapped to new rule codes:

Stabilization

The following rules have been stabilized and are no longer in preview:

The following behaviors have been stabilized:

The following fixes have been stabilized:

Preview features
  • [flake8-simplify] Further simplify to binary in preview for (SIM108) (#​12796)
  • [pyupgrade] Show violations without auto-fix (UP031) (#​11229)
Rule changes
  • [flake8-import-conventions] Add xml.etree.ElementTree to default conventions (#​12455)
  • [flake8-pytest-style] Add a space after comma in CSV output (PT006) (#​12853)
Server
  • Show a message for incorrect settings (#​12781)
Bug fixes
  • [flake8-async] Do not lint yield in context manager (ASYNC100) (#​12896)
  • [flake8-comprehensions] Do not lint async for comprehensions (C419) (#​12895)
  • [flake8-return] Only add return None at end of a function (RET503) (#​11074)
  • [flake8-type-checking] Avoid treating dataclasses.KW_ONLY as typing-only (TCH003) (#​12863)
  • [pep8-naming] Treat type(Protocol) et al as metaclass base (N805) (#​12770)
  • [pydoclint] Don't enforce returns and yields in abstract methods (DOC201, DOC202) (#​12771)
  • [ruff] Skip tuples with slice expressions in (RUF031) (#​12768)
  • [ruff] Ignore unparenthesized tuples in subscripts when the subscript is a type annotation or type alias (RUF031) (#​12762)
  • [ruff] Ignore template strings passed to logging and builtins._() calls (RUF027) (#​12889)
  • [ruff] Do not remove parens for tuples with starred expressions in Python <=3.10 (RUF031) (#​12784)
  • Evaluate default parameter values for a function in that function's enclosing scope (#​12852)
Other changes
  • Respect VS Code cell metadata when detecting the language of Jupyter Notebook cells (#​12864)
  • Respect kernelspec notebook metadata when detecting the preferred language for a Jupyter Notebook (#​12875)

v0.5.7

Compare Source

Preview features
  • [flake8-comprehensions] Account for list and set comprehensions in unnecessary-literal-within-tuple-call (C409) (#​12657)
  • [flake8-pyi] Add autofix for future-annotations-in-stub (PYI044) (#​12676)
  • [flake8-return] Avoid syntax error when auto-fixing RET505 with mixed indentation (space and tabs) (#​12740)
  • [pydoclint] Add docstring-missing-yields (DOC402) and docstring-extraneous-yields (DOC403) (#​12538)
  • [pydoclint] Avoid DOC201 if docstring begins with "Return", "Returns", "Yield", or "Yields" (#​12675)
  • [pydoclint] Deduplicate collected exceptions after traversing function bodies (DOC501) (#​12642)
  • [pydoclint] Ignore DOC errors for stub functions (#​12651)
  • [pydoclint] Teach rules to understand reraised exceptions as being explicitly raised (DOC501, DOC502) (#​12639)
  • [ruff] Implement incorrectly-parenthesized-tuple-in-subscript (RUF031) (#​12480)
  • [ruff] Mark RUF023 fix as unsafe if __slots__ is not a set and the binding is used elsewhere (#​12692)
Rule changes
  • [refurb] Add autofix for implicit-cwd (FURB177) (#​12708)
  • [ruff] Add autofix for zip-instead-of-pairwise (RUF007) (#​12663)
  • [tryceratops] Add BaseException to raise-vanilla-class rule (TRY002) (#​12620)
Server
  • Ignore non-file workspace URL; Ruff will display a warning notification in this case (#​12725)
CLI
  • Fix cache invalidation for nested pyproject.toml files (#​12727)
Bug fixes
  • [flake8-async] Fix false positives with multiple async with items (ASYNC100) (#​12643)
  • [flake8-bandit] Avoid false-positives for list concatenations in SQL construction (S608) (#​12720)
  • [flake8-bugbear] Treat return as equivalent to break (B909) (#​12646)
  • [flake8-comprehensions] Set comprehensions not a violation for sum in unnecessary-comprehension-in-call (C419) (#​12691)
  • [flake8-simplify] Parenthesize conditions based on precedence when merging if arms (SIM114) (#​12737)
  • [pydoclint] Try both 'Raises' section styles when convention is unspecified (DOC501) (#​12649)

v0.5.6

Compare Source

Ruff 0.5.6 automatically enables linting and formatting of notebooks in preview mode.
You can opt-out of this behavior by adding *.ipynb to the extend-exclude setting.

[tool.ruff]
extend-exclude = ["*.ipynb"]
Preview features
  • Enable notebooks by default in preview mode (#​12621)
  • [flake8-builtins] Implement import, lambda, and module shadowing (#​12546)
  • [pydoclint] Add docstring-missing-returns (DOC201) and docstring-extraneous-returns (DOC202) (#​12485)
Rule changes
  • [flake8-return] Exempt cached properties and other property-like decorators from explicit return rule (RET501) (#​12563)
Server
  • Make server panic hook more error resilient (#​12610)
  • Use $/logTrace for server trace logs in Zed and VS Code (#​12564)
  • Keep track of deleted cells for reorder change request (#​12575)
Configuration
  • [flake8-implicit-str-concat] Always allow explicit multi-line concatenations when implicit concatenations are banned (#​12532)
Bug fixes
  • [flake8-async] Avoid flagging asyncio.timeouts as unused when the context manager includes asyncio.TaskGroup (#​12605)
  • [flake8-slots] Avoid recommending __slots__ for classes that inherit from more than namedtuple (#​12531)
  • [isort] Avoid marking required imports as unused (#​12537)
  • [isort] Preserve trailing inline comments on import-from statements (#​12498)
  • [pycodestyle] Add newlines before comments (E305) (#​12606)
  • [pycodestyle] Don't attach comments with mismatched indents (#​12604)
  • [pyflakes] Fix preview-mode bugs in F401 when attempting to autofix unused first-party submodule imports in an __init__.py file (#​12569)
  • [pylint] Respect start index in unnecessary-list-index-lookup (#​12603)
  • [pyupgrade] Avoid recommending no-argument super in slots=True dataclasses (#​12530)
  • [pyupgrade] Use colon rather than dot formatting for integer-only types (#​12534)
  • Fix NFKC normalization bug when removing unused imports (#​12571)
Other changes
  • Consider more stdlib decorators to be property-like (#​12583)
  • Improve handling of metaclasses in

Configuration

📅 Schedule: Branch creation - "every 3 months on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the bot: dependencies 🤖 Dependency file updates by renovate 🤖 label Oct 1, 2024
@JelleZijlstra
Copy link
Member

Failing because the latest version of flake8-pyi already dropped support for 3.8. I guess we can just wait a few weeks until we drop 3.8 here too.

@srittau
Copy link
Collaborator

srittau commented Oct 1, 2024

Failing because the latest version of flake8-pyi already dropped support for 3.8. I guess we can just wait a few weeks until we drop 3.8 here too.

Current policy customs says we continue to support 3.8 for another six months. Our current customs are that we support an obsolete Python version for about another six months. Personally, I'm in favor of dropping support as soon as CPython does, but this is probably not the right issue to discuss that.

@AlexWaygood
Copy link
Member

I think we can just use an environment marker to only install flake8-pyi on Python 3.9+, similar to the way we did for a long time prior to 487e331.

It's not really necessary to install the flake8 dependencies on a CI run of mypy using Python 3.8. In the long term we can maybe consider having something fancy like separate development dependency groups or separate requirements.txt files.

@srittau srittau merged commit 44aa633 into main Oct 1, 2024
78 checks passed
@srittau srittau deleted the renovate/most-testlint-dependencies branch October 1, 2024 12:38
@srittau
Copy link
Collaborator

srittau commented Oct 1, 2024

I've merged this for now, we can discuss what to do about flake8-pyi separately. (Or just drop support for Python 3.8? #12716)

@AlexWaygood
Copy link
Member

Sure, make sense to do the one dependency causing issues as its own thing. I see Renovate is already on it since it's the day we give Renovate license to file upgrade PRs 😆 #12717

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: dependencies 🤖 Dependency file updates by renovate 🤖
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants