Skip to content

Commit

Permalink
Renamed package to asyncsuds
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyar authored and kamyar committed May 14, 2015
1 parent d596b53 commit e757210
Show file tree
Hide file tree
Showing 84 changed files with 660 additions and 913 deletions.
File renamed without changes.
26 changes: 13 additions & 13 deletions suds/bindings/binding.py → asyncsuds/bindings/binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
"""

from suds import *
from suds.sax import Namespace
from suds.sax.document import Document
from suds.sax.element import Element
from suds.sudsobject import Factory
from suds.mx import Content
from suds.mx.literal import Literal as MxLiteral
from suds.umx.typed import Typed as UmxTyped
from suds.bindings.multiref import MultiRef
from suds.xsd.query import TypeQuery, ElementQuery
from suds.xsd.sxbasic import Element as SchemaElement
from suds.options import Options
from suds.plugin import PluginContainer
from asyncsuds import *
from asyncsuds.sax import Namespace
from asyncsuds.sax.document import Document
from asyncsuds.sax.element import Element
from asyncsuds.sudsobject import Factory
from asyncsuds.mx import Content
from asyncsuds.mx.literal import Literal as MxLiteral
from asyncsuds.umx.typed import Typed as UmxTyped
from asyncsuds.bindings.multiref import MultiRef
from asyncsuds.xsd.query import TypeQuery, ElementQuery
from asyncsuds.xsd.sxbasic import Element as SchemaElement
from asyncsuds.options import Options
from asyncsuds.plugin import PluginContainer

from copy import deepcopy

Expand Down
8 changes: 4 additions & 4 deletions suds/bindings/document.py → asyncsuds/bindings/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"""

from suds import *
from suds.argparser import parse_args
from suds.bindings.binding import Binding
from suds.sax.element import Element
from asyncsuds import *
from asyncsuds.argparser import parse_args
from asyncsuds.bindings.binding import Binding
from asyncsuds.sax.element import Element


class Document(Binding):
Expand Down
4 changes: 2 additions & 2 deletions suds/bindings/multiref.py → asyncsuds/bindings/multiref.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Provides classes for handling soap multirefs.
"""

from suds import *
from suds.sax.element import Element
from asyncsuds import *
from asyncsuds.sax.element import Element


soapenc = (None, 'http://schemas.xmlsoap.org/soap/encoding/')
Expand Down
10 changes: 5 additions & 5 deletions suds/bindings/rpc.py → asyncsuds/bindings/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"""

from suds import *
from suds.mx.encoded import Encoded as MxEncoded
from suds.umx.encoded import Encoded as UmxEncoded
from suds.bindings.binding import Binding, envns
from suds.sax.element import Element
from asyncsuds import *
from asyncsuds.mx.encoded import Encoded as MxEncoded
from asyncsuds.umx.encoded import Encoded as UmxEncoded
from asyncsuds.bindings.binding import Binding, envns
from asyncsuds.sax.element import Element


encns = ("SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/")
Expand Down
4 changes: 2 additions & 2 deletions suds/builder.py → asyncsuds/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
The I{builder} module provides an wsdl/xsd defined types factory
"""

from suds import *
from suds.sudsobject import Factory
from asyncsuds import *
from asyncsuds.sudsobject import Factory


class Builder:
Expand Down
14 changes: 7 additions & 7 deletions suds/cache.py → asyncsuds/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"""

import suds
import suds.sax.element
import suds.sax.parser
import asyncsuds
import asyncsuds.sax.element
import asyncsuds.sax.parser

import datetime
import os
Expand Down Expand Up @@ -196,7 +196,7 @@ def __check_version(self):
version = f.read()
finally:
f.close()
if version != suds.__version__:
if version != asyncsuds.__version__:
raise Exception()
except Exception:
self.clear()
Expand Down Expand Up @@ -288,7 +288,7 @@ def get(self, id):
fp = self._getf(id)
if fp is None:
return None
p = suds.sax.parser.Parser()
p = asyncsuds.sax.parser.Parser()
return p.parse(fp)
except Exception:
if fp is not None:
Expand All @@ -297,8 +297,8 @@ def get(self, id):

def put(self, id, object):
if isinstance(object,
(suds.sax.document.Document, suds.sax.element.Element)):
super(DocumentCache, self).put(id, suds.byte_str(str(object)))
(asyncsuds.sax.document.Document, asyncsuds.sax.element.Element)):
super(DocumentCache, self).put(id, asyncsuds.byte_str(str(object)))
return object


