Skip to content

Commit 7e391d6

Browse files
authored
Merge pull request #309 from netromdk/py3.14
Python 3.14 support
2 parents aefeea5 + 06690b2 commit 7e391d6

24 files changed

+1204
-205
lines changed

.github/workflows/analyze.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
python-version: ['3.13']
21+
python-version: ['3.14']
2222

2323
steps:
2424
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Security Check
2+
3+
# On all pushes to PRs or pushes to specific branches. Not on ALL pushes in general because it will
4+
# double if pushing to a PR.
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- 'master'
10+
- 'dev'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
check:
17+
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
# NOTE: Keep at 3.13 until Bandit updates with 3.14 support!
22+
python-version: ['3.13']
23+
24+
steps:
25+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
31+
with:
32+
path: ~/.cache/pip
33+
key: ${{ runner.os}}-pip-${{ hashFiles('**/.*-requirements.txt') }}
34+
restore-keys: |
35+
${{ runner.os}}-pip-
36+
- name: Security Check
37+
run: ./misc/actions/security-check.sh

.github/workflows/test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
matrix:
20-
# Start Linux jobs last since they are fastest to start and complete, and start 3.13 first,
20+
# Start Linux jobs last since they are fastest to start and complete, and start 3.14 first,
2121
# since it pairs wiht macOS+Windows jobs, and 3.5 and 3.6 last since they only run tests and
2222
# don't use venv. 3.4 is not supported on GitHub anymore and 3.5 and 3.6 for x64 isn't
2323
# produced for ubuntu 22.04.
24-
python-version: ['3.13', '3.12', '3.11', '3.10', 3.9, 3.8, 3.7, 3.6, 3.5]
24+
python-version: ['3.14', '3.13', '3.12', '3.11', '3.10', 3.9, 3.8, 3.7, 3.6, 3.5]
2525
os: [windows-latest, macos-latest, ubuntu-latest]
2626

2727
# Choose test script depending on OS.
@@ -34,7 +34,7 @@ jobs:
3434
test_script_name: ./misc/actions/test.ps1
3535

3636
exclude:
37-
# Only test on macOS and Windows with Python 3.13.
37+
# Only test on macOS and Windows with Python 3.14.
3838
- os: macos-latest
3939
python-version: 3.5
4040
- os: macos-latest
@@ -51,6 +51,8 @@ jobs:
5151
python-version: '3.11'
5252
- os: macos-latest
5353
python-version: '3.12'
54+
- os: macos-latest
55+
python-version: '3.13'
5456

5557
- os: windows-latest
5658
python-version: 3.5
@@ -68,6 +70,8 @@ jobs:
6870
python-version: '3.11'
6971
- os: windows-latest
7072
python-version: '3.12'
73+
- os: windows-latest
74+
python-version: '3.13'
7175

7276
# Ignore 3.5, 3.6, and 3.7 on Linux because it isn't compiled for x64 on Ubuntu 22.04.
7377
- os: ubuntu-latest

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,13 @@ clean-venv:
4545
rm -fr .venv
4646

