Fix: setting COVERAGE_CORE=sysmon no longer errors on 3.11 and lower, thanks Hugo van Kemenade. It now issues a warning that sys.monitoring is not available and falls back to the default core instead.
In Python 3.12 and above, you can try an experimental core based on the new sys.monitoring <python:sys.monitoring> module by defining a COVERAGE_CORE=sysmon environment variable. This should be faster for line coverage, but not for branch coverage, and plugins and dynamic contexts are not yet supported with it. I am very interested to hear how it works (or doesn't!) for you.
Fix: the change for multi-line signature exclusions in 7.3.3 broke other forms of nested clauses being excluded properly. This is now fixed, closing issue 1713.
Fix: in the HTML report, selecting code for copying won't select the line numbers also. Thanks, Robert Harris.
Fix: XML reports could fail with a TypeError if files had numeric components that were duplicates except for leading zeroes, like file1.py and file001.py. Fixes issue 1709.
The coverage annotate command used to announce that it would be removed in a future version. Enough people got in touch to say that they use it, so it will stay. Don't expect it to keep up with other new features though.
Added new debug options <cmd_run_debug>:
pytest writes the pytest test name into the debug output.
dataop2 writes the full data being added to CoverageData objects.
Fix: setting COVERAGE_CORE=sysmon no longer errors on 3.11 and lower,
thanks Hugo van Kemenade <pull 1747_>_. It now issues a warning that
sys.monitoring is not available and falls back to the default core instead.
In Python 3.12 and above, you can try an experimental core based on the new
:mod:sys.monitoring <python:sys.monitoring> module by defining a
COVERAGE_CORE=sysmon environment variable. This should be faster for
line coverage, but not for branch coverage, and plugins and dynamic contexts
are not yet supported with it. I am very interested to hear how it works (or
doesn't!) for you.
#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 from getstatementrange_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.
8.0.1
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 crash pytest.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 a pytest.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 8.0.0 (2024-01-27)
See 8.0.0rc1 and 8.0.0rc2 for the full changes since pytest 7.4!
Bug Fixes
#11842: Properly escape the reason of a skip <pytest.mark.skip ref>{.interpreted-text role="ref"} mark when writing JUnit XML files.
#11861: Avoid microsecond exceeds 1_000_000 when using log-date-format with %f specifier, which might cause the test suite to crash.
8.0.0rc2
pytest 8.0.0rc2 (2024-01-17)
Improvements
#11233: Improvements to -r for xfailures and xpasses:
Report tracebacks for xfailures when -rx is set.
Report captured output for xpasses when -rX is set.
For xpasses, add - in summary between test name and reason, to match how xfail is displayed.
#11825: The pytest_plugin_registered{.interpreted-text role="hook"} hook has a new plugin_name parameter containing the name by which plugin is registered.
Bug Fixes
#11706: Fix reporting of teardown errors in higher-scoped fixtures when using [--maxfail]{.title-ref} or [--stepwise]{.title-ref}.
[postgresql] [bug] [regression] Fixed regression caused by just-released fix for #10863 where an
invalid exception class were added to the "except" block, which does not
get exercised unless such a catch actually happens. A mock-style test has
been added to ensure this catch is exercised in unit tests.
[orm] [bug] Replaced the "loader depth is excessively deep" warning with a shorter
message added to the caching badge within SQL logging, for those statements
where the ORM disabled the cache due to a too-deep chain of loader options.
The condition which this warning highlights is difficult to resolve and is
generally just a limitation in the ORM's application of SQL caching. A
future feature may include the ability to tune the threshold where caching
is disabled, but for now the warning will no longer be a nuisance.
[orm] [bug] Fixed issue where it was not possible to use a type (such as an enum)
within a _orm.Mapped container type if that type were declared
locally within the class body. The scope of locals used for the eval now
includes that of the class body itself. In addition, the expression within
_orm.Mapped may also refer to the class name itself, if used as a
string or with future annotations mode.
[orm] [bug] Fixed issue where using _orm.Session.delete() along with the
_orm.Mapper.version_id_col feature would fail to use the
correct version identifier in the case that an additional UPDATE were
emitted against the target object as a result of the use of
_orm.relationship.post_update on the object. The issue is
similar to #10800 just fixed in version 2.0.25 for the case of
updates alone.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the python-requirements group in /requirements with 7 updates:
7.3.1
7.4.3
7.4.4
8.0.2
2.0.25
2.0.27
3.0.1
4.0.0
7.3.0
7.4.0
3.6.0
3.6.2
4.12.0
4.13.0
Updates
coverage[toml]
from 7.3.1 to 7.4.3Release notes
Sourced from coverage[toml]'s releases.
... (truncated)
Changelog
Sourced from coverage[toml]'s changelog.
... (truncated)
Commits
1af3624
docs: sample HTML for 7.4.3f06c5e4
docs: prep for 7.4.308fc997
fix: get atomic copies of iterables when flushing data. #17334e34571
build: put a time limit on the Python nightly testsa1d8d29
build: make targets should use underscores not dashesf7d40a0
build: tweak the release instructions0f19b82
build: bump version5d69334
test: if a test fails randomly, let it retry with@flaky
65d686c
docs: sample HTML for 7.4.2026dca7
docs: prep for 7.4.2Updates
pytest
from 7.4.4 to 8.0.2Release notes
Sourced from pytest's releases.
... (truncated)
Commits
31afeeb
Prepare release version 8.0.21b00a2f
Merge pull request #12025 from pytest-dev/backport-12022-to-8.0.xff2f66d
[8.0.x] Revert "Fix teardown error reporting when--maxfail=1
(#11721)"8a8eed6
[8.0.x] Fix collection of short paths on Windows (#12024)74346f0
[8.0.x] Allow Sphinx 7.x (#12005)b7657b4
[8.0.x] Disallow Sphinx 6 and 7 (#12001)feb7c5e
Merge pull request #11999 from pytest-dev/backport-11996-to-8.0.x0909655
[8.0.x] code: fixIndexError
crash ingetstatementrange_ast
68524d4
Merge pull request #11993 from pytest-dev/release-8.0.1d7d320a
Prepare release version 8.0.1Updates
sqlalchemy
from 2.0.25 to 2.0.27Release notes
Sourced from sqlalchemy's releases.
... (truncated)
Commits
Updates
sphinx-issues
from 3.0.1 to 4.0.0Commits
50128ce
Bump version and update changelog0239bda
Default to linking to GH sponsors URL for the :user: role (#131)9d176de
Dev Chores (#130)08c376f
Run pre-commit autoupdateUpdates
pip-tools
from 7.3.0 to 7.4.0Release notes
Sourced from pip-tools's releases.
Changelog
Sourced from pip-tools's changelog.
Commits
1397bfa
Merge pull request #2043 from jazzband/dependabot/pip/docs/jinja2-3.1.3355a04e
Bump jinja2 from 3.1.2 to 3.1.3 in /docsc8f2988
Merge pull request #2055 from atugushev/fix-failing-test-on-pip-24598845a
Fix failing test on pip-24.0a8688d7
Merge pull request #2029 from jazzband/pre-commit-ci-update-config39cbff8
[pre-commit.ci] auto fixes from pre-commit.com hooks644ac8a
[pre-commit.ci] pre-commit autoupdated673c8e
Merge pull request #2015 from csalerno-asml/fix-2006e216ad5
rm submodule64d1de3
comments addressedUpdates
pre-commit
from 3.6.0 to 3.6.2Release notes
Sourced from pre-commit's releases.
Changelog
Sourced from pre-commit's changelog.
Commits
e525726
v3.6.23187538
Merge pull request #3130 from pre-commit/golang-build-during-commit-a61d9c95
fix building golang hooks duringcommit --all
15bd0c7
v3.6.192678c3
Merge pull request #3126 from pre-commit/crlf-only-diff032d8e2
staged_files_only can handle a crlf-only diff7384838
Merge pull request #3110 from untitaker/pythonexecutable96e0712
[pre-commit.ci] auto fixes from pre-commit.com hooks3388e2d
Pop PYTHONEXECUTABLE10f8853
Merge pull request #3107 from pre-commit/pre-commit-ci-update-configUpdates
tox
from 4.12.0 to 4.13.0Release notes
Sourced from tox's releases.
Changelog
Sourced from tox's changelog.
Commits
ae156e2
release 4.13.0fa923ec
Extract packaging virtualenv code to its own class (#3221)47bcea6
[pre-commit.ci] pre-commit autoupdate (#3217)fb83a3a
Revert previous "precommit autoupdate (#3214)" commit; it's broken (#3215)3347933
[pre-commit.ci] pre-commit autoupdate (#3214)2bcc3ec
config.cli.test_cli_ini: Re-order for clarity (textual moves only) (#3209)387834a
session.env_select.CliEnv: Document and test spaces behaviour (#3208)47fa093
docs/development "Key points": Two updates and general improvement (#3205)1b5b187
Document how CliEnv works (#3206)b3eb86a
Add tests for CliEnv (#3204)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show