Skip to content

Commit 478a75e

Browse files
committed
Clarify comments
1 parent 9cae616 commit 478a75e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Lib/test/datetimetester.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7297,9 +7297,10 @@ def test_update_type_cache(self):
72977297

72987298
@unittest.skipIf(_interpreters is None, "missing _interpreters module")
72997299
def test_static_type_concurrent_init_fini(self):
7300-
# gh-136421: When a managed static extension type is concurrently
7301-
# used by multiple interpreters, there was a crash due to misjudging
7302-
# its first initialization stage or last finalization one.
7300+
# gh-136421: When a managed static extension type is concurrently used
7301+
# by multiple interpreters, there was a crash due to the runtime state
7302+
# rather than an interpreter state being updated wrongly by misjudging
7303+
# the type's first initialization stage or last finalization one.
73037304
script = textwrap.dedent("""
73047305
import threading
73057306
import _interpreters

Modules/_datetimemodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7570,8 +7570,8 @@ PyMODINIT_FUNC
75707570
PyInit__datetime(void)
75717571
{
75727572
PyInterpreterState *interp = _PyInterpreterState_GET();
7573-
// gh-136421: Ensure static types are fully finalized at the shutdown of
7574-
// the main interpreter rather than subinterpreters for concurrency.
7573+
// gh-136421: Ensure static types' runtime state gets cleared in shutting
7574+
// down the main interpreter rather than subinterpreters for concurrency.
75757575
assert(interp != NULL && _Py_IsMainInterpreter(interp));
75767576
if (init_static_types(interp, 0) < 0) {
75777577
return NULL;

0 commit comments

Comments
 (0)