File tree Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -384,13 +384,13 @@ run_in_thread.
384384
385385 A PubSub object adheres to the same encoding semantics as the client
386386instance it was created from. Any channel or pattern that's unicode will
387- be encoded using the charset specified on the client before being sent
387+ be encoded using the encoding specified on the client before being sent
388388to Redis. If the client's decode_responses flag is set the False (the
389389default), the 'channel', 'pattern' and 'data' values in message
390390dictionaries will be byte strings (str on Python 2, bytes on Python 3).
391391If the client's decode_responses is True, then the 'channel', 'pattern'
392392and 'data' values will be automatically decoded to unicode strings using
393- the client's charset .
393+ the client's encoding .
394394
395395PubSub objects remember what channels and patterns they are subscribed
396396to. In the event of a disconnection such as a network error or timeout,
Original file line number Diff line number Diff line change 22import re
33import threading
44import time
5- import warnings
65from itertools import chain
76from typing import (
87 TYPE_CHECKING ,
@@ -203,8 +202,6 @@ def __init__(
203202 unix_socket_path : Optional [str ] = None ,
204203 encoding : str = "utf-8" ,
205204 encoding_errors : str = "strict" ,
206- charset : Optional [str ] = None ,
207- errors : Optional [str ] = None ,
208205 decode_responses : bool = False ,
209206 check_ready : bool = False ,
210207 retry_on_timeout : bool = False ,
@@ -257,20 +254,6 @@ def __init__(
257254 else :
258255 self ._event_dispatcher = event_dispatcher
259256 if not connection_pool :
260- if charset is not None :
261- warnings .warn (
262- DeprecationWarning (
263- '"charset" is deprecated. Use "encoding" instead'
264- )
265- )
266- encoding = charset
267- if errors is not None :
268- warnings .warn (
269- DeprecationWarning (
270- '"errors" is deprecated. Use "encoding_errors" instead'
271- )
272- )
273- encoding_errors = errors
274257 if not retry_on_error :
275258 retry_on_error = []
276259 if retry_on_timeout is True :
Original file line number Diff line number Diff line change @@ -142,7 +142,6 @@ def parse_cluster_myshardid(resp, **options):
142142SLOT_ID = "slot-id"
143143
144144REDIS_ALLOWED_KEYS = (
145- "charset" ,
146145 "connection_class" ,
147146 "connection_pool" ,
148147 "connection_pool_class" ,
@@ -152,7 +151,6 @@ def parse_cluster_myshardid(resp, **options):
152151 "decode_responses" ,
153152 "encoding" ,
154153 "encoding_errors" ,
155- "errors" ,
156154 "host" ,
157155 "lib_name" ,
158156 "lib_version" ,
You can’t perform that action at this time.
0 commit comments