Clean-up tests, latent code issues, and typos by ZeliardM · Pull Request #1677 · python-kasa/python-kasa

This PR focuses on test cleanup, a few small correctness fixes, and documentation/example updates.

It modernizes the iotbulb.py docstring examples to use the light module API instead of deprecated light shortcut properties, aligns the doctest fixture setup with the updated examples, and tightens deprecation coverage in tests/test_device.py so the deprecated light attributes are still tested intentionally without creating noisy failures. It also narrows the discover raw test to patch the CLI-level redact path, fixes a typo in the changelog, updates the setup action to actions/cache@v5, and adds support for the smart child subtype plug.powerstrip.sub-bulb.

A larger part of the change is explicit resource cleanup across the test suite. Discovery, device config, HTTP client, KLAP, AES, and SSL-AES tests now close sessions, protocols, devices, and transports reliably, including automatic cleanup in the AES and SSL-AES transport tests. This removes the unclosed aiohttp client session warnings from full pytest runs. After these changes the full pytest passes locally; the only remaining warnings are the known fixture completeness warnings.