Update config.py by tanaydin · Pull Request #1754 · nedbat/coveragepy (original) (raw)
This PR contains the following updates:
| Package | Type | Update | Change | Age | Adoption | Passing |
Confidence |
|---|---|---|---|---|---|---|---|
|
astral-sh/ruff-pre-commit
| repository | minor | v0.2.1
-> v0.3.3
|
|
|
|
|
| docs/MarkDown
(changelog) |
project.optional-dependencies | minor |
==3.5.2
-> ==3.6
|
|
|
|
|
| docs/mkdocs-material
| project.optional-dependencies | patch |
==9.5.8
-> ==9.5.13
|
|
|
|
|
| docs/mkdocstrings
(changelog) |
project.optional-dependencies | patch |
==0.24.0
-> ==0.24.1
|
|
|
|
|
| docs/mkdocstrings-python
(changelog) |
project.optional-dependencies | minor |
==1.8.0
-> ==1.9.0
|
|
|
|
|
| misc-lint/ruff
(source,
changelog)
| project.optional-dependencies | minor |
==0.2.1
-> ==0.3.3
|
|
|
|
|
| pytest/coverage |
project.optional-dependencies | patch |
==7.4.1
-> ==7.4.4
|
|
|
|
|
| pytest/pytest
(changelog) |
project.optional-dependencies | minor |
==8.0.0
-> ==8.1.1
|
|
|
|
|
|
pytest/pytest-asyncio
(changelog)
| project.optional-dependencies | patch |
==0.23.5
-> ==0.23.5.post1
|
|
|
|
|
|
pytest/pytest-subtests
| project.optional-dependencies | minor |
==0.11.0
-> ==0.12.1
|
|
|
|
|
| typecheck/mypy
(source,
changelog) |
project.optional-dependencies | minor |
==1.8.0
-> ==1.9.0
|
|
|
|
|
| typecheck/types-Markdown
(changelog)
| project.optional-dependencies | minor |
==3.5.0.20240129
->
==3.6.0.20240316
|
|
|
|
|
| typecheck/types-beautifulsoup4
(changelog)
| project.optional-dependencies | patch |
==4.12.0.20240106
->
==4.12.0.20240229
|
|
|
|
|
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
astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit)
See: https://github.com/astral-sh/ruff/releases/tag/v0.3.2
See: https://github.com/astral-sh/ruff/releases/tag/v0.3.1
See: https://github.com/astral-sh/ruff/releases/tag/v0.3.0
squidfunk/mkdocs-material (docs/mkdocs-material)
v9.5.13
:
mkdocs-material-9.5.13
- Updated Slovak translations
- Improved info plugin interop with projects plugin
- Improved info plugin inclusion/exclusion logic
- Fixed info plugin not gathering files recursively
- Fixed #6750: Ensure info plugin packs up all necessary files
Thanks to @kamilkrzyskow and @scepka for their contributions
v9.5.12
:
mkdocs-material-9.5.12
- Fixed #6846: Some meta tags removed on instant navigation (9.4.2 regression)
- Fixed #6823: KaTex not rendering on instant navigation (9.5.5 regression)
- Fixed #6821: Privacy plugin doesn't handle URLs with encoded characters
v9.5.11
:
mkdocs-material-9.5.11
- Updated Finnish translation
v9.5.10
:
mkdocs-material-9.5.10
- Updated Bahasa Malaysia translations
- Fixed #6783: Hide continue reading link for blog posts without separators
- Fixed #6779: Incorrect positioning of integrated table of contents
v9.5.9
:
mkdocs-material-9.5.9
- Fixed navigation pruning with tabs and sections enabled
mkdocstrings/mkdocstrings (docs/mkdocstrings)
Code Refactoring
- Support new pymdownx-highlight options (a7a2907 by Timothée Mazzucotelli).
- Backup anchors with id and no href, for compatibility with autorefs' Markdown anchors (b5236b4 by Timothée Mazzucotelli). PR-#651, Related-to-mkdocs-autorefs#39, Co-authored-by: Oleh Prypin oleh@pryp.in
mkdocstrings/python (docs/mkdocstrings-python)
Dependencies
- Add upper bound on Python-Markdown 3.6 to temporarily prevent breaking changes (cd93ee3 by Timothée Mazzucotelli).
Features
- Add
show_labels
option to show/hide labels (eaf9b82 by Viicos). [Issue
#120](https://togithub.com/mkdocstrings/python/issues/120), PR #130
- Add option to search for stubs packages (0c6aa32 by Romain). [PR
#128](https://togithub.com/mkdocstrings/python/pull/128), PR griffe#221: : https://github.com/mkdocstrings/griffe/pull/221
Code Refactoring
- Mark all Jinja blocks as scoped (548bdad by Timothée Mazzucotelli).
astral-sh/ruff (misc-lint/ruff)
Preview features
- [
flake8-bandit
]: ImplementS610
rule (#10316) - [
pycodestyle
] Implementblank-line-at-end-of-file
(W391
) (#10243) - [
pycodestyle
] Implementredundant-backslash
(E502
) (#10292) - [
pylint
] - implementredeclared-assigned-name
(W0128
) (#9268)
Rule changes
- [
flake8_comprehensions
] Handled special case forC400
which also matchesC416
(#10419) - [
flake8-bandit
] Implement upstream updates forS311
,S324
andS605
(#10313) - [
pyflakes
] RemoveF401
fix for__init__
imports by default and allow opt-in to unsafe fix (#10365) - [
pylint
] Implementinvalid-bool-return-type
(E304
) (#10377) - [
pylint
] Include builtin warnings in useless-exception-statement (PLW0133
) (#10394)
CLI
- Add message on success to
ruff check
(#8631)
Bug fixes
- [
PIE970
] Allow trailing ellipsis intyping.TYPE_CHECKING
(#10413) - Avoid
TRIO115
if the argument is a variable (#10376) - [
F811
] Avoid removing shadowed imports that point to different symbols (#10387) - Fix
F821
andF822
false positives in.pyi
files (#10341) - Fix
F821
false negatives in.py
files whenfrom __future__ import annotations
is active (#10362) - Fix case where
Indexer
fails to identify continuation preceded by newline #10351 (#10354) - Sort hash maps in
Settings
display (#10370) - Track conditional deletions in the semantic model (#10415)
- [
C413
] Wrap expressions in parentheses when negating (#10346) - [
pycodestyle
] Do not ignore lines before the first logical line in blank lines rules. (#10382) - [
pycodestyle
] Do not triggerE225
andE275
when the next token is a ')' (#10315) - [
pylint
] Avoid false-positive slot non-assignment for__dict__
(PLE0237
) (#10348) - Gate f-string struct size test for Rustc < 1.76 (#10371)
Documentation
- Use
ruff.toml
format in README (#10393) - [
RUF008
] Make it clearer that a mutable default in a dataclass is only valid if it is typed as a ClassVar (#10395) - [
pylint
] Extend docs and test ininvalid-str-return-type
(E307
) (#10400) - Remove
.
fromcheck
andformat
commands (#10217)
Preview features
- Improve single-
with
item formatting for Python 3.8 or older (#10276)
Rule changes
- [
pyupgrade
] Allow fixes for f-string rule regardless of line length (UP032
) (#10263) - [
pycodestyle
] Include actual conditions in E712 diagnostics (#10254)
Bug fixes
- Fix trailing kwargs end of line comment after slash (#10297)
- Fix unstable
with
items formatting (#10274) - Avoid repeating function calls in f-string conversions (#10265)
- Fix E203 false positive for slices in format strings (#10280)
- Fix incorrect
Parameter
range for*args
and**kwargs
(#10283) - Treat
typing.Annotated
subscripts as type definitions (#10285)
Preview features
- [
pycodestyle
] Fix E301 not triggering on decorated methods. (#10117) - [
pycodestyle
] Respectisort
settings in blank line rules (E3*
) (#10096) - [
pycodestyle
] Make blank lines in typing stub files optional (E3*
) (#10098) - [
pylint
] Implementsingledispatch-method
(E1519
) (#10140) - [
pylint
] Implementuseless-exception-statement
(W0133
) (#10176)
Rule changes
- [
flake8-debugger
] Check for use ofdebugpy
andptvsd
debug modules (#10177)
(#10194)
- [
pyupgrade
] Generate diagnostic for all valid f-string conversions regardless of line length (UP032
) (#10238) - [
pep8_naming
] Add fixes forN804
andN805
(#10215)
CLI
- Colorize the output of
ruff format --diff
(#10110) - Make
--config
and--isolated
global flags (#10150) - Correctly expand tildes and environment variables in paths passed to
--config
(#10219)
Configuration
- Accept a PEP 440 version specifier for
required-version
(#10216) - Implement isort's
default-section
setting (#10149)
Bug fixes
- Remove trailing space from
CapWords
message (#10220) - Respect external codes in file-level exemptions (#10203)
- [
flake8-raise
] Avoid false-positives for parens-on-raise withfuture.exception()
(RSE102
) (#10206) - [
pylint
] Add fix for unary expressions inPLC2801
(#9587) - [
ruff
] Fix RUF028 not allowing# fmt: skip
on match cases (#10178)
This release introduces the new Ruff formatter 2024.2 style and adds a new lint rule to detect invalid formatter suppression comments.
Preview features
- [
flake8-bandit
] Remove suspicious-lxml-import (S410
) (#10154) - [
pycodestyle
] Allowos.environ
modifications between imports (E402
) (#10066) - [
pycodestyle
] Don't warn about a single whitespace character before a comma in a tuple (E203
) (#10094)
Rule changes
- [
eradicate
] Detect commented outcase
statements (ERA001
) (#10055) - [
eradicate
] Detect single-line code fortry:
,except:
, etc. (ERA001
) (#10057) - [
flake8-boolean-trap
] Allow boolean positionals in__post_init__
(#10027) - [
flake8-copyright
] Allow © in copyright notices (#10065) - [
isort
]: Use one blank line after imports in typing stub files (#9971) - [
pylint
] New Ruledict-iter-missing-items
(PLE1141
) (#9845) - [
pylint
] Ignoresys.version
andsys.platform
(PLR1714
) (#10054) - [
pyupgrade
] Detect literals with unary operators (UP018
) (#10060) - [
ruff
] Expand rule forlist(iterable).pop(0)
idiom (RUF015
) (#10148)
Formatter
This release introduces the Ruff 2024.2 style, stabilizing the following changes:
- Prefer splitting the assignment's value over the target or type annotation (#8943)
- Remove blank lines before class docstrings (#9154)
- Wrap multiple context managers in
with
parentheses when targeting Python 3.9 or newer (#9222) - Add a blank line after nested classes with a dummy body (
...
) in typing stub files (#9155) - Reduce vertical spacing for classes and functions with a dummy (
...
) body (#7440, #9240) - Add a blank line after the module docstring (#8283)
- Parenthesize long type hints in assignments (#9210)
- Preserve indent for single multiline-string call-expressions (#9673)
- Normalize hex escape and unicode escape sequences (#9280)
- Format module docstrings (#9725)
CLI
- Explicitly disallow
extend
as part of a--config
flag (#10135) - Remove
build
from the default exclusion list (#10093) - Deprecate
ruff <path>
,ruff --explain
,ruff --clean
, andruff --generate-shell-completion
in favor ofruff check <path>
,ruff rule
,ruff clean
, andruff generate-shell-completion
(#10169) - Remove the deprecated CLI option
--format
fromruff rule
andruff linter
(#10170)
Bug fixes
- [
flake8-bugbear
] Avoid adding default initializers to stubs (B006
) (#10152) - [
flake8-type-checking
] Respect runtime-required decorators for function signatures (#10091) - [
pycodestyle
] Mark fixes overlapping with a multiline string as unsafe (W293
) (#10049) - [
pydocstyle
] Trim whitespace when removing blank lines after section (D413
) (#10162) - [
pylint
] Delete entire statement, including semicolons (PLR0203
) (#10074) - [
ruff
] Avoid f-string false positives ingettext
calls (RUF027
) (#10118) - Fix
ruff
crashing on PowerPC systems because of too small page size (#10080)
Performance
- Add cold attribute to less likely printer queue branches in the formatter (#10121)
- Skip unnecessary string normalization in the formatter (#10116)
Documentation
- Remove "Beta" Label from formatter documentation (#10144)
line-length
option: fix link topycodestyle.max-line-length
(#10136)
Highlights include:
- Initial support formatting f-strings (in
--preview
). - Support for overriding arbitrary configuration options via the CLI
through an expanded
--config
argument (e.g.,--config "lint.isort.combine-as-imports=false"
). - Significant performance improvements in Ruff's lexer, parser, and lint rules.
Preview features
- Implement minimal f-string formatting (#9642)
- [
pycodestyle
] Add blank line(s) rules (E301
,E302
,E303
,E304
,E305
,E306
) (#9266) - [
refurb
] Implementreadlines_in_for
(FURB129
) (#9880)
Rule changes
- [
ruff
] Ensure closing parentheses for multiline sequences are always on their own line (RUF022
,RUF023
) (#9793) - [
numpy
] Add missing deprecation violations (NPY002
) (#9862) - [
flake8-bandit
] Detectmark_safe
usages in decorators (#9887) - [
ruff
] Expandasyncio-dangling-task
(RUF006
) to includenew_event_loop
(#9976) - [
flake8-pyi
] Ignore 'unused' private type dicts in class scopes (#9952)
Formatter
- Docstring formatting: Preserve tab indentation when using
indent-style=tabs
(#9915) - Disable top-level docstring formatting for notebooks (#9957)
- Stabilize quote-style's
preserve
mode (#9922)
CLI
- Allow arbitrary configuration options to be overridden via the CLI (#9599)
Bug fixes
- Make
show-settings
filters directory-agnostic (#9866) - Respect duplicates when rewriting type aliases (#9905)
- Respect tuple assignments in typing analyzer (#9969)
- Use atomic write when persisting cache (#9981)
- Use non-parenthesized range for
DebugText
(#9953) - [
flake8-simplify
] Avoid false positive withasync
for loops (SIM113
) (#9996) - [
flake8-trio
] Respectasync with
intimeout-without-await
(#9859) - [
perflint
] Catch a wider range of mutations inPERF101
(#9955) - [
pycodestyle
] FixE30X
panics on blank lines with trailing white spaces (#9907) - [
pydocstyle
] Allow usingparameters
as a subsection header (D405
) (#9894) - [
pydocstyle
] Fix blank-line docstring rules for module-level docstrings (#9878) - [
pylint
] Accept 0.0 and 1.0 as common magic values (PLR2004
) (#9964) - [
pylint
] Avoid suggesting set rewrites for non-hashable types (#9956) - [
ruff
] Avoid false negatives with string literals inside of method calls (RUF027
) (#9865) - [
ruff
] Fix panic on with f-string detection (RUF027
) (#9990) - [
ruff
] Ignore builtins when detecting missing f-strings (#9849)
Performance
- Use
memchr
for string lexing (#9888) - Use
memchr
for tab-indentation detection (#9853) - Reduce
Result<Tok, LexicalError>
size by usingBox<str>
instead ofString
(#9885) - Reduce size of
Expr
from 80 to 64 bytes (#9900) - Improve trailing comma rule performance (#9867)
- Remove unnecessary string cloning from the parser (#9884)
nedbat/coveragepy (pytest/coverage)
Fix: in some cases, even with
[run] relative_files=True
, a data file could be created with absolute path names. When combined with other relative data files, it was random whether the absolute file names would be made relative or not. If they weren't, then a file would be listed twice in reports, as detailed inissue 1752
_. This is now fixed: absolute file names are always made relative when combining. Thanks to Bruno Rodrigues dos Santos for support.Fix: the last case of a match/case statement had an incorrect message if the branch was missed. It said the pattern never matched, when actually the branch is missed if the last case always matched.
Fix: clicking a line number in the HTML report now positions more accurately.
Fix: the
report:format
setting was defined as a boolean, but should be a string. Thanks,Tanaydin Sirin <pull 1754_>
_. It is also now documented on the :ref:configuration page <config_report_format>
.
.. _issue 1752:https://github.com/nedbat/coveragepy/issues/17522 .. _pull 1754https://github.com/nedbat/coveragepy/pull/175454
.. _changes_7-4-3:
- Fix: in some cases, coverage could fail with a RuntimeError: "Set
changed
size during iteration." This is now fixed, closing
issue 1733
_.
.. _issue 1733:https://github.com/nedbat/coveragepy/issues/17333
.. _changes_7-4-2:
- Fix: setting
COVERAGE_CORE=sysmon
no longer errors on 3.11 and lower, thanksHugo van Kemenade <pull 1747_>
_. It now issues a warning that sys.monitoring is not available and falls back to the default core instead.
.. _pull 1747:https://github.com/nedbat/coveragepy/pull/17477
.. _changes_7-4-1:
pytest-dev/pytest (pytest/pytest)
pytest 8.1.1 (2024-03-08)
::: {.note} ::: {.title} Note :::
This release is not a usual bug fix release -- it contains features and
improvements, being a follow up
to 8.1.0
, which has been yanked from PyPI.
:::
Features
- #11475:
Added the new
consider_namespace_packages
{.interpreted-text role="confval"} configuration option, defaulting toFalse
.
If set to True
, pytest will attempt to identify modules that are part
of namespace
packages
when importing modules.
- #11653:
Added the new
verbosity_test_cases
{.interpreted-text role="confval"} configuration option for fine-grained control of test execution verbosity. SeeFine-grained verbosity <pytest.fine_grained_verbosity>
{.interpreted-text role="ref"} for more details.
Improvements
- #10865:
pytest.warns
{.interpreted-text role="func"} now validates thatwarnings.warn
{.interpreted-text role="func"} was called with a [str]{.title-ref} or a [Warning]{.title-ref}. Currently in Python it is possible to use other types, however this causes an exception whenwarnings.filterwarnings
{.interpreted-text role="func"} is used to filter those warnings (see [CPython
#103577](https://togithub.com/python/cpython/issues/103577) for a discussion). While this can be considered a bug in CPython, we decided to put guards in pytest as the error message produced without this check in place is confusing.
- #11311:
When using
--override-ini
for paths in invocations without a configuration file defined, the current working directory is used as the relative directory.
Previoulsy this would raise an AssertionError
{.interpreted-text
role="class"}.
- #11475:
--import-mode=importlib <import-mode-importlib>
{.interpreted-text role="ref"} now tries to import modules using the standard import mechanism (but still without changing :pysys.path
{.interpreted-text role="data"}), falling back to importing modules directly only if that fails.
This means that installed packages will be imported under their
canonical name if possible first, for example app.core.models
, instead
of having the module name always be derived from their path (for example
.env310.lib.site_packages.app.core.models
).
#11801: Added the
iter_parents() <_pytest.nodes.Node.iter_parents>
{.interpreted-text role="func"} helper method on nodes. It is similar tolistchain <_pytest.nodes.Node.listchain>
{.interpreted-text role="func"}, but goes from bottom to top, and returns an iterator, not a list.#11850: Added support for
sys.last_exc
{.interpreted-text role="data"} for post-mortem debugging on Python>=3.12.#11962: In case no other suitable candidates for configuration file are found, a
pyproject.toml
(even without a[tool.pytest.ini_options]
table) will be considered as the configuration file and define therootdir
.#11978: Add
--log-file-mode
option to the logging plugin, enabling appending to log-files. This option accepts either"w"
or"a"
and defaults to"w"
.
Previously, the mode was hard-coded to be "w"
which truncates the file
before logging.
- #12047: When multiple finalizers of a fixture raise an exception, now all exceptions are reported as an exception group. Previously, only the first exception was reported.
Bug Fixes
#11475: Fixed regression where
--importmode=importlib
would import non-test modules more than once.#11904: Fixed a regression in pytest 8.0.0 that would cause test collection to fail due to permission errors when using
--pyargs
.
This change improves the collection tree for tests specified using
--pyargs
, see 12043
{.interpreted-text role="pull"} for a comparison
with pytest 8.0 and <8.
#12011: Fixed a regression in 8.0.1 whereby
setup_module
xunit-style fixtures are not executed when--doctest-modules
is passed.#12014: Fix the
stacklevel
used when warning about marks used on fixtures.#12039: Fixed a regression in
8.0.2
where tests created usingtmp_path
{.interpreted-text role="fixture"} have been collected multiple times in CI under Windows.
Improved Documentation
- #11790:
Documented the retention of temporary directories created using the
tmp_path
fixture in more detail.
Trivial/Internal Changes
#11785: Some changes were made to private functions which may affect plugins which access them:
FixtureManager._getautousenames()
now takes aNode
itself instead of the nodeid.FixtureManager.getfixturedefs()
now takes theNode
itself instead of the nodeid.The
_pytest.nodes.iterparentnodeids()
function is removed without replacement. Prefer to traverse the node hierarchy itself instead.
If you really need to, copy the function from the previous pytest release.
#12069: Delayed the deprecation of the following features to
9.0.0
:node-ctor-fspath-deprecation
{.interpreted-text role="ref"}.legacy-path-hooks-deprecated
{.interpreted-text role="ref"}.
It was discovered after 8.1.0
was released that the warnings about the
impeding removal were not being displayed, so the team decided to revert
the removal.
This is the reason for `8.1.0` being yanked.
pytest 8.1.0 (YANKED)
::: {.note} ::: {.title} Note :::
This release has been yanked: it broke some plugins without the proper warning period, due to some warnings not showing up as expected.
See #12069. :::
pytest 8.1.0 (YANKED)
[!IMPORTANT]
This release has been yanked: it broke some plugins without the proper warning period, due to some warnings not showing up as expected. See #12069.
Features
- #11475:
Added the new
consider_namespace_packages
{.interpreted-text role="confval"} configuration option, defaulting toFalse
.
If set to True
, pytest will attempt to identify modules that are part
of namespace
packages
when importing modules.
- #11653:
Added the new
verbosity_test_cases
{.interpreted-text role="confval"} configuration option for fine-grained control of test execution verbosity. SeeFine-grained verbosity <pytest.fine_grained_verbosity>
{.interpreted-text role="ref"} for more details.
Improvements
- #10865:
pytest.warns
{.interpreted-text role="func"} now validates thatwarnings.warn
{.interpreted-text role="func"} was called with a [str]{.title-ref} or a [Warning]{.title-ref}. Currently in Python it is possible to use other types, however this causes an exception whenwarnings.filterwarnings
{.interpreted-text role="func"} is used to filter those warnings (see [CPython
#103577](https://togithub.com/python/cpython/issues/103577) for a discussion). While this can be considered a bug in CPython, we decided to put guards in pytest as the error message produced without this check in place is confusing.
- #11311:
When using
--override-ini
for paths in invocations without a configuration file defined, the current working directory is used as the relative directory.
Previoulsy this would raise an AssertionError
{.interpreted-text
role="class"}.
- #11475:
--import-mode=importlib <import-mode-importlib>
{.interpreted-text role="ref"} now tries to import modules using the standard import mechanism (but still without changing :pysys.path
{.interpreted-text role="data"}), falling back to importing modules directly only if that fails.
This means that installed packages will be imported under their
canonical name if possible first, for example app.core.models
, instead
of having the module name always be derived from their path (for example
.env310.lib.site_packages.app.core.models
).
#11801: Added the
iter_parents() <_pytest.nodes.Node.iter_parents>
{.interpreted-text role="func"} helper method on nodes. It is similar tolistchain <_pytest.nodes.Node.listchain>
{.interpreted-text role="func"}, but goes from bottom to top, and returns an iterator, not a list.#11850: Added support for
sys.last_exc
{.interpreted-text role="data"} for post-mortem debugging on Python>=3.12.#11962: In case no other suitable candidates for configuration file are found, a
pyproject.toml
(even without a[tool.pytest.ini_options]
table) will be considered as the configuration file and define therootdir
.#11978: Add
--log-file-mode
option to the logging plugin, enabling appending to log-files. This option accepts either"w"
or"a"
and defaults to"w"
.
Previously, the mode was hard-coded to be "w"
which truncates the file
before logging.
- #12047: When multiple finalizers of a fixture raise an exception, now all exceptions are reported as an exception group. Previously, only the first exception was reported.
Bug Fixes
- #11904:
Fixed a regression in pytest 8.0.0 that would cause test collection to
fail due to permission errors when using
--pyargs
.
This change improves the collection tree for tests specified using
--pyargs
, see 12043
{.interpreted-text role="pull"} for a comparison
with pytest 8.0 and <8.
#12011: Fixed a regression in 8.0.1 whereby
setup_module
xunit-style fixtures are not executed when--doctest-modules
is passed.#12014: Fix the
stacklevel
used when warning about marks used on fixtures.#12039: Fixed a regression in
8.0.2
where tests created usingtmp_path
{.interpreted-text role="fixture"} have been collected multiple times in CI under Windows.
Improved Documentation
- #11790:
Documented the retention of temporary directories created using the
tmp_path
fixture in more detail.
Trivial/Internal Changes
- #11785: Some changes were made to private functions which may affect plugins which access them:
FixtureManager._getautousenames()
now takes aNode
itself instead of the nodeid.FixtureManager.getfixturedefs()
now takes theNode
itself instead of the nodeid.- The
_pytest.nodes.iterparentnodeids()
function is removed without replacement. Prefer to traverse the node hierarchy itself instead.
If you really need to, copy the function from the previous pytest release.
pytest 8.0.2 (2024-02-24)
Bug Fixes
- #11895:
Fix collection on Windows where initial paths contain the short version
of a path (for example
c:\PROGRA~1\tests
). - #11953:
Fix an
IndexError
crash raising fromgetstatementrange_ast
. - #12021: Reverted a fix to [--maxfail]{.title-ref} handling in pytest 8.0.0 because it caused a regression in pytest-xdist whereby session fixture teardowns may get executed multiple times when the max-fails is reached.
pytest 8.0.1 (2024-02-16)
Bug Fixes
- #11875:
Correctly handle errors from
getpass.getuser
{.interpreted-text role="func"} in Python 3.13. - #11879:
Fix an edge case where
ExceptionInfo._stringify_exception
could crashpytest.raises
{.interpreted-text role="func"}. - #11906:
Fix regression with
pytest.warns
{.interpreted-text role="func"} using custom warning subclasses which have more than one parameter in their [__init__]{.title-ref}. - #11907:
Fix a regression in pytest 8.0.0 whereby calling
pytest.skip
{.interpreted-text role="func"} and similar control-flow exceptions within apytest.warns()
{.interpreted-text role="func"} block would get suppressed instead of propagating. - #11929: Fix a regression in pytest 8.0.0 whereby autouse fixtures defined in a module get ignored by the doctests in the module.
- #11937: Fix a regression in pytest 8.0.0 whereby items would be collected in reverse order in some circumstances.
pytest-dev/pytest-asyncio (pytest/pytest-asyncio)
v0.23.5.post1
:
pytest-asyncio 0.23.5.post1
0.23.5 (2024-02-09)
- Declare compatibility with pytest 8 #737
- Fix typing errors with recent versions of mypy #769
- Prevent DeprecationWarning about internal use of
asyncio.get_event_loop()
from affecting test cases #757
Known issues
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.
pytest-dev/pytest-subtests (pytest/pytest-subtests)
- Fixed compatibility with upcoming pytest
8.1.x
. (#125
_).
.. _#125:https://github.com/pytest-dev/pytest-subtests/issues/1255
- Python 3.12 is now officially supported (
#113
_). - Added typing support (
#115
_). SubTests
can be imported frompytest_subtests
to type-annotate thesubtests
fixture.
.. _#113:https://github.com/pytest-dev/pytest-subtests/pull/1133 .. _#115https://github.com/pytest-dev/pytest-subtests/pull/11515
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 has been generated by Mend Renovate. View repository job log here.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com