pbs-installer 2024.3.23__py3-none-any.whl → 2024.3.27__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 +9 -11
- pbs_installer/_versions.py +0 -1
- {pbs_installer-2024.3.23.dist-info → pbs_installer-2024.3.27.dist-info}/METADATA +1 -1
- pbs_installer-2024.3.27.dist-info/RECORD +10 -0
- pbs_installer-2024.3.23.dist-info/RECORD +0 -10
- {pbs_installer-2024.3.23.dist-info → pbs_installer-2024.3.27.dist-info}/WHEEL +0 -0
- {pbs_installer-2024.3.23.dist-info → pbs_installer-2024.3.27.dist-info}/entry_points.txt +0 -0
- {pbs_installer-2024.3.23.dist-info → pbs_installer-2024.3.27.dist-info}/licenses/LICENSE +0 -0
pbs_installer/_install.py
CHANGED
|
@@ -4,7 +4,7 @@ import hashlib
|
|
|
4
4
|
import logging
|
|
5
5
|
import os
|
|
6
6
|
import tempfile
|
|
7
|
-
from typing import TYPE_CHECKING, Tuple
|
|
7
|
+
from typing import TYPE_CHECKING, Optional, Tuple
|
|
8
8
|
from urllib.parse import unquote
|
|
9
9
|
|
|
10
10
|
from ._utils import PythonVersion, get_arch_platform
|
|
@@ -15,7 +15,7 @@ if TYPE_CHECKING:
|
|
|
15
15
|
|
|
16
16
|
logger = logging.getLogger(__name__)
|
|
17
17
|
THIS_ARCH, THIS_PLATFORM = get_arch_platform()
|
|
18
|
-
PythonFile = Tuple[str, str
|
|
18
|
+
PythonFile = Tuple[str, Optional[str]]
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
def _get_headers() -> dict[str, str] | None:
|
|
@@ -95,15 +95,13 @@ def download(
|
|
|
95
95
|
if not checksum:
|
|
96
96
|
logger.warning("No checksum found for %s, this would be insecure", url)
|
|
97
97
|
|
|
98
|
-
with (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
hasher.update(chunk)
|
|
106
|
-
f.write(chunk)
|
|
98
|
+
with open(destination, "wb") as f:
|
|
99
|
+
with client.stream("GET", url, headers=_get_headers()) as resp:
|
|
100
|
+
resp.raise_for_status()
|
|
101
|
+
for chunk in resp.iter_bytes(chunk_size=8192):
|
|
102
|
+
if checksum:
|
|
103
|
+
hasher.update(chunk)
|
|
104
|
+
f.write(chunk)
|
|
107
105
|
|
|
108
106
|
if checksum and hasher.hexdigest() != checksum:
|
|
109
107
|
raise RuntimeError(f"Checksum mismatch. Expected {checksum}, got {hasher.hexdigest()}")
|
pbs_installer/_versions.py
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
pbs_installer-2024.3.27.dist-info/METADATA,sha256=6ProciLCfRpj74r0WMp1ZNBV_PhjFsZoaZdEAaFfGxA,858
|
|
2
|
+
pbs_installer-2024.3.27.dist-info/WHEEL,sha256=N2J68yzZqJh3mI_Wg92rwhw0rtJDFpZj9bwQIMJgaVg,90
|
|
3
|
+
pbs_installer-2024.3.27.dist-info/entry_points.txt,sha256=Nh2-16odxSoBayKBj8DeTkZF8M85z9fBNbt7aMBwg9g,61
|
|
4
|
+
pbs_installer-2024.3.27.dist-info/licenses/LICENSE,sha256=YzzZaluc5ZidgI5_WA4sOxgJILSj5WT52GicTGOZ1j0,1059
|
|
5
|
+
pbs_installer/__init__.py,sha256=n6uRFyP64YgQglqkPDsrXlhcSgY58WhYGyAj0gvNU0M,243
|
|
6
|
+
pbs_installer/__main__.py,sha256=Iyp0xPy73pNrlopC_60-b8e1PciVljf7zWZ9kMJDHB8,2877
|
|
7
|
+
pbs_installer/_install.py,sha256=WhhrFnNfyENTiot4lIq8CJQ9z1dPQ86Cz07-U6mJ0Hs,6520
|
|
8
|
+
pbs_installer/_utils.py,sha256=5LAG5NpgrbZA89X36A7QDsZaOTERhph1sHG6wjkul9I,4098
|
|
9
|
+
pbs_installer/_versions.py,sha256=N3KqadrU83zB2yuYNurWULWkBZBRahRmBbsyp0nSAv4,119295
|
|
10
|
+
pbs_installer-2024.3.27.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
pbs_installer-2024.3.23.dist-info/METADATA,sha256=lXDE-kdYBaQMwC7gcTcphgDieUZrkoEwGVGUKpqIbkA,858
|
|
2
|
-
pbs_installer-2024.3.23.dist-info/WHEEL,sha256=N2J68yzZqJh3mI_Wg92rwhw0rtJDFpZj9bwQIMJgaVg,90
|
|
3
|
-
pbs_installer-2024.3.23.dist-info/entry_points.txt,sha256=Nh2-16odxSoBayKBj8DeTkZF8M85z9fBNbt7aMBwg9g,61
|
|
4
|
-
pbs_installer-2024.3.23.dist-info/licenses/LICENSE,sha256=YzzZaluc5ZidgI5_WA4sOxgJILSj5WT52GicTGOZ1j0,1059
|
|
5
|
-
pbs_installer/__init__.py,sha256=n6uRFyP64YgQglqkPDsrXlhcSgY58WhYGyAj0gvNU0M,243
|
|
6
|
-
pbs_installer/__main__.py,sha256=Iyp0xPy73pNrlopC_60-b8e1PciVljf7zWZ9kMJDHB8,2877
|
|
7
|
-
pbs_installer/_install.py,sha256=X2tVQZfXtWMXOBSogrOxA8mxn2UcosCtoEEb0A75oPk,6499
|
|
8
|
-
pbs_installer/_utils.py,sha256=5LAG5NpgrbZA89X36A7QDsZaOTERhph1sHG6wjkul9I,4098
|
|
9
|
-
pbs_installer/_versions.py,sha256=VnwgdC9duUAp_utCGGB41zEajYABP6hiq_LfQ52a82E,119296
|
|
10
|
-
pbs_installer-2024.3.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|