Issue #17117: Have both import itself and importlib.util.set_loader()
set __loader__ on a module when set to None.

Thanks to Gökcen Eraslan for the fix.
diff --git a/Misc/ACKS b/Misc/ACKS
index 78c62ee..8758297 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -339,6 +339,7 @@
 Jeff Epler
 Jeff McNeil
 Tom Epperly
+Gökcen Eraslan
 Stoffel Erasmus
 Jürgen A. Erhard
 Michael Ernst
diff --git a/Misc/NEWS b/Misc/NEWS
index ddb39d4..06e2232 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@
 Core and Builtins
 -----------------
 
+- Issue #17117: Import and @importlib.util.set_loader now set __loader__ when
+  it has a value of None or the attribute doesn't exist.
+
 - Issue #17327: Add PyDict_SetDefault.
 
 - Issue #17032: The "global" in the "NameError: global name 'x' is not defined"