Skip to content

Commit c8c3fb8

Browse files
authored
Drop support of end-of-life Python 3.9 (#1325)
* Drop support of end-of-life Python 3.9 Python 3.9 was officially EOL in October of 2025. We're already starting to see some packages like pyupgrade drop 3.9. The pyupgrade library is a dependency for pre-commit. This change: * removes testing on 3.9 * updates classifier without 3.9 * sets minimum Python install ver to 3.10 * sets default tox environment to 3.10 * removes mentions of 3.9 related comments https://devguide.python.org/versions/ Signed-off-by: Eric Brown <[email protected]> * Quote version strings in workflow Signed-off-by: Eric Brown <[email protected]> * Run readthedocs in 3.10 Signed-off-by: Eric Brown <[email protected]> --------- Signed-off-by: Eric Brown <[email protected]>
1 parent 5c30350 commit c8c3fb8

File tree

9 files changed

+10
-17
lines changed

9 files changed

+10
-17
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
- uses: actions/checkout@v5
1414
with:
1515
fetch-depth: 0
16-
- name: Set up Python 3.9
16+
- name: Set up Python 3.10
1717
uses: actions/setup-python@v6
1818
with:
19-
python-version: 3.9
19+
python-version: 3.10
2020

2121
- name: Install dependencies
2222
run: pip install tox wheel

.github/workflows/publish-to-test-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
- uses: actions/checkout@v5
1414
with:
1515
fetch-depth: 0
16-
- name: Set up Python 3.9
16+
- name: Set up Python 3.10
1717
uses: actions/setup-python@v6
1818
with:
19-
python-version: 3.9
19+
python-version: 3.10
2020

2121
- name: Install dependencies
2222
run: pip install tox wheel

.github/workflows/pythonpackage.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-version: [3.9]
10+
python-version: ["3.10"]
1111
steps:
1212
- name: Checkout repository
1313
uses: actions/checkout@v5
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
strategy:
2828
matrix:
29-
python-version: [3.9]
29+
python-version: ["3.10"]
3030
steps:
3131
- name: Checkout repository
3232
uses: actions/checkout@v5
@@ -47,7 +47,6 @@ jobs:
4747
strategy:
4848
matrix:
4949
python-version: [
50-
["3.9", "39"],
5150
["3.10", "310"],
5251
["3.11", "311"],
5352
["3.12", "312"],

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: ubuntu-lts-latest
55
tools:
6-
python: "3.9"
6+
python: "3.10"
77

88
sphinx:
99
configuration: doc/source/conf.py

bandit/plugins/hashlib_insecure_functions.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
can be used to create insecure hash functions like MD4 and MD5 if they are
1212
passed as algorithm names to this function.
1313
14-
For Python versions prior to 3.9, this check is similar to B303 blacklist
15-
except that this checks for insecure hash functions created using
16-
``hashlib.new`` function. For Python version 3.9 and later, this check
17-
does additional checking for usage of keyword usedforsecurity on all
14+
This check does additional checking for usage of keyword usedforsecurity on all
1815
function variations of hashlib.
1916
2017
Similar to ``hashlib``, this plugin also checks for usage of one of the

examples/hashlib_new_insecure_functions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@
1616

1717
hashlib.new(name='SHA', data=b'test')
1818

19-
# usedforsecurity arg only availabe in Python 3.9+
2019
hashlib.new('sha1', usedforsecurity=True)
2120

2221
# Test that plugin does not flag valid hash functions.
2322
hashlib.new('sha256')
2423

2524
hashlib.new('SHA512')
2625

27-
# usedforsecurity arg only availabe in Python 3.9+
2826
hashlib.new(name='sha1', usedforsecurity=False)

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ classifiers =
1717
Operating System :: MacOS :: MacOS X
1818
Programming Language :: Python
1919
Programming Language :: Python :: 3
20-
Programming Language :: Python :: 3.9
2120
Programming Language :: Python :: 3.10
2221
Programming Language :: Python :: 3.11
2322
Programming Language :: Python :: 3.12

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
setuptools.setup(
16-
python_requires=">=3.9",
16+
python_requires=">=3.10",
1717
setup_requires=["pbr>=2.0.0"],
1818
pbr=True,
1919
data_files=data_files,

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 3.2.0
3-
envlist = py39,pep8
3+
envlist = py310,pep8
44

55
[testenv]
66
usedevelop = True

0 commit comments

Comments
 (0)