On Fri, Feb 26, 2010 at 16:58, Ian Bicking <ianb@colorstudy.com> wrote:
The one issue I thought would be resolved by not easily allowing
.pyc-only distributions is the case when you rename a file (say
module.py to newmodule.py) and there is a module.pyc laying around,
and you don't get the ImportError you would expect from "import
module" -- and to make it worse everything basically works, except
there's two versions of the module that slowly become different.

Yes, that problem would go away if bytecode-only modules were no longer supported.
 
 This
regularly causes problems for me, and those problems would get more
common and obscure if the pyc files were stashed away in a more
invisible location.


That has never been an issue with this proposal. The bytecode pulled from the __pycache__ directory only occurs if source exists. What we have been discussing is whether bytecode-only files in the directory of a package or something exists.

-Brett

 
I can't even tell what the current proposal is; maybe this is
resolved?  If distributing bytecode required renaming pyc files to .py
as Glenn suggested that would resolve the problem quite nicely from my
perspective.  (Frankly I find the whole use case for distributing
bytecodes a bit specious, but whatever.)

--
Ian Bicking  |  http://blog.ianbicking.org  |  http://twitter.com/ianbicking