Skip to content

Commit 56e30df

Browse files
committed
2.0.6 (2025-05-17)
------------------ **Changed:** dependency
1 parent deca7be commit 56e30df

File tree

7 files changed

+43
-45
lines changed

7 files changed

+43
-45
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Unreleased
1313
**New:** `FortiGateAPI.monitor` connectors, to work with all `Monitor API` endpoints.
1414

1515

16-
2.0.5 (2025-05-17)
16+
2.0.6 (2025-05-17)
1717
------------------
1818

1919
**Changed:** `FortiGateBase.get_session()`, private to public

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Fully documented on `Read the Docs`_.
2424
Requirements
2525
============
2626

27-
Python >=3.8,<=3.13
27+
Python >=3.8
2828

2929

3030
Quickstart

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
project = "fortigate-api"
99
copyright = "2021, Vladimirs Prusakovs"
1010
author = "Vladimirs Prusakovs"
11-
release = "2.0.5"
11+
release = "2.0.6"
1212

1313
extensions = [
1414
"sphinx.ext.autodoc",

fortigate_api/connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def get(self, **kwargs) -> LDAny:
9292
:return: List of the fortigate-objects.
9393
:rtype: List[dict]
9494
"""
95-
uid = h.quote(vdict.pop(self.uid, kwargs))
95+
uid = h.quote(vdict.pop(kwargs, key=self.uid))
9696
url = f"{self.url}/{uid}".rstrip("/")
9797
url = h.join_url_params(url=url, **kwargs)
9898
if self.uid:

fortigate_api/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def pop_lstr(key: str, data: DAny) -> LStr:
222222
:param data: The dictionary from which the key is to be popped.
223223
:return: The values as a string. Update `data`, remove `key`.
224224
"""
225-
values = vdict.pop(key, data)
225+
values = vdict.pop(data, key=key)
226226
if values is None:
227227
values = []
228228
if isinstance(values, str):

pyproject.toml

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "fortigate_api"
3-
version = "2.0.5"
3+
version = "2.0.6"
44
description = "Python package to configure Fortigate (Fortios) devices using REST API and SSH"
55
authors = ["Vladimirs Prusakovs <[email protected]>"]
66
readme = "README.rst"
@@ -24,46 +24,49 @@ classifiers = [
2424
"Programming Language :: Python :: 3.13",
2525
"Natural Language :: English",
2626
]
27+
28+
[tool.poetry.urls]
29+
homepage = "https://fortigate-api.readthedocs.io"
30+
repository = "https://github.com/vladimirs-git/fortigate-api"
31+
"Bug Tracker" = "https://github.com/vladimirs-git/fortigate-api/issues"
32+
2733
[tool.poetry.dependencies]
28-
python = "^3.9"
34+
python = "^3.8"
2935
#
3036
requests = ">=2.28"
3137
vhelpers = ">=0.4.0"
3238

3339
[tool.poetry.group.test.dependencies]
34-
pytest = "^8.3.4"
35-
36-
[tool.poetry.group.dev.dependencies]
3740
dictdiffer = "^0.9.0"
38-
jinja2 = "^3.1.2"
39-
mypy = "^1.14.0"
40-
pydantic = "^2.5.3"
41-
pydocstyle = "^6.3.0"
42-
pygments = "^2.18.0" # rst-lint
43-
pylint = "^3.3.3"
44-
pytest = "^8.3.4"
45-
pytest-cov = "^6.0.0"
41+
pytest = "^8.3.5"
4642
pytest-mock = "^3.14.0"
47-
readthedocs-sphinx-search = "^0.3.2"
4843
requests-mock = "^1.12.1"
49-
restructuredtext-lint = "^1.4.0"
50-
ruff = "^0.8.4"
51-
sphinx = "7.1.2"
44+
45+
[tool.poetry.group.docs.dependencies]
46+
jinja2 = "^3.1.2"
47+
readthedocs-sphinx-search = "^0.3.2"
48+
sphinx = "^7.2.6"
5249
sphinx-rtd-theme = "^1.3.0"
5350
sphinxcontrib-httpdomain = "^1.8.1"
5451
sphinxcontrib-openapi = "^0.8.3"
5552
tabulate = "^0.9.0"
53+
54+
[tool.poetry.group.dev.dependencies]
55+
poetry = "^2.1.2"
56+
#
57+
mypy = "^1.15.0"
58+
pydantic = "^2.5.3" # tools
59+
pydocstyle = "^6.3.0"
60+
pygments = "^2.19.1" # rst-lint
61+
pylint = "^3.3.7"
62+
pytest = "^8.3.5"
63+
pytest-cov = "^6.1.1"
64+
restructuredtext-lint = "^1.4.0"
65+
ruff = "^0.11.10"
5666
twine = "^6.0.1"
57-
types-requests = "^2.32.0.20241016"
67+
types-requests = "^2.32.0.20250515"
5868
types-tabulate = "^0.9.0.20241207"
59-
typing-extensions = "^4.12.2"
60-
61-
[tool.poetry.extras]
62-
test = ["pytest"]
63-
64-
[tool.poetry.urls]
65-
"Bug Tracker" = "https://github.com/vladimirs-git/fortigate-api/issues"
66-
"Download URL" = "https://github.com/vladimirs-git/fortigate-api/archive/refs/tags/2.0.5.tar.gz"
69+
typing-extensions = "^4.13.2"
6770

6871
[tool.pylint]
6972
max-line-length = 100
@@ -94,7 +97,7 @@ disable = [
9497
]
9598

9699
[tool.mypy]
97-
python_version = "3.9"
100+
python_version = "3.11"
98101

99102
[tool.ruff]
100103
exclude = [
@@ -106,14 +109,14 @@ exclude = [
106109
".venv",
107110
"_notes",
108111
"dist",
109-
"demo",
112+
"notes",
110113
"temp",
111114
"tmp",
112115
"venv",
113116
]
114117
line-length = 100
115118
indent-width = 4
116-
target-version = "py39"
119+
target-version = "py311"
117120

118121
[tool.ruff.format]
119122
quote-style = "double"

tests/test__package.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,10 @@
99
PYPROJECT_D = vdict.pyproject_d(ROOT)
1010

1111

12-
def test__version__tar():
13-
"""Version in tar.gz."""
14-
expected = PYPROJECT_D["tool"]["poetry"]["version"]
15-
package = PYPROJECT_D["tool"]["poetry"]["name"].replace("_", "-")
16-
regex_tar = fr"{package}.+/(.+?)\.tar\.gz"
17-
18-
# pyproject.toml
19-
text = PYPROJECT_D["tool"]["poetry"]["urls"]["Download URL"]
20-
actual = vre.find1(regex_tar, text)
12+
def test__python_version():
13+
"""Python version in pyproject.toml."""
14+
actual = PYPROJECT_D["tool"]["poetry"]["dependencies"]["python"]
15+
expected = "^3.8"
2116
assert actual == expected
2217

2318

@@ -32,7 +27,6 @@ def test__version__changelog():
3227
assert actual == expected, f"version in {path=}"
3328

3429

35-
# noinspection PyTypeChecker
3630
def test__version__docs():
3731
"""Version in docs/config.py."""
3832
path = Path.joinpath(ROOT, "docs", "conf.py")
@@ -44,6 +38,7 @@ def test__version__docs():
4438
if isinstance(node, ast.Assign):
4539
for target in node.targets:
4640
if isinstance(target, ast.Name) and target.id == "release":
41+
# noinspection PyTypeChecker
4742
actual = ast.literal_eval(node.value)
4843
break
4944

@@ -57,6 +52,6 @@ def test__last_modified_date():
5752
text = path.read_text(encoding="utf-8")
5853
regex = r".+\((\d\d\d\d-\d\d-\d\d)\)$"
5954
actual = vre.find1(regex, text, re.M)
60-
files = vpath.get_files(ROOT, ext=".py")
55+
files = vpath.get_files(ROOT, pattern="\.py$")
6156
expected = vdate.last_modified(files)
6257
assert actual == expected, "last modified file"

0 commit comments

Comments
 (0)