bzr-git broken ?

INADA Naoki songofacandy at gmail.com
Sun Mar 14 11:19:15 GMT 2010


Is this change in urlparse module affects this?

http://svn.python.org/view/python/trunk/Lib/urlparse.py?r1=70757&r2=78234


On Sun, Mar 14, 2010 at 7:52 PM, Russel Winder
<russel.winder at concertant.com> wrote:
> On Sun, 2010-03-14 at 19:02 +0900, INADA Naoki wrote:
>> > Can you try the following in a Python interpreter and let me know what it
>> > outputs:
>> > import urllib
>> > urllib.urlsplit("git://git.gnome.org/postr")
>> > urllib.splithost(urllib.urlsplit("git://git.gnome.org/postr")[2])
>>
>> urlsplit is in urlparse module.
>>
>> >>> import urllib
>> >>> import urlparse
>> >>> urlparse.urlsplit('git://git.gnome.org/postr')
>> SplitResult(scheme='git', netloc='', path='//git.gnome.org/postr',
>> query='', fragment='')
>> >>> urllib.splithost(_[2])
>> ('git.gnome.org', '/postr')
>
> Indeed:
>
>        |> python
>        Python 2.6.5rc2 (r265rc2:78822, Mar 11 2010, 20:47:08)
>        [GCC 4.4.3] on linux2
>        Type "help", "copyright", "credits" or "license" for more information.
>        >>> import urllib
>        >>> import urlparse
>        >>> urlparse.urlsplit('git://git.gnome.org/postr')
>        SplitResult(scheme='git', netloc='git.gnome.org', path='/postr', query='', fragment='')
>        >>> urllib.splithost(urllib.urlsplit("git://git.gnome.org/postr")[2])
>        Traceback (most recent call last):
>          File "<stdin>", line 1, in <module>
>        AttributeError: 'module' object has no attribute 'urlsplit'
>        >>> urlparse.splithost(urllib.urlsplit("git://git.gnome.org/postr")[2])
>        Traceback (most recent call last):
>          File "<stdin>", line 1, in <module>
>        AttributeError: 'module' object has no attribute 'splithost'
>        >>> urlparse.splithost(urlparse.urlsplit("git://git.gnome.org/postr")[2])
>        Traceback (most recent call last):
>          File "<stdin>", line 1, in <module>
>        AttributeError: 'module' object has no attribute 'splithost'
>        >>> urllib.splithost(urlparse.urlsplit("git://git.gnome.org/postr")[2])
>        (None, '/postr')
>        >>>
>
> On the other hand:
>
> |> grep urlsplit *.py */*.py
> remote.py:    (scheme, _, loc, _, _) = urlparse.urlsplit(url)
>
> So I guess this is not the problem per se.
>
> --
> Russel.
> =============================================================================
> Dr Russel Winder      Partner
>                                            xmpp: russel at russel.org.uk
> Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
> 41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:russel.winder at ekiga.net
> London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder
>



-- 
INADA Naoki  <songofacandy at gmail.com>



More information about the bazaar mailing list