Here's the revised NMU diff.
diff -Nru linkchecker-7.9/debian/changelog linkchecker-7.9/debian/changelog --- linkchecker-7.9/debian/changelog 2012-07-23 23:03:31.000000000 -0400 +++ linkchecker-7.9/debian/changelog 2012-07-24 01:02:14.000000000 -0400 @@ -1,3 +1,12 @@ +linkchecker (7.9-2.2) unstable; urgency=low + + * Non-maintainer upload. + * Brown bag NMU, preview patch was wrong + * This will still work with either python version, by catching the + exception if the removed lists are missing (Closes: #681069) (really) + + -- Scott Kitterman <sc...@kitterman.com> Tue, 24 Jul 2012 00:46:43 -0400 + linkchecker (7.9-2.1) unstable; urgency=low * Non-maintainer upload. diff -Nru linkchecker-7.9/debian/patches/fix_2_7_3_breakage.patch linkchecker-7.9/debian/patches/fix_2_7_3_breakage.patch --- linkchecker-7.9/debian/patches/fix_2_7_3_breakage.patch 2012-07-23 23:05:55.000000000 -0400 +++ linkchecker-7.9/debian/patches/fix_2_7_3_breakage.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,57 +0,0 @@ -Description: Add url definition lists deleted from Python's urlparser.py - linkchecker (7.9-2.1) unstable; urgency=low - . - * Non-maintainer upload. - * Add url definition lists deleted from Python's urlparser.py to - linkcheckers' linkcheck/url.py and refer to the local copies to fix three - sources of crashes (the Python versions are present in 2.7.3~rc2 and - missing from 2.7.3 final - this patched version will work with either) - (Closes: #681069) -Author: Scott Kitterman <sc...@kitterman.com> -Bug-Debian: http://bugs.debian.org/681069 -Origin: <vendor> -Bug-Debian: http://bugs.debian.org/<bugnumber> -Forwarded: <no> -Last-Update: <2012-07-23> - ---- linkchecker-7.9.orig/linkcheck/url.py -+++ linkchecker-7.9/linkcheck/url.py -@@ -28,6 +28,17 @@ import socket - from . import httplib2 as httplib - from . import log, LOG_CHECK - -+# The following lists were removed from the final release of Python 2.7.3, so -+# they are replicated here so that linkchecker can make use of them. -+ -+non_hierarchical = ['gopher', 'hdl', 'mailto', 'news', -+ 'telnet', 'wais', 'imap', 'snews', 'sip', 'sips'] -+uses_query = ['http', 'wais', 'imap', 'https', 'shttp', 'mms', -+ 'gopher', 'rtsp', 'rtspu', 'sip', 'sips', ''] -+uses_fragment = ['ftp', 'hdl', 'http', 'gopher', 'news', -+ 'nntp', 'wais', 'https', 'shttp', 'snews', -+ 'file', 'prospero', ''] -+ - for scheme in ('ldap', 'irc'): - if scheme not in urlparse.uses_netloc: - urlparse.uses_netloc.append(scheme) -@@ -69,9 +80,9 @@ if sys.version_info[0] > 2 or sys.versio - scheme, url = url[:i].lower(), url[i+1:] - if url[:2] == '//': - netloc, url = urlparse._splitnetloc(url, 2) -- if allow_fragments and scheme in urlparse.uses_fragment and '#' in url: -+ if allow_fragments and scheme in uses_fragment and '#' in url: - url, fragment = url.split('#', 1) -- if scheme in urlparse.uses_query and '?' in url: -+ if scheme in uses_query and '?' in url: - url, query = url.split('?', 1) - v = urlparse.SplitResult(scheme, netloc, url, query, fragment) - urlparse._parse_cache[key] = v -@@ -344,7 +355,7 @@ def url_norm (url, encoding=None): - is_idn = url_fix_host(urlparts) - # query - urlparts[3] = url_parse_query(urlparts[3], encoding=encoding) -- is_hierarchical = urlparts[0] not in urlparse.non_hierarchical -+ is_hierarchical = urlparts[0] not in non_hierarchical - if is_hierarchical: - # URL has a hierarchical path we should norm - if not urlparts[2]: diff -Nru linkchecker-7.9/debian/patches/fix_python_2_7_3_urlparser.patch linkchecker-7.9/debian/patches/fix_python_2_7_3_urlparser.patch --- linkchecker-7.9/debian/patches/fix_python_2_7_3_urlparser.patch 1969-12-31 19:00:00.000000000 -0500 +++ linkchecker-7.9/debian/patches/fix_python_2_7_3_urlparser.patch 2012-07-24 00:50:37.000000000 -0400 @@ -0,0 +1,50 @@ +Description: Catch the exception caused by removed lists in urlparser + TODO: Put a short summary on the line above and replace this paragraph + with a longer explanation of this change. Complete the meta-information + with other relevant fields (see below for details). To make it easier, the + information below has been extracted from the changelog. Adjust it or drop + it. + . + linkchecker (7.9-2.2) unstable; urgency=low + . + * Non-maintainer upload. + * Borwn bag NMU, preview patch was wrong + * This will still work with either python version, by catching the + exception if the removed lists are missing (Closes: #681069) (really) +Author: Scott Kitterman <sc...@kitterman.com> +Bug-Debian: http://bugs.debian.org/681069 +Origin: <vendor> +Last-Update: <2012-07-24> + +--- linkchecker-7.9.orig/linkcheck/url.py ++++ linkchecker-7.9/linkcheck/url.py +@@ -69,10 +69,13 @@ if sys.version_info[0] > 2 or sys.versio + scheme, url = url[:i].lower(), url[i+1:] + if url[:2] == '//': + netloc, url = urlparse._splitnetloc(url, 2) +- if allow_fragments and scheme in urlparse.uses_fragment and '#' in url: +- url, fragment = url.split('#', 1) +- if scheme in urlparse.uses_query and '?' in url: +- url, query = url.split('?', 1) ++ try: ++ if allow_fragments and scheme in urlparse.uses_fragment and '#' in url: ++ url, fragment = url.split('#', 1) ++ if scheme in urlparse.uses_query and '?' in url: ++ url, query = url.split('?', 1) ++ except AttributeError as errorstring: ++ print(errorstring) + v = urlparse.SplitResult(scheme, netloc, url, query, fragment) + urlparse._parse_cache[key] = v + return v +@@ -344,7 +347,10 @@ def url_norm (url, encoding=None): + is_idn = url_fix_host(urlparts) + # query + urlparts[3] = url_parse_query(urlparts[3], encoding=encoding) +- is_hierarchical = urlparts[0] not in urlparse.non_hierarchical ++ try: ++ is_hierarchical = urlparts[0] not in urlparse.non_hierarchical ++ except AttributeError as errorstring: ++ print(errorstring) + if is_hierarchical: + # URL has a hierarchical path we should norm + if not urlparts[2]: diff -Nru linkchecker-7.9/debian/patches/series linkchecker-7.9/debian/patches/series --- linkchecker-7.9/debian/patches/series 2012-07-23 23:04:03.000000000 -0400 +++ linkchecker-7.9/debian/patches/series 2012-07-24 00:48:58.000000000 -0400 @@ -1 +1 @@ -fix_2_7_3_breakage.patch +fix_python_2_7_3_urlparser.patch
signature.asc
Description: This is a digitally signed message part.