bpo-33461: remove json.loads encoding kwarg#6784
Closed
Carreau wants to merge 1 commit into
python:masterpython/cpython:masterfrom
Carreau:jloads-encoding-removeCarreau/cpython:jloads-encoding-removeCopy head branch name to clipboard
Closed
bpo-33461: remove json.loads encoding kwarg#6784Carreau wants to merge 1 commit intopython:masterpython/cpython:masterfrom Carreau:jloads-encoding-removeCarreau/cpython:jloads-encoding-removeCopy head branch name to clipboard
Carreau wants to merge 1 commit into
python:masterpython/cpython:masterfrom
Carreau:jloads-encoding-removeCarreau/cpython:jloads-encoding-removeCopy head branch name to clipboard
Conversation
The keyword argument was deprecated in 3.1, and can now be removed.
BoboTiG
reviewed
Mar 5, 2019
| @@ -330,7 +330,6 @@ def loads(s, *, encoding=None, cls=None, object_hook=None, parse_float=None, | ||
| To use a custom ``JSONDecoder`` subclass, specify it with the ``cls`` | ||
| kwarg; otherwise ``JSONDecoder`` is used. | ||
|
|
Contributor
There was a problem hiding this comment.
Nitpick: remove this useless empty line too.
| @@ -0,0 +1,2 @@ | ||
| json.loads *encoding* keyword which was deprecated and ignored since Python | ||
| 3.1 has been removed |
Contributor
There was a problem hiding this comment.
Markup string can be used for linking. How about the below:
Removed the *encoding* keyword from :func:`json.loads`, it was deprecated
and ignored since Python 3.1. Patch by Matthias Bussonnier.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The keyword argument was deprecated in 3.1, and can now be removed.
Alternative to gh-6762 that just raise a DeprecationWarning and delay the removal.
https://bugs.python.org/issue33461