[Python-checkins] bpo-39377: json: Update doc about the encoding option. (GH-18076)
Inada Naoki
webhook-mailer at python.org
Wed Jan 22 05:01:47 EST 2020
https://github.com/python/cpython/commit/5bbac8cbdf140ebce446ea4e7db2b20a5d7b8402
commit: 5bbac8cbdf140ebce446ea4e7db2b20a5d7b8402
branch: master
author: Inada Naoki <songofacandy at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-01-22T19:01:24+09:00
summary:
bpo-39377: json: Update doc about the encoding option. (GH-18076)
Co-authored-by: Kyle Stanley <aeros167 at gmail.com>
files:
M Doc/library/json.rst
M Doc/whatsnew/3.9.rst
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index cfe68c9dd91d0..b923c8e167052 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -283,19 +283,18 @@ Basic Usage
instance containing a JSON document) to a Python object using this
:ref:`conversion table <json-to-py-table>`.
- The other arguments have the same meaning as in :func:`load`, except
- *encoding* which is ignored and deprecated since Python 3.1.
+ The other arguments have the same meaning as in :func:`load`.
If the data being deserialized is not a valid JSON document, a
:exc:`JSONDecodeError` will be raised.
- .. deprecated-removed:: 3.1 3.9
- *encoding* keyword argument.
-
.. versionchanged:: 3.6
*s* can now be of type :class:`bytes` or :class:`bytearray`. The
input encoding should be UTF-8, UTF-16 or UTF-32.
+ .. versionchanged:: 3.9
+ The keyword argument *encoding* has been removed.
+
Encoders and Decoders
---------------------
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst
index ab27c488ea30b..00341ef8019e7 100644
--- a/Doc/whatsnew/3.9.rst
+++ b/Doc/whatsnew/3.9.rst
@@ -424,11 +424,15 @@ Removed
(Contributed by Victor Stinner in :issue:`39350`.)
* The *buffering* parameter of :class:`bz2.BZ2File` has been removed. Since
- Python 3.0, it was ignored and using it was emitting
- :exc:`DeprecationWarning`. Pass an open file object to control how the file
- is opened.
+ Python 3.0, it was ignored and using it emitted a :exc:`DeprecationWarning`.
+ Pass an open file object to control how the file is opened.
(Contributed by Victor Stinner in :issue:`39357`.)
+* The *encoding* parameter of :func:`json.loads` has been removed.
+ As of Python 3.1, it was deprecated and ignored; using it has emitted a
+ :exc:`DeprecationWarning` since Python 3.8.
+ (Contributed by Inada Naoki in :issue:`39377`)
+
Porting to Python 3.9
=====================
More information about the Python-checkins
mailing list