Expand Down
60 changes: 30 additions & 30 deletions suds/client.py → asyncsuds/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@
"""

import suds
from suds import *
import suds.bindings.binding
from suds.builder import Builder
import suds.cache
import suds.metrics as metrics
from suds.options import Options
from suds.plugin import PluginContainer
from suds.properties import Unskin
from suds.reader import DefinitionsReader
from suds.resolver import PathResolver
from suds.sax.document import Document
import suds.sax.parser
from suds.servicedefinition import ServiceDefinition
import suds.transport
import suds.transport.https
from suds.umx.basic import Basic as UmxBasic
from suds.wsdl import Definitions
from suds import sudsobject
import asyncsuds
from asyncsuds import *
import asyncsuds.bindings.binding
from asyncsuds.builder import Builder
import asyncsuds.cache
import asyncsuds.metrics as metrics
from asyncsuds.options import Options
from asyncsuds.plugin import PluginContainer
from asyncsuds.properties import Unskin
from asyncsuds.reader import DefinitionsReader
from asyncsuds.resolver import PathResolver
from asyncsuds.sax.document import Document
import asyncsuds.sax.parser
from asyncsuds.servicedefinition import ServiceDefinition
import asyncsuds.transport
import asyncsuds.transport.https
from asyncsuds.umx.basic import Basic as UmxBasic
from asyncsuds.wsdl import Definitions
from asyncsuds import sudsobject

from http.cookiejar import CookieJar
from copy import deepcopy
Expand Down Expand Up @@ -112,10 +112,10 @@ def __init__(self, url, **kwargs):
"""
options = Options()
options.transport = suds.transport.https.HttpAuthenticated()
options.transport = asyncsuds.transport.https.HttpAuthenticated()
self.options = options
if "cache" not in kwargs:
kwargs["cache"] = suds.cache.ObjectCache(days=1)
kwargs["cache"] = asyncsuds.cache.ObjectCache(days=1)
self.set_options(**kwargs)
self.url = url

Expand Down Expand Up @@ -195,9 +195,9 @@ def __init__(self):
def __str__(self):
s = ["\n"]
s.append("Suds ( https://fedorahosted.org/suds/ )")
s.append(" version: %s" % (suds.__version__,))
if suds.__build__:
s.append(" build: %s" % (suds.__build__,))
s.append(" version: %s" % (asyncsuds.__version__,))
if asyncsuds.__build__:
s.append(" build: %s" % (asyncsuds.__build__,))
for sd in self.sd_list:
s.append("\n\n%s" % (str(sd),))
return "".join(s)
Expand Down Expand Up @@ -747,15 +747,15 @@ def send(self, soapenv):
soapenv = ctx.envelope
if self.options.nosend:
return RequestContext(self.process_reply, soapenv)
request = suds.transport.Request(location, soapenv)
request = asyncsuds.transport.Request(location, soapenv)
request.headers = self.__headers()
try:
timer = metrics.Timer()
timer.start()
reply = yield from self.options.transport.send(request)
timer.stop()
metrics.log.debug("waited %s on server reply", timer)
except suds.transport.TransportError as e:
except asyncsuds.transport.TransportError as e:
content = e.fp and e.fp.read() or ""
return self.process_reply(content, e.httpcode, tostr(e))
return self.process_reply(reply, None, None)
Expand Down Expand Up @@ -851,7 +851,7 @@ def __get_fault(self, replyroot):
@rtype: L{Object}
"""
envns = suds.bindings.binding.envns
envns = asyncsuds.bindings.binding.envns
soapenv = replyroot and replyroot.getChild("Envelope", envns)
soapbody = soapenv and soapenv.getChild("Body", envns)
fault = soapbody and soapbody.getChild("Fault", envns)
Expand Down Expand Up @@ -921,13 +921,13 @@ def invoke(self, args, kwargs):
simulation = kwargs.pop(self.__injkey)
msg = simulation.get("msg")
if msg is not None:
assert msg.__class__ is suds.byte_str_class
assert msg.__class__ is asyncsuds.byte_str_class
return self.send(_parse(msg))
msg = self.method.binding.input.get_message(self.method, args, kwargs)
log.debug("inject (simulated) send message:\n%s", msg)
reply = simulation.get("reply")
if reply is not None:
assert reply.__class__ is suds.byte_str_class
assert reply.__class__ is asyncsuds.byte_str_class
status = simulation.get("status")
description = simulation.get("description")
if description is None:
Expand All @@ -950,4 +950,4 @@ def _parse(string):
"""
if string:
return suds.sax.parser.Parser().parse(string=string)
return asyncsuds.sax.parser.Parser().parse(string=string)
2 changes: 1 addition & 1 deletion suds/metrics.py → asyncsuds/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"""

import time
from suds import *
from asyncsuds import *
from math import modf

from logging import getLogger
Expand Down
12 changes: 6 additions & 6 deletions suds/mx/appender.py → asyncsuds/mx/appender.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
Provides appender classes for I{marshalling}.
"""

