[issue1779700] urlparse.urljoin does not obey current uri rfc (rfc 3986)
Senthil added the comment: The following issue/patch tries to addresses the same. http://bugs.python.org/issue1462525 - It needs work though. -- nosy: +orsenthil _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1779700> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1014] cgi: parse_qs and parse_qsl misbehave on empty strings
Senthil added the comment: Can query strings be empty? I am unable to find an instance. -- nosy: +orsenthil __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1014> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1057] Incorrect URL with webbrowser and firefox under Gnome
Senthil added the comment: I am on Fedora Core 3, gnome 2.6 and I am unable to reproduce this issue. Could this be a Ubuntu configuration bug. Like adding " quotes after %s for the firefox command? -- nosy: +orsenthil __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1057> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1057] Incorrect URL with webbrowser and firefox under Gnome
Senthil added the comment: Okay. I found the status later. It was fixed then with Python 2.6 which I am using. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1057> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1014] cgi: parse_qs and parse_qsl misbehave on empty strings
Senthil added the comment: Hi Sean, This is a very minor issue (IMO) with Python 2.4. Why did you assign it to gvanrossum? Makes me wonder at your assignments. Thanks, Senthil __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1014> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support
Senthil added the comment: Hi, The patch attached required a complete rewrite. I am attaching the modified patch, which will just substitute socket.gethostbyname with a function gethost_addrinfo which internally uses getaddrinfo and takes care of the IPv4 or IPv6 addresses translation. jjlee, skip: let me know your comments on this. One note we have to keep in mind is, testing on IPv6 address. For eg. on my system /etc/hosts 10.98.1.6 goofy.goofy.com #fe80::219:5bff:fefd:6270 localhost 127.0.0.1 localhost test_urllib2 will PASS for the above. But if I uncomment the IPv6 address, opening the local file fails. I am not sure how local file access is done with IPv6 and should urllib2 (local file opening function) itself needs to be modified. Shall check into that, with next version. -- nosy: +orsenthil _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1675455> _--- urllib2.py 2007-09-25 09:05:46.346939560 +0530 +++ urllib2-getaddrinfo.py 2007-09-25 09:04:59.019134480 +0530 @@ -1193,6 +1193,24 @@ return [part.strip() for part in res] +def gethost_addrinfo(hostname): +if socket.has_ipv6: +try: +for res in socket.getaddrinfo(hostname, None, socket.AF_INET6, +socket.SOCK_DGRAM, socket.IPPROTO_IP, socket.AI_CANONNAME): +af, socktype, proto, canonname, sa = res +except socket.gaierror: +for res in socket.getaddrinfo(hostname, None, socket.AF_INET, +socket.SOCK_DGRAM, socket.IPPROTO_IP, socket.AI_CANONNAME): +af, socktype, proto, canonname, sa = res +else: +for res in socket.getaddrinfo(hostname, None, socket.AF_INET, +socket.SOCK_DGRAM, socket.IPPROTO_IP, socket.AI_CANONNAME): +af, socktype, proto, canonname, sa = res + +return sa[0] + + class FileHandler(BaseHandler): # Use local file or FTP depending on form of URL def file_open(self, req): @@ -1208,10 +1226,10 @@ def get_names(self): if FileHandler.names is None: try: -FileHandler.names = (socket.gethostbyname('localhost'), -socket.gethostbyname(socket.gethostname())) +FileHandler.names = (gethost_addrinfo('localhost'), +gethost_addrinfo(socket.gethostname())) except socket.gaierror: -FileHandler.names = (socket.gethostbyname('localhost'),) +FileHandler.names = (gethost_addrinfo('localhost'),) return FileHandler.names # not entirely sure what the rules are here @@ -1232,7 +1250,7 @@ if host: host, port = splitport(host) if not host or \ -(not port and socket.gethostbyname(host) in self.get_names()): +(not port and gethost_addrinfo(host) in self.get_names()): return addinfourl(open(localfile, 'rb'), headers, 'file:'+file) except OSError, msg: @@ -1264,7 +1282,7 @@ passwd = unquote(passwd or '') try: -host = socket.gethostbyname(host) +host = gethost_addrinfo(host) except socket.error, msg: raise URLError(msg) path, attrs = splitattr(req.get_selector()) ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support
Changes by Senthil: _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1675455> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1333] merge urllib and urlparse functionality
Senthil added the comment: I have started this work at http://svn.python.org/projects/sandbox/trunk/urilib/ as a part of G-SoC, yes taking it to web-sig would be appropriate and I shall do so. techtonik, you might want to review it urilib and we can discuss it further. Thanks, -- nosy: +orsenthil __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1333> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1401] urllib2 302 POST
Senthil added the comment: I agree with facundobatista here. 1) I am not sure, if what you mention that doing POST in the 302 redirect url does not carry forward the POST data. Some examples would help to verify that and if this is case, IMO its a bug in urllib2. 2) You mention solution 1 as RFC compliant? Does RFC mention about changes to request headers for a redirection? Please quote the relevant section also I find in RFC2616 under 302 Found that: Note: RFC 1945 and RFC 2068 specify that the client is not allowedto change the method on the redirected request. However, most existing user agent implementations treat 302 as if it were a 303 response, performing a GET on the Location field-value regardless of the original request method. But could not find any references for behaviour with respect to POST on redirection. -- nosy: +orsenthil __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1401> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1401] urllib2 302 POST
Senthil added the comment: Hello Andres, I think we are mixing up 2 or 3 things. Here are my comments. 1) urllib2 POST issue. - Discussion broke on this. No conclusion. 2) GET Request. >> If we create a GET request (handling 302 as 303) we should >> remove the content length header! I fail to find a reference for this statement in the RFC. Currently urllib2, gets the headers from the original request and passes the same headers to the redirected url. RFC mentions that we "should not change the headers". I quoted the section previously. 3) Handling 30* headers the same way. Yes, urllib2 handles them in the way stating most of the clients apparently handle it the same way. Most of us are okay with it. ("Practicality beats Purity"). But when we find that something can be improved, we just to add/extend the same. I am working on urilib (sandbox/trunk/urilib) which has some extensions like cached redirection for temporary redirections etc. And for this issue, we just have to find the supporting evidence for: >> If we create a GET request (handling 302 as 303) we should >> remove the content length header! If we don't find it,then it is not a bug. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1401> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1432] Strange behavior of urlparse.urljoin
Senthil added the comment: Not really. RFC 1808, on which urlparse module is based, defines the following for the PATH component when joining the relative URL to Base URL. Step 6: The last segment of the base URL's path (anything following the rightmost slash "/", or the entire path if no slash is present) is removed and the embedded URL's path is appended in its place. So, what is happening is As per design and as per RFC1808. This bug report can be closed as Working as designed. -- nosy: +orsenthil __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1432> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1432] Strange behavior of urlparse.urljoin
Senthil added the comment: Yes, you are right. test_urlparse also does not consider the scenarios wherein the relative url +starts with a query like ?y. This needs to be addressed. I shall code the patch to fix it. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1432> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2868] Problem with urllib and urllib2 in urlopen?
Senthil <[EMAIL PROTECTED]> added the comment: Here is my analysis: >>> import urllib2 >>> url = "http://www.mercurynews.com/ci_9216417"; >>> content = urllib2.urlopen(url).read() >>> print content >>> opened = urllib2.urlopen(url) >>> print opened.geturl() https://secure.passport.mnginteractive.com/mngi/servletDispatch/ErightsPassportServlet.dyn?url=http://www.mercurynews.com/ci_9216417?nclick_check=1&forced=true # This URL Redirection is a 302 Redirection. # Browser is "unable" to launch the redirected site. https://secure.passport.mnginteractive.com/mngi/servletDispatch/ErightsPassportServlet.dyn?url=http://www.mercurynews.com/ci_9216417?nclick_check=1&forced=true # Logically, the urllib /urllib2 is giving a Blank when reading this site. I would't entire say urllib2's fault before understanding how FF is handling the redirection of the first site. 1) Open the site mentioned in the Location of 302, you will experience the same behaviour as 302. It seems more of an issue at server end, we have to know how, Firefox is handling at the first place. -- nosy: +orsenthil __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2868> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2464] urllib2 can't handle http://www.wikispaces.com
Senthil <[EMAIL PROTECTED]> added the comment: The issue is not just with null character. If you observe now the diretion is 302-302-200 and there is no null character. However, still urllib2 is unable to handle multiple redirection properly (IIRC, there is a portion of code to handle multiple redirection and exit on infinite loop) >>> url = "http://www.wikispaces.com"; >>> opened = urllib.urlopen(url) >>> print opened.geturl() http://www.wikispaces.com?responseToken=344289da354a29c67d48928dbe72042a >>> print opened.read() 400 Bad Request 400 Bad Request nginx/0.6.30 Needs a relook, IMO. -- nosy: +orsenthil __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2464> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2583] urlparse normalize URL path
Senthil <[EMAIL PROTECTED]> added the comment: Just try it this way. >>> print urlparse.urljoin('http://site.com/', 'path/../path/.././path/./') http://site.com/path/ >>> The difference is the inital '/' in the second argument. Human interpretation is: Go to http://site.com/ and 1) go to path directory 2) go to one-level above (/../) which results in site.com again 3) go to path directory 4) go to one-level above (..) (results site.com )5) Stay in the same directory (.) 6) goto path 7) stay there (.) Final result is http://www.site.com/path/ When you start the path with a '/' >>> print urlparse.urljoin('http://site.com/', '/path/../path/.././path/./') http://site.com/path/../path/.././path/./ The RFC (1808) suggests the following. urlparse.urljoin('http://a/b/c/d','/./g') = http://a/./g> The argument is taken as a complete path for the server. The way to use this would be, this way: >>> print urlparse.urljoin('http://site.com/', 'path/../path/.././path/./') http://site.com/path/ >>> This is not a bug and can be closed. -- nosy: +orsenthil __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2583> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2583] urlparse normalize URL path
Senthil <[EMAIL PROTECTED]> added the comment: Btw, Thank you for the exciting report monk.e.boy. :-) There are many hidden in urlparse,urllib*. I hope you will have fun time finding them (and fixing them too :) And one general comment. If the bug is valid, Python official Documentation cannot be made to reference a blog site. Instead, a patch to fix the python doc would itself be welcome. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2583> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Senthil <[EMAIL PROTECTED]> added the comment: parse_qs and parse_qsl moved to urlparse with this patch. I dont think urlencode would be a good method for urlparse. But this will cease to exist with the addressing of 3108. -- keywords: +patch Added file: http://bugs.python.org/file10496/issue600362.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3028] tokenize module: normal lines, not "logical"
Senthil <[EMAIL PROTECTED]> added the comment: > The documentation of the tokenize module says: "The line passed is the > *logical* line; continuation lines are included." > > I suggest that this will be changed to something like "The line passed > is the index of the string returned by the readline function, plus 1. > That is, the first string returned is called line 1, the second is > called line 2, and so on." The emphasis of *logical* may help us understand that it is a complete line. I find the wording of solution bit awkward, tough I am able to get what it is trying to say. - Index of string returned by readline function ?? and plus 1. ?? How about, The line passed is the *logical* non-blank line; continuation lines are included. The row counting starts from one. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3028> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue754016] urlparse goes wrong with IP:port without scheme
Senthil <[EMAIL PROTECTED]> added the comment: Attaching the patch to fix this issue. I deliberated upon this for a while and came up with the approach to: 1) fix the port issue, wherein urlparse should technically recognize the ':' separator for port from ':' after scheme. 2) And Doc fix wherein, it is advised that in the absence of a scheme, use the net_loc as //net_loc (following RCF 1808). If we go for any other fix, like internally pre-pending // when user has not specified the scheme (like in many pratical purpose), then we stand at chance of breaking a number of tests ( cases where url is 'g'(path only),';x' (path with params) and cases where relative url is g:h) Let me know your thoughts on this. >>> urlparse('1.2.3.4:80') ParseResult(scheme='', netloc='', path='1.2.3.4:80', params='', query='', fragment='') >>> urlparse('http://www.python.org:80/~guido/foo?query#fun') ParseResult(scheme='http', netloc='www.python.org:80', path='/~guido/foo', params='', query='query', fragment='fun') >>> -- keywords: +patch nosy: +orsenthil Added file: http://bugs.python.org/file10570/issue754016.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue754016> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1722348] urlparse.urlunparse forms file urls incorrectly
Senthil <[EMAIL PROTECTED]> added the comment: This issue no longer exists. I verified the bug report on the trunk and urlparse() and urlunparse methods behave properly on subsquent usages on the same url. >>> urlparse.urlparse(urlparse.urlunparse(urlparse.urlparse('file:///home/ors/Letter.txt'))) ParseResult(scheme='file', netloc='', path='/home/ors/Letter.txt', params='', query='', fragment='') Can be closed as Invalid. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1722348> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2885] Create the urllib package
Senthil <[EMAIL PROTECTED]> added the comment: I shall give it a try and come out with results asap. Shall take Facundo's help (my GSoC mentor). -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2885> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3094] By default, HTTPSConnection should send header "Host: somehost" instead of "Host: somehost:443"
Senthil <[EMAIL PROTECTED]> added the comment: The HTTPSConnection class derives from HTTPConnection and the methods in the HTTPConnection assume that 1) It is either over the default HTTP port or 2) Over a different port (be it different HTTP port(8080?) or 443 for HTTPS etc) and in that case it sends the port along in the request header. Thats it. So, there is no bug here. Morever, RFC 2818 states that, for HTTPS default port is 443, but the implementation are free to choose any other ports over TLS as well. Invalid bug can be closed. Thanks. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3094> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3094] By default, HTTPSConnection should send header "Host: somehost" instead of "Host: somehost:443"
Senthil <[EMAIL PROTECTED]> added the comment: Yes, you are correct. I misunderstood the issue and the patch. Patch seems good to fix that. Sorry for the confusion and thank you. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3094> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3121] test_urllibnet fails
Senthil <[EMAIL PROTECTED]> added the comment: > This is on Linux with latest py3k branch: > > test test_urllibnet failed -- Traceback (most recent call last): > File "/home/cartman/Sources/py3k/Lib/test/test_urllibnet.py", line > 145, in test_bad_address > urllib.urlopen, "http://www.python.invalid./";) > AssertionError: IOError not raised by urlopen Is this on the trunk? For me, test_bad_address test passes for test_urllibnet.py - This is on Fedora Core 2, with the just checkout trunk of py3k. That said, there are problems with email package instances ( which was replaced for mimetools). Shall work out for patch. == FAIL: test_info (__main__.urlopenNetworkTests) -- Traceback (most recent call last): File "test_urllibnet.py", line 91, in test_info "object returned by 'info' is not an instance of " AssertionError: object returned by 'info' is not an instance of email.message.Message == FAIL: test_header (__main__.urlretrieveNetworkTests) -- Traceback (most recent call last): File "test_urllibnet.py", line 184, in test_header "header is not an instance of email.message.Message") AssertionError: header is not an instance of email.message.Message -- -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3121> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3142] urllib docs don't match the new modules
Senthil <[EMAIL PROTECTED]> added the comment: I saw this coming. I am working on this Mark, Georg. Will be done with this by Saturday (21st-Jun). issue2885 is not closed yet and mentions about docs and other things pending. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3142> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3143] development docs waste a lot of horizontal space on left nav bar
Senthil <[EMAIL PROTECTED]> added the comment: +1 to support this bug entry. Even though I have wide-monitor (1680x1050), keeping such a wide left side margin is a pain when reading the new docs. I was looking for the settings if there is any way to turn off the left navigation or change the CSS style to a more plain one. Nope, it is not there. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3143> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3142] urllib docs don't match the new modules
Senthil <[EMAIL PROTECTED]> added the comment: Hi Georg, Updated all the required docs and Committed revision 64476. Let me know if any more changes required. Thanks, Senthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3142> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2885] Create the urllib package
Senthil <[EMAIL PROTECTED]> added the comment: - Docs updated. - Still pending: 2to3 updates and Deprecation warnings. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2885> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3045] Windows online help broken when spaces in TEMP environ
Senthil <[EMAIL PROTECTED]> added the comment: This issue is valid in Python2.5. I verified it on a Windows. The fix suggested Changing: os.system(cmd + ' ' + filename) to os.system('%s "%s"' % (cmd,filename)) in pydoc.tempfilepager also makes sense for fixing this issue. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3045> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue754016] urlparse goes wrong with IP:port without scheme
Senthil <[EMAIL PROTECTED]> added the comment: I am attaching the modified patch, which addresses the port issue properly and handles 'http:', 'https:' only URLS. Also included the tests for it. Facundo, I gave sufficient thought on raising an Exception for URLS not staring with '//', and I am -1 for it. As urlparse module is used for handling both absolute URLs as well as relative URLS, this suggestion IMHO, would break the urlparse handling of all relative urls. For e.g, cases which are mentioned in the RFC 1808 (Section 5.1 Normal Examples). The way to inform the users to use '//net_loc' when they want net_loc, would be Docs/Help message (included in the patch) and otherwise urlparse following RFC1808, will treat it as the path. This case may seem absurd when 'www.python.org' is treated as path but perfect for parsing relative urls like just 'a'. More over this makes sense when we have relative urls with parameters and query, for e.g.'g:h','?x' Another way to handle this would be split urlparse into two methods: urlparse.absparse() urlparse.relparse() and let the user decide what he wants to do. I am passing a message to Web-SIG to discuss this further. Irrespective of this, if the patch looks okay for "handling the port issue" for 2.6 with the "Doc/Help message", then we should close this bug and take the discussion further in Web-SIG. (I shall provide the patch for 3.0 as well) Comments Please. Added file: http://bugs.python.org/file10752/issue754016-py26.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue754016> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue754016] urlparse goes wrong with IP:port without scheme
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10570/issue754016.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue754016> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10496/issue600362.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10771/issue600362-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10772/issue600362-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Senthil <[EMAIL PROTECTED]> added the comment: - Updated patches for Python 2.6 and Python 3.0 - Moved the tests. - Updated docs. Somebody please review this so that it can checked in. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support
Changes by Senthil <[EMAIL PROTECTED]>: -- type: -> feature request ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1675455> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2829] Copy cgi.parse_qs() to urllib.parse
Senthil <[EMAIL PROTECTED]> added the comment: This is addressed in issue600362. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2829> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9907/issue2275.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Senthil <[EMAIL PROTECTED]> added the comment: Issue applicable to Py2.6 and Py3K. Previous patch attached was wrong. Removed it. -- versions: +Python 2.6, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Senthil <[EMAIL PROTECTED]> added the comment: Please have a look at this patch. - Included a CaseInsensitiveDict Lookup for Headers interface. - Headers will now be .title()-ed instead of .capitalized() ed. - Included Tests for the changes made. In the test_urllib2, I have not removed this line (yet). "The Request.headers dictionary is not a documented interface.." - I shall attach the patch to the documentation next. Will this suffice to remove the declaration of "not a documented interface"? Please provide your comments on the attached patch. If this is fine, I shall do the same modifications for py3k and patch docs as well. Thanks! Added file: http://bugs.python.org/file10849/issue2275-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2916] urlgrabber.grabber calls setdefaulttimeout
Senthil <[EMAIL PROTECTED]> added the comment: This bug is not related to Python Stdlib. There isn't a module by name urlgrabber in Python Stdlib and the author is referring to http://linux.duke.edu/projects/urlgrabber/help/urlgrabber.grabber.html Author should move his suggestion to urlgrabber project. We cannot do anything with socket.settimeout() Please close this issue, Facundo. Thanks, Senthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2916> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil <[EMAIL PROTECTED]> added the comment: >> Senthil, could you handle this? Sure, I shall take this up, Facundo. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1424152> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3045] Windows online help broken when spaces in TEMP environ
Senthil <[EMAIL PROTECTED]> added the comment: This is a really quick fix. Someone with tracker admin access can apply the patches and close this. [Applies to py26 and py3k] -- keywords: +patch versions: +Python 2.6, Python 3.0 -Python 2.5 Added file: http://bugs.python.org/file10850/issue3045-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3045> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3045] Windows online help broken when spaces in TEMP environ
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10851/issue3045-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3045> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10849/issue2275-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Senthil <[EMAIL PROTECTED]> added the comment: Here is the final patch for Py26 and Py3k including the Docs and Misc/News. Thanks you, Senthil Added file: http://bugs.python.org/file10862/issue2275-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Changes by Senthil <[EMAIL PROTECTED]>: -- versions: -Python 2.5 Added file: http://bugs.python.org/file10863/issue2275-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Senthil <[EMAIL PROTECTED]> added the comment: I also removed the Python 2.5 from the Version, as I don't think these changes will be back ported. After the application of patch, this issue can be closed. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3300] urllib.quote and unquote - Unicode issues
Changes by Senthil <[EMAIL PROTECTED]>: -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3300> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3316] Proposal for fix_urllib
Changes by Senthil <[EMAIL PROTECTED]>: -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3316> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Senthil <[EMAIL PROTECTED]> added the comment: > John J Lee <[EMAIL PROTECTED]> added the comment: > > * The patch looks like it will break code that uses .header_items(), > which is not acceptable. Nope, it does not break. If the concern was subclassing dict may have adverse effect on .copy and .update methods, thats taken care because the subclass just passes it to the original dict method, which would behave the same way. >>> r.header_items() [('Spam-Eggs', 'blah')] >>> r.add_header("Foo-Bar", "baz") >>> items = r.header_items() >>> items.sort() >>> items [('Foo-Bar', 'baz'), ('Spam-Eggs', 'blah')] > * The patch to the docs seems to muddy the waters even further (than the > current slightly murky state) about whether and why .headers is to be > preferred over the methods, or vice-versa. I think .headers should > remain undocumented, for the reason stated by the doctest that failed > with Hans-Peter's original patch. IIRC, Hans-Peter's comment was on the reference to .headers undocumented interface mentioned in the test_urllib2. > The best course of action is > debatable, but the patch is a regression in this respect, so should not > be committed as-is. My understanding in this case was to address 1) Title()-ize the headers and 2) provide a case insensitive lookup. Is this sufficient now to expose the headers method? If not, what else? If headers method should not be exposed, then will the 2 cases addressed above still do, as this issue request was opened for that? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Senthil <[EMAIL PROTECTED]> added the comment: Sorry for the delay and my miss in further communication on this issue. I would like to take this issue in two fronts for its closure. 1) Issue with headers .capitalize() vs .title() 2) Documenting the Interface With respect to point 1), I assume that we all agree upon that headers should stored in Titled-Format instead of Capitalized-format. So I went ahead with the implementation of Titled format with a CaseInsensitive Lookup so that previous code using Capitalize format would also return values from the headers dict. John: I agree with your point that these changes would break the .header_items() that returns a list of Titled() key-value pairs, whereas the previous existing code would be expecting Capitalized key-value pairs. CaseInsensitive Dict lookup would not solve it. I had assumed that new code will be confirming to it and changed the tests. Even though I thought about it, I did not bring it up for discussion for backward compatibility header_items() method. - I don't have a solution for how to make header_items() backward compatible if we go for headers title() change. I shall try to come up by today. Now, if we go for a Case Normalization at the much later stage, will the headers be stored still in capitalize() format? ( In that case, this bug requests it be stored in .titled() format confirming to many practices) Would you like to explain a bit more on that? We can address the documentation of interface later to coming upon conclusion on the first one. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10862/issue2275-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10863/issue2275-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11023/issue2275-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11024/issue2275-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Senthil <[EMAIL PROTECTED]> added the comment: I am submitting a revised patch for this issue. I did some analysis on the history of this issue and found that this .capitalize() vs .title() changes had come up earlier too ( issue1542948)and decision was taken to: - To retain the Header format in .capitalize() to maintain backward compatibility. - However, when the headers are passed to httplib, they are converted to .title() format ( see AbstractHTTPHandler method ) - It is encouraged that users uses .add_header(), .has_header(), .get_header() methods to check for headers instead of using the .headers dict directly (which will still remain undocumented interface). Note to Hans-Peter would be: Changing the headers to .title() tends to make the .header_items() retrieval backward incompatible, so the headers will still be stored in .capitalize() format. And I have made the following changes to the patch: 1) Support for case insensitive dict look up which will work with for .has_header, .get_header(). So when .has_header("User-Agent") will return True even when .headers give {"User-agent":"blah"} 2) Added tests to tests the behavior. 3) Changes to doc to reflect upon this issue. Btw, the undocumented .headers interface will also support case-insensitive lookup, so I have added tests for that too. Let me know if you have any comments. Lets plan to close this issue. Thanks, ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1432] Strange behavior of urlparse.urljoin
Senthil <[EMAIL PROTECTED]> added the comment: Yes, I agree with you, Roman. I have made changes to urlparse.urljoin which would behave confirming to RFC3986. The join of BASE ("http://a/b/c/d;p?q";) with REL("?y") would result in "http://a/b/c/d;p?y"; as expected. I have added a set of testcases for conformance with RFC3986 as well. Facundo: would you like to review this patch and commit it? Thanks! -- keywords: +patch nosy: +facundobatista versions: +Python 3.0 Added file: http://bugs.python.org/file11053/issue1432-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1432> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1432] Strange behavior of urlparse.urljoin
Senthil <[EMAIL PROTECTED]> added the comment: Patch for py3k Added file: http://bugs.python.org/file11054/issue1432-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1432> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1432] Strange behavior of urlparse.urljoin
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9035/urlparse.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1432> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3429] urllib.urlopen() return type
Senthil <[EMAIL PROTECTED]> added the comment: I agree with Benjamin on this issue, describing what is a "File like Object" is so much un-needed in Python and especially at urlopen function. Users have been able to understand and use it properly from a long time. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3429> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3466] urllib2 should support HTTPS connections with client keys
Changes by Senthil <[EMAIL PROTECTED]>: -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3466> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2827] IDLE 3.0a5 cannot handle UTF-8
Senthil <[EMAIL PROTECTED]> added the comment: I was NOT able to Reproduce it in IDLE 3.0b2 running on Linux. Would you like to try with 3.0b2 and also do. tjreedy: I did not properly get your comment. When you open Idle instance and create a new Document, cut-paste the code, and Run. The Execution happens in the IDLE instance which was running. No need of input() call. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2827> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3160] Building a Win32 binary installer crashes
Senthil <[EMAIL PROTECTED]> added the comment: >> What is the expected encoding of the pre_install_script file? I think, the pre_install_script will be provided by the user. It would be safe to assume "UTF-8" for the encoding of pre_install_script -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3160> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3532] bytes.tohex method
Senthil <[EMAIL PROTECTED]> added the comment: * scriptor Matt Giuca, explico > > I think the biggest problem I have is the existence of fromhex. It's > really strange/inconsistent to have a fromhex without a tohex. Except, when we look at the context. This is bytes class method returns a bytes or bytearray object, decoding the given string object. Do we require an opposite in the bytes class method? Where will we use it? > > Also I think a lot of people (like me, in my relative inexperience) are > going to be at a loss as to why .encode('hex') went away, and they'll No, it is not going away. str.encode('hex') is available to users when they seek it. They wont look for it under bytes type. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3532> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1432] Strange behavior of urlparse.urljoin
Senthil <[EMAIL PROTECTED]> added the comment: Hi Facundo, I think, we can go ahead and commit the changes. Got a response in Web-SIG that,previous RFC2396 listed behavior is invalid (in a practical sense) and the current patch fixes it. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1432> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Senthil <[EMAIL PROTECTED]> added the comment: Facundo, Shall we go ahead with committing these changes? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2275> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2776] urllib2.urlopen() gets confused with path with // in it
Senthil <[EMAIL PROTECTED]> added the comment: I could reproduce this issue on trunk and p3k branch. The patch attached by Adrianna Pinska "appropriately" fixes this issue. I agree with the logic. Attaching the patch for py3k with the same fix. Thanks, Senthil Added file: http://bugs.python.org/file11103/issue2776-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2776> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2756] urllib2 add_header fails with existing unredirected_header
Senthil <[EMAIL PROTECTED]> added the comment: The submitted patch has problems. It does not correctly solve this issue (which I want to confirm, if there is issue at all after understanding the logic behind unredirected_headers). My explanation of this issue and comments on the patch is here: http://urllib-gsoc.blogspot.com/2008/08/issue2756-urllib2-addheader-fails-with.html Now, coming back to the current issue. We see that addition of unredirected_hdrs takes place in the do_request_ call of AbstractHTTPHandler and it adds the unredirected_hdrs based on certain conditions, like when Content-Type is not there in header add the unredirected header ('Content-Type','application/x-www-form-urlencoded') The value of Content-Type is hardcoded here, but other header values are not hardcoded and got from header request only. Question here is: When the request contains the Content-Type header and has a updated value, why is it not supposed to change the unredirected_header to the updated value? (Same for other request header items). John J Lee, can perhaps help us understand more. If it is supposed to change, then the following snippet (rough) at do_request_ for key, value in request.headers: request.add_unredirected_header(key,request.get_header(key)) should update it, there is no need to change the add_header and add_unredirected_header method as proposed by the patch. On our conclusion, I shall provide the updated patch (if required). Thanks, Senthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2756> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2756] urllib2 add_header fails with existing unredirected_header
Senthil <[EMAIL PROTECTED]> added the comment: The problem with the patch was: The attached patch modifies the add_header() and add_unredirected_header() method to remove the existing headers of the same name alternately in the headers and unredirected_hdrs. What we observe is unredirected_hdrs item is removed during add_header() calland it is never added back/updated in teh undirected_hdrs. Let us discuss on the points mentioned in my previous post. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2756> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Senthil <[EMAIL PROTECTED]> added the comment: Hi Facundo, This issue/comments somehow escaped from my noticed, initially. I have addressed your comments in the new set of patches. 1) Previous patch Docs had issues. Updated the Docs patch. 2) Included message in cgi.py about parse_qs, parse_qsl being present for backward compatiblity. 3) The reason, py26 version of patch has quote function from urllib is to avoid circular reference. urllib import urlparse for urljoin method. So only way for us use quote is to have that portion of code in the patch as well. Please have a look the patches. As this request has been present from a long time ( 2002-08-26 !), is it possible to include this change in b3? Thanks, Senthil Added file: http://bugs.python.org/file6/issue600362-py26-v2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file7/issue600362-py3k-v2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10771/issue600362-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10772/issue600362-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2464] urllib2 can't handle http://www.wikispaces.com
Senthil <[EMAIL PROTECTED]> added the comment: Ah, I that was a simple fix. :) I very much overlooked the problem after being so much given the hints at the web-sig. I have some comments on the patch, Facundo. 1) I don't think is a good idea to include that portion in the http_error_302 method. That makes the fix "very" specific to "this" issue only. Another point is, fixing broken url's should not be under urllib2, urlparse would be a better place. So, I came up with the approach wherein urllib2 does unparse(parse) of the url and parse methods will fix the url if it is broken. ( See attached issue2464-PATCH1.diff) But if we handle it in the urlparse methods, then we are much susceptible to breaking RFC conformance, breaking a lot of tests, Which is not a good idea. So,I introduced fix_broken() method in urlparse and called it to solve the issue, using the same logic as yours (issue2464-py26-FINAL.diff) With fix_broken() method in urlparse, we will have better control whenever we want to implement a behavior which is RFC non-confirming but implemented widely by browsers and clients. All tests pass with issue2464-py26-FINAL.diff Comments,please? Added file: http://bugs.python.org/file11132/issue2464-py26-FINAL.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2464> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2464] urllib2 can't handle http://www.wikispaces.com
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11133/issue2464-PATCH1.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2464> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2464] urllib2 can't handle http://www.wikispaces.com
Senthil <[EMAIL PROTECTED]> added the comment: Patch for py3k, but please test this before applying. Added file: http://bugs.python.org/file11134/issue2463-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2464> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3647] urlparse - relative url parsing and joins to be RFC3986 compliance
New submission from Senthil <[EMAIL PROTECTED]>: Attaching two patches to make the current urlparse library, especially the relative url parsing and urljoin to be RFC3986 compliance. I have included all the tests prescribed in RFC3986 and verified them to pass with the patches. Our parsing functionality of netloc (to username,password,hostname,port) is same as what RFC3986 specifies. It uses the term 'authority' instead of 'netloc'. I did not feel the need for name change. If required, it can done. -- components: Library (Lib) files: urlparse_rfc3986-py26.diff keywords: patch messages: 71743 nosy: orsenthil severity: normal status: open title: urlparse - relative url parsing and joins to be RFC3986 compliance versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11208/urlparse_rfc3986-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3647> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3647] urlparse - relative url parsing and joins to be RFC3986 compliance
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11209/urlparse_rfc3986-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3647> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1462525] URI parsing library
Senthil <[EMAIL PROTECTED]> added the comment: Hello Paul, Have you beeing keeping track of urlparse changes in Python2.6? I anaylzed your patch and read through the RFC3986 and have the following comments: 1) The usage of this module is very diffirent from the current urlparse module's usage. It might be that this module was designed to co-exist with urlparse, providing certain additional functionalities. But inorder to replace urlparse, I find this module is "Backward Incompatible with the code base". Some comments extra features provided /claims of this module. 2) The module provides URI handling framework that includes default URI Parsers for common URI Schemes. - RFC3986 specifies that scheme handling part is left to the separate RFC describing the schemes. - uriparse library attempts that by providing default port and default hostname for certain schemes, but that can be made available as a patch to urlparse rather than new library. The need for such a change in urlparse needs to be analyzed, as there has not been any requirement raised as such for proving default port, default host for schemes whenever it is applicable. 3) urlsplit, urlunsplit, spliting the authority into sub-components is available in the current urlparse library itself and is RFC3986 conformant. 4) urljoin in the current urlparse ( patched with fixes) is currently RFC3986conformant. What urlparse further requires and this patch also lacks is ( as commented by John J Lee) 1) Handling of IRIs. 2) Python Unicode Strings. 3) Percent- Encodings for IRIs and Python Unicode Strings. ( There is a discussion going on on quote and unquote of unicode, and thatwould be basically be extended to above points as well) - If required, we can adopt the default host and port provision mechanisms as mentioned in this patch to the current urlparse. Other that that, I see that urlparse currently has all changes as mentioned inthis patch and makes the attached patch an obsolete one. Please let me know your comments/ thoughts. Thanks. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1462525> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2464] urllib2 can't handle http://www.wikispaces.com
Senthil <[EMAIL PROTECTED]> added the comment: That was reason in making fix_broken in the urlparse in my patch, Facundo. I had thought, it should be handled in urlparse module and if we make changes in the urlparse.urlunparse/urlparse.urlparse, then we are stepping into area which will break a lot of tests. I am kind of +0 with the current fix in urllib2. Should we think/plan for something in urlparse, akin to fix_broken? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2464> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil <[EMAIL PROTECTED]> added the comment: As indicated by other posters, this *IS A* serious issue with urllib2 as it does not do CONNECT for HTTPS through Proxy and it fails. chrisl, I verified your patch and it works properly. I made some minor changes (make a method private and changes w.r.t code in the trunk) and also added tests and NEWS to support its inclusion in the trunk. Facundo, we should try to include this in py26/py3k, I have attached the patch for both. There is a extra patch for test_urllib2net.py which tests real-time HTTPS connectivity taking the proxies from environment variables (HTTPS_PROXY). However, that has a serious dependency on Issue1251, which is still in Open state. When the bug Issue1251 is fixed, we can include the issue1424152-py26-test_urllib2net.diff separately. -- keywords: +patch Added file: http://bugs.python.org/file11332/issue1424152-py26.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1424152> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Senthil <[EMAIL PROTECTED]>: -- components: +Library (Lib) -None versions: +Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11333/issue1424152-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1424152> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil <[EMAIL PROTECTED]> added the comment: Test issue1424152-py26-test_urllib2net.diff and issue1424152-py3k-test_urllib2net.diff patches has a dependency on Issue1251 for failure scenarios. Issue1251 deals with ssl module not support non-blocking handshakes. So, when the HTTPS environment is NOT SET, while HTTPS Proxy is used, this test will try to a do_handshake() in ssl module and will return as it wont get timed-out. This test case can be included after Issue1251 is fixed. Added file: http://bugs.python.org/file11334/issue1424152-py26-test_urllib2net.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1424152> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11335/issue1424152-py3k-test_urllib2net.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1424152> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1251] ssl module doesn't support non-blocking handshakes
Senthil <[EMAIL PROTECTED]> added the comment: This issue is yet not fixed for both Py2.6 and Py3k. The tests which are present in code are not run (or disabled) in test_ssl.py I understand, customers have a good chance of hitting upon this issue. When ssl do_handshake() does not timeout and application just hangs! Janssen, would you like to close on this? Issue1424152 (for certain scenarios) has a dependency upon this one. -- nosy: +orsenthil versions: +Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1251> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1251] ssl module doesn't support non-blocking handshakes
Senthil <[EMAIL PROTECTED]> added the comment: Yes Janssen, I checked again and found it implemented in both trunk (py26) and py3k. All the tests pass as well. However, in one of my testcases for issue1424152, where I expected the timeout to happen for do_handshake(), it did not take effect. I shall look for the reasons. The following is the tail from the traceback. File "/usr/local/lib/python2.6/httplib.py", line 1095, in connect self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file) File "/usr/local/lib/python2.6/ssl.py", line 316, in wrap_socket suppress_ragged_eofs=suppress_ragged_eofs) File "/usr/local/lib/python2.6/ssl.py", line 116, in __init__ self.do_handshake() File "/usr/local/lib/python2.6/ssl.py", line 260, in do_handshake self._sslobj.do_handshake() KeyboardInterrupt ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1251> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Senthil <[EMAIL PROTECTED]> added the comment: Facundo, I have updated the patch against the trunk. Added the PendingDeprecationWarning for py26 and DeprecationWarning for py3k. All tests pass ok. Please verify and plan to apply this patch before rc1. Added file: http://bugs.python.org/file11356/issue600362-py26-v3.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11357/issue600362-py3k-v3.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file6/issue600362-py26-v2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Changes by Senthil <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file7/issue600362-py3k-v2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3763] Python 3.0 beta 2 : json and urllib not working together?
Senthil <[EMAIL PROTECTED]> added the comment: On the code against the trunk, I am getting the following error: Traceback (most recent call last): File "python3k_json.py", line 38, in for result in search(query)['Result']: File "python3k_json.py", line 31, in search result = json.load(obj) File "/usr/local/lib/python3.0/json/__init__.py", line 267, in load parse_constant=parse_constant, **kw) File "/usr/local/lib/python3.0/json/__init__.py", line 307, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.0/json/decoder.py", line 319, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) TypeError: can't use a string pattern on a bytes-like object Swaroop: What encoding would be the JSON File content? You can try by passing the encoding argument to the load method. I tried latin1 and ascii, did not help. Few more things to note: - The above TypeError was introduced by the fix of Issue2834. - There are also bugs open in other modules (shutil, imaplib) where problems with str<->bytes conversions are observed. -- components: +Library (Lib) -None nosy: +orsenthil type: -> behavior ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3763> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol()
Senthil <[EMAIL PROTECTED]> added the comment: issue3763 mentions about the similar problem with json library. The traceback posted illustrates the issue (c) mentioned here: File "C:\Python30\lib\json\decoder.py", line 30, in errmsg lineno, colno = linecol(doc, pos) File "C:\Python30\lib\json\decoder.py", line 21, in linecol lineno = doc.count('\n', 0, pos) + 1 TypeError: expected an object with the buffer interface -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3623> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3704] cookielib doesn't handle URLs with / in parameters
Senthil <[EMAIL PROTECTED]> added the comment: The patch and tests look fine to me, Gregory. I verified it against the trunk. Should not we have it for py3k as well? -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3704> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3714] nntplib module broken by str to unicode conversion
Senthil <[EMAIL PROTECTED]> added the comment: I verified the patch against the trunk. It works fine and solves the issue. But, I have a minor concern over 'ascii' as the default encoding, which you have chosen. For e.g, when I ran python3.0 nntplib.py (It would run tests, as the module does not have an explicit test), I got the following error due to encoding. (tests read comp.lang.python) UnicodeDecodeError: 'ascii' codec can't decode byte 0x93 in position 29: ordinal not in range(128) Setting the encoding to 'latin1', it passed. Would 'latin1' be a better default encoding? Or should we leave it as 'ascii'. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3714> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3714] nntplib module broken by str to unicode conversion
Senthil <[EMAIL PROTECTED]> added the comment: When the default encoding 'ascii' failed, I tried, 'utf-8', even that failed to retrieve the message headers from comp.lang.python. 'latin1' succeeded. That was reason for my suggestion, considering 'latin1' to be superset of 'ascii'. But, yes checking the encoding at the server and using that would be a good idea. The for the default, we could follow whatever RFC3977 recommends. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3714> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3714] nntplib module broken by str to unicode conversion
Senthil <[EMAIL PROTECTED]> added the comment: So, in effect, if we settle for ASCII as the default encoding, then the attached patch is good enough. Someone should check this in. Should it go in py3k, release? Because, without this patch(which is again simple), nntplib is almost unusable. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3714> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3819] urllib2 sends Basic auth across redirects
Senthil <[EMAIL PROTECTED]> added the comment: 1) The section you refer to is 1.2 of RFC2617, which specifies the details on Access Authentication in General and not specific to url redirects. So, I don't think we should take it as a referece. 2) Under the section - 3.3 Digest Operation, the Authentication cases under redirection is provided like this. (search for keyword 'redirect') """ The client will retry the request, at which time the server might respond with a 301/302 redirection, pointing to the URI on the second server. The client will follow the redirection, and pass an Authorization header , including the data... """ This basically states that Authorization header should be passed on the redirects in Digest authentication case and (should we assume in Basic Authentication case also?) If yes, then urllib2 is actually doing the same thing. Do you have a practical scenario where this has resulted in failure/ security loophole? -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3819> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3878] urllib2 is not working with proxy for HTTPS
Senthil <[EMAIL PROTECTED]> added the comment: Anupam, if you are in a hurry, please patch your installation with patches uploaded to this Issue1424152. Otherwise, you got to wait for 2.6.1 or 3.0.1 for the above fix to come as a release. This is a duplicate issue, can be closed. Thanks. -- nosy: +orsenthil ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3878> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3819] urllib2 sends Basic auth across redirects
Senthil <[EMAIL PROTECTED]> added the comment: This is working as designed and Requestor has not supplied any further information on why he thinks it a bug. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3819> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com