diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-03-03 13:56:43 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-03-03 13:56:43 (GMT) |
commit | 04edfdf320723c4b372ee919365e29ef9f9e19c1 (patch) | |
tree | a82194560c70dd0653fdc53b1acabbb70bf92aa1 | |
parent | 66902edf23e885866a0bc5f808909bf32fb84bb0 (diff) | |
download | cpython-04edfdf320723c4b372ee919365e29ef9f9e19c1.zip cpython-04edfdf320723c4b372ee919365e29ef9f9e19c1.tar.gz cpython-04edfdf320723c4b372ee919365e29ef9f9e19c1.tar.bz2 |
whatsnew: tweak a couple importlib porting notes.
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.
-rw-r--r-- | Doc/whatsnew/3.4.rst | 15 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 91f9362..8e8ce34 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -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`). @@ -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 ------------- |