python-discovery 1.5.3__tar.gz → 1.6.0__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.5.3 → python_discovery-1.6.0}/.pre-commit-config.yaml +2 -2
- {python_discovery-1.5.3 → python_discovery-1.6.0}/PKG-INFO +1 -1
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/changelog.rst +12 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_py_info.py +11 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/py_info/test_py_info.py +14 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/.github/FUNDING.yaml +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/.github/SECURITY.md +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/.github/dependabot.yaml +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/.github/release.yaml +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/.github/workflows/check.yaml +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/.github/workflows/prepare-release.yaml +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/.github/workflows/release.yaml +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/.gitignore +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/.readthedocs.yaml +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/.readthedocs.yml +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/CODE_OF_CONDUCT.md +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/LICENSE +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/README.md +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/_static/custom.css +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/_static/logo.svg +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/changelog/template.jinja2 +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/conf.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/explanation.rst +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/how-to/standalone-usage.rst +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/index.rst +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/reference/api.rst +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/reference/environment-variables.rst +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/docs/tutorial/getting-started.rst +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/pyproject.toml +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/__init__.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_cache.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_cached_py_info.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_compat.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_discovery.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_py_info_collect.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_py_spec.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_specifier.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_windows/__init__.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_windows/_pep514.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/_windows/_propose.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/src/python_discovery/py.typed +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tasks/old_target_check.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tasks/old_target_check.sh +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tasks/release.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/conftest.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/py_info/test_py_info_exe_based_of.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/test_cache.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/test_cached_py_info.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/test_discovery.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/test_discovery_extra.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/test_iter_interpreters.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/test_py_info_collect.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/test_py_info_extra.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/test_py_spec.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/test_py_spec_extra.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/test_specifier.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/windows/conftest.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/windows/test_windows.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/windows/test_windows_pep514.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tests/windows/winreg_mock_values.py +0 -0
- {python_discovery-1.5.3 → python_discovery-1.6.0}/tox.toml +0 -0
|
@@ -15,11 +15,11 @@ repos:
|
|
|
15
15
|
- id: codespell
|
|
16
16
|
additional_dependencies: ["tomli>=2.4"]
|
|
17
17
|
- repo: https://github.com/tox-dev/pyproject-fmt
|
|
18
|
-
rev: "v2.28.
|
|
18
|
+
rev: "v2.28.1"
|
|
19
19
|
hooks:
|
|
20
20
|
- id: pyproject-fmt
|
|
21
21
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
22
|
-
rev: "v0.16.
|
|
22
|
+
rev: "v0.16.4"
|
|
23
23
|
hooks:
|
|
24
24
|
- id: ruff-format
|
|
25
25
|
- id: ruff
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: python-discovery
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Summary: Python interpreter discovery
|
|
5
5
|
Project-URL: Changelog, https://github.com/tox-dev/python-discovery/releases
|
|
6
6
|
Project-URL: Documentation, https://python-discovery.readthedocs.io
|
|
@@ -6,6 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
.. towncrier release notes start
|
|
8
8
|
|
|
9
|
+
********************
|
|
10
|
+
v1.6.0 (2026-08-28)
|
|
11
|
+
********************
|
|
12
|
+
|
|
13
|
+
Features - 1.6.0
|
|
14
|
+
================
|
|
15
|
+
- :attr:`~python_discovery.PythonInfo.system_exe` returns the executable of the system Python an interpreter is based on,
|
|
16
|
+
falling back to :attr:`~python_discovery.PythonInfo.executable` the way
|
|
17
|
+
:meth:`~python_discovery.PythonInfo.resolve_to_system` does. :attr:`~python_discovery.PythonInfo.system_executable` is
|
|
18
|
+
``None`` until resolution runs, so every consumer had to narrow a value discovery has already settled - by
|
|
19
|
+
:user:`gaborbernat`. (:issue:`127`)
|
|
20
|
+
|
|
9
21
|
********************
|
|
10
22
|
v1.5.3 (2026-08-24)
|
|
11
23
|
********************
|
|
@@ -167,6 +167,17 @@ class PythonInfo: # ruff:ignore[too-many-public-methods]
|
|
|
167
167
|
"""The exec prefix of the system Python this interpreter is based on."""
|
|
168
168
|
return self.real_prefix or self.base_exec_prefix or self.exec_prefix
|
|
169
169
|
|
|
170
|
+
@property
|
|
171
|
+
def system_exe(self) -> str:
|
|
172
|
+
"""
|
|
173
|
+
The executable of the system Python this interpreter is based on.
|
|
174
|
+
|
|
175
|
+
:attr:`system_executable` stays ``None`` until :meth:`resolve_to_system` walks the prefix chain, so reading it
|
|
176
|
+
forces every caller to narrow a value discovery has already settled. The fallback here matches what resolution
|
|
177
|
+
itself writes when a prefix links back to its own interpreter.
|
|
178
|
+
"""
|
|
179
|
+
return self.system_executable or self.executable
|
|
180
|
+
|
|
170
181
|
def __repr__(self) -> str:
|
|
171
182
|
return "{}({!r})".format(
|
|
172
183
|
self.__class__.__name__,
|
|
@@ -511,3 +511,17 @@ def test_select_most_likely_prefers_machine_match(
|
|
|
511
511
|
d.sysconfig_platform = plat
|
|
512
512
|
result = PythonInfo._select_most_likely(discovered, target)
|
|
513
513
|
assert result.sysconfig_platform == discovered_platforms[expected_idx]
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
@pytest.mark.parametrize(
|
|
517
|
+
("system_executable", "expected"),
|
|
518
|
+
[
|
|
519
|
+
pytest.param("/usr/bin/python3", "/usr/bin/python3", id="resolved"),
|
|
520
|
+
pytest.param(None, "/venv/bin/python", id="unresolved falls back to executable"),
|
|
521
|
+
],
|
|
522
|
+
)
|
|
523
|
+
def test_py_info_system_exe(system_executable: str | None, expected: str) -> None:
|
|
524
|
+
info = copy.deepcopy(CURRENT)
|
|
525
|
+
info.executable = "/venv/bin/python"
|
|
526
|
+
info.system_executable = system_executable
|
|
527
|
+
assert info.system_exe == expected
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_discovery-1.5.3 → python_discovery-1.6.0}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|