[Python-Dev] Any PEP about 2.6 -> 3000 code transition? (original) (raw)
Jesus Cea jcea at jcea.es
Mon Jul 21 11:48:05 CEST 2008
- Previous message: [Python-Dev] Any PEP about 2.6 -> 3000 code transition?
- Next message: [Python-Dev] Any PEP about 2.6 -> 3000 code transition?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Lennart Regebro wrote: | On Mon, Jul 21, 2008 at 11:06, Jesus Cea <jcea at jcea.es> wrote: |> I'm VERY interested in 2.6->3.0 migration guide for C module |> extensions. 3.0 is around the corner and the API is changing almost |> daily :-p. || It would be great if python-incompatibility would have examples of the | C-api changes as well. That would really help in migrating and writing | a migration guide. It would be great if you could help with this!
I can comment about some issues I had this weekend.
Remember that my intention is to keep a single C codebase for 2.6 and 3.0.
Int/Long integration. In Python 3.0 "PyInt_*" has vanished. But using "PyLong_*" in Python 2.x surfaces so many issues that I have decided to define "NUMBER_*" macros to be conditionally expanded to "PyInt"/"PyLong" when compiling to 2.x/3.0. Not nice, but I can't see a better way.
The module initialization has changed completely. In fact I am fighting this, still. Some help needed.
"Py_FindMember" was eliminated ?last week?. I workaround this, but I don't know really how to write a "smart" getattr function now. Any pointer?
At least my current code compiles under 3.0, but it still bombs when importing it.
Life sucks.
PS: I'm learning the hard way, doing "diff" between 2.6 and 3.0 module sourcecode. It must be a better way!.
Jesus Cea Avion // /// /// jcea at jcea.es - http://www.jcea.es/ // // // // // jabber / xmpp:jcea at jabber.org // // ///// . // // // // // "Things are not so easy" // // // // // // "My name is Dump, Core Dump" /// //_/ // // "El amor es poner tu felicidad en la felicidad de otro" - Leibniz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQCVAwUBSIRbTplgi5GaxT1NAQJTBAP/cHndbYfnpNF+UoJP0vswoJrMtrNRu6F4 TAAMGbv4sfE5a308sfjoXxFuvUA8kXAyqdJCMXlNWDfX6CEsozQwoS06d6HNkkZn k9iGEbjwiWVdcw0y6gXvt9rL+klK004Rg4pUHMYtO3yUbaFSqvCI1kox6Rf1Q4dB 3CywJ2/fAu4= =V42Q -----END PGP SIGNATURE-----
- Previous message: [Python-Dev] Any PEP about 2.6 -> 3000 code transition?
- Next message: [Python-Dev] Any PEP about 2.6 -> 3000 code transition?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]