#12069: A deprecation warning is now raised when implementations of one of the following hooks request a deprecated py.path.local parameter instead of the pathlib.Path parameter which replaced it:
pytest_ignore_collect{.interpreted-text role="hook"} - the path parameter - use collection_path instead.
pytest_collect_file{.interpreted-text role="hook"} - the path parameter - use file_path instead.
pytest_pycollect_makemodule{.interpreted-text role="hook"} - the path parameter - use module_path instead.
pytest_report_header{.interpreted-text role="hook"} - the startdir parameter - use start_path instead.
pytest_report_collectionfinish{.interpreted-text role="hook"} - the startdir parameter - use start_path instead.
The replacement parameters are available since pytest 7.0.0.
The old parameters will be removed in pytest 9.0.0.
See legacy-path-hooks-deprecated{.interpreted-text role="ref"} for more details.
Features
#11871: Added support for reading command line arguments from a file using the prefix character @, like e.g.: pytest @tests.txt. The file must have one argument per line.
See Read arguments from file <args-from-file>{.interpreted-text role="ref"} for details.
Improvements
#11523: pytest.importorskip{.interpreted-text role="func"} will now issue a warning if the module could be found, but raised ImportError{.interpreted-text role="class"} instead of ModuleNotFoundError{.interpreted-text role="class"}.
The warning can be suppressed by passing exc_type=ImportError to pytest.importorskip{.interpreted-text role="func"}.
See import-or-skip-import-error{.interpreted-text role="ref"} for details.
#11728: For unittest-based tests, exceptions during class cleanup (as raised by functions registered with TestCase.addClassCleanup <unittest.TestCase.addClassCleanup>{.interpreted-text role="meth"}) are now reported instead of silently failing.
#11777: Text is no longer truncated in the short test summary info section when -vv is given.
#12112: Improved namespace packages detection when consider_namespace_packages{.interpreted-text role="confval"} is enabled, covering more situations (like editable installs).
#9502: Added PYTEST_VERSION{.interpreted-text role="envvar"} environment variable which is defined at the start of the pytest session and undefined afterwards. It contains the value of pytest.__version__, and among other things can be used to easily check if code is running from within a pytest run.
Bug Fixes
#12065: Fixed a regression in pytest 8.0.0 where test classes containing setup_method and tests using @staticmethod or @classmethod would crash with AttributeError: 'NoneType' object has no attribute 'setup_method'.
Now the request.instance <pytest.FixtureRequest.instance>{.interpreted-text role="attr"} attribute of tests using @staticmethod and @classmethod is no longer None, but a fresh instance of the class, like in non-static methods.
Removed support for xdist rsync (now deprecated).
Contributed by Matthias Reichenbach in [#623](https://github.com/pytest-dev/pytest-cov/issues/623) <https://github.com/pytest-dev/pytest-cov/pull/623>_.
Switched docs theme to Furo.
Various legacy Python cleanup and CI improvements.
Contributed by Christian Clauss and Hugo van Kemenade in
[#630](https://github.com/pytest-dev/pytest-cov/issues/630) <https://github.com/pytest-dev/pytest-cov/pull/630>,
[#631](https://github.com/pytest-dev/pytest-cov/issues/631) <https://github.com/pytest-dev/pytest-cov/pull/631>,
[#632](https://github.com/pytest-dev/pytest-cov/issues/632) <https://github.com/pytest-dev/pytest-cov/pull/632>_ and
[#633](https://github.com/pytest-dev/pytest-cov/issues/633) <https://github.com/pytest-dev/pytest-cov/pull/633>_.
Added a pyproject.toml example in the docs.
Contributed by Dawn James in [#626](https://github.com/pytest-dev/pytest-cov/issues/626) <https://github.com/pytest-dev/pytest-cov/pull/626>_.
Modernized project's pre-commit hooks to use ruff. Initial POC contributed by
Christian Clauss in [#584](https://github.com/pytest-dev/pytest-cov/issues/584) <https://github.com/pytest-dev/pytest-cov/pull/584>_.
When config.ignore_errors is Falsey, failures to parse Python files or
look up file sources will now interrupt and early exit collection, which
matches default coverage behaviour. Previously, we had manually muted
these errors and/or only errored after collecting multiple failures.
When config.ignore_errors is Falsey, failures to parse Python files or
look up file sources will now interrupt and early exit collection, which
matches default coverage behaviour. Previously, we had manually muted
these errors and/or only errored after collecting multiple failures.
Miscellaneous:
* Athena: start_query_execution() now supports the ExecutionParameters-parameter
* DynamoDB: Tables now support DeleteProtection
* DynamoDB: update_item() no longer throws an error when deleting an item from an empty set
* DynamoDB: update_item() no throws an error when adding an empty set
* EC2: delete_network_acl() now throws an error when the ACL still has associations attached to it
* EC2: describe_route_tables() now supports the route.nat-gateway-id filter
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-packages group with 8 updates in the / directory:
0.2.1
0.4.4
7.4.4
8.2.0
4.1.0
5.0.0
3.3.1
4.0.1
0.12.4
0.12.5
5.0.5
5.0.7
0.3.1
0.3.2
3.7.0
3.7.1
Updates
ruff
from 0.2.1 to 0.4.4Release notes
Sourced from ruff's releases.
... (truncated)
Changelog
Sourced from ruff's changelog.
... (truncated)
Commits
3e8878a
Bump version to v0.4.4 (#11352)b6b4ad9
[red-knot]@override
lint rule (#11282)dd42961
[pylint
] Detectpathlib.Path.open
calls inunspecified-encoding
(`PLW15...c80c171
[red-knot] Vendor typeshed's stdlib (#11340)e2fe177
Revert "Simplify arithmetic operation in logical lines checker (#11346)" (#11...e9d1cdd
Simplify arithmetic operation in logical lines checker (#11346)dfe4291
Improveruff_python_semantic::all::extract_all_names()
(#11335)4541337
[red-knot] Remove\<Db: SemanticDb>
contraints in favor of dynamic dispatch ...8e9ddee
Ignore end-of-line comments when determining blank line rules (#11342)702d2fa
Make B024 and B027 documentation more nuanced (#11341)Updates
pytest
from 7.4.4 to 8.2.0Release notes
Sourced from pytest's releases.
... (truncated)
Commits
6bd3f31
Tweak changelog for 8.2.09b6219b
Prepare release version 8.2.0835765c
Merge pull request #12130 from bluetech/fixtures-inline7e7503c
unittest: report class cleanup exceptions (#12250)882c4da
fixtures: inlinefail_fixturefunc
2e8fb9f
fixtures: extract a_check_fixturedef
methodacf2971
fixtures: inline_getnextfixturedef
into_get_active_fixturedef
3c77aec
fixtures: move "request" check earlyd217d68
fixtures: inline_compute_fixture_value
530be28
fixtures: use early return in_get_active_fixturedef
Updates
pytest-cov
from 4.1.0 to 5.0.0Changelog
Sourced from pytest-cov's changelog.
Commits
5295ce0
Bump version: 4.1.0 → 5.0.01181b06
Update changelog.9757222
Fix a minor grammar error (#636)9f5cd81
Cleanup releasing instructions. Closes #616.93b5047
Add test for pyproject.toml loading without explicit --cov-config. Ref #508.ff50860
docs: add config instructions for pyproject.toml.4a5a4b5
Keep GitHub Actions up to date with GitHub's Dependabot1d7f559
Fix or remove URLs that are causing docs tests to fail6a5af8e
Update changelog.d9fe8df
Switch to furo. Closes #618.Updates
coveralls
from 3.3.1 to 4.0.1Release notes
Sourced from coveralls's releases.
Changelog
Sourced from coveralls's changelog.
Commits
e20a8c8
chore(release): bump versionb566fc3
test(git): support running tests outside of gitdir (#443)f41dca5
feat(deps): add support for coverage v7.5+ (#442)afea549
docs(changelog): reference coverage.py config docsee0f09b
chore(deps): update pre-commit hook pycqa/pylint to v3.2.0f466374
chore(deps): update pre-commit hook pycqa/pylint to v3.1.1 (#438)6514a59
chore(deps): update pandoc/core docker tag to v3.2.0a30b404
chore(deps): update actions/checkout action to v4.1.5b274e07
chore(deps): update pre-commit hook python-jsonschema/check-jsonschema to v0....33f0bea
chore(deps): lock file maintenanceUpdates
tomlkit
from 0.12.4 to 0.12.5Release notes
Sourced from tomlkit's releases.
Changelog
Sourced from tomlkit's changelog.
Commits
a96883b
chore: release 0.12.5c2611c5
fix: Construction of OutOfOrderTableProxy can cause newlines to be inserted (...990e325
fix: redundant minus sign added to negative integers when multiplie by -1e5e09e9
chore: switch to ruff lint and formatbf01a25
fix: don't add sign if the float is negative (#345)059fab2
chore(deps-dev): bump jinja2 from 3.1.3 to 3.1.4 (#344)6351f3d
fix: CI workflow for macos (#342)3711b06
fix: linter errors caused by blackdab2da8
chore(deps-dev): bump idna from 3.4 to 3.7 (#339)4f2ae7f
[pre-commit.ci] pre-commit autoupdate (#337)Updates
moto
from 5.0.5 to 5.0.7Changelog
Sourced from moto's changelog.
... (truncated)
Commits
de19a6c
Prep release 5.0.7 (#7687)52284f9
chore: update EC2 Instance Types (#7686)d9e687b
chore: update EC2 Instance Offerings (#7685)44310b5
DynamoDB: update_item() now throws the appriopriate exception when adding an ...cf8e560
DynamoDB: Update PyPartiqlParser version (#7683)408126a
IAM: add instance profile tagging (#7665)40d78ff
Feature: EMR Serverless job runs (#7671)9394878
Data Brew: Update Recipe Latest Working Version Create Date (#7667)b21ae7c
WAFv2: Add support for IP sets and logging configuration (#7680)fd3563a
EC2: Add test for DescribeNetworkAcls using the association.subnet-id filter ...Updates
pytest-ruff
from 0.3.1 to 0.3.2Release notes
Sourced from pytest-ruff's releases.
Commits
cb1685e
Stop printing whole pytest traceback on error (#18)Updates
pre-commit
from 3.7.0 to 3.7.1Release notes
Sourced from pre-commit's releases.
Changelog
Sourced from pre-commit's changelog.
Commits
9ee0768
v3.7.1eeac061
Merge pull request #3201 from pre-commit/rust-default-language-version296f592
determine rust default language version independent of rust-toolchain.toml1602328
Merge pull request #3193 from pre-commit/pre-commit-ci-update-config0142f45
[pre-commit.ci] pre-commit autoupdated7e21cd
Merge pull request #3194 from pre-commit/handle-readonly-3-125c3d006
use a simpler gem for testing additional_dependencies0d4c6da
adjust _handle_readonly for typeshed updates85fe182
Merge pull request #3176 from pre-commit/pre-commit-ci-update-config74d05b4
[pre-commit.ci] pre-commit autoupdateDependabot 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