cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-59598: Ignore leading whitespace in `JSONDecoder.raw_decode`

Open crazymerlyn opened this issue 1 year ago • 8 comments
trafficstars

Based on Bayard's patch in https://bugs.python.org/issue15393 Fixes #59598

  • Issue: gh-59598

crazymerlyn avatar Mar 31 '24 01:03 crazymerlyn

All commit authors signed the Contributor License Agreement.
CLA signed

cpython-cla-bot[bot] avatar Mar 31 '24 01:03 cpython-cla-bot[bot]

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 skip news label instead.

bedevere-app[bot] avatar Mar 31 '24 01:03 bedevere-app[bot]

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 skip news label instead.

bedevere-app[bot] avatar Apr 22 '24 02:04 bedevere-app[bot]

Updated the code to make the matching function an argument and removed the extra call.

crazymerlyn avatar Apr 22 '24 02:04 crazymerlyn

@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 bedevere/news in the list of CI checks.

Also see https://devguide.python.org/core-developers/committing/#how-to-add-a-news-entry

eendebakpt avatar Apr 22 '24 05:04 eendebakpt

added a news entry

crazymerlyn avatar Apr 22 '24 06:04 crazymerlyn

@eendebakpt Updated with the suggested change.

crazymerlyn avatar May 07 '24 19:05 crazymerlyn

@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 Changed in version x.xx section (for an example see https://docs.python.org/3/library/bisect.html#bisect.bisect)

eendebakpt avatar May 07 '24 19:05 eendebakpt