Skip to content

Commit 09d4554

Browse files
authored
Add python 3.13 in python-inspector (#203)
* Add python 3.13 in python-inspector Reference: #196 Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com> * Add formatting changes Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com> --------- Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent d0d414b commit 09d4554

File tree

4 files changed

+2651
-2
lines changed

4 files changed

+2651
-2
lines changed

src/python_inspector/utils_pypi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
TRACE_ULTRA_DEEP = False
103103

104104
# Supported environments
105-
PYTHON_VERSIONS = "27", "36", "37", "38", "39", "310", "311", "312"
105+
PYTHON_VERSIONS = "27", "36", "37", "38", "39", "310", "311", "312", "313"
106106

107107
PYTHON_DOT_VERSIONS_BY_VER = {
108108
"27": "2.7",
@@ -113,6 +113,7 @@
113113
"310": "3.10",
114114
"311": "3.11",
115115
"312": "3.12",
116+
"313": "3.13",
116117
}
117118

118119
valid_python_versions = list(PYTHON_DOT_VERSIONS_BY_VER.keys())
@@ -135,6 +136,7 @@ def get_python_dot_version(version):
135136
"310": ["cp310", "cp310m", "abi3"],
136137
"311": ["cp311", "cp311m", "abi3"],
137138
"312": ["cp312", "cp312m", "abi3"],
139+
"313": ["cp313", "cp313m", "abi3"],
138140
}
139141

140142
PLATFORMS_BY_OS = {

tests/data/azure-devops.req-313-expected.json

Lines changed: 2629 additions & 0 deletions
Large diffs are not rendered by default.

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_api_with_unsupported_os():
9393

9494
def test_api_with_wrong_pyver():
9595
with pytest.raises(ValueError):
96-
resolver_api(specifiers=["flask==2.1.2"], python_version="3.13", operating_system="linux")
96+
resolver_api(specifiers=["flask==2.1.2"], python_version="3.14", operating_system="linux")
9797

9898

9999
def test_api_with_python_311():

tests/test_cli.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,24 @@ def test_cli_with_azure_devops_with_python_312():
218218
)
219219

220220

221+
@pytest.mark.online
222+
def test_cli_with_azure_devops_with_python_313():
223+
requirements_file = test_env.get_test_loc("azure-devops.req.txt")
224+
expected_file = test_env.get_test_loc("azure-devops.req-313-expected.json", must_exist=False)
225+
extra_options = [
226+
"--operating-system",
227+
"linux",
228+
"--python-version",
229+
"313",
230+
]
231+
check_requirements_resolution(
232+
requirements_file=requirements_file,
233+
expected_file=expected_file,
234+
extra_options=extra_options,
235+
regen=REGEN_TEST_FIXTURES,
236+
)
237+
238+
221239
@pytest.mark.online
222240
def test_cli_with_azure_devops_with_python_38():
223241
requirements_file = test_env.get_test_loc("azure-devops.req.txt")

0 commit comments

Comments
 (0)