python-discovery 1.8.0__py3-none-any.whl → 1.9.0__py3-none-any.whl

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.
@@ -6,7 +6,7 @@ from importlib.metadata import version
6
6
 
7
7
  from ._cache import ContentStore, DiskCache, PyInfoCache
8
8
  from ._discovery import get_interpreter, iter_interpreters
9
- from ._py_info import KNOWN_ARCHITECTURES, PythonInfo, normalize_isa
9
+ from ._py_info import KNOWN_ARCHITECTURES, MarkerEnvironment, PythonInfo, normalize_isa
10
10
  from ._py_spec import KNOWN_IMPLEMENTATIONS, PythonSpec
11
11
  from ._specifier import SimpleSpecifier, SimpleSpecifierSet, SimpleVersion
12
12
 
@@ -17,6 +17,7 @@ __all__ = [
17
17
  "KNOWN_IMPLEMENTATIONS",
18
18
  "ContentStore",
19
19
  "DiskCache",
20
+ "MarkerEnvironment",
20
21
  "PyInfoCache",
21
22
  "PythonInfo",
22
23
  "PythonSpec",
@@ -11,7 +11,7 @@ import sys
11
11
  from collections import OrderedDict
12
12
  from itertools import product
13
13
  from string import digits
14
- from typing import TYPE_CHECKING, ClassVar, Final, NamedTuple
14
+ from typing import TYPE_CHECKING, ClassVar, Final, NamedTuple, TypedDict
15
15
 
16
16
  from ._py_info_collect import PythonInfoCollector
17
17
 
@@ -57,7 +57,7 @@ class PythonInfo: # ruff:ignore[too-many-public-methods]
57
57
  os: str
58
58
  free_threaded: bool
59
59
  debug_build: bool
60
- marker_environment: dict[str, str]
60
+ marker_environment: MarkerEnvironment
61
61
  prefix: str | None
62
62
  base_prefix: str | None
63
63
  real_prefix: str | None
@@ -629,6 +629,20 @@ class PythonInfo: # ruff:ignore[too-many-public-methods]
629
629
  yield upper
630
630
 
631
631
 
632
+ class MarkerEnvironment(TypedDict):
633
+ implementation_name: str
634
+ implementation_version: str
635
+ os_name: str
636
+ platform_machine: str
637
+ platform_release: str
638
+ platform_system: str
639
+ platform_version: str
640
+ python_full_version: str
641
+ platform_python_implementation: str
642
+ python_version: str
643
+ sys_platform: str
644
+
645
+
632
646
  KNOWN_ARCHITECTURES: frozenset[str] = frozenset({
633
647
  "arm64",
634
648
  "loongarch64",
@@ -672,6 +686,7 @@ def normalize_isa(isa: str) -> str:
672
686
 
673
687
  __all__ = [
674
688
  "KNOWN_ARCHITECTURES",
689
+ "MarkerEnvironment",
675
690
  "PythonInfo",
676
691
  "VersionInfo",
677
692
  "normalize_isa",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: python-discovery
3
- Version: 1.8.0
3
+ Version: 1.9.0
4
4
  Import-Name: python_discovery
5
5
  Summary: Python interpreter discovery
6
6
  Project-URL: Changelog, https://github.com/tox-dev/python-discovery/blob/main/docs/changelog.rst
@@ -1,9 +1,9 @@
1
- python_discovery/__init__.py,sha256=Hi4j3pMvC8Fo8KoNL-wOHsPSCUHwY4c0qvv5sjnFzME,808
1
+ python_discovery/__init__.py,sha256=BV4pKMWDAK_3pU8o2hYvtL30WKs_wTzIBRuFV7nUaug,852
2
2
  python_discovery/_cache.py,sha256=svmG2GzUQzd2xTjAbm2eX1CKxxGAglfv4kxaPuxwPIA,5147
3
3
  python_discovery/_cached_py_info.py,sha256=15P5_TODxkZCkNfD2Uk5dtPxGf0Nea_aWm2N7uY9zbY,12059
4
4
  python_discovery/_compat.py,sha256=iqxGuhK9rPaiui80G1H1KrweoMJ16gyLYEmUrSXrp5c,709
5
5
  python_discovery/_discovery.py,sha256=Ulq3gbOrCvVULengzFF20yrDwGYCj3xs86CGqF2LThc,23212
6
- python_discovery/_py_info.py,sha256=iCmE5rv-B9yGpSmaSeZx2RF1x5FCf3ezarsHnMpT6JA,27004
6
+ python_discovery/_py_info.py,sha256=AzL53BYCDB8nxVBbXyOh4YsFtZft-HoTG7EnCJdp7B8,27377
7
7
  python_discovery/_py_info_collect.py,sha256=k9P4JzNkvW9iw37teeu7L6Y27ytWTnvWiK47B3gm5xg,17390
8
8
  python_discovery/_py_spec.py,sha256=14WRyDOLEQt7COevcUU5Rb6sgy99l9XI5XEQRUtCHf8,11800
9
9
  python_discovery/_specifier.py,sha256=9sMnJs7FTfIIduTCKKTA7Lk7onARqwkG_zzFIqgj0xs,10364
@@ -11,7 +11,7 @@ python_discovery/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  python_discovery/_windows/__init__.py,sha256=qthcyGh36b3WkeSbZ4ECRRYLbCOCaQu5X_DRZ98tXfk,315
12
12
  python_discovery/_windows/_pep514.py,sha256=Vhxe-3hETFIXQrekLqOHmzG5eq5moeR8b0dCS80zbBg,8026
13
13
  python_discovery/_windows/_propose.py,sha256=EE-N-BiNgrFU9mQ34SkoF5gRaNjtspghssQxT9uRQi0,1756
14
- python_discovery-1.8.0.dist-info/METADATA,sha256=USw0gc2rwC_fdUMXfh3bWhnDQ7imwPM8uDeyYo8e16M,3937
15
- python_discovery-1.8.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
16
- python_discovery-1.8.0.dist-info/licenses/LICENSE,sha256=kOJeH68qSq6o2V7o5_VziwUqGswMnFgGgQH5Mahr1Yg,1023
17
- python_discovery-1.8.0.dist-info/RECORD,,
14
+ python_discovery-1.9.0.dist-info/METADATA,sha256=Bho3HCmi0jKsr1vRJbe9CU2J0PctXyaX6MsWsT_uk8A,3937
15
+ python_discovery-1.9.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
16
+ python_discovery-1.9.0.dist-info/licenses/LICENSE,sha256=kOJeH68qSq6o2V7o5_VziwUqGswMnFgGgQH5Mahr1Yg,1023
17
+ python_discovery-1.9.0.dist-info/RECORD,,