[pypy-dev] Changing the default magic number

Maciej Fijalkowski fijall at gmail.com
Thu Jul 10 09:24:34 CEST 2008

Magic in pyc files and magic as a number for pyopcode are different things IMO.

On Wed, Jul 9, 2008 at 2:30 PM, Carl Friedrich Bolz <cfbolz at gmx.de> wrote:
> Hi Armin,
> Armin Rigo wrote:
>> On Mon, Jul 07, 2008 at 11:31:36AM -0300, Bruno Gola wrote:
>>> I'm writing code to support the new 2.5 generator stuff (PEP 342) and
>>> while working on that I found a code that verifies the magic number
>>> (in pyframe.py). The default magic in PyPy is the Python2.4 one,
>>> chatting with Carl we thought it's probably a good time to change it
>>> to the 2.5 value, as we are supporting Python 2.5.
>> The important thing here is the opcodes that changed their semantics
>> between 2.4 and 2.5.  There is the YIELD opcode which is probably the
>> one that you're referring to; in 2.5 it pushes a result on the value
>> stack, but in 2.4 it didn't.  There is also one of the IMPORT opcodes,
>> which pops one more argument from the stack in 2.5.  So the magic
>> version number in PyPy should be changed to 2.5's at the same time as
>> these two opcodes change their semantics in PyPy's compiler and in
>> pyopcode.py.
> I had the impression that we use a PyPy-specific magic number anyway, in
> which case it doesn't matter that we change the magic only when all the
> new opcode semantics are fixed. Is that wrong?
> Have fun at the sprint!
> Carl Friedrich
> _______________________________________________
> pypy-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/pypy-dev

More information about the Pypy-dev mailing list