Skip to content

Restore party_mode as primary, deprecate pause_mode aliases#365

Merged
MTrab merged 2 commits intomasterfrom
fix/re-rename-party-mode
Mar 28, 2026
Merged

Restore party_mode as primary, deprecate pause_mode aliases#365
MTrab merged 2 commits intomasterfrom
fix/re-rename-party-mode

Conversation

@MTrab
Copy link
Copy Markdown
Owner

@MTrab MTrab commented Mar 25, 2026

Summary

Reverses an accidental rename: party_mode was incorrectly renamed to pause_mode. This PR restores party_mode as the canonical name and keeps pause_mode as a deprecated backwards-compatibility alias.

Changes

NoPartymodeError is now the primary exception again; NoPauseModeError inherits from it and emits a DeprecationWarning on instantiation.

DeviceCapability.PARTY_MODE is the primary enum value (still 4); accessing DeviceCapability.PAUSE_MODE triggers a deprecation warning via the metaclass __getattr__.

set_party_mode() is the primary async method on WorxCloud; set_pause_mode() is now a deprecated wrapper that warns and delegates. The DEPRECATIONS registry in deprecations.py is updated accordingly for all five entries.

Testing

  • ruff format: 2 files reformatted, no errors
  • ruff check: All checks passed

Notes

Semver proposal: patch — this is a rename revert with full backwards compatibility via deprecated aliases. No functional behaviour changes.

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
@github-actions github-actions Bot added bug Something isn't working patch Patch version labels Mar 25, 2026
@MTrab MTrab changed the title fix: Restore party_mode as primary, deprecate pause_mode aliases Restore party_mode as primary, deprecate pause_mode aliases Mar 25, 2026
@MTrab MTrab merged commit 2a315fe into master Mar 28, 2026
4 checks passed
@MTrab MTrab deleted the fix/re-rename-party-mode branch March 28, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working patch Patch version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant