]> granicus.if.org Git - python/commitdiff
whatsnew: -m <namespace package>, plus 'using' doc updates.
authorR David Murray <rdmurray@bitdance.com>
Sun, 2 Feb 2014 17:19:57 +0000 (12:19 -0500)
committerR David Murray <rdmurray@bitdance.com>
Sun, 2 Feb 2014 17:19:57 +0000 (12:19 -0500)
Doc/using/cmdline.rst
Doc/whatsnew/3.4.rst

index d1822fb2da62defa89a81347e85232c69e294eca..4807a3688c4322588359eefa51d91af4a0e4ec57 100644 (file)
@@ -81,7 +81,8 @@ source.
    the implementation may not always enforce this (e.g. it may allow you to
    use a name that includes a hyphen).
 
-   Package names are also permitted. When a package name is supplied instead
+   Package names (including namespace packages) are also permitted. When a
+   package name is supplied instead
    of a normal module, the interpreter will execute ``<pkg>.__main__`` as
    the main module. This behaviour is deliberately similar to the handling
    of directories and zipfiles that are passed to the interpreter as the
@@ -115,6 +116,9 @@ source.
    .. versionchanged:: 3.1
       Supply the package name to run a ``__main__`` submodule.
 
+   .. versionchanged:: 3.4
+      namespace packages are also supported
+
 
 .. describe:: -
 
index 1d285fe0f15e9e775f09c03ccaae2bc6d5c9585f..9a6afe5efec15cafe3989736d1ceadc29fb8e929 100644 (file)
@@ -789,6 +789,11 @@ and :func:`~importlib.util.source_from_cache` replace the same-named functions
 in the deprecated :mod:`imp` module.  (Contributed by Brett Cannon in
 :issue:`18194`.)
 
+The :mod:`importlib` bootstrap :class:`.NamespaceLoader` now conforms to
+the :class:`.InspectLoader` ABC, which means that ``runpy`` and
+``python -m`` can now be used with namespace packages.  (Contributed
+by Brett Cannon in :issue:`18058`.)
+
 
 inspect
 -------
@@ -1380,6 +1385,8 @@ Other Improvements
   :func:`sys.getallocatedblocks()`.  (Contributed by Antoine Pitrou in
   :issue:`13390`).
 
+* ``python -m`` now works with namespace packages.
+
 
 
 Significant Optimizations