Re: [Python-Dev] urlparse brokenness

2005-11-28 Thread Guido van Rossum
OK, you've convinced me. But for backwards compatibility (until Python 3000), a new API should be designed. We can't change the old API in an incompatible way. Please submit complete code + docs to SF. (If you think this requires much design work, a PEP may be in order but I think that given the ne

Re: [Python-Dev] urlparse brokenness

2005-11-27 Thread Mike Brown
Guido van Rossum wrote: > IIRC I did it this way because the RFC about parsing urls specifically > prescribed it had to be done this way. That was true as of RFC 1808 (1995-1998), although the grammar actually allowed for a more generic interpretation. Such an interpretation was suggested in RF

Re: [Python-Dev] urlparse brokenness

2005-11-27 Thread Guido van Rossum
On 11/22/05, Paul Jimenez <[EMAIL PROTECTED]> wrote: > > It is my assertion that urlparse is currently broken. Specifically, I > think that urlparse breaks an abstraction boundary with ill effect. IIRC I did it this way because the RFC about parsing urls specifically prescribed it had to be done

Re: [Python-Dev] urlparse brokenness

2005-11-26 Thread John J Lee
On Tue, 22 Nov 2005, Paul Jimenez wrote: > It is my assertion that urlparse is currently broken. Specifically, I > think that urlparse breaks an abstraction boundary with ill effect. [...] I have some comments, but I can't see a patch on SF. Did you post it? John _

Re: [Python-Dev] urlparse brokenness

2005-11-24 Thread Donovan Baarda
On Tue, 2005-11-22 at 23:04 -0600, Paul Jimenez wrote: > It is my assertion that urlparse is currently broken. Specifically, I > think that urlparse breaks an abstraction boundary with ill effect. > > In writing a mailclient, I wished to allow my users to specify their > imap server as a url, su

Re: [Python-Dev] urlparse brokenness

2005-11-23 Thread Mike Brown
Paul Jimenez wrote: > So I propose that urlsplit, the main offender, be replaced with something > that looks like: > > def urlsplit(url, scheme='', allow_fragments=1, default=('','','','','')): +1 in principle. You should probably do a global _parse_cache and add 'is not None' after 'if cac

Re: [Python-Dev] urlparse brokenness

2005-11-23 Thread Aahz
On Tue, Nov 22, 2005, Paul Jimenez wrote: > > If this isn't the right forum for this discussion, or the right place > to submit code, please let me know. Also, please cc: me directly on > responses as I'm not subscribed to the firehose that is python-dev. This is the right forum for discussion.

[Python-Dev] urlparse brokenness

2005-11-23 Thread Paul Jimenez
It is my assertion that urlparse is currently broken. Specifically, I think that urlparse breaks an abstraction boundary with ill effect. In writing a mailclient, I wished to allow my users to specify their imap server as a url, such as 'imap://user:[EMAIL PROTECTED]:port/'. Which worked fine.