Skip to content

Commit 11d6584

Browse files
committed
Remove PY_311
1 parent 7fcdcf0 commit 11d6584

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

aiohttp/helpers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
__all__ = ("BasicAuth", "ChainMapProxy", "ETag")
6666

6767
PY_310 = sys.version_info >= (3, 10)
68-
PY_311 = sys.version_info >= (3, 11)
6968

7069
COOKIE_MAX_LENGTH = 4096
7170

tests/test_helpers.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import datetime
55
import gc
66
import platform
7+
import sys
78
import weakref
89
from math import ceil, modf
910
from pathlib import Path
@@ -16,7 +17,7 @@
1617
from yarl import URL
1718

1819
from aiohttp import helpers
19-
from aiohttp.helpers import PY_311, is_expected_content_type, parse_http_date
20+
from aiohttp.helpers import is_expected_content_type, parse_http_date
2021

2122
IS_PYPY = platform.python_implementation() == "PyPy"
2223

@@ -448,15 +449,15 @@ def test_ceil_call_later_no_timeout() -> None:
448449

449450
async def test_ceil_timeout_none(loop) -> None:
450451
async with helpers.ceil_timeout(None) as cm:
451-
if PY_311:
452+
if sys.version_info >= (3, 11):
452453
assert cm.when() is None
453454
else:
454455
assert cm.deadline is None
455456

456457

457458
async def test_ceil_timeout_round(loop) -> None:
458459
async with helpers.ceil_timeout(7.5) as cm:
459-
if PY_311:
460+
if sys.version_info >= (3, 11):
460461
frac, integer = modf(cm.when())
461462
else:
462463
frac, integer = modf(cm.deadline)
@@ -465,7 +466,7 @@ async def test_ceil_timeout_round(loop) -> None:
465466

466467
async def test_ceil_timeout_small(loop) -> None:
467468
async with helpers.ceil_timeout(1.1) as cm:
468-
if PY_311:
469+
if sys.version_info >= (3, 11):
469470
frac, integer = modf(cm.when())
470471
else:
471472
frac, integer = modf(cm.deadline)
@@ -475,7 +476,7 @@ async def test_ceil_timeout_small(loop) -> None:
475476

476477
async def test_ceil_timeout_small_with_overriden_threshold(loop) -> None:
477478
async with helpers.ceil_timeout(1.5, ceil_threshold=1) as cm:
478-
if PY_311:
479+
if sys.version_info >= (3, 11):
479480
frac, integer = modf(cm.when())
480481
else:
481482
frac, integer = modf(cm.deadline)

0 commit comments

Comments
 (0)