Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove FeaturePreviewWarning from Event Notifications #521

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.