Skip to content

Commit fda7896

Browse files
Drop support for Python 3.9 (#2778)
* Remove release tests workflow
1 parent 43d32d2 commit fda7896

34 files changed

+367
-1028
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
strategy:
8282
fail-fast: false
8383
matrix:
84-
python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14-dev"]
84+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14-dev"]
8585
outputs:
8686
python-key: ${{ steps.generate-python-key.outputs.key }}
8787
steps:
@@ -139,7 +139,7 @@ jobs:
139139
strategy:
140140
fail-fast: false
141141
matrix:
142-
python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14-dev"]
142+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14-dev"]
143143
steps:
144144
- name: Set temp directory
145145
run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
@@ -194,7 +194,7 @@ jobs:
194194
fail-fast: false
195195
matrix:
196196
# We only test on the lowest and highest supported PyPy versions
197-
python-version: ["pypy3.9", "pypy3.10"]
197+
python-version: ["pypy3.10"]
198198
steps:
199199
- name: Check out code from GitHub
200200
uses: actions/[email protected]

.github/workflows/release-tests.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
hooks:
2727
- id: pyupgrade
2828
exclude: tests/testdata
29-
args: [--py39-plus]
29+
args: [--py310-plus]
3030
- repo: https://github.com/Pierre-Sassoulas/black-disable-checker/
3131
rev: v1.1.3
3232
hooks:

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Release date: TBA
3232

3333
Closes #2513
3434

35+
* Remove support for Python 3.9 (and constant `PY310_PLUS`).
36+
3537
* Include subclasses of standard property classes as `property` decorators
3638

3739
Closes #10377

astroid/__init__.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
* builder contains the class responsible to build astroid trees
3131
"""
3232

33-
import functools
34-
import tokenize
35-
3633
# isort: off
3734
# We have an isort: off on 'astroid.nodes' because of a circular import.
3835
from astroid.nodes import node_classes, scoped_nodes
@@ -44,7 +41,7 @@
4441
from astroid.bases import BaseInstance, BoundMethod, Instance, UnboundMethod
4542
from astroid.brain.helpers import register_module_extender
4643
from astroid.builder import extract_node, parse
47-
from astroid.const import PY310_PLUS, Context
44+
from astroid.const import Context
4845
from astroid.exceptions import (
4946
AstroidBuildingError,
5047
AstroidError,
@@ -175,12 +172,3 @@
175172
# isort: on
176173

177174
from astroid.util import Uninferable
178-
179-
# Performance hack for tokenize. See https://bugs.python.org/issue43014
180-
# Adapted from https://github.com/PyCQA/pycodestyle/pull/993
181-
if (
182-
not PY310_PLUS
183-
and callable(getattr(tokenize, "_compile", None))
184-
and getattr(tokenize._compile, "__wrapped__", None) is None # type: ignore[attr-defined]
185-
):
186-
tokenize._compile = functools.lru_cache(tokenize._compile) # type: ignore[attr-defined]

0 commit comments

Comments
 (0)