Skip to content

Commit 0ccae85

Browse files
committed
Update to take into accounts comments.
1 parent a0a5a0a commit 0ccae85

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/library/json.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ Basic Usage
277277
If the data being deserialized is not a valid JSON document, a
278278
:exc:`JSONDecodeError` will be raised.
279279

280-
.. deprecated:: 3.1
281-
The *encoding* keyword argument has been deprecated and will be ignored.
280+
.. deprecated-removed:: 3.1 3.9
281+
*encoding* keyword argument.
282282

283283
.. versionchanged:: 3.6
284284
*s* can now be of type :class:`bytes` or :class:`bytearray`. The

Lib/json/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,11 @@ def loads(s, *, cls=None, object_hook=None, parse_float=None,
345345
if "encoding" not in kw:
346346
import warnings
347347
warnings.warn(
348-
"passing 'encoding' as a keyword argument is deprecated since"
349-
" Python 3.1, is ignored and will be removed in Python 3.9.",
348+
"'encoding' is ignored and deprecated. It will be removed in Python 3.9",
350349
DeprecationWarning,
351350
stacklevel=2
352351
)
352+
del kw['encoding']
353353

354354
if (cls is None and object_hook is None and
355355
parse_int is None and parse_float is None and

0 commit comments

Comments
 (0)