pbs-installer 2025.5.29__py3-none-any.whl → 2025.6.6__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.
pbs_installer/_install.py CHANGED
@@ -60,20 +60,17 @@ def get_download_link(
60
60
  """
61
61
  from ._versions import PYTHON_VERSIONS
62
62
 
63
+ if free_threaded and not request.endswith("t"):
64
+ request += "t"
65
+
63
66
  for py_ver, urls in PYTHON_VERSIONS.items():
64
67
  if not py_ver.matches(request, implementation):
65
68
  continue
66
69
 
67
- if request.endswith("t"):
68
- free_threaded = True
69
-
70
- matched = urls.get((platform, arch, not build_dir, free_threaded))
70
+ matched = urls.get((platform, arch, not build_dir))
71
71
  if matched is not None:
72
72
  return py_ver, matched
73
- if (
74
- not build_dir
75
- and (matched := urls.get((platform, arch, False, free_threaded))) is not None
76
- ):
73
+ if not build_dir and (matched := urls.get((platform, arch, False))) is not None:
77
74
  return py_ver, matched
78
75
  raise ValueError(
79
76
  f"Could not find a version matching version={request!r}, implementation={implementation}"
pbs_installer/_utils.py CHANGED
@@ -19,13 +19,16 @@ class PythonVersion(NamedTuple):
19
19
  major: int
20
20
  minor: int
21
21
  micro: int
22
+ freethreaded: bool = False
22
23
 
23
24
  def __str__(self) -> str:
24
- return f"{self.implementation}@{self.major}.{self.minor}.{self.micro}"
25
+ return f"{self.implementation}@{self.major}.{self.minor}.{self.micro}{'t' if self.freethreaded else ''}"
25
26
 
26
27
  def matches(self, request: str, implementation: str) -> bool:
27
28
  if implementation != self.implementation:
28
29
  return False
30
+ if self.freethreaded != request.endswith("t"):
31
+ return False
29
32
  try:
30
33
  parts = tuple(int(v) for v in request.rstrip("t").split("."))
31
34
  except ValueError: