From 53533237140ba9120513e23d645a816b4bd27117 Mon Sep 17 00:00:00 2001 From: Maciej Lech Date: Wed, 30 Oct 2024 19:15:10 +0100 Subject: [PATCH] Remove FeaturePreviewWarning from Event Notifications --- b2sdk/_internal/raw_api.py | 20 -------------------- changelog.d/518.changed.md | 1 + 2 files changed, 1 insertion(+), 20 deletions(-) create mode 100644 changelog.d/518.changed.md diff --git a/b2sdk/_internal/raw_api.py b/b2sdk/_internal/raw_api.py index 89deb91e..55eb19c3 100644 --- a/b2sdk/_internal/raw_api.py +++ b/b2sdk/_internal/raw_api.py @@ -10,8 +10,6 @@ from __future__ import annotations import base64 -import functools -import warnings from abc import ABCMeta, abstractmethod from enum import Enum, unique from logging import getLogger @@ -19,7 +17,6 @@ from .utils.escape import unprintable_to_hex from .utils.typing import JSON -from .version_utils import FeaturePreviewWarning try: from typing_extensions import Literal, NotRequired, TypedDict @@ -160,21 +157,6 @@ class NotificationRuleResponse(_NotificationRule): isSuspended: bool -def _bucket_notification_rule_feature_preview_warning(func): - @functools.wraps(func) - def wrapper(*args, **kwargs): - warnings.warn( - "Event Notifications feature is in \"Private Preview\" state and may change without notice. " - "See https://www.backblaze.com/blog/announcing-event-notifications/ for details.", - FeaturePreviewWarning, - stacklevel=2, - ) - return func(*args, **kwargs) - - return wrapper - - -@_bucket_notification_rule_feature_preview_warning def notification_rule_response_to_request(rule: NotificationRuleResponse) -> NotificationRule: """ Convert NotificationRuleResponse to NotificationRule. @@ -1183,7 +1165,6 @@ def copy_part( except AccessDenied: raise SSECKeyError() - @_bucket_notification_rule_feature_preview_warning def set_bucket_notification_rules( self, api_url: str, account_auth_token: str, bucket_id: str, rules: list[NotificationRule] ) -> list[NotificationRuleResponse]: @@ -1197,7 +1178,6 @@ def set_bucket_notification_rules( }, )["eventNotificationRules"] - @_bucket_notification_rule_feature_preview_warning def get_bucket_notification_rules(self, api_url: str, account_auth_token: str, bucket_id: str) -> list[NotificationRuleResponse]: return self._get_json( diff --git a/changelog.d/518.changed.md b/changelog.d/518.changed.md new file mode 100644 index 00000000..b8c7ae1c --- /dev/null +++ b/changelog.d/518.changed.md @@ -0,0 +1 @@ +Make Event Notifications generally available.