Author: neal.norwitz
Date: Fri Jun  1 07:51:30 2007
New Revision: 55729

Modified:
   python/branches/p3yk/   (props changed)
   python/branches/p3yk/Doc/howto/functional.rst
   python/branches/p3yk/Doc/lib/libpickle.tex
   python/branches/p3yk/Lib/ctypes/wintypes.py
   python/branches/p3yk/Lib/plat-mac/buildtools.py
   python/branches/p3yk/Lib/sha.py
   python/branches/p3yk/Lib/test/test_hmac.py
   python/branches/p3yk/Lib/uuid.py
   python/branches/p3yk/Misc/build.sh
   python/branches/p3yk/Modules/_ctypes/callbacks.c
   python/branches/p3yk/Python/import.c
Log:
Merged revisions 55636-55728 via svnmerge from 
svn+ssh://[EMAIL PROTECTED]/python/trunk

........
  r55637 | georg.brandl | 2007-05-29 00:16:47 -0700 (Tue, 29 May 2007) | 2 lines
  
  Fix rst markup.
........
  r55638 | neal.norwitz | 2007-05-29 00:51:39 -0700 (Tue, 29 May 2007) | 1 line
  
  Fix typo in doc
........
  r55671 | neal.norwitz | 2007-05-29 21:53:41 -0700 (Tue, 29 May 2007) | 1 line
  
  Fix indentation (whitespace only).
........
  r55676 | thomas.heller | 2007-05-29 23:58:30 -0700 (Tue, 29 May 2007) | 1 line
  
  Fix compiler warnings.
........
  r55677 | thomas.heller | 2007-05-30 00:01:25 -0700 (Wed, 30 May 2007) | 2 
lines
  
  Correct the name of a field in the WIN32_FIND_DATAA and WIN32_FIND_DATAW 
structures.
  Closes bug #1726026.
........
  r55686 | brett.cannon | 2007-05-30 13:46:26 -0700 (Wed, 30 May 2007) | 2 lines
  
  Have MimeWriter raise a DeprecationWarning as per PEP 4 and its documentation.
........
  r55690 | brett.cannon | 2007-05-30 14:48:58 -0700 (Wed, 30 May 2007) | 3 lines
  
  Have mimify raise a DeprecationWarning.  The docs and PEP 4 have listed the
  module as deprecated for a while.
........
  r55696 | brett.cannon | 2007-05-30 15:24:28 -0700 (Wed, 30 May 2007) | 2 lines
  
  Have md5 raise a DeprecationWarning as per PEP 4.
........
  r55705 | neal.norwitz | 2007-05-30 21:14:22 -0700 (Wed, 30 May 2007) | 1 line
  
  Add some spaces in the example code.
........
  r55716 | brett.cannon | 2007-05-31 12:20:00 -0700 (Thu, 31 May 2007) | 2 lines
  
  Have the sha module raise a DeprecationWarning as specified in PEP 4.
........
  r55719 | brett.cannon | 2007-05-31 12:40:42 -0700 (Thu, 31 May 2007) | 2 lines
  
  Cause buildtools to raise a DeprecationWarning.
........
  r55721 | brett.cannon | 2007-05-31 13:01:11 -0700 (Thu, 31 May 2007) | 2 lines
  
  Have cfmfile raise a DeprecationWarning as per PEP 4.
........
  r55726 | neal.norwitz | 2007-05-31 21:56:47 -0700 (Thu, 31 May 2007) | 1 line
  
  Mail if there is an installation failure.
........


Modified: python/branches/p3yk/Doc/howto/functional.rst
==============================================================================
--- python/branches/p3yk/Doc/howto/functional.rst       (original)
+++ python/branches/p3yk/Doc/howto/functional.rst       Fri Jun  1 07:51:30 2007
@@ -980,7 +980,7 @@
 that's a slice of the iterator.  With a single ``stop`` argument, 
 it will return the first ``stop``
 elements.  If you supply a starting index, you'll get ``stop-start``
-elements, and if you supply a value for ``step`, elements will be
+elements, and if you supply a value for ``step``, elements will be
 skipped accordingly.  Unlike Python's string and list slicing, you
 can't use negative values for ``start``, ``stop``, or ``step``.
 

Modified: python/branches/p3yk/Doc/lib/libpickle.tex
==============================================================================
--- python/branches/p3yk/Doc/lib/libpickle.tex  (original)
+++ python/branches/p3yk/Doc/lib/libpickle.tex  Fri Jun  1 07:51:30 2007
@@ -799,7 +799,7 @@
         del odict['fh']              # remove filehandle entry
         return odict
 
-    def __setstate__(self,dict):
+    def __setstate__(self, dict):
         fh = open(dict['file'])      # reopen file
         count = dict['lineno']       # read from file...
         while count:                 # until line count is restored
@@ -820,7 +820,7 @@
 ... obj.readline()
 '7: class TextReader:'
 >>> import pickle
->>> pickle.dump(obj,open('save.p','w'))
+>>> pickle.dump(obj,open('save.p', 'wb'))
 \end{verbatim}
 
 If you want to see that \refmodule{pickle} works across Python
@@ -829,7 +829,7 @@
 
 \begin{verbatim}
 >>> import pickle
->>> reader = pickle.load(open('save.p'))
+>>> reader = pickle.load(open('save.p', 'rb'))
 >>> reader.readline()
 '8:     "Print and number lines in a text file."'
 \end{verbatim}

Modified: python/branches/p3yk/Lib/ctypes/wintypes.py
==============================================================================
--- python/branches/p3yk/Lib/ctypes/wintypes.py (original)
+++ python/branches/p3yk/Lib/ctypes/wintypes.py Fri Jun  1 07:51:30 2007
@@ -147,7 +147,7 @@
                 ("dwReserved0", DWORD),
                 ("dwReserved1", DWORD),
                 ("cFileName", c_char * MAX_PATH),
-                ("cAlternameFileName", c_char * 14)]
+                ("cAlternateFileName", c_char * 14)]
 
 class WIN32_FIND_DATAW(Structure):
     _fields_ = [("dwFileAttributes", DWORD),
@@ -159,7 +159,7 @@
                 ("dwReserved0", DWORD),
                 ("dwReserved1", DWORD),
                 ("cFileName", c_wchar * MAX_PATH),
-                ("cAlternameFileName", c_wchar * 14)]
+                ("cAlternateFileName", c_wchar * 14)]
 
 __all__ = ['ATOM', 'BOOL', 'BOOLEAN', 'BYTE', 'COLORREF', 'DOUBLE',
            'DWORD', 'FILETIME', 'HACCEL', 'HANDLE', 'HBITMAP', 'HBRUSH',

Modified: python/branches/p3yk/Lib/plat-mac/buildtools.py
==============================================================================
--- python/branches/p3yk/Lib/plat-mac/buildtools.py     (original)
+++ python/branches/p3yk/Lib/plat-mac/buildtools.py     Fri Jun  1 07:51:30 2007
@@ -13,6 +13,9 @@
 import EasyDialogs
 import shutil
 
+import warnings
+warnings.warn("the buildtools module is deprecated", DeprecationWarning, 2)
+
 
 BuildError = "BuildError"
 

Modified: python/branches/p3yk/Lib/sha.py
==============================================================================
--- python/branches/p3yk/Lib/sha.py     (original)
+++ python/branches/p3yk/Lib/sha.py     Fri Jun  1 07:51:30 2007
@@ -3,6 +3,10 @@
 #  Copyright (C) 2005   Gregory P. Smith ([EMAIL PROTECTED])
 #  Licensed to PSF under a Contributor Agreement.
 
+import warnings
+warnings.warn("the sha module is deprecated; use the hashlib module instead",
+                DeprecationWarning, 2)
+
 from hashlib import sha1 as sha
 new = sha
 

Modified: python/branches/p3yk/Lib/test/test_hmac.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_hmac.py  (original)
+++ python/branches/p3yk/Lib/test/test_hmac.py  Fri Jun  1 07:51:30 2007
@@ -1,5 +1,5 @@
 import hmac
-import sha
+from hashlib import sha1
 import unittest
 from test import test_support
 
@@ -43,7 +43,7 @@
 
     def test_sha_vectors(self):
         def shatest(key, data, digest):
-            h = hmac.HMAC(key, data, digestmod=sha)
+            h = hmac.HMAC(key, data, digestmod=sha1)
             self.assertEqual(h.hexdigest().upper(), digest.upper())
 
         shatest(chr(0x0b) * 20,
@@ -95,11 +95,11 @@
 
     def test_withmodule(self):
         # Constructor call with text and digest module.
-        import sha
+        from hashlib import sha1
         try:
-            h = hmac.HMAC("key", "", sha)
+            h = hmac.HMAC("key", "", sha1)
         except:
-            self.fail("Constructor call with sha module raised exception.")
+            self.fail("Constructor call with hashlib.sha1 raised exception.")
 
 class SanityTestCase(unittest.TestCase):
 

Modified: python/branches/p3yk/Lib/uuid.py
==============================================================================
--- python/branches/p3yk/Lib/uuid.py    (original)
+++ python/branches/p3yk/Lib/uuid.py    Fri Jun  1 07:51:30 2007
@@ -535,8 +535,8 @@
 
 def uuid3(namespace, name):
     """Generate a UUID from the MD5 hash of a namespace UUID and a name."""
-    import hashlib
-    hash = hashlib.md5(namespace.bytes + name).digest()
+    from hashlib import md5
+    hash = md5(namespace.bytes + name).digest()
     return UUID(bytes=hash[:16], version=3)
 
 def uuid4():
@@ -558,8 +558,8 @@
 
 def uuid5(namespace, name):
     """Generate a UUID from the SHA-1 hash of a namespace UUID and a name."""
-    import sha
-    hash = sha.sha(namespace.bytes + name).digest()
+    from hashlib import sha1
+    hash = sha1(namespace.bytes + name).digest()
     return UUID(bytes=hash[:16], version=5)
 
 # The following standard UUIDs are for use with uuid3() or uuid5().

Modified: python/branches/p3yk/Misc/build.sh
==============================================================================
--- python/branches/p3yk/Misc/build.sh  (original)
+++ python/branches/p3yk/Misc/build.sh  Fri Jun  1 07:51:30 2007
@@ -170,6 +170,7 @@
             start=`current_time`
             make install >& build/$F
             update_status "Installing" "$F" $start
+            mail_on_failure "install" build/$F
 
             if [ ! -x $PYTHON ]; then
                 ln -s ${PYTHON}3.* $PYTHON

Modified: python/branches/p3yk/Modules/_ctypes/callbacks.c
==============================================================================
--- python/branches/p3yk/Modules/_ctypes/callbacks.c    (original)
+++ python/branches/p3yk/Modules/_ctypes/callbacks.c    Fri Jun  1 07:51:30 2007
@@ -385,8 +385,8 @@
        }
 
        {
-               PyObject *py_rclsid = PyLong_FromVoidPtr(rclsid);
-               PyObject *py_riid = PyLong_FromVoidPtr(riid);
+               PyObject *py_rclsid = PyLong_FromVoidPtr((void *)rclsid);
+               PyObject *py_riid = PyLong_FromVoidPtr((void *)riid);
                PyObject *py_ppv = PyLong_FromVoidPtr(ppv);
                if (!py_rclsid || !py_riid || !py_ppv) {
                        Py_XDECREF(py_rclsid);

Modified: python/branches/p3yk/Python/import.c
==============================================================================
--- python/branches/p3yk/Python/import.c        (original)
+++ python/branches/p3yk/Python/import.c        Fri Jun  1 07:51:30 2007
@@ -2429,7 +2429,7 @@
     
        if (modules_reloading == NULL) {
                Py_FatalError("PyImport_ReloadModule: "
-                                                       "no modules_reloading 
dictionary!");
+                             "no modules_reloading dictionary!");
                return NULL;
        }
 
@@ -2473,7 +2473,7 @@
                            "reload(): parent %.200s not in sys.modules",
                            PyString_AS_STRING(parentname));
                        Py_DECREF(parentname);
-            imp_modules_reloading_clear();
+                       imp_modules_reloading_clear();
                        return NULL;
                }
                Py_DECREF(parentname);
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to