[Python-Dev] (Not) delaying the 3.2 release (original) (raw)
Brett Cannon brett at python.org
Thu Sep 16 20:45:42 CEST 2010
- Previous message: [Python-Dev] (Not) delaying the 3.2 release
- Next message: [Python-Dev] 3.x as the official release
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Sep 16, 2010 at 06:28, Nick Coghlan <ncoghlan at gmail.com> wrote:
On Thu, Sep 16, 2010 at 10:26 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
Why won't you feel confident? Are there any specific issues (apart from the lack of a WSGI PEP)? If they are technical problems, they should be reported on the bug tracker. If they are representational, cultural or psychological issues, I'm not sure what we can do. But delaying the release won't solve them. There are some APIs that should be able to handle bytes or strings, but the current use of string literals in their implementation means that bytes don't work. This turns out to be a PITA for some networking related code which really wants to be working with raw bytes (e.g. URLs coming off the wire). For example:
import urllib.parse as parse parse.urlsplit("http://www.ubuntu.com") SplitResult(scheme='http', netloc='www.ubuntu.com', path='', query='', fragment='') parse.urlsplit(b"http://www.ubuntu.com") Traceback (most recent call last): File "", line 1, in File "/home/ncoghlan/devel/py3k/Lib/urllib/parse.py", line 178, in urlsplit i = url.find(':') TypeError: expected an object with the buffer interface There's no real reason urlsplit (and similar urllib.parse APIs) shouldn't support bytes, but the internal use of string literals currently prevents it. We don't seem to have created a tracker issue from the discussion back in June where this came up, so I went ahead and created one just now: http://bugs.python.org/issue9873
When I do my two months of PSF-sponsored core work (expected to be Jan/Feb) I was planning on (finally) redoing the dev docs, writing a HOWTO for maintaining a Python 2/3 code base, and cleaning up the test suite. But I am starting to think I should change the last one to solving this polymorphism problem in a way that can be applied across the board in the stdlib.
I think there were other APIs mentioned back then beyond the urllib.parse ones, but I didn't find them when I went trawling through the list archives yesterday. If anyone else thinks of any APIs that should allow bytes as well as strings (or vice-versa) feel free to add them to that issue.
Or create separate issues and make them dependencies for issue9873.
- Previous message: [Python-Dev] (Not) delaying the 3.2 release
- Next message: [Python-Dev] 3.x as the official release
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]