[Python-Dev] DRAFT: python-dev summary for 2006-03-16 to 2006-03-31

Steven Bethard steven.bethard at gmail.com
Sun May 28 19:51:13 CEST 2006

Sorry I'm so far behind -- I'm aiming to get mostly caught up this
week.  Please read through the summary if you have the time and send
me any comments or corrections.



Python 2.5 schedule

Python 2.5 is moving forward along its release schedule.  A few issues
still remain; check `PEP 356`_ for details.

.. _PEP 356: http://www.python.org/dev/peps/pep-0356/

Contributing thread:

- `Python 2.5 Schedule

Python 3000 gets its own list

Serious work on Python 3000 has started now, with a new `python-3000
mailing list`_ for general discussion, and a `python-3000-checkins
mailing list`_ for checkins to the p3yk branch.  Right now, Guido
wants patches to focus mainly on ripping out old code (e.g. classic
classes) and wants the discussion to focus primarily on formalizing
the processes for introducing Python 3000.

Note that processes is what's important right now

.. _python-3000 mailing list:
.. _python-3000-checkins mailing list:

Contributing threads:

- `Python 3000 Process
- `svn checkins are now split
- `Discussing the Great Library Reorganization

Buildbot warnings redirected to python-checkins

The buildbot warnings, which for a short time this month appeared on
python-dev, have been redirected to the python-checkins list.

Contributing thread:

- `[Fwd: buildbot warnings in amd64 gentoo trunk]

Checkins that change behavior must be accompanied by tests

Though it's always been good practice to check in a test with any
behavior-changing patch, Neal Norwitz has requested extra care in this
area as we approach the release of Python 2.5.  From this point on,
*any* checkin that could change behavior should be accompanied by a
corresponding test.

Contributing thread:

- `improving quality

Email 4.0 merged into Python 2.5 trunk

Barry Warsaw has merged the Email 4.0 package into the Python 2.5
trunk. There's a minor incompatibility in that email.Parser is now a
placeholder object instead of a module, but this should not affect the
vast majority of users.

Contributing thread:

- `Merging email 4.0 to Python 2.5 svn trunk

Python 2.4.3 released

`Python 2.4.3`_ was released on March 30th. This fixes over 50 bugs in
Python 2.4.2, so now's the time to upgrade.

.. _Python 2.4.3: http://www.python.org/2.4.3/

Contributing threads:

- `release24-maint FREEZE for 2.4.3c1, this Thursday
- `RELEASED Python 2.4.3, release candidate 1
- `release24-maint unfrozen, kinda
- `BRANCH release24-maint FREEZE from 00:00 UTC on Wednesday 29th
- `RELEASED Python 2.4.3, final.


Including pysqlite in the stdlib

Anthony Baxter asked if folks were still interested in including
pysqlite_ in Python 2.5 and got a pretty positive response. Gerhard
Häring said he could release pysqlite 2.2 and then merge that into
Python SVN trunk.  In the future, he agreed to synchronize stable
changes in the standalone release with the Python core sqlite module.
Accompanying these agreements was a long discussion about the pros and
cons of including pysqlite, and of course an endless debate about what
the new module should be named.  In the end, Guido approved the
inclusion of pysqlite, and it was given the name sqlite3.

.. _pysqlite: http://initd.org/tracker/pysqlite/

Contributing thread:

- `pysqlite for 2.5?

Choosing a new tracker system

After Guido noticed that SourceForge had stopped sending him emails
when a patch was assigned to him, a number of people took up a
discussion about how to replace the SourceForge tracker system. There
was already an existing PSF committee in charge of finding such a
replacement, and they were considering roundup_, trac_ and jira_,
though Bugzilla_ and RT_ had already been vetoed.  There was already
an instance of roundup running on python.org, and Python-Hosting and
Atlassian had existing offers to host Python on Trac and Jira
(respectively).  There was some discussion about setting up one of
these for Python 3000, but Guido thought it was too early for this.

Getting the data out of SourceForge seemed to be the current sticking
point, and so Fredrik Lundh wrote up `some tools`_ to do this and
posted the results to http://effbot.org/tracker-20060403.zip.  The
discussion was then moved to the `infrastructure list`_.

.. _bugzilla: http://www.bugzilla.org/
.. _jira: http://www.atlassian.com/software/jira/
.. _roundup: http://roundup.sourceforge.net/
.. _rt: http://www.bestpractical.com/rt/
.. _trac: http://www.edgewall.com/trac/
.. _python-hosting: http://www.python-hosting.com/freetrac
.. _some tools:
.. _infrastructure list: http://mail.python.org/mailman/listinfo/infrastructure/

Contributing threads:

- `I'm not getting email from SF when assigned a bug/patch

