Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,13 @@ jobs:
needs: gen_llhttp
strategy:
matrix:
pyver: [3.8, 3.9, '3.10', '3.11', '3.12']
pyver: [3.9, '3.10', '3.11', '3.12']
no-extensions: ['', 'Y']
os: [ubuntu, macos, windows]
experimental: [false]
exclude:
- os: macos
no-extensions: 'Y'
- os: macos
pyver: 3.8
- os: windows
no-extensions: 'Y'
include:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- name: Install dependencies
run: >-
pip install -r requirements/lint.in -c requirements/lint.txt
Expand All @@ -33,4 +33,4 @@ jobs:
body: |
Update versions of tools in pre-commit
configs to latest version
labels: dependencies backport-3.7 backport-3.8
labels: dependencies backport-3.10 backport-3.11
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ define run_tests_in_docker
docker run --rm -ti -v `pwd`:/src -w /src "aiohttp-test-$(1)-$(2)" $(TEST_SPEC)
endef

.PHONY: test-3.8-no-extensions test-3.8 test-3.9-no-extensions test
test-3.8-no-extensions:
$(call run_tests_in_docker,3.8,y)
test-3.8:
$(call run_tests_in_docker,3.8,n)
.PHONY: test-3.9-no-extensions test
test-3.9-no-extensions:
$(call run_tests_in_docker,3.9,y)
test-3.9:
Expand Down
2 changes: 1 addition & 1 deletion aiohttp/cookiejar.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class CookieJar(AbstractCookieJar):
except (OSError, ValueError):
# Hit the maximum representable time on Windows
# https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/localtime-localtime32-localtime64
# Throws ValueError on PyPy 3.8 and 3.9, OSError elsewhere
# Throws ValueError on PyPy 3.9, OSError elsewhere
MAX_TIME = calendar.timegm((3000, 12, 31, 23, 59, 59, -1, -1, -1))
except OverflowError:
# #4515: datetime.max may not be representable on 32-bit platforms
Expand Down
5 changes: 2 additions & 3 deletions aiohttp/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


_NUMERIC_SOCKET_FLAGS = socket.AI_NUMERICHOST | socket.AI_NUMERICSERV
_SUPPORTS_SCOPE_ID = sys.version_info >= (3, 9, 0)


class ThreadedResolver(AbstractResolver):
Expand Down Expand Up @@ -49,7 +48,7 @@ async def resolve(
# IPv6 is not supported by Python build,
# or IPv6 is not enabled in the host
continue
if address[3] and _SUPPORTS_SCOPE_ID:
if address[3]:
# This is essential for link-local IPv6 addresses.
# LL IPv6 is a VERY rare case. Strictly speaking, we should use
# getnameinfo() unconditionally, but performance makes sense.
Expand Down Expand Up @@ -107,7 +106,7 @@ async def resolve(
address: Union[Tuple[bytes, int], Tuple[bytes, int, int, int]] = node.addr
family = node.family
if family == socket.AF_INET6:
if len(address) > 3 and address[3] and _SUPPORTS_SCOPE_ID:
if len(address) > 3 and address[3]:
# This is essential for link-local IPv6 addresses.
# LL IPv6 is a VERY rare case. Strictly speaking, we should use
# getnameinfo() unconditionally, but performance makes sense.
Expand Down
3 changes: 0 additions & 3 deletions aiohttp/web_fileresponse.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@

CONTENT_TYPES: Final[MimeTypes] = MimeTypes()

if sys.version_info < (3, 9):
CONTENT_TYPES.encodings_map[".br"] = "br"

# File extension to IANA encodings map that will be checked in the order defined.
ENCODING_EXTENSIONS = MappingProxyType(
{ext: CONTENT_TYPES.encodings_map[ext] for ext in (".br", ".gz")}
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ classifiers =

Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Expand All @@ -42,7 +41,7 @@ classifiers =
Topic :: Internet :: WWW/HTTP

[options]
python_requires = >=3.8
python_requires = >=3.9
packages = aiohttp
# https://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag
zip_safe = False
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from setuptools import Extension, setup

if sys.version_info < (3, 8):
if sys.version_info < (3, 9):
raise RuntimeError("aiohttp 4.x requires Python 3.8+")


Expand Down