[Python-checkins] r78504 - peps/trunk/pep-3147.txt
barry.warsaw
python-checkins at python.org
Sat Feb 27 17:51:30 CET 2010
Author: barry.warsaw
Date: Sat Feb 27 17:51:29 2010
New Revision: 78504
Log:
fixes given by Glenn Linderman
Modified:
peps/trunk/pep-3147.txt
Modified: peps/trunk/pep-3147.txt
==============================================================================
--- peps/trunk/pep-3147.txt (original)
+++ peps/trunk/pep-3147.txt Sat Feb 27 17:51:29 2010
@@ -128,7 +128,7 @@
following layout::
alpha/
- __pycache__
+ __pycache__/
__init__.cpython-32.pyc
one.cpython-32.pyc
two.cpython-32.pyc
@@ -136,7 +136,7 @@
one.py
two.py
beta/
- __pycache__
+ __pycache__/
__init__.cpython-32.pyc
three.cpython-32.pyc
four.cpython-32.pyc
@@ -149,7 +149,7 @@
system would look like this::
alpha/
- __pycache__
+ __pycache__/
__init__.cpython-32.pyc
__init__.cpython-33.pyc
__init__.unladen-10.pyc
@@ -163,7 +163,7 @@
one.py
two.py
beta/
- __pycache__
+ __pycache__/
__init__.cpython-32.pyc
__init__.cpython-33.pyc
__init__.unladen-10.pyc
@@ -186,12 +186,12 @@
show something like this::
alpha/
- __pycache__
+ __pycache__/
__init__.py
one.py
two.py
beta/
- __pycache__
+ __pycache__/
__init__.py
three.py
four.py
@@ -233,20 +233,21 @@
it reads the byte code and continues as usual.
-Case 3: __pycache__/foo.pyc with no source
+Case 3: __pycache__/foo.<magic>.pyc with no source
------------------------------------------
It's possible that the `foo.py` file somehow got removed, while
leaving the cached pyc file still on the file system. If the
-`__pycache__/foo.pyc` file exists, but the `foo.py` file used to
-create it does not, Python will raise an `ImportError` when asked to
-import foo. In other words, by default, Python will not support
+`__pycache__/foo.<magic>.pyc` file exists, but the `foo.py` file used
+to create it does not, Python will raise an `ImportError` when asked
+to import foo. In other words, by default, Python will not support
importing a module unless the source file exists.
Python users who want to deploy sourceless imports are instructed to
create a custom importer that supports this behavior. Options include
importing pycs from a zip file, or locating pyc files where the py
-source file would have existed.
+source file would have existed. (See the Open Issues section for more
+discussion.)
Case 4: legacy pyc files
More information about the Python-checkins
mailing list