When the globals argument to importlib.__import__() contained any value for
__package__, it was used. This was incorrect since it could be set to None to
represent the fact that a proper value was unknown. Now None will trigger the
calculation for __package__.
Discovered when running importlib against test_importhooks.
diff --git a/Misc/NEWS b/Misc/NEWS
index 6f73e73..608e9a8 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -68,6 +68,9 @@
Library
-------
+- When the globals past to importlib.__import__() has __package__ set to None,
+ fall back to computing what __package__ should be instead of giving up.
+
- Raise a TypeError when the name of a module to be imported for
importlib.__import__ is not a string (was raising an
AttributeError before).