Skip to content

Commit 00ac257

Browse files
authored
Fix CI (#101)
* Fix CI * Fix workflow syntax * Add 3.12 and remove 3.11 workarounds * Disable extensions again for 3.12-dev * Add missing PyPI classifiers
1 parent f2802c3 commit 00ac257

File tree

8 files changed

+22
-19
lines changed

8 files changed

+22
-19
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@ jobs:
3939
strategy:
4040
fail-fast: false
4141
matrix:
42-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11-dev"]
42+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
43+
os: ["ubuntu-latest"]
4344
experimental: [false]
45+
include:
46+
- python-version: "3.6"
47+
experimental: false
48+
os: ubuntu-20.04
4449

45-
runs-on: ubuntu-latest
50+
runs-on: ${{ matrix.os }}
4651
name: test-${{ matrix.python-version }}
4752
continue-on-error: ${{ matrix.experimental }}
4853
steps:
@@ -54,11 +59,10 @@ jobs:
5459
with:
5560
python-version: ${{ matrix.python-version }}
5661

57-
- name: Set up Python 3.7 to run nox
58-
if: matrix.python-version != '3.7'
62+
- name: Set up Python 3.x to run nox
5963
uses: actions/setup-python@v2
6064
with:
61-
python-version: 3.7
65+
python-version: 3.x
6266

6367
- name: Install Dependencies
6468
run: python -m pip install --upgrade nox
@@ -67,10 +71,7 @@ jobs:
6771
run: "nox -rs test-${PYTHON_VERSION%-dev}"
6872
env:
6973
PYTHON_VERSION: ${{ matrix.python-version }}
70-
# TEMPORARY for 3.11
71-
# https://github.com/aio-libs/aiohttp/issues/6600
74+
# Required for development versions of Python
7275
AIOHTTP_NO_EXTENSIONS: 1
73-
# https://github.com/aio-libs/frozenlist/issues/285
7476
FROZENLIST_NO_EXTENSIONS: 1
75-
# https://github.com/aio-libs/yarl/issues/680
7677
YARL_NO_EXTENSIONS: 1

elastic_transport/_async_transport.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ async def perform_request( # type: ignore[override,return]
244244
errors: List[Exception] = []
245245

246246
for attempt in range(max_retries + 1):
247-
248247
# If we sniff before requests are made we want to do so before
249248
# 'node_pool.get()' is called so our sniffed nodes show up in the pool.
250249
if self._sniff_before_requests:

elastic_transport/_node/_http_requests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def init_poolmanager(
6161
block: bool = False,
6262
**pool_kwargs: Any,
6363
) -> None:
64-
6564
if self._node_config.scheme == "https":
6665
ssl_context = ssl_context_from_node_config(self._node_config)
6766
pool_kwargs.setdefault("ssl_context", ssl_context)
@@ -71,7 +70,6 @@ def init_poolmanager(
7170
# about the fingerprint of the certificates, not whether they form
7271
# a verified chain to a trust anchor.
7372
if self._node_config.ssl_assert_fingerprint:
74-
7573
# Manually disable these in the right order on the SSLContext
7674
# so urllib3 won't think we want conflicting things.
7775
ssl_context.check_hostname = False

elastic_transport/_node/_http_urllib3.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def __init__(self, config: NodeConfig):
7070
# about the fingerprint of the certificates, not whether they form
7171
# a verified chain to a trust anchor.
7272
elif config.ssl_assert_fingerprint:
73-
7473
# Manually disable these in the right order on the SSLContext
7574
# so urllib3 won't think we want conflicting things.
7675
ssl_context.check_hostname = False
@@ -137,7 +136,6 @@ def perform_request(
137136
headers: Optional[HttpHeaders] = None,
138137
request_timeout: Union[DefaultType, Optional[float]] = DEFAULT,
139138
) -> NodeApiResponse:
140-
141139
if self.path_prefix:
142140
target = f"{self.path_prefix}{target}"
143141

elastic_transport/_transport.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ def perform_request( # type: ignore[return]
314314
errors: List[Exception] = []
315315

316316
for attempt in range(max_retries + 1):
317-
318317
# If we sniff before requests are made we want to do so before
319318
# 'node_pool.get()' is called so our sniffed nodes show up in the pool.
320319
if self._sniff_before_requests:

elastic_transport/client_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def url_to_node_config(
198198

199199
# Only fill in a default port for HTTP and HTTPS
200200
# when we know the scheme is one of those two.
201-
parsed_port: Optional[int] = parsed_url.port # type: ignore[assignment]
201+
parsed_port: Optional[int] = parsed_url.port
202202
if (
203203
parsed_url.port is None
204204
and parsed_url.scheme is not None

noxfile.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
@nox.session()
3131
def format(session):
32-
session.install("black", "isort", "pyupgrade")
32+
session.install("black~=23.0", "isort", "pyupgrade")
3333
session.run("black", "--target-version=py36", *SOURCE_FILES)
3434
session.run("isort", *SOURCE_FILES)
3535
session.run("python", "utils/license-headers.py", "fix", *SOURCE_FILES)
@@ -40,7 +40,13 @@ def format(session):
4040
@nox.session
4141
def lint(session):
4242
session.install(
43-
"flake8", "black", "isort", "mypy", "types-requests", "types-certifi"
43+
"flake8",
44+
"black~=23.0",
45+
"isort",
46+
"mypy==1.0.1",
47+
"types-urllib3",
48+
"types-requests",
49+
"types-certifi",
4450
)
4551
session.install(".[develop]")
4652
session.run("black", "--check", "--target-version=py36", *SOURCE_FILES)
@@ -50,7 +56,7 @@ def lint(session):
5056
session.run("mypy", "--strict", "--show-error-codes", "elastic_transport/")
5157

5258

53-
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"])
59+
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
5460
def test(session):
5561
session.install(".[develop]")
5662
session.run(

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@
8080
"Programming Language :: Python :: 3.8",
8181
"Programming Language :: Python :: 3.9",
8282
"Programming Language :: Python :: 3.10",
83+
"Programming Language :: Python :: 3.11",
84+
"Programming Language :: Python :: 3.12",
8385
"Programming Language :: Python :: Implementation :: CPython",
8486
"Programming Language :: Python :: Implementation :: PyPy",
8587
],

0 commit comments

Comments
 (0)