Skip to content

Commit 1ebff0f

Browse files
committed
Change retain_cache default value to True
Change retain_cache default value to True to mimic behaviour before part_channels implementation.
1 parent a2d952d commit 1ebff0f

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

docs/changelog.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ Massive documentation updates
88
- Removed unexpected loop termination from `WSConnection._close()`
99
- Fix bug where # prefixed channel names and capitals in initial_channels would not trigger :func:`twitchio.Client.event_ready`
1010
- Adjusted join channel rate limit handling
11-
- Added `retain_cache` kwarg to Client and Bot
11+
- Added `retain_cache` kwarg to Client and Bot. Default is True.
1212
- :func:`User.create_clip` has been fixed by converting bool to string in http request
1313
- Poll endpoints added :func:`User.fetch_polls` :func:`User.create_poll` and :func:`User.end_poll`
1414
- :func:`Client.fetch_cheermotes` color attribute corrected
1515
- :func:`User.fetch_channel_teams` returns empty list if no teams found rather than unhandled error
16-
- :func:`User.fetch_goals` method added
17-
- :func:`User.fetch_chat_settings` and :func:`User.update_chat_settings` methods added
16+
- Added :func:`User.fetch_goals` method
17+
- Added :func:`User.fetch_chat_settings` and :func:`User.update_chat_settings` methods
18+
- Added :func:`Client.part_channels` method
1819

1920
- ext.commands
2021
- :func:`Bot.handle_commands` now also invokes on threads / replies

twitchio/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Client:
6262
An optional float in seconds to send a PING message to the server. Defaults to 30.0.
6363
retain_cache: Optional[bool]
6464
An optional bool that will retain the cache if PART is received from websocket when True.
65-
It will still remove from cache if part_channels is manually called. Defaults to False.
65+
It will still remove from cache if part_channels is manually called. Defaults to True.
6666
6767
Attributes
6868
------------
@@ -78,7 +78,7 @@ def __init__(
7878
initial_channels: Union[list, tuple, Callable] = None,
7979
loop: asyncio.AbstractEventLoop = None,
8080
heartbeat: Optional[float] = 30.0,
81-
retain_cache: Optional[bool] = False,
81+
retain_cache: Optional[bool] = True,
8282
):
8383

8484
self.loop: asyncio.AbstractEventLoop = loop or asyncio.get_event_loop()

twitchio/ext/commands/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(
5555
client_secret: str = None,
5656
initial_channels: Union[list, tuple, Callable] = None,
5757
heartbeat: Optional[float] = 30.0,
58-
retain_cache: Optional[bool] = False,
58+
retain_cache: Optional[bool] = True,
5959
**kwargs,
6060
):
6161
super().__init__(

twitchio/websocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __init__(
6060
token: str = None,
6161
modes: tuple = None,
6262
initial_channels: List[str] = None,
63-
retain_cache: Optional[bool] = False,
63+
retain_cache: Optional[bool] = True,
6464
):
6565
self._loop = loop
6666
self._backoff = ExponentialBackoff()

0 commit comments

Comments
 (0)