Skip to content

Commit ad0497b

Browse files
authored
Drop support for Python 3.11 (#14153)
1 parent 0a577b8 commit ad0497b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+154
-377
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
python:
39-
- "3.11"
4039
- "3.12"
4140
- "3.13"
4241
- "3.13t"

.ruff.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
target-version = "py311" # Pin Ruff to Python 3.11
1+
target-version = "py312" # Pin Ruff to Python 3.12
22
line-length = 88
33
output-format = "full"
44

@@ -9,9 +9,6 @@ extend-exclude = [
99
"tests/roots/test-pycode/cp_1251_coded.py", # Not UTF-8
1010
]
1111

12-
[per-file-target-version]
13-
"tests/roots/test-ext-autodoc/target/pep695.py" = "py312"
14-
1512
[format]
1613
preview = true
1714
quote-style = "single"

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Release 9.1.0 (in development)
44
Dependencies
55
------------
66

7+
* #14153: Drop Python 3.11 support.
8+
79
Incompatible changes
810
--------------------
911

doc/internals/contributing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,18 +201,18 @@ of targets and allows testing against multiple different Python environments:
201201
202202
tox -av
203203
204-
* To run unit tests for a specific Python version, such as Python 3.13:
204+
* To run unit tests for a specific Python version, such as Python 3.14:
205205

206206
.. code-block:: shell
207207
208-
tox -e py313
208+
tox -e py314
209209
210210
* Arguments to :program:`pytest` can be passed via :program:`tox`,
211211
e.g., in order to run a particular test:
212212

213213
.. code-block:: shell
214214
215-
tox -e py313 tests/test_module.py::test_new_feature
215+
tox -e py314 tests/test_module.py::test_new_feature
216216
217217
You can also test by installing dependencies in your local environment:
218218

doc/tutorial/deploying.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ After you have published your sources on GitLab, create a file named
249249
250250
pages:
251251
stage: deploy
252-
image: python:3.12-slim
252+
image: python:3.14-slim
253253
before_script:
254254
- apt-get update && apt-get install make --no-install-recommends -y
255255
- python -m pip install sphinx furo

doc/usage/extensions/doctest.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ a comma-separated list of group names.
116116
117117
Specify the required Python version for the example to be tested. For instance,
118118
in the following case the example will be tested only for Python versions greater
119-
than 3.12::
119+
than 3.14::
120120
121121
.. doctest::
122-
:pyversion: > 3.12
122+
:pyversion: > 3.14
123123
124124
The following operands are supported:
125125

doc/usage/installation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,18 @@ Install either ``python3x-sphinx`` using :command:`port`:
152152

153153
::
154154

155-
$ sudo port install py313-sphinx
155+
$ sudo port install py314-sphinx
156156

157157
To set up the executable paths, use the ``port select`` command:
158158

159159
::
160160

161-
$ sudo port select --set python python313
162-
$ sudo port select --set sphinx py313-sphinx
161+
$ sudo port select --set python python314
162+
$ sudo port select --set sphinx py314-sphinx
163163

164164
For more information, refer to the `package overview`__.
165165

166-
__ https://www.macports.org/ports.php?by=library&substr=py313-sphinx
166+
__ https://www.macports.org/ports.php?by=library&substr=py314-sphinx
167167

168168
Windows
169169
~~~~~~~

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ license = "BSD-2-Clause"
1717
license-files = [
1818
"LICENSE.rst",
1919
]
20-
requires-python = ">=3.11"
20+
requires-python = ">=3.12"
2121

2222
# Classifiers list: https://pypi.org/classifiers/
2323
classifiers = [
@@ -35,7 +35,6 @@ classifiers = [
3535
"Programming Language :: Python",
3636
"Programming Language :: Python :: 3",
3737
"Programming Language :: Python :: 3 :: Only",
38-
"Programming Language :: Python :: 3.11",
3938
"Programming Language :: Python :: 3.12",
4039
"Programming Language :: Python :: 3.13",
4140
"Programming Language :: Python :: 3.14",
@@ -180,7 +179,7 @@ files = [
180179
exclude = [
181180
"tests/roots",
182181
]
183-
python_version = "3.11"
182+
python_version = "3.12"
184183
strict = true
185184
show_column_numbers = true
186185
show_error_context = true

pyrefly.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ project_includes = [
1515
project_excludes = [
1616
"**/tests/roots*",
1717
]
18-
python_version = "3.11"
18+
python_version = "3.12"
1919
replace_imports_with_any = [
2020
"imagesize",
2121
"pyximport",

sphinx/_cli/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@
3636

3737
if TYPE_CHECKING:
3838
from collections.abc import Callable, Iterable, Iterator, Sequence
39-
from typing import NoReturn, TypeAlias
39+
from typing import NoReturn
4040

41-
_PARSER_SETUP: TypeAlias = Callable[
42-
[argparse.ArgumentParser], argparse.ArgumentParser
43-
]
44-
_RUNNER: TypeAlias = Callable[[argparse.Namespace], int]
41+
type _PARSER_SETUP = Callable[[argparse.ArgumentParser], argparse.ArgumentParser]
42+
type _RUNNER = Callable[[argparse.Namespace], int]
4543

4644
from typing import Protocol
4745

0 commit comments

Comments
 (0)