Skip to content

Commit a7c24f5

Browse files
committed
rename warn -> _warn for the 3.13.x backport
1 parent adb75fc commit a7c24f5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Lib/multiprocessing/util.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from . import process
2020

2121
__all__ = [
22-
'sub_debug', 'debug', 'info', 'sub_warning', 'warn', 'get_logger',
22+
'sub_debug', 'debug', 'info', 'sub_warning', 'get_logger',
2323
'log_to_stderr', 'get_temp_dir', 'register_after_fork',
2424
'is_exiting', 'Finalize', 'ForkAwareThreadLock', 'ForkAwareLocal',
2525
'close_all_fds_except', 'SUBDEBUG', 'SUBWARNING',
@@ -54,7 +54,7 @@ def info(msg, *args):
5454
if _logger:
5555
_logger.log(INFO, msg, *args, stacklevel=2)
5656

57-
def warn(msg, *args):
57+
def _warn(msg, *args):
5858
if _logger:
5959
_logger.log(WARNING, msg, *args, stacklevel=2)
6060

@@ -192,14 +192,14 @@ def _get_base_temp_dir(tempfile):
192192
try:
193193
base_system_tempdir = tempfile._get_default_tempdir(dirlist)
194194
except FileNotFoundError:
195-
warn("Process-wide temporary directory %s will not be usable for "
196-
"creating socket files and no usable system-wide temporary "
197-
"directory was found in %s", base_tempdir, dirlist)
195+
_warn("Process-wide temporary directory %s will not be usable for "
196+
"creating socket files and no usable system-wide temporary "
197+
"directory was found in %s", base_tempdir, dirlist)
198198
# At this point, the system-wide temporary directory is not usable
199199
# but we may assume that the user-defined one is, even if we will
200200
# not be able to write socket files out there.
201201
return base_tempdir
202-
warn("Ignoring user-defined temporary directory: %s", base_tempdir)
202+
_warn("Ignoring user-defined temporary directory: %s", base_tempdir)
203203
# at most max(map(len, dirlist)) + 14 + 14 = 36 characters
204204
assert len(base_system_tempdir) + 14 + 14 <= _SUN_PATH_MAX
205205
return base_system_tempdir

0 commit comments

Comments
 (0)