2.8.0: Unit.reboot, RelationMeta.optional, and type-checked tests
This release includes a few small improvements: a new function Unit.reboot()
(for machine charms only), the "optional" attribute of relations in metadata.yaml is now available in the RelationMeta
object, and if the Pebble socket is missing (for example, if the container has just rebooted) we provide a clearer exception:
- feat: add
Unit.reboot
for machine charms in #1041 - feat: add
RelationMeta.optional
in #1038 - feat: provide a clearer exception when the Pebble socket is missing in #1049
We fixed a couple of small issues:
- fix:
push_path
andpull_path
include empty directories in #1024 - fix: reset collected statuses in
Harness.evaluate_status
in #1048
We've also made a few small improvements to the documentation:
- docs: note that status changes are immediate in #1029
- docs: add note to
ActionEvent.set_results
about maximum size in #1047 - docs: document more of the exceptions that may be raised in #1044
- docs: make
pebble.Client.remove_path
andContainer.remove_path
docs consistent in #1031 - docs: update the PyPI development status to production/stable in #1020
Finally, we wrapped up our work on #1007, so the test suite is now fully type checked, did a couple of other minor type hinting improvements, and broke out the 'real' Pebble tests into a separate file for more clarity (you can still just run tox -e pebble
):
- test: add type hints to test_testing in #1017
- test: add type hints to test_model in #1015
- test: add type hints to test_charm in #1022
- test: add type hints to test_storage in #1023
- test: add type hints to test_framework in #1025
- test: add type hints to test_main in #1028
- test: add type hints to pebble-related tests in #1030
- test: separate the real pebble tests into a separate module in #1018
- chore: remove as much 'if typing.TYPE_CHECKING:' as possible in #1034
- feat: narrow the type for 'app' and 'unit' in relation events by in #1032
Full Changelog: 2.7.0...2.8.0