[Python-3000] PEP 3137 plan of attack {stage 2]

Guido van Rossum guido at python.org
Fri Oct 19 23:06:02 CEST 2007


On 10/7/07, Guido van Rossum <guido at python.org> wrote:
> I'd like to make complete implementation of PEP 3137 the goal for the
> 3.0a2 release. It should be doable to do this release by the end of
> October. I don't think anything else *needs* to be done to have a
> successful a2 release.

I'm still hopeful, though realistically we may not quite make it.
Here's a status update on the issues I identified in my last message
(plus some identified afterwards):



> - remove locale support from PyString

Done.

> - remove compatibility with PyUnicode from PyString
> - remove compatibility with PyString from PyUnicode

Not done yet.

> - add missing methods to PyBytes (for list, see the PEP and compare to
> what's already there)

Done (Gregory P. Smith)

> - remove buffer API from PyUnicode

Done.

> - make == and != between PyBytes and PyUnicode return False instead of
> raising TypeError

Done.

> - make == and != between PyString and Pyunicode return False instead
> of converting

A patch by Thomas Lee exists: http://bugs.python.org/issue1263
However it breaks some unit tests.

> - make comparisons between PyString and PyBytes work (these are
> properly ordered)

Already works.

> - change lots of places (e.g. encoders) to return PyString instead of PyBytes

Not done.

> - change indexing and iteration over PyString to return ints, not
> 1-char PyStrings

A patch by Alexandre Vassalotti exists but breaks some unit tests:
http://bugs.python.org/issue1280

> - change PyString's repr() to return "b'...'"
> - change PyBytes's repr() to return "buffer(b'...')"
> - change parser so that b"..." returns PyString, not PyBytes
> - rename bytes -> buffer, str8 -> bytes

A patch by Alexandre Vassolotti and Christian Heimes exists for these 4 items:
http://bugs.python.org/issue1247
However it breaks too many tests to be applied right now.

> - change the constructor for PyString to match the one for PyBytes

Not done.

> - change PyBytes so that its str() is the same as its repr().
> - change PyString so that its str() is the same as its repr().

Not done.

> - add an iteration view over PyBytes (optional)

Not yet done (Christian Heimes offered).

> - kill basestring.

Done (Christian Heimes).

> - move initialization of sys.std{in,out,err} into C code and do it earlier.

A patch by Christian Heimes exists: http://bugs.python.org/issue1267
However it still breaks some unit tests...



All, please provide updated information if I missed a contribution!
I'm still hoping for more contributions. I will also try to guide the
existing patches into completion and acceptance.

There are also some issues that mainly crop up in non-English locales.
We will try to get to the bottom of those before releasing 3.0a2, but
I need help as I'm myself absolutely unable to work with locales (and
I don't have access to a Windows box).

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list