[Python-Dev] Removing --with-wctype-functions support

M.-A. Lemburg mal at egenix.com
Fri Dec 3 15:59:43 CET 2004


I would like to remove the support for using libc wctype functions
(e.g. towupper(), towlower(), etc.) from the code base.

The reason is that compiling Python using this switch not only
breaks the test suite, it also causes the functions .lower() and
.upper() to become locale aware and creates wrong results as
a result (which are hard to track down if you don't know whether
Python was compiled with the wctype switch or not).

The argument for having this switch at the time was to reduce
the interpreter size. This was true for Python 1.6 since the
Unicode type database was conditionally removed. Starting with
Python 2.0 a different approach was taken which resulted in
having to keep the type database in one piece - even with the
switch enabled.

As a result, performance became the only argument. However,
because the libc functions are locale aware, the added overhead
causes the libc functions not to perform better than the
builtin Python versions.

In the end, we loose complexity and reduce the Python configuration
space by one dimension.

Here's the bug that revealed the problem:

https://sourceforge.net/tracker/index.php?func=detail&aid=1076790&group_id=5470&atid=105470

Question is: Should this be done in 2.4.1 or will it have to
wait until 2.5 ?

We might want to remove the support for 2.4.1 and simply ignore
the compile time switch (or print a warning).

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Dec 03 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Python-Dev mailing list