summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron M. Ucko <ucko@debian.org>2021-02-09 22:06:38 -0500
committerAaron M. Ucko <ucko@debian.org>2021-02-09 22:06:38 -0500
commit8e972c83ab4134215cefc7e587fae222401212a1 (patch)
tree204af87725f8d4edc0adc9bde0bd4c3063284bf8
parent812841c2f5dfa5138d9d319a9034e2b2294a5bd1 (diff)
05-no-import-exceptions.patch (new): Belatedly bypass "exceptions".
This module was superfluous in Python 2, and is gone altogether in Python 3.
-rw-r--r--debian/changelog5
-rw-r--r--debian/patches/05-no-import-exceptions.patch25
-rw-r--r--debian/patches/series1
3 files changed, 30 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 521a5f0..60aa4f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,11 @@
python-dsv (1.4.1-11) UNRELEASED; urgency=medium
* NOT RELEASED YET.
+ * 05-no-import-exceptions.patch (new): Belatedly bypass "exceptions".
+ This module was superfluous in Python 2, and is gone altogether in
+ Python 3.
- -- Aaron M. Ucko <ucko@debian.org> Tue, 09 Feb 2021 22:03:46 -0500
+ -- Aaron M. Ucko <ucko@debian.org> Tue, 09 Feb 2021 22:06:34 -0500
python-dsv (1.4.1-10) unstable; urgency=medium
diff --git a/debian/patches/05-no-import-exceptions.patch b/debian/patches/05-no-import-exceptions.patch
new file mode 100644
index 0000000..93775d0
--- /dev/null
+++ b/debian/patches/05-no-import-exceptions.patch
@@ -0,0 +1,25 @@
+--- a/DSV/DSV.py
++++ b/DSV/DSV.py
+@@ -128,7 +128,6 @@ import sys
+ # import pre as re # sre was broken, appears okay now. Try this if there are problems.
+ import re
+ import copy
+-import exceptions
+ import string
+ ## RedHat 8.0 (or rather GTK2?) sets LANG = en_us.UTF-8 and apparently some
+ ## older apps (including wxGTK) can't handle this. The fix is to set LANG=C
+@@ -147,10 +146,10 @@ try:
+ except ImportError:
+ wx = None
+
+-class InvalidDelimiter(exceptions.StandardError): pass
+-class InvalidTextQualifier(exceptions.StandardError): pass
+-class InvalidData(exceptions.StandardError): pass
+-class InvalidNumberOfColumns(exceptions.StandardError): pass
++class InvalidDelimiter(StandardError): pass
++class InvalidTextQualifier(StandardError): pass
++class InvalidData(StandardError): pass
++class InvalidNumberOfColumns(StandardError): pass
+
+ # ------------------------------------------------------------------------------
+ def guessTextQualifier(input):
diff --git a/debian/patches/series b/debian/patches/series
index 00fb96a..a67d04a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
02-wx-namespace-transition.patch
03-avoid-unicoditis.patch
04-wx3.0-compat.patch
+05-no-import-exceptions.patch