From 8e972c83ab4134215cefc7e587fae222401212a1 Mon Sep 17 00:00:00 2001 From: "Aaron M. Ucko" Date: Tue, 9 Feb 2021 22:06:38 -0500 Subject: 05-no-import-exceptions.patch (new): Belatedly bypass "exceptions". This module was superfluous in Python 2, and is gone altogether in Python 3. --- debian/changelog | 5 ++++- debian/patches/05-no-import-exceptions.patch | 25 +++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 debian/patches/05-no-import-exceptions.patch 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 Tue, 09 Feb 2021 22:03:46 -0500 + -- Aaron M. Ucko 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 -- cgit v1.2.3