[Python-checkins] python/dist/src/Lib/idlelib NEWS.txt, 1.29, 1.30 rpc.py, 1.27, 1.28

kbk at users.sourceforge.net kbk at users.sourceforge.net
Wed Jan 21 14:21:13 EST 2004


Update of /cvsroot/python/python/dist/src/Lib/idlelib
In directory sc8-pr-cvs1:/tmp/cvs-serv20669

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().

M NEWS.txt
M rpc.py

Backport candidate.



Index: NEWS.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** NEWS.txt	21 Jan 2004 18:54:30 -0000	1.29
--- NEWS.txt	21 Jan 2004 19:21:11 -0000	1.30
***************
*** 4,7 ****
--- 4,15 ----
  *Release date: XX-XXX-2004*
  
+ - 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".
+ 
  - Added a Tk error dialog to run.py inform the user if the subprocess can't
    connect to the user GUI process.  Added a timeout to the GUI's listening

Index: rpc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/rpc.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** rpc.py	10 Sep 2003 02:42:18 -0000	1.27
--- rpc.py	21 Jan 2004 19:21:11 -0000	1.28
***************
*** 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 Python-checkins mailing list