python-dns/EL6_fixes.patch
Avram Lubkin 9bd454d285 Update to 1.12.0GITa4774ee
- Latest Snapshot
- Drop EPEL5 from master spec
- Patch to support EL6
- Disable python2 package for EPEL7+
2016-02-12 18:32:19 +08:00

63 lines
1.9 KiB
Diff

diff -ruN a/tests/test_dnssec.py b/tests/test_dnssec.py
--- a/tests/test_dnssec.py 2015-06-13 20:26:21.000000000 +0800
+++ b/tests/test_dnssec.py 2016-02-12 14:14:10.556941459 +0800
@@ -13,7 +13,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-import unittest
+import unittest2 as unittest
import dns.dnssec
import dns.name
diff -ruN a/tests/test_exceptions.py b/tests/test_exceptions.py
--- a/tests/test_exceptions.py 2015-06-13 20:26:21.000000000 +0800
+++ b/tests/test_exceptions.py 2016-02-12 14:13:58.496896295 +0800
@@ -14,7 +14,7 @@
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
import binascii
-import unittest
+import unittest2 as unittest
from dns.exception import DNSException
diff -ruN a/tests/test_rdtypeanyeui.py a_patch/tests/test_rdtypeanyeui.py
--- a/tests/test_rdtypeanyeui.py 2016-01-09 08:16:49.000000000 +0800
+++ b/tests/test_rdtypeanyeui.py 2016-02-12 17:57:19.699264077 +0800
@@ -14,7 +14,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-import unittest
+import unittest2 as unittest
try:
from StringIO import StringIO
except ImportError:
diff -ruN a/dns/tokenizer.py a_patch/dns/tokenizer.py
--- a/dns/tokenizer.py 2015-06-13 20:26:21.000000000 +0800
+++ b/dns/tokenizer.py 2016-02-12 17:48:41.339066543 +0800
@@ -15,6 +15,7 @@
"""Tokenize DNS master file format"""
+import StringIO
import cStringIO
import sys
@@ -196,7 +197,11 @@
"""
if isinstance(f, (str, unicode)):
- f = cStringIO.StringIO(f)
+ # cStringIO doesn't support unicode
+ if isinstance(f, unicode):
+ f = StringIO.StringIO(f)
+ else:
+ f = cStringIO.StringIO(f)
if filename is None:
filename = '<string>'
else: