Skip to content

Commit 2c238cf

Browse files
authored
Start testing Python 3.15 Alpha (boto#3628)
Add Python 3.15-dev to the GitHub Actions matrices for run-tests and run-crt-test to catch compatibility issues early without claiming official support. Set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 only for the 3.15-dev matrix jobs to avoid prerelease install failures from PyO3-based dependencies. Update tests/unit/test_compress.py test helpers to pin compresslevel=9 (with mtime fixed) so gzip byte-for-byte fixtures stay stable across Python versions, including 3.15.
1 parent 1045cd5 commit 2c238cf

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

.github/workflows/run-crt-test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ concurrency:
1515
jobs:
1616
build:
1717
runs-on: '${{ matrix.os }}'
18+
continue-on-error: ${{ matrix.python-version == '3.15-dev' }}
1819
strategy:
1920
fail-fast: false
2021
matrix:
21-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
22+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', '3.15-dev']
2223
os: [ubuntu-latest, macOS-latest, windows-latest]
24+
env:
25+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: ${{ matrix.python-version == '3.15-dev' && '1' || '' }}
2326

2427
steps:
2528
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3

.github/workflows/run-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ concurrency:
1515
jobs:
1616
build:
1717
runs-on: '${{ matrix.os }}'
18+
continue-on-error: ${{ matrix.python-version == '3.15-dev' }}
1819
strategy:
1920
fail-fast: false
2021
matrix:
21-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
22+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', '3.15-dev']
2223
os: [ubuntu-latest, macOS-latest, windows-latest]
24+
env:
25+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: ${{ matrix.python-version == '3.15-dev' && '1' || '' }}
2326

2427
steps:
2528
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3

requirements-dev-lock.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,9 @@ tomli==2.2.1 \
311311
# via
312312
# coverage
313313
# pytest
314-
typing-extensions==4.13.2 \
315-
--hash=sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c \
316-
--hash=sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef
314+
typing-extensions==4.15.0 \
315+
--hash=sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466 \
316+
--hash=sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548
317317
# via
318318
# exceptiongroup
319319
# referencing

tests/unit/test_compress.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,17 @@ def request_dict_non_seekable_bytes_stream():
107107
class StaticGzipFile(gzip.GzipFile):
108108
def __init__(self, *args, **kwargs):
109109
kwargs['mtime'] = 1
110+
# Python 3.15 changed default gzip header output; pin level so these
111+
# tests remain byte-stable across runtimes.
112+
kwargs['compresslevel'] = 9
110113
super().__init__(*args, **kwargs)
111114

112115

113116
def static_compress(*args, **kwargs):
114117
kwargs['mtime'] = 1
118+
# Python 3.15 changed default gzip header output; pin level so these
119+
# tests remain byte-stable across runtimes.
120+
kwargs['compresslevel'] = 9
115121
return gzip.compress(*args, **kwargs)
116122

117123

0 commit comments

Comments
 (0)