The C-level set API

Barry Warsaw wanted to add PySet_Clear(), PySet_Update() and
PySet_Next() to the C-level set API. Raymond Hettinger objected,
saying that this functionality was already available through
PyObject_CallMethod(s, "clear", NULL), PyObject_CallMethod(s,
"update", "O", iterable) and PyObject_GetIter(s) respectively (with
the last being notably safer too).  Barry said that he was hoping to
get some static compiler checks and easier debugging that would be
lost by using PyObject_CallMethod, and to get some speedups over
PyObject_GetIter() in the same way that PyDict_Next() had.
Eventually, Raymond agreed to adding PySet_Clear() to the public API
and to adding _PySet_Next() and _PySet_Update() to the private API.

Contributing threads:

- `PySet API <http://mail.python.org/pipermail/python-dev/2006-March/062601.html>`__
- `PySet_Next (Was: PySet API)

Class decorators

Greg Ewing suggested a use-case for class decorators that could not be
easily addressed with metaclasses: adding a class (but not its
subclasses) to a registry.  After Phillip J. Eby explained the hack
that PyProtocols currently uses to make something like class
decorators available, Guido suggested that someone write a PEP to add
class decorators to Python 2.6.  There was some discussion about
moving decorators for classes inside the class for readability
reasons, but Guido felt like this was too magical.  No PEP had yet
been produced at the time of this summary.

Contributing thread:

- `Class decorators

Python 3.0: Exception hierarchy issues

A question from Nick Coghlan about where the new GeneratorExit
exception should be placed sparked a new discussion about how the
exception hierarchy should look.  Barry Warsaw suggested that
Exception should be at the top of the hierarchy with
KeyboardInterrupt, GeneratorExit, SystemExit, StopIteration, Error and
Warning being the next level down.  All user defined errors would
inherit from Error.  People seemed to like this idea, but it would
break backwards compatibility as users have been told for a while that
their exceptions should derive from Exception, not Error.  Guido voted
for keeping the `PEP 352`_ semantics (with BaseException at the top of
the hierarchy).

Barry promised to address the hierarchy issue again on the Python 3000 list.

.. _PEP 352: http://www.python.org/dev/peps/pep-0352/

Contributing thread:

- `GeneratorExit inheriting from Exception

Python 3.0: Exception statement

Greg Ewing asked if the except clause in Python 3.0 could be changed to::

    except <type-or-tuple> as <value>:

instead of the current::

    except <type-or-tuple>, <value>:

which can result in confusing behavior when you accidentally write::

    except TypeError, ValueError:

and have your TypeError instance bound to the name ValueError. Guido
approved the proposal, and then the discussion veered off into the
usual syntax debate, this time about whether to use "with" instead,
whether to use commas or "or"s between the exception types, and
whether or not to require parentheses around multiple types. Guido
reiterated his support for the original proposal and shortly
afterwards, the thread died.

Contributing thread:

- `Py3k: Except clause syntax

Adding an N-dimensional array interface to Python

Travis E. Oliphant asked about including Numpy's `N-dimensional array
interface`_ in Python core by adding a __array_struct__ member to
array.array that looks like::

    typedef struct {
        int version;          /* contains the integer 2 as a sanity check */
        int nd;               /* number of dimensions */
        char typekind;        /* kind in array --- character code of typestr */
        int itemsize;         /* size of each element */
        int flags;            /* flags indicating how the data should
be interpreted */
        Py_intptr_t *shape;   /* A length-nd array of shape information */
        Py_intptr_t *strides; /* A length-nd array of stride information */
        void *data;           /* A pointer to the first element of the array */
    } PyArrayInterface;

This struct is basically unchanged over Numpy's last 10 years of
evolution and Travis was hoping to finally get the interface blessed
by official inclusion in Python so that PIL, PyVox, WxPython,
PyOpenGL, etc. could all start using the same interface.  Guido asked
for a PEP, but no one seemed to feel comfortable taking the array
interface definition and producing a PEP out of it.

.. _N-dimensional array interface: http://numeric.scipy.org/array_interface.html

Contributing thread:

- `Expose the array interface in Python 2.5?

Inconsistent behavior between += and .__iadd__()

Travis Oliphant noticed that ``a.__iadd__(b)`` and ``a += b``
currently do different things depending on the type of their

    a = range(5)
    b = numpy.arange(5)
    assert a == [0, 1, 2, 3, 4, 0, 1, 2, 3, 4]

    a = range(5)
    b = numpy.arange(5)
    a += b
    assert a == numpy.array([0, 2, 4, 6, 8])

