Skip to content

Commit 0c2bbe7

Browse files
authored
Drop support for Python 3.9 (#7196)
1 parent 32e26af commit 0c2bbe7

5 files changed

Lines changed: 11 additions & 13 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15-dev", "pypy-3.11"]
16+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15-dev", "pypy-3.11"]
1717
os: [ubuntu-22.04, macOS-latest, windows-latest]
1818
# Pypy-3.11 can't install openssl-sys with rust
1919
# which prevents us from testing in GHA.
@@ -45,10 +45,10 @@ jobs:
4545

4646
steps:
4747
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
48-
- name: 'Set up Python 3.9'
48+
- name: 'Set up Python 3.10'
4949
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
5050
with:
51-
python-version: '3.9'
51+
python-version: '3.10'
5252
- name: Install dependencies
5353
run: |
5454
make
@@ -65,10 +65,10 @@ jobs:
6565

6666
steps:
6767
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
68-
- name: 'Set up Python 3.9'
68+
- name: 'Set up Python 3.10'
6969
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
7070
with:
71-
python-version: '3.9'
71+
python-version: '3.10'
7272
- name: Install dependencies
7373
run: |
7474
make

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Requests is available on PyPI:
3333
$ python -m pip install requests
3434
```
3535

36-
Requests officially supports Python 3.9+.
36+
Requests officially supports Python 3.10+.
3737

3838
## Supported Features & Best–Practices
3939

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ maintainers = [
1414
{name = "Ian Stapleton Cordasco", email="graffatcolmingov@gmail.com"},
1515
{name = "Nate Prewitt", email="nate.prewitt@gmail.com"}
1616
]
17-
requires-python = ">=3.9"
17+
requires-python = ">=3.10"
1818
dependencies = [
1919
"charset_normalizer>=2,<4",
2020
"idna>=2.5,<4",
@@ -32,7 +32,6 @@ classifiers = [
3232
"Operating System :: OS Independent",
3333
"Programming Language :: Python",
3434
"Programming Language :: Python :: 3",
35-
"Programming Language :: Python :: 3.9",
3635
"Programming Language :: Python :: 3.10",
3736
"Programming Language :: Python :: 3.11",
3837
"Programming Language :: Python :: 3.12",
@@ -85,8 +84,7 @@ select = [
8584
"UP", # pyupgrade
8685
"T10", # flake8-debugger (replaces debug-statements hook)
8786
]
88-
# UP036: Remove once Python 3.10 is the minimum supported version
89-
ignore = ["E203", "E501", "UP038", "UP031", "UP036"]
87+
ignore = ["E203", "E501", "UP038", "UP031"]
9088
per-file-ignores = {"src/requests/__init__.py" = ["E402", "F401"], "src/requests/compat.py" = ["E402", "F401"], "tests/compat.py" = ["F401"]}
9189

9290
[tool.ruff.lint.isort]

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22

3-
if sys.version_info < (3, 9):
4-
sys.stderr.write("Requests requires Python 3.9 or later.\n")
3+
if sys.version_info < (3, 10): # noqa: UP036
4+
sys.stderr.write("Requests requires Python 3.10 or later.\n")
55
sys.exit(1)
66

77
from setuptools import setup

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{39,310,311,312,313,314}-{default, use_chardet_on_py3}
2+
envlist = py{310,311,312,313,314}-{default, use_chardet_on_py3}
33

44
[testenv]
55
deps = -rrequirements-dev.txt

0 commit comments

Comments
 (0)