]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
whatsnew: tweak a couple importlib porting notes.
authorR David Murray <rdmurray@bitdance.com>
Mon, 3 Mar 2014 13:56:43 +0000 (08:56 -0500)
committerR David Murray <rdmurray@bitdance.com>
Mon, 3 Mar 2014 13:56:43 +0000 (08:56 -0500)
I had missed that there was already an entry for the Frozen package change, so
I combined mine with the existing one.  Also added the info about the reload
change to the entry for the other changes to reload, but I'm missing an issue
number for the rest of the attribute behavior changes so I left myself an
XXX as a reminder to find it.

Doc/whatsnew/3.4.rst
Misc/NEWS

index 91f9362d5072e5100b3bf207c6888509542c69a5..8e8ce34c31966d5a7482ffd0fbe04eda698ed64f 100644 (file)
@@ -1883,10 +1883,15 @@ Changes in the Python API
 
 * Import now resets relevant attributes (e.g. ``__name__``, ``__loader__``,
   ``__package__``, ``__file__``, ``__cached__``) unconditionally when reloading.
+  Note that this restores a pre-3.3 behavior in that it means a module is
+  re-found when re-loaded (:issue:`19413` and XXX).
 
 * Frozen packages no longer set ``__path__`` to a list containing the package
-  name but an empty list instead. Determing if a module is a package should be
-  done using ``hasattr(module, '__path__')``.
+  name, they now set it to an empty list.  The previous behavior could cause
+  the import system to do the wrong thing on submodule imports if there was
+  also a directory with the same name as the frozen package.  The correct way
+  to determine if a module is a package or not is to use``hasattr(module,
+  '__path__')`` (:issue:`18065`).
 
 * :func:`py_compile.compile` now raises :exc:`FileExistsError` if the file path
   it would write to is a symlink or a non-regular file. This is to act as a
@@ -1984,12 +1989,6 @@ Changes in the Python API
   similarly to ``__kwdefaults__``. (Contributed by Yury Selivanov in
   :issue:`20625`).
 
-* Frozen packages used to have their ``__path__`` set to the package name,
-  but this could cause the import system to do the wrong thing on submodule
-  imports if there was also a directory with the same name as the frozen
-  package.  The ``__path__`` for frozen packages is now set to ``[]``
-  (:issue:`18065`).
-
 * :attr:`hashlib.hash.name` now always returns the identifier in lower case.
   Previously some builtin hashes had uppercase names, but now that it is a
   formal public interface the naming has been made consistent (:issue:`18532`).
index 1b6516f6833133f69783ab1ef45c07f409628225..37628d633f6cbf7a02b261f39670e89e597c4471 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1463,7 +1463,7 @@ Tests
 
 - Issue #19085: Added basic tests for all tkinter widget options.
 
-- Issue 19384: Fix test_py_compile for root user, patch by Claudiu Popa.
+- Issue #19384: Fix test_py_compile for root user, patch by Claudiu Popa.
 
 Documentation
 -------------