python-dev Summary for 2004-09-01 through 2004-09-15
This is a summary of traffic on the `python-dev mailing list`_ from September
01, 2004 through September 15, 2004. It is intended to inform the wider Python
community of on-going developments on the list. To comment on anything
mentioned here, just post to `comp.lang.python`_ (or email
python-list(a)python.org which is a gateway to the newsgroup) with a subject line
mentioning what you are discussing. All python-dev members are interested in
seeing ideas discussed by the community, so don't hesitate to take a stance on
something. And if all of this really interests you then get involved and join
This is the forty-eighth summary written by Brett Cannon (hopefully school
won't drown my this quarter).
To contact me, please send email to brett at python.org ; I do not have the
time to keep up on comp.lang.python and thus do not always catch follow-ups
All summaries are archived at http://www.python.org/dev/summary/ .
Please note that this summary is written using reStructuredText_ which can be
found at http://docutils.sf.net/rst.html . Any unfamiliar punctuation is
probably markup for reST_ (otherwise it is probably regular expression syntax
or a typo =); you can safely ignore it, although I suggest learning reST; it's
simple and is accepted for `PEP markup`_ and gives some perks for the HTML
output. Also, because of the wonders of programs that like to reformat text, I
cannot guarantee you will be able to run the text version of this summary
through Docutils_ as-is unless it is from the `original text file`_.
.. _PEP Markup: http://www.python.org/peps/pep-0012.html
The in-development version of the documentation for Python can be found at
http://www.python.org/dev/doc/devel/ and should be used when looking up any
documentation on new code; otherwise use the current documentation as found at
http://docs.python.org/ . PEPs (Python Enhancement Proposals) are located at
http://www.python.org/peps/ . To view files in the Python CVS online, go to
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/ . Reported bugs and
suggested patches can be found at the SourceForge_ project page.
The `Python Software Foundation`_ is the non-profit organization that holds the
intellectual property for Python. It also tries to forward the development and
use of Python. But the PSF_ cannot do this without donations. You can make a
donation at http://python.org/psf/donations.html . Every penny helps so even a
small donation (you can donate through PayPal or by check) helps.
.. _python-dev: http://www.python.org/dev/
.. _SourceForge: http://sourceforge.net/tracker/?group_id=5470
.. _python-dev mailing list: http://mail.python.org/mailman/listinfo/python-dev
.. _comp.lang.python: http://groups.google.com/groups?q=comp.lang.python
.. _Docutils: http://docutils.sf.net/
.. _reStructuredText: http://docutils.sf.net/rst.html
.. _Python Software Foundation: http://python.org/psf/
.. _last summary: http://www.python.org/dev/summary/2004-08-16_2004-08-31.html
.. _original text file: http://www.python.org/dev/summary/2004-09-01_2004-09-15.ht
Python 2.4a3 has been released. Go to http://www.python.org/2.4/ and give it
Sorry for this summary being so short, but school has started back up again so
I am in the middle of suddenly having to switch back into homework mode after
spending the summer just having a 9:00-17:00 job.
And since it is a new school year I am going to abuse this space and say that
anyone in San Luis Obispo, including students, should join the `SLO Meetup`_
coming up on October 14.
.. _SLO Meetup: http://python.meetup.com/95/
Movement in PEP Land
`PEP 334`_ (Simple Coroutines via SuspendIteration) came into existence.
`PEP 328`_ (Relative Imports) got some discussion on postponing making imports
absolute instead of the relative/absolute semantics they have now. As it
stands it looks like the changeover might get pushed off.
`PEP 292`_ (Simpler String Substitutions) seems to finally be done and locked down.
`PEP 335`_ (Overloadable Boolean Operators) came into existence.
.. _PEP 334: http://www.python.org/peps/pep-0334.html
.. _PEP 328: http://www.python.org/peps/pep-0328.html
.. _PEP 292: http://www.python.org/peps/pep-0292.html
.. _PEP 335: http://www.python.org/peps/pep-0335.html
- `PEP 334 - Simple Coroutines via SuspendIteration
- `PEP 328 - Relative Imports
- `Re: Alternative Implementation for PEP 292:Simple String Substitutions
- `ANN: PEP 335: Overloadable Boolean Operators
__str__, __unicode__, and how to have them play nicely
Did you know that __str__ methods are allowed to return Unicode objects? Well,
it turns out they can, but that str() (which calls PyObject_Str())
automatically tries to convert the value returned by __str__ into ASCII.
Basically __str__ shouldn't return Unicode if you can help it and you should
use __unicode__ instead and reserve __str__ to return str objects only.
- unicode and __str__ (couldn't find in archives)
Backporting C APIs bad
Somebody (*cough* Guido *cough*) asked if the datetime C API could be
backported to 2.3 . The argument was that the only person who would probably
use it is the person who asked for it, the author of cx_Oracle.
Well, pretty much everyone spoke up against this. The argument went that
adding an API would just be bad since there would suddenly be a point in the
2.3 releases where backwards compatibility was broken. People brought up the
point of 2.2 where in 2.2.1 booleans were added and how that has caused
compatibility headaches for some people.
In the end the API was not backported.
- `Re: [Python-checkins] python/dist/src/Modules threadmodule.c, 2.56,
Got to love race conditions thanks to the filesystem and external apps
Tim Peters found a race condition one can have on Windows if you have an app
that uses the low-level hooks into the filesystem. If you create a file,
delete it, and then try to delete the directory the directory deletion will
fail since the file is not deleted yet. What can happen is an indexing program
can still be indexing the file before the filesystem is allowed to delete it
and thus the directory is not truly empty when the directory deletion is
executed. Fun stuff.
- `Coernic Desktop Search versus shutil.rmtree
Python 2.4a3 is out the door!!!
Go to http://www.python.org/2.4/ , download it (using the bz2 version if
possible so as to save on bandwidth), and run it against your code, run the
test suite, put it on your head and sell yourself to an art gallery, etc.
- `RELEASED Python 2.4, alpha 3
Cleaning the Exception House
The idea of reorganizing the exceptions hierarchy came up again (see
for a previous discussion on this). This time, the idea of separating the
hierarchy into exceptions one would like to catch with a bare 'except' and
those that you wouldn't was brought up.
The idea is that some exceptions, such as MemoryError, one does not want to
catch in a blanket statement usually. Chances of recovering from that kind of
exception is low and should only be caught if you know what you are doing. So
tweaking the exception hierarchy so that exceptions that were not
near-catastrophic could inherit from an exception class that people could catch
so as to allow the proper exceptions to propagate to the top-level without issue.
Tim Peters even went as far as to suggest deprecating bare 'except' statements.
This would force people to be explicit about what they want to catch, whether
it be all "safe" exceptions or *all* exceptions.
As it stands now no officially decision has been made for Python 3000 since
that is about the only place this could happen.
- `Dangerous exceptions
Making decorators not look like decorators to the outside world
Raymond Hettinger pointed out that a decorator does not, by default, look like
the function that it is fiddling with (if that is the intent). Since most
decorators will most likely be a wrapper function some things need to be set in
the wrapper in order not to mask things in the wrapped function (doc string,
argument parameters, etc.).
So Raymond pointed out some things one can do. This also led to the suggestion
of having a common name used to store a reference back to the wrapped function.
There was also the mention that a decorator-oriented module in the stdlib
will probably materialize in Python 2.5 . For now, though, stick recipes
either in the Python Cookbook or in the Python wiki at
- `decorator support
- random.py still broken wrt. urandom
- random.py fixage
- Re: [Python-checkins] python/dist/src/Lib/test test_compiler.py, 1.5, 1.6
test_decimal.py, 1.13, 1.14
- assert failure on obmalloc
- Re: [Python-checkins] python/dist/src/Modules socketmodule.c, 1.304, 1.305
- Install-on-first-use vs. optional extensions
- Console vs. GUI applications
- Adding status code constants to httplib
- PEP 292: method names
- PEP 265 - Sorting dicts by value
- httplib is not v6 compatible, is this going to be fixed?
- OT: Unicode history
- --with-tsc compile fails
- tempfile.TemporaryFile on Windows NT
- urllib.urlopen() vs IDNs, percent-encoded hosts, ':'
- tabs in httplib.py and test_httplib.py
There is now a vimrc file in the Misc directory that sets things up to
follow PEPs 7 & 8
- strawman decision: @decorator won't change
- unicode inconsistency?
Python 2.4 will come with version 3.0 of the email package. I've made a
standalone distutils package of email 3.0 for folks who don't want to
download the Python CVS. I plan on freezing the API when Python 2.4
beta 1 is released. For documentation and download links please see the
email-sig home page:
Changes in email 3.0 include:
* New FeedParser provides an incremental parsing API for
applications that may read email message from blocking sources.
FeedParser is also more standards compliant than the old parser,
and is "non-strict" so that it should never raise parse errors
when parsing broken messages.
* Previously deprecated API features have been removed, while a
few more deprecations have been added.
* Support for Pythons earlier than 2.3 have been removed.
* Lots and lots of fixes.
Feel free to join the email-sig mailing list for further discussion.
New in release 0.21:
# Colored background for paragraphs and table cells in PDF.
# User-defined constants possible for makeSerialLetters() - not only
"today" or "heute" allowed.
# Better explanations in test.sxw.
Have a look at:
I'm pleased to announce the seventeenth development release of PythonCAD,
a CAD package for open-source software users. As the name implies,
PythonCAD is written entirely in Python. The goal of this project is
to create a fully scriptable drafting program that will match and eventually
exceed features found in commercial CAD software. PythonCAD is released
under the GNU Public License (GPL).
PythonCAD requires Python 2.2 or Python 2.3. The interface is GTK 2.0
based, and uses the PyGTK module for interfacing to GTK. The design of
PythonCAD is built around the idea of separating the interface
from the back end as much as possible. By doing this, it is hoped
that both GNOME and KDE interfaces can be added to PythonCAD through
usage of the appropriate Python module. Addition of other interfaces
will depend on the availability of a Python module for that particular
interface and developer interest and action.
The seventeenth releases of PythonCAD can print! This release includes
the ability of the program to generate a PostScript file that can either
be sent to a printer or saved directly to a file. Printing support is not
entirely complete however, and will be enhanced over the next several
release. This release also includes improvements in the user interface
for changing existing drawing entities, especially text and dimensions.
There have been numerous improvements made to the code for these
entities as well, and subsequent releases will continue this effort.
This release also includes a restructured code layout that should make
PythonCAD less likely to cause unexpected interactions with other Python
based programs like Zope. Finally, various improvements in the undo/redo
code, plus a good number of bug fixes, are included in this release.
The mailing list for the development and use of PythonCAD is available.
Visit the following page for information about subscribing and viewing
the mailing list archive:
Visit the PythonCAD web site for more information about what PythonCAD
does and aims to be:
Come and join me in developing PythonCAD into a world class drafting
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.
-Thomas Jefferson to James Smith, 1822
PyORBit 2.0.1, the Python binding for the ORBit2 CORBA ORB, is now
What's new since 2.0.0?
- x86_64 build fixes (Mark McLoughlin)
- export pyorbit versions (Gustavo)
- Python 2.4 fixes (James)
- Bug fixes (James, Bowin Owens)
PyORBit provides both client and server side CORBA bindings, and aims
follow the standard Python language mapping for CORBA
PyORBit is capable of calling in process servers implemented using
ORBit2, and being called by in process C code. This makes it ideal for
use in the Gnome environment, and is used by the gnome-python Gnome
PyORBit requires ORBit2 >= 2.4.4 and Python >= 2.2.
Questions about PyORBit can be directed to the PyGTK list:
Bug reports should be filed at the Gnome bug tracker:
Johan Dahlin <johan(a)gnome.org>
GnomePython 2.6.0 has just been released. I offers convenient
wrappers for most APIs in GNOME 2.6 platform, including the follwing
gnome, gnome.ui, gnome.canvas, gnome.vfs
bonobo, bonobo.activation, bonobo.ui
The source tarball can be found here:
Please file bug reports here:
Overview of Changes from gnome-python 2.5.90 to gnome-python 2.6.0
- bonobo.AppClient is only a GObject, not a BonoboObject (Gustavo)
- bonobo.event_source_client_add_listener now returns the new listener,
to allow future disconnection (Gustavo)
- Remove CORBA exceptions from all bonobo callbacks (Gustavo)
- Fix a bug in bonobo.generic_factory_main (Gustavo)
- Add new pango/gnomeprint integration API if libgnomeprint 2.8 is
- Add missing bytes_requested parameter to read/write callbacks of
async operations (Gustavo)
- Raise exception when trying to subclass vfs types (Gustavo, James)
- Workaround problem in PanelApplet constructor (Gustavo)
- Fix initialization of bonobo (Gustavo)
- Mixed 32/64 bit architecture installation fixes (Jonathan Blandford)
- Add gnome_python_version variable to the gnome module (Gustavo)
- Resolve all known compiler warnings (Gustavo)
Gustavo J. A. M. Carneiro
The universe is always one step beyond logic
I am pleased to announce version 2.4.0 of the Python bindings for GTK.
The new release is available from ftp.gnome.org as and its mirrors
as soon as its synced correctly:
It might take a while, so please be patient.
What's new since 2.2.0
Wrapping for new objects in Gtk+ 2.4.0:
GtkFileChooser, GtkUIManager (and action/toolbar api), GtkTreeModelFilter,
GtkComboBox, GtkCellLayout. Examples for a few of them can be found in the tarball.
Enum and Flags wrapping, with nice string representations
Better constructor integrations.
Python 2.3 requirement.
Threading improvements, which are currently disabled until we can depend on
Python 2.3.5 (unreleased) or 2.4
Plenty of bug fixes.
Thanks to (this release would not have been possible without you!):
Sebastian Bacher, Jonathan Blandford, Gustavo Carneiro, Steve Chaplin,
Johan Dahlin, Abel Daniel, John Ehresman, John Finlay, Cedric Gustin,
Maik Hertha, James Henstridge, Xaiver Ordoquy, Benjamin Otte,
Christian Robottom Reis, Lorzeno Gil Sanchez, Thomas Vander Stichele,
Jason Tackaberry, Scott Tsai, Fernando San Martin Woerner
GTK is a toolkit for developing graphical applications that run on POSIX
systems such as Linux, Windows and MacOS X (provided that the X server
for MacOS X has been installed). It provides a comprehensive set of GUI
widgets, can display Unicode bidi text. It links into the Gnome
Accessibility Framework through the ATK library.
PyGTK provides a convenient wrapper for the GTK+ library for use in
Python programs, and takes care of many of the boring details such as
managing memory and type casting. When combined with PyORBit and
gnome-python, it can be used to write full featured Gnome applications.
Like the GTK+ library itself PyGTK is licensed under the GNU LGPL, so is
suitable for use in both free software and proprietary applications. It
is already in use in many applications ranging from small single purpose
scripts up to large full features applications.
PyGTK requires GTK+ >= 2.4 and Python >= 2.3 to build.
Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for links
to posting and querying bug reports for PyGTK.