Skip to content

Commit 44bcd8c

Browse files
chore: remove experiment around say_stream
1 parent f11dbfb commit 44bcd8c

File tree

5 files changed

+10
-66
lines changed

5 files changed

+10
-66
lines changed

slack_bolt/context/say_stream/async_say_stream.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import warnings
21
from typing import Optional
32

43
from slack_sdk.web.async_client import AsyncWebClient
54
from slack_sdk.web.async_chat_stream import AsyncChatStream
65

7-
from slack_bolt.warning import ExperimentalWarning
8-
96

107
class AsyncSayStream:
118
client: AsyncWebClient
@@ -39,16 +36,7 @@ async def __call__(
3936
thread_ts: Optional[str] = None,
4037
**kwargs,
4138
) -> AsyncChatStream:
42-
"""Starts a new chat stream with context.
43-
44-
Warning: This is an experimental feature and may change in future versions.
45-
"""
46-
warnings.warn(
47-
"say_stream is experimental and may change in future versions.",
48-
category=ExperimentalWarning,
49-
stacklevel=2,
50-
)
51-
39+
"""Starts a new chat stream with context."""
5240
channel = channel or self.channel
5341
thread_ts = thread_ts or self.thread_ts
5442
if channel is None:

slack_bolt/context/say_stream/say_stream.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import warnings
21
from typing import Optional
32

43
from slack_sdk import WebClient
54
from slack_sdk.web.chat_stream import ChatStream
65

7-
from slack_bolt.warning import ExperimentalWarning
8-
96

107
class SayStream:
118
client: WebClient
@@ -39,16 +36,7 @@ def __call__(
3936
thread_ts: Optional[str] = None,
4037
**kwargs,
4138
) -> ChatStream:
42-
"""Starts a new chat stream with context.
43-
44-
Warning: This is an experimental feature and may change in future versions.
45-
"""
46-
warnings.warn(
47-
"say_stream is experimental and may change in future versions.",
48-
category=ExperimentalWarning,
49-
stacklevel=2,
50-
)
51-
39+
"""Starts a new chat stream with context."""
5240
channel = channel or self.channel
5341
thread_ts = thread_ts or self.thread_ts
5442
if channel is None:

slack_bolt/warning/__init__.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/slack_bolt/context/test_say_stream.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from slack_sdk import WebClient
33

44
from slack_bolt.context.say_stream.say_stream import SayStream
5-
from slack_bolt.warning import ExperimentalWarning
65
from tests.mock_web_api_server import cleanup_mock_web_api_server, setup_mock_web_api_server
76

87

@@ -20,15 +19,13 @@ def teardown_method(self):
2019

2120
def test_missing_channel_raises(self):
2221
say_stream = SayStream(client=self.web_client, channel=None, thread_ts="111.222")
23-
with pytest.warns(ExperimentalWarning):
24-
with pytest.raises(ValueError, match="channel"):
25-
say_stream()
22+
with pytest.raises(ValueError, match="channel"):
23+
say_stream()
2624

2725
def test_missing_thread_ts_raises(self):
2826
say_stream = SayStream(client=self.web_client, channel="C111", thread_ts=None)
29-
with pytest.warns(ExperimentalWarning):
30-
with pytest.raises(ValueError, match="thread_ts"):
31-
say_stream()
27+
with pytest.raises(ValueError, match="thread_ts"):
28+
say_stream()
3229

3330
def test_default_params(self):
3431
say_stream = SayStream(
@@ -92,12 +89,3 @@ def test_buffer_size_overrides(self):
9289
"recipient_user_id": "U222",
9390
"task_display_mode": None,
9491
}
95-
96-
def test_experimental_warning(self):
97-
say_stream = SayStream(
98-
client=self.web_client,
99-
channel="C111",
100-
thread_ts="111.222",
101-
)
102-
with pytest.warns(ExperimentalWarning, match="say_stream is experimental"):
103-
say_stream()

tests/slack_bolt_async/context/test_async_say_stream.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from slack_sdk.web.async_client import AsyncWebClient
33

44
from slack_bolt.context.say_stream.async_say_stream import AsyncSayStream
5-
from slack_bolt.warning import ExperimentalWarning
65
from tests.mock_web_api_server import (
76
cleanup_mock_web_api_server,
87
setup_mock_web_api_server,
@@ -29,16 +28,14 @@ def setup_teardown(self):
2928
@pytest.mark.asyncio
3029
async def test_missing_channel_raises(self):
3130
say_stream = AsyncSayStream(client=self.web_client, channel=None, thread_ts="111.222")
32-
with pytest.warns(ExperimentalWarning):
33-
with pytest.raises(ValueError, match="channel"):
34-
await say_stream()
31+
with pytest.raises(ValueError, match="channel"):
32+
await say_stream()
3533

3634
@pytest.mark.asyncio
3735
async def test_missing_thread_ts_raises(self):
3836
say_stream = AsyncSayStream(client=self.web_client, channel="C111", thread_ts=None)
39-
with pytest.warns(ExperimentalWarning):
40-
with pytest.raises(ValueError, match="thread_ts"):
41-
await say_stream()
37+
with pytest.raises(ValueError, match="thread_ts"):
38+
await say_stream()
4239

4340
@pytest.mark.asyncio
4441
async def test_default_params(self):
@@ -105,13 +102,3 @@ async def test_buffer_size_overrides(self):
105102
"recipient_user_id": "U222",
106103
"task_display_mode": None,
107104
}
108-
109-
@pytest.mark.asyncio
110-
async def test_experimental_warning(self):
111-
say_stream = AsyncSayStream(
112-
client=self.web_client,
113-
channel="C111",
114-
thread_ts="111.222",
115-
)
116-
with pytest.warns(ExperimentalWarning, match="say_stream is experimental"):
117-
await say_stream()

0 commit comments

Comments
 (0)