Restore party_mode as primary, deprecate pause_mode aliases#365
Merged
Restore party_mode as primary, deprecate pause_mode aliases#365
Conversation
party_mode was incorrectly renamed to pause_mode. This reverts that rename across all affected modules, making party_mode the canonical name again and keeping pause_mode only as a backwards-compatible deprecated alias. - exceptions.py: NoPartymodeError is primary; NoPauseModeError is deprecated alias - capability.py: DeviceCapability.PARTY_MODE=4 is primary; PAUSE_MODE redirects with warning - __init__.py: set_party_mode() is primary; set_pause_mode() is deprecated wrapper; re-export NoPauseModeError - deprecations.py: flip old_name/replacement for all 5 entries - devices.py: capabilities.add() uses PARTY_MODE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reverses an accidental rename:
party_modewas incorrectly renamed topause_mode. This PR restoresparty_modeas the canonical name and keepspause_modeas a deprecated backwards-compatibility alias.Changes
NoPartymodeErroris now the primary exception again;NoPauseModeErrorinherits from it and emits aDeprecationWarningon instantiation.DeviceCapability.PARTY_MODEis the primary enum value (still4); accessingDeviceCapability.PAUSE_MODEtriggers a deprecation warning via the metaclass__getattr__.set_party_mode()is the primary async method onWorxCloud;set_pause_mode()is now a deprecated wrapper that warns and delegates. TheDEPRECATIONSregistry indeprecations.pyis updated accordingly for all five entries.Testing
Notes
Semver proposal: patch — this is a rename revert with full backwards compatibility via deprecated aliases. No functional behaviour changes.