Skip to content

Commit 7c3afd2

Browse files
Bump pytest from 8.1.1 to 8.4.1 (#11228)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.1 to 8.4.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pytest-dev/pytest/releases">pytest's releases</a>.</em></p> <blockquote> <h2>8.4.1</h2> <h1>pytest 8.4.1 (2025-06-17)</h1> <h2>Bug fixes</h2> <ul> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/13461">#13461</a>: Corrected <code>_pytest.terminal.TerminalReporter.isatty</code> to support being called as a method. Before it was just a boolean which could break correct code when using <code>-o log_cli=true</code>).</p> </li> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/13477">#13477</a>: Reintroduced <code>pytest.PytestReturnNotNoneWarning</code>{.interpreted-text role=&quot;class&quot;} which was removed by accident in pytest [8.4]{.title-ref}.</p> <p>This warning is raised when a test functions returns a value other than <code>None</code>, which is often a mistake made by beginners.</p> <p>See <code>return-not-none</code>{.interpreted-text role=&quot;ref&quot;} for more information.</p> </li> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/13497">#13497</a>: Fixed compatibility with <code>Twisted 25+</code>.</p> </li> </ul> <h2>Improved documentation</h2> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/13492">#13492</a>: Fixed outdated warning about <code>faulthandler</code> not working on Windows.</li> </ul> <h2>8.4.0</h2> <h1>pytest 8.4.0 (2025-06-02)</h1> <h2>Removals and backward incompatible breaking changes</h2> <ul> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/11372">#11372</a>: Async tests will now fail, instead of warning+skipping, if you don't have any suitable plugin installed.</p> </li> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/12346">#12346</a>: Tests will now fail, instead of raising a warning, if they return any value other than None.</p> </li> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/12874">#12874</a>: We dropped support for Python 3.8 following its end of life (2024-10-07).</p> </li> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/12960">#12960</a>: Test functions containing a yield now cause an explicit error. They have not been run since pytest 4.0, and were previously marked as an expected failure and deprecation warning.</p> <p>See <code>the docs &lt;yield tests deprecated&gt;</code>{.interpreted-text role=&quot;ref&quot;} for more information.</p> </li> </ul> <h2>Deprecations (removal in next major release)</h2> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/10839">#10839</a>: Requesting an asynchronous fixture without a [pytest_fixture_setup]{.title-ref} hook that resolves it will now give a DeprecationWarning. This most commonly happens if a sync test requests an async fixture. This should have no effect on a majority of users with async tests or fixtures using async pytest plugins, but may affect non-standard hook setups or <code>autouse=True</code>. For guidance on how to work around this warning see <code>sync-test-async-fixture</code>{.interpreted-text role=&quot;ref&quot;}.</li> </ul> <h2>New features</h2> <ul> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/11538">#11538</a>: Added <code>pytest.RaisesGroup</code>{.interpreted-text role=&quot;class&quot;} as an equivalent to <code>pytest.raises</code>{.interpreted-text role=&quot;func&quot;} for expecting <code>ExceptionGroup</code>{.interpreted-text role=&quot;exc&quot;}. Also adds <code>pytest.RaisesExc</code>{.interpreted-text role=&quot;class&quot;} which is now the logic behind <code>pytest.raises</code>{.interpreted-text role=&quot;func&quot;} and used as parameter to <code>pytest.RaisesGroup</code>{.interpreted-text role=&quot;class&quot;}. <code>RaisesGroup</code> includes the ability to specify multiple different expected exceptions, the structure of nested exception groups, and flags for emulating <code>except* &lt;except_star&gt;</code>{.interpreted-text role=&quot;ref&quot;}. See <code>assert-matching-exception-groups</code>{.interpreted-text role=&quot;ref&quot;} and docstrings for more information.</p> </li> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/12081">#12081</a>: Added <code>capteesys</code>{.interpreted-text role=&quot;fixture&quot;} to capture AND pass output to next handler set by <code>--capture=</code>.</p> </li> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/12504">#12504</a>: <code>pytest.mark.xfail</code>{.interpreted-text role=&quot;func&quot;} now accepts <code>pytest.RaisesGroup</code>{.interpreted-text role=&quot;class&quot;} for the <code>raises</code> parameter when you expect an exception group. You can also pass a <code>pytest.RaisesExc</code>{.interpreted-text role=&quot;class&quot;} if you e.g. want to make use of the <code>check</code> parameter.</p> </li> <li> <p><a href="https://redirect.github.com/pytest-dev/pytest/issues/12713">#12713</a>: New [--force-short-summary]{.title-ref} option to force condensed summary output regardless of verbosity level.</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest/commit/8d99211f0ce3927eb7ee579f7b4f969da06dc787"><code>8d99211</code></a> Prepare release version 8.4.1</li> <li><a href="https://github.com/pytest-dev/pytest/commit/5dc5880715633c97310c0593f0ae356de27fa933"><code>5dc5880</code></a> docs: update pytest.ini addopts example to use separate -p entries (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13529">#13529</a>) (...</li> <li><a href="https://github.com/pytest-dev/pytest/commit/d0c7ed0bfae5a5f1f9153cd1e464a421d701e925"><code>d0c7ed0</code></a> Reintroduce PytestReturnNotNoneWarning (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13495">#13495</a>) (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13527">#13527</a>)</li> <li><a href="https://github.com/pytest-dev/pytest/commit/a1b3a7879589eb437e4fd97c169b228c3ed58c63"><code>a1b3a78</code></a> Fix compatibility with Twisted 25 (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13502">#13502</a>) (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13531">#13531</a>)</li> <li><a href="https://github.com/pytest-dev/pytest/commit/4c161aba8ecaab9940040702369025595d26564c"><code>4c161ab</code></a> pytester: avoid unraisableexception gc collects in inline runs to speed up te...</li> <li><a href="https://github.com/pytest-dev/pytest/commit/a86ee09291f913b36fdeec14c42356515b91c979"><code>a86ee09</code></a> Fix typo in parametrize.rst (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13514">#13514</a>) (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13516">#13516</a>)</li> <li><a href="https://github.com/pytest-dev/pytest/commit/1a0581b0227fa07afd1f2c4c6215aec3862cf1ab"><code>1a0581b</code></a> Remove outdated warning about faulthandler_timeout on Windows (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13492">#13492</a>) (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13493">#13493</a>)</li> <li><a href="https://github.com/pytest-dev/pytest/commit/4e631a71484c2fa49e3fd9f884546af411a4888d"><code>4e631a7</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest/issues/13486">#13486</a> from hosmir/fixtypo (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13487">#13487</a>)</li> <li><a href="https://github.com/pytest-dev/pytest/commit/b49745ec529f06edfbbe531b766839763b2be3c2"><code>b49745e</code></a> fix: support TerminalReporter.isatty being called (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13462">#13462</a>) (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13483">#13483</a>)</li> <li><a href="https://github.com/pytest-dev/pytest/commit/cc5ceed916d0c63696da33c67e035917194a4e87"><code>cc5ceed</code></a> RELEASING: remove pytest mailing list (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13472">#13472</a>) (<a href="https://redirect.github.com/pytest-dev/pytest/issues/13473">#13473</a>)</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest/compare/8.1.1...8.4.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest&package-manager=pip&previous-version=8.1.1&new-version=8.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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 <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sam Bull <[email protected]>
1 parent 4872fce commit 7c3afd2

File tree

11 files changed

+46
-18
lines changed

11 files changed

+46
-18
lines changed

aiohttp/pytest_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ async def finalize() -> None:
361361

362362

363363
@pytest.fixture
364-
def aiohttp_client_cls() -> Type[TestClient[Any, Any]]: # type: ignore[misc]
364+
def aiohttp_client_cls() -> Type[TestClient[Any, Any]]:
365365
"""
366366
Client class to use in ``aiohttp_client`` factory.
367367
@@ -388,7 +388,7 @@ def test_login(aiohttp_client):
388388

389389

390390
@pytest.fixture
391-
def aiohttp_client( # type: ignore[misc]
391+
def aiohttp_client(
392392
loop: asyncio.AbstractEventLoop, aiohttp_client_cls: Type[TestClient[Any, Any]]
393393
) -> Iterator[AiohttpClient]:
394394
"""Factory to create a TestClient instance.

requirements/constraints.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ pyenchant==3.2.2
167167
# via sphinxcontrib-spelling
168168
pygments==2.19.1
169169
# via
170+
# pytest
170171
# rich
171172
# sphinx
172173
pyjwt==2.8.0
@@ -177,7 +178,7 @@ pyproject-hooks==1.2.0
177178
# via
178179
# build
179180
# pip-tools
180-
pytest==8.1.1
181+
pytest==8.4.1
181182
# via
182183
# -r requirements/lint.in
183184
# -r requirements/test.in
@@ -299,6 +300,10 @@ zlib-ng==0.5.1
299300
# via
300301
# -r requirements/lint.in
301302
# -r requirements/test.in
303+
zstandard==0.23.0 ; implementation_name == "cpython"
304+
# via
305+
# -r requirements/lint.in
306+
# -r requirements/runtime-deps.in
302307

303308
# The following packages are considered to be unsafe in a requirements file:
304309
pip==25.1.1

requirements/dev.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ pydantic-core==2.33.2
162162
# via pydantic
163163
pygments==2.19.1
164164
# via
165+
# pytest
165166
# rich
166167
# sphinx
167168
pyjwt==2.8.0
@@ -172,7 +173,7 @@ pyproject-hooks==1.2.0
172173
# via
173174
# build
174175
# pip-tools
175-
pytest==8.1.1
176+
pytest==8.4.1
176177
# via
177178
# -r requirements/lint.in
178179
# -r requirements/test.in
@@ -290,6 +291,10 @@ zlib-ng==0.5.1
290291
# via
291292
# -r requirements/lint.in
292293
# -r requirements/test.in
294+
zstandard==0.23.0 ; platform_python_implementation == "CPython" and python_version < "3.14"
295+
# via
296+
# -r requirements/lint.in
297+
# -r requirements/runtime-deps.in
293298

294299
# The following packages are considered to be unsafe in a requirements file:
295300
pip==25.1.1

requirements/lint.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ aiodns==3.5.0
88
# via -r requirements/lint.in
99
annotated-types==0.7.0
1010
# via pydantic
11+
async-timeout==5.0.1
12+
# via valkey
1113
blockbuster==1.5.24
1214
# via -r requirements/lint.in
1315
cffi==1.17.1
@@ -23,6 +25,8 @@ cryptography==45.0.4
2325
# via trustme
2426
distlib==0.3.9
2527
# via virtualenv
28+
exceptiongroup==1.3.0
29+
# via pytest
2630
filelock==3.18.0
2731
# via virtualenv
2832
forbiddenfruit==0.1.4
@@ -68,8 +72,10 @@ pydantic==2.11.7
6872
pydantic-core==2.33.2
6973
# via pydantic
7074
pygments==2.19.1
71-
# via rich
72-
pytest==8.1.1
75+
# via
76+
# pytest
77+
# rich
78+
pytest==8.4.1
7379
# via
7480
# -r requirements/lint.in
7581
# pytest-codspeed
@@ -90,14 +96,21 @@ six==1.17.0
9096
# via python-dateutil
9197
slotscheck==0.19.1
9298
# via -r requirements/lint.in
99+
tomli==2.2.1
100+
# via
101+
# mypy
102+
# pytest
103+
# slotscheck
93104
trustme==1.2.1
94105
# via -r requirements/lint.in
95106
typing-extensions==4.14.0
96107
# via
108+
# exceptiongroup
97109
# mypy
98110
# pydantic
99111
# pydantic-core
100112
# python-on-whales
113+
# rich
101114
# typing-inspection
102115
typing-inspection==0.4.1
103116
# via pydantic

requirements/test.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ pydantic==2.11.7
9292
pydantic-core==2.33.2
9393
# via pydantic
9494
pygments==2.19.1
95-
# via rich
96-
pytest==8.1.1
95+
# via
96+
# pytest
97+
# rich
98+
pytest==8.4.1
9799
# via
98100
# -r requirements/test.in
99101
# pytest-codspeed
@@ -145,3 +147,5 @@ yarl==1.20.1
145147
# via -r requirements/runtime-deps.in
146148
zlib-ng==0.5.1
147149
# via -r requirements/test.in
150+
zstandard==0.23.0 ; platform_python_implementation == "CPython" and python_version < "3.14"
151+
# via -r requirements/runtime-deps.in

tests/test_client_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def key() -> object:
1616

1717

1818
@pytest.fixture
19-
def loop() -> Any: # type: ignore[misc]
19+
def loop() -> Any:
2020
return mock.create_autospec(asyncio.AbstractEventLoop, spec_set=True, instance=True)
2121

2222

tests/test_client_session.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async def make_conn() -> BaseConnector:
6565

6666

6767
@pytest.fixture
68-
def create_session( # type: ignore[misc]
68+
def create_session(
6969
loop: asyncio.AbstractEventLoop,
7070
) -> Iterator[Callable[..., Awaitable[ClientSession]]]:
7171
session = None
@@ -81,7 +81,7 @@ async def maker(*args: Any, **kwargs: Any) -> ClientSession:
8181

8282

8383
@pytest.fixture
84-
def session( # type: ignore[misc]
84+
def session(
8585
create_session: Callable[..., Awaitable[ClientSession]],
8686
loop: asyncio.AbstractEventLoop,
8787
) -> ClientSession:

tests/test_connector.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,25 @@
5555

5656

5757
@pytest.fixture
58-
def key() -> ConnectionKey: # type: ignore[misc]
58+
def key() -> ConnectionKey:
5959
# Connection key
6060
return ConnectionKey("localhost", 80, False, True, None, None, None)
6161

6262

6363
@pytest.fixture
64-
def key2() -> ConnectionKey: # type: ignore[misc]
64+
def key2() -> ConnectionKey:
6565
# Connection key
6666
return ConnectionKey("localhost", 80, False, True, None, None, None)
6767

6868

6969
@pytest.fixture
70-
def other_host_key2() -> ConnectionKey: # type: ignore[misc]
70+
def other_host_key2() -> ConnectionKey:
7171
# Connection key
7272
return ConnectionKey("otherhost", 80, False, True, None, None, None)
7373

7474

7575
@pytest.fixture
76-
def ssl_key() -> ConnectionKey: # type: ignore[misc]
76+
def ssl_key() -> ConnectionKey:
7777
# Connection key
7878
return ConnectionKey("localhost", 80, True, True, None, None, None)
7979

tests/test_http_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555

5656
@pytest.fixture
57-
def protocol() -> Any: # type: ignore[misc]
57+
def protocol() -> Any:
5858
return mock.create_autospec(BaseProtocol, spec_set=True, instance=True)
5959

6060

tests/test_http_writer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def buf() -> bytearray:
3838

3939

4040
@pytest.fixture
41-
def transport(buf: bytearray) -> Any: # type: ignore[misc]
41+
def transport(buf: bytearray) -> Any:
4242
transport = mock.create_autospec(asyncio.Transport, spec_set=True, instance=True)
4343

4444
def write(chunk: bytes) -> None:
@@ -55,7 +55,7 @@ def writelines(chunks: Iterable[bytes]) -> None:
5555

5656

5757
@pytest.fixture
58-
def protocol(loop: asyncio.AbstractEventLoop, transport: asyncio.Transport) -> Any: # type: ignore[misc]
58+
def protocol(loop: asyncio.AbstractEventLoop, transport: asyncio.Transport) -> Any:
5959
return mock.create_autospec(
6060
BaseProtocol, spec_set=True, instance=True, transport=transport
6161
)

0 commit comments

Comments
 (0)