Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Bill Janssen
Aahz wrote: > Second, please follow the advice to put ALL patches on the tracker. I don't care about top-posting, but I second the Second point. Let's move this thread to the issue tracker. Bill ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Aahz
On Tue, Mar 10, 2009, Dan Mahn wrote: > > Ahh ... I see. I should have done a bit more digging to find where the > standard tests were. > > I created a few new tests that could be included in that test suite -- > see the attached file. Do you think that this would be sufficient? First of all

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Dan Mahn
Ahh ... I see. I should have done a bit more digging to find where the standard tests were. I created a few new tests that could be included in that test suite -- see the attached file. Do you think that this would be sufficient? - Dan Bill Janssen wrote: Dan Mahn wrote: Yes, that was

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Bill Janssen
Dan Mahn wrote: > Yes, that was a good idea. I found some problems, and attached a new > version. It looks more complicated than I wanted, but it is a very > regular repetition, so I hope it is generally readable. That's great, but I was hoping for more tests in lib/test/test_urllib.py. Bill

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Dan Mahn
I submitted an explanation of this and my proposed modification as issue 5468. http://bugs.python.org/issue5468 - Dan Bill Janssen wrote: Aahz wrote: On Sat, Mar 07, 2009, Dan Mahn wrote: After a harder look, I concluded there was a bit more work to be done, but still very basic modific

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-09 Thread Aahz
On Mon, Mar 09, 2009, Dan Mahn wrote: > > Any suggestions would be welcome before I try to submit this as a patch. Just go ahead and submit it now; it's easier to review patches when they're in the system, and it also makes sure that it won't get lost. -- Aahz (a...@pythoncraft.com) <*>

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-09 Thread Dan Mahn
Yes, that was a good idea. I found some problems, and attached a new version. It looks more complicated than I wanted, but it is a very regular repetition, so I hope it is generally readable. I used "doctest" to include the test scenarios. I was not familiar with it before, but it seems to

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-07 Thread Bill Janssen
Aahz wrote: > On Sat, Mar 07, 2009, Dan Mahn wrote: > > > > After a harder look, I concluded there was a bit more work to be done, > > but still very basic modifications. > > > > Attached is a version of urlencode() which seems to make the most sense > > to me. > > > > I wonder how I could of

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-07 Thread Aahz
On Sat, Mar 07, 2009, Dan Mahn wrote: > > After a harder look, I concluded there was a bit more work to be done, > but still very basic modifications. > > Attached is a version of urlencode() which seems to make the most sense > to me. > > I wonder how I could officially propose at least some o

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-07 Thread Dan Mahn
After a harder look, I concluded there was a bit more work to be done, but still very basic modifications. Attached is a version of urlencode() which seems to make the most sense to me. I wonder how I could officially propose at least some of these modifications. - Dan Bill Janssen wrot

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-02-28 Thread Dan Mahn
Bill Janssen wrote: Bill Janssen wrote: Dan Mahn wrote: 3) Regarding the following code fragment in urlencode(): k = quote_plus(str(k)) if isinstance(v, str): v = quote_plus(v) l.append(k + '=' + v)

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-02-28 Thread Bill Janssen
Bill Janssen wrote: > Dan Mahn wrote: > > > 3) Regarding the following code fragment in urlencode(): > > > >k = quote_plus(str(k)) > > if isinstance(v, str): > >v = quote_plus(v) > >l.append(k + '=' + v) > >elif isinstance(v, st

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-02-28 Thread Bill Janssen
Dan Mahn wrote: > 3) Regarding the following code fragment in urlencode(): > >k = quote_plus(str(k)) > if isinstance(v, str): >v = quote_plus(v) >l.append(k + '=' + v) >elif isinstance(v, str): ># is there a reason

[Python-Dev] More on Py3K urllib -- urlencode()

2009-02-28 Thread Dan Mahn
Hi. I've been using Py3K successfully for a while now, and have some questions about urlencode(). 1) The docs mention that items sent to urlencode() are quoted using quote_plus(). However, instances of type "bytes" are not handled like they are with quote_plus() because urlencode() converts