[pypy-dev] __pycache__ folders

Christian Tismer tismer at stackless.com
Tue Jul 31 13:05:48 CEST 2012

On 31.07.12 12:35, Stefano Rivera wrote:
> Hi Armin (2012.07.31_12:10:01_+0200)
>> I think that PyPy shouldn't do that, because CPython doesn't.  If
>> Debian/Ubuntu also hacked CPython to do that, then fine; we are then
>> free to point users to them (blame them?) for issues :-)
> We did seriously consider hacking cpython to do that, before introducing
> 2.7. But by that point, there was no real benefit, as 2.7 is the last of
> the 2.x series.
> https://lists.debian.org/debian-python/2010/04/msg00046.html
> I did it for pypy, as I thought it fairly likely that there would be a
> benefit (there's no guarantee that pypy's bytecode format won't change
> between pypy releases).
> Only very esoteric code would break as a result of this change.
> PyPy already has slightly different .pyc semantics to cpython, and has
> PEP3149, a vaguely similar change, for C extensions.
> It's worth stating that I did ask if there was any objection to the
> patches I was applying, more than once, before the first upload to
> Debian, and received none. The general opinion seemed to be that .pyc
> files aren't liked much in the pypy community, at all, and this was
> vaguely inline

Well, good to know.

Your backport makes sense, but the reasoning should be identical
between cpython and pypy.
If cpython does not do it, pypy does not do it.

The bytecode compatibility is also identical between cpython and pypy,
there is no issue here that is not there.

pypy currently shows itself as python 2.7.2, and that is the truth.
Different behavior introduced by a distribution is IMHO not a
benefit, but goes into an incompatible direction.

If a backport happens, then in CPython, and PyPy will adjusted, accordingly.
One of the incompatibility issues _is_ the unexpected behavior of tests.

To Marcus:
Now that the issue is clear, it probably makes sense to add some extra check
to setup.py that does not inquire the python version but does some probing.
Better to be defensive ;-)

cheers - chris

Christian Tismer             :^)   <mailto:tismer at stackless.com>
Software Consulting          :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776  fax +49 (30) 700143-0023
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/

More information about the pypy-dev mailing list