Browse Source

Merge remote-tracking branch 'jonozzz/develop' into develop

Conflicts:
	CHANGES.txt
main
Mathieu Le Marec - Pasquet 10 years ago
parent
commit
87007280cf
7 changed files with 21 additions and 18 deletions
  1. +1
    -1
      CHANGES.txt
  2. +0
    -2
      README.txt
  3. +0
    -1
      setup.py
  4. +7
    -3
      src/SOAPpy/Client.py
  5. +6
    -7
      src/SOAPpy/Parser.py
  6. +3
    -4
      src/SOAPpy/SOAPBuilder.py
  7. +4
    -0
      src/SOAPpy/Types.py

+ 1
- 1
CHANGES.txt View File

@@ -3,7 +3,7 @@ CHANGELOG

0.12.6 (unreleased)
-----------------------
- Nothing changed yet
- Remove dependency on fpconst.

0.12.5 (2011-08-01)
-------------------


+ 0
- 2
README.txt View File

@@ -123,8 +123,6 @@ USING GITHUB
REQUIRED PACKAGES
------------------

- fpconst 0.6.0 or later,
<http://research.warnes.net/projects/rzope/fpconst/>
- wstools




+ 0
- 1
setup.py View File

@@ -67,7 +67,6 @@ setup(
package_dir = {'': 'src'},
include_package_data=True,
install_requires=[
'fpconst',
'wstools',
]
)


+ 7
- 3
src/SOAPpy/Client.py View File

@@ -223,7 +223,7 @@ class HTTPTransport:
# if user is not a user:passwd format
# we'll receive a failure from the server. . .I guess (??)
if addr.user != None:
val = base64.encodestring(addr.user)
val = base64.encodestring(urllib.unquote_plus(addr.user))
r.putheader('Authorization','Basic ' + val.replace('\012',''))

# This fixes sending either "" or "None"
@@ -283,13 +283,17 @@ class HTTPTransport:
except:
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:
# Content-Length missing or invalid; just read the whole socket
# This won't work with HTTP/1.1 chunked encoding
data = r.getfile().read()
data = f.read()
message_len = len(data)
else:
data = r.getfile().read(message_len)
data = f.read(message_len)

if(config.debug):
print "code=",code


+ 6
- 7
src/SOAPpy/Parser.py View File

@@ -5,7 +5,6 @@ from NS import NS
from Utilities import *

import string
import fpconst
import xml.sax
from wstools.XMLname import fromXMLname

@@ -909,22 +908,22 @@ class SOAPParser(xml.sax.handler.ContentHandler):

# Explicitly check for NaN and Infinities
if s == "nan":
d = fpconst.NaN
d = NaN
elif s[0:2]=="inf" or s[0:3]=="+inf":
d = fpconst.PosInf
d = PosInf
elif s[0:3] == "-inf":
d = fpconst.NegInf
d = NegInf
else :
d = float(s)

if config.strict_range:
if fpconst.isNaN(d):
if NaN == d:
if s[0:2] != 'nan':
raise ValueError, "invalid %s: %s" % (t[1], s)
elif fpconst.isNegInf(d):
elif NegInf == d:
if s[0:3] != '-inf':
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':
raise OverflowError, "%s too large: %s" % (t[1], s)
elif d < 0 and d < l[1]:


+ 3
- 4
src/SOAPpy/SOAPBuilder.py View File

@@ -38,7 +38,6 @@ from version import __version__

import cgi
from wstools.XMLname import toXMLname, fromXMLname
import fpconst

# SOAPpy modules
from Config import Config
@@ -333,11 +332,11 @@ class SOAPBuilder:
if Config.strict_range:
doubleType(obj)

if fpconst.isPosInf(obj):
if PosInf == obj:
obj = "INF"
elif fpconst.isNegInf(obj):
elif NegInf == obj:
obj = "-INF"
elif fpconst.isNaN(obj):
elif NaN == obj:
obj = "NaN"
else:
obj = repr(obj)


+ 4
- 0
src/SOAPpy/Types.py View File

@@ -53,6 +53,10 @@ from NS import NS
from Utilities import encodeHexString, cleanDate
from Config import Config

NaN = float('NaN')
PosInf = float('Inf')
NegInf = -PosInf

###############################################################################
# Utility functions
###############################################################################


Loading…
Cancel
Save