Skip to content

Commit aadc957

Browse files
authored
Merge branch 'main' into main
2 parents bbb8bcf + db699db commit aadc957

File tree

7 files changed

+17
-20
lines changed

7 files changed

+17
-20
lines changed

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,3 @@ Doc/whatsnew/3.6.rst
7373
Doc/whatsnew/3.7.rst
7474
Doc/whatsnew/3.8.rst
7575
Doc/whatsnew/3.10.rst
76-
Doc/whatsnew/3.11.rst

Doc/whatsnew/3.11.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ This section covers specific optimizations independent of the
12921292
(Contributed by Stefan Behnel in :gh:`68264`.)
12931293

12941294
* Resizing lists is streamlined for the common case,
1295-
speeding up :meth:`list.append` by ≈15%
1295+
speeding up :meth:`!list.append` by ≈15%
12961296
and simple :term:`list comprehension`\s by up to 20-30%
12971297
(Contributed by Dennis Sweeney in :gh:`91165`.)
12981298

Lib/test/libregrtest/tsan.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
TSAN_TESTS = [
55
'test_asyncio',
6-
# TODO: enable more of test_capi once bugs are fixed (GH-116908, GH-116909).
7-
'test_capi.test_mem',
8-
'test_capi.test_pyatomic',
6+
'test_capi',
97
'test_code',
108
'test_ctypes',
119
'test_concurrent_futures',

Lib/test/test_zoneinfo/test_zoneinfo_property.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,23 +147,21 @@ def setUp(self):
147147
def test_pickle_unpickle_cache(self, key):
148148
zi = self.klass(key)
149149
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
150-
with self.subTest(proto=proto):
151-
pkl_str = pickle.dumps(zi, proto)
152-
zi_rt = pickle.loads(pkl_str)
150+
pkl_str = pickle.dumps(zi, proto)
151+
zi_rt = pickle.loads(pkl_str)
153152

154-
self.assertIs(zi, zi_rt)
153+
self.assertIs(zi, zi_rt)
155154

156155
@hypothesis.given(key=valid_keys())
157156
@add_key_examples
158157
def test_pickle_unpickle_no_cache(self, key):
159158
zi = self.klass.no_cache(key)
160159
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
161-
with self.subTest(proto=proto):
162-
pkl_str = pickle.dumps(zi, proto)
163-
zi_rt = pickle.loads(pkl_str)
160+
pkl_str = pickle.dumps(zi, proto)
161+
zi_rt = pickle.loads(pkl_str)
164162

165-
self.assertIsNot(zi, zi_rt)
166-
self.assertEqual(str(zi), str(zi_rt))
163+
self.assertIsNot(zi, zi_rt)
164+
self.assertEqual(str(zi), str(zi_rt))
167165

168166
@hypothesis.given(key=valid_keys())
169167
@add_key_examples

Python/ceval.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,12 +627,14 @@ _PyEval_MatchKeys(PyThreadState *tstate, PyObject *map, PyObject *keys)
627627
PyObject *seen = NULL;
628628
PyObject *dummy = NULL;
629629
PyObject *values = NULL;
630-
PyObject *get = NULL;
631630
// We use the two argument form of map.get(key, default) for two reasons:
632631
// - Atomically check for a key and get its value without error handling.
633632
// - Don't cause key creation or resizing in dict subclasses like
634633
// collections.defaultdict that define __missing__ (or similar).
635-
int meth_found = _PyObject_GetMethod(map, &_Py_ID(get), &get);
634+
_PyCStackRef cref;
635+
_PyThreadState_PushCStackRef(tstate, &cref);
636+
int meth_found = _PyObject_GetMethodStackRef(tstate, map, &_Py_ID(get), &cref.ref);
637+
PyObject *get = PyStackRef_AsPyObjectBorrow(cref.ref);
636638
if (get == NULL) {
637639
goto fail;
638640
}
@@ -682,12 +684,12 @@ _PyEval_MatchKeys(PyThreadState *tstate, PyObject *map, PyObject *keys)
682684
}
683685
// Success:
684686
done:
685-
Py_DECREF(get);
687+
_PyThreadState_PopCStackRef(tstate, &cref);
686688
Py_DECREF(seen);
687689
Py_DECREF(dummy);
688690
return values;
689691
fail:
690-
Py_XDECREF(get);
692+
_PyThreadState_PopCStackRef(tstate, &cref);
691693
Py_XDECREF(seen);
692694
Py_XDECREF(dummy);
693695
Py_XDECREF(values);

Python/initconfig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ The following implementation-specific options are available:\n\
312312
"-X gil=[0|1]: enable (1) or disable (0) the GIL; also PYTHON_GIL\n"
313313
#endif
314314
"\
315-
-X importtime[=2]: show how long each import takes; use -X importtime=2 to\
315+
-X importtime[=2]: show how long each import takes; use -X importtime=2 to\n\
316316
log imports of already-loaded modules; also PYTHONPROFILEIMPORTTIME\n\
317317
-X int_max_str_digits=N: limit the size of int<->str conversions;\n\
318318
0 disables the limit; also PYTHONINTMAXSTRDIGITS\n\

Tools/requirements-hypothesis.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Requirements file for hypothesis that
22
# we use to run our property-based tests in CI.
33

4-
hypothesis==6.111.2
4+
hypothesis==6.135.26

0 commit comments

Comments
 (0)