napalm-device-types 4.59.0 (NAPALM/napalm-device-types#149, for NetOrk/netork#2907) adds architecture: NotRequired[str] to PackageDict. WindowsPackageDict in napalm_windows/packages.py (0.3.0, 61bbf91) redeclares architecture: str, and strict mypy refuses to narrow an inherited key:
napalm_windows/packages.py:73: error: Field "architecture" can be deleted in base class "PackageDict" [misc]
napalm_windows/packages.py:107: error: Argument 1 to "list" has incompatible type "list[WindowsPackageDict]"; expected "Iterable[PackageDict]" [arg-type]
Checked against that branch: mypy on 61bbf91 fails with the two errors above; the 637 tests pass, so nothing breaks at runtime. Because the floor is napalm-device-types>=4.56.0, CI on main goes red at mypy as soon as 4.59.0 reaches PyPI.
Fix: once 4.59.0 is out, drop the redeclaration from WindowsPackageDict, since the key is now inherited from PackageDict, and raise the floor to napalm-device-types>=4.59.0. Also leave architecture out when the Uninstall key names none, where _package currently writes "". The contract says a driver that cannot tell leaves the key out. The sort in parse_packages then reads p.get("architecture", "").
Priority: P3: no runtime effect, but CI on main stays red until this lands.
napalm-device-types 4.59.0 (NAPALM/napalm-device-types#149, for NetOrk/netork#2907) adds `architecture: NotRequired[str]` to `PackageDict`. `WindowsPackageDict` in `napalm_windows/packages.py` (0.3.0, 61bbf91) redeclares `architecture: str`, and strict mypy refuses to narrow an inherited key:
```
napalm_windows/packages.py:73: error: Field "architecture" can be deleted in base class "PackageDict" [misc]
napalm_windows/packages.py:107: error: Argument 1 to "list" has incompatible type "list[WindowsPackageDict]"; expected "Iterable[PackageDict]" [arg-type]
```
Checked against that branch: mypy on 61bbf91 fails with the two errors above; the 637 tests pass, so nothing breaks at runtime. Because the floor is `napalm-device-types>=4.56.0`, CI on `main` goes red at mypy as soon as 4.59.0 reaches PyPI.
**Fix:** once 4.59.0 is out, drop the redeclaration from `WindowsPackageDict`, since the key is now inherited from `PackageDict`, and raise the floor to `napalm-device-types>=4.59.0`. Also leave `architecture` out when the Uninstall key names none, where `_package` currently writes `""`. The contract says a driver that cannot tell leaves the key out. The sort in `parse_packages` then reads `p.get("architecture", "")`.
**Priority:** P3: no runtime effect, but CI on `main` stays red until this lands.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
napalm-device-types 4.59.0 (NAPALM/napalm-device-types#149, for NetOrk/netork#2907) adds
architecture: NotRequired[str]toPackageDict.WindowsPackageDictinnapalm_windows/packages.py(0.3.0,61bbf91) redeclaresarchitecture: str, and strict mypy refuses to narrow an inherited key:Checked against that branch: mypy on
61bbf91fails with the two errors above; the 637 tests pass, so nothing breaks at runtime. Because the floor isnapalm-device-types>=4.56.0, CI onmaingoes red at mypy as soon as 4.59.0 reaches PyPI.Fix: once 4.59.0 is out, drop the redeclaration from
WindowsPackageDict, since the key is now inherited fromPackageDict, and raise the floor tonapalm-device-types>=4.59.0. Also leavearchitectureout when the Uninstall key names none, where_packagecurrently writes"". The contract says a driver that cannot tell leaves the key out. The sort inparse_packagesthen readsp.get("architecture", "").Priority: P3: no runtime effect, but CI on
mainstays red until this lands.