Skip to content

Commit f39c85a

Browse files
committed
Removing 'charset' and 'errors' inputs from the Redis initialization arguments - deprecated 3 years ago.
1 parent 4e59d24 commit f39c85a

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

docs/advanced_features.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,13 @@ run_in_thread.
384384
385385
A PubSub object adheres to the same encoding semantics as the client
386386
instance 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
388388
to Redis. If the client's decode_responses flag is set the False (the
389389
default), the 'channel', 'pattern' and 'data' values in message
390390
dictionaries will be byte strings (str on Python 2, bytes on Python 3).
391391
If the client's decode_responses is True, then the 'channel', 'pattern'
392392
and 'data' values will be automatically decoded to unicode strings using
393-
the client's charset.
393+
the client's encoding.
394394

395395
PubSub objects remember what channels and patterns they are subscribed
396396
to. In the event of a disconnection such as a network error or timeout,

redis/client.py

-16
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ def __init__(
203203
unix_socket_path: Optional[str] = None,
204204
encoding: str = "utf-8",
205205
encoding_errors: str = "strict",
206-
charset: Optional[str] = None,
207-
errors: Optional[str] = None,
208206
decode_responses: bool = False,
209207
retry_on_timeout: bool = False,
210208
retry_on_error: Optional[List[Type[Exception]]] = None,
@@ -256,20 +254,6 @@ def __init__(
256254
else:
257255
self._event_dispatcher = event_dispatcher
258256
if not connection_pool:
259-
if charset is not None:
260-
warnings.warn(
261-
DeprecationWarning(
262-
'"charset" is deprecated. Use "encoding" instead'
263-
)
264-
)
265-
encoding = charset
266-
if errors is not None:
267-
warnings.warn(
268-
DeprecationWarning(
269-
'"errors" is deprecated. Use "encoding_errors" instead'
270-
)
271-
)
272-
encoding_errors = errors
273257
if not retry_on_error:
274258
retry_on_error = []
275259
if retry_on_timeout is True:

redis/cluster.py

-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ def parse_cluster_myshardid(resp, **options):
142142
SLOT_ID = "slot-id"
143143

144144
REDIS_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",

0 commit comments

Comments
 (0)