Skip to content

Commit

Permalink
BEHAVIOR: add Pyton 3.13 to version classifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Jan 22, 2025
1 parent 8b418a4 commit 1e42189
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ env_list = [
"3.10",
"3.11",
"3.12",
"3.13",
"cov",
"doc",
"linkcheck",
Expand Down Expand Up @@ -402,4 +403,5 @@ test = [
"3.10",
"3.11",
"3.12",
"3.13",
]
2 changes: 1 addition & 1 deletion src/compwa_policy/utilities/pyproject/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def get_supported_python_versions(self) -> list[PythonVersion]:
"""Extract sorted, supported Python versions from package classifiers.
>>> Pyproject.load().get_supported_python_versions()
['3.9', '3.10', '3.11', '3.12']
['3.9', '3.10', '3.11', '3.12', '3.13']
"""
return get_supported_python_versions(self._document)

Expand Down
8 changes: 5 additions & 3 deletions src/compwa_policy/utilities/pyproject/getters.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from compwa_policy.utilities.pyproject._struct import ProjectURLs, PyprojectTOML


PythonVersion = Literal["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
PythonVersion = Literal["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
PYTHON_VERSIONS = set(PythonVersion.__args__) # type:ignore[attr-defined]


Expand Down Expand Up @@ -139,11 +139,13 @@ def _get_allowed_versions(
>>> _get_allowed_versions(">=3.9,<3.13")
['3.9', '3.10', '3.11', '3.12']
>>> _get_allowed_versions(">=3.9", exclude={"3.9"})
['3.10', '3.11', '3.12']
['3.10', '3.11', '3.12', '3.13']
>>> _get_allowed_versions("~=3.12")
['3.12', '3.13']
>>> _get_allowed_versions("~=3.12.0")
['3.12']
>>> _get_allowed_versions("")
['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
"""
specifier = SpecifierSet(version_range)
versions_to_check = [
Expand Down

0 comments on commit 1e42189

Please sign in to comment.