Skip to content

Commit 19f8cec

Browse files
committed
Move aiohttp workaround to noxfile.py
It allows centralizing it.
1 parent d0f3a1f commit 19f8cec

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ jobs:
1717
run: python3 -m pip install nox
1818
- name: Lint the code
1919
run: nox -s lint
20-
env:
21-
# Workaround for development versions of Python
22-
# https://github.com/aio-libs/aiohttp/issues/7675
23-
AIOHTTP_NO_EXTENSIONS: 1
2420

2521
test-linux:
2622
strategy:
@@ -47,11 +43,4 @@ jobs:
4743
run: .ci/run-nox.sh
4844
env:
4945
PYTHON_VERSION: ${{ matrix.python-version }}
50-
NOX_SESSION: ${{ matrix.nox-session }}
51-
# Workaround for development versions of Python
52-
# https://github.com/aio-libs/aiohttp/issues/7675
53-
AIOHTTP_NO_EXTENSIONS: 1
54-
# https://github.com/aio-libs/frozenlist/issues/285
55-
FROZENLIST_NO_EXTENSIONS: 1
56-
# https://github.com/aio-libs/yarl/issues/680
57-
YARL_NO_EXTENSIONS: 1
46+
NOX_SESSION: ${{ matrix.nox-session }}

noxfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@
2828
"test_elasticsearch/",
2929
"utils/",
3030
)
31+
# Allow building aiohttp when no wheels are available (eg. for recent Python versions)
32+
INSTALL_ENV = {"AIOHTTP_NO_EXTENSIONS": "1"}
3133

3234

3335
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
3436
def test(session):
35-
session.install(".")
37+
session.install(".[async,requests]", env=INSTALL_ENV)
3638
session.install("-r", "dev-requirements.txt")
3739

3840
python_version = tuple(int(x) for x in session.python.split("."))
@@ -77,7 +79,7 @@ def lint(session):
7779
session.run("python", "utils/license-headers.py", "check", *SOURCE_FILES)
7880

7981
# Workaround to make '-r' to still work despite uninstalling aiohttp below.
80-
session.install(".[async,requests]")
82+
session.install(".[async,requests]", env=INSTALL_ENV)
8183

8284
# Run mypy on the package and then the type examples separately for
8385
# the two different mypy use-cases, ourselves and our users.

0 commit comments

Comments
 (0)