Issue #25791: Raise an ImportWarning when __spec__ or __package__ are
not defined for a relative import.
This is the start of work to try and clean up import semantics to rely
more on a module's spec than on the myriad attributes that get set on
a module. Thanks to Rose Ames for the patch.
diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst
index 2144c1f..a162851 100644
--- a/Doc/reference/import.rst
+++ b/Doc/reference/import.rst
@@ -554,7 +554,8 @@
details.
This attribute is used instead of ``__name__`` to calculate explicit
- relative imports for main modules, as defined in :pep:`366`.
+ relative imports for main modules -- as defined in :pep:`366` --
+ when ``__spec__`` is not defined.
.. attribute:: __spec__