Conflicts: CHANGES.txtmain
| @@ -3,7 +3,7 @@ CHANGELOG | |||||
| 0.12.6 (unreleased) | 0.12.6 (unreleased) | ||||
| ----------------------- | ----------------------- | ||||
| - Nothing changed yet | |||||
| - Remove dependency on fpconst. | |||||
| 0.12.5 (2011-08-01) | 0.12.5 (2011-08-01) | ||||
| ------------------- | ------------------- | ||||
| @@ -123,8 +123,6 @@ USING GITHUB | |||||
| REQUIRED PACKAGES | REQUIRED PACKAGES | ||||
| ------------------ | ------------------ | ||||
| - fpconst 0.6.0 or later, | |||||
| <http://research.warnes.net/projects/rzope/fpconst/> | |||||
| - wstools | - wstools | ||||
| @@ -67,7 +67,6 @@ setup( | |||||
| package_dir = {'': 'src'}, | package_dir = {'': 'src'}, | ||||
| include_package_data=True, | include_package_data=True, | ||||
| install_requires=[ | install_requires=[ | ||||
| 'fpconst', | |||||
| 'wstools', | 'wstools', | ||||
| ] | ] | ||||
| ) | ) | ||||
| @@ -223,7 +223,7 @@ class HTTPTransport: | |||||
| # if user is not a user:passwd format | # if user is not a user:passwd format | ||||
| # we'll receive a failure from the server. . .I guess (??) | # we'll receive a failure from the server. . .I guess (??) | ||||
| if addr.user != None: | if addr.user != None: | ||||
| val = base64.encodestring(addr.user) | |||||
| val = base64.encodestring(urllib.unquote_plus(addr.user)) | |||||
| r.putheader('Authorization','Basic ' + val.replace('\012','')) | r.putheader('Authorization','Basic ' + val.replace('\012','')) | ||||
| # This fixes sending either "" or "None" | # This fixes sending either "" or "None" | ||||
| @@ -283,13 +283,17 @@ class HTTPTransport: | |||||
| except: | except: | ||||
| message_len = -1 | message_len = -1 | ||||
| f = r.getfile() | |||||
| if f is None: | |||||
| raise HTTPError(code, "Empty response from server\nCode: %s\nHeaders: %s" % (msg, headers)) | |||||
| if message_len < 0: | if message_len < 0: | ||||
| # Content-Length missing or invalid; just read the whole socket | # Content-Length missing or invalid; just read the whole socket | ||||
| # This won't work with HTTP/1.1 chunked encoding | # This won't work with HTTP/1.1 chunked encoding | ||||
| data = r.getfile().read() | |||||
| data = f.read() | |||||
| message_len = len(data) | message_len = len(data) | ||||
| else: | else: | ||||
| data = r.getfile().read(message_len) | |||||
| data = f.read(message_len) | |||||
| if(config.debug): | if(config.debug): | ||||
| print "code=",code | print "code=",code | ||||
| @@ -5,7 +5,6 @@ from NS import NS | |||||
| from Utilities import * | from Utilities import * | ||||
| import string | import string | ||||
| import fpconst | |||||
| import xml.sax | import xml.sax | ||||
| from wstools.XMLname import fromXMLname | from wstools.XMLname import fromXMLname | ||||
| @@ -909,22 +908,22 @@ class SOAPParser(xml.sax.handler.ContentHandler): | |||||
| # Explicitly check for NaN and Infinities | # Explicitly check for NaN and Infinities | ||||
| if s == "nan": | if s == "nan": | ||||
| d = fpconst.NaN | |||||
| d = NaN | |||||
| elif s[0:2]=="inf" or s[0:3]=="+inf": | elif s[0:2]=="inf" or s[0:3]=="+inf": | ||||
| d = fpconst.PosInf | |||||
| d = PosInf | |||||
| elif s[0:3] == "-inf": | elif s[0:3] == "-inf": | ||||
| d = fpconst.NegInf | |||||
| d = NegInf | |||||
| else : | else : | ||||
| d = float(s) | d = float(s) | ||||
| if config.strict_range: | if config.strict_range: | ||||
| if fpconst.isNaN(d): | |||||
| if NaN == d: | |||||
| if s[0:2] != 'nan': | if s[0:2] != 'nan': | ||||
| raise ValueError, "invalid %s: %s" % (t[1], s) | raise ValueError, "invalid %s: %s" % (t[1], s) | ||||
| elif fpconst.isNegInf(d): | |||||
| elif NegInf == d: | |||||
| if s[0:3] != '-inf': | if s[0:3] != '-inf': | ||||
| raise UnderflowError, "%s too small: %s" % (t[1], s) | raise UnderflowError, "%s too small: %s" % (t[1], s) | ||||
| elif fpconst.isPosInf(d): | |||||
| elif PosInf == d: | |||||
| if s[0:2] != 'inf' and s[0:3] != '+inf': | if s[0:2] != 'inf' and s[0:3] != '+inf': | ||||
| raise OverflowError, "%s too large: %s" % (t[1], s) | raise OverflowError, "%s too large: %s" % (t[1], s) | ||||
| elif d < 0 and d < l[1]: | elif d < 0 and d < l[1]: | ||||
| @@ -38,7 +38,6 @@ from version import __version__ | |||||
| import cgi | import cgi | ||||
| from wstools.XMLname import toXMLname, fromXMLname | from wstools.XMLname import toXMLname, fromXMLname | ||||
| import fpconst | |||||
| # SOAPpy modules | # SOAPpy modules | ||||
| from Config import Config | from Config import Config | ||||
| @@ -333,11 +332,11 @@ class SOAPBuilder: | |||||
| if Config.strict_range: | if Config.strict_range: | ||||
| doubleType(obj) | doubleType(obj) | ||||
| if fpconst.isPosInf(obj): | |||||
| if PosInf == obj: | |||||
| obj = "INF" | obj = "INF" | ||||
| elif fpconst.isNegInf(obj): | |||||
| elif NegInf == obj: | |||||
| obj = "-INF" | obj = "-INF" | ||||
| elif fpconst.isNaN(obj): | |||||
| elif NaN == obj: | |||||
| obj = "NaN" | obj = "NaN" | ||||
| else: | else: | ||||
| obj = repr(obj) | obj = repr(obj) | ||||
| @@ -53,6 +53,10 @@ from NS import NS | |||||
| from Utilities import encodeHexString, cleanDate | from Utilities import encodeHexString, cleanDate | ||||
| from Config import Config | from Config import Config | ||||
| NaN = float('NaN') | |||||
| PosInf = float('Inf') | |||||
| NegInf = -PosInf | |||||
| ############################################################################### | ############################################################################### | ||||
| # Utility functions | # Utility functions | ||||
| ############################################################################### | ############################################################################### | ||||