os-normalizer 0.4.1__py3-none-any.whl → 0.4.2__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.
Potentially problematic release.
This version of os-normalizer might be problematic. Click here for more details.
- os_normalizer/parsers/windows.py +14 -2
- {os_normalizer-0.4.1.dist-info → os_normalizer-0.4.2.dist-info}/METADATA +1 -1
- {os_normalizer-0.4.1.dist-info → os_normalizer-0.4.2.dist-info}/RECORD +5 -5
- {os_normalizer-0.4.1.dist-info → os_normalizer-0.4.2.dist-info}/WHEEL +0 -0
- {os_normalizer-0.4.1.dist-info → os_normalizer-0.4.2.dist-info}/licenses/LICENSE +0 -0
os_normalizer/parsers/windows.py
CHANGED
|
@@ -157,8 +157,11 @@ def _apply_build_context(state: VersionState, product: str | None, server_hint:
|
|
|
157
157
|
return product, server_hint
|
|
158
158
|
|
|
159
159
|
product_from_build, channel, is_server_build = _lookup_build(build_num, server_hint)
|
|
160
|
-
if product_from_build
|
|
161
|
-
|
|
160
|
+
if product_from_build:
|
|
161
|
+
if not product:
|
|
162
|
+
product = product_from_build
|
|
163
|
+
elif product != product_from_build and _build_inference_is_more_precise(product, product_from_build):
|
|
164
|
+
product = product_from_build
|
|
162
165
|
if is_server_build:
|
|
163
166
|
server_hint = True
|
|
164
167
|
state.channel = channel
|
|
@@ -250,6 +253,15 @@ def _lookup_build(build_num: int, server_hint: bool) -> tuple[str | None, str |
|
|
|
250
253
|
return candidate
|
|
251
254
|
|
|
252
255
|
|
|
256
|
+
def _build_inference_is_more_precise(existing: str, inferred: str) -> bool:
|
|
257
|
+
"""Return True when the build map provides a more specific client SKU."""
|
|
258
|
+
if existing in {"Windows 10", "Windows 10/11"} and inferred.startswith("Windows 11"):
|
|
259
|
+
return True
|
|
260
|
+
if existing == "Windows 10/11" and inferred == "Windows 10":
|
|
261
|
+
return True
|
|
262
|
+
return False
|
|
263
|
+
|
|
264
|
+
|
|
253
265
|
def _product_from_nt(major: int, minor: int, server_hint: bool) -> str | None:
|
|
254
266
|
key = (major, minor)
|
|
255
267
|
if server_hint and key in WINDOWS_NT_SERVER_MAP:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: os-normalizer
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Normalize raw OS strings/metadata into structured data (family, product, version, arch).
|
|
5
5
|
Project-URL: Homepage, https://github.com/johnscillieri/os-normalizer
|
|
6
6
|
Project-URL: Repository, https://github.com/johnscillieri/os-normalizer
|
|
@@ -9,14 +9,14 @@ os_normalizer/parsers/bsd.py,sha256=Umm7RSXjQfv6pfziJ8BYlmOc80VlLRueTrYw1iR-UjY,
|
|
|
9
9
|
os_normalizer/parsers/linux.py,sha256=kSIYZ_hRJxJieV21u8TRcWfAjYOIXlCLBSwyINkuyA4,3867
|
|
10
10
|
os_normalizer/parsers/macos.py,sha256=fU1YyiijzBdDAxUBSL2EQLhUu3JbOSx-N_KYvOg0XsI,3627
|
|
11
11
|
os_normalizer/parsers/mobile.py,sha256=Ca864JhrO9zW5fs0zbs2VcMypKIkFHqZtxpJDbi12q0,1033
|
|
12
|
-
os_normalizer/parsers/windows.py,sha256
|
|
12
|
+
os_normalizer/parsers/windows.py,sha256=-dWS2KJltDXThsQL78ulyn6S4Q7QW5QMRklKosvQF30,10930
|
|
13
13
|
os_normalizer/parsers/network/__init__.py,sha256=TvRz08lNDZbr6yG8O3M7cLNu0hWAbtE1y7_9SwhP4g4,1596
|
|
14
14
|
os_normalizer/parsers/network/cisco.py,sha256=ivhw85IHnHVT4sW-65F-ZGCR7yvu0mMMBfXRT4EzUfc,3203
|
|
15
15
|
os_normalizer/parsers/network/fortinet.py,sha256=i6PVRxzO_onaCvo3_eI4csXFwGp4ZpQY0d1y2-Wodn0,1783
|
|
16
16
|
os_normalizer/parsers/network/huawei.py,sha256=Su3eCRlmOCmpOPA_TGeH8gHY3-ZdXKFW4O3_W0SOPmk,1158
|
|
17
17
|
os_normalizer/parsers/network/juniper.py,sha256=gskbaY4-LYWauM9yrvGMuCxPrNBKmUfIRPd1zsUUY7w,1275
|
|
18
18
|
os_normalizer/parsers/network/netgear.py,sha256=idVD7VTxb07LdhFPwb-sT3586ARoBrd1OmWpADAZUVc,1190
|
|
19
|
-
os_normalizer-0.4.
|
|
20
|
-
os_normalizer-0.4.
|
|
21
|
-
os_normalizer-0.4.
|
|
22
|
-
os_normalizer-0.4.
|
|
19
|
+
os_normalizer-0.4.2.dist-info/METADATA,sha256=ipNU2HGD2BpwGh9jj0v5a6hYgvjR5qJN1M8apT0FwKk,6455
|
|
20
|
+
os_normalizer-0.4.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
21
|
+
os_normalizer-0.4.2.dist-info/licenses/LICENSE,sha256=DN0enoiHxVkJ-hxmIchPaCQWrDsZwva5LY8XvG3UK8w,1083
|
|
22
|
+
os_normalizer-0.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|