[Idle-dev] CVS: idle NEWS.txt,1.28,1.29 rpc.py,1.26,1.27

Kurt B. Kaiser kbk at users.sourceforge.net
Wed Jan 21 14:45:21 EST 2004


Update of /cvsroot/idlefork/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv28446

Modified Files:
	NEWS.txt rpc.py 
Log Message:
rpc.py:SocketIO - Large modules were generating large pickles when downloaded
to the execution server.  The return of the OK response from the subprocess
initialization was interfering and causing the sending socket to be not
ready.  Add an IO ready test to fix this.  Moved the polling IO ready test
into pollpacket().

Fix typo in rpc.py, s/b "pickle.PicklingError" not "pickle.UnpicklingError".

M rpc.py  NEWS.txt


Index: NEWS.txt
===================================================================
RCS file: /cvsroot/idlefork/idle/NEWS.txt,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** NEWS.txt	5 Jan 2004 04:58:51 -0000	1.28
--- NEWS.txt	21 Jan 2004 19:45:19 -0000	1.29
***************
*** 8,11 ****
--- 8,19 ----
  *Release date: XX-XXX-2004*
  
+ - run.py:SocketIO - Large modules were generating large pickles when downloaded
+   to the execution server.  The return of the OK response from the subprocess
+   initialization was interfering and causing the sending socket to be not
+   ready.  Add an IO ready test to fix this.  Moved the polling IO ready test
+   into pollpacket().
+ 
+ - Fix typo in rpc.py, s/b "pickle.PicklingError" not "pickle.UnpicklingError".
+ 
  - Added a Tk error dialog to run.py inform the user if the subprocess can't
    connect to the user GUI process.  Added Tk error dialogs to PyShell.py to

Index: rpc.py
===================================================================
RCS file: /cvsroot/idlefork/idle/rpc.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** rpc.py	5 Jun 2003 23:51:28 -0000	1.26
--- rpc.py	21 Jan 2004 19:45:19 -0000	1.27
***************
*** 321,325 ****
          try:
              s = pickle.dumps(message)
!         except pickle.UnpicklingError:
              print >>sys.__stderr__, "Cannot pickle:", `message`
              raise
--- 321,325 ----
          try:
              s = pickle.dumps(message)
!         except pickle.PicklingError:
              print >>sys.__stderr__, "Cannot pickle:", `message`
              raise
***************
*** 327,331 ****
          while len(s) > 0:
              try:
!                 n = self.sock.send(s)
              except (AttributeError, socket.error):
                  # socket was closed
--- 327,332 ----
          while len(s) > 0:
              try:
!                 r, w, x = select.select([], [self.sock], [])
!                 n = self.sock.send(s[:BUFSIZE])
              except (AttributeError, socket.error):
                  # socket was closed
***************
*** 334,341 ****
                  s = s[n:]
  
-     def ioready(self, wait):
-         r, w, x = select.select([self.sock.fileno()], [], [], wait)
-         return len(r)
- 
      buffer = ""
      bufneed = 4
--- 335,338 ----
***************
*** 345,349 ****
          self._stage0()
          if len(self.buffer) < self.bufneed:
!             if not self.ioready(wait):
                  return None
              try:
--- 342,347 ----
          self._stage0()
          if len(self.buffer) < self.bufneed:
!             r, w, x = select.select([self.sock.fileno()], [], [], wait)
!             if len(r) == 0:
                  return None
              try:
***************
*** 378,382 ****
          try:
              message = pickle.loads(packet)
!         except:
              print >>sys.__stderr__, "-----------------------"
              print >>sys.__stderr__, "cannot unpickle packet:", `packet`
--- 376,380 ----
          try:
              message = pickle.loads(packet)
!         except pickle.UnpicklingError:
              print >>sys.__stderr__, "-----------------------"
              print >>sys.__stderr__, "cannot unpickle packet:", `packet`




More information about the IDLE-dev mailing list