bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5503)

* Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
* Make sure ``__spec__.origin` matches ``__file__`` for namespace packages.

https://bugs.python.org/issue32303
https://bugs.python.org/issue32305
(cherry picked from commit bbbcf8693b876daae4469765aa62f8924f39a7d2)

Co-authored-by: Barry Warsaw <barry@python.org>
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 5fa1d7d..c80f460 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -1291,7 +1291,7 @@
    Name of the place from which the module is loaded, e.g. "builtin" for
    built-in modules and the filename for modules loaded from source.
    Normally "origin" should be set, but it may be ``None`` (the default)
-   which indicates it is unspecified.
+   which indicates it is unspecified (e.g. for namespace packages).
 
    .. attribute:: submodule_search_locations