Skip to content

Commit

Permalink
Merge pull request #521 from reef-technologies/event-notifications-ga
Browse files Browse the repository at this point in the history
Remove FeaturePreviewWarning from Event Notifications
  • Loading branch information
ppolewicz authored Nov 4, 2024
2 parents 79c5793 + 5353323 commit 4b403b9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
20 changes: 0 additions & 20 deletions b2sdk/_internal/raw_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@
from __future__ import annotations

import base64
import functools
import warnings
from abc import ABCMeta, abstractmethod
from enum import Enum, unique
from logging import getLogger
from typing import Any, Iterable

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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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]:
Expand All @@ -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(
Expand Down
1 change: 1 addition & 0 deletions changelog.d/518.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make Event Notifications generally available.

0 comments on commit 4b403b9

Please sign in to comment.