Update most test/lint dependencies#13754
Merged
AlexWaygood merged 3 commits intomainfrom Apr 1, 2025
Merged
Conversation
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Merged
Collaborator
|
pyflakes failure is #13755 (comment) , handled in #13756 ibm-db failure looks like a flaky timeout Ruff update being handled in #13757 |
Avasam
approved these changes
Apr 1, 2025
mmingyu
pushed a commit
to mmingyu/typeshed
that referenced
this pull request
May 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==3.10.11->==3.11.12v0.9.3->v0.11.27.1.2->7.2.0==0.9.3->==0.11.2==0.5.14->==0.6.11Note: The
pre-commitmanager in Renovate is not supported by thepre-commitmaintainers 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.11.12Compare Source
====================
Bug fixes
MultipartForm.decode()now follows RFC1341 7.2.1 with aCRLFafter the boundary-- by :user:
imnotjames.Related issues and pull requests on GitHub:
:issue:
10270.Restored the missing
total_bytesattribute toEmptyStreamReader-- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
10387.Features
Updated :py:func:
~aiohttp.requestto make it accept_RequestOptionskwargs.-- by :user:
Cycloctane.Related issues and pull requests on GitHub:
:issue:
10300.Improved logging of HTTP protocol errors to include the remote address -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
10332.Improved documentation
Added
aiohttp-openmetricsto list of third-party libraries -- by :user:jelmer.Related issues and pull requests on GitHub:
:issue:
10304.Packaging updates and notes for downstreams
Added missing files to the source distribution to fix
Makefiletargets.Added a
cythonize-nodepstarget to run Cython without invoking pip to install dependencies.Related issues and pull requests on GitHub:
:issue:
10366.Started building armv7l musllinux wheels -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
10404.Contributor-facing changes
The CI/CD workflow has been updated to use
upload-artifactv4 anddownload-artifactv4 GitHub Actions -- by :user:silamon.Related issues and pull requests on GitHub:
:issue:
10281.Miscellaneous internal changes
Restored support for zero copy writes when using Python 3.12 versions 3.12.9 and later or Python 3.13.2+ -- by :user:
bdraco.Zero copy writes were previously disabled due to :cve:
2024-12254which is resolved in these Python versions.Related issues and pull requests on GitHub:
:issue:
10137.v3.11.11Compare Source
====================
Bug fixes
Updated :py:meth:
~aiohttp.ClientSession.requestto reuse thequote_cookiesetting fromClientSession._cookie_jarwhen processing cookies parameter.-- by :user:
Cycloctane.Related issues and pull requests on GitHub:
:issue:
10093.Fixed type of
SSLContextfor some static type checkers (e.g. pyright).Related issues and pull requests on GitHub:
:issue:
10099.Updated :meth:
aiohttp.web.StreamResponse.writeannotation to also allow :class:bytearrayand :class:memoryviewas inputs -- by :user:cdce8p.Related issues and pull requests on GitHub:
:issue:
10154.Fixed a hang where a connection previously used for a streaming
download could be returned to the pool in a paused state.
-- by :user:
javitonino.Related issues and pull requests on GitHub:
:issue:
10169.Features
Enabled ALPN on default SSL contexts. This improves compatibility with some
proxies which don't work without this extension.
-- by :user:
Cycloctane.Related issues and pull requests on GitHub:
:issue:
10156.Miscellaneous internal changes
Fixed an infinite loop that can occur when using aiohttp in combination
with
async-solipsism_ -- by :user:bmerry... _async-solipsism: https://github.com/bmerry/async-solipsism
Related issues and pull requests on GitHub:
:issue:
10149.v3.11.10Compare Source
====================
Bug fixes
Fixed race condition in :class:
aiohttp.web.FileResponsethat could have resulted in an incorrect response if the file was replaced on the file system duringprepare-- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
10101, :issue:10113.Replaced deprecated call to :func:
mimetypes.guess_typewith :func:mimetypes.guess_file_typewhen using Python 3.13+ -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
10102.Disabled zero copy writes in the
StreamWriter-- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
10125.v3.11.9Compare Source
===================
Bug fixes
Fixed invalid method logging unexpected being logged at exception level on subsequent connections -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
10055, :issue:10076.Miscellaneous internal changes
Improved performance of parsing headers when using the C parser -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
10073.v3.11.8Compare Source
===================
Miscellaneous internal changes
Improved performance of creating :class:
aiohttp.ClientResponseobjects when there are no cookies -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
10029.Improved performance of creating :class:
aiohttp.ClientResponseobjects -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
10030.Improved performances of creating objects during the HTTP request lifecycle -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
10037.Improved performance of constructing :class:
aiohttp.web.Responsewith headers -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
10043.Improved performance of making requests when there are no auto headers to skip -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
10049.Downgraded logging of invalid HTTP method exceptions on the first request to debug level -- by :user:
bdraco.HTTP requests starting with an invalid method are relatively common, especially when connected to the public internet, because browsers or other clients may try to speak SSL to a plain-text server or vice-versa. These exceptions can quickly fill the log with noise when nothing is wrong.
Related issues and pull requests on GitHub:
:issue:
10055.v3.11.7Compare Source
===================
Bug fixes
Fixed the HTTP client not considering the connector's
force_closevalue when setting theConnectionheader -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
10003.Miscellaneous internal changes
Improved performance of serializing HTTP headers -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
10014.v3.11.6Compare Source
===================
Bug fixes
Restored the
force_closemethod to theResponseHandler-- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9997.v3.11.5Compare Source
===================
Bug fixes
Fixed the
ANYmethod not appearing in :meth:~aiohttp.web.UrlDispatcher.routes-- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9899, :issue:9987.v3.11.4Compare Source
===================
Bug fixes
Fixed
StaticResourcenot allowing theOPTIONSmethod after callingset_options_route-- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9972, :issue:9975, :issue:9976.Miscellaneous internal changes
Improved performance of creating web responses when there are no cookies -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
9895.v3.11.3Compare Source
===================
Bug fixes
Removed non-existing
__author__fromdir(aiohttp)-- by :user:Dreamsorcerer.Related issues and pull requests on GitHub:
:issue:
9918.Restored the
FlowControlDataQueueclass -- by :user:bdraco.This class is no longer used internally, and will be permanently removed in the next major version.
Related issues and pull requests on GitHub:
:issue:
9963.Miscellaneous internal changes
Improved performance of resolving resources when multiple methods are registered for the same route -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
9899.v3.11.2Compare Source
===================
Bug fixes
Fixed improperly closed WebSocket connections generating an unhandled exception -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
9883.v3.11.1Compare Source
====================
Bug fixes
Removed a break statement inside the finally block in :py:class:
~aiohttp.web.RequestHandler-- by :user:
Cycloctane.Related issues and pull requests on GitHub:
:issue:
10434.Changed connection creation to explicitly close sockets if an exception is raised in the event loop's
create_connectionmethod -- by :user:top-oai.Related issues and pull requests on GitHub:
:issue:
10464.Packaging updates and notes for downstreams
Fixed test
test_write_large_payload_deflate_compression_data_in_eof_writelinesfailing with Python 3.12.9+ or 3.13.2+ -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
10423.Miscellaneous internal changes
Added human-readable error messages to the exceptions for WebSocket disconnects due to PONG not being received -- by :user:
bdraco.Previously, the error messages were empty strings, which made it hard to determine what went wrong.
Related issues and pull requests on GitHub:
:issue:
10422.v3.11.0Compare Source
===================
Bug fixes
Raise :exc:
aiohttp.ServerFingerprintMismatchexception on client-side if request through http proxy with mismatching server fingerprint digest:aiohttp.ClientSession(headers=headers, connector=TCPConnector(ssl=aiohttp.Fingerprint(mismatch_digest), trust_env=True).request(...)-- by :user:gangj.Related issues and pull requests on GitHub:
:issue:
6652.Modified websocket :meth:
aiohttp.ClientWebSocketResponse.receive_str, :py:meth:aiohttp.ClientWebSocketResponse.receive_bytes, :py:meth:aiohttp.web.WebSocketResponse.receive_str& :py:meth:aiohttp.web.WebSocketResponse.receive_bytesmethods to raise new :py:exc:aiohttp.WSMessageTypeErrorexception, instead of generic :py:exc:TypeError, when websocket messages of incorrect types are received -- by :user:ara-25.Related issues and pull requests on GitHub:
:issue:
6800.Made
TestClient.appaGenericso type checkers will know the correct type (avoiding unneededclient.app is not Nonechecks) -- by :user:Dreamsorcerer.Related issues and pull requests on GitHub:
:issue:
8977.Fixed the keep-alive connection pool to be FIFO instead of LIFO -- by :user:
bdraco.Keep-alive connections are more likely to be reused before they disconnect.
Related issues and pull requests on GitHub:
:issue:
9672.Features
Added
strategyparameter to :meth:aiohttp.web.StreamResponse.enable_compressionThe value of this parameter is passed to the :func:
zlib.compressobjfunction, allowing peopleto use a more sufficient compression algorithm for their data served by :mod:
aiohttp.web-- by :user:
shootkinRelated issues and pull requests on GitHub:
:issue:
6257.Added
server_hostnameparameter tows_connect.Related issues and pull requests on GitHub:
:issue:
7941.Exported :py:class:
~aiohttp.ClientWSTimeoutto top-level namespace -- by :user:Dreamsorcerer.Related issues and pull requests on GitHub:
:issue:
8612.Added
secure/httponly/samesiteparameters to.del_cookie()-- by :user:Dreamsorcerer.Related issues and pull requests on GitHub:
:issue:
8956.Updated :py:class:
~aiohttp.ClientSession's auth logic to include default auth only if the request URL's origin matches _base_url; otherwise, the auth will not be included -- by :user:MaximZemskovRelated issues and pull requests on GitHub:
:issue:
8966, :issue:9466.Added
proxyandproxy_authparameters to :py:class:~aiohttp.ClientSession-- by :user:meshya.Related issues and pull requests on GitHub:
:issue:
9207.Added
default_to_multipartparameter toFormData.Related issues and pull requests on GitHub:
:issue:
9335.Added :py:meth:
~aiohttp.ClientWebSocketResponse.send_frameand :py:meth:~aiohttp.web.WebSocketResponse.send_framefor WebSockets -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9348.Updated :py:class:
~aiohttp.ClientSessionto support paths inbase_urlparameter.base_urlpaths must end with a/-- by :user:Cycloctane.Related issues and pull requests on GitHub:
:issue:
9530.Improved performance of reading WebSocket messages with a Cython implementation -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
9543, :issue:9554, :issue:9556, :issue:9558, :issue:9636, :issue:9649, :issue:9781.Added
writer_limitto the :py:class:~aiohttp.web.WebSocketResponseto be able to adjust the limit before the writer forces the buffer to be drained -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9572.Added an :attr:
~aiohttp.abc.AbstractAccessLogger.enabledproperty to :class:aiohttp.abc.AbstractAccessLoggerto dynamically check if logging is enabled -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9822.Deprecations (removal in next major release)
Deprecate obsolete
timeout: floatandreceive_timeout: Optional[float]in :py:meth:~aiohttp.ClientSession.ws_connect. Change default websocket receive timeout fromNoneto10.0.Related issues and pull requests on GitHub:
:issue:
3945.Removals and backward incompatible breaking changes
Dropped support for Python 3.8 -- by :user:
Dreamsorcerer.Related issues and pull requests on GitHub:
:issue:
8797.Increased minimum yarl version to 1.17.0 -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
8909, :issue:9079, :issue:9305, :issue:9574.Removed the
is_ipv6_addressandis_ip4_addresshelpers are they are no longer used -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9344.Changed
ClientRequest.connection_keyto be aNamedTupleto improve client performance -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9365.FlowControlDataQueuehas been replaced with theWebSocketDataQueue-- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9685.Changed
ClientRequest.request_infoto be aNamedTupleto improve client performance -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9692.Packaging updates and notes for downstreams
Switched to using the :mod:
propcache <propcache.api>package for property caching-- by :user:
bdraco.The :mod:
propcache <propcache.api>package is derived from the property cachingcode in :mod:
yarland has been broken out to avoid maintaining it for multipleprojects.
Related issues and pull requests on GitHub:
:issue:
9394.Separated
aiohttp.http_websocketinto multiple files to make it easier to maintain -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9542, :issue:9552.Contributor-facing changes
Changed diagram images generator from
blockdiagtoGraphViz.Generating documentation now requires the GraphViz executable to be included in $PATH or sphinx build configuration.
Related issues and pull requests on GitHub:
:issue:
9359.Miscellaneous internal changes
Added flake8 settings to avoid some forms of implicit concatenation. -- by :user:
booniepepper.Related issues and pull requests on GitHub:
:issue:
7731.Enabled keep-alive support on proxies (which was originally disabled several years ago) -- by :user:
Dreamsorcerer.Related issues and pull requests on GitHub:
:issue:
8920.Changed web entry point to not listen on TCP when only a Unix path is passed -- by :user:
Dreamsorcerer.Related issues and pull requests on GitHub:
:issue:
9033.Disabled automatic retries of failed requests in :class:
aiohttp.test_utils.TestClient's client session(which could potentially hide errors in tests) -- by :user:
ShubhAgarwal-dev.Related issues and pull requests on GitHub:
:issue:
9141.Changed web
keepalive_timeoutdefault to around an hour in order to reduce race conditions on reverse proxies -- by :user:Dreamsorcerer.Related issues and pull requests on GitHub:
:issue:
9285.Reduced memory required for stream objects created during the client request lifecycle -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
9407.Improved performance of the internal
DataQueue-- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9659.Improved performance of calling
receivefor WebSockets for the most common message types -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9679.Replace internal helper methods
method_must_be_empty_bodyandstatus_code_must_be_empty_bodywith simplesetlookups -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9722.Improved performance of :py:class:
aiohttp.BaseConnectorwhen there is nolimit_per_host-- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9756.Improved performance of sending HTTP requests when there is no body -- by :user:
bdraco.Related issues and pull requests on GitHub:
:issue:
9757.Improved performance of the
WebsocketWriterwhen the protocol is not paused -- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9796.Implemented zero copy writes for
StreamWriter-- by :user:bdraco.Related issues and pull requests on GitHub:
:issue:
9839.astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit)
v0.11.2Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.11.2
v0.11.1Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.11.1
v0.11.0Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.11.0
v0.10.0Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.10.0
v0.9.10Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.9.10
v0.9.9Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.9.9
v0.9.8Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.9.8
v0.9.7Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.9.7
v0.9.6Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.9.6
v0.9.5Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.9.5
v0.9.4Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.9.4
pycqa/flake8 (pycqa/flake8)
v7.2.0Compare Source
astral-sh/ruff (ruff)
v0.11.2Compare Source
Preview features
v0.11.1Compare Source
Preview features
airflow] Addchain,chain_linearandcross_downstreamforAIR302(#16647)Bug fixes
FixAllaction in presence of version-specific syntax errors (#16848)flake8-bandit] Allow raw strings insuspicious-mark-safe-usage(S308) #16702 (#16770)refurb] Avoid panickingunwrapinverbose-decimal-constructor(FURB157) (#16777)refurb] Fix starred expressions fix (FURB161) (#16550)--statisticsreporting for unsafe fixes (#16756)Rule changes
flake8-executables] Allowuv runin shebang line forshebang-missing-python(EXE003) (#16849,#16855)CLI
--exit-non-zero-on-format(#16009)Documentation
__init__.py(#16818)flake8-gettext] Swapformat-andprintf-in-get-text-func-callexamples (INT002,INT003) (#16769)v0.11.0Compare Source
This is a follow-up to release 0.10.0. Because of a mistake in the release process, the
requires-pythoninference changes were not included in that release. Ruff 0.11.0 now includes this change as well as the stabilization of the preview behavior forPGH004.Breaking changes
Changes to how the Python version is inferred when a
target-versionis not specified (#16319)In previous versions of Ruff, you could specify your Python version with:
target-versionoption in aruff.tomlfile or the[tool.ruff]section of a pyproject.toml file.project.requires-pythonfield in apyproject.tomlfile with a[tool.ruff]section.These options worked well in most cases, and are still recommended for fine control of the Python version. However, because of the way Ruff discovers config files,
pyproject.tomlfiles without a[tool.ruff]section would be ignored, including therequires-pythonsetting. Ruff would then use the default Python version (3.9 as of this writing) instead, which is surprising when you've attempted to request another version.In v0.10, config discovery has been updated to address this issue:
ruff.tomlfile without atarget-version, it will checkfor a
pyproject.tomlfile in the same directory and respect itsrequires-pythonversion, even if it does not contain a[tool.ruff]section.
requires-pythonfield of the closestpyproject.tomlin a parent directory will take precedence.ruff.tomlorpyproject.tomlwith a[tool.ruff]section) in the directory of the file being checked, Ruff willsearch for the closest
pyproject.tomlin the parent directories and use itsrequires-pythonsetting.Stabilization
The following behaviors have been stabilized:
blanket-noqa(PGH004): Also detect blanked file-level noqa comments (and not just line level comments).Preview features
forstatement iterator clause before Python 3.9 (#16558)v0.10.0Compare 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.
Changes to how the Python version is inferred when a
target-versionis not specified (#16319)Because of a mistake in the release process, the
requires-pythoninference changes are not included in this release and instead shipped as part of 0.11.0.You can find a description of this change in the 0.11.0 section.
Updated
TYPE_CHECKINGbehavior (#16669)Previously, Ruff only recognized typechecking blocks that tested the
typing.TYPE_CHECKINGsymbol. Now, Ruff recognizes any local variable namedTYPE_CHECKING. This release also removes support for the legacyif 0:andif False:typechecking checks. Use a localTYPE_CHECKINGvariable instead.More robust noqa parsing (#16483)
The syntax for both file-level and in-line suppression comments has been unified and made more robust to certain errors. In most cases, this will result in more suppression comments being read by Ruff, but there are a few instances where previously read comments will now log an error to the user instead. Please refer to the documentation on Error suppression for the full specification.
Avoid unnecessary parentheses around with statements with a single context manager and a trailing comment (#14005)
This change fixes a bug in the formatter where it introduced unnecessary parentheses around with statements with a single context manager and a trailing comment. This change may result in a change in formatting for some users.
Bump alpine default tag to 3.21 for derived Docker images (#16456)
Alpine 3.21 was released in Dec 2024 and is used in the official Alpine-based Python images. Now the ruff:alpine image will use 3.21 instead of 3.20 and ruff:alpine3.20 will no longer be updated.
Deprecated Rules
The following rules have been deprecated:
non-pep604-isinstance(UP038)suspicious-xmle-tree-usage(S320)Remapped rules
The following rules have been remapped to new rule codes:
unsafe-markup-use]:RUF035toS704Stabilization
The following rules have been stabilized and are no longer in preview:
batched-without-explicit-strict(B911)unnecessary-dict-comprehension-for-iterable(C420)datetime-min-max(DTZ901)fast-api-unused-path-parameter(FAST003)root-logger-call(LOG015)len-test(PLC1802)shallow-copy-environ(PLW1507)os-listdir(PTH208)invalid-pathlib-with-suffix(PTH210)invalid-assert-message-literal-argument(RUF040)unnecessary-nested-literal(RUF041)unnecessary-cast-to-int(RUF046)map-int-version-parsing(RUF048)if-key-in-dict-del(RUF051)unsafe-markup-use(S704). This rule has also been renamed fromRUF035.split-static-string(SIM905)runtime-cast-value(TC006)unquoted-type-alias(TC007)non-pep646-unpack(UP044)The following behaviors have been stabilized:
bad-staticmethod-argument(PLW0211)invalid-first-argument-name-for-class-method(N804):__new__methods are now no longer flagged byinvalid-first-argument-name-for-class-method(N804) but instead bybad-staticmethod-argument(PLW0211)bad-str-strip-call(PLE1310): The rule now applies to objects which are known to have typestrorbytes.custom-type-var-for-self(PYI019): More accurate detection of customTypeVarsreplaceable bySelf. The range of the diagnostic is now the full function header rather than just the return annotation.invalid-argument-name(N803): Ignore argument names of functions decorated withtyping.overrideinvalid-envvar-default(PLW1508): Detect default value arguments toos.environ.getwith invalid type.pytest-raises-with-multiple-statements(PT012)pytest-warns-with-multiple-statements(PT031): Allowforstatements with an empty body inpytest.raisesandpytest.warnswithstatements.redundant-open-modes(UP015): The diagnostic range is now the range of the redundant mode argument where it previously was the range of the entire open call. You may have to replace yournoqacomments when suppressingUP015.stdlib-module-shadowing(A005): Changes the default value oflint.flake8-builtins.strict-checkingfromtruetofalse.type-none-comparison(FURB169): Now also recognizestype(expr) is type(None)comparisons whereexprisn't a name expression.The following fixes or improvements to fixes have been stabilized:
repeated-equality-comparison(PLR1714) (#16685)needless-bool(SIM103) (#16684)unused-private-type-var(PYI018) (#16682)Server
ruff.printDebugInformation(#16617)Configuration
flake8-builtins] Deprecate thebuiltins-prefixed options in favor of the unprefixed options (e.g.builtins-allowed-modulesis now deprecated in favor ofallowed-modules) (#16092)Bug fixes
CLI
last_tag/commits_since_last_tagforversioncommand (#16686)v0.9.10Compare Source
Preview features
ruff] Add new ruleRUF059: Unused unpacked assignment (#16449)syntax-errors] Detect assignment expressions before Python 3.8 (#16383)syntax-errors] Named expressions in decorators before Python 3.9 (#16386)syntax-errors] Parenthesized keyword argument names after Python 3.8 (#16482)syntax-errors] Positional-only parameters before Python 3.8 (#16481)syntax-errors] Tuple unpacking inreturnandyieldbefore Python 3.8 (#16485)syntax-errors] Type parameter defaults before Python 3.13 (#16447)syntax-errors] Type parameter lists before Python 3.12 (#16479)syntax-errors]except*before Python 3.11 (#16446)syntax-errors]typestatements before Python 3.12 (#16478)Bug fixes
flake8-simplify] Exempt unittest context methods forSIM115rule (#16439)pyupgrade] Do not offer fix when at least one target isglobal/nonlocal(UP028) (#16451)flake8-builtins] Ignore variables matching module attribute names (A001) (#16454)pylint] Convertcodekeyword argument to a positional argument in fix for (PLR1722) (#16424)CLI
descriptiontocheck_namein GitLab output serializer (#16437)Documentation
pydocstyle] Clarify thatD417only checks docstrings with an arguments section (#16494)v0.9.9Compare Source
Preview features
Bug fixes
v0.9.8Compare Source
Preview features
Rule changes
pylint] Mark fix unsafe (PLW1507) (#16343)pylint] Catchcase np.nan/case math.naninmatchstatements (PLW0177) (#16378)ruff] Add more Pydantic models variants to the list of default copy semantics (RUF012) (#16291)Server
configurationPreferenceiseditorOnly(#16381)ruff.configurationto allow inline config (#16296)Configuration
per-file-target-versionoption (#16257)Bug fixes
refurb] Do not consider docstring(s) (FURB156) (#16391)flake8-self] Ignore attribute accesses on instance-like variables (SLF001) (#16149)pylint] Fix false positives, add missing methods, and support positional-only parameters (PLE0302) (#16263)flake8-pyi] MarkPYI030fix unsafe when comments are deleted (#16322)Documentation
S611(#16316)v0.9.7Compare Source
Preview features
__new__methods as special function type for enforcing class method or static method rules (#13305)airflow] Improve the internal logic to differentiate deprecated symbols (AIR303) (#16013)refurb] Manual timezone monkeypatching (FURB162) (#16113)ruff] Implicit class variable in dataclass (RUF045) (#14349)ruff] Skip singleton starred expressions forincorrectly-parenthesized-tuple-in-subscript(RUF031) (#16083)refurb] Check for subclasses includes subscript expressions (FURB189) (#16155)Rule changes
flake8-debugger] Also flagsys.breakpointhookandsys.__breakpointhook__(T100) (#16191)pycodestyle] Exemptsite.addsitedir(...)calls (E402) (#16251)Formatter
Server
source.organizeImports.ruffandsource.fixAll.ruffcode actions for a notebook cell (#16154)ruff.printDebugInformation(#16215)ruff.printDebugInformation(#16214)CLI
noqaeven when there are no diagnostics (#16178)extends (#15658)Bug fixes
flake8-comprehensions] Handle trailing comma inC403fix (#16110)flake8-pyi] Avoid flaggingcustom-typevar-for-selfon metaclass methods (PYI019) (#16141)pydocstyle] Handle arguments with the same names as sections (D417) (#16011)pylint] Correct ordering of arguments in fix forif-stmt-min-max(PLR1730) (#16080)pylint] Do not offer fix for raw strings (PLE251) (#16132)pyupgrade] Do not upgrade functionalTypedDictswith private field names to the class-based syntax (UP013) (#16219)pyupgrade] Handle micro version numbers correctly (UP036) (#16091)pyupgrade] Unwrap unary expressions correctly (UP018) (#15919)refurb] Correctly handle lengths of literal strings inslice-to-remove-prefix-or-suffix(FURB188) (#16237)ruff] SkipRUF001diagnostics when visiting string type definitions (#16122)Documentation
source.*code actions in Notebook (#16212)SECURITY.md(#16224)v0.9.6Compare Source
Preview features
airflow] Addexternal_task.{ExternalTaskMarker, ExternalTaskSensor}forAIR302(#16014)flake8-builtins] Make strict module name comparison optional (A005) (#15951)flake8-pyi] Extend fix to Python <= 3.9 forredundant-none-literal(PYI061) (#16044)pylint] Also report when the object isn't a literal (PLE1310) (#15985)ruff] Implementindented-form-feed(RUF054) (#16049)ruff] Skip type definitions formissing-f-string-syntax(RUF027) (#16054)Rule changes
flake8-annotations] Correct syntax fortyping.Unionin suggested return type fixes forANN20xrules (#16025)flake8-builtins] Match upstream module name comparison (A005) (#16006)flake8-comprehensions] Detect overshadowedlist/set/dict, ignore variadics and named expressions (C417) (#15955)flake8-pie] Remove following comma correctly when the unpacked dictionary is empty (PIE800) (#16008)flake8-simplify] Only triggerSIM401on known dictionaries (#15995)pylint] Do not report calls when object type and argument type mismatch, remove custom escape handling logic (PLE1310) (#15984)pyupgrade] Comments within parenthesized value ranges should not affect applicability (UP040) (#16027)pyupgrade] Don't introduce invalid syntax when upgrading old-style type aliases with parenthesized multiline values (UP040) (#16026)pyupgrade] Ensure we do not rename two type parameters to the same name (UP049) (#16038)pyupgrade] [ruff] Don't apply renamings if the new name is shadowed in a scope of one of the references to the binding (UP049,RUF052) (#16032)ruff] UpdateRUF009to behave similar toB008and ignore attributes with immutable types (#16048)Server
Bug fixes
flake8-datetime] Ignore.replace()calls while looking for.astimezone(#16050)flake8-type-checking] AvoidTC004false positive where the runtime definition is provided by__getattr__(#16052)Documentation
ruff-lspmigration document (#16072)ruff.nativeServer(#16039)v0.9.5Compare Source
Preview features
TYPE_CHECKINGforin_type_checking_block(#15719)flake8-comprehensions] Handle builtins at top of file correctly forunnecessary-dict-comprehension-for-iterable(C420) (#15837)flake8-logging].exception()andexc_info=outside exception handlers (LOG004,LOG014) (#15799)flake8-pyi] Fix incorrect behaviour ofcustom-typevar-return-typepreview-mode autofix iftypingwas already imported (PYI019) (#15853)flake8-pyi] Fix more complex cases (PYI019) (#15821)flake8-pyi] MakePYI019autofixable for.pyfiles in preview mode as well as stubs (#15889)flake8-pyi] Remove type parameter correctly when it is the last (PYI019) (#15854)pylint] Fix missing parens in unsafe fix forunnecessary-dunder-call(PLC2801) (#15762)pyupgrade] Better messages and diagnostic range (UP015) (#15872)pyupgrade] Rename private type parameters in PEP 695 generics (UP049) (#15862)refurb] Also report non-name expressions (FURB169) (#15905)refurb] Mark fix as unsafe if there are comments (FURB171) (#15832)ruff] Classes with mixed type variable style (RUF053) (#15841)airflow]BashOperatorhas been moved toairflow.providers.standard.operators.bash.BashOperator(AIR302) (#15922)flake8-pyi] Add autofix for unused-private-type-var (PYI018) (#15999)flake8-pyi] Significantly improve accuracy ofPYI019if preview mode is enabled (#15888)Rule changes
flake8-comprehensions] Skip whenTypeErrorpresent from too many (kw)args forC410,C411, andC418(#15838)flake8-pyi] RenamePYI019and improve its diagnostic message (#15885)pep8-naming] Ignore@overridemethods (N803) (#15954)pyupgrade] Reuse replacement logic fromUP046andUP047to preserve more comments (UP040) ([#&how to type check the xml element class #82