|  | 
| 19 | 19 | from . import process | 
| 20 | 20 | 
 | 
| 21 | 21 | __all__ = [ | 
| 22 |  | -    'sub_debug', 'debug', 'info', 'sub_warning', 'warn', 'get_logger', | 
|  | 22 | +    'sub_debug', 'debug', 'info', 'sub_warning', 'get_logger', | 
| 23 | 23 |     'log_to_stderr', 'get_temp_dir', 'register_after_fork', | 
| 24 | 24 |     'is_exiting', 'Finalize', 'ForkAwareThreadLock', 'ForkAwareLocal', | 
| 25 | 25 |     'close_all_fds_except', 'SUBDEBUG', 'SUBWARNING', | 
| @@ -54,7 +54,7 @@ def info(msg, *args): | 
| 54 | 54 |     if _logger: | 
| 55 | 55 |         _logger.log(INFO, msg, *args, stacklevel=2) | 
| 56 | 56 | 
 | 
| 57 |  | -def warn(msg, *args): | 
|  | 57 | +def _warn(msg, *args): | 
| 58 | 58 |     if _logger: | 
| 59 | 59 |         _logger.log(WARNING, msg, *args, stacklevel=2) | 
| 60 | 60 | 
 | 
| @@ -192,14 +192,14 @@ def _get_base_temp_dir(tempfile): | 
| 192 | 192 |     try: | 
| 193 | 193 |         base_system_tempdir = tempfile._get_default_tempdir(dirlist) | 
| 194 | 194 |     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) | 
| 198 | 198 |         # At this point, the system-wide temporary directory is not usable | 
| 199 | 199 |         # but we may assume that the user-defined one is, even if we will | 
| 200 | 200 |         # not be able to write socket files out there. | 
| 201 | 201 |         return base_tempdir | 
| 202 |  | -    warn("Ignoring user-defined temporary directory: %s", base_tempdir) | 
|  | 202 | +    _warn("Ignoring user-defined temporary directory: %s", base_tempdir) | 
| 203 | 203 |     # at most max(map(len, dirlist)) + 14 + 14 = 36 characters | 
| 204 | 204 |     assert len(base_system_tempdir) + 14 + 14 <= _SUN_PATH_MAX | 
| 205 | 205 |     return base_system_tempdir | 
|  | 
0 commit comments