Re: [Python-Dev] cpython (3.2): Fix issue14826 - make urllib.request.Request quoted url consistent with

2012-07-07 Thread Antoine Pitrou
> > +def test_quote_url(self): > +Request = urllib.request.Request > +request = Request("http://www.python.org/foo bar") > +self.assertEqual(request.full_url, "http://www.python.org/foo%20bar";) > + This means someone who already quotes URL will get a double escaping,

Re: [Python-Dev] cpython: Issue 14814: Correctly return NotImplemented from ipaddress._BaseNetwork.__eq__

2012-07-07 Thread Nick Coghlan
On Sun, Jul 8, 2012 at 12:59 AM, Nick Coghlan wrote: > On Sat, Jul 7, 2012 at 11:55 PM, Antoine Pitrou wrote: >> I think the isinstance() test was correct. If you have an object which >> duck-types IPNetwork, you probably want its __eq__ to be called, not >> yours. > > This change was just to bri

Re: [Python-Dev] cpython: Issue 14814: Correctly return NotImplemented from ipaddress._BaseNetwork.__eq__

2012-07-07 Thread Nick Coghlan
On Sat, Jul 7, 2012 at 11:55 PM, Antoine Pitrou wrote: > I think the isinstance() test was correct. If you have an object which > duck-types IPNetwork, you probably want its __eq__ to be called, not > yours. This change was just to bring IPNetwork in line with the other types in the module and to

Re: [Python-Dev] cpython: Issue 14814: Correctly return NotImplemented from ipaddress._BaseNetwork.__eq__

2012-07-07 Thread Antoine Pitrou
On Sat, 7 Jul 2012 15:08:42 +0200 (CEST) nick.coghlan wrote: > > def __eq__(self, other): > -if not isinstance(other, _BaseNetwork): > -raise TypeError('%s and %s are not of the same type' % ( > - self, other)) > -return (self._versio