python-discovery 1.6.5__tar.gz → 1.6.6__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.6/.github/dependabot.yaml +30 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.github/workflows/release.yaml +1 -1
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.pre-commit-config.yaml +1 -1
- {python_discovery-1.6.5 → python_discovery-1.6.6}/PKG-INFO +1 -1
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/changelog.rst +19 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/explanation.rst +4 -1
- {python_discovery-1.6.5 → python_discovery-1.6.6}/pylock.toml +45 -48
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_discovery.py +2 -1
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_py_info.py +2 -1
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_py_spec.py +5 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_specifier.py +4 -6
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_discovery.py +20 -1
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_iter_interpreters.py +27 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_py_info_extra.py +10 -1
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_py_spec.py +21 -1
- {python_discovery-1.6.5 → python_discovery-1.6.6}/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.6}/.github/FUNDING.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.github/SECURITY.md +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.github/release.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.github/workflows/check.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.github/workflows/codeql.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.github/workflows/news.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.github/workflows/prepare-release.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.github/workflows/upgrade-release-tools.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.gitignore +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.readthedocs.yaml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/.readthedocs.yml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/CODE_OF_CONDUCT.md +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/LICENSE +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/README.md +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/_static/custom.css +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/_static/logo.svg +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/changelog/template.jinja2 +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/conf.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/contributing.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/how-to/standalone-usage.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/index.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/reference/api.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/reference/environment-variables.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/docs/tutorial/getting-started.rst +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/pyproject.toml +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/__init__.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_cache.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_cached_py_info.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_compat.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_py_info_collect.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_windows/__init__.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_windows/_pep514.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/_windows/_propose.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/src/python_discovery/py.typed +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tasks/old_target_check.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tasks/old_target_check.sh +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/conftest.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/py_info/test_py_info.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/py_info/test_py_info_exe_based_of.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_cache.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_cache_recovery.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_cached_py_info.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_discovery_extra.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_py_info_collect.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_py_spec_extra.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/test_query_timeout.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/windows/conftest.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/windows/test_windows.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/windows/test_windows_pep514.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/tests/windows/winreg_mock_values.py +0 -0
- {python_discovery-1.6.5 → python_discovery-1.6.6}/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
|
|
@@ -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:
|
|
@@ -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,25 @@
|
|
|
6
6
|
|
|
7
7
|
.. towncrier release notes start
|
|
8
8
|
|
|
9
|
+
.. _release-1-6-6:
|
|
10
|
+
|
|
11
|
+
*********************
|
|
12
|
+
v1.6.6 (2026-10-27)
|
|
13
|
+
*********************
|
|
14
|
+
|
|
15
|
+
.. _release-1-6-6-fixed:
|
|
16
|
+
|
|
17
|
+
Fixed
|
|
18
|
+
-----
|
|
19
|
+
|
|
20
|
+
- Treat version specifiers with an item that cannot be parsed, such as ``>=3.x``, ``>=3.12 <4`` or ``>=3.12,foo``, as
|
|
21
|
+
literal executable paths instead of raising a bare ``AssertionError`` or ignoring the item during discovery
|
|
22
|
+
(:pr:`157`) by :user:`darrenhuai` and :user:`gaborbernat`.
|
|
23
|
+
- Accept relative interpreter paths that step up a directory, such as ``../venv/bin/python``, which were found and
|
|
24
|
+
queried but never matched the spec (:pr:`158`) by :user:`darrenhuai` and :user:`gaborbernat`.
|
|
25
|
+
- Match ``~=X.Y`` compatible-release specifiers against later minor versions, as PEP 440 defines, instead of only the
|
|
26
|
+
same minor; ``~=3.10`` now accepts 3.11 and newer 3.x (:pr:`159`) by :user:`darrenhuai` and :user:`gaborbernat`.
|
|
27
|
+
|
|
9
28
|
.. _release-1-6-5:
|
|
10
29
|
|
|
11
30
|
*********************
|
|
@@ -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:
|
|
@@ -295,7 +295,8 @@ class PythonInfo: # ruff:ignore[too-many-public-methods]
|
|
|
295
295
|
return True
|
|
296
296
|
version_info = self.version_info
|
|
297
297
|
for specifier in spec.version_specifier:
|
|
298
|
-
|
|
298
|
+
if specifier.version is None: # a hand-built spec can carry an unparsable version, which matches nothing
|
|
299
|
+
return False
|
|
299
300
|
numeric_version = specifier.version_str
|
|
300
301
|
for prefix in ("rc", "b", "a"):
|
|
301
302
|
if prefix in numeric_version:
|
|
@@ -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)
|
|
@@ -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",
|
|
@@ -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:
|
|
@@ -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
|
{python_discovery-1.6.5 → python_discovery-1.6.6}/.github/workflows/upgrade-release-tools.yaml
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
|
|
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.6}/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
|