Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kumaraditya303 merged 53 commits intopython:mainfromeendebakpt:json_ft
Aug 31, 2025
Merged
Changes from1 commit
Commits
Show all changes
53 commits
Select commitHold shift + click to select a range
da0e917
Make the _json module thread safe
eendebakptMay 22, 2024
3797dfa
Update Modules/_json.c
eendebakptMay 22, 2024
366654c
handle goto and return statements
eendebakptMay 24, 2024
5b72cdf
Apply suggestions from code review
eendebakptMay 25, 2024
c4c24c3
Update Include/internal/pycore_critical_section.h
eendebakptMay 25, 2024
370191b
rename macro
eendebakptMay 31, 2024
93c4466
Merge branch 'main' into json_ft
eendebakptMay 31, 2024
eafd3c1
fix typo
eendebakptMay 31, 2024
daeec46
Merge branch 'json_ft' of github.com:eendebakpt/cpython into json_ft
eendebakptMay 31, 2024
d54baf2
fix missing to exit critical section
eendebakptJun 4, 2024
e5fa305
revert changes to tests
eendebakptJun 4, 2024
d4ddf5d
📜🤖 Added by blurb_it.
blurb-it[bot]Jun 4, 2024
67d942f
Merge branch 'main' into json_ft
eendebakptJun 4, 2024
4ffc1b2
Merge branch 'main' into json_ft
eendebakptAug 14, 2024
384ca59
sync with main
eendebakptAug 14, 2024
64e20aa
sync with main
eendebakptAug 14, 2024
e6ce9c9
update news entry
eendebakptAug 14, 2024
34885a0
fix normal build
eendebakptAug 14, 2024
2fe760b
Merge branch 'main' into json_ft
eendebakptAug 14, 2024
eebccac
add lock around result of PyMapping_Items
eendebakptAug 15, 2024
db8947c
add tests
eendebakptAug 15, 2024
c19ad14
fix argument of Py_END_CRITICAL_SECTION_SEQUENCE_FAST
eendebakptAug 15, 2024
8b12e0f
Merge branch 'main' into json_ft
eendebakptFeb 10, 2025
78d3595
avoid Py_EXIT_CRITICAL_SECTION_SEQUENCE_FAST
eendebakptFeb 10, 2025
6e8615f
use barriers in test
eendebakptFeb 10, 2025
39ebc00
typo
eendebakptFeb 10, 2025
7c5b185
whitespace
eendebakptFeb 10, 2025
adf78c7
Merge branch 'main' into json_ft
eendebakptJun 24, 2025
acd0ad1
resolve merge conflicts
eendebakptJun 24, 2025
41e3dee
Update Misc/NEWS.d/next/Core_and_Builtins/2024-06-04-20-26-21.gh-issu…
eendebakptJun 24, 2025
75884cb
cleanup
eendebakptJun 24, 2025
0424c58
Merge branch 'json_ft' of github.com:eendebakpt/cpython into json_ft
eendebakptJun 24, 2025
9c964f9
Merge branch 'main' into json_ft
eendebakptJun 24, 2025
5acc999
Merge branch 'main' into json_ft
eendebakptJul 28, 2025
5173373
format
eendebakptJul 28, 2025
7d00562
only use items locally in encoder_listencode_dict
eendebakptAug 6, 2025
00f4d7f
Merge branch 'main' into json_ft
eendebakptAug 14, 2025
b95c07f
use strong references in iteration
eendebakptAug 24, 2025
cedc2c3
Merge branch 'main' into json_ft
eendebakptAug 24, 2025
0ca453d
replace Py_IncRef with Py_INCREF
eendebakptAug 26, 2025
45544f3
Update Modules/_json.c
eendebakptAug 27, 2025
dcb088e
Apply suggestion from @kumaraditya303
kumaraditya303Aug 27, 2025
5f8ad07
add header
kumaraditya303Aug 27, 2025
61bc8d1
Apply suggestions from code review
eendebakptAug 27, 2025
f85b695
review comments
eendebakptAug 28, 2025
2c0cd18
use _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED
eendebakptAug 28, 2025
c133b71
remove testing code
eendebakptAug 29, 2025
7609117
Merge branch 'main' into json_ft
eendebakptAug 29, 2025
7656a2a
add incref/decref to fast seq iteration
eendebakptAug 30, 2025
1920aed
Merge branch 'json_ft' of github.com:eendebakpt/cpython into json_ft
eendebakptAug 30, 2025
d5d65ab
fix
eendebakptAug 30, 2025
4a16e18
fix
eendebakptAug 30, 2025
00139f3
Update Modules/_json.c
kumaraditya303Aug 30, 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
PrevPrevious commit
NextNext commit
cleanup
  • Loading branch information
@eendebakpt
eendebakpt committedJun 24, 2025
commit75884cbded1b9678031aef4e241eb251bd98843f
8 changes: 5 additions & 3 deletionsLib/test/test_free_threading/test_json.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,7 @@ def items(self):
@threading_helper.reap_threads
@threading_helper.requires_working_threading()
class TestJsonEncoding(CTest):
# Test encoding json withmultiple threads modifying the data cannot
# Test encoding json withconcurrent threads modifying the data cannot
# corrupt the interpreter

def test_json_mutating_list(self):
Expand DownExpand Up@@ -59,6 +59,7 @@ def worker(barrier, data, index):
pass
else:
d[index] = index

encode_json_helper(self.json, worker, [{}, {}], number_of_threads=16)

def test_json_mutating_mapping(self):
Expand All@@ -71,8 +72,9 @@ def worker(barrier, data, index):
d.mapping.clear()
else:
d.mapping.append((index, index))
encode_json_helper(self.json,
worker, [MyMapping(), MyMapping()], number_of_threads=16)

data = [MyMapping(), MyMapping()]
encode_json_helper(self.json, worker, data, number_of_threads=16)


if __name__ == "__main__":
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp