Commit 09347c6
authored
chore(deps): update python dependencies (#86)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [jsonschema](https://redirect.github.com/python-jsonschema/jsonschema)
([changelog](https://redirect.github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst))
| `4.23.0` -> `4.24.0` |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
| [mypy](https://redirect.github.com/python/mypy)
([changelog](https://mypy.readthedocs.io/en/latest/changelog.html)) |
`1.15.0` -> `1.16.1` |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
| [pytest](https://redirect.github.com/pytest-dev/pytest)
([changelog](https://docs.pytest.org/en/stable/changelog.html)) |
`8.3.5` -> `8.4.0` |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
| [ruff](https://docs.astral.sh/ruff)
([source](https://redirect.github.com/astral-sh/ruff),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md))
| `~0.11.5` -> `~0.12.0` |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
<details>
<summary>python-jsonschema/jsonschema (jsonschema)</summary>
###
[`v4.24.0`](https://redirect.github.com/python-jsonschema/jsonschema/blob/HEAD/CHANGELOG.rst#v4240)
[Compare
Source](https://redirect.github.com/python-jsonschema/jsonschema/compare/v4.23.0...v4.24.0)
\=======
- Fix improper handling of `unevaluatedProperties` in the presence of
`additionalProperties`
([#​1351](https://redirect.github.com/python-jsonschema/jsonschema/issues/1351)).
- Support for Python 3.8 has been dropped, as it is end-of-life.
</details>
<details>
<summary>python/mypy (mypy)</summary>
###
[`v1.16.1`](https://redirect.github.com/python/mypy/compare/v1.16.0...v1.16.1)
[Compare
Source](https://redirect.github.com/python/mypy/compare/v1.16.0...v1.16.1)
###
[`v1.16.0`](https://redirect.github.com/python/mypy/compare/v1.15.0...v1.16.0)
[Compare
Source](https://redirect.github.com/python/mypy/compare/v1.15.0...v1.16.0)
</details>
<details>
<summary>pytest-dev/pytest (pytest)</summary>
###
[`v8.4.0`](https://redirect.github.com/pytest-dev/pytest/releases/tag/8.4.0)
[Compare
Source](https://redirect.github.com/pytest-dev/pytest/compare/8.3.5...8.4.0)
### pytest 8.4.0 (2025-06-02)
#### Removals and backward incompatible breaking changes
-
[#​11372](https://redirect.github.com/pytest-dev/pytest/issues/11372):
Async tests will now fail, instead of warning+skipping, if you don't
have any suitable plugin installed.
-
[#​12346](https://redirect.github.com/pytest-dev/pytest/issues/12346):
Tests will now fail, instead of raising a warning, if they return any
value other than None.
-
[#​12874](https://redirect.github.com/pytest-dev/pytest/issues/12874):
We dropped support for Python 3.8 following its end of life
(2024-10-07).
-
[#​12960](https://redirect.github.com/pytest-dev/pytest/issues/12960):
Test functions containing a yield now cause an explicit error. They have
not been run since pytest 4.0, and were previously marked as an expected
failure and deprecation warning.
See `the docs <yield tests deprecated>`{.interpreted-text role="ref"}
for more information.
#### Deprecations (removal in next major release)
-
[#​10839](https://redirect.github.com/pytest-dev/pytest/issues/10839):
Requesting an asynchronous fixture without a
\[pytest_fixture_setup]{.title-ref} hook that resolves it will now give
a DeprecationWarning. This most commonly happens if a sync test requests
an async fixture. This should have no effect on a majority of users with
async tests or fixtures using async pytest plugins, but may affect
non-standard hook setups or `autouse=True`. For guidance on how to work
around this warning see `sync-test-async-fixture`{.interpreted-text
role="ref"}.
#### New features
-
[#​11538](https://redirect.github.com/pytest-dev/pytest/issues/11538):
Added `pytest.RaisesGroup`{.interpreted-text role="class"} as an
equivalent to `pytest.raises`{.interpreted-text role="func"} for
expecting `ExceptionGroup`{.interpreted-text role="exc"}. Also adds
`pytest.RaisesExc`{.interpreted-text role="class"} which is now the
logic behind `pytest.raises`{.interpreted-text role="func"} and used as
parameter to `pytest.RaisesGroup`{.interpreted-text role="class"}.
`RaisesGroup` includes the ability to specify multiple different
expected exceptions, the structure of nested exception groups, and flags
for emulating `except* <except_star>`{.interpreted-text role="ref"}. See
`assert-matching-exception-groups`{.interpreted-text role="ref"} and
docstrings for more information.
-
[#​12081](https://redirect.github.com/pytest-dev/pytest/issues/12081):
Added `capteesys`{.interpreted-text role="fixture"} to capture AND pass
output to next handler set by `--capture=`.
-
[#​12504](https://redirect.github.com/pytest-dev/pytest/issues/12504):
`pytest.mark.xfail`{.interpreted-text role="func"} now accepts
`pytest.RaisesGroup`{.interpreted-text role="class"} for the `raises`
parameter when you expect an exception group. You can also pass a
`pytest.RaisesExc`{.interpreted-text role="class"} if you e.g. want to
make use of the `check` parameter.
-
[#​12713](https://redirect.github.com/pytest-dev/pytest/issues/12713):
New \[--force-short-summary]{.title-ref} option to force condensed
summary output regardless of verbosity level.
This lets users still see condensed summary output of failures for quick
reference in log files from job outputs, being especially useful if
non-condensed output is very verbose.
-
[#​12749](https://redirect.github.com/pytest-dev/pytest/issues/12749):
pytest traditionally collects classes/functions in the test module
namespace even if they are imported from another file.
For example:
```python
```
### contents of src/domain.py
class Testament: ...
### contents of tests/test_testament.py
from domain import Testament
def test_testament(): ...
```
In this scenario with the default options, pytest will collect the class
[Testament]{.title-ref} from [tests/test_testament.py]{.title-ref}
because it starts with [Test]{.title-ref}, even though in this case it
is a production class being imported in the test module namespace.
This behavior can now be prevented by setting the new
`collect_imported_tests`{.interpreted-text role="confval"} configuration
option to `false`, which will make pytest collect classes/functions from
test files **only** if they are defined in that file.
\-- by `FreerGit`{.interpreted-text role="user"}
-
[#​12765](https://redirect.github.com/pytest-dev/pytest/issues/12765):
Thresholds to trigger snippet truncation can now be set with
`truncation_limit_lines`{.interpreted-text role="confval"} and
`truncation_limit_chars`{.interpreted-text role="confval"}.
See `truncation-params`{.interpreted-text role="ref"} for more
information.
-
[#​13125](https://redirect.github.com/pytest-dev/pytest/issues/13125):
`console_output_style`{.interpreted-text role="confval"} now supports
`times` to show execution time of each test.
-
[#​13192](https://redirect.github.com/pytest-dev/pytest/issues/13192):
`pytest.raises`{.interpreted-text role="func"} will now raise a warning
when passing an empty string to `match`, as this will match against any
value. Use `match="^$"` if you want to check that an exception has no
message.
-
[#​13192](https://redirect.github.com/pytest-dev/pytest/issues/13192):
`pytest.raises`{.interpreted-text role="func"} will now print a helpful
string diff if matching fails and the match parameter has `^` and `$`
and is otherwise escaped.
-
[#​13192](https://redirect.github.com/pytest-dev/pytest/issues/13192):
You can now pass `with pytest.raises(check=fn):
<pytest.raises>`{.interpreted-text role="func"}, where `fn` is a
function which takes a raised exception and returns a boolean. The
`raises` fails if no exception was raised (as usual), passes if an
exception is raised and `fn` returns `True` (as well as `match` and the
type matching, if specified, which are checked before), and propagates
the exception if `fn` returns `False` (which likely also fails the
test).
-
[#​13228](https://redirect.github.com/pytest-dev/pytest/issues/13228):
`hidden-param`{.interpreted-text role="ref"} can now be used in `id` of
`pytest.param`{.interpreted-text role="func"} or in
`ids` of `Metafunc.parametrize
<pytest.Metafunc.parametrize>`{.interpreted-text role="py:func"}.
It hides the parameter set from the test name.
-
[#​13253](https://redirect.github.com/pytest-dev/pytest/issues/13253):
New flag: `--disable-plugin-autoload
<disable_plugin_autoload>`{.interpreted-text role="ref"} which works as
an alternative to `PYTEST_DISABLE_PLUGIN_AUTOLOAD`{.interpreted-text
role="envvar"} when setting environment variables is inconvenient; and
allows setting it in config files with `addopts`{.interpreted-text
role="confval"}.
#### Improvements in existing functionality
-
[#​10224](https://redirect.github.com/pytest-dev/pytest/issues/10224):
pytest's `short` and `long` traceback styles
(`how-to-modifying-python-tb-printing`{.interpreted-text role="ref"})
now have partial `657`{.interpreted-text role="pep"} support and will
show specific code segments in the
traceback.
```pytest
================================= FAILURES
=================================
_______________________ test_gets_correct_tracebacks
_______________________
test_tracebacks.py:12: in test_gets_correct_tracebacks
assert manhattan_distance(p1, p2) == 1
^^^^^^^^^^^^^^^^^^^^^^^^^^
test_tracebacks.py:6: in manhattan_distance
return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y)
^^^^^^^^^
E AttributeError: 'NoneType' object has no attribute 'x'
```
\-- by `ammaraskar`{.interpreted-text role="user"}
-
[#​11118](https://redirect.github.com/pytest-dev/pytest/issues/11118):
Now `pythonpath`{.interpreted-text role="confval"} configures
\[$PYTHONPATH]{.title-ref} earlier than before during the initialization
process, which now also affects plugins loaded via the \[-p]{.title-ref}
command-line option.
\-- by `millerdev`{.interpreted-text role="user"}
-
[#​11381](https://redirect.github.com/pytest-dev/pytest/issues/11381):
The `type` parameter of the `parser.addini` method now accepts
\["int"]{.title-ref} and `"float"` parameters, facilitating the parsing
of configuration values in the configuration file.
Example:
```python
def pytest_addoption(parser):
parser.addini("int_value", type="int", default=2, help="my int value")
parser.addini("float_value", type="float", default=4.2, help="my float
value")
```
The \[pytest.ini]{.title-ref} file:
```ini
[pytest]
int_value = 3
float_value = 5.4
```
-
[#​11525](https://redirect.github.com/pytest-dev/pytest/issues/11525):
Fixtures are now clearly represented in the output as a "fixture
object", not as a normal function as before, making it easy for
beginners to catch mistakes such as referencing a fixture declared in
the same module but not requested in the test function.
\-- by `the-compiler`{.interpreted-text role="user"} and
`glyphack`{.interpreted-text role="user"}
-
[#​12426](https://redirect.github.com/pytest-dev/pytest/issues/12426):
A warning is now issued when `pytest.mark.usefixtures
ref`{.interpreted-text role="ref"} is used without specifying any
fixtures. Previously, empty usefixtures markers were silently ignored.
-
[#​12707](https://redirect.github.com/pytest-dev/pytest/issues/12707):
Exception chains can be navigated when dropped into Pdb in Python 3.13+.
-
[#​12736](https://redirect.github.com/pytest-dev/pytest/issues/12736):
Added a new attribute \[name]{.title-ref} with the fixed value \["pytest
tests"]{.title-ref} to the root tag \[testsuites]{.title-ref} of the
junit-xml generated by pytest.
This attribute is part of many junit-xml specifications and is even part
of the \[junit-10.xsd]{.title-ref} specification that pytest's
implementation is based on.
-
[#​12943](https://redirect.github.com/pytest-dev/pytest/issues/12943):
If a test fails with an exceptiongroup with a single exception, the
contained exception will now be displayed in the short test summary
info.
-
[#​12958](https://redirect.github.com/pytest-dev/pytest/issues/12958):
A number of `unraisable <unraisable>`{.interpreted-text role="ref"}
enhancements:
- Set the unraisable hook as early as possible and unset it as late as
possible, to collect the most possible number of unraisable exceptions.
- Call the garbage collector just before unsetting the unraisable hook,
to collect any straggling exceptions.
- Collect multiple unraisable exceptions per test phase.
- Report the `tracemalloc`{.interpreted-text role="mod"} allocation
traceback (if available).
- Avoid using a generator based hook to allow handling
`StopIteration`{.interpreted-text role="class"} in test failures.
- Report the unraisable exception as the cause of the
`pytest.PytestUnraisableExceptionWarning`{.interpreted-text
role="class"} exception if raised.
- Compute the `repr` of the unraisable object in the unraisable hook so
you get the latest information if available, and should help with
resurrection of the object.
-
[#​13010](https://redirect.github.com/pytest-dev/pytest/issues/13010):
`pytest.approx`{.interpreted-text role="func"} now can compare
collections that contain numbers and non-numbers mixed.
-
[#​13016](https://redirect.github.com/pytest-dev/pytest/issues/13016):
A number of `threadexception <unraisable>`{.interpreted-text role="ref"}
enhancements:
- Set the excepthook as early as possible and unset it as late as
possible, to collect the most possible number of unhandled exceptions
from threads.
- Collect multiple thread exceptions per test phase.
- Report the `tracemalloc`{.interpreted-text role="mod"} allocation
traceback (if available).
- Avoid using a generator based hook to allow handling
`StopIteration`{.interpreted-text role="class"} in test failures.
- Report the thread exception as the cause of the
`pytest.PytestUnhandledThreadExceptionWarning`{.interpreted-text
role="class"} exception if raised.
- Extract the `name` of the thread object in the excepthook which should
help with resurrection of the thread.
-
[#​13031](https://redirect.github.com/pytest-dev/pytest/issues/13031):
An empty parameter set as in `pytest.mark.parametrize([], ids=idfunc)`
will no longer trigger a call to `idfunc` with internal objects.
-
[#​13115](https://redirect.github.com/pytest-dev/pytest/issues/13115):
Allows supplying `ExceptionGroup[Exception]` and
`BaseExceptionGroup[BaseException]` to `pytest.raises` to keep full
typing on `ExceptionInfo <pytest.ExceptionInfo>`{.interpreted-text
role="class"}:
```python
with pytest.raises(ExceptionGroup[Exception]) as exc_info:
some_function()
```
Parametrizing with other exception types remains an error - we do not
check the types of child exceptions and thus do not permit code that
might look like we do.
-
[#​13122](https://redirect.github.com/pytest-dev/pytest/issues/13122):
The `--stepwise` mode received a number of improvements:
- It no longer forgets the last failed test in case pytest is executed
later without the flag.
This enables the following workflow:
1. Execute pytest with `--stepwise`, pytest then stops at the first
failing test;
2. Iteratively update the code and run the test in isolation, without
the `--stepwise` flag (for example in an IDE), until it is fixed.
3. Execute pytest with `--stepwise` again and pytest will continue from
the previously failed test, and if it passes, continue on to the next
tests.
Previously, at step 3, pytest would start from the beginning, forgetting
the previously failed test.
This change however might cause issues if the `--stepwise` mode is used
far apart in time, as the state might get stale, so the internal state
will be reset automatically in case the test suite changes (for now only
the number of tests are considered for this, we might change/improve
this on the future).
- New `--stepwise-reset`/`--sw-reset` flag, allowing the user to
explicitly reset the stepwise state and restart the workflow from the
beginning.
-
[#​13308](https://redirect.github.com/pytest-dev/pytest/issues/13308):
Added official support for Python 3.14.
-
[#​13380](https://redirect.github.com/pytest-dev/pytest/issues/13380):
Fix `ExceptionGroup`{.interpreted-text role="class"} traceback filtering
to exclude pytest internals.
-
[#​13415](https://redirect.github.com/pytest-dev/pytest/issues/13415):
The author metadata of the BibTex example is now correctly formatted
with last names following first names.
An example of BibLaTex has been added.
BibTex and BibLaTex examples now clearly indicate that what is cited is
software.
\-- by `willynilly`{.interpreted-text role="user"}
-
[#​13420](https://redirect.github.com/pytest-dev/pytest/issues/13420):
Improved test collection performance by optimizing path resolution used
in `FSCollector`.
-
[#​13457](https://redirect.github.com/pytest-dev/pytest/issues/13457):
The error message about duplicate parametrization no longer displays an
internal stack trace.
-
[#​4112](https://redirect.github.com/pytest-dev/pytest/issues/4112):
Using `pytest.mark.usefixtures <pytest.mark.usefixtures
ref>`{.interpreted-text role="ref"} on `pytest.param`{.interpreted-text
role="func"} now produces an error instead of silently doing nothing.
-
[#​5473](https://redirect.github.com/pytest-dev/pytest/issues/5473):
Replace \[:]{.title-ref} with \[;]{.title-ref} in the assertion rewrite
warning message so it can be filtered using standard Python warning
filters before calling `pytest.main`{.interpreted-text role="func"}.
-
<!---->
[#​6985](https://redirect.github.com/pytest-dev/pytest/issues/6985):
Improved `pytest.approx`{.interpreted-text role="func"} to enhance the
readability of value ranges and tolerances between 0.001 and 1000.
: - The [repr]{.title-ref} method now provides clearer output for values
within those ranges, making it easier to interpret the results.
- Previously, the output for those ranges of values and tolerances was
displayed in scientific notation (e.g., [42 ± 1.0e+00]{.title-ref}). The
updated method now presents the tolerance as a decimal for better
readability (e.g., [42 ± 1]{.title-ref}).
Example:
**Previous Output:**
``` console
>>> pytest.approx(42, abs=1)
42 ± 1.0e+00
```
**Current Output:**
``` console
>>> pytest.approx(42, abs=1)
42 ± 1
```
\-- by `fazeelghafoor`{.interpreted-text role="user"}
-
[#​7683](https://redirect.github.com/pytest-dev/pytest/issues/7683):
The formerly optional `pygments` dependency is now required, causing
output always to be source-highlighted (unless disabled via the
`--code-highlight=no` CLI option).
#### Bug fixes
-
[#​10404](https://redirect.github.com/pytest-dev/pytest/issues/10404):
Apply filterwarnings from config/cli as soon as possible, and revert
them as late as possible
so that warnings as errors are collected throughout the pytest run and
before the
unraisable and threadexcept hooks are removed.
This allows very late warnings and unraisable/threadexcept exceptions to
fail the test suite.
This also changes the warning that the lsof plugin issues from
PytestWarning to the new warning PytestFDWarning so it can be more
easily filtered.
-
[#​11067](https://redirect.github.com/pytest-dev/pytest/issues/11067):
The test report is now consistent regardless if the test xfailed via
`pytest.mark.xfail <pytest.mark.xfail ref>`{.interpreted-text
role="ref"} or `pytest.fail`{.interpreted-text role="func"}.
Previously, *xfailed* tests via the marker would have the string
`"reason: "` prefixed to the message, while those *xfailed* via the
function did not. The prefix has been removed.
-
[#​12008](https://redirect.github.com/pytest-dev/pytest/issues/12008):
In `11220`{.interpreted-text role="pr"}, an unintended change in
reordering was introduced by changing the way indices were assigned to
direct params. More specifically, before that change, the indices of
direct params to metafunc's callspecs were assigned after all
parametrizations took place. Now, that change is reverted.
-
[#​12863](https://redirect.github.com/pytest-dev/pytest/issues/12863):
Fix applying markers, including `pytest.mark.parametrize
<pytest.mark.parametrize ref>`{.interpreted-text role="ref"} when placed
above
\[[@​staticmethod](https://redirect.github.com/staticmethod)]{.title-ref}
or
\[[@​classmethod](https://redirect.github.com/classmethod)]{.title-ref}.
-
[#​12929](https://redirect.github.com/pytest-dev/pytest/issues/12929):
Handle StopIteration from test cases, setup and teardown correctly.
-
[#​12938](https://redirect.github.com/pytest-dev/pytest/issues/12938):
Fixed `--durations-min` argument not respected if `-vv` is used.
-
[#​12946](https://redirect.github.com/pytest-dev/pytest/issues/12946):
Fixed missing help for `pdb`{.interpreted-text role="mod"} commands
wrapped by pytest -- by `adamchainz`{.interpreted-text role="user"}.
-
[#​12981](https://redirect.github.com/pytest-dev/pytest/issues/12981):
Prevent exceptions in `pytest.Config.add_cleanup`{.interpreted-text
role="func"} callbacks preventing further cleanups.
-
[#​13047](https://redirect.github.com/pytest-dev/pytest/issues/13047):
Restore `pytest.approx`{.interpreted-text role="func"} handling of
equality checks between \[bool]{.title-ref} and
\[numpy.bool\_]{.title-ref} types.
Comparing \[bool]{.title-ref} and \[numpy.bool\_]{.title-ref} using
`pytest.approx`{.interpreted-text role="func"} accidentally changed in
version \[8.3.4]{.title-ref} and \[8.3.5]{.title-ref} to no longer
match:
```pycon
>>> import numpy as np
>>> from pytest import approx
>>> [np.True_, np.True_] == pytest.approx([True, True])
False
```
This has now been fixed:
```pycon
>>> [np.True_, np.True_] == pytest.approx([True, True])
True
```
-
[#​13119](https://redirect.github.com/pytest-dev/pytest/issues/13119):
Improved handling of invalid regex patterns for filter warnings by
providing a clear error message.
-
[#​13175](https://redirect.github.com/pytest-dev/pytest/issues/13175):
The diff is now also highlighted correctly when comparing two strings.
-
[#​13248](https://redirect.github.com/pytest-dev/pytest/issues/13248):
Fixed an issue where passing a `scope` in `Metafunc.parametrize
<pytest.Metafunc.parametrize>`{.interpreted-text role="py:func"} with
`indirect=True`
could result in other fixtures being unable to depend on the
parametrized fixture.
-
[#​13291](https://redirect.github.com/pytest-dev/pytest/issues/13291):
Fixed `repr` of `attrs` objects in assertion failure messages when using
`attrs>=25.2`.
-
[#​13312](https://redirect.github.com/pytest-dev/pytest/issues/13312):
Fixed a possible `KeyError` crash on PyPy during collection of tests
involving higher-scoped parameters.
-
[#​13345](https://redirect.github.com/pytest-dev/pytest/issues/13345):
Fix type hints for `pytest.TestReport.when`{.interpreted-text
role="attr"} and `pytest.TestReport.location`{.interpreted-text
role="attr"}.
-
[#​13377](https://redirect.github.com/pytest-dev/pytest/issues/13377):
Fixed handling of test methods with positional-only parameter syntax.
Now, methods are supported that formally define `self` as
positional-only
and/or fixture parameters as keyword-only, e.g.:
```python
class TestClass:
def test_method(self, /, *, fixture): ...
```
Before, this caused an internal error in pytest.
-
[#​13384](https://redirect.github.com/pytest-dev/pytest/issues/13384):
Fixed an issue where pytest could report negative durations.
-
[#​13420](https://redirect.github.com/pytest-dev/pytest/issues/13420):
Added `lru_cache` to `nodes._check_initialpaths_for_relpath`.
-
[#​9037](https://redirect.github.com/pytest-dev/pytest/issues/9037):
Honor
`disable_test_id_escaping_and_forfeit_all_rights_to_community_support`{.interpreted-text
role="confval"} when escaping ids in parametrized tests.
#### Improved documentation
-
[#​12535](https://redirect.github.com/pytest-dev/pytest/issues/12535):
\[This
example]{.title-ref}<<https://docs.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures>>
showed `print` statements that do not exactly reflect what the
different branches actually do. The fix makes the example more precise.
-
[#​13218](https://redirect.github.com/pytest-dev/pytest/issues/13218):
Pointed out in the `pytest.approx`{.interpreted-text role="func"}
documentation that it considers booleans unequal to numeric zero or one.
-
[#​13221](https://redirect.github.com/pytest-dev/pytest/issues/13221):
Improved grouping of CLI options in the `--help` output.
-
[#​6649](https://redirect.github.com/pytest-dev/pytest/issues/6649):
Added `~pytest.TerminalReporter`{.interpreted-text role="class"} to the
`api-reference`{.interpreted-text role="ref"} documentation page.
-
[#​8612](https://redirect.github.com/pytest-dev/pytest/issues/8612):
Add a recipe for handling abstract test classes in the documentation.
A new example has been added to the documentation to demonstrate how to
use a mixin class to handle abstract
test classes without manually setting the `__test__` attribute for
subclasses.
This ensures that subclasses of abstract test classes are automatically
collected by pytest.
#### Packaging updates and notes for downstreams
-
[#​13317](https://redirect.github.com/pytest-dev/pytest/issues/13317):
Specified minimum allowed versions of `colorama`, `iniconfig`,
and `packaging`; and bumped the minimum allowed version
of `exceptiongroup` for `python_version<'3.11'` from a release
candidate to a full release.
#### Contributor-facing changes
-
[#​12017](https://redirect.github.com/pytest-dev/pytest/issues/12017):
Mixed internal improvements:
- Migrate formatting to f-strings in some tests.
- Use type-safe constructs in JUnitXML tests.
- Moved`MockTiming` into `_pytest.timing`.
\-- by `RonnyPfannschmidt`{.interpreted-text role="user"}
-
[#​12647](https://redirect.github.com/pytest-dev/pytest/issues/12647):
Fixed running the test suite with the `hypothesis` pytest plugin.
#### Miscellaneous internal changes
-
[#​6649](https://redirect.github.com/pytest-dev/pytest/issues/6649):
Added `~pytest.TerminalReporter`{.interpreted-text role="class"} to the
public pytest API, as it is part of the signature of the
`pytest_terminal_summary`{.interpreted-text role="hook"} hook.
</details>
<details>
<summary>astral-sh/ruff (ruff)</summary>
###
[`v0.12.0`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0120)
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.11.13...0.12.0)
Check out the [blog post](https://astral.sh/blog/ruff-v0.12.0) for a
migration
guide and overview of the changes!
##### Breaking changes
- **Detection of more syntax errors**
Ruff now detects version-related syntax errors, such as the use of the
`match`
statement on Python versions before 3.10, and syntax errors emitted by
CPython's compiler, such as irrefutable `match` patterns before the
final
`case` arm.
- **New default Python version handling for syntax errors**
Ruff will default to the *latest* supported Python version (3.13) when
checking for the version-related syntax errors mentioned above to
prevent
false positives in projects without a Python version configured. The
default
in all other cases, like applying lint rules, is unchanged and remains
at the
minimum supported Python version (3.9).
- **Updated f-string formatting**
Ruff now formats multi-line f-strings with format specifiers to avoid
adding a
line break after the format specifier. This addresses a change to the
Python
grammar in version 3.13.4 that made such a line break a syntax error.
- **`rust-toolchain.toml` is no longer included in source
distributions**
The `rust-toolchain.toml` is used to specify a higher Rust version than
Ruff's
minimum supported Rust version (MSRV) for development and building
release
artifacts. However, when present in source distributions, it would also
cause
downstream package maintainers to pull in the same Rust toolchain, even
if
their available toolchain was MSRV-compatible.
##### Removed Rules
The following rules have been removed:
-
[`suspicious-xmle-tree-usage`](https://docs.astral.sh/ruff/rules/suspicious-xmle-tree-usage/)
(`S320`)
##### Deprecated Rules
The following rules have been deprecated:
-
[`pandas-df-variable-name`](https://docs.astral.sh/ruff/rules/pandas-df-variable-name/)
##### Stabilization
The following rules have been stabilized and are no longer in preview:
- [`for-loop-writes`](https://docs.astral.sh/ruff/rules/for-loop-writes)
(`FURB122`)
-
[`check-and-remove-from-set`](https://docs.astral.sh/ruff/rules/check-and-remove-from-set)
(`FURB132`)
-
[`verbose-decimal-constructor`](https://docs.astral.sh/ruff/rules/verbose-decimal-constructor)
(`FURB157`)
-
[`fromisoformat-replace-z`](https://docs.astral.sh/ruff/rules/fromisoformat-replace-z)
(`FURB162`)
-
[`int-on-sliced-str`](https://docs.astral.sh/ruff/rules/int-on-sliced-str)
(`FURB166`)
-
[`exc-info-outside-except-handler`](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler)
(`LOG014`)
-
[`import-outside-top-level`](https://docs.astral.sh/ruff/rules/import-outside-top-level)
(`PLC0415`)
-
[`unnecessary-dict-index-lookup`](https://docs.astral.sh/ruff/rules/unnecessary-dict-index-lookup)
(`PLR1733`)
- [`nan-comparison`](https://docs.astral.sh/ruff/rules/nan-comparison)
(`PLW0177`)
- [`eq-without-hash`](https://docs.astral.sh/ruff/rules/eq-without-hash)
(`PLW1641`)
-
[`pytest-parameter-with-default-argument`](https://docs.astral.sh/ruff/rules/pytest-parameter-with-default-argument)
(`PT028`)
-
[`pytest-warns-too-broad`](https://docs.astral.sh/ruff/rules/pytest-warns-too-broad)
(`PT030`)
-
[`pytest-warns-with-multiple-statements`](https://docs.astral.sh/ruff/rules/pytest-warns-with-multiple-statements)
(`PT031`)
-
[`invalid-formatter-suppression-comment`](https://docs.astral.sh/ruff/rules/invalid-formatter-suppression-comment)
(`RUF028`)
- [`dataclass-enum`](https://docs.astral.sh/ruff/rules/dataclass-enum)
(`RUF049`)
-
[`class-with-mixed-type-vars`](https://docs.astral.sh/ruff/rules/class-with-mixed-type-vars)
(`RUF053`)
-
[`unnecessary-round`](https://docs.astral.sh/ruff/rules/unnecessary-round)
(`RUF057`)
- [`starmap-zip`](https://docs.astral.sh/ruff/rules/starmap-zip)
(`RUF058`)
-
[`non-pep604-annotation-optional`](https://docs.astral.sh/ruff/rules/non-pep604-annotation-optional)
(`UP045`)
-
[`non-pep695-generic-class`](https://docs.astral.sh/ruff/rules/non-pep695-generic-class)
(`UP046`)
-
[`non-pep695-generic-function`](https://docs.astral.sh/ruff/rules/non-pep695-generic-function)
(`UP047`)
-
[`private-type-parameter`](https://docs.astral.sh/ruff/rules/private-type-parameter)
(`UP049`)
The following behaviors have been stabilized:
- \[`collection-literal-concatenation`] (`RUF005`) now recognizes
slices, in
addition to list literals and variables.
- The fix for \[`readlines-in-for`] (`FURB129`) is now marked as always
safe.
- \[`if-else-block-instead-of-if-exp`] (`SIM108`) will now further
simplify
expressions to use `or` instead of an `if` expression, where possible.
- \[`unused-noqa`] (`RUF100`) now checks for file-level `noqa` comments
as well
as inline comments.
- \[`subprocess-without-shell-equals-true`] (`S603`) now accepts literal
strings,
as well as lists and tuples of literal strings, as trusted input.
- \[`boolean-type-hint-positional-argument`] (`FBT001`) now applies to
types that
include `bool`, like `bool | int` or `typing.Optional[bool]`, in
addition to
plain `bool` annotations.
- \[`non-pep604-annotation-union`] (`UP007`) has now been split into two
rules.
`UP007` now applies only to `typing.Union`, while
\[`non-pep604-annotation-optional`] (`UP045`) checks for use of
`typing.Optional`. `UP045` has also been stabilized in this release, but
you
may need to update existing `include`, `ignore`, or `noqa` settings to
accommodate this change.
##### Preview features
- \[`ruff`] Check for non-context-manager use of `pytest.raises`,
`pytest.warns`, and `pytest.deprecated_call` (`RUF061`)
([#​17368](https://redirect.github.com/astral-sh/ruff/pull/17368))
- \[syntax-errors] Raise unsupported syntax error for template strings
prior to Python 3.14
([#​18664](https://redirect.github.com/astral-sh/ruff/pull/18664))
##### Bug fixes
- Add syntax error when conversion flag does not immediately follow
exclamation mark
([#​18706](https://redirect.github.com/astral-sh/ruff/pull/18706))
- Add trailing space around `readlines`
([#​18542](https://redirect.github.com/astral-sh/ruff/pull/18542))
- Fix `\r` and `\r\n` handling in t- and f-string debug texts
([#​18673](https://redirect.github.com/astral-sh/ruff/pull/18673))
- Hug closing `}` when f-string expression has a format specifier
([#​18704](https://redirect.github.com/astral-sh/ruff/pull/18704))
- \[`flake8-pyi`] Avoid syntax error in the case of starred and keyword
arguments (`PYI059`)
([#​18611](https://redirect.github.com/astral-sh/ruff/pull/18611))
- \[`flake8-return`] Fix `RET504` autofix generating a syntax error
([#​18428](https://redirect.github.com/astral-sh/ruff/pull/18428))
- \[`pep8-naming`] Suppress fix for `N804` and `N805` if the recommended
name is already used
([#​18472](https://redirect.github.com/astral-sh/ruff/pull/18472))
- \[`pycodestyle`] Avoid causing a syntax error in expressions spanning
multiple lines (`E731`)
([#​18479](https://redirect.github.com/astral-sh/ruff/pull/18479))
- \[`pyupgrade`] Suppress `UP008` if `super` is shadowed
([#​18688](https://redirect.github.com/astral-sh/ruff/pull/18688))
- \[`refurb`] Parenthesize lambda and ternary expressions (`FURB122`,
`FURB142`)
([#​18592](https://redirect.github.com/astral-sh/ruff/pull/18592))
- \[`ruff`] Handle extra arguments to `deque` (`RUF037`)
([#​18614](https://redirect.github.com/astral-sh/ruff/pull/18614))
- \[`ruff`] Preserve parentheses around `deque` in fix for
`unnecessary-empty-iterable-within-deque-call` (`RUF037`)
([#​18598](https://redirect.github.com/astral-sh/ruff/pull/18598))
- \[`ruff`] Validate arguments before offering a fix (`RUF056`)
([#​18631](https://redirect.github.com/astral-sh/ruff/pull/18631))
- \[`ruff`] Skip fix for `RUF059` if dummy name is already bound
([#​18509](https://redirect.github.com/astral-sh/ruff/pull/18509))
- \[`pylint`] Fix `PLW0128` to check assignment targets in square
brackets and after asterisks
([#​18665](https://redirect.github.com/astral-sh/ruff/pull/18665))
##### Rule changes
- Fix false positive on mutations in `return` statements (`B909`)
([#​18408](https://redirect.github.com/astral-sh/ruff/pull/18408))
- Treat `ty:` comments as pragma comments
([#​18532](https://redirect.github.com/astral-sh/ruff/pull/18532))
- \[`flake8-pyi`] Apply `custom-typevar-for-self` to string annotations
(`PYI019`)
([#​18311](https://redirect.github.com/astral-sh/ruff/pull/18311))
- \[`pyupgrade`] Don't offer a fix for `Optional[None]` (`UP007`,
`UP045)`
([#​18545](https://redirect.github.com/astral-sh/ruff/pull/18545))
- \[`pyupgrade`] Fix `super(__class__, self)` detection (`UP008`)
([#​18478](https://redirect.github.com/astral-sh/ruff/pull/18478))
- \[`refurb`] Make the fix for `FURB163` unsafe for `log2`, `log10`,
`*args`, and deleted comments
([#​18645](https://redirect.github.com/astral-sh/ruff/pull/18645))
##### Server
- Support cancellation requests
([#​18627](https://redirect.github.com/astral-sh/ruff/pull/18627))
##### Documentation
- Drop confusing second `*` from glob pattern example for
`per-file-target-version`
([#​18709](https://redirect.github.com/astral-sh/ruff/pull/18709))
- Update Neovim configuration examples
([#​18491](https://redirect.github.com/astral-sh/ruff/pull/18491))
- \[`pylint`] De-emphasize `__hash__ = Parent.__hash__` (`PLW1641`)
([#​18613](https://redirect.github.com/astral-sh/ruff/pull/18613))
- \[`refurb`] Add a note about float literal handling (`FURB157`)
([#​18615](https://redirect.github.com/astral-sh/ruff/pull/18615))
###
[`v0.11.13`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#01113)
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.11.12...0.11.13)
##### Preview features
- \[`airflow`] Add unsafe fix for module moved cases
(`AIR301`,`AIR311`,`AIR312`,`AIR302`)
([#​18367](https://redirect.github.com/astral-sh/ruff/pull/18367),[#​18366](https://redirect.github.com/astral-sh/ruff/pull/18366),[#​18363](https://redirect.github.com/astral-sh/ruff/pull/18363),[#​18093](https://redirect.github.com/astral-sh/ruff/pull/18093))
- \[`refurb`] Add coverage of `set` and `frozenset` calls (`FURB171`)
([#​18035](https://redirect.github.com/astral-sh/ruff/pull/18035))
- \[`refurb`] Mark `FURB180` fix unsafe when class has bases
([#​18149](https://redirect.github.com/astral-sh/ruff/pull/18149))
##### Bug fixes
- \[`perflint`] Fix missing parentheses for lambda and ternary
conditions (`PERF401`, `PERF403`)
([#​18412](https://redirect.github.com/astral-sh/ruff/pull/18412))
- \[`pyupgrade`] Apply `UP035` only on py313+ for `get_type_hints()`
([#​18476](https://redirect.github.com/astral-sh/ruff/pull/18476))
- \[`pyupgrade`] Make fix unsafe if it deletes comments
(`UP004`,`UP050`)
([#​18393](https://redirect.github.com/astral-sh/ruff/pull/18393),
[#​18390](https://redirect.github.com/astral-sh/ruff/pull/18390))
##### Rule changes
- \[`fastapi`] Avoid false positive for class dependencies (`FAST003`)
([#​18271](https://redirect.github.com/astral-sh/ruff/pull/18271))
##### Documentation
- Update editor setup docs for Neovim and Vim
([#​18324](https://redirect.github.com/astral-sh/ruff/pull/18324))
##### Other changes
- Support Python 3.14 template strings (t-strings) in formatter and
parser
([#​17851](https://redirect.github.com/astral-sh/ruff/pull/17851))
###
[`v0.11.12`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#01112)
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.11.11...0.11.12)
##### Preview features
- \[`airflow`] Revise fix titles (`AIR3`)
([#​18215](https://redirect.github.com/astral-sh/ruff/pull/18215))
- \[`pylint`] Implement `missing-maxsplit-arg` (`PLC0207`)
([#​17454](https://redirect.github.com/astral-sh/ruff/pull/17454))
- \[`pyupgrade`] New rule `UP050` (`useless-class-metaclass-type`)
([#​18334](https://redirect.github.com/astral-sh/ruff/pull/18334))
- \[`flake8-use-pathlib`] Replace `os.symlink` with `Path.symlink_to`
(`PTH211`)
([#​18337](https://redirect.github.com/astral-sh/ruff/pull/18337))
##### Bug fixes
- \[`flake8-bugbear`] Ignore `__debug__` attribute in `B010`
([#​18357](https://redirect.github.com/astral-sh/ruff/pull/18357))
- \[`flake8-async`] Fix `anyio.sleep` argument name (`ASYNC115`,
`ASYNC116`)
([#​18262](https://redirect.github.com/astral-sh/ruff/pull/18262))
- \[`refurb`] Fix `FURB129` autofix generating invalid syntax
([#​18235](https://redirect.github.com/astral-sh/ruff/pull/18235))
##### Rule changes
- \[`flake8-implicit-str-concat`] Add autofix for `ISC003`
([#​18256](https://redirect.github.com/astral-sh/ruff/pull/18256))
- \[`pycodestyle`] Improve the diagnostic message for `E712`
([#​18328](https://redirect.github.com/astral-sh/ruff/pull/18328))
- \[`flake8-2020`] Fix diagnostic message for `!=` comparisons
(`YTT201`)
([#​18293](https://redirect.github.com/astral-sh/ruff/pull/18293))
- \[`pyupgrade`] Make fix unsafe if it deletes comments (`UP010`)
([#​18291](https://redirect.github.com/astral-sh/ruff/pull/18291))
##### Documentation
- Simplify rules table to improve readability
([#​18297](https://redirect.github.com/astral-sh/ruff/pull/18297))
- Update editor integrations link in README
([#​17977](https://redirect.github.com/astral-sh/ruff/pull/17977))
- \[`flake8-bugbear`] Add fix safety section (`B006`)
([#​17652](https://redirect.github.com/astral-sh/ruff/pull/17652))
###
[`v0.11.11`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#01111)
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.11.10...0.11.11)
##### Preview features
- \[`airflow`] Add autofixes for `AIR302` and `AIR312`
([#​17942](https://redirect.github.com/astral-sh/ruff/pull/17942))
- \[`airflow`] Move rules from `AIR312` to `AIR302`
([#​17940](https://redirect.github.com/astral-sh/ruff/pull/17940))
- \[`airflow`] Update `AIR301` and `AIR311` with the latest Airflow
implementations
([#​17985](https://redirect.github.com/astral-sh/ruff/pull/17985))
- \[`flake8-simplify`] Enable fix in preview mode (`SIM117`)
([#​18208](https://redirect.github.com/astral-sh/ruff/pull/18208))
##### Bug fixes
- Fix inconsistent formatting of match-case on `[]` and `_`
([#​18147](https://redirect.github.com/astral-sh/ruff/pull/18147))
- \[`pylint`] Fix `PLW1514` not recognizing the `encoding` positional
argument of `codecs.open`
([#​18109](https://redirect.github.com/astral-sh/ruff/pull/18109))
##### CLI
- Add full option name in formatter warning
([#​18217](https://redirect.github.com/astral-sh/ruff/pull/18217))
##### Documentation
- Fix rendering of admonition in docs
([#​18163](https://redirect.github.com/astral-sh/ruff/pull/18163))
- \[`flake8-print`] Improve print/pprint docs for `T201` and `T203`
([#​18130](https://redirect.github.com/astral-sh/ruff/pull/18130))
- \[`flake8-simplify`] Add fix safety section (`SIM110`,`SIM210`)
([#​18114](https://redirect.github.com/astral-sh/ruff/pull/18114),[#​18100](https://redirect.github.com/astral-sh/ruff/pull/18100))
- \[`pylint`] Fix docs example that produced different output
(`PLW0603`)
([#​18216](https://redirect.github.com/astral-sh/ruff/pull/18216))
###
[`v0.11.10`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#01110)
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.11.9...0.11.10)
##### Preview features
- \[`ruff`] Implement a recursive check for `RUF060`
([#​17976](https://redirect.github.com/astral-sh/ruff/pull/17976))
- \[`airflow`] Enable autofixes for `AIR301` and `AIR311`
([#​17941](https://redirect.github.com/astral-sh/ruff/pull/17941))
- \[`airflow`] Apply try catch guard to all `AIR3` rules
([#​17887](https://redirect.github.com/astral-sh/ruff/pull/17887))
- \[`airflow`] Extend `AIR311` rules
([#​17913](https://redirect.github.com/astral-sh/ruff/pull/17913))
##### Bug fixes
- \[`flake8-bugbear`] Ignore `B028` if `skip_file_prefixes` is present
([#​18047](https://redirect.github.com/astral-sh/ruff/pull/18047))
- \[`flake8-pie`] Mark autofix for `PIE804` as unsafe if the dictionary
contains comments
([#​18046](https://redirect.github.com/astral-sh/ruff/pull/18046))
- \[`flake8-simplify`] Correct behavior for `str.split`/`rsplit` with
`maxsplit=0` (`SIM905`)
([#​18075](https://redirect.github.com/astral-sh/ruff/pull/18075))
- \[`flake8-simplify`] Fix `SIM905` autofix for `rsplit` creating a
reversed list literal
([#​18045](https://redirect.github.com/astral-sh/ruff/pull/18045))
- \[`flake8-use-pathlib`] Suppress diagnostics for all `os.*` functions
that have the `dir_fd` parameter (`PTH`)
([#​17968](https://redirect.github.com/astral-sh/ruff/pull/17968))
- \[`refurb`] Mark autofix as safe only for number literals (`FURB116`)
([#​17692](https://redirect.github.com/astral-sh/ruff/pull/17692))
##### Rule changes
- \[`flake8-bandit`] Skip `S608` for expressionless f-strings
([#​17999](https://redirect.github.com/astral-sh/ruff/pull/17999))
- \[`flake8-pytest-style`] Don't recommend `usefixtures` for
`parametrize` values (`PT019`)
([#​17650](https://redirect.github.com/astral-sh/ruff/pull/17650))
- \[`pyupgrade`] Add `resource.error` as deprecated alias of `OSError`
(`UP024`)
([#​17933](https://redirect.github.com/astral-sh/ruff/pull/17933))
##### CLI
- Disable jemalloc on Android
([#​18033](https://redirect.github.com/astral-sh/ruff/pull/18033))
##### Documentation
- Update Neovim setup docs
([#​18108](https://redirect.github.com/astral-sh/ruff/pull/18108))
- \[`flake8-simplify`] Add fix safety section (`SIM103`)
([#​18086](https://redirect.github.com/astral-sh/ruff/pull/18086))
- \[`flake8-simplify`] Add fix safety section (`SIM112`)
([#​18099](https://redirect.github.com/astral-sh/ruff/pull/18099))
- \[`pylint`] Add fix safety section (`PLC0414`)
([#​17802](https://redirect.github.com/astral-sh/ruff/pull/17802))
- \[`pylint`] Add fix safety section (`PLE4703`)
([#​17824](https://redirect.github.com/astral-sh/ruff/pull/17824))
- \[`pylint`] Add fix safety section (`PLW1514`)
([#​17932](https://redirect.github.com/astral-sh/ruff/pull/17932))
- \[`pylint`] Add fix safety section (`PLW3301`)
([#​17878](https://redirect.github.com/astral-sh/ruff/pull/17878))
- \[`ruff`] Add fix safety section (`RUF007`)
([#​17755](https://redirect.github.com/astral-sh/ruff/pull/17755))
- \[`ruff`] Add fix safety section (`RUF033`)
([#​17760](https://redirect.github.com/astral-sh/ruff/pull/17760))
###
[`v0.11.9`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0119)
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.11.8...0.11.9)
##### Preview features
- Default to latest supported Python version for version-related syntax
errors
([#​17529](https://redirect.github.com/astral-sh/ruff/pull/17529))
- Implement deferred annotations for Python 3.14
([#​17658](https://redirect.github.com/astral-sh/ruff/pull/17658))
- \[`airflow`] Fix `SQLTableCheckOperator` typo (`AIR302`)
([#​17946](https://redirect.github.com/astral-sh/ruff/pull/17946))
- \[`airflow`] Remove
`airflow.utils.dag_parsing_context.get_parsing_context` (`AIR301`)
([#​17852](https://redirect.github.com/astral-sh/ruff/pull/17852))
- \[`airflow`] Skip attribute check in try catch block (`AIR301`)
([#​17790](https://redirect.github.com/astral-sh/ruff/pull/17790))
- \[`flake8-bandit`] Mark tuples of string literals as trusted input in
`S603`
([#​17801](https://redirect.github.com/astral-sh/ruff/pull/17801))
- \[`isort`] Check full module path against project root(s) when
categorizing first-party imports
([#​16565](https://redirect.github.com/astral-sh/ruff/pull/16565))
- \[`ruff`] Add new rule `in-empty-collection` (`RUF060`)
([#​16480](https://redirect.github.com/astral-sh/ruff/pull/16480))
##### Bug fixes
- Fix missing `combine` call for `lint.typing-extensions` setting
([#​17823](https://redirect.github.com/astral-sh/ruff/pull/17823))
- \[`flake8-async`] Fix module name in `ASYNC110`, `ASYNC115`, and
`ASYNC116` fixes
([#​17774](https://redirect.github.com/astral-sh/ruff/pull/17774))
- \[`pyupgrade`] Add spaces between tokens as necessary to avoid syntax
errors in `UP018` autofix
([#​17648](https://redirect.github.com/astral-sh/ruff/pull/17648))
- \[`refurb`] Fix false positive for float and complex numbers in
`FURB116`
([#​17661](https://redirect.github.com/astral-sh/ruff/pull/17661))
- \[parser] Flag single unparenthesized generator expr with trailing
comma in arguments.
([#​17893](https://redirect.github.com/astral-sh/ruff/pull/17893))
##### Documentation
- Add instructions on how to upgrade to a newer Rust version
([#​17928](https://redirect.github.com/astral-sh/ruff/pull/17928))
- Update code of conduct email address
([#​17875](https://redirect.github.com/astral-sh/ruff/pull/17875))
- Add fix safety sections to `PLC2801`, `PLR1722`, and `RUF013`
([#​17825](https://redirect.github.com/astral-sh/ruff/pull/17825),
[#​17826](https://redirect.github.com/astral-sh/ruff/pull/17826),
[#​17759](https://redirect.github.com/astral-sh/ruff/pull/17759))
- Add link to `check-typed-exception` from `S110` and `S112`
([#​17786](https://redirect.github.com/astral-sh/ruff/pull/17786))
##### Other changes
- Allow passing a virtual environment to `ruff analyze graph`
([#​17743](https://redirect.github.com/astral-sh/ruff/pull/17743))
###
[`v0.11.8`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0118)
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.11.7...0.11.8)
##### Preview features
- \[`airflow`] Apply auto fixes to cases where the names have changed in
Airflow 3 (`AIR302`, `AIR311`)
([#​17553](https://redirect.github.com/astral-sh/ruff/pull/17553),
[#​17570](https://redirect.github.com/astral-sh/ruff/pull/17570),
[#​17571](https://redirect.github.com/astral-sh/ruff/pull/17571))
- \[`airflow`] Extend `AIR301` rule
([#​17598](https://redirect.github.com/astral-sh/ruff/pull/17598))
- \[`airflow`] Update existing `AIR302` rules with better suggestions
([#​17542](https://redirect.github.com/astral-sh/ruff/pull/17542))
- \[`refurb`] Mark fix as safe for `readlines-in-for` (`FURB129`)
([#​17644](https://redirect.github.com/astral-sh/ruff/pull/17644))
- \[syntax-errors] `nonlocal` declaration at module level
([#​17559](https://redirect.github.com/astral-sh/ruff/pull/17559))
- \[syntax-errors] Detect single starred expression assignment `x = *y`
([#​17624](https://redirect.github.com/astral-sh/ruff/pull/17624))
##### Bug fixes
- \[`flake8-pyi`] Ensure `Literal[None,] | Literal[None,]` is not
autofixed to `None | None` (`PYI061`)
([#​17659](https://redirect.github.com/astral-sh/ruff/pull/17659))
- \[`flake8-use-pathlib`] Avoid suggesting `Path.iterdir()` for
`os.listdir` with file descriptor (`PTH208`)
([#​17715](https://redirect.github.com/astral-sh/ruff/pull/17715))
- \[`flake8-use-pathlib`] Fix `PTH104` false positive when `rename` is
passed a file descriptor
([#​17712](https://redirect.github.com/astral-sh/ruff/pull/17712))
- \[`flake8-use-pathlib`] Fix `PTH116` false positive when `stat` is
passed a file descriptor
([#​17709](https://redirect.github.com/astral-sh/ruff/pull/17709))
- \[`flake8-use-pathlib`] Fix `PTH123` false positive when `open` is
passed a file descriptor from a function call
([#​17705](https://redirect.github.com/astral-sh/ruff/pull/17705))
- \[`pycodestyle`] Fix duplicated diagnostic in `E712`
([#​17651](https://redirect.github.com/astral-sh/ruff/pull/17651))
- \[`pylint`] Detect `global` declarations in module scope (`PLE0118`)
([#​17411](https://redirect.github.com/astral-sh/ruff/pull/17411))
- \[syntax-errors] Make `async-comprehension-in-sync-comprehension` more
specific
([#​17460](https://redirect.github.com/astral-sh/ruff/pull/17460))
##### Configuration
- Add option to disable `typing_extensions` imports
([#​17611](https://redirect.github.com/astral-sh/ruff/pull/17611))
##### Documentation
- Fix example syntax for the `lint.pydocstyle.ignore-var-parameters`
option
([#​17740](https://redirect.github.com/astral-sh/ruff/pull/17740))
- Add fix safety sections (`ASYNC116`, `FLY002`, `D200`, `RUF005`,
`RUF017`, `RUF027`, `RUF028`, `RUF057`)
([#​17497](https://redirect.github.com/astral-sh/ruff/pull/17497),
[#​17496](https://redirect.github.com/astral-sh/ruff/pull/17496),
[#​17502](https://redirect.github.com/astral-sh/ruff/pull/17502),
[#​17484](https://redirect.github.com/astral-sh/ruff/pull/17484),
[#​17480](https://redirect.github.com/astral-sh/ruff/pull/17480),
[#​17485](https://redirect.github.com/astral-sh/ruff/pull/17485),
[#​17722](https://redirect.github.com/astral-sh/ruff/pull/17722),
[#​17483](https://redirect.github.com/astral-sh/ruff/pull/17483))
##### Other changes
- Add Python 3.14 to configuration options
([#​17647](https://redirect.github.com/astral-sh/ruff/pull/17647))
- Make syntax error for unparenthesized except tuples version specific
to before 3.14
([#​17660](https://redirect.github.com/astral-sh/ruff/pull/17660))
###
[`v0.11.7`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0117)
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.11.6...0.11.7)
##### Preview features
- \[`airflow`] Apply auto fixes to cases where the names have changed in
Airflow 3 (`AIR301`)
([#​17355](https://redirect.github.com/astral-sh/ruff/pull/17355))
- \[`perflint`] Implement fix for `manual-dict-comprehension`
(`PERF403`)
([#​16719](https://redirect.github.com/astral-sh/ruff/pull/16719))
- \[syntax-errors] Make duplicate parameter names a semantic error
([#​17131](https://redirect.github.com/astral-sh/ruff/pull/17131))
##### Bug fixes
- \[`airflow`] Fix typos in provider package names (`AIR302`, `AIR312`)
([#​17574](https://redirect.github.com/astral-sh/ruff/pull/17574))
- \[`flake8-type-checking`] Visit keyword arguments in checks involving
`typing.cast`/`typing.NewType` arguments
([#​17538](https://redirect.github.com/astral-sh/ruff/pull/17538))
- \[`pyupgrade`] Preserve parenthesis when fixing native literals
containing newlines (`UP018`)
([#​17220](https://redirect.github.com/astral-sh/ruff/pull/17220))
- \[`refurb`] Mark the `FURB161` fix unsafe except for integers and
booleans
([#​17240](https://redirect.github.com/astral-sh/ruff/pull/17240))
##### Rule changes
- \[`perflint`] Allow list function calls to be replaced with a
comprehension (`PERF401`)
([#​17519](https://redirect.github.com/astral-sh/ruff/pull/17519))
- \[`pycodestyle`] Auto-fix redundant boolean comparison (`E712`)
([#​17090](https://redirect.github.com/astral-sh/ruff/pull/17090))
- \[`pylint`] make fix unsafe if delete comments (`PLR1730`)
([#​17459](https://redirect.github.com/astral-sh/ruff/pull/17459))
##### Documentation
- Add fix safety sections to docs for several rules
([#​17410](https://redirect.github.com/astral-sh/ruff/pull/17410),[#​17440](https://redirect.github.com/astral-sh/ruff/pull/17440),[#​17441](https://redirect.github.com/astral-sh/ruff/pull/17441),[#​17443](https://redirect.github.com/astral-sh/ruff/pull/17443),[#​17444](https://redirect.github.com/astral-sh/ruff/pull/17444))
###
[`v0.11.6`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0116)
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.11.5...0.11.6)
##### Preview features
- Avoid adding whitespace to the end of a docstring after an escaped
quote
([#​17216](https://redirect.github.com/astral-sh/ruff/pull/17216))
- \[`airflow`] Extract `AIR311` from `AIR301` rules (`AIR301`, `AIR311`)
([#​17310](https://redirect.github.com/astral-sh/ruff/pull/17310),
[#​17422](https://redirect.github.com/astral-sh/ruff/pull/17422))
##### Bug fixes
- Raise syntax error when `\` is at end of file
([#​17409](https://redirect.github.com/astral-sh/ruff/pull/17409))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
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](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/ackama/drupal-advisory-database).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC41MC4wIiwidXBkYXRlZEluVmVyIjoiNDAuNTAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>1 parent 0fa7430 commit 09347c6
2 files changed
Lines changed: 95 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments