| 1 |
diff -urN CherryPy-3.0.0RC1.orig/cherrypy/_cptools.py CherryPy-3.0.0RC1/cherrypy/_cptools.py |
|---|
| 2 |
--- CherryPy-3.0.0RC1.orig/cherrypy/_cptools.py 2006-11-26 02:14:58.000000000 +0900 |
|---|
| 3 |
+++ CherryPy-3.0.0RC1/cherrypy/_cptools.py 2006-11-29 10:59:21.000000000 +0900 |
|---|
| 4 |
|
|---|
| 5 |
setattr(self, arg, None) |
|---|
| 6 |
except (ImportError, AttributeError): |
|---|
| 7 |
pass |
|---|
| 8 |
+ # IronPython 1.0 raises NotImplementedError because |
|---|
| 9 |
+ # inspect.getargspec tries to access Python bytecode |
|---|
| 10 |
+ # in co_code attribute. |
|---|
| 11 |
+ except NotImplementedError: |
|---|
| 12 |
+ pass |
|---|
| 13 |
|
|---|
| 14 |
def _merged_args(self, d=None): |
|---|
| 15 |
tm = cherrypy.request.toolmaps[self.namespace] |
|---|
| 16 |
diff -urN CherryPy-3.0.0RC1.orig/cherrypy/_cpwsgiserver.py CherryPy-3.0.0RC1/cherrypy/_cpwsgiserver.py |
|---|
| 17 |
--- CherryPy-3.0.0RC1.orig/cherrypy/_cpwsgiserver.py 2006-11-26 02:14:58.000000000 +0900 |
|---|
| 18 |
+++ CherryPy-3.0.0RC1/cherrypy/_cpwsgiserver.py 2006-11-29 11:37:00.000000000 +0900 |
|---|
| 19 |
|
|---|
| 20 |
# Copy the class environ into self. |
|---|
| 21 |
self.environ = self.environ.copy() |
|---|
| 22 |
|
|---|
| 23 |
- if type(sock) is socket.socket: |
|---|
| 24 |
+ if isinstance(sock, socket.SocketType): |
|---|
| 25 |
self.rfile = self.socket.makefile("r", self.rbufsize) |
|---|
| 26 |
self.wfile = self.socket.makefile("w", self.wbufsize) |
|---|
| 27 |
else: |
|---|
| 28 |
diff -urN CherryPy-3.0.0RC1.orig/cherrypy/lib/__init__.py CherryPy-3.0.0RC1/cherrypy/lib/__init__.py |
|---|
| 29 |
--- CherryPy-3.0.0RC1.orig/cherrypy/lib/__init__.py 2006-11-26 02:14:58.000000000 +0900 |
|---|
| 30 |
+++ CherryPy-3.0.0RC1/cherrypy/lib/__init__.py 2006-11-29 11:38:57.000000000 +0900 |
|---|
| 31 |
|
|---|
| 32 |
if not s: |
|---|
| 33 |
return s |
|---|
| 34 |
|
|---|
| 35 |
- import compiler |
|---|
| 36 |
+ try: |
|---|
| 37 |
+ import compiler |
|---|
| 38 |
+ except ImportError: |
|---|
| 39 |
+ # Fallback to eval when compiler package is not available, |
|---|
| 40 |
+ # e.g. IronPython 1.0. |
|---|
| 41 |
+ return eval(s) |
|---|
| 42 |
+ |
|---|
| 43 |
p = compiler.parse("a=" + s) |
|---|
| 44 |
obj = p.getChildren()[1].getChildren()[0].getChildren()[1] |
|---|
| 45 |
|
|---|