[ZODB-Dev] [Where to submit bugs for ZODB3-3.1b1] - ZEO - Linux-only dependency??

Ury Marshak um@hottech-israel.com
Mon, 23 Sep 2002 23:07:58 +0200


> Can you try this patch, which uses select.select()?  (There's no test
> suite for this, and I have no time to write one right now, but I think
> this should do it -- it's pretty straightforward.)

Thanks, I tried the patch and it almost worked:
when there is something to read, and we go into select.select the
second time we die with the following:

  File "C:\Python22\Lib\site-packages\ZEO\ClientStorage.py", line 178, in
update
    self._server._update()
  File "lib.win32-2.2\ZEO\ServerStub.py", line 22, in _update
  File "C:\Python22\Lib\site-packages\ZEO\zrpc\connection.py", line 400, in
pending
    r, w, x = select.select(r_in, w_in, x_in, 0)
error: (0, 'Error')

For now I changed the code to ignore the error and exit the loop:
            except select.error, err:
                if err[0] == errno.EINTR:
                    continue
                elif err[0] == 0:
                    break
                else:
                    raise
and it seems to function. (Must be one of those famous
'Fatal Error: Success.' Windows messages :)

Oh, and I forgot to mention that the Connection.py looks for a 'sync'
attribute on the storage, and ClientStorage has 'update', for now I just
added  'def sync(self): self.update()'  to the ClientStorage.

Thanks,
Ury

( Python 2.2.1, Windows XP )