Page MenuHomePhabricator

reflinks outdated catch of ValueError
Closed, ResolvedPublic

Description

reflinks.py (original 2008 code 3a872a4d) includes

except ValueError:
    # Known bug of httplib, google for :
    # "httplib raises ValueError reading chunked content"
    continue

Googling reveals https://mail.python.org/pipermail/python-list/2006-March/407879.html (see email that follows: https://mail.python.org/pipermail/python-list/2006-March/398795.html )

A search on b.p.o reveals four issues which affect Python 2.4 and 2.5 only:

http://bugs.python.org/issue1486335
http://bugs.python.org/issue1205
http://bugs.python.org/issue1627
http://bugs.python.org/issue2645 (fixed in Python 2.6 alpha 1)

And one which affects Python 2.6.5 only (supported by Pywikibot, until T103063 is re-opened)

http://bugs.python.org/issue6312 (fixed in Python 2.6.6 rc 1 and Python 2.7 beta 2)

As issue 6312 :

  1. only affects HEAD requests to chunked transfers, and
  2. there is no HEAD request in reflinks.py ( weblinkchecker.py does use HEAD requests) and
  3. doesnt affect Python 2.6.6 which is our known user of Python 2.6
  4. we do not have an automated test platform configured to test Python 2.6.5 (e.g. appveyor https://github.com/ogrisel/python-appveyor-demo/issues/10)
  5. reflinks now uses requests, so there is an upstream library that can resolve these obscure problems if necessary

... this exception catch should be removed as it is extremely unlikely to be needed anymore, and wont be reached by coverage.

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb subscribed.

Change 264931 had a related patch set uploaded (by John Vandenberg):
Remove unneeded catching of httplib ValueError

https://gerrit.wikimedia.org/r/264931

jayvdb claimed this task.

Change 264931 merged by jenkins-bot:
Remove unneeded catching of httplib ValueError

https://gerrit.wikimedia.org/r/264931