from suds import *
from suds.mx import *
from suds.sudsobject import footprint
from suds.sudsobject import Object, Property
from suds.sax.element import Element
from suds.sax.text import Text
from asyncsuds import *
from asyncsuds.mx import *
from asyncsuds.sudsobject import footprint
from asyncsuds.sudsobject import Object, Property
from asyncsuds.sax.element import Element
from asyncsuds.sax.text import Text


class Matcher:
Expand Down
6 changes: 3 additions & 3 deletions suds/mx/basic.py → asyncsuds/mx/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
Provides basic I{marshaller} classes.
"""

from suds import *
from suds.mx import *
from suds.mx.core import Core
from asyncsuds import *
from asyncsuds.mx import *
from asyncsuds.mx.core import Core


class Basic(Core):
Expand Down
12 changes: 6 additions & 6 deletions suds/mx/core.py → asyncsuds/mx/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
Provides I{marshaller} core classes.
"""

from suds import *
from suds.mx import *
from suds.mx.appender import ContentAppender
from suds.sax.element import Element
from suds.sax.document import Document
from suds.sudsobject import Property
from asyncsuds import *
from asyncsuds.mx import *
from asyncsuds.mx.appender import ContentAppender
from asyncsuds.sax.element import Element
from asyncsuds.sax.document import Document
from asyncsuds.sudsobject import Property

from logging import getLogger
log = getLogger(__name__)
Expand Down
12 changes: 6 additions & 6 deletions suds/mx/encoded.py → asyncsuds/mx/encoded.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
Provides encoded I{marshaller} classes.
"""

from suds import *
from suds.mx import *
from suds.mx.literal import Literal
from suds.mx.typer import Typer
from suds.sudsobject import Factory, Object
from suds.xsd.query import TypeQuery
from asyncsuds import *
from asyncsuds.mx import *
from asyncsuds.mx.literal import Literal
from asyncsuds.mx.typer import Typer
from asyncsuds.sudsobject import Factory, Object
from asyncsuds.xsd.query import TypeQuery


#
Expand Down
14 changes: 7 additions & 7 deletions suds/mx/literal.py → asyncsuds/mx/literal.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
Provides literal I{marshaller} classes.
"""

from suds import *
from suds.mx import *
from suds.mx.core import Core
from suds.mx.typer import Typer
from suds.resolver import GraphResolver, Frame
from suds.sax.element import Element
from suds.sudsobject import Factory
from asyncsuds import *
from asyncsuds.mx import *
from asyncsuds.mx.core import Core
from asyncsuds.mx.typer import Typer
from asyncsuds.resolver import GraphResolver, Frame
from asyncsuds.sax.element import Element
from asyncsuds.sudsobject import Factory

from logging import getLogger
log = getLogger(__name__)
Expand Down
8 changes: 4 additions & 4 deletions suds/mx/typer.py → asyncsuds/mx/typer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
Provides sx typing classes.
"""

from suds import *
from suds.mx import *
from suds.sax import Namespace as NS
from suds.sax.text import Text
from asyncsuds import *
from asyncsuds.mx import *
from asyncsuds.sax import Namespace as NS
from asyncsuds.sax.text import Text


class Typer:
Expand Down
12 changes: 6 additions & 6 deletions suds/options.py → asyncsuds/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
Suds basic options classes.
"""

from suds.cache import Cache, NoCache
from suds.properties import *
from suds.store import DocumentStore, defaultDocumentStore
from suds.transport import Transport
from suds.wsse import Security
from suds.xsd.doctor import Doctor
from asyncsuds.cache import Cache, NoCache
from asyncsuds.properties import *
from asyncsuds.store import DocumentStore, defaultDocumentStore
from asyncsuds.transport import Transport
from asyncsuds.wsse import Security
from asyncsuds.xsd.doctor import Doctor


class TpLinker(AutoLinker):
Expand Down
2 changes: 1 addition & 1 deletion suds/plugin.py → asyncsuds/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"""

from suds import *
from asyncsuds import *

from logging import getLogger
log = getLogger(__name__)
Expand Down
File renamed without changes.
Loading

0 comments on commit e757210

Please sign in to comment.