Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-59598: Ignore leading whitespace inJSONDecoder.raw_decode
#117397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
ghost commentedMar 31, 2024 • edited by ghost
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by ghost
Uh oh!
There was an error while loading.Please reload this page.
Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Two small comments, but overall looks good.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Updated the code to make the matching function an argument and removed the extra call. |
@crazymerlyn Thanks for the updates. Your pr still requires a news entry. The easiest way to add this is to use click on the Details button next to the failing Also seehttps://devguide.python.org/core-developers/committing/#how-to-add-a-news-entry |
added a news entry |
Misc/NEWS.d/next/Library/2024-04-22-07-05-05.gh-issue-59598.LyEKW3.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@eendebakpt Updated with the suggested change. |
eendebakpt commentedMay 7, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@crazymerlyn I read the corresponding issue and opinions on whether we should make this change or not (at least back in 2016!) are not unanimous. A core developer should decide whether to accept this or not. The code in the PR looks good to me. Since this PR is not backwards compatible and there has been some discussion it is good to update the documentation (e.g. herehttps://docs.python.org/3/library/json.html#json.JSONDecoder.raw_decode) and add a |
Whitespace is allowed before JSON objects according to RFC 4627.
73429b1
to96963f1
Compare
Uh oh!
There was an error while loading.Please reload this page.
Based on Bayard's patch inhttps://bugs.python.org/issue15393
Fixes#59598