Skip to content

Commit 5bab6a6

Browse files
authored
Add Python 3.14 support (#508)
* feat: add support for Python 3.14 in workflows and dependencies * test: add pragma directive to exclude specific code from coverage in functions.py * fix: update docformatter language version to python3.13 with a TODO for future removal * chore: remove outdated Python dependencies for version compatibility * chore(python-deps): export new requirements * chore(python-deps): update libusb-package version constraints for Python 3.14 compatibility * chore(pre-commit): comment out docformatter hook pending issue resolution
1 parent 6972584 commit 5bab6a6

File tree

9 files changed

+123
-119
lines changed

9 files changed

+123
-119
lines changed

.github/workflows/package-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-package-build.yml@v1.8.5
1616
with:
1717
package-name: tm_devices
18-
python-versions-array: '["3.10", "3.11", "3.12", "3.13"]' # when updating this, make sure to update all workflows that use this strategy # PYTHON VERSION MARKER
18+
python-versions-array: '["3.10", "3.11", "3.12", "3.13", "3.14"]' # when updating this, make sure to update all workflows that use this strategy # PYTHON VERSION MARKER
1919
operating-systems-array: '["ubuntu", "windows", "macos"]'
2020
permissions:
2121
contents: read

.github/workflows/package-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
commit-user-email: ${{ vars.TEK_OPENSOURCE_EMAIL }}
2525
release-level: ${{ inputs.release-level }}
2626
build-and-publish-python-package: true
27-
python-versions-array: '["3.10", "3.11", "3.12", "3.13"]' # when updating this, make sure to update all workflows that use this strategy # PYTHON VERSION MARKER
27+
python-versions-array: '["3.10", "3.11", "3.12", "3.13", "3.14"]' # when updating this, make sure to update all workflows that use this strategy # PYTHON VERSION MARKER
2828
operating-systems-array: '["ubuntu", "windows", "macos"]'
2929
previous-changelog-filepath: python_semantic_release_templates/.previous_changelog_for_template.md
3030
previous-release-notes-filepath: python_semantic_release_templates/.previous_release_notes_for_template.md

.github/workflows/test-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
with:
1515
repo-name: tektronix/tm_devices
1616
operating-systems-array: '["ubuntu", "windows", "macos"]'
17-
python-versions-array: '["3.10", "3.11", "3.12", "3.13"]' # when updating this, make sure to update all workflows that use this strategy # PYTHON VERSION MARKER
17+
python-versions-array: '["3.10", "3.11", "3.12", "3.13", "3.14"]' # when updating this, make sure to update all workflows that use this strategy # PYTHON VERSION MARKER
1818
upload-to-codecov: true
1919
enable-retry-os-array: '["macos"]'
2020
secrets:

.pre-commit-config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ repos:
156156
- id: ruff-check
157157
args: [--fix, --exit-non-zero-on-fix]
158158
- id: ruff-format
159-
- repo: https://github.com/PyCQA/docformatter
160-
rev: e73b8ba0c1316be565983236c72e653ad44e6b66 # frozen: v1.7.7
161-
hooks:
162-
- id: docformatter
163-
additional_dependencies: [tomli]
159+
# TODO: uncomment when https://github.com/PyCQA/docformatter/issues/327 is resolved
160+
# - repo: https://github.com/PyCQA/docformatter
161+
# rev: e73b8ba0c1316be565983236c72e653ad44e6b66 # frozen: v1.7.7
162+
# hooks:
163+
# - id: docformatter
164+
# additional_dependencies: [tomli]

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Things to be included in the next release go here.
2121
### Added
2222

2323
- Enable programmatic connection to devices that use a different LAN device endpoint via the `DeviceManager`.
24+
- Added support for Python 3.14.
2425

2526
### Changed
2627

docs/requirements.txt

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
beautifulsoup4==4.14.3 ; python_version >= "3.10" and python_version < "3.14"
2-
black==26.1.0 ; python_version >= "3.10" and python_version < "3.14"
3-
bracex==2.6 ; python_version >= "3.10" and python_version < "3.14"
4-
certifi==2026.1.4 ; python_version >= "3.10" and python_version < "3.14"
5-
charset-normalizer==3.4.4 ; python_version >= "3.10" and python_version < "3.14"
6-
click==8.3.1 ; python_version >= "3.10" and python_version < "3.14"
7-
codespell==2.4.1 ; python_version >= "3.10" and python_version < "3.14"
8-
colorama==0.4.6 ; python_version >= "3.10" and python_version < "3.14"
9-
editdistpy==0.1.6 ; python_version >= "3.10" and python_version < "3.14"
10-
editorconfig==0.17.1 ; python_version >= "3.10" and python_version < "3.14"
11-
ghp-import==2.1.0 ; python_version >= "3.10" and python_version < "3.14"
12-
griffe==1.15.0 ; python_version >= "3.10" and python_version < "3.14"
13-
hjson==3.1.0 ; python_version >= "3.10" and python_version < "3.14"
14-
idna==3.11 ; python_version >= "3.10" and python_version < "3.14"
15-
inflect==7.5.0 ; python_version >= "3.10" and python_version < "3.14"
16-
jinja2==3.1.6 ; python_version >= "3.10" and python_version < "3.14"
17-
jsbeautifier==1.15.4 ; python_version >= "3.10" and python_version < "3.14"
18-
markdown==3.10.1 ; python_version >= "3.10" and python_version < "3.14"
19-
markupsafe==3.0.3 ; python_version >= "3.10" and python_version < "3.14"
20-
mergedeep==1.3.4 ; python_version >= "3.10" and python_version < "3.14"
21-
mkdocs==1.6.1 ; python_version >= "3.10" and python_version < "3.14"
22-
mkdocs-autorefs==1.4.3 ; python_version >= "3.10" and python_version < "3.14"
23-
mkdocs-ezglossary-plugin==2.1.0 ; python_version >= "3.10" and python_version < "3.14"
24-
mkdocs-gen-files==0.6.0 ; python_version >= "3.10" and python_version < "3.14"
25-
mkdocs-get-deps==0.2.0 ; python_version >= "3.10" and python_version < "3.14"
26-
mkdocs-include-markdown-plugin==7.2.1 ; python_version >= "3.10" and python_version < "3.14"
27-
mkdocs-literate-nav==0.6.2 ; python_version >= "3.10" and python_version < "3.14"
28-
mkdocs-macros-plugin==1.5.0 ; python_version >= "3.10" and python_version < "3.14"
29-
mkdocs-mermaid2-plugin==1.2.3 ; python_version >= "3.10" and python_version < "3.14"
30-
mkdocs-section-index==0.3.10 ; python_version >= "3.10" and python_version < "3.14"
31-
mkdocs-spellcheck==1.2.0 ; python_version >= "3.10" and python_version < "3.14"
32-
mkdocstrings==0.30.1 ; python_version >= "3.10" and python_version < "3.14"
33-
mkdocstrings-python==1.19.0 ; python_version >= "3.10" and python_version < "3.14"
34-
more-itertools==10.8.0 ; python_version >= "3.10" and python_version < "3.14"
35-
mypy-extensions==1.1.0 ; python_version >= "3.10" and python_version < "3.14"
36-
nodeenv==1.10.0 ; python_version >= "3.10" and python_version < "3.14"
37-
packaging==26.0 ; python_version >= "3.10" and python_version < "3.14"
38-
pathspec==1.0.4 ; python_version >= "3.10" and python_version < "3.14"
39-
platformdirs==4.5.1 ; python_version >= "3.10" and python_version < "3.14"
40-
pygments==2.19.2 ; python_version >= "3.10" and python_version < "3.14"
41-
pymdown-extensions==10.20.1 ; python_version >= "3.10" and python_version < "3.14"
42-
python-dateutil==2.9.0.post0 ; python_version >= "3.10" and python_version < "3.14"
43-
pytokens==0.4.0 ; python_version >= "3.10" and python_version < "3.14"
44-
pyyaml==6.0.3 ; python_version >= "3.10" and python_version < "3.14"
45-
pyyaml-env-tag==1.1 ; python_version >= "3.10" and python_version < "3.14"
46-
requests==2.32.5 ; python_version >= "3.10" and python_version < "3.14"
47-
setuptools==80.10.2 ; python_version >= "3.10" and python_version < "3.14"
48-
six==1.17.0 ; python_version >= "3.10" and python_version < "3.14"
49-
soupsieve==2.8.3 ; python_version >= "3.10" and python_version < "3.14"
50-
super-collections==0.6.2 ; python_version >= "3.10" and python_version < "3.14"
51-
symspellpy==6.9.0 ; python_version >= "3.10" and python_version < "3.14"
52-
termcolor==3.3.0 ; python_version >= "3.10" and python_version < "3.14"
53-
tomli==2.4.0 ; python_version >= "3.10" and python_version < "3.14"
54-
typeguard==4.4.4 ; python_version >= "3.10" and python_version < "3.14"
55-
typing-extensions==4.15.0 ; python_version >= "3.10" and python_version < "3.14"
56-
urllib3==2.6.3 ; python_version >= "3.10" and python_version < "3.14"
57-
watchdog==6.0.0 ; python_version >= "3.10" and python_version < "3.14"
58-
wcmatch==10.1 ; python_version >= "3.10" and python_version < "3.14"
1+
beautifulsoup4==4.14.3 ; python_version >= "3.10" and python_version < "3.15"
2+
black==26.1.0 ; python_version >= "3.10" and python_version < "3.15"
3+
bracex==2.6 ; python_version >= "3.10" and python_version < "3.15"
4+
certifi==2026.1.4 ; python_version >= "3.10" and python_version < "3.15"
5+
charset-normalizer==3.4.4 ; python_version >= "3.10" and python_version < "3.15"
6+
click==8.3.1 ; python_version >= "3.10" and python_version < "3.15"
7+
codespell==2.4.1 ; python_version >= "3.10" and python_version < "3.15"
8+
colorama==0.4.6 ; python_version >= "3.10" and python_version < "3.15"
9+
editdistpy==0.1.6 ; python_version >= "3.10" and python_version < "3.15"
10+
editorconfig==0.17.1 ; python_version >= "3.10" and python_version < "3.15"
11+
ghp-import==2.1.0 ; python_version >= "3.10" and python_version < "3.15"
12+
griffe==1.15.0 ; python_version >= "3.10" and python_version < "3.15"
13+
hjson==3.1.0 ; python_version >= "3.10" and python_version < "3.15"
14+
idna==3.11 ; python_version >= "3.10" and python_version < "3.15"
15+
inflect==7.5.0 ; python_version >= "3.10" and python_version < "3.15"
16+
jinja2==3.1.6 ; python_version >= "3.10" and python_version < "3.15"
17+
jsbeautifier==1.15.4 ; python_version >= "3.10" and python_version < "3.15"
18+
markdown==3.10.1 ; python_version >= "3.10" and python_version < "3.15"
19+
markupsafe==3.0.3 ; python_version >= "3.10" and python_version < "3.15"
20+
mergedeep==1.3.4 ; python_version >= "3.10" and python_version < "3.15"
21+
mkdocs==1.6.1 ; python_version >= "3.10" and python_version < "3.15"
22+
mkdocs-autorefs==1.4.3 ; python_version >= "3.10" and python_version < "3.15"
23+
mkdocs-ezglossary-plugin==2.1.0 ; python_version >= "3.10" and python_version < "3.15"
24+
mkdocs-gen-files==0.6.0 ; python_version >= "3.10" and python_version < "3.15"
25+
mkdocs-get-deps==0.2.0 ; python_version >= "3.10" and python_version < "3.15"
26+
mkdocs-include-markdown-plugin==7.2.1 ; python_version >= "3.10" and python_version < "3.15"
27+
mkdocs-literate-nav==0.6.2 ; python_version >= "3.10" and python_version < "3.15"
28+
mkdocs-macros-plugin==1.5.0 ; python_version >= "3.10" and python_version < "3.15"
29+
mkdocs-mermaid2-plugin==1.2.3 ; python_version >= "3.10" and python_version < "3.15"
30+
mkdocs-section-index==0.3.10 ; python_version >= "3.10" and python_version < "3.15"
31+
mkdocs-spellcheck==1.2.0 ; python_version >= "3.10" and python_version < "3.15"
32+
mkdocstrings==0.30.1 ; python_version >= "3.10" and python_version < "3.15"
33+
mkdocstrings-python==1.19.0 ; python_version >= "3.10" and python_version < "3.15"
34+
more-itertools==10.8.0 ; python_version >= "3.10" and python_version < "3.15"
35+
mypy-extensions==1.1.0 ; python_version >= "3.10" and python_version < "3.15"
36+
nodeenv==1.10.0 ; python_version >= "3.10" and python_version < "3.15"
37+
packaging==26.0 ; python_version >= "3.10" and python_version < "3.15"
38+
pathspec==1.0.4 ; python_version >= "3.10" and python_version < "3.15"
39+
platformdirs==4.5.1 ; python_version >= "3.10" and python_version < "3.15"
40+
pygments==2.19.2 ; python_version >= "3.10" and python_version < "3.15"
41+
pymdown-extensions==10.20.1 ; python_version >= "3.10" and python_version < "3.15"
42+
python-dateutil==2.9.0.post0 ; python_version >= "3.10" and python_version < "3.15"
43+
pytokens==0.4.1 ; python_version >= "3.10" and python_version < "3.15"
44+
pyyaml==6.0.3 ; python_version >= "3.10" and python_version < "3.15"
45+
pyyaml-env-tag==1.1 ; python_version >= "3.10" and python_version < "3.15"
46+
requests==2.32.5 ; python_version >= "3.10" and python_version < "3.15"
47+
setuptools==80.10.2 ; python_version >= "3.10" and python_version < "3.15"
48+
six==1.17.0 ; python_version >= "3.10" and python_version < "3.15"
49+
soupsieve==2.8.3 ; python_version >= "3.10" and python_version < "3.15"
50+
super-collections==0.6.2 ; python_version >= "3.10" and python_version < "3.15"
51+
symspellpy==6.9.0 ; python_version >= "3.10" and python_version < "3.15"
52+
termcolor==3.3.0 ; python_version >= "3.10" and python_version < "3.15"
53+
tomli==2.4.0 ; python_version >= "3.10" and python_version < "3.15"
54+
typeguard==4.4.4 ; python_version >= "3.10" and python_version < "3.15"
55+
typing-extensions==4.15.0 ; python_version >= "3.10" and python_version < "3.15"
56+
urllib3==2.6.3 ; python_version >= "3.10" and python_version < "3.15"
57+
watchdog==6.0.0 ; python_version >= "3.10" and python_version < "3.15"
58+
wcmatch==10.1 ; python_version >= "3.10" and python_version < "3.15"

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies = [
1212
"dc-schema~=0.0.8",
1313
"gpib-ctypes~=0.3",
1414
"jsonschema[format-nongpl]~=4.23",
15-
"libusb-package~=1.0,!=1.0.26.2", # 1.0.26.2 doesn't work with Python 3.12
15+
"libusb-package~=1.0,!=1.0.26.2,!=1.0.26.3", # 1.0.26.2 doesn't work with Python 3.12; 1.0.26.3 doesn't work with Python 3.14
1616
"packaging>=24.0",
1717
"psutil>=6.0.0",
1818
"pyserial~=3.5",
@@ -48,7 +48,7 @@ maintainers = [
4848
]
4949
name = "tm_devices"
5050
readme = "README.md"
51-
requires-python = ">=3.10,<3.14" # PYTHON VERSION MARKER
51+
requires-python = ">=3.10,<3.15" # PYTHON VERSION MARKER
5252

5353
[project.scripts]
5454
list-visa-resources = "tm_devices:print_available_visa_devices"
@@ -422,10 +422,10 @@ legacy_tox_ini = """
422422
[tox]
423423
requires = tox>4
424424
isolated_build = True
425-
envlist = py310,py311,py312,py313,tests,docs,doctests # PYTHON VERSION MARKER
425+
envlist = py310,py311,py312,py313,py314,tests,docs,doctests # PYTHON VERSION MARKER
426426
skip_missing_interpreters = True
427427
labels =
428-
basic = py310,py311,py312,py313,tests # PYTHON VERSION MARKER
428+
basic = py310,py311,py312,py313,py314,tests # PYTHON VERSION MARKER
429429
documentation = docs,doctests
430430
431431
[gh-actions]
@@ -434,6 +434,7 @@ python = # PYTHON VERSION MARKER
434434
3.11: py311
435435
3.12: py312
436436
3.13: py313
437+
3.14: py314
437438
438439
[testenv]
439440
package = wheel

src/tm_devices/helpers/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def get_visa_backend(visa_lib_path: str) -> str:
617617
for (
618618
visa_implementation_name,
619619
visa_implementation_details,
620-
) in visa_implementation_dict.items():
620+
) in visa_implementation_dict.items(): # pragma: no cover
621621
if visa_lib_path in visa_implementation_name:
622622
vendor = visa_implementation_details["Vendor"]
623623
visa_name = "NI-VISA" if "National Instruments" in vendor else f"{vendor} VISA"

0 commit comments

Comments
 (0)