Skip to content

Commit 11954c2

Browse files
authored
Remove Python 2.7 and 3.5 support (#171)
* Remove also PyPy 2.x support. * Specify the minimum supported Python version in pythoncapi_compat.h.
1 parent 75a7967 commit 11954c2

9 files changed

Lines changed: 33 additions & 286 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
# - https://downloads.python.org/pypy/
4040
# - Only versions listed in this JSON are supported:
4141
# https://downloads.python.org/pypy/versions.json
42-
- "pypy2.7"
4342
- "pypy3.6"
4443
- "pypy3.7"
4544
- "pypy3.8"
@@ -49,7 +48,6 @@ jobs:
4948

5049
# Old PyPy versions
5150
# See https://foss.heptapod.net/pypy/pypy/-/issues/3991
52-
- "pypy2.7-v7.3.2"
5351
- "pypy3.6-v7.3.2"
5452
- "pypy3.7-v7.3.2"
5553

@@ -117,21 +115,3 @@ jobs:
117115
run: python -VV
118116
- name: Run tests
119117
run: python runtests.py --current --verbose
120-
121-
test_python27:
122-
# Get Python 2.7 from Ubuntu 22.04.
123-
#
124-
# Python 2.7 was removed from GHA setup-python in June 2023:
125-
# https://github.com/actions/setup-python/issues/672
126-
name: 'Test Python 2.7'
127-
runs-on: ubuntu-22.04
128-
steps:
129-
- uses: actions/checkout@v4
130-
- name: Install Python 2.7
131-
run: |
132-
sudo apt-get update
133-
sudo apt-get -yq install python2.7 python2.7-dev
134-
- name: Display the Python version
135-
run: python2.7 -VV
136-
- name: Run tests
137-
run: python2.7 runtests.py --current --verbose

docs/api.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@ Supported Python versions:
1010
* Python 3.6 - 3.15
1111
* PyPy 2.7 and PyPy 3.6 - 3.10
1212

13-
Python 2.7 and Python 3.5 are no longer officially supported since GitHub
14-
Actions doesn't support them anymore: only best effort support is provided.
15-
1613
C++03 and C++11 are supported on Python 3.6 and newer.
1714

1815
A C11 subset (without optional features) is required, like ``static inline``
19-
functions: see `PEP 7 <https://www.python.org/dev/peps/pep-0007/>`_. ISO C90
20-
is partially supported for Python 2.7.
16+
functions: see `PEP 7 <https://www.python.org/dev/peps/pep-0007/>`_.
2117

2218
Some functions related to frame objects and ``PyThreadState`` are not available
2319
on PyPy.

docs/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
* 2026-09-07: Remove code to support Python 2.7, Python 3.5 and PyPy
5+
for Python 2.7 ("pypy2").
6+
Python 2.7 was no longer supported since August 2023.
7+
Python 3.5 was no longer supported since October 2024.
48
* 2026-02-12: Add functions:
59

610
* ``PyUnstable_SetImmortal()``

0 commit comments

Comments
 (0)