Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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#6784
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

@Carreau

@Carreau Carreau commented May 13, 2018

Copy link
Copy Markdown
Contributor

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

The keyword argument was deprecated in 3.1, and can now be removed.

@BoboTiG BoboTiG left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch @Carreau!
There is a conflict with json.rst, if you can have a look it would be great :)

Comment thread Lib/json/__init__.py
@@ -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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@methane methane closed this Apr 9, 2019
@Carreau Carreau deleted the jloads-encoding-remove branch April 9, 2019 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.