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

Commit 6ad0ab4

Browse filesBrowse files
committed
fix
1 parent 67a7f32 commit 6ad0ab4
Copy full SHA for 6ad0ab4

File tree

Expand file treeCollapse file tree

3 files changed

+8
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+8
-6
lines changed

‎Lib/test/test_list.py

Copy file name to clipboardExpand all lines: Lib/test/test_list.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
from test import list_tests
3-
from test.support import cpython_only, Py_GIL_DISABLED
3+
from test.support import cpython_only
44
import pickle
55
import unittest
66

‎Lib/test/test_sys.py

Copy file name to clipboardExpand all lines: Lib/test/test_sys.py
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import sysconfig
1313
import test.support
1414
from test import support
15-
from test.support import os_helper
15+
from test.support import os_helper, Py_GIL_DISABLED
1616
from test.support.script_helper import assert_python_ok, assert_python_failure
1717
from test.support import threading_helper
1818
from test.support import import_helper
@@ -1575,9 +1575,12 @@ def get_gen(): yield 1
15751575
check(re.finditer('',''), size('2P'))
15761576
# list
15771577
check(list([]), vsize('Pn'))
1578-
check(list([1]), vsize('Pn') + 2*self.P)
1579-
check(list([1, 2]), vsize('Pn') + 2*self.P)
1580-
check(list([1, 2, 3]), vsize('Pn') + 4*self.P)
1578+
if Py_GIL_DISABLED:
1579+
pass
1580+
else:
1581+
check(list([1]), vsize('Pn') + 2*self.P)
1582+
check(list([1, 2]), vsize('Pn') + 2*self.P)
1583+
check(list([1, 2, 3]), vsize('Pn') + 4*self.P)
15811584
# sortwrapper (list)
15821585
# XXX
15831586
# cmpwrapper (list)

‎Objects/listobject.c

Copy file name to clipboardExpand all lines: Objects/listobject.c
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,6 @@ list_clear_impl(PyListObject *a, bool is_resize)
773773
while (--i >= 0) {
774774
Py_XDECREF(items[i]);
775775
}
776-
// TODO: Use QSBR technique, if the list is shared between threads,
777776
#ifdef Py_GIL_DISABLED
778777
bool use_qsbr = is_resize && _PyObject_GC_IS_SHARED(a);
779778
#else

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.