Skip to content

Commit d8c22eb

Browse files
authored
Update Supported Python Versions (#91)
* Update supported Python versions * Fix tests for new http encoding support * [MegaLinter] Apply linters fixes * Upgrade ruff
1 parent 8a9a0e5 commit d8c22eb

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ jobs:
2828
if: success() || failure() # Does not run on cancelled workflows
2929
runs-on: ubuntu-latest
3030
needs:
31-
- test-py3
31+
- tests
3232
permissions:
3333
contents: read
3434

3535
steps:
3636
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
3737
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # 6.0.0
3838
with:
39-
python-version: "3.10"
39+
python-version: "3.13"
4040
architecture: x64
4141

4242
- name: Download Coverage Artifacts
@@ -59,14 +59,12 @@ jobs:
5959
token: ${{ secrets.CODECOV_TOKEN }}
6060

6161
# Tests
62-
test-py3:
62+
tests:
6363
strategy:
6464
fail-fast: False
6565
matrix:
6666
os: [ubuntu-latest, windows-latest]
6767
python:
68-
- version: "3.8"
69-
tox-prefix: py38
7068
- version: "3.9"
7169
tox-prefix: py39
7270
- version: "3.10"
@@ -77,8 +75,10 @@ jobs:
7775
tox-prefix: py312
7876
- version: "3.13"
7977
tox-prefix: py313
80-
- version: "pypy3.10"
81-
tox-prefix: pypy310
78+
- version: "3.14"
79+
tox-prefix: py314
80+
- version: "pypy3.11"
81+
tox-prefix: pypy311
8282

8383
runs-on: ${{ matrix.os }}
8484
timeout-minutes: 5
@@ -99,7 +99,7 @@ jobs:
9999
pip install -U wheel setuptools tox coverage
100100
101101
- name: Test
102-
run: tox -vv -f ${{ matrix.python.tox-prefix }} -- --cov-report=xml
102+
run: tox run -vv -f ${{ matrix.python.tox-prefix }} -- --cov-report=xml
103103
env:
104104
TOX_DISCOVER: "patch-for-windows-pypy3"
105105

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ default_install_hook_types:
2929
repos:
3030
- repo: https://github.com/astral-sh/ruff-pre-commit
3131
# Ruff version.
32-
rev: v0.13.1
32+
rev: v0.14.2
3333
hooks:
3434
# Run the linter.
3535
- id: ruff-check

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,16 @@ readme = "README.rst"
2828
# "LICENSE",
2929
# "THIRD_PARTY_NOTICES.rst",
3030
# ]
31-
requires-python = ">=3.7"
31+
requires-python = ">=3.9"
3232
dependencies = ['urllib3<3,>=1.26']
3333
classifiers = [
3434
"Development Status :: 3 - Alpha",
35-
"Programming Language :: Python :: 3.7",
36-
"Programming Language :: Python :: 3.8",
3735
"Programming Language :: Python :: 3.9",
3836
"Programming Language :: Python :: 3.10",
3937
"Programming Language :: Python :: 3.11",
4038
"Programming Language :: Python :: 3.12",
4139
"Programming Language :: Python :: 3.13",
40+
"Programming Language :: Python :: 3.14",
4241
"Programming Language :: Python :: Implementation :: CPython",
4342
"Programming Language :: Python :: Implementation :: PyPy",
4443
"Topic :: System :: Monitoring",
@@ -76,7 +75,6 @@ git_describe_command = "git describe --dirty --tags --long --match '*.*.*'"
7675
[tool.ruff]
7776
output-format = "grouped"
7877
line-length = 120
79-
target-version = "py37"
8078
force-exclude = true # Fixes issue with megalinter config preventing exclusion of files
8179
extend-exclude = [
8280
"setup.py",

tests/test_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import functools
1616
import json
1717
import os
18+
import sys
1819
import time
1920
import uuid
2021
import zlib
@@ -232,7 +233,7 @@ def extract_and_validate_metadata(expected_url, request):
232233
assert request.headers["connection"] == "keep-alive"
233234

234235
# Should accept gzip and deflate encoding
235-
assert request.headers["accept-encoding"] == "gzip,deflate"
236+
assert request.headers["accept-encoding"] == "gzip,deflate" if sys.version_info < (3, 14) else "gzip,deflate,zstd"
236237

237238
# Validate that the user agent string is correct
238239
user_agent = request.headers["user-agent"]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
{py37,py38,py39,py310,py311,py312,py313,pypy310}-urllib3_{v1,v2}
3+
{py39,py310,py311,py312,py313,py314,pypy311}-urllib3_{v1,v2}
44
docs
55

66
[testenv]

0 commit comments

Comments
 (0)