-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-59598: Ignore leading whitespace in JSONDecoder.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 our terms of service and privacy 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
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb 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.
e072b2c
to
ed178b9
Compare
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb 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 see https://devguide.python.org/core-developers/committing/#how-to-add-a-news-entry |
ed178b9
to
0d0e1d4
Compare
added a news entry |
Misc/NEWS.d/next/Library/2024-04-22-07-05-05.gh-issue-59598.LyEKW3.rst
Outdated
Show resolved
Hide resolved
0d0e1d4
to
6b43c76
Compare
@eendebakpt Updated with the suggested change. |
@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. here https://docs.python.org/3/library/json.html#json.JSONDecoder.raw_decode) and add a |
6b43c76
to
73429b1
Compare
Whitespace is allowed before JSON objects according to RFC 4627.
73429b1
to
96963f1
Compare
Based on Bayard's patch in https://bugs.python.org/issue15393
Fixes #59598