[pypy-svn] r20178 - in pypy/dist/pypy: module/_socket module/_socket/rpython module/thread objspace objspace/std
arigo at codespeak.net
arigo at codespeak.net
Wed Nov 23 10:52:25 CET 2005
Author: arigo
Date: Wed Nov 23 10:52:20 2005
New Revision: 20178
Modified:
pypy/dist/pypy/module/_socket/interp_socket.py
pypy/dist/pypy/module/_socket/rpython/exttable.py
pypy/dist/pypy/module/thread/os_thread.py
pypy/dist/pypy/objspace/descroperation.py
pypy/dist/pypy/objspace/std/listobject.py
Log:
minor details lying around my working copy, like missing spaces in error
messages.
Modified: pypy/dist/pypy/module/_socket/interp_socket.py
==============================================================================
--- pypy/dist/pypy/module/_socket/interp_socket.py (original)
+++ pypy/dist/pypy/module/_socket/interp_socket.py Wed Nov 23 10:52:20 2005
@@ -76,8 +76,8 @@
def socket_strerror(errno):
try:
return os.strerror(errno)
- except TypeError:
- return errno
+ except ValueError:
+ return "socket error %d" % (errno,)
def wrap_socketerror(space, e):
assert isinstance(e, socket.error)
Modified: pypy/dist/pypy/module/_socket/rpython/exttable.py
==============================================================================
--- pypy/dist/pypy/module/_socket/rpython/exttable.py (original)
+++ pypy/dist/pypy/module/_socket/rpython/exttable.py Wed Nov 23 10:52:20 2005
@@ -7,6 +7,7 @@
from pypy.rpython.extfunctable import declare, declaretype, declareptrtype
from pypy.rpython.extfunctable import standardexceptions
from pypy.annotation.model import SomeTuple, SomeInteger, SomeString
+from pypy.annotation import classdef
module = 'pypy.module._socket.rpython.ll__socket'
@@ -45,3 +46,4 @@
# XXX a bit hackish
standardexceptions[_socket.error] = True
+classdef.FORCE_ATTRIBUTES_INTO_CLASSES[_socket.error] = {'errno': SomeInteger()}
Modified: pypy/dist/pypy/module/thread/os_thread.py
==============================================================================
--- pypy/dist/pypy/module/thread/os_thread.py (original)
+++ pypy/dist/pypy/module/thread/os_thread.py Wed Nov 23 10:52:20 2005
@@ -45,7 +45,7 @@
except OperationError, e:
if not e.match(space, space.w_SystemExit):
ident = thread.get_ident()
- where = 'thread %d started by' % ident
+ where = 'thread %d started by ' % ident
e.write_unraisable(space, where, w_callable)
e.clear(space)
Modified: pypy/dist/pypy/objspace/descroperation.py
==============================================================================
--- pypy/dist/pypy/objspace/descroperation.py (original)
+++ pypy/dist/pypy/objspace/descroperation.py Wed Nov 23 10:52:20 2005
@@ -581,7 +581,7 @@
elif _name not in ['is_', 'id','type','issubtype',
# not really to be defined in DescrOperation
'ord']:
- raise Exception, "missing def for operation%s" % _name
+ raise Exception, "missing def for operation %s" % _name
Modified: pypy/dist/pypy/objspace/std/listobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/listobject.py (original)
+++ pypy/dist/pypy/objspace/std/listobject.py Wed Nov 23 10:52:20 2005
@@ -51,9 +51,7 @@
length = len(w_list.wrappeditems)
start, stop, step, slicelength = w_slice.indices4(length)
assert slicelength >= 0
- if step == 1 and stop >= start >= 0:
- assert stop >= 0
- assert start >= 0
+ if step == 1 and 0 <= start <= stop:
return W_ListObject(space, w_list.wrappeditems[start:stop])
w_res = W_ListObject(space, [None] * slicelength)
items_w = w_list.wrappeditems
More information about the Pypy-commit
mailing list