#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.
The library provides useful fixtures for creation test aiohttp server and client.
Installation
.. code-block:: console
$ pip install pytest-aiohttp
Add asyncio_mode = auto line to pytest configuration <https://docs.pytest.org/en/latest/customize.html>_ (see pytest-asyncio modes <https://github.com/pytest-dev/pytest-asyncio#modes>_ for details). The plugin works
with strict mode also.
Usage
Write tests in pytest-asyncio <https://github.com/pytest-dev/pytest-asyncio>_ style
using provided fixtures for aiohttp test server and client creation. The plugin provides
resources cleanup out-of-the-box.
Use email.message instead of cgi as cgi has been deprecated ([#969](https://github.com/pypa/twine/issues/969) <https://github.com/pypa/twine/issues/969>_)
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 packages group with 12 updates:
7.4.0
8.2.0
1.0.4
1.0.5
0.0.15
0.0.17
6.0.0
6.0.1
5.12.0
5.13.2
6.1.0
7.0.0
1.1.320
1.1.361
23.7.0
24.4.2
0.28.0
0.29.0
68.0.0
69.5.1
0.41.1
0.43.0
4.0.2
5.0.0
Updates
pytest
from 7.4.0 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-aiohttp
from 1.0.4 to 1.0.5Release notes
Sourced from pytest-aiohttp's releases.
... (truncated)
Changelog
Sourced from pytest-aiohttp's changelog.
Commits
74b6faf
Release 1.0.521112c0
[pre-commit.ci] pre-commit autoupdate (#51)e8c8cfd
[pre-commit.ci] pre-commit autoupdate (#45)49d9b35
Add CodeQL workflow for GitHub code scanning (#46)a6a2533
Usepytest.hookimpl
inpytest_configure
(#49)9aea81e
Update check-jsonschema URL and version (#48)a2c68a8
[pre-commit.ci] pre-commit autoupdate (#44)74afa87
[pre-commit.ci] pre-commit autoupdate (#42)fca6a97
[pre-commit.ci] pre-commit autoupdate (#41)a4218fa
[pre-commit.ci] pre-commit autoupdate (#39)Updates
pytest-pg
from 0.0.15 to 0.0.17Changelog
Sourced from pytest-pg's changelog.
Commits
365db9f
Override docker host with env variable (#192)fc02877
Bump flake8 from 6.1.0 to 7.0.0 (#177)bc4d290
Support postgres 16 and psycopg3 (#176)908f10d
Bump pytest from 7.4.3 to 7.4.4 (#175)c54ecb0
Bump setuptools from 68.2.2 to 69.0.3 (#174)f84002c
Bump mypy from 1.7.0 to 1.8.0 (#173)927aae3
Bump docker from 6.1.3 to 7.0.0 (#168)290beef
Bump black from 23.12.0 to 23.12.1 (#172)27b770d
Bump isort from 5.12.0 to 5.13.2 (#171)230ec0b
Bump black from 23.11.0 to 23.12.0 (#170)Updates
pytest-runner
from 6.0.0 to 6.0.1Changelog
Sourced from pytest-runner's changelog.
Commits
9d13da8
Update changelog1898992
Merge pull request #62 from pytest-dev/RonnyPfannschmidt-devstatusd9d2ec5
update development status to inactiveUpdates
isort
from 5.12.0 to 5.13.2Release notes
Sourced from isort's releases.
... (truncated)
Changelog
Sourced from isort's changelog.
Commits
c655831
Merge pull request #2214 from PyCQA/version/5.13.2b4335b4
Prepare version 5.13.2c36e43c
Merge pull request #2184 from bp72/issue/2154e38702f
Merge pull request #2213 from davidculley/confine-precommit-to-stagesee8d87f
Add fix for the error found by hypothesis5849ec2
Apply the bracket fix from issue 471 only for use_parentheses=Truedf0e119
confine pre-commit to stages9255bca
Merge pull request #2212 from PyCQA/bugfix/#2211-colors-extra5336d7d
Fix colors extras643d9c4
Merge pull request #2210 from PyCQA/version/5.13.1Updates
flake8
from 6.1.0 to 7.0.0Commits
88a4f9b
Release 7.0.06f3a60d
Merge pull request #1906 from PyCQA/upgrade-pyflakescde8570
upgrade pyflakes to 3.2.x2ab9d76
Merge pull request #1903 from PyCQA/pre-commit-ci-update-confige27611f
[pre-commit.ci] pre-commit autoupdate9d20be1
Merge pull request #1902 from PyCQA/pre-commit-ci-update-config06c1503
[pre-commit.ci] auto fixes from pre-commit.com hooksb67ce03
Fix bugbear lintsc8801c1
[pre-commit.ci] pre-commit autoupdate045f297
Merge pull request #1893 from PyCQA/pre-commit-ci-update-configUpdates
pyright
from 1.1.320 to 1.1.361Commits
f9cffb8
[pyright updated to 1.1.361] Update Version (#268)642e0e9
Pyright NPM Package update to 1.1.360 (#266)fbc68e1
[pyright updated to 1.1.359] Update Version (#264)7191b6c
[pyright updated to 1.1.358] Update Version (#260)8f677a9
Pyright NPM Package update to 1.1.357 (#259)3c598b3
Pyright NPM Package update to 1.1.356 (#257)27a9fea
Pyright NPM Package update to 1.1.355 (#256)3b04c54
[pyright updated to 1.1.354] Update Version (#255)ba2747b
Pyright NPM Package update to 1.1.353 (#253)1b36e5d
Pyright NPM Package update to 1.1.352Updates
black
from 23.7.0 to 24.4.2Release notes
Sourced from black's releases.
... (truncated)
Changelog
Sourced from black's changelog.
... (truncated)
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
asyncpg
from 0.28.0 to 0.29.0Release notes
Sourced from asyncpg's releases.
... (truncated)
Commits
74f3a00
asyncpg v0.29.0d7faaff
fix: allow host tuple (#1021)b2697ff
Add query logging callbacks and context manager (#1043)93a6f79
Cut BaseProtocol circular reference on close. (#1049)ca9f03b
Close cursor portals once the iterator is exhausted (#1088)b7ffab6
Add support for theWHERE
clause incopy_to
methods (#941)70c8bd8
Use cleanup_ctx in pool usage doc (#878)ccc7baf
Small fix for documentation on using SSL in Connection (#995)313b2b2
Use thetimeout
context manager in the connection path (#1087)8b45beb
Update automatic PostGIS type conversion for Shapely 2.0 (#1085)Updates
setuptools
from 68.0.0 to 69.5.1Changelog
Sourced from setuptools's changelog.
... (truncated)
Commits
ff58075
Bump version: 69.5.0 → 69.5.1d46727f
Merge tag 'v69.4.2' into main.5de8e14
Bump version: 69.4.1 → 69.4.2f07b037
Add news fragment.608de82
Merge https://github.com/pypa/distutils into v69.4.1e5e3cc1
Merge pull request #247 from pypa/hotfix/246-linker-args-listef297f2
Extend the retention of the compatibility.98eee7f
Exclude compat package from coverage.d2581bf
Add 'consolidate_linker_args' wrapper to protect the old behavior for now.a04913a
Add type declaration for runtime_library_dir_option, making explicit the diff...Updates
wheel
from 0.41.1 to 0.43.0Release notes
Sourced from wheel's releases.
Changelog
Sourced from wheel's changelog.
... (truncated)
Commits
fa33dfd
Created a new releaseb2c8272
Removed PyPy + Windows from the test matrix for nowdedcc19
Worked around a bizarre PyPy+Windows issue with bdist_eggfa480d6
Added Codecov.io token to the test workflow1280f03
Skip the test_platform_linux32 test on non-Linux platforms0b4b259
Removed failing test codeb91b377
Fixed erroneous attribute access on thecapsys
fixture819baa3
Updated more GitHub actions and improved test workflow92921a0
Updated vendoredpackaging
to 24.0a9119c8
Updated GitHub actions to their latest versionsUpdates
twine
from 4.0.2 to 5.0.0Changelog
Sourced from twine's changelog.
Commits
94f810c
Merge pull request #1047 from pypa/new-release09d993a
Update linkcheck_ignore setting for docsab0ed19
Apply 2024 black format407e6cc
Build changelog for 5.0.06644b86
Add missing changelog entriesfe1885f
Merge pull request #1034 from DimitriPapadopoulos/codespell694bdcf
Fix typos found by codespell89ec78c
Merge pull request #1040 from woodruffw-forks/ww/pypi-mandatory-api-tokensb3b363a
tests: lintage6e94d20
tests: more non-PyPI testsDependabot 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