summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-05-28 22:35:54 (GMT)
committerBrett Cannon <brett@python.org>2013-05-28 22:35:54 (GMT)
commit3dc48d6f6937f110388efd0f257fa12c323763a6 (patch)
tree58de10b0ae6755796ce557ea2f11941a3de02073 /Doc/whatsnew
parenta22faca7144bdba5269e309965d926d155fc667b (diff)
downloadcpython-3dc48d6f6937f110388efd0f257fa12c323763a6.zip
cpython-3dc48d6f6937f110388efd0f257fa12c323763a6.tar.gz
cpython-3dc48d6f6937f110388efd0f257fa12c323763a6.tar.bz2
Issue #18070: importlib.util.module_for_loader() now sets __loader__
and __package__ unconditionally in order to do the right thing for reloading.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.4.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index c6b1645..cca8b93 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -250,4 +250,9 @@ that may require changes to your code.
* The module type now initializes the :attr:`__package__` and :attr:`__loader__`
attributes to ``None`` by default. To determine if these attributes were set
in a backwards-compatible fashion, use e.g.
- ``getattr(module, '__loader__', None) is not None``. \ No newline at end of file
+ ``getattr(module, '__loader__', None) is not None``.
+
+* :meth:`importlib.util.module_for_loader` now sets ``__loader__`` and
+ ``__package__`` unconditionally to properly support reloading. If this is not
+ desired then you will need to set these attributes manually. You can use
+ :class:`importlib.util.ModuleManager` for module management.