[Python-3000-checkins] r61061 - in python/branches/py3k: Lib/bsddb/test/test_associate.py Lib/bsddb/test/test_basics.py Lib/bsddb/test/test_compare.py Lib/bsddb/test/test_cursor_pget_bug.py Lib/bsddb/test/test_dbobj.py Lib/bsddb/test/test_dbshelve.py Lib/bsddb/test/test_dbtables.py Lib/bsddb/test/test_env_close.py Lib/bsddb/test/test_join.py Lib/bsddb/test/test_lock.py Lib/bsddb/test/test_misc.py Lib/bsddb/test/test_pickle.py Lib/bsddb/test/test_recno.py Lib/bsddb/test/test_sequence.py Lib/bsddb/test/test_thread.py Lib/decimal.py Lib/test/test_bsddb3.py Lib/test/test_format.py Lib/test/test_support.py Makefile.pre.in Objects/dictobject.c Objects/listobject.c

christian.heimes python-3000-checkins at python.org
Mon Feb 25 13:39:24 CET 2008


Author: christian.heimes
Date: Mon Feb 25 13:39:23 2008
New Revision: 61061

Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Lib/bsddb/test/test_associate.py
   python/branches/py3k/Lib/bsddb/test/test_basics.py
   python/branches/py3k/Lib/bsddb/test/test_compare.py
   python/branches/py3k/Lib/bsddb/test/test_cursor_pget_bug.py
   python/branches/py3k/Lib/bsddb/test/test_dbobj.py
   python/branches/py3k/Lib/bsddb/test/test_dbshelve.py
   python/branches/py3k/Lib/bsddb/test/test_dbtables.py
   python/branches/py3k/Lib/bsddb/test/test_env_close.py
   python/branches/py3k/Lib/bsddb/test/test_join.py
   python/branches/py3k/Lib/bsddb/test/test_lock.py
   python/branches/py3k/Lib/bsddb/test/test_misc.py
   python/branches/py3k/Lib/bsddb/test/test_pickle.py
   python/branches/py3k/Lib/bsddb/test/test_recno.py
   python/branches/py3k/Lib/bsddb/test/test_sequence.py
   python/branches/py3k/Lib/bsddb/test/test_thread.py
   python/branches/py3k/Lib/decimal.py
   python/branches/py3k/Lib/test/test_bsddb3.py
   python/branches/py3k/Lib/test/test_format.py
   python/branches/py3k/Lib/test/test_support.py
   python/branches/py3k/Makefile.pre.in
   python/branches/py3k/Objects/dictobject.c
   python/branches/py3k/Objects/listobject.c
Log:
Merged revisions 61038,61042-61045,61047,61049-61053,61055-61057 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r61049 | christian.heimes | 2008-02-24 13:26:16 +0100 (Sun, 24 Feb 2008) | 1 line
  
  Use PY_FORMAT_SIZE_T instead of z for string formatting. Thanks Neal.
........
  r61051 | mark.dickinson | 2008-02-24 19:12:36 +0100 (Sun, 24 Feb 2008) | 2 lines
  
  Remove duplicate 'import re' in decimal.py
........
  r61052 | neal.norwitz | 2008-02-24 19:47:03 +0100 (Sun, 24 Feb 2008) | 11 lines
  
  Create a db_home directory with a unique name so multiple users can
  run the test simultaneously.  The simplest thing I found that worked
  on both Windows and Unix was to use the PID.  It's unique so should be
  sufficient.  This should prevent many of the spurious failures of
  the automated tests since they run as different users.
  
  Also cleanup the directory consistenly in the tearDown methods.
  
  It would be nice if someone ensured that the directories are always
  created with a consistent name.
........
  r61057 | christian.heimes | 2008-02-24 23:48:05 +0100 (Sun, 24 Feb 2008) | 2 lines
  
  Added dependency rules for Objects/stringlib/*.h
  stringobject, unicodeobject and the two formatters are rebuild whenever a header files changes
........


Modified: python/branches/py3k/Lib/bsddb/test/test_associate.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_associate.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_associate.py	Mon Feb 25 13:39:23 2008
@@ -92,15 +92,23 @@
 class AssociateErrorTestCase(unittest.TestCase):
     def setUp(self):
         self.filename = self.__class__.__name__ + '.db'
-        self.homeDir = tempfile.mkdtemp()
+        homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
+        self.homeDir = homeDir
+        try:
+            os.mkdir(homeDir)
+        except os.error:
+            import glob
+            files = glob.glob(os.path.join(self.homeDir, '*'))
+            for file in files:
+                os.remove(file)
         self.env = db.DBEnv()
         self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL)
 
     def tearDown(self):
         self.env.close()
         self.env = None
-        shutil.rmtree(self.homeDir)
-
+        from test import test_support
+        test_support.rmtree(self.homeDir)
 
     def test00_associateDBError(self):
         if verbose:
@@ -141,7 +149,7 @@
 
     def setUp(self):
         self.filename = self.__class__.__name__ + '.db'
-        homeDir = os.path.join(tempfile.gettempdir(), 'db_home')
+        homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
         self.homeDir = homeDir
         try:
             os.mkdir(homeDir)

Modified: python/branches/py3k/Lib/bsddb/test/test_basics.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_basics.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_basics.py	Mon Feb 25 13:39:23 2008
@@ -6,10 +6,10 @@
 import os
 import sys
 import errno
-import shutil
 import string
 import tempfile
 from pprint import pprint
+from test import test_support
 import unittest
 import time
 
@@ -54,7 +54,10 @@
 
     def setUp(self):
         if self.useEnv:
-            self.homeDir = tempfile.mkdtemp()
+            homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
+            self.homeDir = homeDir
+            test_support.rmtree(homeDir)
+            os.mkdir(homeDir)
             try:
                 self.env = db.DBEnv()
                 self.env.set_lg_max(1024*1024)
@@ -68,7 +71,7 @@
                 tempfile.tempdir = old_tempfile_tempdir
             # Yes, a bare except is intended, since we're re-raising the exc.
             except:
-                shutil.rmtree(self.homeDir)
+                test_support.rmtree(homeDir)
                 raise
         else:
             self.env = None
@@ -92,8 +95,8 @@
     def tearDown(self):
         self.d.close()
         if self.env is not None:
+            test_support.rmtree(self.homeDir)
             self.env.close()
-            shutil.rmtree(self.homeDir)
             ## Make a new DBEnv to remove the env files from the home dir.
             ## (It can't be done while the env is open, nor after it has been
             ## closed, so we make a new one to do it.)

Modified: python/branches/py3k/Lib/bsddb/test/test_compare.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_compare.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_compare.py	Mon Feb 25 13:39:23 2008
@@ -66,7 +66,7 @@
 
     def setUp (self):
         self.filename = self.__class__.__name__ + '.db'
-        homeDir = os.path.join (tempfile.gettempdir(), 'db_home')
+        homeDir = os.path.join (tempfile.gettempdir(), 'db_home%d'%os.getpid())
         self.homeDir = homeDir
         try:
             os.mkdir (homeDir)
@@ -84,7 +84,8 @@
         if self.env is not None:
             self.env.close ()
             self.env = None
-        shutil.rmtree(self.homeDir)
+        from test import test_support
+        test_support.rmtree(self.homeDir)
 
     def addDataToDB (self, data):
         i = 0

Modified: python/branches/py3k/Lib/bsddb/test/test_cursor_pget_bug.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_cursor_pget_bug.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_cursor_pget_bug.py	Mon Feb 25 13:39:23 2008
@@ -14,7 +14,7 @@
     db_name = 'test-cursor_pget.db'
 
     def setUp(self):
-        self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home')
+        self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
         try:
             os.mkdir(self.homeDir)
         except os.error:
@@ -39,7 +39,8 @@
         del self.secondary_db
         del self.primary_db
         del self.env
-        shutil.rmtree(self.homeDir)
+        from test import test_support
+        test_support.rmtree(self.homeDir)
 
     def test_pget(self):
         cursor = self.secondary_db.cursor()

Modified: python/branches/py3k/Lib/bsddb/test/test_dbobj.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_dbobj.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_dbobj.py	Mon Feb 25 13:39:23 2008
@@ -2,7 +2,6 @@
 import shutil
 import sys, os
 import unittest
-import glob
 import tempfile
 
 try:
@@ -20,14 +19,18 @@
     db_name = 'test-dbobj.db'
 
     def setUp(self):
-        self.homeDir = tempfile.mkdtemp()
+        homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
+        self.homeDir = homeDir
+        try: os.mkdir(homeDir)
+        except os.error: pass
 
     def tearDown(self):
         if hasattr(self, 'db'):
             del self.db
         if hasattr(self, 'env'):
             del self.env
-        shutil.rmtree(self.homeDir)
+        from test import test_support
+        test_support.rmtree(self.homeDir)
 
     def test01_both(self):
         class TestDBEnv(dbobj.DBEnv): pass

Modified: python/branches/py3k/Lib/bsddb/test/test_dbshelve.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_dbshelve.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_dbshelve.py	Mon Feb 25 13:39:23 2008
@@ -262,6 +262,10 @@
         self.do_open()
 
     def do_open(self):
+        self.homeDir = homeDir = os.path.join(
+            tempfile.gettempdir(), 'db_home%d'%os.getpid())
+        try: os.mkdir(homeDir)
+        except os.error: pass
         self.env = db.DBEnv()
         self.env.open(self.homeDir, self.envflags | db.DB_INIT_MPOOL | db.DB_CREATE)
 
@@ -275,9 +279,9 @@
 
 
     def tearDown(self):
+        from test import test_support
+        test_support.rmtree(self.homeDir)
         self.do_close()
-        shutil.rmtree(self.homeDir)
-
 
 
 class EnvBTreeShelveTestCase(BasicEnvShelveTestCase):

Modified: python/branches/py3k/Lib/bsddb/test/test_dbtables.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_dbtables.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_dbtables.py	Mon Feb 25 13:39:23 2008
@@ -20,7 +20,6 @@
 #
 # $Id$
 
-import shutil
 import sys, os, re
 import pickle
 import tempfile
@@ -43,13 +42,18 @@
     db_name = 'test-table.db'
 
     def setUp(self):
-        self.homeDir = tempfile.mkdtemp()
+        homeDir = tempfile.mkdtemp()
+        self.testHomeDir = homeDir
+        try: os.mkdir(homeDir)
+        except os.error: pass
+
         self.tdb = dbtables.bsdTableDB(
-            filename='tabletest.db', dbhome=self.homeDir, create=1)
+            filename='tabletest.db', dbhome=homeDir, create=1)
 
     def tearDown(self):
         self.tdb.close()
-        shutil.rmtree(self.homeDir)
+        from test import test_support
+        test_support.rmtree(self.testHomeDir)
 
     def test01(self):
         tabname = "test01"

Modified: python/branches/py3k/Lib/bsddb/test/test_env_close.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_env_close.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_env_close.py	Mon Feb 25 13:39:23 2008
@@ -6,7 +6,6 @@
 import shutil
 import sys
 import tempfile
-import glob
 import unittest
 
 try:
@@ -34,15 +33,16 @@
 
 class DBEnvClosedEarlyCrash(unittest.TestCase):
     def setUp(self):
-        self.homeDir = tempfile.mkdtemp()
-        old_tempfile_tempdir = tempfile.tempdir
+        self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
+        try: os.mkdir(self.homeDir)
+        except os.error: pass
         tempfile.tempdir = self.homeDir
         self.filename = os.path.split(tempfile.mktemp())[1]
-        tempfile.tempdir = old_tempfile_tempdir
+        tempfile.tempdir = None
 
     def tearDown(self):
-        shutil.rmtree(self.homeDir)
-
+        from test import test_support
+        test_support.rmtree(self.homeDir)
 
     def test01_close_dbenv_before_db(self):
         dbenv = db.DBEnv()

Modified: python/branches/py3k/Lib/bsddb/test/test_join.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_join.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_join.py	Mon Feb 25 13:39:23 2008
@@ -48,13 +48,17 @@
 
     def setUp(self):
         self.filename = self.__class__.__name__ + '.db'
-        self.homeDir = tempfile.mkdtemp()
+        homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
+        self.homeDir = homeDir
+        try: os.mkdir(homeDir)
+        except os.error: pass
         self.env = db.DBEnv()
         self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL | db.DB_INIT_LOCK )
 
     def tearDown(self):
         self.env.close()
-        shutil.rmtree(self.homeDir)
+        from test import test_support
+        test_support.rmtree(self.homeDir)
 
     def test01_join(self):
         if verbose:

Modified: python/branches/py3k/Lib/bsddb/test/test_lock.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_lock.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_lock.py	Mon Feb 25 13:39:23 2008
@@ -2,9 +2,6 @@
 TestCases for testing the locking sub-system.
 """
 
-import os
-from pprint import pprint
-import shutil
 import sys
 import tempfile
 import time
@@ -40,7 +37,8 @@
 
     def tearDown(self):
         self.env.close()
-        shutil.rmtree(self.homeDir)
+        from test import test_support
+        test_support.rmtree(self.homeDir)
 
 
     def test01_simple(self):

Modified: python/branches/py3k/Lib/bsddb/test/test_misc.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_misc.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_misc.py	Mon Feb 25 13:39:23 2008
@@ -19,14 +19,17 @@
 class MiscTestCase(unittest.TestCase):
     def setUp(self):
         self.filename = self.__class__.__name__ + '.db'
-        self.homeDir = tempfile.mkdtemp()
-
-    def tearDown(self):
+        homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
+        self.homeDir = homeDir
         try:
-            os.remove(self.filename)
+            os.mkdir(homeDir)
         except OSError:
             pass
-        shutil.rmtree(self.homeDir)
+
+    def tearDown(self):
+        from test import test_support
+        test_support.unlink(self.filename)
+        test_support.rmtree(self.homeDir)
 
     def test01_badpointer(self):
         dbs = dbshelve.open(self.filename)

Modified: python/branches/py3k/Lib/bsddb/test/test_pickle.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_pickle.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_pickle.py	Mon Feb 25 13:39:23 2008
@@ -5,7 +5,6 @@
 import tempfile
 import unittest
 import tempfile
-import glob
 
 try:
     # For Pythons w/distutils pybsddb
@@ -22,7 +21,7 @@
     db_name = 'test-dbobj.db'
 
     def setUp(self):
-        homeDir = os.path.join(tempfile.gettempdir(), 'db_home')
+        homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
         self.homeDir = homeDir
         try: os.mkdir(homeDir)
         except os.error: pass
@@ -32,7 +31,8 @@
             del self.db
         if hasattr(self, 'env'):
             del self.env
-        shutil.rmtree(self.homeDir)
+        from test import test_support
+        test_support.rmtree(self.homeDir)
 
     def _base_test_pickle_DBError(self, pickle):
         self.env = db.DBEnv()

Modified: python/branches/py3k/Lib/bsddb/test/test_recno.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_recno.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_recno.py	Mon Feb 25 13:39:23 2008
@@ -26,14 +26,13 @@
 class SimpleRecnoTestCase(unittest.TestCase):
     def setUp(self):
         self.filename = tempfile.mktemp()
-        self.homeDir = tempfile.mkdtemp()
+        self.homeDir = None
 
     def tearDown(self):
-        try:
-            os.remove(self.filename)
-        except OSError as e:
-            if e.errno != errno.EEXIST: raise
-        shutil.rmtree(self.homeDir)
+        from test import test_support
+        test_support.unlink(self.filename)
+        if self.homeDir:
+            test_support.rmtree(self.homeDir)
 
     def test01_basic(self):
         d = db.DB()
@@ -206,7 +205,11 @@
         just a line in the file, but you can set a different record delimiter
         if needed.
         """
-        source = os.path.join(self.homeDir, 'test_recno.txt')
+        homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
+        self.homeDir = homeDir
+        source = os.path.join(homeDir, 'test_recno.txt')
+        if not os.path.isdir(homeDir):
+            os.mkdir(homeDir)
         f = open(source, 'w') # create the file
         f.close()
 

Modified: python/branches/py3k/Lib/bsddb/test/test_sequence.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_sequence.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_sequence.py	Mon Feb 25 13:39:23 2008
@@ -3,7 +3,6 @@
 import shutil
 import sys
 import tempfile
-import glob
 
 try:
     # For Pythons w/distutils pybsddb
@@ -17,7 +16,7 @@
 class DBSequenceTest(unittest.TestCase):
     def setUp(self):
         self.int_32_max = 0x100000000
-        self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home')
+        self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
         try:
             os.mkdir(self.homeDir)
         except os.error:
@@ -42,7 +41,8 @@
             self.dbenv.close()
             del self.dbenv
 
-        shutil.rmtree(self.homeDir)
+        from test import test_support
+        test_support.rmtree(self.homeDir)
 
     def test_get(self):
         self.seq = db.DBSequence(self.d, flags=0)

Modified: python/branches/py3k/Lib/bsddb/test/test_thread.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_thread.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_thread.py	Mon Feb 25 13:39:23 2008
@@ -5,7 +5,6 @@
 import sys
 import time
 import errno
-import shutil
 import tempfile
 from pprint import pprint
 from random import random
@@ -47,7 +46,7 @@
         if verbose:
             dbutils._deadlock_VerboseFile = sys.stdout
 
-        homeDir = os.path.join(tempfile.gettempdir(), 'db_home')
+        homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
         self.homeDir = homeDir
         try:
             os.mkdir(homeDir)
@@ -64,12 +63,10 @@
         self.d.open(self.filename, self.dbtype, self.dbopenflags|db.DB_CREATE)
 
     def tearDown(self):
+        from test import test_support
+        test_support.rmtree(self.homeDir)
         self.d.close()
         self.env.close()
-        try:
-            shutil.rmtree(self.homeDir)
-        except OSError as e:
-            if e.errno != errno.EEXIST: raise
 
     def setEnvOpts(self):
         pass

Modified: python/branches/py3k/Lib/decimal.py
==============================================================================
--- python/branches/py3k/Lib/decimal.py	(original)
+++ python/branches/py3k/Lib/decimal.py	Mon Feb 25 13:39:23 2008
@@ -5202,8 +5202,7 @@
 
 
 ##### crud for parsing strings #############################################
-import re
-
+#
 # Regular expression used for parsing numeric strings.  Additional
 # comments:
 #

Modified: python/branches/py3k/Lib/test/test_bsddb3.py
==============================================================================
--- python/branches/py3k/Lib/test/test_bsddb3.py	(original)
+++ python/branches/py3k/Lib/test/test_bsddb3.py	Mon Feb 25 13:39:23 2008
@@ -2,11 +2,12 @@
 """
 Run all test cases.
 """
+import os
 import sys
+import tempfile
 import time
 import unittest
-import test.test_support
-from test.test_support import requires, run_unittest, unlink
+from test.test_support import requires, verbose, run_unittest, unlink, rmtree
 
 # When running as a script instead of within the regrtest framework, skip the
 # requires test, since it's obvious we want to run them.
@@ -88,6 +89,15 @@
 # For invocation through regrtest
 def test_main():
     run_unittest(suite())
+    db_home = os.path.join(tempfile.gettempdir(), 'db_home')
+    # The only reason to remove db_home is in case if there is an old
+    # one lying around.  This might be by a different user, so just
+    # ignore errors.  We should always make a unique name now.
+    try:
+        rmtree(db_home)
+    except:
+        pass
+    rmtree('db_home%d' % os.getpid())
 
 # For invocation as a script
 if __name__ == '__main__':

Modified: python/branches/py3k/Lib/test/test_format.py
==============================================================================
--- python/branches/py3k/Lib/test/test_format.py	(original)
+++ python/branches/py3k/Lib/test/test_format.py	Mon Feb 25 13:39:23 2008
@@ -234,7 +234,8 @@
 test_exc(str(b'abc %\u3000', 'raw-unicode-escape'), 1, ValueError,
          "unsupported format character '?' (0x3000) at index 5")
 
-test_exc('%d', '1', TypeError, "an integer is required")
+#test_exc('%d', '1', TypeError, "an integer is required")
+test_exc('%d', '1', TypeError, '%d format: a number is required, not str')
 test_exc('%g', '1', TypeError, "a float is required")
 test_exc('no format', '1', TypeError,
          "not all arguments converted during string formatting")

Modified: python/branches/py3k/Lib/test/test_support.py
==============================================================================
--- python/branches/py3k/Lib/test/test_support.py	(original)
+++ python/branches/py3k/Lib/test/test_support.py	Mon Feb 25 13:39:23 2008
@@ -9,6 +9,7 @@
 import sys
 import os
 import os.path
+import shutil
 import warnings
 import unittest
 
@@ -64,6 +65,14 @@
     except OSError:
         pass
 
+def rmtree(path):
+    try:
+        shutil.rmtree(path)
+    except OSError as e:
+        # Unix returns ENOENT, Windows returns ESRCH.
+        if e.errno not in (errno.ENOENT, errno.ESRCH):
+            raise
+
 def forget(modname):
     '''"Forget" a module was ever imported by removing it from sys.modules and
     deleting any .pyc and .pyo files.'''

Modified: python/branches/py3k/Makefile.pre.in
==============================================================================
--- python/branches/py3k/Makefile.pre.in	(original)
+++ python/branches/py3k/Makefile.pre.in	Mon Feb 25 13:39:23 2008
@@ -518,28 +518,26 @@
 				$(srcdir)/Objects/unicodetype_db.h
 
 BYTESTR_DEPS = Include/bytes_methods.h \
-               $(srcdir)/Objects/stringlib/fastsearch.h \
                $(srcdir)/Objects/stringlib/count.h \
+               $(srcdir)/Objects/stringlib/ctype.h \
+               $(srcdir)/Objects/stringlib/eq.h \
+               $(srcdir)/Objects/stringlib/fastsearch.h \
                $(srcdir)/Objects/stringlib/find.h \
                $(srcdir)/Objects/stringlib/partition.h \
-               $(srcdir)/Objects/stringlib/ctype.h \
-               $(srcdir)/Objects/stringlib/transmogrify.h
+               $(srcdir)/Objects/stringlib/stringdefs.h \
+               $(srcdir)/Objects/stringlib/string_format.h \
+               $(srcdir)/Objects/stringlib/transmogrify.h \
+               $(srcdir)/Objects/stringlib/unicodedefs.h \
 
 Objects/stringobject.o: $(srcdir)/Objects/stringobject.c $(BYTESTR_DEPS)
 
 Objects/bytesobject.o: $(srcdir)/Objects/bytesobject.c $(BYTESTR_DEPS) 
 
 Objects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c \
-				$(srcdir)/Objects/stringlib/string_format.h \
-	                        $(srcdir)/Objects/stringlib/unicodedefs.h \
-	                        $(srcdir)/Objects/stringlib/fastsearch.h \
-	                        $(srcdir)/Objects/stringlib/count.h \
-	                        $(srcdir)/Objects/stringlib/find.h \
-	                        $(srcdir)/Objects/stringlib/partition.h
+                                             $(BYTESTR_DEPS)
 
 Python/formatter_unicode.o: $(srcdir)/Python/formatter_unicode.c \
-	                        $(srcdir)/Objects/stringlib/formatter.h
-
+                                             $(BYTESTR_DEPS)
 
 
 ############################################################################

Modified: python/branches/py3k/Objects/dictobject.c
==============================================================================
--- python/branches/py3k/Objects/dictobject.c	(original)
+++ python/branches/py3k/Objects/dictobject.c	Mon Feb 25 13:39:23 2008
@@ -172,8 +172,10 @@
 static void
 show_alloc(void)
 {
-	fprintf(stderr, "Dict allocations: %zd\n", count_alloc);
-	fprintf(stderr, "Dict reuse through freelist: %zd\n", count_reuse);
+	fprintf(stderr, "Dict allocations: %" PY_FORMAT_SIZE_T "d\n",
+		count_alloc);
+	fprintf(stderr, "Dict reuse through freelist: %" PY_FORMAT_SIZE_T
+		"d\n", count_reuse);
 	fprintf(stderr, "%.2f%% reuse rate\n\n",
 		(100.0*count_reuse/(count_alloc+count_reuse)));
 }

Modified: python/branches/py3k/Objects/listobject.c
==============================================================================
--- python/branches/py3k/Objects/listobject.c	(original)
+++ python/branches/py3k/Objects/listobject.c	Mon Feb 25 13:39:23 2008
@@ -72,8 +72,10 @@
 static void
 show_alloc(void)
 {
-	fprintf(stderr, "List allocations: %zd\n", count_alloc);
-	fprintf(stderr, "List reuse through freelist: %zd\n", count_reuse);
+	fprintf(stderr, "List allocations: %" PY_FORMAT_SIZE_T "d\n",
+		count_alloc);
+	fprintf(stderr, "List reuse through freelist: %" PY_FORMAT_SIZE_T
+		"d\n", count_reuse);
 	fprintf(stderr, "%.2f%% reuse rate\n\n",
 		(100.0*count_reuse/(count_alloc+count_reuse)));
 }


More information about the Python-3000-checkins mailing list