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

Appearance settings

gh-112087: Use QSBR technique for list_new/clear for free-thread build #115875

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

Merged
merged 10 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
23 changes: 18 additions & 5 deletions 23 Lib/test/test_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import sysconfig
import test.support
from test import support
from test.support import os_helper
from test.support import os_helper, Py_GIL_DISABLED
from test.support.script_helper import assert_python_ok, assert_python_failure
from test.support import threading_helper
from test.support import import_helper
Expand Down Expand Up @@ -1224,7 +1224,7 @@ def test_pystats(self):
@test.support.cpython_only
@unittest.skipUnless(hasattr(sys, 'abiflags'), 'need sys.abiflags')
def test_disable_gil_abi(self):
self.assertEqual('t' in sys.abiflags, support.Py_GIL_DISABLED)
self.assertEqual('t' in sys.abiflags, Py_GIL_DISABLED)


@test.support.cpython_only
Expand Down Expand Up @@ -1575,9 +1575,22 @@ def get_gen(): yield 1
check(re.finditer('',''), size('2P'))
# list
check(list([]), vsize('Pn'))
check(list([1]), vsize('Pn') + 2*self.P)
check(list([1, 2]), vsize('Pn') + 2*self.P)
check(list([1, 2, 3]), vsize('Pn') + 4*self.P)
if Py_GIL_DISABLED:
check(list([1]), vsize('Pn') + 3*self.P)
check(list([1, 2]), vsize('Pn') + 3*self.P)
check(list([1, 2, 3]), vsize('Pn') + 3*self.P)
check(list([1, 2, 3, 4]), vsize('Pn') + 7*self.P)
check(list([1, 2, 3, 4, 5]), vsize('Pn') + 7*self.P)
check(list([1, 2, 3, 4, 5, 6]), vsize('Pn') + 7*self.P)
check(list([1, 2, 3, 4, 5, 6, 7]), vsize('Pn') + 7*self.P)
else:
check(list([1]), vsize('Pn') + 2*self.P)
check(list([1, 2]), vsize('Pn') + 2*self.P)
check(list([1, 2, 3]), vsize('Pn') + 4*self.P)
check(list([1, 2, 3, 4]), vsize('Pn') + 4*self.P)
check(list([1, 2, 3, 4, 5]), vsize('Pn') + 6*self.P)
check(list([1, 2, 3, 4, 5, 6]), vsize('Pn') + 6*self.P)
check(list([1, 2, 3, 4, 5, 6, 7]), vsize('Pn') + 8*self.P)
# sortwrapper (list)
# XXX
# cmpwrapper (list)
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.