Skip to content

Commit 36de40a

Browse files
[PR #11271/331c9892 backport][3.12] Update a regex in test_aiohttp_request_coroutine for Python 3.14 (#11302)
**This is a backport of PR #11271 as merged into master (331c989).** Co-authored-by: Ben Beasley <[email protected]>
1 parent 40cc09e commit 36de40a

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGES/11271.contrib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated a regex in `test_aiohttp_request_coroutine` for Python 3.14.

CONTRIBUTORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Arthur Darcet
5757
Austin Scola
5858
Bai Haoran
5959
Ben Bader
60+
Ben Beasley
6061
Ben Greiner
6162
Ben Kallus
6263
Ben Timby

tests/test_client_functional.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3656,8 +3656,12 @@ async def handler(request: web.Request) -> web.Response:
36563656
not_an_awaitable = aiohttp.request("GET", server.make_url("/"))
36573657
with pytest.raises(
36583658
TypeError,
3659-
match="^object _SessionRequestContextManager "
3660-
"can't be used in 'await' expression$",
3659+
match=(
3660+
"^'_SessionRequestContextManager' object can't be awaited$"
3661+
if sys.version_info >= (3, 14)
3662+
else "^object _SessionRequestContextManager "
3663+
"can't be used in 'await' expression$"
3664+
),
36613665
):
36623666
await not_an_awaitable # type: ignore[misc]
36633667

0 commit comments

Comments
 (0)