]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
unichr portability support
authorBob Halley <halley@dnspython.org>
Tue, 10 May 2016 16:57:17 +0000 (09:57 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 10 May 2016 16:57:17 +0000 (09:57 -0700)
dns/_compat.py
dns/name.py

index 88416ee06e45cc1d985879285d7d5f45aaf2d4c1..cffe4bb92790e4dda091c9a644c96f018336fe79 100644 (file)
@@ -13,7 +13,9 @@ if sys.version_info > (3,):
     text_type = str
     binary_type = bytes
     string_types = (str,)
+    unichr = chr
 else:
     text_type = unicode
     binary_type = str
     string_types = (basestring,)
+    unichr = unichr
index e8cb3513332b7730a670fd15a7643d1a3f7615ce..e5b0107b9f377015511f601cc012f7a0c3eaf29c 100644 (file)
@@ -30,8 +30,7 @@ import encodings.idna
 import dns.exception
 import dns.wiredata
 
-from ._compat import long, binary_type, text_type
-
+from ._compat import long, binary_type, text_type, unichr
 
 try:
     maxint = sys.maxint