os-normalizer 0.4.1__tar.gz → 0.4.2__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.

Potentially problematic release.


This version of os-normalizer might be problematic. Click here for more details.

Files changed (32) hide show
  1. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/CHANGELOG.md +4 -0
  2. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/PKG-INFO +1 -1
  3. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/windows.py +14 -2
  4. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/pyproject.toml +1 -1
  5. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/.gitignore +0 -0
  6. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/.python-version +0 -0
  7. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/.uv-cache/.gitignore +0 -0
  8. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/.uv-cache/.lock +0 -0
  9. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/.uv-cache/CACHEDIR.TAG +0 -0
  10. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/.uv-cache/interpreter-v4/7e11d242fb84b9e8/939db8dea853eb17.msgpack +0 -0
  11. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/.uv-cache/sdists-v9/.git +0 -0
  12. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/.uv-cache/sdists-v9/.gitignore +0 -0
  13. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/LICENSE +0 -0
  14. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/README.md +0 -0
  15. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/RELEASING.md +0 -0
  16. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/__init__.py +0 -0
  17. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/constants.py +0 -0
  18. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/cpe.py +0 -0
  19. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/helpers.py +0 -0
  20. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/models.py +0 -0
  21. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/os_normalizer.py +0 -0
  22. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/__init__.py +0 -0
  23. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/bsd.py +0 -0
  24. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/linux.py +0 -0
  25. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/macos.py +0 -0
  26. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/mobile.py +0 -0
  27. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/network/__init__.py +0 -0
  28. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/network/cisco.py +0 -0
  29. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/network/fortinet.py +0 -0
  30. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/network/huawei.py +0 -0
  31. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/network/juniper.py +0 -0
  32. {os_normalizer-0.4.1 → os_normalizer-0.4.2}/os_normalizer/parsers/network/netgear.py +0 -0
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project are documented here.
4
4
  This file adheres to Keep a Changelog and Semantic Versioning.
5
5
 
6
+ ## [0.4.2] - 2025-10-20
7
+
8
+ - Fixed: Windows product fingerprinting by build number
9
+
6
10
  ## [0.4.1] - 2025-09-25
7
11
 
8
12
  - Added: Broadened Windows product aliases (e.g., Win11, Win2k) and recognized the macOS 26 codename `Tahoe`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: os-normalizer
3
- Version: 0.4.1
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
@@ -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 and not product:
161
- product = product_from_build
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
  [project]
2
2
  name = "os-normalizer"
3
- version = "0.4.1"
3
+ version = "0.4.2"
4
4
  description = "Normalize raw OS strings/metadata into structured data (family, product, version, arch)."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
File without changes
File without changes
File without changes