f23e374441
SourceLoader is a simplification of both PyLoader and PyPycLoader. If one only wants to use source, then they need to only implement get_data and get_filename. To also use bytecode -- sourceless loading is not supported -- then two abstract methods -- path_mtime and set_data -- need to be implemented. Compared to PyLoader and PyPycLoader, there are less abstract methods introduced and bytecode files become an optimization controlled by the ABC and hidden from the user (this need came about as PEP 3147 showed that not treating bytecode as an optimization can cause problems for compatibility). PyLoader is deprecated in favor of SourceLoader. To be compatible from Python 3.1 onwards, a subclass need only use simple methods for source_path and is_package. Otherwise conditional subclassing based on whether Python 3.1 or Python 3.2 is being is the only change. The documentation and docstring for PyLoader explain what is exactly needed. PyPycLoader is deprecated also in favor of SourceLoader. Because PEP 3147 shifted bytecode path details so much, there is no foolproof way to provide backwards-compatibility with SourceLoader. Because of this the class is simply deprecated and users should move to SourceLoader (and optionally PyLoader for Python 3.1). This does lead to a loss of support for sourceless loading unfortunately. At some point before Python 3.2 is released, SourceLoader will be moved over to importlib._bootstrap so that the core code of importlib relies on the new code instead of the old PyPycLoader code. This commit is being done now so that there is no issue in having the API in Python 3.1a1. |
||
---|---|---|
.. | ||
RPM | ||
TextMate/Python-Dev.tmbundle | ||
Vim | ||
ACKS | ||
AIX-NOTES | ||
HISTORY | ||
NEWS | ||
NEWS.help | ||
PURIFY.README | ||
Porting | ||
README | ||
README.OpenBSD | ||
README.coverity | ||
README.klocwork | ||
README.valgrind | ||
RFD | ||
SpecialBuilds.txt | ||
build.sh | ||
cheatsheet | ||
developers.txt | ||
gdbinit | ||
indent.pro | ||
maintainers.rst | ||
pymemcompat.h | ||
python-config.in | ||
python-mode.el | ||
python-wing.wpr | ||
python.man | ||
python.pc.in | ||
setuid-prog.c | ||
valgrind-python.supp | ||
vgrindefs |
README
Python Misc subdirectory ======================== This directory contains files that wouldn't fit in elsewhere. Some documents are only of historic importance. Files found here ---------------- ACKS Acknowledgements AIX-NOTES Notes for building Python on AIX build.sh Script to build and test latest Python from the repository cheatsheet Quick summary of Python by Ken Manheimer developers.txt A history of who got developer permissions, and why gdbinit Handy stuff to put in your .gdbinit file, if you use gdb HISTORY News from previous releases -- oldest last indent.pro GNU indent profile approximating my C style maintainers.txt A list of maintainers for library modules NEWS News for this release (for some meaning of "this") NEWS.help How to edit NEWS Porting Mini-FAQ on porting to new platforms PURIFY.README Information for Purify users pymemcompat.h Memory interface compatibility file. python.man UNIX man page for the python interpreter python-mode.el Emacs mode for editing Python programs python.pc.in Package configuration info template for pkg-config python-wing.wpr Wing IDE project file README The file you're reading now README.coverity Information about running Coverity's Prevent on Python README.klocwork Information about running Klocwork's K7 on Python README.OpenBSD Help for building problems on OpenBSD README.valgrind Information for Valgrind users, see valgrind-python.supp RFD Request For Discussion about a Python newsgroup RPM (Old) tools to build RPMs setuid-prog.c C helper program for set-uid Python scripts SpecialBuilds.txt Describes extra symbols you can set for debug builds TextMate A TextMate bundle for Python development valgrind-python.supp Valgrind suppression file, see README.valgrind vgrindefs Python configuration for vgrind (a generic pretty printer) Vim Python development utilities for the Vim editor