Skip to content

Commit 18b293c

Browse files
committed
Remove prefixes from Event enum values
This is a breaking change, but the v0.3.5 release is not yet used, so we will yank it from PyPI and release this as v0.3.6. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 69b4682 commit 18b293c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Summary
44

5+
This is the same release as v0.3.5 but with prefixes in `Event` enum values removed. The v0.3.5 release will be yanked from PyPI and it should not be used.
56

67
## Upgrading
78

src/frequenz/client/common/streaming/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@
88

99
# pylint: disable-next=no-name-in-module
1010
from frequenz.api.common.v1alpha8.streaming import event_pb2 as PBEvent
11+
from typing_extensions import deprecated
1112

1213

1314
class Event(Enum):
1415
"""Enum representing the type of streaming event."""
1516

16-
EVENT_UNSPECIFIED = PBEvent.EVENT_UNSPECIFIED
17+
UNSPECIFIED = PBEvent.EVENT_UNSPECIFIED
1718
"""Unspecified event type."""
1819

19-
EVENT_CREATED = PBEvent.EVENT_CREATED
20+
CREATED = PBEvent.EVENT_CREATED
2021
"""Event when a new resource is created."""
2122

22-
EVENT_UPDATED = PBEvent.EVENT_UPDATED
23+
UPDATED = PBEvent.EVENT_UPDATED
2324
"""Event when an existing resource is updated."""
2425

25-
EVENT_DELETED = PBEvent.EVENT_DELETED
26+
DELETED = PBEvent.EVENT_DELETED
2627
"""Event when a resource is deleted."""

0 commit comments

Comments
 (0)