This apparently occurs because PyNumber_InPlaceAdd coerces ``a`` into
a numeric type (a numpy.array object) before trying
PySequence_InPlaceConcat.  Guido suggested that += (and \*=) should
check both the numeric and sequence slots before trying to coerce
either arguments.  Armin Rigo pointed out that this fix would require
that ``listobject.__add__(intobject)`` would have to return
NotImplemented instead of immediately raising an exception, but
promised to provide the fix when he could.

Contributing thread:

- `INPLACE_ADD and INPLACE_MULTIPLY oddities in ceval.c

Supported platforms

A couple different threads asked about which of the lesser-known
platforms Python is supported on.  Andrew MacIntyre verified that OS/2
is still being supported, Donn Cave and Francois Revol maintain the
BeOS (a.k.a. Zeta OS) port, and Ralf W. Grosse-Kunstleve promised to
make Tru64 machines available for testing Python if people needed

Contributing threads:

- `supported platforms OS2?
- `r43214 - peps/trunk/pep-3000.txt
- `[Fwd: Re: r43214 - peps/trunk/pep-3000.txt]

Definition of sys.executable

Fredrik Lundh pointed out that when Python is embedded, the
documentation for sys.executable seems suggest that it should be
pointed to the executable used to start the program, not Python
itself.  Since this executable is no longer Python, you can no longer
run sys.executable to start another Python instance.  At least py2exe
and PyXPCOM both depend on the current behavior, so the implementation
can't be changed.  Fredrik suggested adding sys.python_executable so
that Python code would always be able to start another Python
instance, even when embedded, but the discussion concluded without any
final decisions.

Contributing thread:

- `towards a stricter definition of sys.executable

Location of modules for multi-architecture platforms

Neal Becker reported that on x86_64, the Twisted package gets split
between an architecture independent directory and an architecture
dependent one, and so when Python searches for the package, it finds
only the first part of the installation. There was then some
discussion about how multi-architecture platforms should be properly
supported.  The conclusion seemed to be that the package should not be
split; instead two versions of the package, one for each architecture,
should be installed to two different directories.  But Martin v. Löwis
indicated that if anyone thought they knew better how this should
work, he would accept patches.

Contributing thread:

- `Problem with module loading on multi-arch?

PEP 299: rejected

Guido rejected `PEP 299`_, which would have encouraged the definition
of a module-level __main__() function instead of the current::

    if __name__ == '__main__':

The rejection came after it was clear that writing code to work both
before and after the PEP was going to be difficult, that ``import
__main__`` would have started raising TypeErrors, and that the
proposal didn't particularly gain much over the status quo.

.. _PEP 299: http://www.python.org/dev/peps/pep-0299/

Contributing thread:

- `What about PEP 299?

String exceptions in generator.throw()

In its implementation at the time, `PEP 342`_'s throw method on
generators did not support string exceptions.  Phillip J. Eby wanted
to add support for them, but suggested that string exceptions only be
allowed if accompanied by a traceback so that string exceptions could
only be passed on, not created.  Guido indicated that he'd rather keep
things simple and just allow string exceptions regardless of the
presence of a traceback.

.. _PEP 342: http://www.python.org/dev/peps/pep-0342/

Contributing thread:

- `PEP 342 support for string exceptions in throw()

Generator memory leaks

Thomas Wouters looked into some new memory leaks with generators.
Previously, only instances of old- or new-style classes could have
__del__ methods, but with `PEP 342`_ generators gained them as well.
Tim Peters suggested that the best solution was simply to add a
special test for generators, and leave any generalizations of this
idea until they're actually needed.

Contributing threads:

- `[Python-checkins] r43358 - python/trunk/Modules/itertoolsmodule.c
- `Fwd: [Python-checkins] r43358 -

PyMem and PyObject freeing mismatches

When Python's small-object memory allocator was introduced, Python
originally supported obtaining an object through PyObject_{New,NEW}
and freeing it using any one of PyObject_{Free,FREE}, PyMem_{Del,DEL}
or PyMem_{Free,FREE}.  The hacks to support the mismatched (PyMem_*)
frees were pretty horrible, and since using such mismatched calls has
been forbidden for years, Tim Peters started ripping out the support
code.  Turns out that Python core itself had a number of mismatched
calls, but Tim decided to leave the change checked in so that these
kinds of issues could get fixed before the 2.5 release.  Adam DePrince
promised to provide a patch to identify in a debug-build when an
object was freed with a mismatched call.

