[Python-checkins] cpython: whatsnew: -m <namespace package>, plus 'using' doc updates.
r.david.murray
python-checkins at python.org
Sun Feb 2 18:53:15 CET 2014
http://hg.python.org/cpython/rev/28ae009435b0
changeset: 88898:28ae009435b0
user: R David Murray <rdmurray at bitdance.com>
date: Sun Feb 02 12:19:57 2014 -0500
summary:
whatsnew: -m <namespace package>, plus 'using' doc updates.
files:
Doc/using/cmdline.rst | 6 +++++-
Doc/whatsnew/3.4.rst | 7 +++++++
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -81,7 +81,8 @@
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 @@
.. versionchanged:: 3.1
Supply the package name to run a ``__main__`` submodule.
+ .. versionchanged:: 3.4
+ namespace packages are also supported
+
.. describe:: -
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -789,6 +789,11 @@
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 @@
:func:`sys.getallocatedblocks()`. (Contributed by Antoine Pitrou in
:issue:`13390`).
+* ``python -m`` now works with namespace packages.
+
Significant Optimizations
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list