diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 82bca72d7a..c9fd81005e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15-dev", "pypy-3.11"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15-dev", "pypy-3.11"] os: [ubuntu-22.04, macOS-latest, windows-latest] # Pypy-3.11 can't install openssl-sys with rust # which prevents us from testing in GHA. @@ -45,10 +45,10 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - name: 'Set up Python 3.9' + - name: 'Set up Python 3.10' uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 with: - python-version: '3.9' + python-version: '3.10' - name: Install dependencies run: | make @@ -65,10 +65,10 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - name: 'Set up Python 3.9' + - name: 'Set up Python 3.10' uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 with: - python-version: '3.9' + python-version: '3.10' - name: Install dependencies run: | make diff --git a/README.md b/README.md index 74adab80dd..66640ff080 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Requests is available on PyPI: $ python -m pip install requests ``` -Requests officially supports Python 3.9+. +Requests officially supports Python 3.10+. ## Supported Features & Best–Practices diff --git a/pyproject.toml b/pyproject.toml index 8f4fe5bad6..f9513bf015 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ maintainers = [ {name = "Ian Stapleton Cordasco", email="graffatcolmingov@gmail.com"}, {name = "Nate Prewitt", email="nate.prewitt@gmail.com"} ] -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "charset_normalizer>=2,<4", "idna>=2.5,<4", @@ -32,7 +32,6 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -85,8 +84,7 @@ select = [ "UP", # pyupgrade "T10", # flake8-debugger (replaces debug-statements hook) ] -# UP036: Remove once Python 3.10 is the minimum supported version -ignore = ["E203", "E501", "UP038", "UP031", "UP036"] +ignore = ["E203", "E501", "UP038", "UP031"] per-file-ignores = {"src/requests/__init__.py" = ["E402", "F401"], "src/requests/compat.py" = ["E402", "F401"], "tests/compat.py" = ["F401"]} [tool.ruff.lint.isort] diff --git a/setup.py b/setup.py index f5f816ae67..1095518ac8 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ import sys -if sys.version_info < (3, 9): - sys.stderr.write("Requests requires Python 3.9 or later.\n") +if sys.version_info < (3, 10): # noqa: UP036 + sys.stderr.write("Requests requires Python 3.10 or later.\n") sys.exit(1) from setuptools import setup diff --git a/tox.ini b/tox.ini index 70c2855123..b316359aae 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{39,310,311,312,313,314}-{default, use_chardet_on_py3} +envlist = py{310,311,312,313,314}-{default, use_chardet_on_py3} [testenv] deps = -rrequirements-dev.txt