4747
clean-pypi:
48-
rm -fr build dist *.egg-info
48+
rm -fr build dist *.egg-info vermin/*.egg-info
4949

5050
dist-clean: clean clean-venv clean-pypi
5151

5252
pypi-dist: clean-pypi
53-
python -m pip install --upgrade wheel twine
54-
python setup.py sdist
55-
python setup.py bdist_wheel --universal
53+
python -m pip install --upgrade build wheel twine
54+
python -m build
5655

5756
update-coverage-requirements: setup-venv setup-coverage
5857
pip freeze > misc/.coverage-requirements.txt
@@ -79,7 +78,7 @@ semgrep-dry-run:
7978
${SEMGREP_CMD} --dry-run
8079

8180
lint:
82-
pylint -j 0 --disable=C0103,C0114,C0115,C0116,C0209,C0302,W0201,W0311,W0621,W0703,R0801,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0916,R1702,E1136\
81+
pylint -j 0 --disable=C0103,C0114,C0115,C0116,C0209,C0302,W0201,W0311,W0621,W0703,R0801,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0916,R0917,R1702,E1101,E1136\
8382
${TOP_LEVEL_FILES}
8483

8584
check-pypi:

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ union (``{..} | {..}``), dictionary union merge (``a = {..}; a |= {..}``), buil
150150
annotations (``list[str]``), function decorators, class decorators, relaxed decorators,
151151
``metaclass`` class keyword, pattern matching with ``match``, union types written as ``X | Y``, type
152152
alias statements (``type X = SomeType``), type alias statements with lambdas/comprehensions in class
153-
scopes, and generic classes (``class C[T]: ...``). It tries to detect and ignore user-defined
154-
functions, classes, arguments, and variables with names that clash with library-defined symbols.
153+
scopes, generic classes (``class C[T]: ...``), and template string literals (``t'{var}'``). It tries
154+
to detect and ignore user-defined functions, classes, arguments, and variables with names that clash
155+
with library-defined symbols.
155156

156157
Caveats
157158
=======

count.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
2-
from vermin import Config, MOD_REQS, MOD_MEM_REQS, KWARGS_REQS, STRFTIME_REQS, BYTES_REQS,\
3-
ARRAY_TYPECODE_REQS, CODECS_ERROR_HANDLERS, CODECS_ENCODINGS, BUILTIN_GENERIC_ANNOTATION_TYPES,\
2+
from vermin import Config, MOD_REQS, MOD_MEM_REQS, KWARGS_REQS, STRFTIME_REQS, BYTES_REQS, \
3+
ARRAY_TYPECODE_REQS, CODECS_ERROR_HANDLERS, CODECS_ENCODINGS, BUILTIN_GENERIC_ANNOTATION_TYPES, \
44
DICT_UNION_SUPPORTED_TYPES, DICT_UNION_MERGE_SUPPORTED_TYPES, DECORATOR_USER_FUNCTIONS
55
config = Config()
66
(mods, mems, kwargs, dirs, bdirs, typecodes, codecshandlers, codecsencs, builtinanntypes,

misc/.analysis-requirements.txt

Lines changed: 24 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,30 @@
1-
annotated-types==0.7.0
2-
astroid==2.15.5
3-
attrs==23.1.0
4-
bandit==1.7.5
5-
boltons==21.0.0
6-
bracex==2.3.post1
7-
build==0.10.0
8-
certifi==2025.4.26
9-
charset-normalizer==3.1.0
10-
click==8.1.8
11-
click-option-group==0.5.6
12-
colorama==0.4.6
13-
defusedxml==0.7.1
14-
Deprecated==1.2.18
15-
dill==0.3.6
16-
distlib==0.4.0
17-
docutils==0.20.1
18-
exceptiongroup==1.2.2
19-
face==22.0.0
20-
filelock==3.19.1
21-
flake8==6.0.0
22-
gitdb==4.0.12
23-
GitPython==3.1.44
24-
glom==22.1.0
25-
googleapis-common-protos==1.70.0
1+
astroid==3.3.11
2+
bandit==1.9.1
3+
build==1.3.0
4+
certifi==2025.10.5
5+
charset-normalizer==3.4.3
6+
dill==0.4.0
7+
docutils==0.22.2
8+
flake8==7.3.0
269
idna==3.10
27-
importlib_metadata==7.1.0
28-
isort==5.12.0
29-
jsonschema==4.18.0
30-
jsonschema-specifications==2023.6.1
31-
lazy-object-proxy==1.9.0
32-
markdown-it-py==3.0.0
10+
isort==6.1.0
11+
markdown-it-py==4.0.0
3312
mccabe==0.7.0
3413
mdurl==0.1.2
35-
opentelemetry-api==1.25.0
36-
opentelemetry-exporter-otlp-proto-common==1.25.0
37-
opentelemetry-exporter-otlp-proto-http==1.25.0
38-
opentelemetry-instrumentation==0.46b0
39-
opentelemetry-instrumentation-requests==0.46b0
40-
opentelemetry-proto==1.25.0
41-
opentelemetry-sdk==1.25.0
42-
opentelemetry-semantic-conventions==0.46b0
43-
opentelemetry-util-http==0.46b0
44-
packaging==23.1
45-
pbr==5.11.1
46-
peewee==3.16.2
47-
pep517==0.13.1
48-
platformdirs==3.9.1
49-
protobuf==4.25.8
50-
pycodestyle==2.10.0
51-
pydantic==2.8.2
52-
pydantic_core==2.20.1
53-
pyflakes==3.0.1
54-
Pygments==2.15.1
55-
pylint==2.17.4
56-
pyparsing==3.0.9
57-
pyproject_hooks==1.0.0
58-
pyroma==4.2
59-
python-lsp-jsonrpc==1.0.0
60-
PyYAML==6.0.2
61-
referencing==0.29.1
14+
packaging==25.0
15+
platformdirs==4.5.0
16+
pycodestyle==2.14.0
17+
pyflakes==3.4.0
18+
Pygments==2.19.2
19+
pylint==3.3.9
20+
pyproject_hooks==1.2.0
21+
pyroma==5.0
22+
PyYAML==6.0.3
6223
requests==2.32.5
63-
rich==13.4.2
64-
rpds-py==0.8.10
65-
ruamel.yaml==0.17.40
66-
ruamel.yaml.clib==0.2.14
67-
semgrep==1.86.0
24+
rich==14.2.0
6825
setuptools==80.9.0
69-
six==1.16.0
70-
smmap==5.0.2
71-
stevedore==5.1.0
72-
toml==0.10.2
73-
tomli==2.0.1
74-
tomlkit==0.11.8
75-
trove-classifiers==2023.5.24
76-
typing_extensions==4.12.2
77-
ujson==5.11.0
26+
stevedore==5.5.0
27+
tomlkit==0.13.3
28+
trove-classifiers==2025.9.11.17
7829
urllib3==2.5.0
79-
virtualenv==20.34.0
80-
vulture==2.7
81-
wcmatch==8.4.1
82-
wrapt==1.15.0
83-
zipp==3.23.0
30+
vulture==2.14

misc/actions/security-check.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -x
3+
4+
setup() {
5+
make install-deps setup-venv
6+
source .venv/bin/activate
7+
make setup-analysis
8+
}
9+
10+
# Even if .venv is found, make sure required executables are found, otherwise setup anyway.
11+
if [[ ! -d .venv ]] || [[ ! -f .venv/bin/bandit ]]; then
12+
setup
13+
else
14+
source .venv/bin/activate
15+
fi
16+
17+
make security-check

pyproject.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[build-system]
2+
requires = ["setuptools>=80", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "vermin"
7+
version = "1.7.0"
8+
description = "Concurrently detect the minimum Python versions needed to run code"
9+
readme = { file = "README.rst", content-type = "text/x-rst" }
10+
requires-python = ">=3.0"
11+
license = "MIT"
12+
license-files = ["LICENSE.txt"]
13+
authors = [
14+
{ name = "Morten Kristensen", email = "me@mortens.dev" }
15+
]
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Intended Audience :: Developers",
19+
"Programming Language :: Python",
20+
"Programming Language :: Python :: 3.0",
21+
"Topic :: Utilities",
22+
"Topic :: Software Development"
23+
]
24+
keywords = ["version", "detection", "analysis", "ast", "development"]
25+
dependencies = []
26+
optional-dependencies = {}
27+
28+
[tool.setuptools.packages.find]
29+
where = ["."]
30+
exclude = ["tests"]
31+
32+
[project.scripts]
33+
vermin = "vermin:main"
34+
35+
[project.urls]
36+
"Homepage" = "https://github.com/netromdk/vermin"
37+
"Source" = "https://github.com/netromdk/vermin"
38+
"Bug Reports" = "https://github.com/netromdk/vermin/issues"

setup.py

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

0 commit comments

Comments
 (0)