mirror of
https://github.com/python/cpython.git
synced 2025-11-11 06:39:54 +00:00
Broke the zipimport/PEP 302 news item into two separate items.
This commit is contained in:
parent
f8b6de168b
commit
01875ebaec
1 changed files with 12 additions and 9 deletions
21
Misc/NEWS
21
Misc/NEWS
|
|
@ -79,18 +79,21 @@ Core and builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
- Import from zipfiles is now supported. The name of a zipfile placed
|
- Import from zipfiles is now supported. The name of a zipfile placed
|
||||||
on sys.path causes the import statement to look for importable
|
on sys.path causes the import statement to look for importable Python
|
||||||
Python modules (with .py, pyc and .pyo extensions) and packages
|
modules (with .py, pyc and .pyo extensions) and packages inside the
|
||||||
inside the zipfile. To support this, several new variables have
|
zipfile. The zipfile import follows the specification (though not
|
||||||
been added to the sys module: sys.meta_path, sys.path_hooks, and
|
the sample implementation) of PEP 273. The semantics of __path__ are
|
||||||
sys.path_importer_cache; these make extending the import statement
|
|
||||||
much more convenient than overriding the __import__ built-in
|
|
||||||
function. For a description of these, see PEP 302. The zipfile
|
|
||||||
import follows the specification (though not the sample
|
|
||||||
implementation) of PEP 273. The semantics of __path__ are
|
|
||||||
compatible with those that have been implemented in Jython since
|
compatible with those that have been implemented in Jython since
|
||||||
Jython 2.1.
|
Jython 2.1.
|
||||||
|
|
||||||
|
- PEP 302 has been accepted. Although it was inititally developed to
|
||||||
|
support zipimport, it offers a new, general import hook mechanism.
|
||||||
|
Several new variables have been added to the sys module:
|
||||||
|
sys.meta_path, sys.path_hooks, and sys.path_importer_cache; these
|
||||||
|
make extending the import statement much more convenient than
|
||||||
|
overriding the __import__ built-in function. For a description of
|
||||||
|
these, see PEP 302.
|
||||||
|
|
||||||
- A frame object's f_lineno attribute can now be written to from a
|
- A frame object's f_lineno attribute can now be written to from a
|
||||||
trace function to change which line will execute next. A command to
|
trace function to change which line will execute next. A command to
|
||||||
exploit this from pdb has been added. [SF patch #643835]
|
exploit this from pdb has been added. [SF patch #643835]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue