diff --git a/Lib/uuid.py b/Lib/uuid.py index 470bc0d68597ab7..d4e486da15a8d7a 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -53,8 +53,11 @@ __author__ = 'Ka-Ping Yee ' # The recognized platforms - known behaviors -if sys.platform in ('win32', 'darwin', 'emscripten', 'wasi'): +if sys.platform in {'win32', 'darwin', 'emscripten', 'wasi'}: _AIX = _LINUX = False +elif sys.platform == 'linux': + _LINUX = True + _AIX = False else: import platform _platform_system = platform.system() diff --git a/Misc/NEWS.d/next/Documentation/2024-02-08-08-51-37.gh-issue-109653.QHLW4w.rst b/Misc/NEWS.d/next/Documentation/2024-02-08-08-51-37.gh-issue-109653.QHLW4w.rst new file mode 100644 index 000000000000000..97e0c8df326d694 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2024-02-08-08-51-37.gh-issue-109653.QHLW4w.rst @@ -0,0 +1 @@ +Improve import time of :mod:`uuid` on Linux.