python-discovery 1.6.5__tar.gz → 1.6.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_discovery-1.6.7/.github/dependabot.yaml +30 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.github/workflows/news.yaml +3 -2
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.github/workflows/prepare-release.yaml +1 -1
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.github/workflows/release.yaml +7 -7
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.github/workflows/upgrade-release-tools.yaml +1 -1
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.pre-commit-config.yaml +1 -1
- {python_discovery-1.6.5 → python_discovery-1.6.7}/PKG-INFO +1 -1
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/changelog.rst +36 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/explanation.rst +4 -1
- {python_discovery-1.6.5 → python_discovery-1.6.7}/pylock.toml +45 -48
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_discovery.py +5 -3
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_py_info.py +7 -2
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_py_spec.py +5 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_specifier.py +4 -6
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_discovery.py +32 -1
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_iter_interpreters.py +63 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_py_info_extra.py +43 -1
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_py_spec.py +21 -1
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_specifier.py +8 -0
- python_discovery-1.6.5/.github/dependabot.yaml +0 -33
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.github/FUNDING.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.github/SECURITY.md +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.github/release.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.github/workflows/check.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.github/workflows/codeql.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.gitignore +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.readthedocs.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/.readthedocs.yml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/CODE_OF_CONDUCT.md +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/LICENSE +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/README.md +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/_static/custom.css +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/_static/logo.svg +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/changelog/template.jinja2 +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/conf.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/contributing.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/how-to/standalone-usage.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/index.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/reference/api.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/reference/environment-variables.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/docs/tutorial/getting-started.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/pyproject.toml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/__init__.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_cache.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_cached_py_info.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_compat.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_py_info_collect.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_windows/__init__.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_windows/_pep514.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/_windows/_propose.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/src/python_discovery/py.typed +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tasks/old_target_check.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tasks/old_target_check.sh +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/conftest.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/py_info/test_py_info.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/py_info/test_py_info_exe_based_of.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_cache.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_cache_recovery.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_cached_py_info.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_discovery_extra.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_py_info_collect.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_py_spec_extra.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/test_query_timeout.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/windows/conftest.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/windows/test_windows.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/windows/test_windows_pep514.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tests/windows/winreg_mock_values.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.7}/tox.toml +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
multi-ecosystem-groups:
|
|
3
|
+
dependencies:
|
|
4
|
+
schedule:
|
|
5
|
+
interval: weekly
|
|
6
|
+
day: tuesday
|
|
7
|
+
labels:
|
|
8
|
+
- dependencies
|
|
9
|
+
- skip news
|
|
10
|
+
updates:
|
|
11
|
+
- package-ecosystem: github-actions
|
|
12
|
+
directory: /
|
|
13
|
+
patterns:
|
|
14
|
+
- '*'
|
|
15
|
+
multi-ecosystem-group: dependencies
|
|
16
|
+
labels:
|
|
17
|
+
- dependencies
|
|
18
|
+
- skip news
|
|
19
|
+
cooldown:
|
|
20
|
+
default-days: 7
|
|
21
|
+
- package-ecosystem: pre-commit
|
|
22
|
+
directory: /
|
|
23
|
+
patterns:
|
|
24
|
+
- '*'
|
|
25
|
+
multi-ecosystem-group: dependencies
|
|
26
|
+
labels:
|
|
27
|
+
- dependencies
|
|
28
|
+
- skip news
|
|
29
|
+
cooldown:
|
|
30
|
+
default-days: 7
|
|
@@ -7,6 +7,7 @@ concurrency:
|
|
|
7
7
|
cancel-in-progress: true
|
|
8
8
|
permissions:
|
|
9
9
|
contents: read
|
|
10
|
+
pull-requests: read
|
|
10
11
|
jobs:
|
|
11
12
|
changelog:
|
|
12
13
|
name: 📝 News fragment
|
|
@@ -24,9 +25,9 @@ jobs:
|
|
|
24
25
|
python-version: "3.15"
|
|
25
26
|
enable-cache: false
|
|
26
27
|
- name: 📦 Install locked release tools
|
|
27
|
-
uses: tox-dev/github-workflows/install-locked-tools@
|
|
28
|
+
uses: tox-dev/github-workflows/install-locked-tools@57a765127aae73adf7d0e24a7fe0f067f2d3ea3e # 6.2.1
|
|
28
29
|
with:
|
|
29
30
|
groups: release-news
|
|
30
31
|
venv: ${{ runner.temp }}/release-tools
|
|
31
32
|
- name: 🔍 Validate news fragments
|
|
32
|
-
uses: tox-dev/github-workflows/validate-news@
|
|
33
|
+
uses: tox-dev/github-workflows/validate-news@57a765127aae73adf7d0e24a7fe0f067f2d3ea3e # 6.2.1
|
|
@@ -12,7 +12,7 @@ permissions: {}
|
|
|
12
12
|
jobs:
|
|
13
13
|
prepare:
|
|
14
14
|
name: 🏷️ Prepare Towncrier release
|
|
15
|
-
uses: tox-dev/github-workflows/.github/workflows/prepare-towncrier-release.yaml@
|
|
15
|
+
uses: tox-dev/github-workflows/.github/workflows/prepare-towncrier-release.yaml@57a765127aae73adf7d0e24a7fe0f067f2d3ea3e # 6.2.1
|
|
16
16
|
permissions:
|
|
17
17
|
contents: read
|
|
18
18
|
pull-requests: read
|
|
@@ -10,7 +10,7 @@ concurrency:
|
|
|
10
10
|
jobs:
|
|
11
11
|
build:
|
|
12
12
|
name: 🏗️ Build
|
|
13
|
-
uses: tox-dev/github-workflows/.github/workflows/validate-python-release.yaml@
|
|
13
|
+
uses: tox-dev/github-workflows/.github/workflows/validate-python-release.yaml@57a765127aae73adf7d0e24a7fe0f067f2d3ea3e # 6.2.1
|
|
14
14
|
permissions:
|
|
15
15
|
contents: read
|
|
16
16
|
notes:
|
|
@@ -33,17 +33,17 @@ jobs:
|
|
|
33
33
|
python-version: "3.15"
|
|
34
34
|
enable-cache: false
|
|
35
35
|
- name: 📦 Install locked release tools
|
|
36
|
-
uses: tox-dev/github-workflows/install-locked-tools@
|
|
36
|
+
uses: tox-dev/github-workflows/install-locked-tools@57a765127aae73adf7d0e24a7fe0f067f2d3ea3e # 6.2.1
|
|
37
37
|
with:
|
|
38
38
|
groups: release-notes
|
|
39
39
|
venv: ${{ runner.temp }}/release-tools
|
|
40
40
|
- name: 🏷️ Select previous tag
|
|
41
41
|
id: previous
|
|
42
|
-
uses: tox-dev/github-workflows/select-previous-tag@
|
|
42
|
+
uses: tox-dev/github-workflows/select-previous-tag@57a765127aae73adf7d0e24a7fe0f067f2d3ea3e # 6.2.1
|
|
43
43
|
with:
|
|
44
44
|
tag: ${{ github.ref_name }}
|
|
45
45
|
- name: 📝 Render release notes
|
|
46
|
-
uses: tox-dev/github-workflows/render-release-notes@
|
|
46
|
+
uses: tox-dev/github-workflows/render-release-notes@57a765127aae73adf7d0e24a7fe0f067f2d3ea3e # 6.2.1
|
|
47
47
|
with:
|
|
48
48
|
tag: ${{ github.ref_name }}
|
|
49
49
|
previous: ${{ steps.previous.outputs.previous }}
|
|
@@ -72,7 +72,7 @@ jobs:
|
|
|
72
72
|
artifact-ids: ${{ needs.build.outputs.distributions-artifact-id }}
|
|
73
73
|
path: dist/
|
|
74
74
|
- name: 🚀 Publish to PyPI
|
|
75
|
-
uses: pypa/gh-action-pypi-publish@
|
|
75
|
+
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
76
76
|
with:
|
|
77
77
|
packages-dir: dist
|
|
78
78
|
github-release:
|
|
@@ -101,13 +101,13 @@ jobs:
|
|
|
101
101
|
artifact-ids: ${{ needs.notes.outputs.artifact-id }}
|
|
102
102
|
path: ${{ runner.temp }}
|
|
103
103
|
- name: 🔍 Verify PyPI artifacts
|
|
104
|
-
uses: tox-dev/github-workflows/reconcile-pypi-artifacts@
|
|
104
|
+
uses: tox-dev/github-workflows/reconcile-pypi-artifacts@57a765127aae73adf7d0e24a7fe0f067f2d3ea3e # 6.2.1
|
|
105
105
|
with:
|
|
106
106
|
project: python-discovery
|
|
107
107
|
version: ${{ github.ref_name }}
|
|
108
108
|
dist: dist
|
|
109
109
|
- name: 🚀 Publish GitHub release
|
|
110
|
-
uses: tox-dev/github-workflows/publish-github-release@
|
|
110
|
+
uses: tox-dev/github-workflows/publish-github-release@57a765127aae73adf7d0e24a7fe0f067f2d3ea3e # 6.2.1
|
|
111
111
|
env:
|
|
112
112
|
GH_TOKEN: ${{ github.token }}
|
|
113
113
|
with:
|
{python_discovery-1.6.5 → python_discovery-1.6.7}/.github/workflows/upgrade-release-tools.yaml
RENAMED
|
@@ -10,7 +10,7 @@ concurrency:
|
|
|
10
10
|
jobs:
|
|
11
11
|
upgrade:
|
|
12
12
|
name: 🔀 Upgrade release tools
|
|
13
|
-
uses: tox-dev/github-workflows/.github/workflows/upgrade-release-tools.yaml@
|
|
13
|
+
uses: tox-dev/github-workflows/.github/workflows/upgrade-release-tools.yaml@57a765127aae73adf7d0e24a7fe0f067f2d3ea3e # 6.2.1
|
|
14
14
|
permissions:
|
|
15
15
|
contents: read
|
|
16
16
|
secrets:
|
|
@@ -57,7 +57,7 @@ repos:
|
|
|
57
57
|
^docs/changelog[.]rst$ # Only the generated release history.
|
|
58
58
|
args: ["-l", "120", "--preserve-adornments"]
|
|
59
59
|
additional_dependencies:
|
|
60
|
-
- "sphinx==9.1.
|
|
60
|
+
- "sphinx==9.1.1"
|
|
61
61
|
- repo: https://github.com/zizmorcore/zizmor-pre-commit
|
|
62
62
|
rev: c92afdf2c6ca336aaa8f39e2bd8d48f62dbd8e1f # frozen: v1.31.1
|
|
63
63
|
hooks:
|
|
@@ -6,6 +6,42 @@
|
|
|
6
6
|
|
|
7
7
|
.. towncrier release notes start
|
|
8
8
|
|
|
9
|
+
.. _release-1-6-7:
|
|
10
|
+
|
|
11
|
+
*********************
|
|
12
|
+
v1.6.7 (2026-10-28)
|
|
13
|
+
*********************
|
|
14
|
+
|
|
15
|
+
.. _release-1-6-7-fixed:
|
|
16
|
+
|
|
17
|
+
Fixed
|
|
18
|
+
-----
|
|
19
|
+
|
|
20
|
+
- Rank uv's minor version links behind the concrete install on Windows too, where uv creates them as directory junctions
|
|
21
|
+
that ``Path.is_symlink()`` does not report (:pr:`170`) by :user:`darrenhuai` and :user:`gaborbernat`.
|
|
22
|
+
- Stop a venv lookup from rewriting the ``executable`` of earlier results, ``PythonInfo.current()`` and
|
|
23
|
+
``PythonInfo.current_system()`` when they share its base interpreter (:pr:`171`) by :user:`darrenhuai` and
|
|
24
|
+
:user:`gaborbernat`.
|
|
25
|
+
|
|
26
|
+
.. _release-1-6-6:
|
|
27
|
+
|
|
28
|
+
*********************
|
|
29
|
+
v1.6.6 (2026-10-27)
|
|
30
|
+
*********************
|
|
31
|
+
|
|
32
|
+
.. _release-1-6-6-fixed:
|
|
33
|
+
|
|
34
|
+
Fixed
|
|
35
|
+
-----
|
|
36
|
+
|
|
37
|
+
- Treat version specifiers with an item that cannot be parsed, such as ``>=3.x``, ``>=3.12 <4`` or ``>=3.12,foo``, as
|
|
38
|
+
literal executable paths instead of raising a bare ``AssertionError`` or ignoring the item during discovery
|
|
39
|
+
(:pr:`157`) by :user:`darrenhuai` and :user:`gaborbernat`.
|
|
40
|
+
- Accept relative interpreter paths that step up a directory, such as ``../venv/bin/python``, which were found and
|
|
41
|
+
queried but never matched the spec (:pr:`158`) by :user:`darrenhuai` and :user:`gaborbernat`.
|
|
42
|
+
- Match ``~=X.Y`` compatible-release specifiers against later minor versions, as PEP 440 defines, instead of only the
|
|
43
|
+
same minor; ``~=3.10`` now accepts 3.11 and newer 3.x (:pr:`159`) by :user:`darrenhuai` and :user:`gaborbernat`.
|
|
44
|
+
|
|
9
45
|
.. _release-1-6-5:
|
|
10
46
|
|
|
11
47
|
*********************
|
|
@@ -367,4 +367,7 @@ and machine segments, leaves the string unrecognized, so it falls back to a lite
|
|
|
367
367
|
|
|
368
368
|
`Version specifiers <https://packaging.python.org/en/latest/specifications/version-specifiers/>`_
|
|
369
369
|
(``>=``, ``<=``, ``~=``, ``!=``, ``==``, ``===``) are supported. Multiple specifiers can be comma-separated,
|
|
370
|
-
for example ``>=3.11,<3.13``.
|
|
370
|
+
for example ``>=3.11,<3.13``. Each version is a release of up to three numbers with an optional ``a``, ``b`` or
|
|
371
|
+
``rc`` pre-release suffix, such as ``3.12`` or ``3.13.0rc1``; ``==`` and ``!=`` also take a trailing ``.*``
|
|
372
|
+
wildcard, as in ``==3.12.*``. A specifier with any item outside that form, such as ``>=3.x``, ``>=3.10.post1``,
|
|
373
|
+
``>=3.12 <4`` (missing comma) or ``>=3.12,foo``, falls back to a literal executable-name match.
|
|
@@ -177,28 +177,28 @@ sha256 = "d6f88de62e1d4e38ecb1077eb9724cd0eff29d2a08ca16a401e9b9e93f117cf9"
|
|
|
177
177
|
|
|
178
178
|
[[packages]]
|
|
179
179
|
name = "certifi"
|
|
180
|
-
version = "2026.10.
|
|
180
|
+
version = "2026.10.19"
|
|
181
181
|
marker = "\"docs\" in dependency_groups or \"pkg-meta\" in dependency_groups"
|
|
182
182
|
requires-python = ">=3.7"
|
|
183
183
|
index = "https://pypi.org/simple/"
|
|
184
184
|
|
|
185
185
|
[packages.sdist]
|
|
186
|
-
name = "certifi-2026.10.
|
|
187
|
-
upload-time = 2026-10-
|
|
188
|
-
url = "https://files.pythonhosted.org/packages/
|
|
189
|
-
size =
|
|
186
|
+
name = "certifi-2026.10.19.tar.gz"
|
|
187
|
+
upload-time = 2026-10-20 02:24:16.604828+00:00
|
|
188
|
+
url = "https://files.pythonhosted.org/packages/a6/bd/1436c50cc46699de0230fbaacc1d1de7bfec413176099949e9d5112e88f2/certifi-2026.10.19.tar.gz"
|
|
189
|
+
size = 137598
|
|
190
190
|
|
|
191
191
|
[packages.sdist.hashes]
|
|
192
|
-
sha256 = "
|
|
192
|
+
sha256 = "035c1e85572b141bf1c3a3eff0e33a8eb74917522f2559075ff8d2fea780a1ae"
|
|
193
193
|
|
|
194
194
|
[[packages.wheels]]
|
|
195
|
-
name = "certifi-2026.10.
|
|
196
|
-
upload-time = 2026-10-
|
|
197
|
-
url = "https://files.pythonhosted.org/packages/
|
|
198
|
-
size =
|
|
195
|
+
name = "certifi-2026.10.19-py3-none-any.whl"
|
|
196
|
+
upload-time = 2026-10-20 02:24:15.072385+00:00
|
|
197
|
+
url = "https://files.pythonhosted.org/packages/c4/51/29046e48f693c54e5b7412216d447a1d8362c9653148d98c02cdf65fa733/certifi-2026.10.19-py3-none-any.whl"
|
|
198
|
+
size = 136464
|
|
199
199
|
|
|
200
200
|
[packages.wheels.hashes]
|
|
201
|
-
sha256 = "
|
|
201
|
+
sha256 = "42d35340cc5b9ba78e818ddbff0c5b1c2b779de448a340fd1b989f5fa8670e1b"
|
|
202
202
|
|
|
203
203
|
[[packages]]
|
|
204
204
|
name = "cffi"
|
|
@@ -1696,28 +1696,28 @@ sha256 = "0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137"
|
|
|
1696
1696
|
|
|
1697
1697
|
[[packages]]
|
|
1698
1698
|
name = "setuptools"
|
|
1699
|
-
version = "84.
|
|
1699
|
+
version = "84.2.0"
|
|
1700
1700
|
marker = "\"build\" in dependency_groups or \"test\" in dependency_groups"
|
|
1701
1701
|
requires-python = ">=3.10"
|
|
1702
1702
|
index = "https://pypi.org/simple/"
|
|
1703
1703
|
|
|
1704
1704
|
[packages.sdist]
|
|
1705
|
-
name = "setuptools-84.
|
|
1706
|
-
upload-time = 2026-
|
|
1707
|
-
url = "https://files.pythonhosted.org/packages/
|
|
1708
|
-
size =
|
|
1705
|
+
name = "setuptools-84.2.0.tar.gz"
|
|
1706
|
+
upload-time = 2026-10-19 20:38:03.407523+00:00
|
|
1707
|
+
url = "https://files.pythonhosted.org/packages/63/40/e2c41d00a4bfea5548c31420a74c6cf149cc0e7c36b45c4c82202ce867aa/setuptools-84.2.0.tar.gz"
|
|
1708
|
+
size = 1227656
|
|
1709
1709
|
|
|
1710
1710
|
[packages.sdist.hashes]
|
|
1711
|
-
sha256 = "
|
|
1711
|
+
sha256 = "6f445ca2ce864605f81e223f262b4c94ffcb9a4a63473bae0ed7be5aab0291da"
|
|
1712
1712
|
|
|
1713
1713
|
[[packages.wheels]]
|
|
1714
|
-
name = "setuptools-84.
|
|
1715
|
-
upload-time = 2026-
|
|
1716
|
-
url = "https://files.pythonhosted.org/packages/
|
|
1717
|
-
size =
|
|
1714
|
+
name = "setuptools-84.2.0-py3-none-any.whl"
|
|
1715
|
+
upload-time = 2026-10-19 20:38:01.629093+00:00
|
|
1716
|
+
url = "https://files.pythonhosted.org/packages/dd/a2/2e1af99d56c8145aa69496026c7e5fd7b6ec759b500c3ad697e2062832dc/setuptools-84.2.0-py3-none-any.whl"
|
|
1717
|
+
size = 875816
|
|
1718
1718
|
|
|
1719
1719
|
[packages.wheels.hashes]
|
|
1720
|
-
sha256 = "
|
|
1720
|
+
sha256 = "8cc107ac7a403105dc8d6477664171f36135fab26adf8b5e0edaebc313f39b21"
|
|
1721
1721
|
|
|
1722
1722
|
[[packages]]
|
|
1723
1723
|
name = "setuptools-scm"
|
|
@@ -1801,7 +1801,7 @@ sha256 = "fa30e3ba4809cb81ce1f3209f2fbe3e779fc445f0439bc147a0d7c4601743f21"
|
|
|
1801
1801
|
|
|
1802
1802
|
[[packages]]
|
|
1803
1803
|
name = "sphinx"
|
|
1804
|
-
version = "9.1.
|
|
1804
|
+
version = "9.1.1"
|
|
1805
1805
|
marker = "\"docs\" in dependency_groups"
|
|
1806
1806
|
requires-python = ">=3.12"
|
|
1807
1807
|
dependencies = [
|
|
@@ -1825,22 +1825,22 @@ dependencies = [
|
|
|
1825
1825
|
index = "https://pypi.org/simple/"
|
|
1826
1826
|
|
|
1827
1827
|
[packages.sdist]
|
|
1828
|
-
name = "sphinx-9.1.
|
|
1829
|
-
upload-time =
|
|
1830
|
-
url = "https://files.pythonhosted.org/packages/
|
|
1831
|
-
size =
|
|
1828
|
+
name = "sphinx-9.1.1.tar.gz"
|
|
1829
|
+
upload-time = 2026-10-20 00:41:13.960930+00:00
|
|
1830
|
+
url = "https://files.pythonhosted.org/packages/fc/73/567727fc8c8d85bc3adc88a246e12937cfda8d565cf1d80e85bceaa61fe5/sphinx-9.1.1.tar.gz"
|
|
1831
|
+
size = 8725638
|
|
1832
1832
|
|
|
1833
1833
|
[packages.sdist.hashes]
|
|
1834
|
-
sha256 = "
|
|
1834
|
+
sha256 = "48b627f02908f22c601b3ba9c7b17265b4f315dd05c8bc64cd4da41183f44fbc"
|
|
1835
1835
|
|
|
1836
1836
|
[[packages.wheels]]
|
|
1837
|
-
name = "sphinx-9.1.
|
|
1838
|
-
upload-time =
|
|
1839
|
-
url = "https://files.pythonhosted.org/packages/
|
|
1840
|
-
size =
|
|
1837
|
+
name = "sphinx-9.1.1-py3-none-any.whl"
|
|
1838
|
+
upload-time = 2026-10-20 00:41:11.288695+00:00
|
|
1839
|
+
url = "https://files.pythonhosted.org/packages/47/18/3c66ea76da7de47e716b181c35bdbfafbd5e9af0bb247b14578e9de348e9/sphinx-9.1.1-py3-none-any.whl"
|
|
1840
|
+
size = 3923559
|
|
1841
1841
|
|
|
1842
1842
|
[packages.wheels.hashes]
|
|
1843
|
-
sha256 = "
|
|
1843
|
+
sha256 = "f8b60013ce25017be41a509e5c2d265bc1918410061315c36b809c7f335646c0"
|
|
1844
1844
|
|
|
1845
1845
|
[[packages]]
|
|
1846
1846
|
name = "sphinx-autodoc-typehints"
|
|
@@ -2385,28 +2385,28 @@ sha256 = "0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3"
|
|
|
2385
2385
|
|
|
2386
2386
|
[[packages]]
|
|
2387
2387
|
name = "uv"
|
|
2388
|
-
version = "0.13.
|
|
2388
|
+
version = "0.13.3"
|
|
2389
2389
|
marker = "\"pkg-meta\" in dependency_groups"
|
|
2390
2390
|
requires-python = ">=3.8"
|
|
2391
2391
|
index = "https://pypi.org/simple/"
|
|
2392
2392
|
|
|
2393
2393
|
[packages.sdist]
|
|
2394
|
-
name = "uv-0.13.
|
|
2395
|
-
upload-time = 2026-10-
|
|
2396
|
-
url = "https://files.pythonhosted.org/packages/
|
|
2397
|
-
size =
|
|
2394
|
+
name = "uv-0.13.3.tar.gz"
|
|
2395
|
+
upload-time = 2026-10-20 01:13:40.241842+00:00
|
|
2396
|
+
url = "https://files.pythonhosted.org/packages/b2/0d/0cf59876b94f537055fdcc6a32126fd9abb841620b6589ae3fcbf6e21f69/uv-0.13.3.tar.gz"
|
|
2397
|
+
size = 7477898
|
|
2398
2398
|
|
|
2399
2399
|
[packages.sdist.hashes]
|
|
2400
|
-
sha256 = "
|
|
2400
|
+
sha256 = "fe8587cb414b324753eb2c1b2a54d2f93b2aed7e9cf02e9c1efa3776547a3aae"
|
|
2401
2401
|
|
|
2402
2402
|
[[packages.wheels]]
|
|
2403
|
-
name = "uv-0.13.
|
|
2404
|
-
upload-time = 2026-10-
|
|
2405
|
-
url = "https://files.pythonhosted.org/packages/
|
|
2406
|
-
size =
|
|
2403
|
+
name = "uv-0.13.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
|
|
2404
|
+
upload-time = 2026-10-20 01:13:11.825804+00:00
|
|
2405
|
+
url = "https://files.pythonhosted.org/packages/7e/fa/45e1751beda39226d5472e6bb068747115a06f19c2559a8810aac9b881b7/uv-0.13.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
|
|
2406
|
+
size = 17301030
|
|
2407
2407
|
|
|
2408
2408
|
[packages.wheels.hashes]
|
|
2409
|
-
sha256 = "
|
|
2409
|
+
sha256 = "8d9ba65db55f3701908b09394cb7d3248be28496aab6bd9a96e8e870261ad372"
|
|
2410
2410
|
|
|
2411
2411
|
[[packages]]
|
|
2412
2412
|
name = "vcs-versioning"
|
|
@@ -2522,7 +2522,7 @@ sha256 = "3fa599046443d4ca830d06e3d180cd0a675d5871af0a68daa5623318bb4d17e3"
|
|
|
2522
2522
|
|
|
2523
2523
|
[tool.nab]
|
|
2524
2524
|
nab-version = "0.0.22"
|
|
2525
|
-
created-at = 2026-10-
|
|
2525
|
+
created-at = 2026-10-27 13:46:33.700020+00:00
|
|
2526
2526
|
command-line = [
|
|
2527
2527
|
"nab",
|
|
2528
2528
|
"lock",
|
|
@@ -2530,9 +2530,6 @@ command-line = [
|
|
|
2530
2530
|
"--all-extras",
|
|
2531
2531
|
"--no-cache",
|
|
2532
2532
|
"--upgrade",
|
|
2533
|
-
"pyproject.toml",
|
|
2534
|
-
"--output",
|
|
2535
|
-
"pylock.toml",
|
|
2536
2533
|
]
|
|
2537
2534
|
input-path = "pyproject.toml"
|
|
2538
2535
|
mode = "universal"
|
|
@@ -158,7 +158,8 @@ def _check_exe(path: str, tested_exes: set[str]) -> str | None:
|
|
|
158
158
|
if exe_id in tested_exes:
|
|
159
159
|
return None
|
|
160
160
|
tested_exes.add(exe_id)
|
|
161
|
-
|
|
161
|
+
# unlike Path.absolute(), abspath collapses "..", which PythonInfo._satisfies_path relies on
|
|
162
|
+
return os.path.abspath(path)
|
|
162
163
|
|
|
163
164
|
|
|
164
165
|
def _is_new_exe(exe_raw: str, tested_exes: set[str]) -> bool:
|
|
@@ -388,8 +389,9 @@ def _uv_sort_key(install: _UvInstall) -> tuple[int, ...]:
|
|
|
388
389
|
version = key.version
|
|
389
390
|
return (
|
|
390
391
|
impl_order.index(key.implementation) if key.implementation in impl_order else len(impl_order),
|
|
391
|
-
# uv's minor version links point at a concrete install that moves on upgrade, so report the target instead
|
|
392
|
-
|
|
392
|
+
# uv's minor version links point at a concrete install that moves on upgrade, so report the target instead;
|
|
393
|
+
# spot them by the name they resolve to, as on Windows they are junctions, which is_symlink() does not report
|
|
394
|
+
int(install.path.resolve().name != install.path.name),
|
|
393
395
|
-version.major,
|
|
394
396
|
-version.minor,
|
|
395
397
|
-version.micro,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import copy
|
|
5
6
|
import json
|
|
6
7
|
import logging
|
|
7
8
|
import os
|
|
@@ -295,7 +296,8 @@ class PythonInfo: # ruff:ignore[too-many-public-methods]
|
|
|
295
296
|
return True
|
|
296
297
|
version_info = self.version_info
|
|
297
298
|
for specifier in spec.version_specifier:
|
|
298
|
-
|
|
299
|
+
if specifier.version is None: # a hand-built spec can carry an unparsable version, which matches nothing
|
|
300
|
+
return False
|
|
299
301
|
numeric_version = specifier.version_str
|
|
300
302
|
for prefix in ("rc", "b", "a"):
|
|
301
303
|
if prefix in numeric_version:
|
|
@@ -474,7 +476,10 @@ class PythonInfo: # ruff:ignore[too-many-public-methods]
|
|
|
474
476
|
resolved = cls.from_exe(target.system_executable, cache)
|
|
475
477
|
if resolved is not None:
|
|
476
478
|
target = resolved
|
|
477
|
-
target.executable
|
|
479
|
+
if target.executable != start_executable:
|
|
480
|
+
# the cache hands every lookup of this base the same object, so point a copy at the start executable
|
|
481
|
+
target = copy.copy(target)
|
|
482
|
+
target.executable = start_executable
|
|
478
483
|
return target
|
|
479
484
|
|
|
480
485
|
_cache_exe_discovery: ClassVar[dict[tuple[str, bool], PythonInfo]] = {}
|
|
@@ -104,6 +104,11 @@ def _parse_specifier(string_spec: str) -> PythonSpec | None:
|
|
|
104
104
|
version_specifier = SpecifierSet.from_string(spec_text)
|
|
105
105
|
except InvalidSpecifier: # pragma: no cover
|
|
106
106
|
return None
|
|
107
|
+
# the set never raises: it keeps an unparsable version as None and drops items without an operator, so fall back
|
|
108
|
+
# to a literal path, like any other unrecognized spec, unless every item parsed into a usable version
|
|
109
|
+
items = [item for item in spec_text.split(",") if item.strip()]
|
|
110
|
+
if len(items) != len(version_specifier.specifiers) or any(spec.version is None for spec in version_specifier):
|
|
111
|
+
return None
|
|
107
112
|
if impl in {"py", "python"}:
|
|
108
113
|
impl = None
|
|
109
114
|
if impl == "graalvm":
|
|
@@ -227,12 +227,10 @@ class SimpleSpecifier:
|
|
|
227
227
|
return False
|
|
228
228
|
if candidate < self.version:
|
|
229
229
|
return False
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
return candidate < upper
|
|
235
|
-
return True # pragma: no cover
|
|
230
|
+
# ~=X.Y is >=X.Y, ==X.*: compare all but the last part the spec wrote (release is padded to three).
|
|
231
|
+
# A bare ~=X still compares its one part, so it stays ==X.*.
|
|
232
|
+
prefix = max(self.version_str.count("."), 1)
|
|
233
|
+
return candidate.release[:prefix] == self.version.release[:prefix]
|
|
236
234
|
|
|
237
235
|
def __eq__(self, other: object) -> bool:
|
|
238
236
|
if not isinstance(other, SimpleSpecifier):
|
|
@@ -93,6 +93,25 @@ def test_relative_path(session_cache: DiskCache, monkeypatch: pytest.MonkeyPatch
|
|
|
93
93
|
assert result is not None
|
|
94
94
|
|
|
95
95
|
|
|
96
|
+
@pytest.mark.parametrize(
|
|
97
|
+
"sep",
|
|
98
|
+
[
|
|
99
|
+
pytest.param("/", id="slash"),
|
|
100
|
+
pytest.param("\\", id="backslash", marks=pytest.mark.skipif(not IS_WIN, reason="Windows separator")),
|
|
101
|
+
],
|
|
102
|
+
)
|
|
103
|
+
def test_relative_path_with_parent_reference(
|
|
104
|
+
session_cache: DiskCache, monkeypatch: pytest.MonkeyPatch, sep: str
|
|
105
|
+
) -> None:
|
|
106
|
+
sys_executable = Path(PythonInfo.current_system(session_cache).system_executable)
|
|
107
|
+
monkeypatch.chdir(str(sys_executable.parent))
|
|
108
|
+
relative = sep.join((os.pardir, sys_executable.parent.name, sys_executable.name))
|
|
109
|
+
result = get_interpreter(relative, [], session_cache)
|
|
110
|
+
assert result is not None
|
|
111
|
+
assert os.pardir not in Path(result.executable).parts
|
|
112
|
+
assert Path(result.executable).samefile(sys_executable)
|
|
113
|
+
|
|
114
|
+
|
|
96
115
|
def test_discovery_fallback_fail(session_cache: DiskCache, caplog: pytest.LogCaptureFixture) -> None:
|
|
97
116
|
caplog.set_level(logging.DEBUG)
|
|
98
117
|
result = get_interpreter(["magic-one", "magic-two"], cache=session_cache)
|
|
@@ -100,7 +119,7 @@ def test_discovery_fallback_fail(session_cache: DiskCache, caplog: pytest.LogCap
|
|
|
100
119
|
assert "accepted" not in caplog.text
|
|
101
120
|
|
|
102
121
|
|
|
103
|
-
@pytest.mark.parametrize("missing", ["magic-one", "python."])
|
|
122
|
+
@pytest.mark.parametrize("missing", ["magic-one", "python.", ">=3.12 <4"])
|
|
104
123
|
def test_discovery_fallback_ok(missing: str, session_cache: DiskCache, caplog: pytest.LogCaptureFixture) -> None:
|
|
105
124
|
caplog.set_level(logging.DEBUG)
|
|
106
125
|
result = get_interpreter([missing, sys.executable], cache=session_cache)
|
|
@@ -148,6 +167,18 @@ def test_discovery_absolute_path_with_try_first(
|
|
|
148
167
|
assert Path(interpreter.executable) == good_exe
|
|
149
168
|
|
|
150
169
|
|
|
170
|
+
def test_discovery_venvs_on_one_base_keep_their_executable(tmp_path: Path, session_cache: DiskCache) -> None:
|
|
171
|
+
scripts_dir = "Scripts" if IS_WIN else "bin"
|
|
172
|
+
exe_name = "python.exe" if IS_WIN else "python"
|
|
173
|
+
exes = [tmp_path / name / scripts_dir / exe_name for name in ("a", "b")]
|
|
174
|
+
for exe in exes:
|
|
175
|
+
subprocess.check_call([sys.executable, "-m", "venv", "--without-pip", str(exe.parents[1])])
|
|
176
|
+
|
|
177
|
+
found = [get_interpreter(str(exe), cache=session_cache) for exe in exes]
|
|
178
|
+
|
|
179
|
+
assert [Path(info.executable) for info in found if info is not None] == exes
|
|
180
|
+
|
|
181
|
+
|
|
151
182
|
def test_discovery_via_path_with_file(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
152
183
|
a_file = tmp_path / "a_file"
|
|
153
184
|
a_file.touch()
|
|
@@ -64,6 +64,20 @@ def test_iter_interpreters_with_abs_path_yields_one(session_cache: DiskCache) ->
|
|
|
64
64
|
assert results[0].executable == sys.executable
|
|
65
65
|
|
|
66
66
|
|
|
67
|
+
@pytest.mark.usefixtures("uv_dir")
|
|
68
|
+
def test_iter_interpreters_relative_path_with_parent_reference(
|
|
69
|
+
session_cache: DiskCache, monkeypatch: pytest.MonkeyPatch
|
|
70
|
+
) -> None:
|
|
71
|
+
sys_executable = Path(PythonInfo.current_system(session_cache).system_executable)
|
|
72
|
+
monkeypatch.chdir(str(sys_executable.parent))
|
|
73
|
+
monkeypatch.setenv("PATH", "")
|
|
74
|
+
relative = str(Path(os.pardir) / sys_executable.parent.name / sys_executable.name)
|
|
75
|
+
results = list(iter_interpreters(relative, cache=session_cache))
|
|
76
|
+
assert len(results) == 1
|
|
77
|
+
assert os.pardir not in Path(results[0].executable).parts
|
|
78
|
+
assert Path(results[0].executable).samefile(sys_executable)
|
|
79
|
+
|
|
80
|
+
|
|
67
81
|
def test_iter_interpreters_sequence_dedups_across_keys(session_cache: DiskCache) -> None:
|
|
68
82
|
results = list(iter_interpreters([sys.executable, sys.executable], cache=session_cache))
|
|
69
83
|
assert len(results) == 1
|
|
@@ -297,6 +311,19 @@ def test_iter_interpreters_uv_layout(
|
|
|
297
311
|
["cpython-3.12.13-macos-aarch64-none/bin/python"],
|
|
298
312
|
id="specifier-rules-out-the-rest",
|
|
299
313
|
),
|
|
314
|
+
pytest.param(
|
|
315
|
+
(
|
|
316
|
+
"cpython-3.9.25-macos-aarch64-none/bin/python",
|
|
317
|
+
"cpython-3.10.19-macos-aarch64-none/bin/python",
|
|
318
|
+
"cpython-3.13.7-macos-aarch64-none/bin/python",
|
|
319
|
+
),
|
|
320
|
+
"~=3.10",
|
|
321
|
+
[
|
|
322
|
+
"cpython-3.13.7-macos-aarch64-none/bin/python",
|
|
323
|
+
"cpython-3.10.19-macos-aarch64-none/bin/python",
|
|
324
|
+
],
|
|
325
|
+
id="compatible-release-keeps-later-minors",
|
|
326
|
+
),
|
|
300
327
|
pytest.param(
|
|
301
328
|
(
|
|
302
329
|
"cpython-3.14.6-macos-aarch64-none/bin/python",
|
|
@@ -404,6 +431,42 @@ def test_iter_interpreters_uv_minor_version_link_loses_to_its_target(
|
|
|
404
431
|
assert uv_probed("3.15") == ["cpython-3.15.0b3-macos-aarch64-none/bin/python"]
|
|
405
432
|
|
|
406
433
|
|
|
434
|
+
@pytest.mark.parametrize(
|
|
435
|
+
("concrete", "link"),
|
|
436
|
+
[
|
|
437
|
+
pytest.param("cpython-3.15.0b3-windows-x86_64-none", "cpython-3.15-windows-x86_64-none", id="prerelease"),
|
|
438
|
+
# the link ties with its target on version, so directory name order decides, and "-" sorts before "."
|
|
439
|
+
pytest.param("cpython-3.14.0-windows-x86_64-none", "cpython-3.14-windows-x86_64-none", id="first-release"),
|
|
440
|
+
],
|
|
441
|
+
)
|
|
442
|
+
def test_iter_interpreters_uv_minor_version_junction_loses_to_its_target(
|
|
443
|
+
uv_install: Callable[..., None],
|
|
444
|
+
uv_probed: Callable[[str | None], list[str]],
|
|
445
|
+
uv_junction: Callable[[str, str], None],
|
|
446
|
+
concrete: str,
|
|
447
|
+
link: str,
|
|
448
|
+
) -> None:
|
|
449
|
+
uv_install(f"{concrete}/python.exe")
|
|
450
|
+
uv_junction(concrete, link)
|
|
451
|
+
|
|
452
|
+
assert uv_probed("3") == [f"{concrete}/python.exe"]
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
@pytest.fixture
|
|
456
|
+
def uv_junction(uv_dir: Path, mocker: MockerFixture) -> Callable[[str, str], None]:
|
|
457
|
+
def _junction(target: str, link: str) -> None:
|
|
458
|
+
if IS_WIN: # pragma: win32 cover
|
|
459
|
+
import _winapi
|
|
460
|
+
|
|
461
|
+
_winapi.CreateJunction(str(uv_dir / target), str(uv_dir / link))
|
|
462
|
+
else: # pragma: win32 no cover
|
|
463
|
+
# stand in for the junction with a symlink that does not report as one
|
|
464
|
+
(uv_dir / link).symlink_to(uv_dir / target)
|
|
465
|
+
mocker.patch.object(Path, "is_symlink", return_value=False)
|
|
466
|
+
|
|
467
|
+
return _junction
|
|
468
|
+
|
|
469
|
+
|
|
407
470
|
def test_iter_interpreters_uv_probes_one_executable_per_install(
|
|
408
471
|
uv_dir: Path, uv_install: Callable[..., None], monkeypatch: pytest.MonkeyPatch, mocker: MockerFixture
|
|
409
472
|
) -> None:
|
|
@@ -10,7 +10,7 @@ from unittest.mock import MagicMock
|
|
|
10
10
|
|
|
11
11
|
import pytest
|
|
12
12
|
|
|
13
|
-
from python_discovery import DiskCache, PythonInfo, PythonSpec
|
|
13
|
+
from python_discovery import DiskCache, PythonInfo, PythonSpec, SimpleSpecifierSet
|
|
14
14
|
from python_discovery._py_info import VersionInfo
|
|
15
15
|
|
|
16
16
|
if TYPE_CHECKING:
|
|
@@ -195,6 +195,12 @@ def test_satisfies_version_specifier_fails() -> None:
|
|
|
195
195
|
assert CURRENT.satisfies(spec, impl_must_match=False) is False
|
|
196
196
|
|
|
197
197
|
|
|
198
|
+
def test_satisfies_version_specifier_unparsable_version() -> None:
|
|
199
|
+
specifier = SimpleSpecifierSet.from_string(">=3.x")
|
|
200
|
+
spec = PythonSpec(">=3.x", None, None, None, None, None, None, version_specifier=specifier)
|
|
201
|
+
assert CURRENT.satisfies(spec, impl_must_match=False) is False
|
|
202
|
+
|
|
203
|
+
|
|
198
204
|
@pytest.mark.parametrize(
|
|
199
205
|
("version_info", "spec_str", "expected"),
|
|
200
206
|
[
|
|
@@ -211,6 +217,9 @@ def test_satisfies_version_specifier_fails() -> None:
|
|
|
211
217
|
pytest.param(VersionInfo(3, 15, 0, "final", 0), "<3.15.0a6", False, id="final_not_less_than_prerelease"),
|
|
212
218
|
pytest.param(VersionInfo(3, 15, 0, "final", 0), ">=3.15", True, id="final_match_major_minor"),
|
|
213
219
|
pytest.param(VersionInfo(3, 15, 1, "alpha", 1), ">=3.15.0", True, id="later_micro_prerelease_match"),
|
|
220
|
+
pytest.param(VersionInfo(3, 13, 7, "final", 0), "~=3.10", True, id="compatible_release_later_minor"),
|
|
221
|
+
pytest.param(VersionInfo(4, 0, 0, "final", 0), "~=3.10", False, id="compatible_release_next_major"),
|
|
222
|
+
pytest.param(VersionInfo(3, 13, 0, "alpha", 1), "~=3.12.0", False, id="compatible_release_next_minor_alpha"),
|
|
214
223
|
],
|
|
215
224
|
)
|
|
216
225
|
def test_satisfies_version_specifier_prerelease(version_info: VersionInfo, spec_str: str, expected: bool) -> None:
|
|
@@ -430,3 +439,36 @@ def test_resolve_to_system_from_exe_returns_none(mocker: MockerFixture) -> None:
|
|
|
430
439
|
mocker.patch.object(PythonInfo, "from_exe", return_value=None)
|
|
431
440
|
result = PythonInfo.resolve_to_system(None, target)
|
|
432
441
|
assert result.executable == "/some/venv/python"
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
@pytest.mark.parametrize(
|
|
445
|
+
"system_executable",
|
|
446
|
+
[
|
|
447
|
+
pytest.param("/some/system/python", id="resolved"),
|
|
448
|
+
pytest.param(None, id="discovered"),
|
|
449
|
+
],
|
|
450
|
+
)
|
|
451
|
+
def test_resolve_to_system_leaves_shared_info_untouched(mocker: MockerFixture, system_executable: str | None) -> None:
|
|
452
|
+
shared = copy.deepcopy(CURRENT)
|
|
453
|
+
shared.system_executable = shared.executable = "/some/system/python"
|
|
454
|
+
mocker.patch.object(PythonInfo, "from_exe", return_value=shared)
|
|
455
|
+
mocker.patch.object(PythonInfo, "discover_exe", return_value=shared)
|
|
456
|
+
|
|
457
|
+
results: list[PythonInfo] = []
|
|
458
|
+
for venv in ("/some/venv-a", "/some/venv-b"):
|
|
459
|
+
target = copy.deepcopy(CURRENT)
|
|
460
|
+
target.system_executable = system_executable
|
|
461
|
+
target.real_prefix, target.base_prefix, target.executable = None, venv, f"{venv}/python"
|
|
462
|
+
results.append(PythonInfo.resolve_to_system(None, target))
|
|
463
|
+
|
|
464
|
+
assert [(info.executable, info.system_executable) for info in results] == [
|
|
465
|
+
("/some/venv-a/python", "/some/system/python"),
|
|
466
|
+
("/some/venv-b/python", "/some/system/python"),
|
|
467
|
+
]
|
|
468
|
+
assert shared.executable == "/some/system/python"
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
def test_resolve_to_system_returns_target_when_executable_unchanged() -> None:
|
|
472
|
+
target = copy.deepcopy(CURRENT)
|
|
473
|
+
target.system_executable = target.executable = "/some/system/python"
|
|
474
|
+
assert PythonInfo.resolve_to_system(None, target) is target
|
|
@@ -13,7 +13,27 @@ if TYPE_CHECKING:
|
|
|
13
13
|
from pathlib import Path
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
@pytest.mark.parametrize(
|
|
16
|
+
@pytest.mark.parametrize(
|
|
17
|
+
"text",
|
|
18
|
+
[
|
|
19
|
+
"python2.3.4.5",
|
|
20
|
+
".",
|
|
21
|
+
"..",
|
|
22
|
+
"...",
|
|
23
|
+
"python.",
|
|
24
|
+
"cpython..",
|
|
25
|
+
"pypy...",
|
|
26
|
+
">=3.x",
|
|
27
|
+
">=3.12 <4",
|
|
28
|
+
">=3.10.post1",
|
|
29
|
+
"cpython>=v3.10",
|
|
30
|
+
">=3.12,<4.x",
|
|
31
|
+
">=3.x,<4",
|
|
32
|
+
"<,4",
|
|
33
|
+
">=3.12,foo",
|
|
34
|
+
">=3.12, 4",
|
|
35
|
+
],
|
|
36
|
+
)
|
|
17
37
|
def test_bad_py_spec(text: str) -> None:
|
|
18
38
|
spec = PythonSpec.from_string_spec(text)
|
|
19
39
|
assert text in repr(spec)
|
|
@@ -149,6 +149,12 @@ def test_specifier_parse_wildcard() -> None:
|
|
|
149
149
|
pytest.param("~=3.12.0", "3.13.0", False, id="compatible-next-minor"),
|
|
150
150
|
pytest.param("~=3.12.0", "3.11.0", False, id="compatible-below"),
|
|
151
151
|
pytest.param("~=3.12.0", "3.11.9", False, id="compatible-just-below"),
|
|
152
|
+
pytest.param("~=3.12.0", "3.13.0a1", False, id="compatible-next-minor-prerelease"),
|
|
153
|
+
pytest.param("~=3.10", "3.13.7", True, id="compatible-two-part-next-minor"),
|
|
154
|
+
pytest.param("~=3.10", "3.9.25", False, id="compatible-two-part-below"),
|
|
155
|
+
pytest.param("~=3.10", "4.0.0", False, id="compatible-two-part-next-major"),
|
|
156
|
+
pytest.param("~=3.10", "4.0.0a1", False, id="compatible-two-part-next-major-prerelease"),
|
|
157
|
+
pytest.param("~=3.13rc1", "3.14.0", True, id="compatible-two-part-prerelease-next-minor"),
|
|
152
158
|
pytest.param(">=3.12", "not_a_version", False, id="invalid-version"),
|
|
153
159
|
],
|
|
154
160
|
)
|
|
@@ -297,3 +303,5 @@ def test_specifier_compatible_release_major_only() -> None:
|
|
|
297
303
|
spec = SimpleSpecifier.from_string("~=3")
|
|
298
304
|
assert spec.contains("3.0.0") is True
|
|
299
305
|
assert spec.contains("3.0.5") is True
|
|
306
|
+
assert spec.contains("3.13.7") is True
|
|
307
|
+
assert spec.contains("4.0.0") is False
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: "github-actions"
|
|
4
|
-
directory: "/"
|
|
5
|
-
labels:
|
|
6
|
-
- dependencies
|
|
7
|
-
- github_actions
|
|
8
|
-
- skip news
|
|
9
|
-
schedule:
|
|
10
|
-
interval: "weekly"
|
|
11
|
-
day: "tuesday"
|
|
12
|
-
groups:
|
|
13
|
-
github-actions:
|
|
14
|
-
patterns:
|
|
15
|
-
- "*"
|
|
16
|
-
cooldown:
|
|
17
|
-
default-days: 7
|
|
18
|
-
- package-ecosystem: "pre-commit"
|
|
19
|
-
directory: "/"
|
|
20
|
-
labels:
|
|
21
|
-
- dependencies
|
|
22
|
-
- skip news
|
|
23
|
-
schedule:
|
|
24
|
-
interval: "weekly"
|
|
25
|
-
day: "tuesday"
|
|
26
|
-
groups:
|
|
27
|
-
formatting-plugins:
|
|
28
|
-
patterns:
|
|
29
|
-
- "mdformat-gfm"
|
|
30
|
-
- "mdformat-ruff"
|
|
31
|
-
- "sphinx"
|
|
32
|
-
cooldown:
|
|
33
|
-
default-days: 7
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_discovery-1.6.5 → python_discovery-1.6.7}/tests/py_info/test_py_info_exe_based_of.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|