[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-04-12 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 3f240a1cd245 by Senthil Kumaran in branch '3.1':
Fix Issue11703 - urllib2.geturl() does not return correct url when the original 
url contains #fragment. Patch Contribution by Santoso Wijaya.
http://hg.python.org/cpython/rev/3f240a1cd245

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-04-12 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

It should be noted that the bug surfaced in 2.7 and above due to changes made 
as part of Issue8280.

--
assignee:  - orsenthil
resolution:  - fixed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-04-12 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 6e73f75ee034 by Senthil Kumaran in branch '2.7':
Fix Issue11703 - urllib2.get_url does not handle fragment in url properly.
http://hg.python.org/cpython/rev/6e73f75ee034

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-04-12 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

This is fixed in all the codelines. Thanks for the patch, Santoso.

--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-04-12 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 8ee48ec69844 by Senthil Kumaran in branch '3.1':
Update the News for the fix to Issue11703.
http://hg.python.org/cpython/rev/8ee48ec69844

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-04-12 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 502bb809b03b by Senthil Kumaran in branch '2.7':
update news in 2.7  for Issue #11703
http://hg.python.org/cpython/rev/502bb809b03b

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-04-06 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

It already does. ;-)

Python 2.7.1+ (default, Apr  6 2011, 16:25:38) [MSC v.1500 32 bit (Intel)] on wi
n32
Type help, copyright, credits or license for more information.
 import urllib2
[74578 refs]
 fp = urllib2.urlopen('http://16.foobnix-cms.appspot.com/test_base')
[75643 refs]
 fp.geturl()
http://16.foobnix-cms.appspot.com/test_redirect#json={value:'OK'}
[75645 refs]

I'm attaching patches with the appropriate unittest for the redirected case, 
though.

--
Added file: http://bugs.python.org/file21555/issue11703_py27_with_redirect.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-04-06 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


Added file: http://bugs.python.org/file21556/issue11703_py31_with_redirect.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-04-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-03-30 Thread Ivan Ivanenko

Ivan Ivanenko ivan.ivane...@gmail.com added the comment:

Santa4nt, I think you also need to check case with Redirect Response URL:

print urllib2.urlopen(http://16.foobnix-cms.appspot.com/test_base;).geturl()

python 2.6 returns OK
http://16.foobnix-cms.appspot.com/test_redirect#json={value:'OK'}

python 2.7 returns KO
http://16.foobnix-cms.appspot.com/test_redirect

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-03-29 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
nosy: +santa4nt
versions: +Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-03-29 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

This is because the Request class' constructor splits the URL into __original 
and fragment:

def __init__(self, url, data=None, headers={},
 origin_req_host=None, unverifiable=False):
# unwrap('URL:type://host/path') -- 'type://host/path'
self.__original = unwrap(url)
self.__original, fragment = splittag(self.__original)

And the construction of object that urlopen() returns has its geturl() returns 
the request object's __original field (by now, minus the fragment).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-03-29 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

Attaching patches against 2.7 and 3.1 branches.

--
keywords: +patch
Added file: http://bugs.python.org/file21456/issue11703_py27.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-03-29 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


Added file: http://bugs.python.org/file21457/issue11703_py31.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-03-29 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +orsenthil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11703] Bug in python = 2.7 with urllib2 fragment

2011-03-28 Thread Ivan Ivanenko

New submission from Ivan Ivanenko ivan.ivane...@gmail.com:

result = urllib.urlopen(http://docs.python.org/library/urllib.html#OK;)
print result.geturl()

result = urllib2.urlopen(http://docs.python.org/library/urllib.html#OK;)
print result.geturl()

Python 2.6 returns:
http://docs.python.org/library/urllib.html#OK;
http://docs.python.org/library/urllib.html#OK;

Python 2.7 returns:
http://docs.python.org/library/urllib.html#OK;
http://docs.python.org/library/urllib.html;

2to3 -w test.py
Python 3 returns:
http://docs.python.org/library/urllib.html;
http://docs.python.org/library/urllib.html;

I expect geturl() result with #OK in all cases

--
components: Library (Lib)
messages: 132423
nosy: Ivan.Ivanenko
priority: normal
severity: normal
status: open
title: Bug in python = 2.7 with urllib2 fragment
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11703
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com