Barry Warsaw
2012-04-27 15:38:22 UTC
Someone is trying to build gdb 7.4 with Python 3 and hit a problem with
Py_TPFLAGS_HAVE_ITER. PEP 234 describes this flag, which no longer exists in
Python 3. python3porting.com has precious little to say about Py_TPFLAGS
changes in Python 3.
When I did the dbus-python port, I found that Py_TPFLAGS_HAVE_WEAKREFS is both
unnecessary and undefined in Python 3. Unfortunately, if you're going to
support both Python 2 and 3 with the same C code, you'll need to #ifdef that
away (since it's still required in Python 2).
My guess is that HAVE_ITER falls under the same recommendation, but I'm
looking for verification. For now, I've added this to
https://wiki.ubuntu.com/Python/3
Cheers,
-Barry
Py_TPFLAGS_HAVE_ITER. PEP 234 describes this flag, which no longer exists in
Python 3. python3porting.com has precious little to say about Py_TPFLAGS
changes in Python 3.
When I did the dbus-python port, I found that Py_TPFLAGS_HAVE_WEAKREFS is both
unnecessary and undefined in Python 3. Unfortunately, if you're going to
support both Python 2 and 3 with the same C code, you'll need to #ifdef that
away (since it's still required in Python 2).
My guess is that HAVE_ITER falls under the same recommendation, but I'm
looking for verification. For now, I've added this to
https://wiki.ubuntu.com/Python/3
Cheers,
-Barry