components/python/jsonrpclib/patches/python-issue-4978-workaround.patch
author Edward Pilatowicz <edward.pilatowicz@oracle.com>
Fri, 25 May 2012 16:03:38 -0700
changeset 832 d0946a4ddb78
permissions -rw-r--r--
PSARC/2012/198 python-jsonrpclib 7169490 userland-fetch and "McAfee Web Gateway" don't get along 7169491 integrate jsonrpclib into userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
832
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
     1
*** joshmarshall-jsonrpclib-e3a3cde/jsonrpclib/jsonrpc.py.orig	Thu Dec 15 09:46:35 2011
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
     2
--- joshmarshall-jsonrpclib-e3a3cde/jsonrpclib/jsonrpc.py	Thu Dec 15 09:48:42 2011
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
     3
***************
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
     4
*** 69,81 ****
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
     5
  except ImportError:
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
     6
      try:
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
     7
!         import json
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
     8
      except ImportError:
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
     9
!         try:
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    10
!             import simplejson as json
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    11
!         except ImportError:
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    12
!             raise ImportError(
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    13
!                 'You must have the cjson, json, or simplejson ' +
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    14
!                 'module(s) available.'
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    15
!             )
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    16
  
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    17
  IDCHARS = string.ascii_lowercase+string.digits
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    18
--- 69,81 ----
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    19
  except ImportError:
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    20
      try:
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    21
!         # use simplejson since it doesn't encode strings as unicode, which
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    22
!         # allows us to avoid python issue 4978.  (4978 causes json rpc calls
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    23
!         # using keword parameters to fail.)
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    24
!         import simplejson as json
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    25
      except ImportError:
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    26
!         raise ImportError(
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    27
!             'You must have the cjson or simplejson ' +
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    28
!             'module(s) available.'
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    29
!         )
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    30
  
d0946a4ddb78 PSARC/2012/198 python-jsonrpclib
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
diff changeset
    31
  IDCHARS = string.ascii_lowercase+string.digits