#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.
[#1071](https://github.com/pytest-dev/pytest-xdist/issues/1071) <https://github.com/pytest-dev/pytest-xdist/issues/1071>_: Add backward compatibility for deadlock issue with the execnet new main_thread_only "execmodel" triggered when pytest-cov accesses rinfo.
pytest-xdist 3.6.0 (2024-04-19)
This release was YANKED due to a regression fixed in 3.6.1.
Features
[#1027](https://github.com/pytest-dev/pytest-xdist/issues/1027) <https://github.com/pytest-dev/pytest-xdist/pull/1027>_:pytest-xdist workers now always execute the tests in the main thread.
Previously some tests might end up executing in a separate thread other than main in the workers, due to some internal execnet`` details. This can cause problems specially with async frameworks where the event loop is running in the ``main`` thread (for example #620pytest-dev/pytest-xdist#620`__).
Bug Fixes
[#1024](https://github.com/pytest-dev/pytest-xdist/issues/1024) <https://github.com/pytest-dev/pytest-xdist/issues/1024>_: Added proper handling of shouldstop (such as set by --max-fail) and shouldfail conditions in workers.
Previously, a worker might have continued executing further tests before the controller could terminate the session.
[#1028](https://github.com/pytest-dev/pytest-xdist/issues/1028) <https://github.com/pytest-dev/pytest-xdist/issues/1028>_: Fixed compatibility issue between looponfail and editable installs.
[#620](https://github.com/pytest-dev/pytest-xdist/issues/620) <https://github.com/pytest-dev/pytest-xdist/issues/620>_: Use the new main_thread_onlyexecnet "execmodel" so that code which expects to only run in the main thread will now work as expected.
[#937](https://github.com/pytest-dev/pytest-xdist/issues/937) <https://github.com/pytest-dev/pytest-xdist/issues/937>_: Fixed a bug where plugin would raise an incompatibility error with --pdb despite using -n0.
Removals
[#1053](https://github.com/pytest-dev/pytest-xdist/issues/1053) <https://github.com/pytest-dev/pytest-xdist/issues/1053>_: Dropped support for Python 3.7.
[#1057](https://github.com/pytest-dev/pytest-xdist/issues/1057) <https://github.com/pytest-dev/pytest-xdist/issues/1057>_: pytest>=7.0.0 is now required.
execnet>=2.1.0 is now required.
Trivial Changes
[#1020](https://github.com/pytest-dev/pytest-xdist/issues/1020) <https://github.com/pytest-dev/pytest-xdist/issues/1020>_: pytest-xdist's setup.py file is removed.
If you relied on this file, e.g. to install pytest using setup.py install,
please see Why you shouldn't invoke setup.py directly <https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary>_ for alternatives.
- Add support for multiple appending override options (-x, --override) on command line - by :user:`amitschang`. (:issue:`3261`)
- Add support for inverting exit code success criteria using bang (!) (:issue:`3271`)
Bugfixes - 4.15.0
Fix issue that the leading character c was dropped from packages in constraints files - by :user:jugmac00. (:issue:3247)
Allow appending to deps with --override testenv.deps+=foo - by :user:stefanor. (:issue:3256)
Fix non-existing branch rewrite in the documentation to main. (:issue:3257)
Update test typing for build 1.2.0, which has an explicit Distribution type - by :user:stefanor. (:issue:3260)
Fix broken input parsing for --discover flag. - by :user:mimre25 (:issue:3272)
Improved Documentation - 4.15.0
- Rephrase ``--discover`` flag's description to avoid confusion between paths and executables. - by :user:`mimre25` (:issue:`3274`)
mkdocs serve no longer locks up the browser when more than 5 tabs are open. This is achieved by closing the polling connection whenever a tab becomes inactive. Background tabs will no longer auto-reload either - that will instead happen as soon the tab is opened again. Context: #3391
New flag serve --open to open the site in a browser.
After the first build is finished, this flag will cause the default OS Web browser to be opened at the home page of the local site.
Context: #3500
Drafts
[!warning]
Changed from version 1.5:
The exclude_docs config was split up into two separate concepts.
The exclude_docs config no longer has any special behavior for mkdocs serve - it now always completely excludes the listed documents from the site.
If you wish to use the "drafts" functionality like the exclude_docs key used to do in MkDocs 1.5, please switch to the new config key draft_docs.
Reduce warning levels when a "draft" page has a link to a non-existent file. Context: #3449
Update to deduction of page titles
MkDocs 1.5 had a change in behavior in deducing the page titles from the first heading. Unfortunately this could cause unescaped HTML tags or entities to appear in edge cases.
Now tags are always fully sanitized from the title. Though it still remains the case that Page.title is expected to contain HTML entities and is passed directly to the themes.
Images (notably, emojis in some extensions) get preserved in the title only through their alt attribute's value.
Built-in themes now also support Polish language (#3613)
"readthedocs" theme
Fix: "readthedocs" theme can now correctly handle deeply nested nav configurations (over 2 levels deep), without confusedly expanding all sections and jumping around vertically. (#3464)
Fix: "readthedocs" theme now shows a link to the repository (with a generic logo) even when isn't one of the 3 known hosters. (#3435)
"readthedocs" theme now also has translation for the word "theme" in the footer that mistakenly always remained in English. (#3613, #3625)
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 primary-dev-dependencies group with 7 updates:
8.1.1
8.2.0
3.5.0
3.6.1
24.3.0
24.4.2
4.14.2
4.15.0
1.5.3
1.6.0
0.24.1
0.25.0
9.5.16
9.5.20
Updates
pytest
from 8.1.1 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-xdist
from 3.5.0 to 3.6.1Changelog
Sourced from pytest-xdist's changelog.
... (truncated)
Commits
4dd2978
Release 3.6.1b397288
Merge pull request #1072 from zmedico/gateway-cache-rinfo12b3cce
Cache execnet gateway rinfo during WorkerController setupc93a106
build(deps): bump hynek/build-and-inspect-python-package (#1066)52e2022
[pre-commit.ci] pre-commit autoupdate (#1073)699f939
Merge pull request #1070 from pytest-dev/release-3.6.080bc0b8
Release 3.6.020e3ac7
Use execnet main_thread_only execmodel (#1027)0a4238f
Merge pull request #1067 from pytest-dev/pre-commit-ci-update-config0686279
[pre-commit.ci] pre-commit autoupdateUpdates
black
from 24.3.0 to 24.4.2Release notes
Sourced from black's releases.
Changelog
Sourced from black's changelog.
Commits
3702ba2
Prepare release 24.4.2 (#4335)e4aaa8a
Fix incorrect f-string tokenization (#4332)ba88fc3
Simplify string tokenization regexes (#4331)5683242
New release templatee7fb048
Prepare release 24.4.1 (#4328)3f0f8f1
Support PEP 696 (#4327)2f88085
Github Action: Directly install from repo ifexport-subst
is skipped (#4313)12ce3db
Move changelog entry to right section (#4326)1354be2
Add support to style function definitions with newlines before function stubs...f4b644b
Prevent wrapping of multiline fstrings in parens (#4325)Updates
tox
from 4.14.2 to 4.15.0Release notes
Sourced from tox's releases.
Changelog
Sourced from tox's changelog.
Commits
261b4ca
release 4.15.0c54dfbd
fix(parser): Fix --discover parsed incorrectly from env (#3274)809e10f
Add bang to invert exit code (#3271)822c9d0
[pre-commit.ci] pre-commit autoupdate (#3267)0e5a3db
[pre-commit.ci] pre-commit autoupdate (#3265)f5850c0
Support multiple override appends (#3261)c2be629
Allow appending to deps with the command line (#3259)d28a9ee
Update installation.rst (#3257)a19a946
[pre-commit.ci] pre-commit autoupdate (#3258)a22fe8f
Fix type-checking (#3260)Updates
mkdocs
from 1.5.3 to 1.6.0Release notes
Sourced from mkdocs's releases.
... (truncated)
Commits
0998fec
Release 1.6.0 (#3631)bce85bf
Fix for showing repository icon even when a file has no edit_uri (#3657)0ac05da
Re-generate localization files (#3634)6244500
Remove jQuery frommkdocs
theme (#3649)f85d429
Prevent a flash of white color when dark mode is enabled (#3647)e39cce2
Fix style of modal close button (#3651)652813d
Prevent a crash if stdin is not defined (#3609)59a295f
Merge pull request #3493 from waylan/22486f5e748
Merge pull request #3625 from mkdocs/themepo1451fb3
Babel setuptools frontend is still used in the install hookUpdates
mkdocstrings[python]
from 0.24.1 to 0.25.0Release notes
Sourced from mkdocstrings[python]'s releases.
Changelog
Sourced from mkdocstrings[python]'s changelog.
Commits
87d8229
chore: Prepare release 0.25.0c5b5f69
refactor: Allow specifying name of template loggers7ff1681
docs: Enable parameter headings253d215
docs: Load inventories for MkDocs and Markdown1532b59
feat: Supportonce
parameter in logging methods, allowing to log a message ...d799d2f
feat: Support blank line between::: path
and YAML options828bd59
chore: Prepare release 0.24.37fe3e5f
fix: Support HTML toc labels with Python-Markdown 3.6+ (uncomment code...)7b9827c
chore: Prepare release 0.24.217bfc87
chore: Use PEP 440 versioning scheme for changelogUpdates
mkdocs-material
from 9.5.16 to 9.5.20Release notes
Sourced from mkdocs-material's releases.
Changelog
Sourced from mkdocs-material's changelog.
... (truncated)
Commits
5cb3117
Prepare 9.5.20 release4752779
Updated dependenciese90871f
Fixed social plugin crashing on Windows when downloading fonts (#7085) (#7117)ff49d74
Fixed deprecation warning in privacy plugincff4a75
Fixed deprecation warning in tags pluginedcc536
Documentation2dd88ae
Documentation57d82dc
Documentation (#7102)4001083
Documentation (#7112)c427e1c
Documentation (#7103)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