1010from __future__ import annotations
1111
1212import base64
13- import functools
14- import warnings
1513from abc import ABCMeta , abstractmethod
1614from enum import Enum , unique
1715from logging import getLogger
1816from typing import Any , Iterable
1917
2018from .utils .escape import unprintable_to_hex
2119from .utils .typing import JSON
22- from .version_utils import FeaturePreviewWarning
2320
2421try :
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
178160def 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 (
0 commit comments