Skip to content

Commit f3ec56b

Browse files
Enable Python 3.14 support (#440)
- Dropped usage of deprecated module codecs - Added Python 3.14 to setup.py - Update pre-commit and pylint config accordingly Fixes #439 Signed-off-by: Sandro Bonazzola <[email protected]>
1 parent 32c36dc commit f3ec56b

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
- --max-line-length=88
1616

1717
- repo: https://github.com/PyCQA/isort
18-
rev: "6.0.1"
18+
rev: "7.0.0"
1919
hooks:
2020
- id: isort
2121

@@ -25,7 +25,8 @@ repos:
2525
- id: flake8
2626
additional_dependencies:
2727
[
28-
flake8-pytest-style == 2.1.0,
28+
# https://pypi.org/project/flake8-pytest-style/
29+
flake8-pytest-style == 2.2.0,
2930
]
3031
args:
3132
- --config
@@ -45,7 +46,7 @@ repos:
4546
)$
4647
4748
- repo: https://github.com/pre-commit/pre-commit-hooks
48-
rev: "v5.0.0"
49+
rev: "v6.0.0"
4950
hooks:
5051
- id: end-of-file-fixer
5152
- id: mixed-line-ending
@@ -56,7 +57,7 @@ repos:
5657
exclude: disable_test_trac.py
5758

5859
- repo: https://github.com/pylint-dev/pylint
59-
rev: "v3.3.7"
60+
rev: "v4.0.2"
6061
hooks:
6162
- id: pylint
6263
args:
@@ -82,7 +83,7 @@ repos:
8283
]
8384

8485
- repo: https://github.com/pre-commit/mirrors-mypy
85-
rev: 'v1.17.0'
86+
rev: 'v1.18.2'
8687
hooks:
8788
- id: mypy
8889
exclude: examples/.*|bin/did

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[MAIN]
22
ignore-paths=^bin/.*$
3-
init-hook='import sys; import site; sys.path.extend(site.getsitepackages()); sys.path.append("./.venv/lib64/python3.13/site-packages"); sys.path.append("/usr/lib/python3.13/site-packages")'
3+
init-hook='import sys; import site; sys.path.extend(site.getsitepackages()); sys.path.append("./.venv/lib64/python3.14/site-packages"); sys.path.append("/usr/lib/python3.13/site-packages")'
44

55
[MESSAGES]
66
disable=duplicate-code,missing-function-docstring,missing-module-docstring,missing-class-docstring,fixme,too-many-arguments,too-many-instance-attributes

did/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
""" Config, Date, User and Exceptions """
22

3-
import codecs
43
import configparser
54
import contextlib
65
import datetime
@@ -129,7 +128,7 @@ def __init__(self, config: Optional[str] = None, path: Optional[str] = None):
129128
# Parse the config from file
130129
try:
131130
log.info("Inspecting config file '%s'.", path)
132-
with codecs.open(path, "r", "utf8") as config_file:
131+
with open(path, "r", encoding="utf8") as config_file:
133132
Config.parser.read_file(config_file)
134133
except IOError as error:
135134
log.debug(error)

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
'redmine': ['feedparser'],
3535
'nitrate': ['nitrate'],
3636
'rt': ['gssapi'],
37-
'tests': ['pytest', 'pytest-xdist', 'pytest-cov', 'python-coveralls', 'pre-commit'],
37+
'tests': ['pytest', 'pytest-xdist', 'pytest-cov', 'python-coveralls', 'pre-commit',
38+
'setuptools'],
3839
'mypy': ['types-setuptools', 'types-python-dateutil', 'lxml',
3940
'types-requests', 'types-urllib3', 'types-httplib2'],
4041
}
@@ -75,6 +76,7 @@
7576
'Programming Language :: Python :: 3.11',
7677
'Programming Language :: Python :: 3.12',
7778
'Programming Language :: Python :: 3.13',
79+
'Programming Language :: Python :: 3.14',
7880
'Topic :: Office/Business',
7981
'Topic :: Utilities',
8082
],

0 commit comments

Comments
 (0)