napalm-device-types 4.59.0 (NAPALM/napalm-device-types#149, for NetOrk/netork#2907) declares architecture as an optional key of PackageDict itself. Strict mypy refuses a subclass that makes it required, so WindowsPackageDict has to change.
WindowsPackageDict no longer redeclares architecture. It inherits the contract's NotRequired[str].
_package leaves architecture out when the Uninstall key names none, as the contract asks. Before, it wrote "". The sort reads p.get("architecture", "").
The floor is now napalm-device-types>=4.59.0.
CHANGELOG under [Unreleased]. Following this repo's practice, the version is bumped in a separate chore(release) commit, so it stays at 0.3.0 here.
CI will be red until napalm-device-types 4.59.0 is installable. This repo's CI has no pre-install and installs the floor from PyPI, so it stays red until #149 is merged and 4.59.0 is released. To test earlier, add a temporary pre-install of device-types from git, as 63a04c0 did for 4.56.0.
Tests, run against the device-types branch of #149:
New tests in tests/test_packages.py: architecture is in WindowsPackageDict.__optional_keys__, and a program with a missing or empty arch leaves the key out and stays sorted by name.
Full suite: 640 passed, 99.43% coverage.
Also green: strict mypy napalm_windows (before this change it failed with Field "architecture" can be deleted in base class "PackageDict"), ruff check, ruff format --check, napalm-standard ratchet and napalm-standard check.
Closes #14
napalm-device-types 4.59.0 (NAPALM/napalm-device-types#149, for NetOrk/netork#2907) declares `architecture` as an optional key of `PackageDict` itself. Strict mypy refuses a subclass that makes it required, so `WindowsPackageDict` has to change.
- `WindowsPackageDict` no longer redeclares `architecture`. It inherits the contract's `NotRequired[str]`.
- `_package` leaves `architecture` out when the Uninstall key names none, as the contract asks. Before, it wrote `""`. The sort reads `p.get("architecture", "")`.
- The floor is now `napalm-device-types>=4.59.0`.
- CHANGELOG under `[Unreleased]`. Following this repo's practice, the version is bumped in a separate `chore(release)` commit, so it stays at 0.3.0 here.
**CI will be red until napalm-device-types 4.59.0 is installable.** This repo's CI has no `pre-install` and installs the floor from PyPI, so it stays red until #149 is merged and 4.59.0 is released. To test earlier, add a temporary `pre-install` of device-types from git, as `63a04c0` did for 4.56.0.
Tests, run against the device-types branch of #149:
- New tests in `tests/test_packages.py`: `architecture` is in `WindowsPackageDict.__optional_keys__`, and a program with a missing or empty `arch` leaves the key out and stays sorted by name.
- Full suite: 640 passed, 99.43% coverage.
- Also green: strict `mypy napalm_windows` (before this change it failed with `Field "architecture" can be deleted in base class "PackageDict"`), `ruff check`, `ruff format --check`, `napalm-standard ratchet` and `napalm-standard check`.
Priority: P3 (as #14).
napalm-device-types 4.59.0 declares architecture as an optional key of
PackageDict. WindowsPackageDict redeclared it as required, which strict
mypy refuses for a subclass. It now inherits the key and leaves it out
of a program whose Uninstall key names none, instead of writing "".
The floor is napalm-device-types 4.59.0.
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.
Closes #14
napalm-device-types 4.59.0 (NAPALM/napalm-device-types#149, for NetOrk/netork#2907) declares
architectureas an optional key ofPackageDictitself. Strict mypy refuses a subclass that makes it required, soWindowsPackageDicthas to change.WindowsPackageDictno longer redeclaresarchitecture. It inherits the contract'sNotRequired[str]._packageleavesarchitectureout when the Uninstall key names none, as the contract asks. Before, it wrote"". The sort readsp.get("architecture", "").napalm-device-types>=4.59.0.[Unreleased]. Following this repo's practice, the version is bumped in a separatechore(release)commit, so it stays at 0.3.0 here.CI will be red until napalm-device-types 4.59.0 is installable. This repo's CI has no
pre-installand installs the floor from PyPI, so it stays red until #149 is merged and 4.59.0 is released. To test earlier, add a temporarypre-installof device-types from git, as63a04c0did for 4.56.0.Tests, run against the device-types branch of #149:
tests/test_packages.py:architectureis inWindowsPackageDict.__optional_keys__, and a program with a missing or emptyarchleaves the key out and stays sorted by name.mypy napalm_windows(before this change it failed withField "architecture" can be deleted in base class "PackageDict"),ruff check,ruff format --check,napalm-standard ratchetandnapalm-standard check.Priority: P3 (as #14).