Group :: Desenvolvimento/Python
RPM: python3-module-pysimplesoap
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: python-pysimplesoap-1.16.2-cStringIO.patch
Download
Download
diff --git a/pysimplesoap/c14n.py b/pysimplesoap/c14n.py
index 5749e49..6effd0c 100644
--- a/pysimplesoap/c14n.py
+++ b/pysimplesoap/c14n.py
@@ -55,11 +55,7 @@ except:
class XMLNS:
BASE = "http://www.w3.org/2000/xmlns/"
XML = "http://www.w3.org/XML/1998/namespace"
-try:
- import cStringIO
- StringIO = cStringIO
-except ImportError:
- import StringIO
+import io
_attrs = lambda E: (E.attributes and E.attributes.values()) or []
_children = lambda E: E.childNodes or []
@@ -428,6 +424,6 @@ def Canonicalize(node, output=None, **kw):
if output:
apply(_implementation, (node, output.write), kw)
else:
- s = StringIO.StringIO()
+ s = io.StringIO()
apply(_implementation, (node, s.write), kw)
return s.getvalue()
diff --git a/pysimplesoap/transport.py b/pysimplesoap/transport.py
index 8e541d1..45ef8d9 100644
--- a/pysimplesoap/transport.py
+++ b/pysimplesoap/transport.py
@@ -166,13 +166,7 @@ try:
except ImportError:
pass
else:
- try:
- from cStringIO import StringIO
- except ImportError:
- try:
- from StringIO import StringIO
- except ImportError:
- from io import StringIO
+ from io import StringIO
class pycurlTransport(TransportBase):
_wrapper_version = pycurl.version
diff --git a/pysimplesoap/xmlsec.py b/pysimplesoap/xmlsec.py
index 2f96df7..053149f 100644
--- a/pysimplesoap/xmlsec.py
+++ b/pysimplesoap/xmlsec.py
@@ -15,7 +15,7 @@ from __future__ import print_function
import base64
import hashlib
import os
-from cStringIO import StringIO
+from io import StringIO
from M2Crypto import BIO, EVP, RSA, X509, m2
# if lxml is not installed, use c14n.py native implementation