Skip to content

gh-116738: Make _json module safe in the free-threading build #119438

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

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
da0e917
Make the _json module thread safe
eendebakpt May 22, 2024
3797dfa
Update Modules/_json.c
eendebakpt May 22, 2024
366654c
handle goto and return statements
eendebakpt May 24, 2024
5b72cdf
Apply suggestions from code review
eendebakpt May 25, 2024
c4c24c3
Update Include/internal/pycore_critical_section.h
eendebakpt May 25, 2024
370191b
rename macro
eendebakpt May 31, 2024
93c4466
Merge branch 'main' into json_ft
eendebakpt May 31, 2024
eafd3c1
fix typo
eendebakpt May 31, 2024
daeec46
Merge branch 'json_ft' of github.com:eendebakpt/cpython into json_ft
eendebakpt May 31, 2024
d54baf2
fix missing to exit critical section
eendebakpt Jun 4, 2024
e5fa305
revert changes to tests
eendebakpt Jun 4, 2024
d4ddf5d
📜🤖 Added by blurb_it.
blurb-it[bot] Jun 4, 2024
67d942f
Merge branch 'main' into json_ft
eendebakpt Jun 4, 2024
4ffc1b2
Merge branch 'main' into json_ft
eendebakpt Aug 14, 2024
384ca59
sync with main
eendebakpt Aug 14, 2024
64e20aa
sync with main
eendebakpt Aug 14, 2024
e6ce9c9
update news entry
eendebakpt Aug 14, 2024
34885a0
fix normal build
eendebakpt Aug 14, 2024
2fe760b
Merge branch 'main' into json_ft
eendebakpt Aug 14, 2024
eebccac
add lock around result of PyMapping_Items
eendebakpt Aug 15, 2024
db8947c
add tests
eendebakpt Aug 15, 2024
c19ad14
fix argument of Py_END_CRITICAL_SECTION_SEQUENCE_FAST
eendebakpt Aug 15, 2024
8b12e0f
Merge branch 'main' into json_ft
eendebakpt Feb 10, 2025
78d3595
avoid Py_EXIT_CRITICAL_SECTION_SEQUENCE_FAST
eendebakpt Feb 10, 2025
6e8615f
use barriers in test
eendebakpt Feb 10, 2025
39ebc00
typo
eendebakpt Feb 10, 2025
7c5b185
whitespace
eendebakpt Feb 10, 2025
adf78c7
Merge branch 'main' into json_ft
eendebakpt Jun 24, 2025
acd0ad1
resolve merge conflicts
eendebakpt Jun 24, 2025
41e3dee
Update Misc/NEWS.d/next/Core_and_Builtins/2024-06-04-20-26-21.gh-issu…
eendebakpt Jun 24, 2025
75884cb
cleanup
eendebakpt Jun 24, 2025
0424c58
Merge branch 'json_ft' of github.com:eendebakpt/cpython into json_ft
eendebakpt Jun 24, 2025
9c964f9
Merge branch 'main' into json_ft
eendebakpt Jun 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into json_ft
  • Loading branch information
eendebakpt authored Jun 24, 2025
commit adf78c7ffeb86b22b6f953f1149af133b8f62205
8 changes: 5 additions & 3 deletions Modules/_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
#endif

#include "Python.h"
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
#include "pycore_runtime.h" // _PyRuntime
#include "pycore_pyerrors.h" // _PyErr_FormatNote
#include "pycore_global_strings.h" // _Py_ID()
#include "pycore_pyerrors.h" // _PyErr_FormatNote
#include "pycore_runtime.h" // _PyRuntime
#include "pycore_unicodeobject.h" // _PyUnicode_CheckConsistency()

#include <stdbool.h> // bool

Expand Down Expand Up @@ -1756,7 +1758,7 @@
goto bail;
Py_CLEAR(ident);
}
if (s->indent != Py_None && !first) {

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

‘first’ undeclared (first use in this function)

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

‘first’ undeclared (first use in this function)

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘first’ undeclared (first use in this function)

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

‘first’ undeclared (first use in this function)

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘first’ undeclared (first use in this function)

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

‘first’ undeclared (first use in this function)

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'first': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

‘first’ undeclared (first use in this function)

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'first': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

‘first’ undeclared (first use in this function)

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'first': undeclared identifier [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 1761 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'first': undeclared identifier [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
indent_level--;
if (write_newline_indent(writer, indent_level, indent_cache) < 0) {
goto bail;
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy