[Python-3000] PEP 3121 implemented

"Martin v. Löwis" martin at v.loewis.de
Tue Jun 10 06:16:26 CEST 2008


I just finished a PEP 3121 implementation, uploaded at

http://codereview.appspot.com/1962

It contains all the API changes proposed in the PEP,
and updates all modules to conform to a minimal level
of the API. I'd like to commit the change later today,
so that it still makes the first beta.

There is more that can be done about using the API, i.e.
changing modules to actually stop keeping global variables,
so that proper garbage collection and separation of
interpreters becomes possible. I'll look into changing
some modules after the beta, but I expect that this will
evolve throughout the entire 3.x series. At a minimum,
xxmodule will be rewritten to work as a sample of how
this is supposed to be used.

In modifying all the modules, I found that an intermediary
mode supporting the 2.x semantics of importing an extension
several times is still necessary. So I changed the spec
to let modules indicate that they continue to assume that
model (i.e. fixupextensions, and making a copy of the
module dict on first import for reuse in later imports).

Regards,
Martin


More information about the Python-3000 mailing list