[Python-3000] PEP 3137 plan of attack
Guido van Rossum
guido at python.org
Mon Oct 8 06:32:59 CEST 2007
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.
The work for PEP 3137 can be split into a number of relatively
independent steps. In some cases these can even be carried out in
either order. I'd love to see volunteers for each of these steps.
Note: I'll refer to the three string types by their C names, as I plan
to keep those unchanged in 3.0a2. We can rename them later, but
renaming them will make merging from the trunk and converting 3rd
party extensions harder. The C names are PyString (immutable bytes),
PyBytes (mutable bytes), PyUnicode (immutable unicode code units,
either 16 bits or 32 bits).
The tasks I can think of are:
- remove locale support from PyString
- remove compatibility with PyUnicode from PyString
- remove compatibility with PyString from PyUnicode
- add missing methods to PyBytes (for list, see the PEP and compare to
what's already there)
- remove buffer API from PyUnicode
- make == and != between PyBytes and PyUnicode return False instead of
raising TypeError
- make == and != between PyString and Pyunicode return False instead
of converting
- make comparisons between PyString and PyBytes work (these are
properly ordered)
- change lots of places (e.g. encoders) to return PyString instead of PyBytes
- change indexing and iteration over PyString to return ints, not
1-char PyStrings
- 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
If a task is done independently from the others, it should include
changes to keep the unit tests working.
If you volunteer, please send out an email to this list before you
start doing any work, to avoid duplicate work (unless sending the
email would take more time than it would take to write the code,
compile it, run all unit tests, and upload the patch). I'd appreciate
it if you gave an estimate for when you expect to be done (or give up)
too. For code submissions, please use bugs.python.org and send an
email pointing to the relevant issue to this list.
PS. Is there anyone who understands test_urllib2net and can fix it?
It's been failing for weeks (maybe months) now.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list