[issue13104] urllib.request.thishost() returns a garbage value
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13104] urllib.request.thishost() returns a garbage value
Stefan Krah stefan-use...@bytereef.org added the comment: /etc/hosts was incomplete; works fine now. Closing again. -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13104] urllib.request.thishost() returns a garbage value
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 805a0a1e3c2b by Senthil Kumaran in branch '3.2': Issue13104 - Fix urllib.request.thishost() utility function. http://hg.python.org/cpython/rev/805a0a1e3c2b New changeset a228e59ad693 by Senthil Kumaran in branch 'default': merge from 3.2. Issue13104 - Fix urllib.request.thishost() utility function. http://hg.python.org/cpython/rev/a228e59ad693 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13104] urllib.request.thishost() returns a garbage value
Senthil Kumaran sent...@uthcode.com added the comment: Thanks for the report. This is fixed now. I hope in 3.3 I remove this old utility functions. (real soon). -- assignee: - orsenthil resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13104] urllib.request.thishost() returns a garbage value
STINNER Victor victor.stin...@haypocalc.com added the comment: There is a failure on FreeBSD 8.2 buildbot: http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/1104/steps/test/logs/stdio == ERROR: test_thishost (test.test_urllib.Utility_Tests) Test the urllib.request.thishost utility function returns a tuple -- Traceback (most recent call last): File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_urllib.py, line 1063, in test_thishost self.assertIsInstance(urllib.request.thishost(), tuple) File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/urllib/request.py, line 2128, in thishost _thishost = tuple(socket.gethostbyname_ex(socket.gethostname())[2]) socket.gaierror: [Errno 8] hostname nor servname provided, or not known -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13104] urllib.request.thishost() returns a garbage value
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13104] urllib.request.thishost() returns a garbage value
Senthil Kumaran sent...@uthcode.com added the comment: hmm. interesting case in FreeBSD. Looks like socket.gethostname() did not return the hostname in freebsd buildbot. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13104] urllib.request.thishost() returns a garbage value
New submission from Deokhwan Kim d...@csail.mit.edu: There is a minor typo in Lib/urllib/request.py:thishost(). Because of it, the thishost() function is returning a garbage value: import urllib.request urllib.request.thishost() ('XXX.X.XXX.com', ['X.X.XXX.com'], ['123.45.67.89']) It is expected to return the IP addresses of the current host, so the correct return value would be like: urllib.request.thishost.__doc__ 'Return the IP addresses of the current host.' urllib.request.thishost() ('127.0.0.1', '127.0.1.1') The attached patch will fix the mistake . -- components: Library (Lib) files: thishost.patch keywords: patch messages: 144929 nosy: dkim priority: normal severity: normal status: open title: urllib.request.thishost() returns a garbage value type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file23316/thishost.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13104] urllib.request.thishost() returns a garbage value
Changes by Ned Deily n...@acm.org: -- nosy: +orsenthil stage: - patch review versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13104] urllib.request.thishost() returns a garbage value
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: patch review - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com