Contributing thread:

- `Prevalence of low-level memory abuse?

Deferred Threads
- `reference leaks, __del__, and annotations
- `New-style icons, .desktop file

Previous Summaries
- `Still looking for volunteer to run Windows buildbot
- `Making staticmethod objects callable?
- `Switch to MS VC++ 2005 ?!
- `_bsddb.c ownership

Skipped Threads
- `[Python-checkins] r43041 - python/trunk/Modules/_ctypes/cfield.c
- `open() mode is lax
- `bytes thoughts
- `Python Library Reference top page too long
- `Weekly Python Patch/Bug Summary
- `Bug 1184112 still valid
- `Making runpy.run_module *not* thread-safe
- `Py3K thought: use external library for client-side HTTP
- `dealing with decorators hiding metadata of decorated functions
- `All green! <http://mail.python.org/pipermail/python-dev/2006-March/062551.html>`__
- `Py_ssize_t backwards compatibility
- `Patch or feature? Tix.Grid working for 2.5
- `__dict__ strangeness
- `Two buildbot slaves wedged
- `pyexpat namespace problem (Was: libbzip2 version?)
- `buildbot failure in sparc solaris10 gcc trunk
- `Test <http://mail.python.org/pipermail/python-dev/2006-March/062620.html>`__
- `Py3K timescale and stdlib philosophy (was: Re: Py3K thought:
use...) <http://mail.python.org/pipermail/python-dev/2006-March/062625.html>`__
- `Py3K timescale and stdlib philosophy
- `Long-time shy failure in test_socket_ssl
- `Bug Day? <http://mail.python.org/pipermail/python-dev/2006-March/062646.html>`__
- `Bug Day on Friday, 31st of March
- `buildbot failure in x86 W2k trunk
- `buildbot failure in x86 XP-2 trunk
- `buildbot failure in x86 XP 2.4
- `Documenting the ssize_t Python C API changes
- `r43041 - python/trunk/Modules/_ctypes/cfield.c
- `buildbot warnings in x86 gentoo trunk
- `segfaults on Mac (was Re: Long-time shy failure in
- `buildbot warnings in amd64 gentoo trunk
- `[Python-checkins] r43126 - in python/trunk: Doc/lib/libsocket.tex
Lib/socket.py Lib/test/test_socket.py Misc/NEWS Modules/socketmodule.c
- `buildbot warnings in x86 XP-2 trunk
- `buildbot warnings in g4 osx.4 trunk
- `buildbot warnings in sparc solaris10 gcc trunk
- `Building Python for AMD64 (Windows)
- `buildbot warnings in x86 W2k trunk
- `buildbot warnings in x86 XP trunk
- `Patch to add timestamp() method to datetime objects
- `test_quopri, test_wait3, and test_popen2
- `[Python-3000] Iterators for dict keys, values, and items ==
annoying :) <http://mail.python.org/pipermail/python-dev/2006-March/062787.html>`__
- `howto return malloc()ed memory from C -&gt; Python
- `PEP 343: A messy contextmanager corner case
- `Another PEP 343 contextmanager glitch
- `Pickling problems are hard to debug
- `daily releases?
- `Changing -Q to warn for 2.5?
- `TRUNK FREEZE for 2.5a1: 0000 UTC, Thursday 30th
- `refleaks in 2.4
- `Inconsistency in 2.4.3 for __repr__() returning unicode
- `Next PyPy Sprint: Tokyo 23/4 - 29/4
- `[Python-checkins] TRUNK FREEZE for 2.5a1: 0000 UTC, Thursday 30th
- `Libref sections to put new modules under?
- `[Python-checkins] Cancelled! TRUNK FREEZE for 2.5a1: 0000 UTC,
Thursday 30th <http://mail.python.org/pipermail/python-dev/2006-March/062880.html>`__
- `Error msgs for new-style division
- `Reminder: Bug Day this Friday, 31st of March
- `warnings in libffi
- `Name for python package repository
- `alpha problems -- need input
- `unicode vs buffer (array) design issue can crash interpreter
- `building sql queries in python
- `Win64 AMD64 (aka x64) binaries available64
- `_xmlplus fixup for 2.5
- `(finally) getting around to killing __private names from stdlib
- `new article - MapPoint and Python
- `xmlrpclib.binary missing?
- `Fwd: Python 2.5 update
- `2.5 trunk built for Windows available?
- `Nasty trunk test failures
- `x86 trunk MSI preview
- `[Python-checkins] Python Regression Test Failures all (1)
- `gmane.comp.python.devel.3000 has disappeared

More information about the Python-Dev mailing list