Kaydet (Commit) 6061000d authored tarafından Nick Coghlan's avatar Nick Coghlan

Update the pkgutil porting section in What's New. This should cause…

Update the pkgutil porting section in What's New. This should cause significantly fewer problems after today's updates
üst 9deaa06f
...@@ -1731,11 +1731,13 @@ Porting Python code ...@@ -1731,11 +1731,13 @@ Porting Python code
both the modification time and size of the source file the bytecode file was both the modification time and size of the source file the bytecode file was
compiled from. compiled from.
* :func:`pkgutil.iter_modules` and :func:`pkgutil.walk_packages` no longer work * :mod:`pkgutil` has been converted to use :mod:`importlib` internally. This
with modules imported using the default import system. Both functions have eliminates many edge cases where the old behaviour of the PEP 302 import
always relied on a non-standard method (``iter_modules()``) to be defined on emulation failed to match the behaviour of the real import system. The
loaders to work and the import system now always provides a loader for import emulation itself is still present, but is now deprecated. The
modules but does not implement the non-standard method. :func:`pkgutil.iter_importers` and :func:`pkgutil.walk_packages` functions
special case the standard import hooks so they are still supported even
though they do not provide the non-standard ``iter_modules()`` method.
Porting C code Porting C code
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment