[Python-checkins] python/dist/src/Lib asyncore.py, 1.40.12.1, 1.40.12.2 tarfile.py, 1.8.12.1, 1.8.12.2

anthonybaxter at users.sourceforge.net anthonybaxter at users.sourceforge.net
Thu Nov 6 08:57:51 EST 2003


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

Modified Files:
      Tag: release23-maint
	asyncore.py tarfile.py 
Log Message:
On RH10, the PIE additions to gcc mean that id() can sometimes be a very
large 32 bit int, which comes out as a negative int. Workaround this to
prevent warnings from the test suite and the std lib.


Index: asyncore.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v
retrieving revision 1.40.12.1
retrieving revision 1.40.12.2
diff -C2 -d -r1.40.12.1 -r1.40.12.2
*** asyncore.py	20 Oct 2003 14:34:45 -0000	1.40.12.1
--- asyncore.py	6 Nov 2003 13:57:49 -0000	1.40.12.2
***************
*** 228,232 ****
              except TypeError:
                  status.append(repr(self.addr))
!         return '<%s at %#x>' % (' '.join(status), id(self))
  
      def add_channel(self, map=None):
--- 228,235 ----
              except TypeError:
                  status.append(repr(self.addr))
!         # On some systems (RH10) id() can be a negative number. 
!         # work around this.
!         MAX = 2L*sys.maxint+1
!         return '<%s at %#x>' % (' '.join(status), id(self)&MAX)
  
      def add_channel(self, map=None):

Index: tarfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tarfile.py,v
retrieving revision 1.8.12.1
retrieving revision 1.8.12.2
diff -C2 -d -r1.8.12.1 -r1.8.12.2
*** tarfile.py	24 Oct 2003 17:47:57 -0000	1.8.12.1
--- tarfile.py	6 Nov 2003 13:57:49 -0000	1.8.12.2
***************
*** 650,654 ****
  
      def __repr__(self):
!         return "<%s %r at %#x>" % (self.__class__.__name__,self.name,id(self))
  
      def frombuf(cls, buf):
--- 650,658 ----
  
      def __repr__(self):
!         # On some systems (RH10) id() can be a negative number. 
!         # work around this.
!         MAX = 2L*sys.maxint+1
!         return "<%s %r at %#x>" % (self.__class__.__name__,self.name,
!                                    id(self)&MAX)
  
      def frombuf(cls, buf):





More information about the Python-checkins mailing list