Skip to content

Commit 4b403b9

Browse files
authored
Merge pull request #521 from reef-technologies/event-notifications-ga
Remove FeaturePreviewWarning from Event Notifications
2 parents 79c5793 + 5353323 commit 4b403b9

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

b2sdk/_internal/raw_api.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@
1010
from __future__ import annotations
1111

1212
import base64
13-
import functools
14-
import warnings
1513
from abc import ABCMeta, abstractmethod
1614
from enum import Enum, unique
1715
from logging import getLogger
1816
from typing import Any, Iterable
1917

2018
from .utils.escape import unprintable_to_hex
2119
from .utils.typing import JSON
22-
from .version_utils import FeaturePreviewWarning
2320

2421
try:
2522
from typing_extensions import Literal, NotRequired, TypedDict
@@ -160,21 +157,6 @@ class NotificationRuleResponse(_NotificationRule):
160157
isSuspended: bool
161158

162159

163-
def _bucket_notification_rule_feature_preview_warning(func):
164-
@functools.wraps(func)
165-
def wrapper(*args, **kwargs):
166-
warnings.warn(
167-
"Event Notifications feature is in \"Private Preview\" state and may change without notice. "
168-
"See https://www.backblaze.com/blog/announcing-event-notifications/ for details.",
169-
FeaturePreviewWarning,
170-
stacklevel=2,
171-
)
172-
return func(*args, **kwargs)
173-
174-
return wrapper
175-
176-
177-
@_bucket_notification_rule_feature_preview_warning
178160
def notification_rule_response_to_request(rule: NotificationRuleResponse) -> NotificationRule:
179161
"""
180162
Convert NotificationRuleResponse to NotificationRule.
@@ -1183,7 +1165,6 @@ def copy_part(
11831165
except AccessDenied:
11841166
raise SSECKeyError()
11851167

1186-
@_bucket_notification_rule_feature_preview_warning
11871168
def set_bucket_notification_rules(
11881169
self, api_url: str, account_auth_token: str, bucket_id: str, rules: list[NotificationRule]
11891170
) -> list[NotificationRuleResponse]:
@@ -1197,7 +1178,6 @@ def set_bucket_notification_rules(
11971178
},
11981179
)["eventNotificationRules"]
11991180

1200-
@_bucket_notification_rule_feature_preview_warning
12011181
def get_bucket_notification_rules(self, api_url: str, account_auth_token: str,
12021182
bucket_id: str) -> list[NotificationRuleResponse]:
12031183
return self._get_json(

changelog.d/518.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make Event Notifications generally available.

0 commit comments

Comments
 (0)