| @@ -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) | ||||
| ------------------- | ------------------- | ||||
| @@ -122,8 +122,6 @@ USING GITHUB | |||||
| REQUIRED PACKAGES | REQUIRED PACKAGES | ||||
| ------------------ | ------------------ | ||||
| - fpconst 0.6.0 or later, | |||||
| <http://research.warnes.net/projects/rzope/fpconst/> | |||||
| - wstools | - wstools | ||||
| @@ -66,7 +66,6 @@ setup( | |||||
| package_dir = {'': 'src'}, | package_dir = {'': 'src'}, | ||||
| include_package_data=True, | include_package_data=True, | ||||
| install_requires=[ | install_requires=[ | ||||
| 'fpconst', | |||||
| 'wstools', | 'wstools', | ||||
| ] | ] | ||||
| ) | ) | ||||
| @@ -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 | ||||
| @@ -330,11 +329,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 | ||||
| ############################################################################### | ############################################################################### | ||||