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
revert changes to tests
  • Loading branch information
eendebakpt committed Jun 4, 2024
commit e5fa305ad7842d71a552b9d97431e7b56a2604fb
4 changes: 1 addition & 3 deletions Lib/test/test_json/test_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ def test_dump(self):
def test_dumps(self):
self.assertEqual(self.dumps({}), '{}')

def test_dump_skipkeys_invalid(self):
def test_dump_skipkeys(self):
v = {b'invalid_key': False, 'valid_key': True}
with self.assertRaises(TypeError):
self.json.dumps(v)

def test_dump_skipkeys(self):
v = {b'invalid_key': False, 'valid_key': True}
s = self.json.dumps(v, skipkeys=True)
o = self.json.loads(s)
self.assertIn('valid_key', o)
Expand Down
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