We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bffa2c commit 81cc942Copy full SHA for 81cc942
billiard/util.py
@@ -128,7 +128,12 @@ def get_logger():
128
global _logger
129
import logging
130
131
- logging._acquireLock()
+ try:
132
+ # Python 3.13+
133
+ acquire, release = logging._prepareFork, logging._afterFork
134
+ except AttributeError:
135
+ acquire, release = logging._acquireLock, logging._releaseLock
136
+ acquire()
137
try:
138
if not _logger:
139
@@ -145,7 +150,7 @@ def get_logger():
145
150
atexit._exithandlers.remove((_exit_function, (), {}))
146
151
atexit._exithandlers.append((_exit_function, (), {}))
147
152
finally:
148
- logging._releaseLock()
153
+ release()
149
154
155
return _logger
156
0 commit comments