From a79dfcd0274298d80f7512bfd713c18b386b43ce Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Tue, 25 Feb 2020 11:39:51 -0600 Subject: [PATCH] Enable importing winreg in importlib._boostrap_external --- Lib/importlib/_bootstrap_external.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index 18eb43f2a..d60cb7691 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -1605,8 +1605,7 @@ def _setup(_bootstrap_module): setattr(self_module, '_weakref', weakref_module) # Directly load the winreg module (needed during bootstrap). - # XXX RustPython TODO: winreg module - if builtin_os == 'nt' and False: + if builtin_os == 'nt': winreg_module = _bootstrap._builtin_from_name('winreg') setattr(self_module, '_winreg', winreg_module)