From tim_one at users.sourceforge.net Mon Nov 1 02:39:12 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 1 02:39:16 2004 Subject: [Python-checkins] python/dist/src/Modules gcmodule.c,2.78,2.79 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5258/modules Modified Files: gcmodule.c Log Message: gc list function cleanup. Introduced gc_list_move(), which captures the common gc_list_remove() + gc_list_append() sequence. In fact, no uses of gc_list_append() remained (they were all in a gc_list_move() sequence), so commented that one out. gc_list_merge(): assert that `from` != `to`; that was an implicit precondition, now verified in a debug build. Others: added comments about their purpose. Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.78 retrieving revision 2.79 diff -u -d -r2.78 -r2.79 --- gcmodule.c 31 Oct 2004 22:12:43 -0000 2.78 +++ gcmodule.c 1 Nov 2004 01:39:08 -0000 2.79 @@ -139,6 +139,9 @@ return (list->gc.gc_next == list); } +#if 0 +/* This became unused after gc_list_move() was introduced. */ +/* Append `node` to `list`. */ static void gc_list_append(PyGC_Head *node, PyGC_Head *list) { @@ -147,7 +150,9 @@ node->gc.gc_prev->gc.gc_next = node; list->gc.gc_prev = node; } +#endif +/* Remove `node` from the gc list it's currently in. */ static void gc_list_remove(PyGC_Head *node) { @@ -156,11 +161,29 @@ node->gc.gc_next = NULL; /* object is not currently tracked */ } -/* append a list onto another list, from becomes an empty list */ +/* Move `node` from the gc list it's currently in (which is not explicitly + * named here) to the end of `list`. This is semantically the same as + * gc_list_remove(node) followed by gc_list_append(node, list). + */ +static void +gc_list_move(PyGC_Head *node, PyGC_Head *list) +{ + PyGC_Head *current_prev = node->gc.gc_prev; + PyGC_Head *current_next = node->gc.gc_next; + PyGC_Head *new_prev = list->gc.gc_prev; + current_prev->gc.gc_next = current_next; + current_next->gc.gc_prev = current_prev; + node->gc.gc_next = list; + node->gc.gc_prev = new_prev; + new_prev->gc.gc_next = list->gc.gc_prev = node; +} + +/* append list `from` onto list `to`; `from` becomes an empty list */ static void gc_list_merge(PyGC_Head *from, PyGC_Head *to) { PyGC_Head *tail; + assert(from != to); if (!gc_list_is_empty(from)) { tail = to->gc.gc_prev; tail->gc.gc_next = from->gc.gc_next; @@ -295,8 +318,7 @@ * and move_unreachable will eventually get to it * again. */ - gc_list_remove(gc); - gc_list_append(gc, reachable); + gc_list_move(gc, reachable); gc->gc.gc_refs = 1; } /* Else there's nothing to do. @@ -368,8 +390,7 @@ * young if that's so, and we'll see it again. */ next = gc->gc.gc_next; - gc_list_remove(gc); - gc_list_append(gc, unreachable); + gc_list_move(gc, unreachable); gc->gc.gc_refs = GC_TENTATIVELY_UNREACHABLE; } gc = next; @@ -416,8 +437,7 @@ next = gc->gc.gc_next; if (has_finalizer(op)) { - gc_list_remove(gc); - gc_list_append(gc, finalizers); + gc_list_move(gc, finalizers); gc->gc.gc_refs = GC_REACHABLE; } } @@ -430,8 +450,7 @@ if (PyObject_IS_GC(op)) { if (IS_TENTATIVELY_UNREACHABLE(op)) { PyGC_Head *gc = AS_GC(op); - gc_list_remove(gc); - gc_list_append(gc, tolist); + gc_list_move(gc, tolist); gc->gc.gc_refs = GC_REACHABLE; } } @@ -559,8 +578,7 @@ assert(wrasgc != next); /* wrasgc is reachable, but next isn't, so they can't be the same */ - gc_list_remove(wrasgc); - gc_list_append(wrasgc, &wrcb_to_call); + gc_list_move(wrasgc, &wrcb_to_call); } } @@ -600,8 +618,7 @@ Py_DECREF(op); if (wrcb_to_call.gc.gc_next == gc) { /* object is still alive -- move it */ - gc_list_remove(gc); - gc_list_append(gc, old); + gc_list_move(gc, old); } else ++num_freed; @@ -694,8 +711,7 @@ } if (collectable->gc.gc_next == gc) { /* object is still alive, move it, it may die later */ - gc_list_remove(gc); - gc_list_append(gc, old); + gc_list_move(gc, old); gc->gc.gc_refs = GC_REACHABLE; } } From tim_one at users.sourceforge.net Mon Nov 1 03:40:54 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 1 03:40:58 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_shutil.py,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15800/Lib/test Modified Files: test_shutil.py Log Message: test_on_error(): Rewrite so it works on WinXP too. Unsure about 95/98/ME. Index: test_shutil.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_shutil.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- test_shutil.py 31 Oct 2004 12:05:31 -0000 1.8 +++ test_shutil.py 1 Nov 2004 02:40:52 -0000 1.9 @@ -1,4 +1,3 @@ - # Copyright (C) 2003 Python Software Foundation import unittest @@ -20,21 +19,28 @@ def test_on_error(self): self.errorState = 0 os.mkdir(TESTFN) - f = open(os.path.join(TESTFN, 'a'), 'w') + self.childpath = os.path.join(TESTFN, 'a') + f = open(self.childpath, 'w') f.close() - # Make TESTFN unwritable. - os.chmod(TESTFN, stat.S_IRUSR) + old_dir_mode = os.stat(TESTFN).st_mode + old_child_mode = os.stat(self.childpath).st_mode + # Make unwritable. + os.chmod(self.childpath, stat.S_IREAD) + os.chmod(TESTFN, stat.S_IREAD) shutil.rmtree(TESTFN, onerror=self.check_args_to_onerror) - # Make TESTFN writable again. - os.chmod(TESTFN, stat.S_IRWXU) + # Make writable again. + os.chmod(TESTFN, old_dir_mode) + os.chmod(self.childpath, old_child_mode) + + # Clean up. shutil.rmtree(TESTFN) def check_args_to_onerror(self, func, arg, exc): if self.errorState == 0: self.assertEqual(func, os.remove) - self.assertEqual(arg, os.path.join(TESTFN, 'a')) + self.assertEqual(arg, self.childpath) self.assertEqual(exc[0], OSError) self.errorState = 1 else: From bwarsaw at users.sourceforge.net Mon Nov 1 04:52:45 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Mon Nov 1 04:52:48 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libstring.tex,1.62,1.63 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25882/Doc/lib Modified Files: libstring.tex Log Message: SF patch #1056967, changes the semantics of Template.safe_substitute() to not raise a ValueError for dangling delimiters (the delimiter itself is returned). Index: libstring.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstring.tex,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- libstring.tex 18 Sep 2004 21:13:43 -0000 1.62 +++ libstring.tex 1 Nov 2004 03:52:41 -0000 1.63 @@ -131,8 +131,16 @@ Like \method{substitute()}, except that if placeholders are missing from \var{mapping} and \var{kws}, instead of raising a \exception{KeyError} exception, the original placeholder will appear in the resulting string -intact. Note that other exceptions may still be raised, including -\exception{ValueError} as described above. +intact. Also, unlike with \method{substitute()}, any other appearances of the +\samp{\$} will simply return \samp{\$} instead of raising +\exception{ValueError}. + +While other exceptions may still occur, this method is called ``safe'' because +substitutions always tries to return a usable string instead of raising an +exception. In another sense, \method{safe_substitute()} may be anything other +than safe, since it will silently ignore malformed templates containing +dangling delimiters, unmatched braces, or placeholders that are not valid +Python identifiers. \end{methoddesc} \class{Template} instances also provide one public data attribute: From bwarsaw at users.sourceforge.net Mon Nov 1 04:52:46 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Mon Nov 1 04:52:49 2004 Subject: [Python-checkins] python/dist/src/Lib string.py,1.86,1.87 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25882/Lib Modified Files: string.py Log Message: SF patch #1056967, changes the semantics of Template.safe_substitute() to not raise a ValueError for dangling delimiters (the delimiter itself is returned). Index: string.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/string.py,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- string.py 17 Oct 2004 16:27:17 -0000 1.86 +++ string.py 1 Nov 2004 03:52:43 -0000 1.87 @@ -199,7 +199,7 @@ if mo.group('escaped') is not None: return self.delimiter if mo.group('invalid') is not None: - self._invalid(mo) + return self.delimiter raise ValueError('Unrecognized named group in pattern', self.pattern) return self.pattern.sub(convert, self.template) From bwarsaw at users.sourceforge.net Mon Nov 1 04:52:46 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Mon Nov 1 04:52:50 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_pep292.py,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25882/Lib/test Modified Files: test_pep292.py Log Message: SF patch #1056967, changes the semantics of Template.safe_substitute() to not raise a ValueError for dangling delimiters (the delimiter itself is returned). Index: test_pep292.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pep292.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- test_pep292.py 17 Oct 2004 16:27:18 -0000 1.7 +++ test_pep292.py 1 Nov 2004 03:52:43 -0000 1.8 @@ -163,20 +163,19 @@ raises(TypeError, s.safe_substitute, d, {}) def test_delimiter_override(self): + eq = self.assertEqual + raises = self.assertRaises class AmpersandTemplate(Template): delimiter = '&' s = AmpersandTemplate('this &gift is for &{who} &&') - self.assertEqual(s.substitute(gift='bud', who='you'), - 'this bud is for you &') - self.assertRaises(KeyError, s.substitute) - self.assertEqual(s.safe_substitute(gift='bud', who='you'), - 'this bud is for you &') - self.assertEqual(s.safe_substitute(), - 'this &gift is for &{who} &') + eq(s.substitute(gift='bud', who='you'), 'this bud is for you &') + raises(KeyError, s.substitute) + eq(s.safe_substitute(gift='bud', who='you'), 'this bud is for you &') + eq(s.safe_substitute(), 'this &gift is for &{who} &') s = AmpersandTemplate('this &gift is for &{who} &') - self.assertRaises(ValueError, s.substitute, - dict(gift='bud', who='you')) - self.assertRaises(ValueError, s.safe_substitute) + raises(ValueError, s.substitute, dict(gift='bud', who='you')) + eq(s.safe_substitute(), 'this &gift is for &{who} &') + def test_main(): from test import test_support From bwarsaw at users.sourceforge.net Mon Nov 1 04:52:47 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Mon Nov 1 04:52:50 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1179,1.1180 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25882/Misc Modified Files: NEWS Log Message: SF patch #1056967, changes the semantics of Template.safe_substitute() to not raise a ValueError for dangling delimiters (the delimiter itself is returned). Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1179 retrieving revision 1.1180 diff -u -d -r1.1179 -r1.1180 --- NEWS 30 Oct 2004 23:09:20 -0000 1.1179 +++ NEWS 1 Nov 2004 03:52:43 -0000 1.1180 @@ -56,6 +56,10 @@ Library ------- +- Patch #1056967 changes the semantics of Template.safe_substitute() so that + no ValueError is raised on an 'invalid' match group. Now the delimiter is + returned. + - Bug #1052503 pdb.runcall() was not passing along keyword arguments. - Bug #902037: XML.sax.saxutils.prepare_input_source() now combines relative From bwarsaw at users.sourceforge.net Mon Nov 1 04:59:42 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Mon Nov 1 04:59:45 2004 Subject: [Python-checkins] python/dist/src/Doc/lib emailutil.tex,1.10,1.11 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26931 Modified Files: emailutil.tex Log Message: SF bug #1030118, this should have named the email.Utils module as the one containing these functions. (I will backport to Python 2.3) Index: emailutil.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/emailutil.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- emailutil.tex 11 Oct 2004 13:53:07 -0000 1.10 +++ emailutil.tex 1 Nov 2004 03:59:24 -0000 1.11 @@ -1,8 +1,8 @@ \declaremodule{standard}{email.Utils} \modulesynopsis{Miscellaneous email package utilities.} -There are several useful utilities provided with the \module{email} -package. +There are several useful utilities provided in the \module{email.Utils} +module: \begin{funcdesc}{quote}{str} Return a new string with backslashes in \var{str} replaced by two From bwarsaw at users.sourceforge.net Mon Nov 1 05:00:23 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Mon Nov 1 05:00:26 2004 Subject: [Python-checkins] python/dist/src/Doc/lib emailutil.tex, 1.8, 1.8.16.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27035 Modified Files: Tag: release23-maint emailutil.tex Log Message: SF bug #1030118, this should have named the email.Utils module as the one containing these functions. (I will backport to Python 2.3) Index: emailutil.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/emailutil.tex,v retrieving revision 1.8 retrieving revision 1.8.16.1 diff -u -d -r1.8 -r1.8.16.1 --- emailutil.tex 1 Oct 2002 04:33:16 -0000 1.8 +++ emailutil.tex 1 Nov 2004 04:00:06 -0000 1.8.16.1 @@ -1,8 +1,8 @@ \declaremodule{standard}{email.Utils} \modulesynopsis{Miscellaneous email package utilities.} -There are several useful utilities provided with the \module{email} -package. +There are several useful utilities provided in the \module{email.Utils} +module: \begin{funcdesc}{quote}{str} Return a new string with backslashes in \var{str} replaced by two From perky at users.sourceforge.net Mon Nov 1 09:26:14 2004 From: perky at users.sourceforge.net (perky@users.sourceforge.net) Date: Mon Nov 1 09:26:16 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_traceback.py, 1.12, 1.13 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31250/Lib/test Modified Files: test_traceback.py Log Message: Bug #1057993: Use sleep() always instead of os.utime() possibly broken in some platforms. Index: test_traceback.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_traceback.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- test_traceback.py 27 Oct 2004 03:12:05 -0000 1.12 +++ test_traceback.py 1 Nov 2004 08:26:09 -0000 1.13 @@ -52,15 +52,6 @@ def test(): raise ValueError""" - # if this test runs fast, test_bug737473.py will have same mtime - # even if it's rewrited and it'll not reloaded. so adjust mtime - # of original to past. - if hasattr(os, 'utime'): - past = time.time() - 3 - os.utime(testfile, (past, past)) - else: - time.sleep(3) - if 'test_bug737473' in sys.modules: del sys.modules['test_bug737473'] import test_bug737473 @@ -71,6 +62,11 @@ # this loads source code to linecache traceback.extract_tb(sys.exc_traceback) + # If this test runs fast, test_bug737473.py will stay in a mtime + # even if it's rewrited and it'll not reloaded in result. So wait + # until new timestamp comes. + time.sleep(2) + print >> open(testfile, 'w'), """\ def test(): raise NotImplementedError""" From rhettinger at users.sourceforge.net Mon Nov 1 16:19:15 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Nov 1 16:19:18 2004 Subject: [Python-checkins] python/dist/src/Python compile.c,2.334,2.335 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10498 Modified Files: compile.c Log Message: Simplify and future proof NOP counting in the peepholer. No longer assumes that the input is NOP free. Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.334 retrieving revision 2.335 diff -u -d -r2.334 -r2.335 --- compile.c 30 Oct 2004 21:08:59 -0000 2.334 +++ compile.c 1 Nov 2004 15:19:11 -0000 2.335 @@ -536,8 +536,7 @@ goto exitUnchanged; assert(PyList_Check(consts)); - for (i=0, nops=0 ; i a is not b @@ -575,7 +573,6 @@ continue; SETARG(codestr, i, (j^1)); codestr[i+3] = NOP; - nops++; break; /* Replace LOAD_GLOBAL/LOAD_NAME None with LOAD_CONST None */ @@ -604,7 +601,6 @@ !PyObject_IsTrue(PyList_GET_ITEM(consts, j))) continue; memset(codestr+i, NOP, 7); - nops += 7; break; /* Try to fold tuples of constants. @@ -619,7 +615,6 @@ codestr[h] == LOAD_CONST && ISBASICBLOCK(blocks, h, 3*(j+1)) && tuple_of_constants(&codestr[h], j, consts)) { - nops += 3 * j; break; } /* Intentional fallthrough */ @@ -631,16 +626,13 @@ continue; if (j == 1) { memset(codestr+i, NOP, 6); - nops += 6; } else if (j == 2) { codestr[i] = ROT_TWO; memset(codestr+i+1, NOP, 5); - nops += 5; } else if (j == 3) { codestr[i] = ROT_THREE; codestr[i+1] = ROT_TWO; memset(codestr+i+2, NOP, 4); - nops += 4; } break; @@ -704,12 +696,16 @@ !ISBASICBLOCK(blocks,i,5)) continue; memset(codestr+i+1, NOP, 4); - nops += 4; break; } } /* Fixup linenotab */ + for (i=0, nops=0 ; i Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26670/Modules Modified Files: gcmodule.c Log Message: gc_list_move(): Make this truly equivalent to remove+append. While nothing in gc currently cares, the original coding could screw up if, e.g., you tried to move a node to the list it's already in, and the node was already the last in its list. Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.79 retrieving revision 2.80 diff -u -d -r2.79 -r2.80 --- gcmodule.c 1 Nov 2004 01:39:08 -0000 2.79 +++ gcmodule.c 1 Nov 2004 16:39:57 -0000 2.80 @@ -168,14 +168,16 @@ static void gc_list_move(PyGC_Head *node, PyGC_Head *list) { + PyGC_Head *new_prev; PyGC_Head *current_prev = node->gc.gc_prev; PyGC_Head *current_next = node->gc.gc_next; - PyGC_Head *new_prev = list->gc.gc_prev; + /* Unlink from current list. */ current_prev->gc.gc_next = current_next; current_next->gc.gc_prev = current_prev; - node->gc.gc_next = list; - node->gc.gc_prev = new_prev; + /* Relink at end of new list. */ + new_prev = node->gc.gc_prev = list->gc.gc_prev; new_prev->gc.gc_next = list->gc.gc_prev = node; + node->gc.gc_next = list; } /* append list `from` onto list `to`; `from` becomes an empty list */ From doerwalter at users.sourceforge.net Mon Nov 1 18:10:22 2004 From: doerwalter at users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Mon Nov 1 18:10:25 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_StringIO.py, 1.18, 1.19 test_bz2.py, 1.15, 1.16 test_operator.py, 1.13, 1.14 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv973/Lib/test Modified Files: test_StringIO.py test_bz2.py test_operator.py Log Message: Add error checks for the bz2, cStringIO and operator modules. Add function names to various PyArg_ParseTuple calls in bz2module.c. Index: test_StringIO.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_StringIO.py,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- test_StringIO.py 21 Aug 2004 06:55:42 -0000 1.18 +++ test_StringIO.py 1 Nov 2004 17:10:19 -0000 1.19 @@ -24,12 +24,14 @@ def test_reads(self): eq = self.assertEqual + self.assertRaises(TypeError, self._fp.seek) eq(self._fp.read(10), self._line[:10]) eq(self._fp.readline(), self._line[10:] + '\n') eq(len(self._fp.readlines(60)), 2) def test_writes(self): f = self.MODULE.StringIO() + self.assertRaises(TypeError, f.seek) f.write(self._line[:6]) f.seek(3) f.write(self._line[20:26]) Index: test_bz2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- test_bz2.py 10 May 2003 07:36:55 -0000 1.15 +++ test_bz2.py 1 Nov 2004 17:10:19 -0000 1.16 @@ -59,6 +59,7 @@ # "Test BZ2File.read()" self.createTempFile() bz2f = BZ2File(self.filename) + self.assertRaises(TypeError, bz2f.read, None) self.assertEqual(bz2f.read(), self.TEXT) bz2f.close() @@ -86,6 +87,7 @@ # "Test BZ2File.readline()" self.createTempFile() bz2f = BZ2File(self.filename) + self.assertRaises(TypeError, bz2f.readline, None) sio = StringIO(self.TEXT) for line in sio.readlines(): self.assertEqual(bz2f.readline(), line) @@ -95,6 +97,7 @@ # "Test BZ2File.readlines()" self.createTempFile() bz2f = BZ2File(self.filename) + self.assertRaises(TypeError, bz2f.readlines, None) sio = StringIO(self.TEXT) self.assertEqual(bz2f.readlines(), sio.readlines()) bz2f.close() @@ -134,6 +137,7 @@ def testWrite(self): # "Test BZ2File.write()" bz2f = BZ2File(self.filename, "w") + self.assertRaises(TypeError, bz2f.write) bz2f.write(self.TEXT) bz2f.close() f = open(self.filename, 'rb') @@ -158,6 +162,7 @@ def testWriteLines(self): # "Test BZ2File.writelines()" bz2f = BZ2File(self.filename, "w") + self.assertRaises(TypeError, bz2f.writelines) sio = StringIO(self.TEXT) bz2f.writelines(sio.readlines()) bz2f.close() @@ -169,6 +174,7 @@ # "Test BZ2File.seek(150, 0)" self.createTempFile() bz2f = BZ2File(self.filename) + self.assertRaises(TypeError, bz2f.seek) bz2f.seek(150) self.assertEqual(bz2f.read(), self.TEXT[150:]) bz2f.close() @@ -233,6 +239,7 @@ def testCompress(self): # "Test BZ2Compressor.compress()/flush()" bz2c = BZ2Compressor() + self.assertRaises(TypeError, bz2c.compress) data = bz2c.compress(self.TEXT) data += bz2c.flush() self.assertEqual(self.decompress(data), self.TEXT) @@ -252,9 +259,13 @@ self.assertEqual(self.decompress(data), self.TEXT) class BZ2DecompressorTest(BaseTest): + def test_Constructor(self): + self.assertRaises(TypeError, BZ2Decompressor, 42) + def testDecompress(self): # "Test BZ2Decompressor.decompress()" bz2d = BZ2Decompressor() + self.assertRaises(TypeError, bz2d.decompress) text = bz2d.decompress(self.DATA) self.assertEqual(text, self.TEXT) Index: test_operator.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_operator.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- test_operator.py 17 Dec 2003 20:43:32 -0000 1.13 +++ test_operator.py 1 Nov 2004 17:10:19 -0000 1.14 @@ -6,6 +6,8 @@ class OperatorTestCase(unittest.TestCase): def test_lt(self): + self.failUnlessRaises(TypeError, operator.lt) + self.failUnlessRaises(TypeError, operator.lt, 1j, 2j) self.failIf(operator.lt(1, 0)) self.failIf(operator.lt(1, 0.0)) self.failIf(operator.lt(1, 1)) @@ -14,6 +16,8 @@ self.failUnless(operator.lt(1, 2.0)) def test_le(self): + self.failUnlessRaises(TypeError, operator.le) + self.failUnlessRaises(TypeError, operator.le, 1j, 2j) self.failIf(operator.le(1, 0)) self.failIf(operator.le(1, 0.0)) self.failUnless(operator.le(1, 1)) @@ -22,6 +26,11 @@ self.failUnless(operator.le(1, 2.0)) def test_eq(self): + class C(object): + def __eq__(self, other): + raise SyntaxError + self.failUnlessRaises(TypeError, operator.eq) + self.failUnlessRaises(SyntaxError, operator.eq, C(), C()) self.failIf(operator.eq(1, 0)) self.failIf(operator.eq(1, 0.0)) self.failUnless(operator.eq(1, 1)) @@ -30,6 +39,11 @@ self.failIf(operator.eq(1, 2.0)) def test_ne(self): + class C(object): + def __ne__(self, other): + raise SyntaxError + self.failUnlessRaises(TypeError, operator.ne) + self.failUnlessRaises(SyntaxError, operator.ne, C(), C()) self.failUnless(operator.ne(1, 0)) self.failUnless(operator.ne(1, 0.0)) self.failIf(operator.ne(1, 1)) @@ -38,6 +52,8 @@ self.failUnless(operator.ne(1, 2.0)) def test_ge(self): + self.failUnlessRaises(TypeError, operator.ge) + self.failUnlessRaises(TypeError, operator.ge, 1j, 2j) self.failUnless(operator.ge(1, 0)) self.failUnless(operator.ge(1, 0.0)) self.failUnless(operator.ge(1, 1)) @@ -46,6 +62,8 @@ self.failIf(operator.ge(1, 2.0)) def test_gt(self): + self.failUnlessRaises(TypeError, operator.gt) + self.failUnlessRaises(TypeError, operator.gt, 1j, 2j) self.failUnless(operator.gt(1, 0)) self.failUnless(operator.gt(1, 0.0)) self.failIf(operator.gt(1, 1)) @@ -54,58 +72,87 @@ self.failIf(operator.gt(1, 2.0)) def test_abs(self): + self.failUnlessRaises(TypeError, operator.abs) + self.failUnlessRaises(TypeError, operator.abs, None) self.failUnless(operator.abs(-1) == 1) self.failUnless(operator.abs(1) == 1) def test_add(self): + self.failUnlessRaises(TypeError, operator.add) + self.failUnlessRaises(TypeError, operator.add, None, None) self.failUnless(operator.add(3, 4) == 7) def test_bitwise_and(self): + self.failUnlessRaises(TypeError, operator.and_) + self.failUnlessRaises(TypeError, operator.and_, None, None) self.failUnless(operator.and_(0xf, 0xa) == 0xa) def test_concat(self): + self.failUnlessRaises(TypeError, operator.concat) + self.failUnlessRaises(TypeError, operator.concat, None, None) self.failUnless(operator.concat('py', 'thon') == 'python') self.failUnless(operator.concat([1, 2], [3, 4]) == [1, 2, 3, 4]) def test_countOf(self): + self.failUnlessRaises(TypeError, operator.countOf) + self.failUnlessRaises(TypeError, operator.countOf, None, None) self.failUnless(operator.countOf([1, 2, 1, 3, 1, 4], 3) == 1) self.failUnless(operator.countOf([1, 2, 1, 3, 1, 4], 5) == 0) def test_delitem(self): a = [4, 3, 2, 1] + self.failUnlessRaises(TypeError, operator.delitem, a) + self.failUnlessRaises(TypeError, operator.delitem, a, None) self.failUnless(operator.delitem(a, 1) is None) self.assert_(a == [4, 2, 1]) def test_delslice(self): a = range(10) + self.failUnlessRaises(TypeError, operator.delslice, a) + self.failUnlessRaises(TypeError, operator.delslice, a, None, None) self.failUnless(operator.delslice(a, 2, 8) is None) self.assert_(a == [0, 1, 8, 9]) def test_div(self): + self.failUnlessRaises(TypeError, operator.div, 5) + self.failUnlessRaises(TypeError, operator.div, None, None) self.failUnless(operator.floordiv(5, 2) == 2) def test_floordiv(self): + self.failUnlessRaises(TypeError, operator.floordiv, 5) + self.failUnlessRaises(TypeError, operator.floordiv, None, None) self.failUnless(operator.floordiv(5, 2) == 2) def test_truediv(self): + self.failUnlessRaises(TypeError, operator.truediv, 5) + self.failUnlessRaises(TypeError, operator.truediv, None, None) self.failUnless(operator.truediv(5, 2) == 2.5) def test_getitem(self): a = range(10) + self.failUnlessRaises(TypeError, operator.getitem) + self.failUnlessRaises(TypeError, operator.getitem, a, None) self.failUnless(operator.getitem(a, 2) == 2) def test_getslice(self): a = range(10) + self.failUnlessRaises(TypeError, operator.getslice) + self.failUnlessRaises(TypeError, operator.getslice, a, None, None) self.failUnless(operator.getslice(a, 4, 6) == [4, 5]) def test_indexOf(self): + self.failUnlessRaises(TypeError, operator.indexOf) + self.failUnlessRaises(TypeError, operator.indexOf, None, None) self.failUnless(operator.indexOf([4, 3, 2, 1], 3) == 1) self.assertRaises(ValueError, operator.indexOf, [4, 3, 2, 1], 0) def test_invert(self): + self.failUnlessRaises(TypeError, operator.invert) + self.failUnlessRaises(TypeError, operator.invert, None) self.failUnless(operator.inv(4) == -5) def test_isCallable(self): + self.failUnlessRaises(TypeError, operator.isCallable) class C: pass def check(self, o, v): @@ -116,12 +163,14 @@ check(self, C(), 0) def test_isMappingType(self): + self.failUnlessRaises(TypeError, operator.isMappingType) self.failIf(operator.isMappingType(1)) self.failIf(operator.isMappingType(operator.isMappingType)) self.failUnless(operator.isMappingType(operator.__dict__)) self.failUnless(operator.isMappingType({})) def test_isNumberType(self): + self.failUnlessRaises(TypeError, operator.isNumberType) self.failUnless(operator.isNumberType(8)) self.failUnless(operator.isNumberType(8j)) self.failUnless(operator.isNumberType(8L)) @@ -129,6 +178,7 @@ self.failIf(operator.isNumberType(dir())) def test_isSequenceType(self): + self.failUnlessRaises(TypeError, operator.isSequenceType) self.failUnless(operator.isSequenceType(dir())) self.failUnless(operator.isSequenceType(())) self.failUnless(operator.isSequenceType(xrange(10))) @@ -136,32 +186,46 @@ self.failIf(operator.isSequenceType(3)) def test_lshift(self): + self.failUnlessRaises(TypeError, operator.lshift) + self.failUnlessRaises(TypeError, operator.lshift, None, 42) self.failUnless(operator.lshift(5, 1) == 10) self.failUnless(operator.lshift(5, 0) == 5) self.assertRaises(ValueError, operator.lshift, 2, -1) def test_mod(self): + self.failUnlessRaises(TypeError, operator.mod) + self.failUnlessRaises(TypeError, operator.mod, None, 42) self.failUnless(operator.mod(5, 2) == 1) def test_mul(self): + self.failUnlessRaises(TypeError, operator.mul) + self.failUnlessRaises(TypeError, operator.mul, None, None) self.failUnless(operator.mul(5, 2) == 10) def test_neg(self): + self.failUnlessRaises(TypeError, operator.neg) + self.failUnlessRaises(TypeError, operator.neg, None) self.failUnless(operator.neg(5) == -5) self.failUnless(operator.neg(-5) == 5) self.failUnless(operator.neg(0) == 0) self.failUnless(operator.neg(-0) == 0) def test_bitwise_or(self): + self.failUnlessRaises(TypeError, operator.or_) + self.failUnlessRaises(TypeError, operator.or_, None, None) self.failUnless(operator.or_(0xa, 0x5) == 0xf) def test_pos(self): + self.failUnlessRaises(TypeError, operator.pos) + self.failUnlessRaises(TypeError, operator.pos, None) self.failUnless(operator.pos(5) == 5) self.failUnless(operator.pos(-5) == -5) self.failUnless(operator.pos(0) == 0) self.failUnless(operator.pos(-0) == 0) def test_pow(self): + self.failUnlessRaises(TypeError, operator.pow) + self.failUnlessRaises(TypeError, operator.pow, None, None) self.failUnless(operator.pow(3,5) == 3**5) self.failUnless(operator.__pow__(3,5) == 3**5) self.assertRaises(TypeError, operator.pow, 1) @@ -169,6 +233,8 @@ def test_repeat(self): a = range(3) + self.failUnlessRaises(TypeError, operator.repeat) + self.failUnlessRaises(TypeError, operator.repeat, a, None) self.failUnless(operator.repeat(a, 2) == a+a) self.failUnless(operator.repeat(a, 1) == a) self.failUnless(operator.repeat(a, 0) == []) @@ -182,11 +248,15 @@ self.failUnless(operator.repeat(a, 0) == '') def test_rshift(self): + self.failUnlessRaises(TypeError, operator.rshift) + self.failUnlessRaises(TypeError, operator.rshift, None, 42) self.failUnless(operator.rshift(5, 1) == 2) self.failUnless(operator.rshift(5, 0) == 5) self.assertRaises(ValueError, operator.rshift, 2, -1) def test_contains(self): + self.failUnlessRaises(TypeError, operator.contains) + self.failUnlessRaises(TypeError, operator.contains, None, None) self.failUnless(operator.contains(range(4), 2)) self.failIf(operator.contains(range(4), 5)) self.failUnless(operator.sequenceIncludes(range(4), 2)) @@ -194,36 +264,51 @@ def test_setitem(self): a = range(3) + self.failUnlessRaises(TypeError, operator.setitem, a) + self.failUnlessRaises(TypeError, operator.setitem, a, None, None) self.failUnless(operator.setitem(a, 0, 2) is None) self.assert_(a == [2, 1, 2]) self.assertRaises(IndexError, operator.setitem, a, 4, 2) def test_setslice(self): a = range(4) + self.failUnlessRaises(TypeError, operator.setslice, a) + self.failUnlessRaises(TypeError, operator.setslice, a, None, None, None) self.failUnless(operator.setslice(a, 1, 3, [2, 1]) is None) self.assert_(a == [0, 2, 1, 3]) def test_sub(self): + self.failUnlessRaises(TypeError, operator.sub) + self.failUnlessRaises(TypeError, operator.sub, None, None) self.failUnless(operator.sub(5, 2) == 3) def test_truth(self): + class C(object): + def __nonzero__(self): + raise SyntaxError + self.failUnlessRaises(TypeError, operator.truth) + self.failUnlessRaises(SyntaxError, operator.truth, C()) self.failUnless(operator.truth(5)) self.failUnless(operator.truth([0])) self.failIf(operator.truth(0)) self.failIf(operator.truth([])) def test_bitwise_xor(self): + self.failUnlessRaises(TypeError, operator.xor) + self.failUnlessRaises(TypeError, operator.xor, None, None) self.failUnless(operator.xor(0xb, 0xc) == 0x7) def test_is(self): a = b = 'xyzpdq' c = a[:3] + b[3:] + self.failUnlessRaises(TypeError, operator.is_) self.failUnless(operator.is_(a, b)) self.failIf(operator.is_(a,c)) def test_is_not(self): a = b = 'xyzpdq' c = a[:3] + b[3:] + self.failUnlessRaises(TypeError, operator.is_not) self.failIf(operator.is_not(a, b)) self.failUnless(operator.is_not(a,c)) @@ -241,6 +326,11 @@ self.assertRaises(TypeError, operator.attrgetter) self.assertRaises(TypeError, operator.attrgetter, 1, 2) + class C(object): + def __getattr(self, name): + raise SyntaxError + self.failUnlessRaises(AttributeError, operator.attrgetter('foo'), C()) + def test_itemgetter(self): a = 'ABCDE' f = operator.itemgetter(2) @@ -248,6 +338,11 @@ f = operator.itemgetter(10) self.assertRaises(IndexError, f, a) + class C(object): + def __getitem(self, name): + raise SyntaxError + self.failUnlessRaises(TypeError, operator.itemgetter(42), C()) + f = operator.itemgetter('name') self.assertRaises(TypeError, f, a) self.assertRaises(TypeError, operator.itemgetter) From doerwalter at users.sourceforge.net Mon Nov 1 18:10:22 2004 From: doerwalter at users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Mon Nov 1 18:10:26 2004 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.22,1.23 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv973/Modules Modified Files: bz2module.c Log Message: Add error checks for the bz2, cStringIO and operator modules. Add function names to various PyArg_ParseTuple calls in bz2module.c. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- bz2module.c 14 Feb 2004 00:02:45 -0000 1.22 +++ bz2module.c 1 Nov 2004 17:10:19 -0000 1.23 @@ -787,7 +787,7 @@ int len; int bzerror; - if (!PyArg_ParseTuple(args, "s#", &buf, &len)) + if (!PyArg_ParseTuple(args, "s#:write", &buf, &len)) return NULL; ACQUIRE_LOCK(self); @@ -1500,7 +1500,7 @@ bz_stream *bzs = &self->bzs; int bzerror; - if (!PyArg_ParseTuple(args, "s#", &data, &datasize)) + if (!PyArg_ParseTuple(args, "s#:compress", &data, &datasize)) return NULL; if (datasize == 0) @@ -1781,7 +1781,7 @@ bz_stream *bzs = &self->bzs; int bzerror; - if (!PyArg_ParseTuple(args, "s#", &data, &datasize)) + if (!PyArg_ParseTuple(args, "s#:decompress", &data, &datasize)) return NULL; ACQUIRE_LOCK(self); @@ -2069,7 +2069,7 @@ bz_stream *bzs = &_bzs; int bzerror; - if (!PyArg_ParseTuple(args, "s#", &data, &datasize)) + if (!PyArg_ParseTuple(args, "s#:decompress", &data, &datasize)) return NULL; if (datasize == 0) From rhettinger at users.sourceforge.net Mon Nov 1 23:27:17 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Nov 1 23:27:20 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_traceback.py, 1.13, 1.14 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6406 Modified Files: test_traceback.py Log Message: * Bumped up the sleep() delay to four seconds so this test will run reliably on WinME with FAT32. * Native speaker rewrite of the comment block. * Removed unnecessary backslashes from the multi-line function defintions. Index: test_traceback.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_traceback.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- test_traceback.py 1 Nov 2004 08:26:09 -0000 1.13 +++ test_traceback.py 1 Nov 2004 22:27:14 -0000 1.14 @@ -48,7 +48,7 @@ try: sys.path.insert(0, testdir) testfile = os.path.join(testdir, 'test_bug737473.py') - print >> open(testfile, 'w'), """\ + print >> open(testfile, 'w'), """ def test(): raise ValueError""" @@ -62,12 +62,15 @@ # this loads source code to linecache traceback.extract_tb(sys.exc_traceback) - # If this test runs fast, test_bug737473.py will stay in a mtime - # even if it's rewrited and it'll not reloaded in result. So wait - # until new timestamp comes. - time.sleep(2) + # If this test runs too quickly, test_bug737473.py's mtime + # attribute will remain unchanged even if the file is rewritten. + # Consequently, the file would not reload. So, added a sleep() + # delay to assure that a new, distinct timestamp is written. + # Since WinME with FAT32 has multisecond resolution, more than + # three seconds are needed for this test to pass reliably :-( + time.sleep(4) - print >> open(testfile, 'w'), """\ + print >> open(testfile, 'w'), """ def test(): raise NotImplementedError""" reload(test_bug737473) From rhettinger at users.sourceforge.net Tue Nov 2 03:11:39 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Nov 2 03:11:43 2004 Subject: [Python-checkins] python/dist/src/Modules collectionsmodule.c, 1.34, 1.35 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17520 Modified Files: collectionsmodule.c Log Message: Bump-up block size. Index: collectionsmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/collectionsmodule.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- collectionsmodule.c 9 Oct 2004 16:02:18 -0000 1.34 +++ collectionsmodule.c 2 Nov 2004 02:11:35 -0000 1.35 @@ -13,7 +13,7 @@ * length of a cache line. */ -#define BLOCKLEN 46 +#define BLOCKLEN 62 #define CENTER ((BLOCKLEN - 1) / 2) /* A `dequeobject` is composed of a doubly-linked list of `block` nodes. From rhettinger at users.sourceforge.net Tue Nov 2 05:20:12 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Nov 2 05:20:16 2004 Subject: [Python-checkins] python/dist/src/Python compile.c,2.335,2.336 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8045/Python Modified Files: compile.c Log Message: Maintain peepholer's cumlc invariant by updating the running total everytime a LOAD_CONSTANT is encountered, created, or overwritten. Added two tests to cover cases affected by the patch. Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.335 retrieving revision 2.336 diff -u -d -r2.335 -r2.336 --- compile.c 1 Nov 2004 15:19:11 -0000 2.335 +++ compile.c 2 Nov 2004 04:20:09 -0000 2.336 @@ -586,6 +586,7 @@ if (PyList_GET_ITEM(consts, j) == Py_None) { codestr[i] = LOAD_CONST; SETARG(codestr, i, j); + cumlc = lastlc + 1; break; } } @@ -601,6 +602,7 @@ !PyObject_IsTrue(PyList_GET_ITEM(consts, j))) continue; memset(codestr+i, NOP, 7); + cumlc = 0; break; /* Try to fold tuples of constants. @@ -615,6 +617,8 @@ codestr[h] == LOAD_CONST && ISBASICBLOCK(blocks, h, 3*(j+1)) && tuple_of_constants(&codestr[h], j, consts)) { + assert(codestr[i] == LOAD_CONST); + cumlc = 1; break; } /* Intentional fallthrough */ From rhettinger at users.sourceforge.net Tue Nov 2 05:20:12 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Nov 2 05:20:16 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_peepholer.py, 1.4, 1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8045/Lib/test Modified Files: test_peepholer.py Log Message: Maintain peepholer's cumlc invariant by updating the running total everytime a LOAD_CONSTANT is encountered, created, or overwritten. Added two tests to cover cases affected by the patch. Index: test_peepholer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_peepholer.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- test_peepholer.py 26 Oct 2004 08:59:14 -0000 1.4 +++ test_peepholer.py 2 Nov 2004 04:20:10 -0000 1.5 @@ -75,9 +75,11 @@ def test_folding_of_tuples_of_constants(self): for line, elem in ( - ('a = 1,2,3', '((1, 2, 3))',), - ('("a","b","c")', "(('a', 'b', 'c'))",), - ('a,b,c = 1,2,3', '((1, 2, 3))',), + ('a = 1,2,3', '((1, 2, 3))'), + ('("a","b","c")', "(('a', 'b', 'c'))"), + ('a,b,c = 1,2,3', '((1, 2, 3))'), + ('(None, 1, None)', '((None, 1, None))'), + ('((1, 2), 3, 4)', '(((1, 2), 3, 4))'), ): asm = dis_single(line) self.assert_(elem in asm) From anthonybaxter at users.sourceforge.net Tue Nov 2 14:03:57 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Nov 2 14:04:01 2004 Subject: [Python-checkins] python/dist/src/Include patchlevel.h,2.80,2.81 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28337/Include Modified Files: patchlevel.h Log Message: release bit Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.80 retrieving revision 2.81 diff -u -d -r2.80 -r2.81 --- patchlevel.h 14 Oct 2004 05:07:17 -0000 2.80 +++ patchlevel.h 2 Nov 2004 13:03:54 -0000 2.81 @@ -23,10 +23,10 @@ #define PY_MINOR_VERSION 4 #define PY_MICRO_VERSION 0 #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA -#define PY_RELEASE_SERIAL 1 +#define PY_RELEASE_SERIAL 2 /* Version as a string */ -#define PY_VERSION "2.4b1" +#define PY_VERSION "2.4b2" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ From fdrake at users.sourceforge.net Tue Nov 2 19:24:29 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Nov 2 19:24:34 2004 Subject: [Python-checkins] python/dist/src/Doc/tut tut.tex,1.256,1.257 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30689 Modified Files: tut.tex Log Message: - show how to use file.write() with a non-string value (closes SF bug #621057) - add missing whitespace around assignment operator Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.256 retrieving revision 1.257 diff -u -d -r1.256 -r1.257 --- tut.tex 26 Oct 2004 03:53:35 -0000 1.256 +++ tut.tex 2 Nov 2004 18:24:26 -0000 1.257 @@ -3157,6 +3157,15 @@ >>> f.write('This is a test\n') \end{verbatim} +To write something other than a string, it needs to be converted to a +string first: + +\begin{verbatim} +>>> value = ('the answer', 42) +>>> s = str(value) +>>> f.write(s) +\end{verbatim} + \code{f.tell()} returns an integer giving the file object's current position in the file, measured in bytes from the beginning of the file. To change the file object's position, use @@ -3169,7 +3178,7 @@ using the beginning of the file as the reference point. \begin{verbatim} ->>> f=open('/tmp/workfile', 'r+') +>>> f = open('/tmp/workfile', 'r+') >>> f.write('0123456789abcdef') >>> f.seek(5) # Go to the 6th byte in the file >>> f.read(1) From fdrake at users.sourceforge.net Tue Nov 2 19:26:07 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Nov 2 19:26:09 2004 Subject: [Python-checkins] python/dist/src/Doc/tut tut.tex, 1.196.8.23, 1.196.8.24 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31095 Modified Files: Tag: release23-maint tut.tex Log Message: - show how to use file.write() with a non-string value (closes SF bug #621057) - add missing whitespace around assignment operator (backported from trunk revision 1.257) Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.196.8.23 retrieving revision 1.196.8.24 diff -u -d -r1.196.8.23 -r1.196.8.24 --- tut.tex 22 Aug 2004 15:27:16 -0000 1.196.8.23 +++ tut.tex 2 Nov 2004 18:26:05 -0000 1.196.8.24 @@ -3069,6 +3069,15 @@ >>> f.write('This is a test\n') \end{verbatim} +To write something other than a string, it needs to be converted to a +string first: + +\begin{verbatim} +>>> value = ('the answer', 42) +>>> s = str(value) +>>> f.write(s) +\end{verbatim} + \code{f.tell()} returns an integer giving the file object's current position in the file, measured in bytes from the beginning of the file. To change the file object's position, use @@ -3081,7 +3090,7 @@ using the beginning of the file as the reference point. \begin{verbatim} ->>> f=open('/tmp/workfile', 'r+') +>>> f = open('/tmp/workfile', 'r+') >>> f.write('0123456789abcdef') >>> f.seek(5) # Go to the 6th byte in the file >>> f.read(1) From fdrake at users.sourceforge.net Tue Nov 2 19:57:36 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Nov 2 19:57:39 2004 Subject: [Python-checkins] python/dist/src/Doc/ref ref5.tex, 1.84, 1.85 ref7.tex, 1.40, 1.41 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5690/ref Modified Files: ref5.tex ref7.tex Log Message: clarify trailing comma in function argument list (SF bug #798652) Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- ref5.tex 9 Oct 2004 15:52:04 -0000 1.84 +++ ref5.tex 2 Nov 2004 18:57:33 -0000 1.85 @@ -493,8 +493,8 @@ {\token{identifier} "=" \token{expression}} \end{productionlist} -A trailing comma may be present after an argument list but does not -affect the semantics. +A trailing comma may be present after the positional and keyword +arguments but does not affect the semantics. The primary must evaluate to a callable object (user-defined functions, built-in functions, methods of built-in objects, class Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- ref7.tex 17 Aug 2004 17:29:13 -0000 1.40 +++ ref7.tex 2 Nov 2004 18:57:33 -0000 1.41 @@ -322,10 +322,10 @@ \production{decorator} {"@" \token{dotted_name} ["(" [\token{argument_list} [","]] ")"] NEWLINE} \production{parameter_list} - {(\token{defparameter} ",")*} - \productioncont{("*" \token{identifier} [, "**" \token{identifier}]} - \productioncont{| "**" \token{identifier} - | \token{defparameter} [","])} + {(\token{defparameter} ",")*} + \productioncont{(~~"*" \token{identifier} [, "**" \token{identifier}]} + \productioncont{ | "**" \token{identifier}} + \productioncont{ | \token{defparameter} [","] )} \production{defparameter} {\token{parameter} ["=" \token{expression}]} \production{sublist} From fdrake at users.sourceforge.net Tue Nov 2 19:59:21 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Nov 2 19:59:24 2004 Subject: [Python-checkins] python/dist/src/Doc/ref ref5.tex, 1.76.10.3, 1.76.10.4 ref7.tex, 1.35.16.2, 1.35.16.3 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6026/ref Modified Files: Tag: release23-maint ref5.tex ref7.tex Log Message: clarify trailing comma in function argument list (SF bug #798652) Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.76.10.3 retrieving revision 1.76.10.4 diff -u -d -r1.76.10.3 -r1.76.10.4 --- ref5.tex 23 Apr 2004 17:14:35 -0000 1.76.10.3 +++ ref5.tex 2 Nov 2004 18:59:18 -0000 1.76.10.4 @@ -444,8 +444,8 @@ {\token{identifier} "=" \token{expression}} \end{productionlist} -A trailing comma may be present after an argument list but does not -affect the semantics. +A trailing comma may be present after the positional and keyword +arguments but does not affect the semantics. The primary must evaluate to a callable object (user-defined functions, built-in functions, methods of built-in objects, class Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.35.16.2 retrieving revision 1.35.16.3 diff -u -d -r1.35.16.2 -r1.35.16.3 --- ref7.tex 2 Jun 2004 13:00:32 -0000 1.35.16.2 +++ ref7.tex 2 Nov 2004 18:59:18 -0000 1.35.16.3 @@ -318,10 +318,10 @@ {"def" \token{funcname} "(" [\token{parameter_list}] ")" ":" \token{suite}} \production{parameter_list} - {(\token{defparameter} ",")*} - \productioncont{("*" \token{identifier} [, "**" \token{identifier}]} - \productioncont{| "**" \token{identifier} - | \token{defparameter} [","])} + {(\token{defparameter} ",")*} + \productioncont{(~~"*" \token{identifier} [, "**" \token{identifier}]} + \productioncont{ | "**" \token{identifier}} + \productioncont{ | \token{defparameter} [","] )} \production{defparameter} {\token{parameter} ["=" \token{expression}]} \production{sublist} From fdrake at users.sourceforge.net Tue Nov 2 20:15:45 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Nov 2 20:15:47 2004 Subject: [Python-checkins] python/dist/src/Doc/ref ref7.tex, 1.35.16.3, 1.35.16.4 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9694/ref Modified Files: Tag: release23-maint ref7.tex Log Message: clarify discussion of iteration in the section on the "for" statement (SF bug #829073) Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.35.16.3 retrieving revision 1.35.16.4 diff -u -d -r1.35.16.3 -r1.35.16.4 --- ref7.tex 2 Nov 2004 18:59:18 -0000 1.35.16.3 +++ ref7.tex 2 Nov 2004 19:15:42 -0000 1.35.16.4 @@ -134,8 +134,10 @@ \productioncont{["else" ":" \token{suite}]} \end{productionlist} -The expression list is evaluated once; it should yield a sequence. The -suite is then executed once for each item in the sequence, in the +The expression list is evaluated once; it should yield an iterable +object. An iterator is created for the result of the +{}\code{expression_list}. The suite is then executed once for each +item provided by the iterator, in the order of ascending indices. Each item in turn is assigned to the target list using the standard rules for assignments, and then the suite is executed. When the items are exhausted (which is immediately From fdrake at users.sourceforge.net Tue Nov 2 20:18:22 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Nov 2 20:18:25 2004 Subject: [Python-checkins] python/dist/src/Doc/tools push-docs.sh,1.19,1.20 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10233/tools Modified Files: push-docs.sh Log Message: clarify discussion of iteration in the section on the "for" statement (SF bug #829073) Index: push-docs.sh =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/push-docs.sh,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- push-docs.sh 29 Jun 2004 14:39:06 -0000 1.19 +++ push-docs.sh 2 Nov 2004 19:18:20 -0000 1.20 @@ -11,6 +11,7 @@ TARGET="$TARGETHOST:$TARGETDIR" ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' +ADDRESSES=fdrake01@comcast.net TOOLDIR="`dirname $0`" VERSION=`$TOOLDIR/getversioninfo` @@ -32,7 +33,7 @@ getopt -T >/dev/null if [ $? -eq 4 ] ; then # We have a sufficiently useful getopt(1) implementation. - set -- `getopt -ssh m:p:qt:F: "$@"` + eval "set -- `getopt -ssh m:p:qt:F: \"$@\"`" else # This version of getopt doesn't support quoting of long options # with spaces, so let's not rely on it at all. From fdrake at users.sourceforge.net Tue Nov 2 20:18:22 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Nov 2 20:18:28 2004 Subject: [Python-checkins] python/dist/src/Doc/ref ref7.tex,1.41,1.42 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10233/ref Modified Files: ref7.tex Log Message: clarify discussion of iteration in the section on the "for" statement (SF bug #829073) Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- ref7.tex 2 Nov 2004 18:57:33 -0000 1.41 +++ ref7.tex 2 Nov 2004 19:18:20 -0000 1.42 @@ -134,8 +134,10 @@ \productioncont{["else" ":" \token{suite}]} \end{productionlist} -The expression list is evaluated once; it should yield a sequence. The -suite is then executed once for each item in the sequence, in the +The expression list is evaluated once; it should yield an iterable +object. An iterator is created for the result of the +{}\code{expression_list}. The suite is then executed once for each +item provided by the iterator, in the order of ascending indices. Each item in turn is assigned to the target list using the standard rules for assignments, and then the suite is executed. When the items are exhausted (which is immediately From fdrake at users.sourceforge.net Tue Nov 2 20:20:45 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Nov 2 20:20:48 2004 Subject: [Python-checkins] python/dist/src/Doc/tools push-docs.sh,1.20,1.21 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10667/tools Modified Files: push-docs.sh Log Message: fix accidental commit Index: push-docs.sh =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/push-docs.sh,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- push-docs.sh 2 Nov 2004 19:18:20 -0000 1.20 +++ push-docs.sh 2 Nov 2004 19:20:43 -0000 1.21 @@ -11,7 +11,6 @@ TARGET="$TARGETHOST:$TARGETDIR" ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' -ADDRESSES=fdrake01@comcast.net TOOLDIR="`dirname $0`" VERSION=`$TOOLDIR/getversioninfo` From loewis at users.sourceforge.net Tue Nov 2 23:28:11 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Tue Nov 2 23:28:14 2004 Subject: [Python-checkins] python/dist/src/PCbuild BUILDno.txt, 1.62, 1.63 pythoncore.vcproj, 1.22, 1.23 Message-ID: Update of /cvsroot/python/python/dist/src/PCbuild In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18840 Modified Files: BUILDno.txt pythoncore.vcproj Log Message: Bump buildno for 2.4b2. Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- BUILDno.txt 15 Oct 2004 05:44:39 -0000 1.62 +++ BUILDno.txt 2 Nov 2004 22:28:07 -0000 1.63 @@ -33,6 +33,8 @@ Windows Python BUILD numbers ---------------------------- + 58 2.4.0b2 + 22-Nov-2004 57 2.4.0b1 15-Oct-2004 56 2.4.0a3 Index: pythoncore.vcproj =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/pythoncore.vcproj,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- pythoncore.vcproj 15 Oct 2004 05:44:39 -0000 1.22 +++ pythoncore.vcproj 2 Nov 2004 22:28:07 -0000 1.23 @@ -1385,7 +1385,7 @@ Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" - PreprocessorDefinitions="BUILD=57"/> + PreprocessorDefinitions="BUILD=58"/> @@ -1393,7 +1393,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" - PreprocessorDefinitions="BUILD=57"/> + PreprocessorDefinitions="BUILD=58"/> @@ -1401,7 +1401,7 @@ Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" - PreprocessorDefinitions="BUILD=57"/> + PreprocessorDefinitions="BUILD=58"/> Update of /cvsroot/python/python/dist/src/Tools/msi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25674 Modified Files: msi.py Log Message: Exclude badsyntax from compileall; adjust options to what Makefile.pre.in does. Fixes #1049003. Index: msi.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/msi/msi.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- msi.py 19 Sep 2004 18:36:45 -0000 1.12 +++ msi.py 2 Nov 2004 22:59:56 -0000 1.13 @@ -352,6 +352,7 @@ ("VerdanaBold10", "Verdana", 10, None, 1), ]) + compileargs = r"-Wi [TARGETDIR]Lib\compileall.py -f -x badsyntax [TARGETDIR]Lib" # See "CustomAction Table" add_data(db, "CustomAction", [ # msidbCustomActionTypeFirstSequence + msidbCustomActionTypeTextData + msidbCustomActionTypeProperty @@ -363,8 +364,8 @@ ("SetDLLDirToSystem32", 307, "DLLDIR", SystemFolderName), # msidbCustomActionTypeExe + msidbCustomActionTypeSourceFile # See "Custom Action Type 18" - ("CompilePyc", 18, "python.exe", r"[TARGETDIR]Lib\compileall.py [TARGETDIR]Lib"), - ("CompilePyo", 18, "python.exe", r"-O [TARGETDIR]Lib\compileall.py [TARGETDIR]Lib") + ("CompilePyc", 18, "python.exe", compileargs), + ("CompilePyo", 18, "python.exe", "-O "+compileargs), ]) # UI Sequences, see "InstallUISequence Table", "Using a Sequence Table" From anthonybaxter at users.sourceforge.net Wed Nov 3 07:21:39 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Wed Nov 3 07:21:44 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1180,1.1181 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32556/Misc Modified Files: NEWS Log Message: release shenanigans Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1180 retrieving revision 1.1181 diff -u -d -r1.1180 -r1.1181 --- NEWS 1 Nov 2004 03:52:43 -0000 1.1180 +++ NEWS 3 Nov 2004 06:21:36 -0000 1.1181 @@ -7,7 +7,7 @@ What's New in Python 2.4 beta 2? ================================ -*Release date: XX-XXX-XXXX* +*Release date: 03-NOV-2004* License ------- From anthonybaxter at users.sourceforge.net Wed Nov 3 07:21:39 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Wed Nov 3 07:21:44 2004 Subject: [Python-checkins] python/dist/src/Lib/idlelib NEWS.txt, 1.42, 1.43 idlever.py, 1.18, 1.19 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32556/Lib/idlelib Modified Files: NEWS.txt idlever.py Log Message: release shenanigans Index: NEWS.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- NEWS.txt 24 Oct 2004 23:45:42 -0000 1.42 +++ NEWS.txt 3 Nov 2004 06:21:35 -0000 1.43 @@ -1,7 +1,7 @@ What's New in IDLE 1.1b2? ========================= -*Release date: DD-MMM-2004* +*Release date: 03-NOV-2004* - When paragraph reformat width was made configurable, a bug was introduced that caused reformatting of comment blocks to ignore how Index: idlever.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/idlever.py,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- idlever.py 22 Aug 2004 05:14:32 -0000 1.18 +++ idlever.py 3 Nov 2004 06:21:36 -0000 1.19 @@ -1 +1 @@ -IDLE_VERSION = "1.1a3" +IDLE_VERSION = "1.1b2" From anthonybaxter at users.sourceforge.net Wed Nov 3 07:21:39 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Wed Nov 3 07:21:46 2004 Subject: [Python-checkins] python/dist/src/Misc/RPM python-2.4.spec,1.5,1.6 Message-ID: Update of /cvsroot/python/python/dist/src/Misc/RPM In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32556/Misc/RPM Modified Files: python-2.4.spec Log Message: release shenanigans Index: python-2.4.spec =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/RPM/python-2.4.spec,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- python-2.4.spec 21 Oct 2004 23:35:45 -0000 1.5 +++ python-2.4.spec 3 Nov 2004 06:21:37 -0000 1.6 @@ -33,7 +33,7 @@ ################################# %define name python -%define version 2.4b1 +%define version 2.4b2 %define libvers 2.4 %define release 1pydotorg %define __prefix /usr From goodger at users.sourceforge.net Wed Nov 3 17:58:32 2004 From: goodger at users.sourceforge.net (goodger@users.sourceforge.net) Date: Wed Nov 3 17:58:36 2004 Subject: [Python-checkins] python/nondist/peps pep-0336.txt, NONE, 1.1 pep-0000.txt, 1.293, 1.294 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20583 Modified Files: pep-0000.txt Added Files: pep-0336.txt Log Message: added PEP 336, "Make None Callable", by Andrew McClelland --- NEW FILE: pep-0336.txt --- PEP: 336 Title: Make None Callable Version: $Revision: 1.1 $ Last-Modified: $Date: 2004/11/03 16:58:30 $ Author: Andrew McClelland Status: Draft Type: Standards Track Content-Type: text/plain Created: 28-Oct-2004 Post-History: Abstract None should be a callable object that when called with any arguments has no side effect and returns None. Motivation To allow a programming style for selectable actions that is more in accordance with the minimalistic functional programming goals of the Python language. Rationale Allow the use of None in method tables as a universal no effect rather than either (1) checking a method table entry against None before calling, or (2) writing a local no effect method with arguments similar to other functions in the table. The semantics would be effectively, class None: def __call__(self, *args): pass How To Use Before, checking function table entry against None: class Select: def a(self, input): print 'a' def b(self, input): print 'b' def c(self, input); print 'c' def __call__(self, input): function = { 1 : self.a, 2 : self.b, 3 : self.c }.get(input, None) if function: return function(input) Before, using a local no effect method: class Select: def a(self, input): print 'a' def b(self, input): print 'b' def c(self, input); print 'c' def nop(self, input): pass def __call__(self, input): return { 1 : self.a, 2 : self.b, 3 : self.c }.get(input, self.nop)(input) After: class Select: def a(self, input): print 'a' def b(self, input): print 'b' def c(self, input); print 'c' def __call__(self, input): return { 1 : self.a, 2 : self.b, 3 : self.c }.get(input, None)(input) References [1] Python Reference Manual, Section 3.2, http://docs.python.org/ref/ref.html Copyright This document has been placed in the public domain. Local Variables: mode: indented-text indent-tabs-mode: nil sentence-end-double-space: t fill-column: 70 End: Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.293 retrieving revision 1.294 diff -u -d -r1.293 -r1.294 --- pep-0000.txt 27 Oct 2004 10:09:55 -0000 1.293 +++ pep-0000.txt 3 Nov 2004 16:58:30 -0000 1.294 @@ -123,6 +123,7 @@ S 332 Byte vectors and String/Unicode Unification Montanaro S 334 Simple Coroutines via SuspendIteration Evans S 335 Overloadable Boolean Operators Ewing + S 336 Make None Callable McClelland S 754 IEEE 754 Floating Point Special Values Warnes Finished PEPs (done, implemented in CVS) @@ -366,6 +367,7 @@ I 333 Python Web Server Gateway Interface v1.0 Eby S 334 Simple Coroutines via SuspendIteration Evans S 335 Overloadable Boolean Operators Ewing + S 336 Make None Callable McClelland SR 666 Reject Foolish Indentation Creighton S 754 IEEE 754 Floating Point Special Values Warnes I 3000 Python 3.0 Plans Kuchling, Cannon @@ -431,6 +433,7 @@ Lielens, Gregory gregory.lielens@fft.be von Loewis, Martin loewis@informatik.hu-berlin.de Martelli, Alex aleax@aleax.it + McClelland, Andrew eternalsquire@comcast.net McMillan, Gordon gmcm@hypernet.com McNamara, Andrew andrewm@object-craft.com.au Mick, Trent trentm@activestate.com From anthonybaxter at users.sourceforge.net Thu Nov 4 04:20:26 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Thu Nov 4 04:20:29 2004 Subject: [Python-checkins] python/nondist/peps pep-0320.txt,1.19,1.20 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19579 Modified Files: pep-0320.txt Log Message: the release process marches on, like a tiny tiny napoleon advancing on moscow, although hopefully with a better result. Index: pep-0320.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0320.txt,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- pep-0320.txt 27 Oct 2004 11:53:05 -0000 1.19 +++ pep-0320.txt 4 Nov 2004 03:20:23 -0000 1.20 @@ -35,7 +35,7 @@ October 15: beta 1 [completed] - November 3: beta 2 [scheduled] + November 3: beta 2 [completed] November 18: release candidate 1 [scheduled] From fdrake at users.sourceforge.net Thu Nov 4 04:23:07 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 4 04:23:10 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.150,1.151 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20031/perl Modified Files: python.perl Log Message: fix markup in "title" attribute for \citetitle{} (closes SF patch #1054715; backporting to release23-maint branch) Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.150 retrieving revision 1.151 diff -u -d -r1.150 -r1.151 --- python.perl 29 Oct 2004 19:47:52 -0000 1.150 +++ python.perl 4 Nov 2004 03:23:04 -0000 1.151 @@ -389,9 +389,10 @@ my $icon = get_link_icon($url); my $repl = ''; if ($url) { + my $titletext = strip_html_markup("$title"); $repl = ("$title$icon"); } else { From fdrake at users.sourceforge.net Thu Nov 4 04:25:25 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 4 04:25:28 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl, 1.137.8.3, 1.137.8.4 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20281/perl Modified Files: Tag: release23-maint python.perl Log Message: fix markup in "title" attribute for \citetitle{} (closes SF patch #1054715; backported from trunk revision 1.151) Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.137.8.3 retrieving revision 1.137.8.4 diff -u -d -r1.137.8.3 -r1.137.8.4 --- python.perl 8 Apr 2004 15:46:56 -0000 1.137.8.3 +++ python.perl 4 Nov 2004 03:25:23 -0000 1.137.8.4 @@ -390,9 +390,10 @@ my $icon = get_link_icon($url); my $repl = ''; if ($url) { + my $titletext = strip_html_markup("$title"); $repl = ("$title$icon"); } else { From montanaro at users.sourceforge.net Thu Nov 4 05:31:33 2004 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Thu Nov 4 05:31:36 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libatexit.tex,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29401/Doc/lib Modified Files: libatexit.tex Log Message: Fix bug 1052242. Also includes rewrite of test case using unittest and avoiding use of popen. Index: libatexit.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libatexit.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- libatexit.tex 8 Apr 2003 17:46:53 -0000 1.8 +++ libatexit.tex 4 Nov 2004 04:31:29 -0000 1.9 @@ -39,6 +39,12 @@ order. The assumption is that lower level modules will normally be imported before higher level modules and thus must be cleaned up later. + +If an exception is raised during execution of the exit handlers, a traceback +is printed (unless SystemExit is raised) and the exception information is +saved. After all exit handlers have had a chance to run the last exception +to be raised is reraised. + \end{funcdesc} From montanaro at users.sourceforge.net Thu Nov 4 05:31:33 2004 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Thu Nov 4 05:31:37 2004 Subject: [Python-checkins] python/dist/src/Lib atexit.py,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29401/Lib Modified Files: atexit.py Log Message: Fix bug 1052242. Also includes rewrite of test case using unittest and avoiding use of popen. Index: atexit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/atexit.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- atexit.py 12 Feb 2004 17:35:05 -0000 1.7 +++ atexit.py 4 Nov 2004 04:31:30 -0000 1.8 @@ -15,9 +15,22 @@ last in, first out. """ + exc_info = None while _exithandlers: func, targs, kargs = _exithandlers.pop() - func(*targs, **kargs) + try: + func(*targs, **kargs) + except SystemExit: + exc_info = sys.exc_info() + except: + import sys, traceback + print >> sys.stderr, "Error in atexit._run_exitfuncs:" + traceback.print_exc() + exc_info = sys.exc_info() + + if exc_info is not None: + raise exc_info[0], exc_info[1], exc_info[2] + def register(func, *targs, **kargs): """register a function to be executed upon normal program termination @@ -33,7 +46,6 @@ # Assume it's another registered exit function - append it to our list register(sys.exitfunc) sys.exitfunc = _run_exitfuncs - del sys if __name__ == "__main__": From montanaro at users.sourceforge.net Thu Nov 4 05:31:33 2004 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Thu Nov 4 05:31:37 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_atexit.py, 1.10, 1.11 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29401/Lib/test Modified Files: test_atexit.py Log Message: Fix bug 1052242. Also includes rewrite of test case using unittest and avoiding use of popen. Index: test_atexit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_atexit.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- test_atexit.py 24 Feb 2003 15:26:39 -0000 1.10 +++ test_atexit.py 4 Nov 2004 04:31:30 -0000 1.11 @@ -1,66 +1,100 @@ -# Test the atexit module. -from test.test_support import TESTFN, vereq, is_jython -import atexit -from os import popen, unlink import sys - -executable = sys.executable -if is_jython: - executable = "jython" - -input = """\ +import unittest +import StringIO import atexit +from test import test_support -def handler1(): - print "handler1" +class TestCase(unittest.TestCase): + def test_args(self): + # be sure args are handled properly + s = StringIO.StringIO() + sys.stdout = sys.stderr = s + save_handlers = atexit._exithandlers + atexit._exithandlers = [] + try: + atexit.register(self.h1) + atexit.register(self.h4) + atexit.register(self.h4, 4, kw="abc") + atexit._run_exitfuncs() + finally: + sys.stdout = sys.__stdout__ + sys.stderr = sys.__stderr__ + atexit._exithandlers = save_handlers + self.assertEqual(s.getvalue(), "h4 (4,) {'kw': 'abc'}\nh4 () {}\nh1\n") -def handler2(*args, **kargs): - print "handler2", args, kargs + def test_order(self): + # be sure handlers are executed in reverse order + s = StringIO.StringIO() + sys.stdout = sys.stderr = s + save_handlers = atexit._exithandlers + atexit._exithandlers = [] + try: + atexit.register(self.h1) + atexit.register(self.h2) + atexit.register(self.h3) + atexit._run_exitfuncs() + finally: + sys.stdout = sys.__stdout__ + sys.stderr = sys.__stderr__ + atexit._exithandlers = save_handlers + self.assertEqual(s.getvalue(), "h3\nh2\nh1\n") -atexit.register(handler1) -atexit.register(handler2) -atexit.register(handler2, 7, kw="abc") -""" + def test_sys_override(self): + # be sure a preset sys.exitfunc is handled properly + s = StringIO.StringIO() + sys.stdout = sys.stderr = s + save_handlers = atexit._exithandlers + atexit._exithandlers = [] + exfunc = sys.exitfunc + sys.exitfunc = self.h1 + reload(atexit) + try: + atexit.register(self.h2) + atexit._run_exitfuncs() + finally: + sys.stdout = sys.__stdout__ + sys.stderr = sys.__stderr__ + atexit._exithandlers = save_handlers + sys.exitfunc = exfunc + self.assertEqual(s.getvalue(), "h2\nh1\n") -fname = TESTFN + ".py" -f = file(fname, "w") -f.write(input) -f.close() + def test_raise(self): + # be sure raises are handled properly + s = StringIO.StringIO() + sys.stdout = sys.stderr = s + save_handlers = atexit._exithandlers + atexit._exithandlers = [] + try: + atexit.register(self.raise1) + atexit.register(self.raise2) + self.assertRaises(TypeError, atexit._run_exitfuncs) + finally: + sys.stdout = sys.__stdout__ + sys.stderr = sys.__stderr__ + atexit._exithandlers = save_handlers + + ### helpers + def h1(self): + print "h1" -p = popen('"%s" %s' % (executable, fname)) -output = p.read() -p.close() -vereq(output, """\ -handler2 (7,) {'kw': 'abc'} -handler2 () {} -handler1 -""") + def h2(self): + print "h2" -input = """\ -def direct(): - print "direct exit" + def h3(self): + print "h3" -import sys -sys.exitfunc = direct + def h4(self, *args, **kwargs): + print "h4", args, kwargs -# Make sure atexit doesn't drop -def indirect(): - print "indirect exit" + def raise1(self): + raise TypeError -import atexit -atexit.register(indirect) -""" + def raise2(self): + raise SystemError -f = file(fname, "w") -f.write(input) -f.close() +def test_main(): + test_support.run_unittest(TestCase) -p = popen('"%s" %s' % (executable, fname)) -output = p.read() -p.close() -vereq(output, """\ -indirect exit -direct exit -""") -unlink(fname) +if __name__ == "__main__": + test_main() From montanaro at users.sourceforge.net Thu Nov 4 05:31:34 2004 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Thu Nov 4 05:31:39 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1181,1.1182 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29401/Misc Modified Files: NEWS Log Message: Fix bug 1052242. Also includes rewrite of test case using unittest and avoiding use of popen. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1181 retrieving revision 1.1182 diff -u -d -r1.1181 -r1.1182 --- NEWS 3 Nov 2004 06:21:36 -0000 1.1181 +++ NEWS 4 Nov 2004 04:31:30 -0000 1.1182 @@ -2,6 +2,17 @@ Python News +++++++++++ +What's New in Python 2.4 release candidate 1? +============================================= + +Library +------- + +- Bug 1052242: If exceptions are raised by an atexit handler function an + attempt is made to execute the remaining handlers. The last exception + raised is re-raised. + + (editors: check NEWS.help for information about editing NEWS using ReST.) What's New in Python 2.4 beta 2? From anthonybaxter at users.sourceforge.net Thu Nov 4 06:23:19 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Thu Nov 4 06:23:23 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1182,1.1183 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4558/Misc Modified Files: NEWS Log Message: post-release Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1182 retrieving revision 1.1183 diff -u -d -r1.1182 -r1.1183 --- NEWS 4 Nov 2004 04:31:30 -0000 1.1182 +++ NEWS 4 Nov 2004 05:23:15 -0000 1.1183 @@ -2,8 +2,22 @@ Python News +++++++++++ -What's New in Python 2.4 release candidate 1? -============================================= +(editors: check NEWS.help for information about editing NEWS using ReST.) + +What's New in Python 2.4 (release candidate 1|beta 3) +===================================================== + +*Release date: XX-XXX-2004* + +Core and builtins +----------------- + +... + +Extension Modules +----------------- + +... Library ------- @@ -12,8 +26,46 @@ attempt is made to execute the remaining handlers. The last exception raised is re-raised. +Build +----- + +... + +C API +----- + +... + +Documentation +------------- + +... + +Tests +----- + +... + +Windows +------- + +... + +Mac +--- + +... + +New platforms +------------- + +... + +Tools/Demos +----------- + +... -(editors: check NEWS.help for information about editing NEWS using ReST.) What's New in Python 2.4 beta 2? ================================ @@ -93,42 +145,6 @@ - Patch #1044395: --enable-shared is allowed in FreeBSD also. -C API ------ - -... - -Documentation -------------- - -... - -Tests ------ - -... - -Windows -------- - -... - -Mac ---- - -... - -New platforms -------------- - -... - -Tools/Demos ------------ - -... - - What's New in Python 2.4 beta 1? ================================ From anthonybaxter at users.sourceforge.net Thu Nov 4 06:23:20 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Thu Nov 4 06:23:23 2004 Subject: [Python-checkins] python/dist/src/Lib/idlelib NEWS.txt,1.43,1.44 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4558/Lib/idlelib Modified Files: NEWS.txt Log Message: post-release Index: NEWS.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- NEWS.txt 3 Nov 2004 06:21:35 -0000 1.43 +++ NEWS.txt 4 Nov 2004 05:23:17 -0000 1.44 @@ -1,3 +1,8 @@ +What's New in IDLE 1.1b3/rc1? +============================= + +*Release date: XX-XXX-2004* + What's New in IDLE 1.1b2? ========================= From fdrake at users.sourceforge.net Thu Nov 4 06:45:46 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 4 06:45:50 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libatexit.tex,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8224 Modified Files: libatexit.tex Log Message: markup nit Index: libatexit.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libatexit.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- libatexit.tex 4 Nov 2004 04:31:29 -0000 1.9 +++ libatexit.tex 4 Nov 2004 05:45:44 -0000 1.10 @@ -40,11 +40,10 @@ imported before higher level modules and thus must be cleaned up later. -If an exception is raised during execution of the exit handlers, a traceback -is printed (unless SystemExit is raised) and the exception information is -saved. After all exit handlers have had a chance to run the last exception -to be raised is reraised. - +If an exception is raised during execution of the exit handlers, a +traceback is printed (unless \exception{SystemExit} is raised) and the +exception information is saved. After all exit handlers have had a +chance to run the last exception to be raised is re-raised. \end{funcdesc} From arigo at users.sourceforge.net Thu Nov 4 12:29:11 2004 From: arigo at users.sourceforge.net (arigo@users.sourceforge.net) Date: Thu Nov 4 12:29:14 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libstdtypes.tex, 1.167, 1.168 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3077 Modified Files: libstdtypes.tex Log Message: Mistakes in the "sequence types" page: * explanation for example with lists of lists made confusing use of the word "contains" to mean "is built out of". * wrong formula for slices with step. Is it ok to use LaTeX formulas (which become images in the html document)? This version needs one because it's based on a fraction. Just writing "\code{(j-i)/k}" here would be ambiguous because it looks like a rounding-down-to-the-previous-integer division, which is not what we need here. Of course we could write "\code{float(j-i)/k}" but it just looks confusing. Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.167 retrieving revision 1.168 diff -u -d -r1.167 -r1.168 --- libstdtypes.tex 8 Oct 2004 01:52:15 -0000 1.167 +++ libstdtypes.tex 4 Nov 2004 11:29:09 -0000 1.168 @@ -501,10 +501,11 @@ [[3], [3], [3]] \end{verbatim} - What has happened is that \code{lists} is a list containing three - copies of the list \code{[[]]} (a one-element list containing an - empty list), but the contained list is shared by each copy. You can - create a list of different lists this way: + What has happened is that \code{[[]]} is a one-element list containing + an empty list, so all three elements of \code{[[]] * 3} are (pointers to) + this single empty list. Modifying any of the elements of \code{lists} + modifies this single list. You can create a list of different lists this + way: \begin{verbatim} >>> lists = [[] for i in range(3)] @@ -529,8 +530,10 @@ \item[(5)] The slice of \var{s} from \var{i} to \var{j} with step \var{k} is defined as the sequence of items with index - \code{\var{x} = \var{i} + \var{n}*\var{k}} such that \code{0} - \code{<=} \var{n} \code{<} \code{abs(i-j)}. If \var{i} or \var{j} + \code{\var{x} = \var{i} + \var{n}*\var{k}} such that + $0 \leq n < \frac{j-i}{k}$. In other words, the indices + are \code{i}, \code{i+k}, \code{i+2*k}, \code{i+3*k} and so on, stopping when + \var{j} is reached (but never including \var{j}). If \var{i} or \var{j} is greater than \code{len(\var{s})}, use \code{len(\var{s})}. If \var{i} or \var{j} are omitted then they become ``end'' values (which end depends on the sign of \var{k}). Note, \var{k} cannot From tim_one at users.sourceforge.net Thu Nov 4 22:27:50 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Thu Nov 4 22:27:54 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex,1.143,1.144 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15103/Doc/lib Modified Files: libos.tex Log Message: Point out some platform vagaries in stat() and utime(). Bugfix candidate (the vagaries aren't new ), but I don't intend to backport this. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.143 retrieving revision 1.144 diff -u -d -r1.143 -r1.144 --- libos.tex 11 Oct 2004 18:12:13 -0000 1.143 +++ libos.tex 4 Nov 2004 21:27:48 -0000 1.144 @@ -973,6 +973,14 @@ functions and constants that are useful for extracting information from a \ctype{stat} structure. (On Windows, some items are filled with dummy values.) + +\note{The exact meaning and resolution of the \member{st_atime}, + \member{st_mtime}, and \member{st_ctime} members depends on the + operating system and the file system. For example, on Windows systems + using the FAT or FAT32 file systems, \member{st_mtime} has 2-second + resolution, and \member{st_atime} has only 1-day resolution. See + your operating system documentation for details.} + Availability: Macintosh, \UNIX, Windows. \versionchanged @@ -1090,6 +1098,12 @@ times are set to the current time. Otherwise, \var{times} must be a 2-tuple of numbers, of the form \code{(\var{atime}, \var{mtime})} which is used to set the access and modified times, respectively. +Whether a directory can be given for \var{path} depends on whether the +operating system implements directories as files (for example, Windows +does not). Note that the exact times you set here may not be returned +by a subsequent \function{stat()} call, depending on the resolution +with which your operating system records access and modification times; +see \function{stat()}. \versionchanged[Added support for \code{None} for \var{times}]{2.0} Availability: Macintosh, \UNIX, Windows. \end{funcdesc} @@ -1839,11 +1853,11 @@ \begin{funcdesc}{urandom}{n} Return a string of \var{n} random bytes suitable for cryptographic use. -This function returns random bytes from an OS-specific -randomness source. The returned data should be unpredictable enough for -cryptographic applications, though its exact quality depends on the OS -implementation. On a UNIX-like system this will query /dev/urandom, and -on Windows it will use CryptGenRandom. If a randomness source is not +This function returns random bytes from an OS-specific +randomness source. The returned data should be unpredictable enough for +cryptographic applications, though its exact quality depends on the OS +implementation. On a UNIX-like system this will query /dev/urandom, and +on Windows it will use CryptGenRandom. If a randomness source is not found, \exception{NotImplementedError} will be raised. \versionadded{2.4} \end{funcdesc} From fdrake at users.sourceforge.net Fri Nov 5 05:05:09 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Nov 5 05:05:11 2004 Subject: [Python-checkins] python/dist/src/Doc/tools support.py,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8406/tools Modified Files: support.py Log Message: - make the default image type PNG, to match mkhowto - add a command-line option to control the image type Index: support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/support.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- support.py 30 Oct 2002 21:32:40 -0000 1.9 +++ support.py 5 Nov 2004 04:05:06 -0000 1.10 @@ -20,7 +20,9 @@ # content components "address=", "iconserver=", "favicon=", - "title=", "uplink=", "uptitle="] + "title=", "uplink=", "uptitle=", + "image-type=", + ] outputfile = "-" columns = 1 @@ -51,7 +53,7 @@ self.args = [] self.variables = {"address": "", "iconserver": "icons", - "imgtype": "gif", + "imgtype": "png", "title": "Global Module Index", } @@ -93,6 +95,8 @@ self.variables["iconserver"] = val.strip() or "." elif opt == "--favicon": self.favicon = val.strip() + elif opt == "--image-type": + self.variables["imgtype"] = val.strip() else: self.handle_option(opt, val) if self.uplink and self.uptitle: From fdrake at users.sourceforge.net Fri Nov 5 05:23:27 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Nov 5 05:23:30 2004 Subject: [Python-checkins] python/dist/src/Doc/html about.html, 1.9, 1.10 stdabout.dat, 1.7, 1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12399/html Modified Files: about.html stdabout.dat Log Message: add encouragement to contribute without learning LaTeX (closes SF bug #948517) Index: about.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/about.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- about.html 30 Jul 2003 02:55:27 -0000 1.9 +++ about.html 5 Nov 2004 04:23:25 -0000 1.10 @@ -60,6 +60,11 @@ this document, please report the bug at the Python Bug Tracker at SourceForge. + If you are able to provide suggested text, either to replace + existing incorrect or unclear material, or additional text to + supplement what's already available, we'd appreciate the + contribution. There's no need to worry about text markup; our + documentation team will gladly take care of that.

Questions regarding how to use the information in this Index: stdabout.dat =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/stdabout.dat,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- stdabout.dat 30 Jul 2003 02:55:27 -0000 1.7 +++ stdabout.dat 5 Nov 2004 04:23:25 -0000 1.8 @@ -34,6 +34,11 @@ report the bug at the Python Bug Tracker at SourceForge. + If you are able to provide suggested text, either to replace + existing incorrect or unclear material, or additional text to + supplement what's already available, we'd appreciate the + contribution. There's no need to worry about text markup; our + documentation team will gladly take care of that.

Questions regarding how to use the information in this From fdrake at users.sourceforge.net Fri Nov 5 05:23:27 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Nov 5 05:23:31 2004 Subject: [Python-checkins] python/dist/src/Doc/doc doc.tex,1.88,1.89 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12399/doc Modified Files: doc.tex Log Message: add encouragement to contribute without learning LaTeX (closes SF bug #948517) Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- doc.tex 18 Oct 2004 21:30:40 -0000 1.88 +++ doc.tex 5 Nov 2004 04:23:24 -0000 1.89 @@ -35,6 +35,10 @@ in the Python documentation. Authors may use this guide, in conjunction with the template files provided with the distribution, to create or maintain whole documents or sections. + +If you're interested in contributing to Python's documentation, +there's no need to learn \LaTeX{} if you're not so inclined; plain +text contributions are more than welcome as well. \end{abstract} \tableofcontents @@ -73,6 +77,16 @@ discussing future directions for the Python documentation and where to turn for more information. + If your interest is in contributing to the Python documentation, but + you don't have the time or inclination to learn \LaTeX{} and the + markup structures documented here, there's a welcoming place for you + among the Python contributors as well. Any time you feel that you + can clarify existing documentation or provide documentation that's + missing, the existing documentation team will gladly work with you + to integrate your text, dealing with the markup for you. Please + don't let the material in this document stand between the + documentation and your desire to help out! + \section{Directory Structure \label{directories}} The source distribution for the standard Python documentation From fdrake at users.sourceforge.net Fri Nov 5 05:24:26 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Nov 5 05:24:30 2004 Subject: [Python-checkins] python/dist/src/Doc/doc doc.tex, 1.75.8.5, 1.75.8.6 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12623/doc Modified Files: Tag: release23-maint doc.tex Log Message: add encouragement to contribute without learning LaTeX (closes SF bug #948517) Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.75.8.5 retrieving revision 1.75.8.6 diff -u -d -r1.75.8.5 -r1.75.8.6 --- doc.tex 10 May 2004 18:39:01 -0000 1.75.8.5 +++ doc.tex 5 Nov 2004 04:24:23 -0000 1.75.8.6 @@ -35,6 +35,10 @@ in the Python documentation. Authors may use this guide, in conjunction with the template files provided with the distribution, to create or maintain whole documents or sections. + +If you're interested in contributing to Python's documentation, +there's no need to learn \LaTeX{} if you're not so inclined; plain +text contributions are more than welcome as well. \end{abstract} \tableofcontents @@ -73,6 +77,16 @@ discussing future directions for the Python documentation and where to turn for more information. + If your interest is in contributing to the Python documentation, but + you don't have the time or inclination to learn \LaTeX{} and the + markup structures documented here, there's a welcoming place for you + among the Python contributors as well. Any time you feel that you + can clarify existing documentation or provide documentation that's + missing, the existing documentation team will gladly work with you + to integrate your text, dealing with the markup for you. Please + don't let the material in this document stand between the + documentation and your desire to help out! + \section{Directory Structure \label{directories}} The source distribution for the standard Python documentation From fdrake at users.sourceforge.net Fri Nov 5 05:24:27 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Nov 5 05:24:31 2004 Subject: [Python-checkins] python/dist/src/Doc/html about.html, 1.8.16.1, 1.8.16.2 stdabout.dat, 1.6.10.1, 1.6.10.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12623/html Modified Files: Tag: release23-maint about.html stdabout.dat Log Message: add encouragement to contribute without learning LaTeX (closes SF bug #948517) Index: about.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/about.html,v retrieving revision 1.8.16.1 retrieving revision 1.8.16.2 diff -u -d -r1.8.16.1 -r1.8.16.2 --- about.html 4 Aug 2003 22:49:41 -0000 1.8.16.1 +++ about.html 5 Nov 2004 04:24:23 -0000 1.8.16.2 @@ -60,6 +60,11 @@ this document, please report the bug at the Python Bug Tracker at SourceForge. + If you are able to provide suggested text, either to replace + existing incorrect or unclear material, or additional text to + supplement what's already available, we'd appreciate the + contribution. There's no need to worry about text markup; our + documentation team will gladly take care of that.

Questions regarding how to use the information in this Index: stdabout.dat =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/stdabout.dat,v retrieving revision 1.6.10.1 retrieving revision 1.6.10.2 diff -u -d -r1.6.10.1 -r1.6.10.2 --- stdabout.dat 4 Aug 2003 22:49:41 -0000 1.6.10.1 +++ stdabout.dat 5 Nov 2004 04:24:24 -0000 1.6.10.2 @@ -34,6 +34,11 @@ report the bug at the Python Bug Tracker at SourceForge. + If you are able to provide suggested text, either to replace + existing incorrect or unclear material, or additional text to + supplement what's already available, we'd appreciate the + contribution. There's no need to worry about text markup; our + documentation team will gladly take care of that.

Questions regarding how to use the information in this From fdrake at users.sourceforge.net Fri Nov 5 05:42:01 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Nov 5 05:42:04 2004 Subject: [Python-checkins] python/dist/src/Doc/html/icons pyfav.png, NONE, 1.1.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html/icons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15758/html/icons Added Files: Tag: release23-maint pyfav.png Log Message: add a PNG version of pyfav.gif --- NEW FILE: pyfav.png --- (This appears to be a binary file; contents omitted.) From fdrake at users.sourceforge.net Fri Nov 5 05:51:07 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Nov 5 05:51:10 2004 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.278,1.279 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17211 Modified Files: Makefile Log Message: switch remaining icon references to the PNG icons Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.278 retrieving revision 1.279 diff -u -d -r1.278 -r1.279 --- Makefile 17 Sep 2004 20:23:47 -0000 1.278 +++ Makefile 5 Nov 2004 04:51:05 -0000 1.279 @@ -100,7 +100,7 @@ MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi MKHTML= $(MKHOWTO) --html --about html/stdabout.dat \ - --iconserver ../icons --favicon ../icons/pyfav.gif \ + --iconserver ../icons --favicon ../icons/pyfav.png \ --address $(PYTHONDOCS) --up-link ../index.html \ --up-title "Python Documentation Index" \ --global-module-index "../modindex.html" --dvips-safe @@ -345,7 +345,7 @@ html/acks.html: ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml $(PYTHON) $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) \ - --favicon icons/pyfav.gif \ + --favicon icons/pyfav.png \ --output html/acks.html Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17211/html Modified Files: about.html index.html.in Log Message: switch remaining icon references to the PNG icons Index: about.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/about.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- about.html 5 Nov 2004 04:23:25 -0000 1.10 +++ about.html 5 Nov 2004 04:51:05 -0000 1.11 @@ -9,7 +9,7 @@ - + @@ -17,20 +17,20 @@ + src="icons/blank.png"> + src="icons/up.png"> + src="icons/blank.png"> + src="icons/blank.png"> + src="icons/blank.png"> + src="icons/blank.png">
up About the Python Documentation
Up: Index: index.html.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/index.html.in,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- index.html.in 30 Oct 2002 21:14:29 -0000 1.18 +++ index.html.in 5 Nov 2004 04:51:05 -0000 1.19 @@ -5,7 +5,7 @@ - + @@ -23,20 +23,20 @@ + src="icons/blank.png"> + src="icons/blank.png"> + src="icons/blank.png"> + src="icons/blank.png"> + src="icons/modules.png"> + src="icons/blank.png">
Python Documentation Module Index


From fdrake at users.sourceforge.net Fri Nov 5 06:06:12 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Nov 5 06:06:15 2004 Subject: [Python-checkins] python/dist/src/Doc/perl l2hinit.perl,1.84,1.85 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19687 Modified Files: l2hinit.perl Log Message: generate the "type" attribute on the favicon link Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- l2hinit.perl 29 Oct 2004 19:47:52 -0000 1.84 +++ l2hinit.perl 5 Nov 2004 05:06:08 -0000 1.85 @@ -661,6 +661,18 @@ . ($ISO_LANGUAGE ? $ISO_LANGUAGE : $isolanguage) . "\">\n"; } if ($MY_PARTIAL_HEADER eq '') { + my $favicon = ''; + if ($FAVORITES_ICON) { + my($myname, $mydir, $myext) = fileparse($FAVORITES_ICON, '\..*'); + my $favtype = ''; + if ($myext eq '.gif' || $myext eq '.png') { + $myext =~ s/^[.]//; + $favtype = " type=\"image/$myext\""; + } + $favicon = ( + "\n"); + } $STYLESHEET = $FILE.".css" unless $STYLESHEET; $MY_PARTIAL_HEADER = join('', ($DOCTYPE ? $DTDcomment : ''), @@ -668,9 +680,7 @@ ($BASE ? "\n" : ''), "\n", - ($FAVORITES_ICON - ? ("\n") - : ''), + $favicon, ($EXTERNAL_UP_LINK ? ("\n\n\\tableofchildlinks[off]", $closures + join('', "\\tableofchildlinks[off]", $closures , make_section_heading($toc_title, 'h2'), $toc_mark , $reopens, $_); } @@ -725,23 +725,16 @@ $charset = $CHARSET; $charset =~ s/_/\-/go; } - # Remove section number from the title for use in the - # element in the document head. - my $metatitle = "$title"; - $metatitle =~ s/^\d+(\.\d+)*\s*//; - $metatitle = meta_information($metatitle); - $metatitle =~ s/ NAME=/ name=/g; - $metatitle =~ s/ CONTENT=/ content=/g; - join('', $MY_PARTIAL_HEADER, - $metatitle, "", $title, "\n\n"); } sub replace_morelinks { $more_links =~ s/ REL=/ rel=/g; $more_links =~ s/ HREF=/ href=/g; + $more_links =~ s//" \/>/g; $_ =~ s/$more_links_mark/$more_links/e; } From rhettinger at users.sourceforge.net Fri Nov 5 08:03:00 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Nov 5 08:03:04 2004 Subject: [Python-checkins] python/dist/src/Include pymactoolbox.h,1.11,1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8060/Include Modified Files: pymactoolbox.h Log Message: SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core (Contributed by Bob Ippolito.) This patch trims down the Python core on Darwin by making it independent of CoreFoundation and CoreServices. It does this by: Changed linker flags in configure/configure.in Removed the unused PyMac_GetAppletScriptFile Moved the implementation of PyMac_StrError to the MacOS module Moved the implementation of PyMac_GetFullPathname to the Carbon.File module Index: pymactoolbox.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pymactoolbox.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- pymactoolbox.h 15 Jul 2004 13:31:39 -0000 1.11 +++ pymactoolbox.h 5 Nov 2004 07:02:57 -0000 1.12 @@ -13,15 +13,13 @@ /* ** Helper routines for error codes and such. */ -char *PyMac_StrError(int); /* strerror with mac errors */ +char *PyMac_StrError(int); /* strerror with mac errors */ extern PyObject *PyMac_OSErrException; /* Exception for OSErr */ PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */ PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */ -PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */ -extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert fsspec->path */ -#ifdef WITH_NEXT_FRAMEWORK -extern char *PyMac_GetAppletScriptFile(void); /* Return applet script file or NULL */ -#endif +PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */ +extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert + fsspec->path */ /* ** These conversion routines are defined in mactoolboxglue.c itself. */ @@ -32,21 +30,24 @@ int PyMac_GetStr255(PyObject *, Str255); /* argument parser for Str255 */ PyObject *PyMac_BuildStr255(Str255); /* Convert Str255 to PyObject */ -PyObject *PyMac_BuildOptStr255(Str255); /* Convert Str255 to PyObject, NULL to None */ +PyObject *PyMac_BuildOptStr255(Str255); /* Convert Str255 to PyObject, + NULL to None */ int PyMac_GetRect(PyObject *, Rect *); /* argument parser for Rect */ -PyObject *PyMac_BuildRect(Rect *); /* Convert Rect to PyObject */ +PyObject *PyMac_BuildRect(Rect *); /* Convert Rect to PyObject */ int PyMac_GetPoint(PyObject *, Point *); /* argument parser for Point */ -PyObject *PyMac_BuildPoint(Point); /* Convert Point to PyObject */ +PyObject *PyMac_BuildPoint(Point); /* Convert Point to PyObject */ -int PyMac_GetEventRecord(PyObject *, EventRecord *); /* argument parser for EventRecord */ -PyObject *PyMac_BuildEventRecord(EventRecord *); /* Convert EventRecord to PyObject */ +int PyMac_GetEventRecord(PyObject *, EventRecord *); /* argument parser for + EventRecord */ +PyObject *PyMac_BuildEventRecord(EventRecord *); /* Convert EventRecord to + PyObject */ int PyMac_GetFixed(PyObject *, Fixed *); /* argument parser for Fixed */ -PyObject *PyMac_BuildFixed(Fixed); /* Convert Fixed to PyObject */ +PyObject *PyMac_BuildFixed(Fixed); /* Convert Fixed to PyObject */ int PyMac_Getwide(PyObject *, wide *); /* argument parser for wide */ -PyObject *PyMac_Buildwide(wide *); /* Convert wide to PyObject */ +PyObject *PyMac_Buildwide(wide *); /* Convert wide to PyObject */ /* ** The rest of the routines are implemented by extension modules. If they are From rhettinger at users.sourceforge.net Fri Nov 5 08:03:01 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Nov 5 08:03:05 2004 Subject: [Python-checkins] python/dist/src/Mac/Modules macosmodule.c, 1.71, 1.72 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8060/Mac/Modules Modified Files: macosmodule.c Log Message: SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core (Contributed by Bob Ippolito.) This patch trims down the Python core on Darwin by making it independent of CoreFoundation and CoreServices. It does this by: Changed linker flags in configure/configure.in Removed the unused PyMac_GetAppletScriptFile Moved the implementation of PyMac_StrError to the MacOS module Moved the implementation of PyMac_GetFullPathname to the Carbon.File module Index: macosmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/macosmodule.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- macosmodule.c 2 Jun 2004 13:44:05 -0000 1.71 +++ macosmodule.c 5 Nov 2004 07:02:58 -0000 1.72 @@ -338,11 +338,64 @@ static PyObject * MacOS_GetErrorString(PyObject *self, PyObject *args) { - int errn; + int err; + char buf[256]; + Handle h; + char *str; + static int errors_loaded; - if (!PyArg_ParseTuple(args, "i", &errn)) + if (!PyArg_ParseTuple(args, "i", &err)) return NULL; - return Py_BuildValue("s", PyMac_StrError(errn)); + + h = GetResource('Estr', err); + if (!h && !errors_loaded) { + /* + ** Attempt to open the resource file containing the + ** Estr resources. We ignore all errors. We also try + ** this only once. + */ + PyObject *m, *rv; + errors_loaded = 1; + + m = PyImport_ImportModule("macresource"); + if (!m) { + if (Py_VerboseFlag) + PyErr_Print(); + PyErr_Clear(); + } + else { + rv = PyObject_CallMethod(m, "open_error_resource", ""); + if (!rv) { + if (Py_VerboseFlag) + PyErr_Print(); + PyErr_Clear(); + } + else { + Py_DECREF(rv); + /* And try again... */ + h = GetResource('Estr', err); + } + } + } + /* + ** Whether the code above succeeded or not, we won't try + ** again. + */ + errors_loaded = 1; + + if (h) { + HLock(h); + str = (char *)*h; + memcpy(buf, str+1, (unsigned char)str[0]); + buf[(unsigned char)str[0]] = '\0'; + HUnlock(h); + ReleaseResource(h); + } + else { + PyOS_snprintf(buf, sizeof(buf), "Mac OS error code %d", err); + } + + return Py_BuildValue("s", buf); } static char splash_doc[] = "Open a splash-screen dialog by resource-id (0=close)"; From rhettinger at users.sourceforge.net Fri Nov 5 08:03:00 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Nov 5 08:03:05 2004 Subject: [Python-checkins] python/dist/src configure.in,1.473,1.474 Message-ID: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8060 Modified Files: configure.in Log Message: SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core (Contributed by Bob Ippolito.) This patch trims down the Python core on Darwin by making it independent of CoreFoundation and CoreServices. It does this by: Changed linker flags in configure/configure.in Removed the unused PyMac_GetAppletScriptFile Moved the implementation of PyMac_StrError to the MacOS module Moved the implementation of PyMac_GetFullPathname to the Carbon.File module Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.473 retrieving revision 1.474 diff -u -d -r1.473 -r1.474 --- configure.in 26 Oct 2004 09:53:40 -0000 1.473 +++ configure.in 5 Nov 2004 07:02:41 -0000 1.474 @@ -1193,14 +1193,12 @@ fi case "$enable_toolbox_glue" in yes) - extra_frameworks="-framework CoreServices -framework Foundation" extra_machdep_objs="Python/mactoolboxglue.o" - extra_undefs="-u __dummy -u _PyMac_Error" + extra_undefs="-u _PyMac_Error" AC_DEFINE(USE_TOOLBOX_OBJECT_GLUE, 1, [Define if you want to use MacPython modules on MacOSX in unix-Python.]) ;; *) - extra_frameworks="" extra_machdep_objs="" extra_undefs="" ;; @@ -1211,12 +1209,11 @@ case $ac_sys_system/$ac_sys_release in Darwin/1.3*) LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc" - LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; Darwin/*) LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc" - LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" + LIBTOOL_CRUFT="$LIBTOOL_CRUFT" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac @@ -1418,22 +1415,20 @@ Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys Darwin/*) - # -u __dummy makes the linker aware of the objc runtime - # in System.framework; otherwise, __objcInit (referenced in - # crt1.o) gets erroneously defined as common, which breaks dynamic - # loading of any modules which reference it in System.framework. - # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is + # -u _PyMac_Error is needed to pull in the mac toolbox glue, + # which is # not used by the core itself but which needs to be in the core so # that dynamically loaded extension modules have access to it. # -prebind is no longer used, because it actually seems to give a # slowdown in stead of a speedup, maybe due to the large number of # dynamic loads Python does. - LINKFORSHARED="$extra_undefs -framework System" + + LINKFORSHARED="$extra_undefs" if test "$enable_framework" then LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework "'$(PYTHONFRAMEWORK)' fi - LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; + LINKFORSHARED="$LINKFORSHARED";; OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; SCO_SV*) LINKFORSHARED="-Wl,-Bexport";; ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; From rhettinger at users.sourceforge.net Fri Nov 5 08:03:01 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Nov 5 08:03:06 2004 Subject: [Python-checkins] python/dist/src/Mac/Modules/file _Filemodule.c, 1.22, 1.23 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/file In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8060/Mac/Modules/file Modified Files: _Filemodule.c Log Message: SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core (Contributed by Bob Ippolito.) This patch trims down the Python core on Darwin by making it independent of CoreFoundation and CoreServices. It does this by: Changed linker flags in configure/configure.in Removed the unused PyMac_GetAppletScriptFile Moved the implementation of PyMac_StrError to the MacOS module Moved the implementation of PyMac_GetFullPathname to the Carbon.File module Index: _Filemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/file/_Filemodule.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- _Filemodule.c 20 Nov 2003 13:30:57 -0000 1.22 +++ _Filemodule.c 5 Nov 2004 07:02:58 -0000 1.23 @@ -1253,6 +1253,49 @@ return _res; } +static OSErr +_PyMac_GetFullPathname(FSSpec *fss, char *path, int len) +{ + FSRef fsr; + OSErr err; + + *path = '\0'; + err = FSpMakeFSRef(fss, &fsr); + if (err == fnfErr) { + /* FSSpecs can point to non-existing files, fsrefs can't. */ + FSSpec fss2; + int tocopy; + + err = FSMakeFSSpec(fss->vRefNum, fss->parID, "", &fss2); + if (err) + return err; + err = FSpMakeFSRef(&fss2, &fsr); + if (err) + return err; + err = (OSErr)FSRefMakePath(&fsr, path, len-1); + if (err) + return err; + /* This part is not 100% safe: we append the filename part, but + ** I'm not sure that we don't run afoul of the various 8bit + ** encodings here. Will have to look this up at some point... + */ + strcat(path, "/"); + tocopy = fss->name[0]; + if ((strlen(path) + tocopy) >= len) + tocopy = len - strlen(path) - 1; + if (tocopy > 0) + strncat(path, fss->name+1, tocopy); + } + else { + if (err) + return err; + err = (OSErr)FSRefMakePath(&fsr, path, len); + if (err) + return err; + } + return 0; +} + static PyObject *FSSpec_as_pathname(FSSpecObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1262,7 +1305,7 @@ if (!PyArg_ParseTuple(_args, "")) return NULL; - err = PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf)); + err = _PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf)); if ( err ) { PyMac_Error(err); return NULL; From rhettinger at users.sourceforge.net Fri Nov 5 08:03:02 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Nov 5 08:03:07 2004 Subject: [Python-checkins] python/dist/src/Python mactoolboxglue.c, 1.23, 1.24 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8060/Python Modified Files: mactoolboxglue.c Log Message: SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in core (Contributed by Bob Ippolito.) This patch trims down the Python core on Darwin by making it independent of CoreFoundation and CoreServices. It does this by: Changed linker flags in configure/configure.in Removed the unused PyMac_GetAppletScriptFile Moved the implementation of PyMac_StrError to the MacOS module Moved the implementation of PyMac_GetFullPathname to the Carbon.File module Index: mactoolboxglue.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mactoolboxglue.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- mactoolboxglue.c 15 Jul 2004 13:31:39 -0000 1.23 +++ mactoolboxglue.c 5 Nov 2004 07:02:59 -0000 1.24 @@ -28,57 +28,39 @@ /* Like strerror() but for Mac OS error numbers */ -char *PyMac_StrError(int err) +char * +PyMac_StrError(int err) { static char buf[256]; - Handle h; - char *str; - static int errors_loaded; - - h = GetResource('Estr', err); - if (!h && !errors_loaded) { - /* - ** Attempt to open the resource file containing the - ** Estr resources. We ignore all errors. We also try - ** this only once. - */ - PyObject *m, *rv; - errors_loaded = 1; - - m = PyImport_ImportModule("macresource"); - if (!m) { - if (Py_VerboseFlag) - PyErr_Print(); + PyObject *m; + PyObject *rv; + + m = PyImport_ImportModule("MacOS"); + if (!m) { + if (Py_VerboseFlag) + PyErr_Print(); + PyErr_Clear(); + rv = NULL; + } + else { + rv = PyObject_CallMethod(m, "GetErrorString", "i", err); + if (!rv) PyErr_Clear(); + } + if (!rv) { + buf[0] = '\0'; + } + else { + char *input = PyString_AsString(rv); + if (!input) { + PyErr_Clear(); + buf[0] = '\0'; } else { - rv = PyObject_CallMethod(m, "open_error_resource", ""); - if (!rv) { - if (Py_VerboseFlag) - PyErr_Print(); - PyErr_Clear(); - } else { - Py_DECREF(rv); - /* And try again... */ - h = GetResource('Estr', err); - } + strncpy(buf, input, sizeof(buf) - 1); + buf[sizeof(buf) - 1] = '\0'; } } - /* - ** Whether the code above succeeded or not, we won't try - ** again. - */ - errors_loaded = 1; - - if ( h ) { - HLock(h); - str = (char *)*h; - memcpy(buf, str+1, (unsigned char)str[0]); - buf[(unsigned char)str[0]] = '\0'; - HUnlock(h); - ReleaseResource(h); - } else { - PyOS_snprintf(buf, sizeof(buf), "Mac OS error code %d", err); - } + return buf; } @@ -125,124 +107,51 @@ OSErr PyMac_GetFullPathname(FSSpec *fss, char *path, int len) { - FSRef fsr; - OSErr err; - - *path = '\0'; - err = FSpMakeFSRef(fss, &fsr); - if ( err == fnfErr ) { - /* FSSpecs can point to non-existing files, fsrefs can't. */ - FSSpec fss2; - int tocopy; - - err = FSMakeFSSpec(fss->vRefNum, fss->parID, "", &fss2); - if ( err ) return err; - err = FSpMakeFSRef(&fss2, &fsr); - if ( err ) return err; - err = (OSErr)FSRefMakePath(&fsr, path, len-1); - if ( err ) return err; - /* This part is not 100% safe: we append the filename part, but - ** I'm not sure that we don't run afoul of the various 8bit - ** encodings here. Will have to look this up at some point... - */ - strcat(path, "/"); - tocopy = fss->name[0]; - if ( strlen(path) + tocopy >= len ) - tocopy = len - strlen(path) - 1; - if ( tocopy > 0 ) - strncat(path, fss->name+1, tocopy); - } else { - if ( err ) return err; - err = (OSErr)FSRefMakePath(&fsr, path, len); - if ( err ) return err; - } - return 0; -} - - -#ifdef WITH_NEXT_FRAMEWORK -/* -** In a bundle, find a file "resourceName" of type "resourceType". Return the -** full pathname in "resourceURLCstr". -*/ -static int -locateResourcePy(CFStringRef resourceType, CFStringRef resourceName, char *resourceURLCStr, int length) -{ - CFBundleRef mainBundle = NULL; - CFURLRef URL, absoluteURL; - CFStringRef filenameString, filepathString; - CFIndex size, i; - CFArrayRef arrayRef = NULL; - int success = 0; - - CFURLPathStyle thePathStyle = kCFURLPOSIXPathStyle; - - /* Get a reference to our main bundle */ - mainBundle = CFBundleGetMainBundle(); + PyObject *fs, *exc; + PyObject *rv = NULL; + char *input; + OSErr err = noErr; - /* If we are running inside a bundle, look through it. Otherwise, do nothing. */ - if (mainBundle) { + *path = '\0'; - /* Look for py files in the main bundle by type */ - arrayRef = CFBundleCopyResourceURLsOfType( mainBundle, - resourceType, - NULL ); + fs = PyMac_BuildFSSpec(fss); + if (!fs) + goto error; - /* See if there are any filename matches */ - size = CFArrayGetCount(arrayRef); - for (i = 0; i < size; i++) { - URL = CFArrayGetValueAtIndex(arrayRef, i); - filenameString = CFURLCopyLastPathComponent(URL); - if (CFStringCompare(filenameString, resourceName, 0) == kCFCompareEqualTo) { - /* We found a match, get the file's full path */ - absoluteURL = CFURLCopyAbsoluteURL(URL); - filepathString = CFURLCopyFileSystemPath(absoluteURL, thePathStyle); - CFRelease(absoluteURL); + rv = PyObject_CallMethod(fs, "as_pathname", ""); + if (!rv) + goto error; - /* Copy the full path into the caller's character buffer */ - success = CFStringGetCString(filepathString, resourceURLCStr, length, - kCFStringEncodingMacRoman); + input = PyString_AsString(rv); + if (!input) + goto error; - CFRelease(filepathString); - } - CFRelease(filenameString); - } - CFRelease(arrayRef); - } - return success; -} + strncpy(path, input, len - 1); + path[len - 1] = '\0'; -/* -** iff we are running in a .app framework then we could be -** the main program for an applet. In that case, return the -** script filename for the applet. -** Otherwise return NULL. -*/ -char * -PyMac_GetAppletScriptFile(void) -{ - static char scriptpath[1024]; + Py_XDECREF(rv); + Py_XDECREF(fs); + return err; - /* First we see whether we have __rawmain__.py and run that if it - ** is there. This is used for applets that want sys.argv to be - ** unix-like: __rawmain__ will construct it (from the initial appleevent) - ** and then call __main__.py. - */ - if (locateResourcePy(CFSTR("py"), CFSTR("__rawmain__.py"), scriptpath, 1024)) { - return scriptpath; - } else if (locateResourcePy(CFSTR("pyc"), CFSTR("__rawmain__.pyc"), scriptpath, 1024)) { - return scriptpath; - } else if (locateResourcePy(CFSTR("py"), CFSTR("__main__.py"), scriptpath, 1024)) { - return scriptpath; - } else if (locateResourcePy(CFSTR("pyc"), CFSTR("__main__.pyc"), scriptpath, 1024)) { - return scriptpath; + error: + exc = PyErr_Occurred(); + if (exc && PyErr_GivenExceptionMatches(exc, + PyMac_GetOSErrException())) { + PyObject *args = PyObject_GetAttrString(exc, "args"); + if (args) { + char *ignore; + PyArg_ParseTuple(args, "is", &err, &ignore); + Py_XDECREF(args); + } } - return NULL; + if (err == noErr) + err = -1; + PyErr_Clear(); + Py_XDECREF(rv); + Py_XDECREF(fs); + return err; } -#endif - - /* Convert a 4-char string object argument to an OSType value */ int PyMac_GetOSType(PyObject *v, OSType *pr) From rhettinger at users.sourceforge.net Fri Nov 5 17:38:11 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Nov 5 17:38:14 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libdifflib.tex,1.21,1.22 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32522 Modified Files: libdifflib.tex Log Message: SF bug #1060825: Error in difflib docs Index: libdifflib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdifflib.tex,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- libdifflib.tex 14 Oct 2004 03:09:48 -0000 1.21 +++ libdifflib.tex 5 Nov 2004 16:38:08 -0000 1.22 @@ -320,7 +320,7 @@ Optional argument \var{isjunk} must be \code{None} (the default) or a one-argument function that takes a sequence element and returns true if and only if the element is ``junk'' and should be ignored. - Passing \code{None} for \var{b} is equivalent to passing + Passing \code{None} for \var{isjunk} is equivalent to passing \code{lambda x: 0}; in other words, no elements are ignored. For example, pass: From bwarsaw at users.sourceforge.net Sat Nov 6 01:04:24 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Sat Nov 6 01:04:30 2004 Subject: [Python-checkins] python/dist/src/Lib/email/test test_email.py, 1.64, 1.65 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8911 Modified Files: test_email.py Log Message: test_boundary_with_leading_space(): Test case for SF bug #1060941. RFC 2046 says boundaries may begin -- but not end -- with whitespace. I will backport to Python 2.3. Index: test_email.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- test_email.py 11 Oct 2004 13:53:08 -0000 1.64 +++ test_email.py 6 Nov 2004 00:04:20 -0000 1.65 @@ -1332,6 +1332,25 @@ ----961284236552522269-- ''') + def test_boundary_with_leading_space(self): + eq = self.assertEqual + msg = email.message_from_string('''\ +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary=" XXXX" + +-- XXXX +Content-Type: text/plain + + +-- XXXX +Content-Type: text/plain + +-- XXXX-- +''') + self.failUnless(msg.is_multipart()) + eq(msg.get_boundary(), ' XXXX') + eq(len(msg.get_payload()), 2) + # Test some badly formatted messages From bwarsaw at users.sourceforge.net Sat Nov 6 01:04:55 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Sat Nov 6 01:04:58 2004 Subject: [Python-checkins] python/dist/src/Lib/email Message.py,1.39,1.40 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9058 Modified Files: Message.py Log Message: get_boundary(): Fix for SF bug #1060941. RFC 2046 says boundaries may begin -- but not end -- with whitespace. I will backport to Python 2.3. Index: Message.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/Message.py,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- Message.py 3 Oct 2004 03:38:07 -0000 1.39 +++ Message.py 6 Nov 2004 00:04:52 -0000 1.40 @@ -719,7 +719,8 @@ boundary = self.get_param('boundary', missing) if boundary is missing: return failobj - return Utils.collapse_rfc2231_value(boundary).strip() + # RFC 2046 says that boundaries may begin but not end in w/s + return Utils.collapse_rfc2231_value(boundary).rstrip() def set_boundary(self, boundary): """Set the boundary parameter in Content-Type to 'boundary'. From bwarsaw at users.sourceforge.net Sat Nov 6 01:13:48 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Sat Nov 6 01:13:51 2004 Subject: [Python-checkins] python/dist/src/Lib/email/test test_email.py, 1.50.10.5, 1.50.10.6 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11344 Modified Files: Tag: release23-maint test_email.py Log Message: test_boundary_with_leading_space(): Test case for SF bug #1060941. RFC 2046 says boundaries may begin -- but not end -- with whitespace. Index: test_email.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v retrieving revision 1.50.10.5 retrieving revision 1.50.10.6 diff -u -d -r1.50.10.5 -r1.50.10.6 --- test_email.py 16 Aug 2004 15:31:43 -0000 1.50.10.5 +++ test_email.py 6 Nov 2004 00:13:46 -0000 1.50.10.6 @@ -1203,6 +1203,25 @@ ----961284236552522269-- ''') + def test_boundary_with_leading_space(self): + eq = self.assertEqual + msg = email.message_from_string('''\ +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary=" XXXX" + +-- XXXX +Content-Type: text/plain + + +-- XXXX +Content-Type: text/plain + +-- XXXX-- +''') + self.failUnless(msg.is_multipart()) + eq(msg.get_boundary(), ' XXXX') + eq(len(msg.get_payload()), 2) + # Test some badly formatted messages From bwarsaw at users.sourceforge.net Sat Nov 6 01:14:07 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Sat Nov 6 01:14:10 2004 Subject: [Python-checkins] python/dist/src/Lib/email Message.py, 1.32.10.5, 1.32.10.6 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11450 Modified Files: Tag: release23-maint Message.py Log Message: get_boundary(): Fix for SF bug #1060941. RFC 2046 says boundaries may begin -- but not end -- with whitespace. Index: Message.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/Message.py,v retrieving revision 1.32.10.5 retrieving revision 1.32.10.6 diff -u -d -r1.32.10.5 -r1.32.10.6 --- Message.py 28 Sep 2004 04:55:34 -0000 1.32.10.5 +++ Message.py 6 Nov 2004 00:14:05 -0000 1.32.10.6 @@ -747,7 +747,8 @@ # RFC 2231 encoded, so decode. It better end up as ascii charset = boundary[0] or 'us-ascii' return unicode(boundary[2], charset).encode('us-ascii') - return _unquotevalue(boundary.strip()) + # RFC 2046 says that boundaries may begin but not end in w/s + return _unquotevalue(boundary.rstrip()) def set_boundary(self, boundary): """Set the boundary parameter in Content-Type to 'boundary'. From rhettinger at users.sourceforge.net Sat Nov 6 01:32:09 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Nov 6 01:32:12 2004 Subject: [Python-checkins] python/dist/src/Lib zipfile.py,1.33,1.34 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15702 Modified Files: zipfile.py Log Message: Don't choke on modes like rb or wb. Index: zipfile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/zipfile.py,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- zipfile.py 10 Jul 2004 19:09:20 -0000 1.33 +++ zipfile.py 6 Nov 2004 00:31:51 -0000 1.34 @@ -193,7 +193,7 @@ self.NameToInfo = {} # Find file info given name self.filelist = [] # List of ZipInfo instances for archive self.compression = compression # Method of compression - self.mode = key = mode[0] + self.mode = key = mode[0].replace('b', '') # Check if we were passed a file-like object if isinstance(file, basestring): From anthonybaxter at users.sourceforge.net Sat Nov 6 05:45:40 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Sat Nov 6 05:45:43 2004 Subject: [Python-checkins] python/dist/src configure,1.460,1.461 Message-ID: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28622 Modified Files: configure Log Message: regenerated configure from configure.in Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.460 retrieving revision 1.461 diff -u -d -r1.460 -r1.461 --- configure 26 Oct 2004 09:53:40 -0000 1.460 +++ configure 6 Nov 2004 04:45:33 -0000 1.461 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.472 . +# From configure.in Revision: 1.474 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for python 2.4. # @@ -10164,9 +10164,8 @@ fi case "$enable_toolbox_glue" in yes) - extra_frameworks="-framework CoreServices -framework Foundation" extra_machdep_objs="Python/mactoolboxglue.o" - extra_undefs="-u __dummy -u _PyMac_Error" + extra_undefs="-u _PyMac_Error" cat >>confdefs.h <<\_ACEOF #define USE_TOOLBOX_OBJECT_GLUE 1 @@ -10174,7 +10173,6 @@ ;; *) - extra_frameworks="" extra_machdep_objs="" extra_undefs="" ;; @@ -10186,12 +10184,11 @@ case $ac_sys_system/$ac_sys_release in Darwin/1.3*) LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc" - LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; Darwin/*) LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc" - LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" + LIBTOOL_CRUFT="$LIBTOOL_CRUFT" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac @@ -10409,22 +10406,20 @@ Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys Darwin/*) - # -u __dummy makes the linker aware of the objc runtime - # in System.framework; otherwise, __objcInit (referenced in - # crt1.o) gets erroneously defined as common, which breaks dynamic - # loading of any modules which reference it in System.framework. - # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is + # -u _PyMac_Error is needed to pull in the mac toolbox glue, + # which is # not used by the core itself but which needs to be in the core so # that dynamically loaded extension modules have access to it. # -prebind is no longer used, because it actually seems to give a # slowdown in stead of a speedup, maybe due to the large number of # dynamic loads Python does. - LINKFORSHARED="$extra_undefs -framework System" + + LINKFORSHARED="$extra_undefs" if test "$enable_framework" then LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework "'$(PYTHONFRAMEWORK)' fi - LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; + LINKFORSHARED="$LINKFORSHARED";; OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; SCO_SV*) LINKFORSHARED="-Wl,-Bexport";; ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; From bcannon at users.sourceforge.net Sat Nov 6 20:56:48 2004 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Sat Nov 6 20:56:51 2004 Subject: [Python-checkins] python/dist/src/Misc vimrc,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31285/Misc Modified Files: vimrc Log Message: Comment cleanup. Index: vimrc =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/vimrc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vimrc 25 Sep 2004 01:39:56 -0000 1.3 +++ vimrc 6 Nov 2004 19:56:45 -0000 1.4 @@ -1,10 +1,11 @@ -" vimrc file for following the coding style specified in PEP 7 & 8. +" vimrc file for following the coding standards specified in PEP 7 & 8. " " To use this file, source it in your own personal .vimrc file (``source " ``) or, if you don't have a .vimrc file, you can just symlink to it -" (``ln -s ~/.vimrc``). All options are protected by 'autocmd's -" (read below for an explanation) so blind sourcing of this file is safe and -" will not affect your settings for non-Python or non-C files. +" (``ln -s ~/.vimrc``). All options are protected by autocmds +" (read below for an explanation of the command) so blind sourcing of this file +" is safe and will not affect your settings for non-Python or non-C files. +" " " All setting are protected by 'au' ('autocmd') statements. Only files ending " in .py or .pyw will trigger the Python settings while files ending in *.c or @@ -16,7 +17,6 @@ " - " Number of spaces to use for an indent. " This will affect Ctrl-T and 'autoindent'. " Python: 4 spaces @@ -25,7 +25,7 @@ au BufRead,BufNewFile *.c,*.h set shiftwidth=8 " Number of spaces that a pre-existing tab is equal to. -" For the amount of space used for a new tab, use shiftwidth. +" For the amount of space used for a new tab use shiftwidth. " Python: 8 " C: 8 au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=8 @@ -34,6 +34,7 @@ " Also have an autocmd for Makefiles since they require hard tabs. " Python: yes " C: no +" Makefile: no au BufRead,BufNewFile *.py,*.pyw set expandtab au BufRead,BufNewFile *.c,*.h set noexpandtab au BufRead,BufNewFile Makefile* set noexpandtab @@ -60,16 +61,15 @@ au BufNewFile *.py,*.pyw,*.c,*.h set fileformat=unix - +" ---------------------------------------------------------------------------- " The following section contains suggested settings. While in no way required " to meet coding standards, they are helpful. " Set the default file encoding to UTF-8: ``set encoding=utf-8`` " Put a marker at the beginning of the file to differentiate between UTF and -" UCS encoding (warning: always done when reasonable, which can mess up shells -" into thinking a text file is actually a binary file when executing the text -" file): ``set bomb`` +" UCS encoding (WARNING: can trick shells into thinking a text file is actually +" a binary file when executing the text file): ``set bomb`` " For full syntax highlighting: "``let python_highlight_all=1`` @@ -77,7 +77,7 @@ " Automatically indent: ``filetype indent on`` -" Fold based on indentation: ``set foldmethod=indent`` +" Folding based on indentation: ``set foldmethod=indent`` " Make trailing whitespace explicit: "highlight WhitespaceEOL ctermbg=red guibg=red From tim_one at users.sourceforge.net Sun Nov 7 00:45:51 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sun Nov 7 00:45:54 2004 Subject: [Python-checkins] python/dist/src/Lib/test test___all__.py, 1.40, 1.41 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19668/Lib/test Modified Files: test___all__.py Log Message: Essentially SF patch 1061679: add missing __all__ to pickletools.py. Harmless. Index: test___all__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test___all__.py,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- test___all__.py 2 Aug 2004 03:54:36 -0000 1.40 +++ test___all__.py 6 Nov 2004 23:45:48 -0000 1.41 @@ -114,6 +114,7 @@ self.check_all("os2emxpath") self.check_all("pdb") self.check_all("pickle") + self.check_all("pickletools") self.check_all("pipes") self.check_all("popen2") self.check_all("poplib") From tim_one at users.sourceforge.net Sun Nov 7 00:45:53 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sun Nov 7 00:45:56 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1183,1.1184 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19668/Misc Modified Files: NEWS Log Message: Essentially SF patch 1061679: add missing __all__ to pickletools.py. Harmless. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1183 retrieving revision 1.1184 diff -u -d -r1.1183 -r1.1184 --- NEWS 4 Nov 2004 05:23:15 -0000 1.1183 +++ NEWS 6 Nov 2004 23:45:48 -0000 1.1184 @@ -26,6 +26,8 @@ attempt is made to execute the remaining handlers. The last exception raised is re-raised. +- Patch 1061679: Added `__all__` to pickletools.py. + Build ----- From tim_one at users.sourceforge.net Sun Nov 7 00:46:21 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sun Nov 7 00:46:25 2004 Subject: [Python-checkins] python/dist/src/Lib pickletools.py,1.27,1.28 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19668/Lib Modified Files: pickletools.py Log Message: Essentially SF patch 1061679: add missing __all__ to pickletools.py. Harmless. Index: pickletools.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pickletools.py,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- pickletools.py 7 Aug 2004 16:51:30 -0000 1.27 +++ pickletools.py 6 Nov 2004 23:45:48 -0000 1.28 @@ -10,6 +10,10 @@ Print a symbolic disassembly of a pickle. ''' +__all__ = ['dis', + 'genops', + ] + # Other ideas: # # - A pickle verifier: read a pickle and check it exhaustively for From bcannon at users.sourceforge.net Sun Nov 7 02:19:04 2004 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Sun Nov 7 02:19:11 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1184,1.1185 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9681/Misc Modified Files: NEWS Log Message: Add comment about removal of CoreServices/CoreFoundation compilation against the core on OS X (also specifically mention removal of PyMac_GetAppletScriptFile() ). Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1184 retrieving revision 1.1185 diff -u -d -r1.1184 -r1.1185 --- NEWS 6 Nov 2004 23:45:48 -0000 1.1184 +++ NEWS 7 Nov 2004 01:19:00 -0000 1.1185 @@ -31,7 +31,9 @@ Build ----- -... +- Bug 1034277 / Patch 1035255: Remove compilation of core against CoreServices + and CoreFoundation on OS X. Involved removing PyMac_GetAppletScriptFile() + which has no known users. Thanks Bob Ippolito. C API ----- From bcannon at users.sourceforge.net Sun Nov 7 02:24:18 2004 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Sun Nov 7 02:24:21 2004 Subject: [Python-checkins] python/dist/src configure.in, 1.474, 1.475 configure, 1.461, 1.462 Message-ID: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10622 Modified Files: configure.in configure Log Message: Move the AC_MSG_RESULT function call for checking for pthread options up into the 'if' statement that performed the test. Not all platforms run the test and on those tests configure outputted a rogue 'no' line. Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.474 retrieving revision 1.475 diff -u -d -r1.474 -r1.475 --- configure.in 5 Nov 2004 07:02:41 -0000 1.474 +++ configure.in 7 Nov 2004 01:24:11 -0000 1.475 @@ -945,9 +945,9 @@ fi rm -fr conftest* fi +AC_MSG_RESULT($ac_cv_cxx_thread) fi CXX="$ac_save_cxx" -AC_MSG_RESULT($ac_cv_cxx_thread) dnl # check for ANSI or K&R ("traditional") preprocessor dnl AC_MSG_CHECKING(for C preprocessor type) Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.461 retrieving revision 1.462 diff -u -d -r1.461 -r1.462 --- configure 6 Nov 2004 04:45:33 -0000 1.461 +++ configure 7 Nov 2004 01:24:12 -0000 1.462 @@ -4256,10 +4256,10 @@ fi rm -fr conftest* fi -fi -CXX="$ac_save_cxx" echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 echo "${ECHO_T}$ac_cv_cxx_thread" >&6 +fi +CXX="$ac_save_cxx" # checks for header files From tim_one at users.sourceforge.net Sun Nov 7 05:52:32 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sun Nov 7 05:52:36 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_atexit.py, 1.11, 1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18285/Lib/test Modified Files: test_atexit.py Log Message: Whitespace normalization. Index: test_atexit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_atexit.py,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- test_atexit.py 4 Nov 2004 04:31:30 -0000 1.11 +++ test_atexit.py 7 Nov 2004 04:52:29 -0000 1.12 @@ -72,7 +72,7 @@ sys.stdout = sys.__stdout__ sys.stderr = sys.__stderr__ atexit._exithandlers = save_handlers - + ### helpers def h1(self): print "h1" From rhettinger at users.sourceforge.net Sun Nov 7 07:18:43 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sun Nov 7 07:19:05 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libpdb.tex, 1.41, 1.42 libprofile.tex, 1.47, 1.48 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32575 Modified Files: libpdb.tex libprofile.tex Log Message: SF patch #1061780: use a new -m option in pdb and profile invocations Doc patch submitted by Ilya Sandler. Index: libpdb.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpdb.tex,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- libpdb.tex 17 Oct 2004 19:55:47 -0000 1.41 +++ libpdb.tex 7 Nov 2004 06:18:37 -0000 1.42 @@ -39,7 +39,7 @@ a script to debug other scripts. For example: \begin{verbatim} -python /usr/local/lib/python1.5/pdb.py myscript.py +python -m pdb myscript.py \end{verbatim} Typical usage to inspect a crashed program is: Index: libprofile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libprofile.tex,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- libprofile.tex 23 Mar 2004 21:40:07 -0000 1.47 +++ libprofile.tex 7 Nov 2004 06:18:37 -0000 1.48 @@ -128,7 +128,7 @@ a script to profile another script. For example: \begin{verbatim} -python /usr/local/lib/python1.5/profile.py myscript.py +python -m profile myscript.py \end{verbatim} \file{profile.py} accepts two optional arguments on the command line: From rhettinger at users.sourceforge.net Sun Nov 7 08:08:28 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sun Nov 7 08:08:32 2004 Subject: [Python-checkins] python/dist/src/Tools/msi msi.py, 1.13, 1.14 uisample.py, 1.1, 1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/msi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8222 Modified Files: msi.py uisample.py Log Message: SF bug #1061457: spelling error in win installer Index: msi.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/msi/msi.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- msi.py 2 Nov 2004 22:59:56 -0000 1.13 +++ msi.py 7 Nov 2004 07:08:25 -0000 1.14 @@ -735,7 +735,7 @@ # Also set list of reinstalled features to "ALL" c.event("[REINSTALL]", "ALL", 'MaintenanceForm_Action="Repair"', 5) c.event("[Progress1]", "Repairing", 'MaintenanceForm_Action="Repair"', 6) - c.event("[Progress2]", "repaires", 'MaintenanceForm_Action="Repair"', 7) + c.event("[Progress2]", "repairs", 'MaintenanceForm_Action="Repair"', 7) c.event("Reinstall", "ALL", 'MaintenanceForm_Action="Repair"', 8) # Uninstall: Change progress to "Remove", then invoke uninstall Index: uisample.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/msi/uisample.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- uisample.py 22 Aug 2004 13:34:34 -0000 1.1 +++ uisample.py 7 Nov 2004 07:08:25 -0000 1.2 @@ -543,7 +543,7 @@ (u'MaintenanceTypeDlg', u'RepairButton', u'NewDialog', u'VerifyRepairDlg', u'1', 4), (u'MaintenanceTypeDlg', u'RepairButton', u'[InstallMode]', u'Repair', u'1', 1), (u'MaintenanceTypeDlg', u'RepairButton', u'[Progress1]', u'Repairing', u'1', 2), -(u'MaintenanceTypeDlg', u'RepairButton', u'[Progress2]', u'repaires', u'1', 3), +(u'MaintenanceTypeDlg', u'RepairButton', u'[Progress2]', u'repairs', u'1', 3), (u'MaintenanceWelcomeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None), (u'MaintenanceWelcomeDlg', u'Next', u'NewDialog', u'MaintenanceTypeDlg', u'1', 2), (u'MaintenanceWelcomeDlg', u'Next', u'SpawnWaitDialog', u'WaitForCostingDlg', u'CostingComplete = 1', 1), From loewis at users.sourceforge.net Sun Nov 7 11:08:32 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun Nov 7 11:08:34 2004 Subject: [Python-checkins] python/dist/src/PCbuild BUILDno.txt, 1.63, 1.64 pythoncore.vcproj, 1.23, 1.24 Message-ID: Update of /cvsroot/python/python/dist/src/PCbuild In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7678 Modified Files: BUILDno.txt pythoncore.vcproj Log Message: Bump version for 2.4c1 Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- BUILDno.txt 2 Nov 2004 22:28:07 -0000 1.63 +++ BUILDno.txt 7 Nov 2004 10:08:29 -0000 1.64 @@ -33,8 +33,10 @@ Windows Python BUILD numbers ---------------------------- + 59 2.4.0c1 + 7-Nov-2004 58 2.4.0b2 - 22-Nov-2004 + 2-Nov-2004 57 2.4.0b1 15-Oct-2004 56 2.4.0a3 Index: pythoncore.vcproj =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/pythoncore.vcproj,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- pythoncore.vcproj 2 Nov 2004 22:28:07 -0000 1.23 +++ pythoncore.vcproj 7 Nov 2004 10:08:29 -0000 1.24 @@ -1385,7 +1385,7 @@ Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" - PreprocessorDefinitions="BUILD=58"/> + PreprocessorDefinitions="BUILD=59"/> @@ -1393,7 +1393,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" - PreprocessorDefinitions="BUILD=58"/> + PreprocessorDefinitions="BUILD=59"/> @@ -1401,7 +1401,7 @@ Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" - PreprocessorDefinitions="BUILD=58"/> + PreprocessorDefinitions="BUILD=59"/>
Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25401 Modified Files: bdb.py pdb.py Log Message: Bug #1055168: calling pdb.set_trace() calls Bdb.set_trace, which made the debugger enter inside pdb.set_trace. Patch #1061767: make pdb.set_trace enter enter at the stack frame calling pdb.set_trace(). Index: bdb.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bdb.py,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- bdb.py 24 Oct 2004 00:32:24 -0000 1.46 +++ bdb.py 7 Nov 2004 11:35:30 -0000 1.47 @@ -178,9 +178,13 @@ self.returnframe = frame self.quitting = 0 - def set_trace(self): - """Start debugging from here.""" - frame = sys._getframe().f_back + def set_trace(self, frame=None): + """Start debugging from `frame`. + + If frame is not specified, debugging starts from caller's frame. + """ + if frame is None: + frame = sys._getframe().f_back self.reset() while frame: frame.f_trace = self.trace_dispatch Index: pdb.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pdb.py,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- pdb.py 24 Oct 2004 00:32:24 -0000 1.72 +++ pdb.py 7 Nov 2004 11:35:30 -0000 1.73 @@ -997,7 +997,7 @@ return Pdb().runcall(*args, **kwds) def set_trace(): - Pdb().set_trace() + Pdb().set_trace(sys._getframe().f_back) # Post-Mortem interface From jhylton at users.sourceforge.net Sun Nov 7 15:04:04 2004 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Sun Nov 7 15:04:07 2004 Subject: [Python-checkins] python/dist/src/Python compile.c,2.336,2.337 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30545/dist/src/Python Modified Files: compile.c Log Message: SF patch 1025636: Check for NULL returns in compile.c:com_import_stmt There is no test for this change, because there is no way to provoke memory errors on demand. Test suite passes, though. Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.336 retrieving revision 2.337 diff -u -d -r2.336 -r2.337 --- compile.c 2 Nov 2004 04:20:09 -0000 2.336 +++ compile.c 7 Nov 2004 14:04:00 -0000 2.337 @@ -3606,10 +3606,20 @@ } REQ(nn, import_as_names); tup = PyTuple_New((NCH(nn) + 1) / 2); - for (i = 0; i < NCH(nn); i += 2) - PyTuple_SET_ITEM(tup, i / 2, - PyString_FromString(STR( - CHILD(CHILD(nn, i), 0)))); + for (i = 0; i < NCH(nn); i += 2) { + PyObject *s = PyString_FromString( + STR(CHILD(CHILD(nn, i), 0))); + if (s == NULL) { + Py_CLEAR(tup); + break; + } else + PyTuple_SET_ITEM(tup, i / 2, s); + } + if (tup == NULL) { + /* Assume that failue above was MemoryError */ + com_error(c, PyExc_MemoryError, ""); + return; + } } com_addoparg(c, LOAD_CONST, com_addconst(c, tup)); Py_DECREF(tup); From jlgijsbers at users.sourceforge.net Sun Nov 7 15:14:40 2004 From: jlgijsbers at users.sourceforge.net (jlgijsbers@users.sourceforge.net) Date: Sun Nov 7 15:14:43 2004 Subject: [Python-checkins] python/dist/src/Doc/lib liblogging.tex,1.30,1.31 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv411 Modified Files: liblogging.tex Log Message: Patch #1061857: add documentation for previously undocumented TimedRotatingFileHandler class. Thanks Jeroen Vloothuis! Index: liblogging.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblogging.tex,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- liblogging.tex 29 Oct 2004 14:35:42 -0000 1.30 +++ liblogging.tex 7 Nov 2004 14:14:27 -0000 1.31 @@ -80,6 +80,9 @@ \item \class{RotatingFileHandler} instances send error messages to disk files, with support for maximum log file sizes and log file rotation. +\item \class{TimedRotatingFileHandler} instances send error messages to +disk files rotating the log file at certain timed intervals. + \item \class{SocketHandler} instances send error messages to TCP/IP sockets. @@ -891,6 +894,52 @@ in \method{setRollover()}. \end{methoddesc} +\subsubsection{TimedRotatingFileHandler} + +The \class{TimedRotatingFileHandler} class supports rotation of disk log files +at certain timed intervals. + +\begin{classdesc}{TimedRotatingFileHandler}{filename + \optional{,when + \optional{,interval + \optional{,backupCount}}}} + +Returns a new instance of the \class{TimedRotatingFileHandler} class. The +specified file is opened and used as the stream for logging. On rotating +it also sets the filename suffix. Rotating happens based on the product +of \var{when} and \var{interval}. + +You can use the \var{when} to specify the type of \var{interval}. The +list of possible values is, note that they are not case sensitive: + +\begin{tableii}{l|l}{}{Value}{Type of interval} + \lineii{S}{Seconds} + \lineii{M}{Minutes} + \lineii{H}{Hours} + \lineii{D}{Days} + \lineii{W}{Week day (0=Monday)} + \lineii{midnight}{Roll over at midnight} +\end{tableii} + +If \var{backupCount} is non-zero, the system will save old log files by +appending the extensions ".1", ".2" etc., to the filename. For example, +with a \var{backupCount} of 5 and a base file name of \file{app.log}, +you would get \file{app.log}, \file{app.log.1}, \file{app.log.2}, up to +\file{app.log.5}. The file being written to is always \file{app.log}. +When this file is filled, it is closed and renamed to \file{app.log.1}, +and if files \file{app.log.1}, \file{app.log.2}, etc. exist, then they +are renamed to \file{app.log.2}, \file{app.log.3} etc. respectively. +\end{classdesc} + +\begin{methoddesc}{doRollover}{} +Does a rollover, as described above. +\end{methoddesc} + +\begin{methoddesc}{emit}{record} +Outputs the record to the file, catering for rollover as described +above. +\end{methoddesc} + \subsubsection{SocketHandler} The \class{SocketHandler} class sends logging output to a network From astrand at users.sourceforge.net Sun Nov 7 15:15:30 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Sun Nov 7 15:15:33 2004 Subject: [Python-checkins] python/dist/src/Objects fileobject.c,2.192,2.193 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv691 Modified Files: fileobject.c Log Message: If close() fails in file_dealloc, then print an error message to stderr. close() can fail if the user is out-of-quota, for example. Fixes #959379. Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.192 retrieving revision 2.193 diff -u -d -r2.192 -r2.193 --- fileobject.c 11 Jun 2004 04:49:03 -0000 2.192 +++ fileobject.c 7 Nov 2004 14:15:28 -0000 2.193 @@ -300,12 +300,19 @@ static void file_dealloc(PyFileObject *f) { + int sts = 0; if (f->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) f); if (f->f_fp != NULL && f->f_close != NULL) { Py_BEGIN_ALLOW_THREADS - (*f->f_close)(f->f_fp); + sts = (*f->f_close)(f->f_fp); Py_END_ALLOW_THREADS + if (sts == EOF) +#ifdef HAVE_STRERROR + PySys_WriteStderr("close failed: [Errno %d] %s\n", errno, strerror(errno)); +#else + PySys_WriteStderr("close failed: [Errno %d]\n", errno); +#endif } PyMem_Free(f->f_setbuf); Py_XDECREF(f->f_name); From jhylton at users.sourceforge.net Sun Nov 7 15:24:28 2004 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Sun Nov 7 15:24:31 2004 Subject: [Python-checkins] python/dist/src/Modules socketmodule.c, 1.310, 1.311 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3103/dist/src/Modules Modified Files: socketmodule.c Log Message: Fix apparently trivial buffer overflow (SF bug 1060396). memset() wrote one past the end of the buffer, which was likely to be unused padding or a yet-to-be-initialized local variable. This routine is already tested by test_socket. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.310 retrieving revision 1.311 diff -u -d -r1.310 -r1.311 --- socketmodule.c 14 Oct 2004 13:27:14 -0000 1.310 +++ socketmodule.c 7 Nov 2004 14:24:25 -0000 1.311 @@ -3351,7 +3351,7 @@ #endif /* Guarantee NUL-termination for PyString_FromString() below */ - memset((void *) &ip[0], '\0', sizeof(ip) + 1); + memset((void *) &ip[0], '\0', sizeof(ip)); if (!PyArg_ParseTuple(args, "is#:inet_ntop", &af, &packed, &len)) { return NULL; From astrand at users.sourceforge.net Sun Nov 7 15:30:38 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Sun Nov 7 15:30:41 2004 Subject: [Python-checkins] python/dist/src/PC _subprocess.c,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/PC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4566/PC Modified Files: _subprocess.c Log Message: When using shell=True on Windows, don't display a shell window by default. Fixes #1057061. Index: _subprocess.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/_subprocess.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- _subprocess.c 12 Oct 2004 21:38:22 -0000 1.2 +++ _subprocess.c 7 Nov 2004 14:30:34 -0000 1.3 @@ -377,6 +377,7 @@ /* note: we only support a small subset of all SI attributes */ si.dwFlags = getint(startup_info, "dwFlags"); + si.wShowWindow = getint(startup_info, "wShowWindow"); si.hStdInput = gethandle(startup_info, "hStdInput"); si.hStdOutput = gethandle(startup_info, "hStdOutput"); si.hStdError = gethandle(startup_info, "hStdError"); @@ -530,6 +531,8 @@ defint(d, "STD_ERROR_HANDLE", STD_ERROR_HANDLE); defint(d, "DUPLICATE_SAME_ACCESS", DUPLICATE_SAME_ACCESS); defint(d, "STARTF_USESTDHANDLES", STARTF_USESTDHANDLES); + defint(d, "STARTF_USESHOWWINDOW", STARTF_USESHOWWINDOW); + defint(d, "SW_HIDE", SW_HIDE); defint(d, "INFINITE", INFINITE); defint(d, "WAIT_OBJECT_0", WAIT_OBJECT_0); defint(d, "CREATE_NEW_CONSOLE", CREATE_NEW_CONSOLE); From astrand at users.sourceforge.net Sun Nov 7 15:30:38 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Sun Nov 7 15:30:42 2004 Subject: [Python-checkins] python/dist/src/Lib subprocess.py,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4566/Lib Modified Files: subprocess.py Log Message: When using shell=True on Windows, don't display a shell window by default. Fixes #1057061. Index: subprocess.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/subprocess.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- subprocess.py 17 Oct 2004 16:36:53 -0000 1.7 +++ subprocess.py 7 Nov 2004 14:30:34 -0000 1.8 @@ -372,11 +372,11 @@ STD_OUTPUT_HANDLE, STD_ERROR_HANDLE from win32api import GetCurrentProcess, DuplicateHandle, \ GetModuleFileName, GetVersion - from win32con import DUPLICATE_SAME_ACCESS + from win32con import DUPLICATE_SAME_ACCESS, SW_HIDE from win32pipe import CreatePipe from win32process import CreateProcess, STARTUPINFO, \ GetExitCodeProcess, STARTF_USESTDHANDLES, \ - CREATE_NEW_CONSOLE + STARTF_USESHOWWINDOW, CREATE_NEW_CONSOLE from win32event import WaitForSingleObject, INFINITE, WAIT_OBJECT_0 else: from _subprocess import * @@ -673,7 +673,19 @@ if not isinstance(args, types.StringTypes): args = list2cmdline(args) + # Process startup details + default_startupinfo = STARTUPINFO() + if startupinfo == None: + startupinfo = default_startupinfo + if not None in (p2cread, c2pwrite, errwrite): + startupinfo.dwFlags |= STARTF_USESTDHANDLES + startupinfo.hStdInput = p2cread + startupinfo.hStdOutput = c2pwrite + startupinfo.hStdError = errwrite + if shell: + default_startupinfo.dwFlags |= STARTF_USESHOWWINDOW + default_startupinfo.wShowWindow = SW_HIDE comspec = os.environ.get("COMSPEC", "cmd.exe") args = comspec + " /c " + args if (GetVersion() >= 0x80000000L or @@ -692,15 +704,6 @@ # kill children. creationflags |= CREATE_NEW_CONSOLE - # Process startup details - if startupinfo == None: - startupinfo = STARTUPINFO() - if not None in (p2cread, c2pwrite, errwrite): - startupinfo.dwFlags |= STARTF_USESTDHANDLES - startupinfo.hStdInput = p2cread - startupinfo.hStdOutput = c2pwrite - startupinfo.hStdError = errwrite - # Start the process try: hp, ht, pid, tid = CreateProcess(executable, args, From jlgijsbers at users.sourceforge.net Sun Nov 7 16:46:27 2004 From: jlgijsbers at users.sourceforge.net (jlgijsbers@users.sourceforge.net) Date: Sun Nov 7 16:46:30 2004 Subject: [Python-checkins] python/dist/src/Lib unittest.py,1.35,1.36 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20299 Modified Files: unittest.py Log Message: Patch #1061904 / bug #878275: give a nicer error message when someone accidentally derives from TestSuite instead of TestCase. Index: unittest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- unittest.py 28 Aug 2004 15:22:12 -0000 1.35 +++ unittest.py 7 Nov 2004 15:46:25 -0000 1.36 @@ -489,6 +489,8 @@ def loadTestsFromTestCase(self, testCaseClass): """Return a suite of all tests cases contained in testCaseClass""" + if issubclass(testCaseClass, TestSuite): + raise TypeError("Test cases should not be derived from TestSuite. Maybe you meant to derive from TestCase?") testCaseNames = self.getTestCaseNames(testCaseClass) if not testCaseNames and hasattr(testCaseClass, 'runTest'): testCaseNames = ['runTest'] From jlgijsbers at users.sourceforge.net Sun Nov 7 17:02:20 2004 From: jlgijsbers at users.sourceforge.net (jlgijsbers@users.sourceforge.net) Date: Sun Nov 7 17:02:23 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libunittest.tex, 1.18, 1.19 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23284 Modified Files: libunittest.tex Log Message: Clarify that it's not necessary to subclass from TestCase to create a test case. As Jeremy put it: "subclassing is an implementation technique, not a type declaration". Index: libunittest.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libunittest.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- libunittest.tex 31 Dec 2003 04:34:50 -0000 1.18 +++ libunittest.tex 7 Nov 2004 16:02:07 -0000 1.19 @@ -35,7 +35,8 @@ A \dfn{test case} is the smallest unit of testing. It checks for a specific response to a particular set of inputs. PyUnit provides a base class, \class{TestCase}, which may be used to create new test -cases. +cases. You may provide your own implementation that does not subclass +from \class{TestCase}, of course. \term{test suite} A \dfn{test suite} is a collection of test cases, test suites, or From jlgijsbers at users.sourceforge.net Sun Nov 7 17:11:38 2004 From: jlgijsbers at users.sourceforge.net (jlgijsbers@users.sourceforge.net) Date: Sun Nov 7 17:11:41 2004 Subject: [Python-checkins] python/dist/src/Doc/lib liblogging.tex,1.31,1.32 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25315 Modified Files: liblogging.tex Log Message: Patch #1061924: add documentation for BaseRotatingHandler and correct reference to non-existent function 'setRollover()'. Index: liblogging.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblogging.tex,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- liblogging.tex 7 Nov 2004 14:14:27 -0000 1.31 +++ liblogging.tex 7 Nov 2004 16:11:35 -0000 1.32 @@ -77,6 +77,10 @@ \item \class{FileHandler} instances send error messages to disk files. +\item \class{BaseRotatingHandler} is tha base class for handlers that +rotate log files at a certain point. It is not meant to be instantiated +directly. Instead, use RotatingFileHandler or TimedRotatingFileHandler. + \item \class{RotatingFileHandler} instances send error messages to disk files, with support for maximum log file sizes and log file rotation. @@ -890,8 +894,7 @@ \end{methoddesc} \begin{methoddesc}{emit}{record} -Outputs the record to the file, catering for rollover as described -in \method{setRollover()}. +Outputs the record to the file, catering for rollover as described previously. \end{methoddesc} \subsubsection{TimedRotatingFileHandler} From jhylton at users.sourceforge.net Sun Nov 7 17:13:12 2004 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Sun Nov 7 17:13:15 2004 Subject: [Python-checkins] python/dist/src/Lib httplib.py,1.93,1.94 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25550/dist/src/Lib Modified Files: httplib.py Log Message: Fix for SF bug 988120 via patch 1061941. If read() returned less than the number of bytes request, the full amount was subtracted from length instead of the actually read amount. Index: httplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- httplib.py 14 Oct 2004 15:23:38 -0000 1.93 +++ httplib.py 7 Nov 2004 16:13:09 -0000 1.94 @@ -457,10 +457,11 @@ if amt is None: # unbounded read - if self.will_close: + if self.length is None: s = self.fp.read() else: s = self._safe_read(self.length) + self.length = 0 self.close() # we read everything return s @@ -468,12 +469,13 @@ if amt > self.length: # clip the read to the "end of response" amt = self.length - self.length -= amt # we do not use _safe_read() here because this may be a .will_close # connection, and the user is reading more bytes than will be provided # (for example, reading in 1k chunks) s = self.fp.read(amt) + if self.length is not None: + self.length -= len(s) return s From jhylton at users.sourceforge.net Sun Nov 7 17:13:51 2004 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Sun Nov 7 17:13:53 2004 Subject: [Python-checkins] python/dist/src/Misc ACKS,1.287,1.288 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25665/dist/src/Misc Modified Files: ACKS Log Message: Fix for SF bug 988120 via patch 1061941. If read() returned less than the number of bytes request, the full amount was subtracted from length instead of the actually read amount. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.287 retrieving revision 1.288 diff -u -d -r1.287 -r1.288 --- ACKS 22 Oct 2004 06:22:54 -0000 1.287 +++ ACKS 7 Nov 2004 16:13:49 -0000 1.288 @@ -302,6 +302,7 @@ Orjan Johansen Simon Johnston Richard Jones +Irmen de Jong Lucas de Jonge Jens B. Jorgensen John Jorgensen From astrand at users.sourceforge.net Sun Nov 7 17:38:11 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Sun Nov 7 17:38:14 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libsubprocess.tex, 1.1, 1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30515 Modified Files: libsubprocess.tex Log Message: Added more documentation about the executable argument. Fixes #1056441. Index: libsubprocess.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsubprocess.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- libsubprocess.tex 17 Oct 2004 16:29:48 -0000 1.1 +++ libsubprocess.tex 7 Nov 2004 16:38:08 -0000 1.2 @@ -68,6 +68,13 @@ use the system default, which usually means fully buffered. The default value for \var{bufsize} is \constant{0} (unbuffered). +The \var{executable} argument specifies the program to execute. It is +very seldom needed: Usually, the program to execute is defined by the +\var{args} argument. If \var{shell=True}, the \var{executable} +argument specifies which shell to use. On \UNIX{}, the default shell +is /bin/sh. On Windows, the default shell is specified by the COMSPEC +environment variable. + \var{stdin}, \var{stdout} and \var{stderr} specify the executed programs' standard input, standard output and standard error file handles, respectively. Valid values are \code{PIPE}, an existing file From jlgijsbers at users.sourceforge.net Sun Nov 7 20:16:09 2004 From: jlgijsbers at users.sourceforge.net (jlgijsbers@users.sourceforge.net) Date: Sun Nov 7 20:16:12 2004 Subject: [Python-checkins] python/dist/src/Lib pydoc.py,1.98,1.99 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32434 Modified Files: pydoc.py Log Message: Patch #1061931 / bug #971872: factor out part of spillproperties, so properties are also documented if help(Class.) is called instead of help(Class). Index: pydoc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- pydoc.py 30 Aug 2004 14:13:04 -0000 1.98 +++ pydoc.py 7 Nov 2004 19:16:05 -0000 1.99 @@ -298,6 +298,7 @@ if inspect.isroutine(object): return self.docroutine(*args) except AttributeError: pass + if isinstance(object, property): return self.docproperty(*args) return self.docother(*args) def fail(self, object, name=None, *args): @@ -724,20 +725,7 @@ hr.maybe() push(msg) for name, kind, homecls, value in ok: - push('
%s
\n' % name) - if value.__doc__ is not None: - doc = self.markup(value.__doc__, self.preformat, - funcs, classes, mdict) - push('
%s
\n' % doc) - for attr, tag in [('fget', 'get'), - ('fset', 'set'), - ('fdel', 'delete')]: - func = getattr(value, attr) - if func is not None: - base = self.document(func, tag, mod, - funcs, classes, mdict, object) - push('
%s
\n' % base) - push('
\n') + push(self._docproperty(name, value, mod)) return attrs def spilldata(msg, attrs, predicate): @@ -884,6 +872,30 @@ doc = doc and '
%s
' % doc return '
%s
%s
\n' % (decl, doc) + def _docproperty(self, name, value, mod): + results = [] + push = results.append + + if name: + push('
%s
\n' % name) + if value.__doc__ is not None: + doc = self.markup(value.__doc__, self.preformat) + push('
%s
\n' % doc) + for attr, tag in [('fget', 'get'), + ('fset', 'set'), + ('fdel', 'delete')]: + func = getattr(value, attr) + if func is not None: + base = self.document(func, tag, mod) + push('
%s
\n' % base) + push('
\n') + + return ''.join(results) + + def docproperty(self, object, name=None, mod=None, cl=None): + """Produce html documentation for a property.""" + return self._docproperty(name, object, mod) + def docother(self, object, name=None, mod=None, *ignored): """Produce HTML documentation for a data object.""" lhs = name and '%s = ' % name or '' @@ -1138,22 +1150,7 @@ hr.maybe() push(msg) for name, kind, homecls, value in ok: - push(name) - need_blank_after_doc = 0 - doc = getdoc(value) or '' - if doc: - push(self.indent(doc)) - need_blank_after_doc = 1 - for attr, tag in [('fget', ''), - ('fset', ''), - ('fdel', '')]: - func = getattr(value, attr) - if func is not None: - if need_blank_after_doc: - push('') - need_blank_after_doc = 0 - base = self.document(func, tag, mod) - push(self.indent(base)) + push(self._docproperty(name, value, mod)) return attrs def spilldata(msg, attrs, predicate): @@ -1258,6 +1255,34 @@ doc = getdoc(object) or '' return decl + '\n' + (doc and rstrip(self.indent(doc)) + '\n') + def _docproperty(self, name, value, mod): + results = [] + push = results.append + + if name: + push(name) + need_blank_after_doc = 0 + doc = getdoc(value) or '' + if doc: + push(self.indent(doc)) + need_blank_after_doc = 1 + for attr, tag in [('fget', ''), + ('fset', ''), + ('fdel', '')]: + func = getattr(value, attr) + if func is not None: + if need_blank_after_doc: + push('') + need_blank_after_doc = 0 + base = self.document(func, tag, mod) + push(self.indent(base)) + + return '\n'.join(results) + + def docproperty(self, object, name=None, mod=None, cl=None): + """Produce text documentation for a property.""" + return self._docproperty(name, object, mod) + def docother(self, object, name=None, mod=None, maxlen=None, doc=None): """Produce text documentation for a data object.""" repr = self.repr(object) From jlgijsbers at users.sourceforge.net Sun Nov 7 20:36:50 2004 From: jlgijsbers at users.sourceforge.net (jlgijsbers@users.sourceforge.net) Date: Sun Nov 7 20:36:55 2004 Subject: [Python-checkins] python/dist/src/Doc/lib tkinter.tex,1.26,1.27 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4939 Modified Files: tkinter.tex Log Message: Patch #1062018 / bug #1038693: comment out dead link in tkinter docs. Index: tkinter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/tkinter.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- tkinter.tex 16 Oct 2004 21:40:35 -0000 1.26 +++ tkinter.tex 7 Nov 2004 19:36:48 -0000 1.27 @@ -519,8 +519,8 @@ \subsubsection{The Packer} % Packer.html \index{packing (widgets)} -The packer is one of Tk's geometry-management mechanisms. See also -\citetitle[classes/ClassPacker.html]{the Packer class interface}. +The packer is one of Tk's geometry-management mechanisms. +% See also \citetitle[classes/ClassPacker.html]{the Packer class interface}. Geometry managers are used to specify the relative positioning of the positioning of widgets within their container - their mutual From jlgijsbers at users.sourceforge.net Sun Nov 7 20:55:20 2004 From: jlgijsbers at users.sourceforge.net (jlgijsbers@users.sourceforge.net) Date: Sun Nov 7 20:55:23 2004 Subject: [Python-checkins] python/dist/src/Doc/lib xmldom.tex,1.24,1.25 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8675 Modified Files: xmldom.tex Log Message: Patch #1062033 / bug #1027771: clarify what happens when calling insertBefore() with refChild=None. Index: xmldom.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/xmldom.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- xmldom.tex 17 Jun 2004 21:34:05 -0000 1.24 +++ xmldom.tex 7 Nov 2004 19:55:18 -0000 1.25 @@ -340,7 +340,9 @@ \begin{methoddesc}[Node]{insertBefore}{newChild, refChild} Insert a new child node before an existing child. It must be the case that \var{refChild} is a child of this node; if not, -\exception{ValueError} is raised. \var{newChild} is returned. +\exception{ValueError} is raised. \var{newChild} is returned. If +\var{refChild} is \code{None}, it inserts \var{newChild} at the end of +the children's list. \end{methoddesc} \begin{methoddesc}[Node]{removeChild}{oldChild} From loewis at users.sourceforge.net Sun Nov 7 20:57:38 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun Nov 7 20:57:41 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_unicode_file.py, 1.15, 1.16 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9263 Modified Files: test_unicode_file.py Log Message: Try a different filename if the Latin-1 file name cannot be represented in the file system. Fixes #989338. Index: test_unicode_file.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode_file.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- test_unicode_file.py 28 Jun 2004 06:57:19 -0000 1.15 +++ test_unicode_file.py 7 Nov 2004 19:57:35 -0000 1.16 @@ -14,6 +14,23 @@ # cannot be encoded in the file system encoding. raise TestSkipped("No Unicode filesystem semantics on this platform.") +if TESTFN_ENCODED.decode(TESTFN_ENCODING) != TESTFN_UNICODE: + # The file system encoding does not support Latin-1 + # (which test_support assumes), so try the file system + # encoding instead. + import sys + try: + TESTFN_UNICODE = unicode("@test-\xe0\xf2", sys.getfilesystemencoding()) + TESTFN_ENCODED = TESTFN_UNICODE.encode(TESTFN_ENCODING) + if '?' in TESTFN_ENCODED: + # MBCS will not report the error properly + raise UnicodeError, "mbcs encoding problem" + except (UnicodeError, TypeError): + raise TestSkipped("Cannot find a suiteable filename.") + +if TESTFN_ENCODED.decode(TESTFN_ENCODING) != TESTFN_UNICODE: + raise TestSkipped("Cannot find a suitable filename.") + def remove_if_exists(filename): if os.path.exists(filename): os.unlink(filename) From loewis at users.sourceforge.net Sun Nov 7 21:02:01 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun Nov 7 21:02:05 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_pep277.py,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10218 Modified Files: test_pep277.py Log Message: Stop printing listdir bytestring output, as the precise list of strings returned depends on the filesystem encoding. Index: test_pep277.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pep277.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- test_pep277.py 12 Sep 2003 16:25:37 -0000 1.8 +++ test_pep277.py 7 Nov 2004 20:01:55 -0000 1.9 @@ -78,11 +78,11 @@ def test_listdir(self): f1 = os.listdir(test_support.TESTFN) - f1.sort() + # Printing f1 is not appropriate, as specific filenames + # returned depend on the local encoding f2 = os.listdir(unicode(test_support.TESTFN, sys.getfilesystemencoding())) f2.sort() - print f1 print f2 def test_rename(self): From loewis at users.sourceforge.net Sun Nov 7 21:02:01 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun Nov 7 21:02:06 2004 Subject: [Python-checkins] python/dist/src/Lib/test/output test_pep277, 1.2, 1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test/output In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10218/output Modified Files: test_pep277 Log Message: Stop printing listdir bytestring output, as the precise list of strings returned depends on the filesystem encoding. Index: test_pep277 =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_pep277,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- test_pep277 8 Oct 2002 02:44:30 -0000 1.2 +++ test_pep277 7 Nov 2004 20:01:56 -0000 1.3 @@ -1,4 +1,3 @@ test_pep277 u'\xdf-\u66e8\u66e9\u66eb' -['???', '???', '??????', '????????????', '????G\xdf', 'Ge??-sa?', 'Gr\xfc\xdf-Gott', 'abc', 'ascii'] [u'Gr\xfc\xdf-Gott', u'abc', u'ascii', u'\u0393\u03b5\u03b9\u03ac-\u03c3\u03b1\u03c2', u'\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435', u'\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1', u'\u306b\u307d\u3093', u'\u66e8\u05e9\u3093\u0434\u0393\xdf', u'\u66e8\u66e9\u66eb'] From tim_one at users.sourceforge.net Mon Nov 8 05:30:23 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 8 05:30:27 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1185,1.1186 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22119/Misc Modified Files: NEWS Log Message: SF bug 1061968: threads: segfault or Py_FatalError at exit PyGILState_Ensure(): The fix in 2.4a3 for bug 1010677 reintroduced thread shutdown race bug 225673. Repaired by (once again) ensuring the GIL is held whenever deleting a thread state. Alas, there's no useful test case for this shy bug. Four years ago, only Guido could provoke it, on his box, and today only Armin can provoke it on his box. I've never been able to provoke it (but not for lack of trying!). This is a critical fix for 2.3.5 too, since the fix for 1010677 got backported there already and so also reintroduced 225673. I don't intend to backport this fix. For whoever (if anyone) does, there are other thread fixes in 2.4 that need backporting too, and I bet they need to happen first for this patch to apply cleanly. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1185 retrieving revision 1.1186 diff -u -d -r1.1185 -r1.1186 --- NEWS 7 Nov 2004 01:19:00 -0000 1.1185 +++ NEWS 8 Nov 2004 04:30:18 -0000 1.1186 @@ -12,7 +12,10 @@ Core and builtins ----------------- -... +- Bug 1061968: Fixes in 2.4a3 to address thread bug 1010677 reintroduced + the years-old thread shutdown race bug 225673. Numeric history lesson + aside, all bugs in all three reports are fixed now. + Extension Modules ----------------- From tim_one at users.sourceforge.net Mon Nov 8 05:30:23 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 8 05:30:27 2004 Subject: [Python-checkins] python/dist/src/Python pystate.c,2.37,2.38 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22119/Python Modified Files: pystate.c Log Message: SF bug 1061968: threads: segfault or Py_FatalError at exit PyGILState_Ensure(): The fix in 2.4a3 for bug 1010677 reintroduced thread shutdown race bug 225673. Repaired by (once again) ensuring the GIL is held whenever deleting a thread state. Alas, there's no useful test case for this shy bug. Four years ago, only Guido could provoke it, on his box, and today only Armin can provoke it on his box. I've never been able to provoke it (but not for lack of trying!). This is a critical fix for 2.3.5 too, since the fix for 1010677 got backported there already and so also reintroduced 225673. I don't intend to backport this fix. For whoever (if anyone) does, there are other thread fixes in 2.4 that need backporting too, and I bet they need to happen first for this patch to apply cleanly. Index: pystate.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pystate.c,v retrieving revision 2.37 retrieving revision 2.38 diff -u -d -r2.37 -r2.38 --- pystate.c 10 Oct 2004 05:30:40 -0000 2.37 +++ pystate.c 8 Nov 2004 04:30:21 -0000 2.38 @@ -483,25 +483,24 @@ --tcur->gilstate_counter; assert(tcur->gilstate_counter >= 0); /* illegal counter value */ - /* If we are about to destroy this thread-state, we must - clear it while the lock is held, as destructors may run - */ + /* If we're going to destroy this thread-state, we must + * clear it while the GIL is held, as destructors may run. + */ if (tcur->gilstate_counter == 0) { /* can't have been locked when we created it */ assert(oldstate == PyGILState_UNLOCKED); PyThreadState_Clear(tcur); + /* Delete the thread-state. Note this releases the GIL too! + * It's vital that the GIL be held here, to avoid shutdown + * races; see bugs 225673 and 1061968 (that nasty bug has a + * habit of coming back). + */ + PyThreadState_DeleteCurrent(); + /* Delete this thread from our TLS. */ + PyThread_delete_key_value(autoTLSkey); } - /* Release the lock if necessary */ - if (oldstate == PyGILState_UNLOCKED) + else if (oldstate == PyGILState_UNLOCKED) PyEval_ReleaseThread(tcur); - - /* Now complete destruction of the thread if necessary */ - if (tcur->gilstate_counter == 0) { - /* Delete this thread from our TLS */ - PyThread_delete_key_value(autoTLSkey); - /* Delete the thread-state */ - PyThreadState_Delete(tcur); - } } #endif /* WITH_THREAD */ From rhettinger at users.sourceforge.net Mon Nov 8 07:36:45 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Nov 8 07:36:48 2004 Subject: [Python-checkins] python/dist/src/Lib trace.py,1.21,1.22 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15524 Modified Files: trace.py Log Message: SF #1062190. Removed an assertion that rendered trace.py unnecessarily inflexibile. Index: trace.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/trace.py,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- trace.py 16 Apr 2004 03:28:19 -0000 1.21 +++ trace.py 8 Nov 2004 06:36:42 -0000 1.22 @@ -416,7 +416,6 @@ def find_executable_linenos(filename): """Return dict where keys are line numbers in the line number table.""" - assert filename.endswith('.py') try: prog = open(filename, "rU").read() except IOError, err: From mwh at users.sourceforge.net Mon Nov 8 13:17:37 2004 From: mwh at users.sourceforge.net (mwh@users.sourceforge.net) Date: Mon Nov 8 13:17:40 2004 Subject: [Python-checkins] python/dist/src/Lib/compiler transformer.py, 1.48, 1.49 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/compiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24130 Modified Files: transformer.py Log Message: Fix bug [ 1057835 ] compiler.transformer, "from module import *" Index: transformer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/compiler/transformer.py,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- transformer.py 11 Oct 2004 15:35:53 -0000 1.48 +++ transformer.py 8 Nov 2004 12:17:34 -0000 1.49 @@ -437,8 +437,8 @@ assert nodelist[2][1] == 'import' fromname = self.com_dotted_name(nodelist[1]) if nodelist[3][0] == token.STAR: - # TODO(jhylton): where is the lineno? - return From(fromname, [('*', None)]) + return From(fromname, [('*', None)], + lineno=nodelist[0][2]) else: node = nodelist[3 + (nodelist[3][0] == token.LPAR)] return From(fromname, self.com_import_as_names(node), From mwh at users.sourceforge.net Mon Nov 8 17:46:04 2004 From: mwh at users.sourceforge.net (mwh@users.sourceforge.net) Date: Mon Nov 8 17:46:08 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_compiler.py, 1.9, 1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21765 Modified Files: test_compiler.py Log Message: test for fixedness of bug #1057835. (thanks to Raymond for the prod). Index: test_compiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_compiler.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- test_compiler.py 11 Oct 2004 15:34:31 -0000 1.9 +++ test_compiler.py 8 Nov 2004 16:46:02 -0000 1.10 @@ -90,6 +90,8 @@ finally: b = 0 +from math import * + ############################################################################### def test_main(): From tim_one at users.sourceforge.net Mon Nov 8 23:07:43 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 8 23:07:47 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1186,1.1187 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12102/Misc Modified Files: NEWS Log Message: test_doctest.py test_pdb_set_trace_nested(): A new test from Jim Fulton showing that doctest's pdb.set_trace() support was dramatically broken. doctest.py _OutputRedirectingPdb.trace_dispatch(): Return a local trace function instead of (implicitly) None. Else interaction with pdb was bizarre, noticing only 'call' events. Amazingly, the existing set_trace() tests didn't care. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1186 retrieving revision 1.1187 diff -u -d -r1.1186 -r1.1187 --- NEWS 8 Nov 2004 04:30:18 -0000 1.1186 +++ NEWS 8 Nov 2004 22:07:37 -0000 1.1187 @@ -29,7 +29,10 @@ attempt is made to execute the remaining handlers. The last exception raised is re-raised. -- Patch 1061679: Added `__all__` to pickletools.py. +- ``doctest``'s new support for adding ``pdb.set_trace()`` calls to + doctests was broken in a dramatic but shallow way. Fixed. + +- Patch 1061679: Added ``__all__`` to pickletools.py. Build ----- From tim_one at users.sourceforge.net Mon Nov 8 23:08:16 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 8 23:08:19 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_doctest.py, 1.51, 1.52 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12102/Lib/test Modified Files: test_doctest.py Log Message: test_doctest.py test_pdb_set_trace_nested(): A new test from Jim Fulton showing that doctest's pdb.set_trace() support was dramatically broken. doctest.py _OutputRedirectingPdb.trace_dispatch(): Return a local trace function instead of (implicitly) None. Else interaction with pdb was bizarre, noticing only 'call' events. Amazingly, the existing set_trace() tests didn't care. Index: test_doctest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_doctest.py,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- test_doctest.py 28 Sep 2004 05:50:57 -0000 1.51 +++ test_doctest.py 8 Nov 2004 22:07:36 -0000 1.52 @@ -1568,7 +1568,7 @@ """ def test_pdb_set_trace(): - """Using pdb.set_trace from a doctest + """Using pdb.set_trace from a doctest. You can use pdb.set_trace from a doctest. To do so, you must retrieve the set_trace function from the pdb module at the time @@ -1624,8 +1624,10 @@ ... 'continue', # stop debugging ... '']) - >>> try: runner.run(test) - ... finally: sys.stdin = real_stdin + >>> try: + ... runner.run(test) + ... finally: + ... sys.stdin = real_stdin --Return-- > (3)calls_set_trace()->None -> import pdb; pdb.set_trace() @@ -1697,6 +1699,91 @@ (1, 3) """ +def test_pdb_set_trace_nested(): + """This illustrates more-demanding use of set_trace with nested functions. + + >>> class C(object): + ... def calls_set_trace(self): + ... y = 1 + ... import pdb; pdb.set_trace() + ... self.f1() + ... y = 2 + ... def f1(self): + ... x = 1 + ... self.f2() + ... x = 2 + ... def f2(self): + ... z = 1 + ... z = 2 + + >>> calls_set_trace = C().calls_set_trace + + >>> doc = ''' + ... >>> a = 1 + ... >>> calls_set_trace() + ... ''' + >>> parser = doctest.DocTestParser() + >>> runner = doctest.DocTestRunner(verbose=False) + >>> test = parser.get_doctest(doc, globals(), "foo", "foo.py", 0) + >>> real_stdin = sys.stdin + >>> sys.stdin = _FakeInput([ + ... 'print y', # print data defined in the function + ... 'step', 'step', 'step', 'step', 'step', 'step', 'print z', + ... 'up', 'print x', + ... 'up', 'print y', + ... 'up', 'print foo', + ... 'continue', # stop debugging + ... '']) + + >>> try: + ... runner.run(test) + ... finally: + ... sys.stdin = real_stdin + > (5)calls_set_trace() + -> self.f1() + (Pdb) print y + 1 + (Pdb) step + --Call-- + > (7)f1() + -> def f1(self): + (Pdb) step + > (8)f1() + -> x = 1 + (Pdb) step + > (9)f1() + -> self.f2() + (Pdb) step + --Call-- + > (11)f2() + -> def f2(self): + (Pdb) step + > (12)f2() + -> z = 1 + (Pdb) step + > (13)f2() + -> z = 2 + (Pdb) print z + 1 + (Pdb) up + > (9)f1() + -> self.f2() + (Pdb) print x + 1 + (Pdb) up + > (5)calls_set_trace() + -> self.f1() + (Pdb) print y + 1 + (Pdb) up + > (1)?() + -> calls_set_trace() + (Pdb) print foo + *** NameError: name 'foo' is not defined + (Pdb) continue + (0, 2) +""" + def test_DocTestSuite(): """DocTestSuite creates a unittest test suite from a doctest. From tim_one at users.sourceforge.net Mon Nov 8 23:08:16 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 8 23:08:20 2004 Subject: [Python-checkins] python/dist/src/Lib doctest.py,1.117,1.118 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12102/Lib Modified Files: doctest.py Log Message: test_doctest.py test_pdb_set_trace_nested(): A new test from Jim Fulton showing that doctest's pdb.set_trace() support was dramatically broken. doctest.py _OutputRedirectingPdb.trace_dispatch(): Return a local trace function instead of (implicitly) None. Else interaction with pdb was bizarre, noticing only 'call' events. Amazingly, the existing set_trace() tests didn't care. Index: doctest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- doctest.py 13 Oct 2004 14:15:31 -0000 1.117 +++ doctest.py 8 Nov 2004 22:07:35 -0000 1.118 @@ -105,8 +105,6 @@ warnings.filterwarnings("ignore", "is_private", DeprecationWarning, __name__, 0) -real_pdb_set_trace = pdb.set_trace - # There are 4 basic classes: # - Example: a pair, plus an intra-docstring line number. # - DocTest: a collection of examples, parsed from a docstring, plus @@ -350,9 +348,10 @@ save_stdout = sys.stdout sys.stdout = self.__out # Call Pdb's trace dispatch method. - pdb.Pdb.trace_dispatch(self, *args) + result = pdb.Pdb.trace_dispatch(self, *args) # Restore stdout. sys.stdout = save_stdout + return result # [XX] Normalize with respect to os.path.pardir? def _module_relative_path(module, path): From tim_one at users.sourceforge.net Mon Nov 8 23:30:32 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 8 23:30:35 2004 Subject: [Python-checkins] python/dist/src/Lib doctest.py,1.118,1.119 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17372/Lib Modified Files: doctest.py Log Message: _OutputRedirectingPdb.trace_dispatch(): Return the base class's trace_dispatch() result in a more obvious, and more robust way. Index: doctest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- doctest.py 8 Nov 2004 22:07:35 -0000 1.118 +++ doctest.py 8 Nov 2004 22:30:28 -0000 1.119 @@ -348,10 +348,11 @@ save_stdout = sys.stdout sys.stdout = self.__out # Call Pdb's trace dispatch method. - result = pdb.Pdb.trace_dispatch(self, *args) - # Restore stdout. - sys.stdout = save_stdout - return result + try: + return pdb.Pdb.trace_dispatch(self, *args) + finally: + # Restore stdout. + sys.stdout = save_stdout # [XX] Normalize with respect to os.path.pardir? def _module_relative_path(module, path): From tim_one at users.sourceforge.net Mon Nov 8 23:31:12 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 8 23:31:15 2004 Subject: [Python-checkins] python/dist/src/Lib doctest.py,1.119,1.120 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17681/Lib Modified Files: doctest.py Log Message: And delete a useless comment. Index: doctest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- doctest.py 8 Nov 2004 22:30:28 -0000 1.119 +++ doctest.py 8 Nov 2004 22:31:09 -0000 1.120 @@ -351,7 +351,6 @@ try: return pdb.Pdb.trace_dispatch(self, *args) finally: - # Restore stdout. sys.stdout = save_stdout # [XX] Normalize with respect to os.path.pardir? From akuchling at users.sourceforge.net Tue Nov 9 03:58:05 2004 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue Nov 9 03:58:08 2004 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.111, 1.112 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12132 Modified Files: whatsnew24.tex Log Message: Bump version number Add doctest section Wordsmithing Index: whatsnew24.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 --- whatsnew24.tex 18 Oct 2004 16:16:53 -0000 1.111 +++ whatsnew24.tex 9 Nov 2004 02:58:02 -0000 1.112 @@ -10,7 +10,7 @@ % \title{What's New in Python 2.4} -\release{0.5} +\release{0.9} \author{A.M.\ Kuchling} \authoraddress{ \strong{Python Software Foundation}\\ @@ -21,29 +21,27 @@ \maketitle \tableofcontents [...1062 lines suppressed...] + +\item Integer operations will no longer trigger an \exception{OverflowWarning}. +The \exception{OverflowWarning} warning will disappear in Python 2.5. + \item The \function{zip()} built-in function and \function{itertools.izip()} now return an empty list instead of raising a \exception{TypeError} exception if called with no arguments. @@ -1548,6 +1704,12 @@ \item The \module{tarfile} module now generates GNU-format tar files by default. +\item Encountering a failure while importing a module no longer leaves +a partially-initialized module object in \code{sys.modules}. + +\item \constant{None} is now a constant; code that binds a new value to +the name \samp{None} is now a syntax error. + \end{itemize} From rhettinger at users.sourceforge.net Tue Nov 9 08:25:33 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Nov 9 08:25:36 2004 Subject: [Python-checkins] python/dist/src/Objects setobject.c,1.30,1.31 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28891/Objects Modified Files: setobject.c Log Message: SF 1062353: set pickling problems Support automatic pickling of dictionaries in instance of set subclasses. Index: setobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/setobject.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- setobject.c 28 Sep 2004 01:51:34 -0000 1.30 +++ setobject.c 9 Nov 2004 07:25:28 -0000 1.31 @@ -844,7 +844,7 @@ static PyObject * set_reduce(PySetObject *so) { - PyObject *keys=NULL, *args=NULL, *result=NULL; + PyObject *keys=NULL, *args=NULL, *result=NULL, *dict=NULL; keys = PyDict_Keys(so->data); if (keys == NULL) @@ -852,10 +852,17 @@ args = PyTuple_Pack(1, keys); if (args == NULL) goto done; - result = PyTuple_Pack(2, so->ob_type, args); + dict = PyObject_GetAttrString((PyObject *)so, "__dict__"); + if (dict == NULL) { + PyErr_Clear(); + dict = Py_None; + Py_INCREF(dict); + } + result = PyTuple_Pack(3, so->ob_type, args, dict); done: Py_XDECREF(args); Py_XDECREF(keys); + Py_XDECREF(dict); return result; } From rhettinger at users.sourceforge.net Tue Nov 9 08:25:34 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Nov 9 08:25:37 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_set.py,1.15,1.16 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28891/Lib/test Modified Files: test_set.py Log Message: SF 1062353: set pickling problems Support automatic pickling of dictionaries in instance of set subclasses. Index: test_set.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_set.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- test_set.py 28 Sep 2004 01:51:35 -0000 1.15 +++ test_set.py 9 Nov 2004 07:25:31 -0000 1.16 @@ -175,9 +175,15 @@ self.failIf(set('cbs').issuperset('a')) def test_pickling(self): - p = pickle.dumps(self.s) - dup = pickle.loads(p) - self.assertEqual(self.s, dup, "%s != %s" % (self.s, dup)) + for i in (0, 1, 2): + p = pickle.dumps(self.s, i) + dup = pickle.loads(p) + self.assertEqual(self.s, dup, "%s != %s" % (self.s, dup)) + if type(self.s) not in (set, frozenset): + self.s.x = 10 + p = pickle.dumps(self.s) + dup = pickle.loads(p) + self.assertEqual(self.s.x, dup.x) def test_deepcopy(self): class Tracer: From rhettinger at users.sourceforge.net Tue Nov 9 08:27:37 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Nov 9 08:27:39 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_deque.py,1.17,1.18 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29261/Lib/test Modified Files: test_deque.py Log Message: SF patch #1062279: deque pickling problems (Contributed by Dima Dorfman.) * Support pickling of dictionaries in instances of deque subclasses. * Support pickling of recursive deques. Index: test_deque.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_deque.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- test_deque.py 2 Oct 2004 13:59:34 -0000 1.17 +++ test_deque.py 9 Nov 2004 07:27:35 -0000 1.18 @@ -297,10 +297,19 @@ def test_pickle(self): d = deque(xrange(200)) - s = pickle.dumps(d) - e = pickle.loads(s) - self.assertNotEqual(id(d), id(e)) - self.assertEqual(list(d), list(e)) + for i in (0, 1, 2): + s = pickle.dumps(d, i) + e = pickle.loads(s) + self.assertNotEqual(id(d), id(e)) + self.assertEqual(list(d), list(e)) + + def test_pickle_recursive(self): + d = deque('abc') + d.append(d) + for i in (0, 1, 2): + e = pickle.loads(pickle.dumps(d, i)) + self.assertNotEqual(id(d), id(e)) + self.assertEqual(id(e), id(e[-1])) def test_deepcopy(self): mut = [10] @@ -430,6 +439,10 @@ class Deque(deque): pass +class DequeWithBadIter(deque): + def __iter__(self): + raise TypeError + class TestSubclass(unittest.TestCase): def test_basics(self): @@ -472,6 +485,25 @@ self.assertEqual(type(d), type(e)) self.assertEqual(list(d), list(e)) + def test_pickle(self): + d = Deque('abc') + d.append(d) + + e = pickle.loads(pickle.dumps(d)) + self.assertNotEqual(id(d), id(e)) + self.assertEqual(type(d), type(e)) + dd = d.pop() + ee = e.pop() + self.assertEqual(id(e), id(ee)) + self.assertEqual(d, e) + + d.x = d + e = pickle.loads(pickle.dumps(d)) + self.assertEqual(id(e), id(e.x)) + + d = DequeWithBadIter('abc') + self.assertRaises(TypeError, pickle.dumps, d) + def test_weakref(self): d = deque('gallahad') p = proxy(d) From rhettinger at users.sourceforge.net Tue Nov 9 08:27:37 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Nov 9 08:27:40 2004 Subject: [Python-checkins] python/dist/src/Modules collectionsmodule.c, 1.35, 1.36 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29261/Modules Modified Files: collectionsmodule.c Log Message: SF patch #1062279: deque pickling problems (Contributed by Dima Dorfman.) * Support pickling of dictionaries in instances of deque subclasses. * Support pickling of recursive deques. Index: collectionsmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/collectionsmodule.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- collectionsmodule.c 2 Nov 2004 02:11:35 -0000 1.35 +++ collectionsmodule.c 9 Nov 2004 07:27:34 -0000 1.36 @@ -550,19 +550,21 @@ static PyObject * deque_reduce(dequeobject *deque) { - PyObject *seq, *args, *result; + PyObject *dict, *result, *it; - seq = PySequence_Tuple((PyObject *)deque); - if (seq == NULL) - return NULL; - args = PyTuple_Pack(1, seq); - if (args == NULL) { - Py_DECREF(seq); + dict = PyObject_GetAttrString((PyObject *)deque, "__dict__"); + if (dict == NULL) { + PyErr_Clear(); + dict = Py_None; + Py_INCREF(dict); + } + it = PyObject_GetIter((PyObject *)deque); + if (it == NULL) { + Py_DECREF(dict); return NULL; } - result = PyTuple_Pack(2, deque->ob_type, args); - Py_DECREF(seq); - Py_DECREF(args); + result = Py_BuildValue("O()ON", deque->ob_type, dict, it); + Py_DECREF(dict); return result; } From arigo at users.sourceforge.net Tue Nov 9 16:35:26 2004 From: arigo at users.sourceforge.net (arigo@users.sourceforge.net) Date: Tue Nov 9 16:35:33 2004 Subject: [Python-checkins] python/dist/src/Python pystate.c, 2.29, 2.29.6.1 thread.c, 2.46.10.1, 2.46.10.2 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26605/Python Modified Files: Tag: release23-maint pystate.c thread.c Log Message: Backported thread fixes from 2.4 (by mostly copying pystate.c over from 2.4): * using malloc() and free() directly, as explained in the new comment * coding style in the PyGILState_*() functions * the recent destroy-tstate-without-holding-the-GIL bug * lock fixes and many more comments in thread.c Index: pystate.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pystate.c,v retrieving revision 2.29 retrieving revision 2.29.6.1 diff -u -d -r2.29 -r2.29.6.1 --- pystate.c 13 Jul 2003 10:41:53 -0000 2.29 +++ pystate.c 9 Nov 2004 15:35:23 -0000 2.29.6.1 @@ -3,6 +3,16 @@ #include "Python.h" +/* -------------------------------------------------------------------------- +CAUTION + +Always use malloc() and free() directly in this file. A number of these +functions are advertised as safe to call when the GIL isn't held, and in +a debug build Python redirects (e.g.) PyMem_NEW (etc) to Python's debugging +obmalloc functions. Those aren't thread-safe (they rely on the GIL to avoid +the expense of doing their own locking). +-------------------------------------------------------------------------- */ + #ifdef HAVE_DLOPEN #ifdef HAVE_DLFCN_H #include @@ -41,7 +51,8 @@ PyInterpreterState * PyInterpreterState_New(void) { - PyInterpreterState *interp = PyMem_NEW(PyInterpreterState, 1); + PyInterpreterState *interp = (PyInterpreterState *) + malloc(sizeof(PyInterpreterState)); if (interp != NULL) { HEAD_INIT(); @@ -116,7 +127,7 @@ Py_FatalError("PyInterpreterState_Delete: remaining threads"); *p = interp->next; HEAD_UNLOCK(); - PyMem_DEL(interp); + free(interp); } @@ -130,7 +141,8 @@ PyThreadState * PyThreadState_New(PyInterpreterState *interp) { - PyThreadState *tstate = PyMem_NEW(PyThreadState, 1); + PyThreadState *tstate = (PyThreadState *)malloc(sizeof(PyThreadState)); + if (_PyThreadState_GetFrame == NULL) _PyThreadState_GetFrame = threadstate_getframe; @@ -223,7 +235,7 @@ } *p = tstate->next; HEAD_UNLOCK(); - PyMem_DEL(tstate); + free(tstate); } @@ -268,7 +280,7 @@ _PyThreadState_Current = new; /* It should not be possible for more than one thread state - to be used for a thread. Check this the best we can in debug + to be used for a thread. Check this the best we can in debug builds. */ #if defined(Py_DEBUG) && defined(WITH_THREAD) @@ -313,7 +325,7 @@ int PyThreadState_SetAsyncExc(long id, PyObject *exc) { - PyThreadState *tstate = PyThreadState_Get(); + PyThreadState *tstate = PyThreadState_GET(); PyInterpreterState *interp = tstate->interp; PyThreadState *p; int count = 0; @@ -382,21 +394,25 @@ static PyInterpreterState *autoInterpreterState = NULL; static int autoTLSkey = 0; -/* Internal initialization/finalization functions called by - Py_Initialize/Py_Finalize +/* Internal initialization/finalization functions called by + Py_Initialize/Py_Finalize */ -void _PyGILState_Init(PyInterpreterState *i, PyThreadState *t) +void +_PyGILState_Init(PyInterpreterState *i, PyThreadState *t) { - assert(i && t); /* must init with a valid states */ + assert(i && t); /* must init with valid states */ autoTLSkey = PyThread_create_key(); autoInterpreterState = i; /* Now stash the thread state for this thread in TLS */ - PyThread_set_key_value(autoTLSkey, (void *)t); - assert(t->gilstate_counter==0); /* must be a new thread state */ + assert(PyThread_get_key_value(autoTLSkey) == NULL); + if (PyThread_set_key_value(autoTLSkey, (void *)t) < 0) + Py_FatalError("Couldn't create autoTLSkey mapping"); + assert(t->gilstate_counter == 0); /* must be a new thread state */ t->gilstate_counter = 1; } -void _PyGILState_Fini(void) +void +_PyGILState_Fini(void) { PyThread_delete_key(autoTLSkey); autoTLSkey = 0; @@ -404,80 +420,84 @@ } /* The public functions */ -PyThreadState *PyGILState_GetThisThreadState(void) +PyThreadState * +PyGILState_GetThisThreadState(void) { - if (autoInterpreterState==NULL || autoTLSkey==0) + if (autoInterpreterState == NULL || autoTLSkey == 0) return NULL; - return (PyThreadState *) PyThread_get_key_value(autoTLSkey); + return (PyThreadState *)PyThread_get_key_value(autoTLSkey); } -PyGILState_STATE PyGILState_Ensure(void) +PyGILState_STATE +PyGILState_Ensure(void) { int current; PyThreadState *tcur; - /* Note that we do not auto-init Python here - apart from - potential races with 2 threads auto-initializing, pep-311 + /* Note that we do not auto-init Python here - apart from + potential races with 2 threads auto-initializing, pep-311 spells out other issues. Embedders are expected to have called Py_Initialize() and usually PyEval_InitThreads(). */ assert(autoInterpreterState); /* Py_Initialize() hasn't been called! */ tcur = PyThread_get_key_value(autoTLSkey); - if (tcur==NULL) { + if (tcur == NULL) { /* Create a new thread state for this thread */ tcur = PyThreadState_New(autoInterpreterState); - if (tcur==NULL) + if (tcur == NULL) Py_FatalError("Couldn't create thread-state for new thread"); - PyThread_set_key_value(autoTLSkey, (void *)tcur); + if (PyThread_set_key_value(autoTLSkey, (void *)tcur) < 0) + Py_FatalError("Couldn't create autoTLSkey mapping"); current = 0; /* new thread state is never current */ - } else + } + else current = PyThreadState_IsCurrent(tcur); - if (!current) + if (current == 0) PyEval_RestoreThread(tcur); /* Update our counter in the thread-state - no need for locks: - tcur will remain valid as we hold the GIL. - - the counter is safe as we are the only thread "allowed" + - the counter is safe as we are the only thread "allowed" to modify this value */ - tcur->gilstate_counter++; + ++tcur->gilstate_counter; return current ? PyGILState_LOCKED : PyGILState_UNLOCKED; } -void PyGILState_Release(PyGILState_STATE oldstate) +void +PyGILState_Release(PyGILState_STATE oldstate) { PyThreadState *tcur = PyThread_get_key_value(autoTLSkey); - if (tcur==NULL) + if (tcur == NULL) Py_FatalError("auto-releasing thread-state, " "but no thread-state for this thread"); /* We must hold the GIL and have our thread state current */ /* XXX - remove the check - the assert should be fine, - but while this is very new (April 2003), the extra check + but while this is very new (April 2003), the extra check by release-only users can't hurt. */ - if (!PyThreadState_IsCurrent(tcur)) + if (! PyThreadState_IsCurrent(tcur)) Py_FatalError("This thread state must be current when releasing"); - assert (PyThreadState_IsCurrent(tcur)); - tcur->gilstate_counter -= 1; - assert (tcur->gilstate_counter >= 0); /* illegal counter value */ + assert(PyThreadState_IsCurrent(tcur)); + --tcur->gilstate_counter; + assert(tcur->gilstate_counter >= 0); /* illegal counter value */ - /* If we are about to destroy this thread-state, we must - clear it while the lock is held, as destructors may run - */ - if (tcur->gilstate_counter==0) { + /* If we're going to destroy this thread-state, we must + * clear it while the GIL is held, as destructors may run. + */ + if (tcur->gilstate_counter == 0) { /* can't have been locked when we created it */ - assert(oldstate==PyGILState_UNLOCKED); + assert(oldstate == PyGILState_UNLOCKED); PyThreadState_Clear(tcur); + /* Delete the thread-state. Note this releases the GIL too! + * It's vital that the GIL be held here, to avoid shutdown + * races; see bugs 225673 and 1061968 (that nasty bug has a + * habit of coming back). + */ + PyThreadState_DeleteCurrent(); + /* Delete this thread from our TLS. */ + PyThread_delete_key_value(autoTLSkey); } - /* Release the lock if necessary */ - if (oldstate==PyGILState_UNLOCKED) + else if (oldstate == PyGILState_UNLOCKED) PyEval_ReleaseThread(tcur); - - /* Now complete destruction of the thread if necessary */ - if (tcur->gilstate_counter==0) { - /* Delete this thread from our TLS */ - PyThread_delete_key_value(autoTLSkey); - /* Delete the thread-state */ - PyThreadState_Delete(tcur); - } } #endif /* WITH_THREAD */ Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.46.10.1 retrieving revision 2.46.10.2 diff -u -d -r2.46.10.1 -r2.46.10.2 --- thread.c 20 Sep 2003 11:13:18 -0000 2.46.10.1 +++ thread.c 9 Nov 2004 15:35:23 -0000 2.46.10.2 @@ -146,54 +146,132 @@ This code stolen from "thread_sgi.h", where it was the only implementation of an existing Python TLS API. */ -/* - * Per-thread data ("key") support. - */ +/* ------------------------------------------------------------------------ +Per-thread data ("key") support. + +Use PyThread_create_key() to create a new key. This is typically shared +across threads. + +Use PyThread_set_key_value(thekey, value) to associate void* value with +thekey in the current thread. Each thread has a distinct mapping of thekey +to a void* value. Caution: if the current thread already has a mapping +for thekey, value is ignored. + +Use PyThread_get_key_value(thekey) to retrieve the void* value associated +with thekey in the current thread. This returns NULL if no value is +associated with thekey in the current thread. + +Use PyThread_delete_key_value(thekey) to forget the current thread's associated +value for thekey. PyThread_delete_key(thekey) forgets the values associated +with thekey across *all* threads. + +While some of these functions have error-return values, none set any +Python exception. + +None of the functions does memory management on behalf of the void* values. +You need to allocate and deallocate them yourself. If the void* values +happen to be PyObject*, these functions don't do refcount operations on +them either. + +The GIL does not need to be held when calling these functions; they supply +their own locking. This isn't true of PyThread_create_key(), though (see +next paragraph). + +There's a hidden assumption that PyThread_create_key() will be called before +any of the other functions are called. There's also a hidden assumption +that calls to PyThread_create_key() are serialized externally. +------------------------------------------------------------------------ */ +/* A singly-linked list of struct key objects remembers all the key->value + * associations. File static keyhead heads the list. keymutex is used + * to enforce exclusion internally. + */ struct key { + /* Next record in the list, or NULL if this is the last record. */ struct key *next; + + /* The thread id, according to PyThread_get_thread_ident(). */ long id; + + /* The key and its associated value. */ int key; void *value; }; static struct key *keyhead = NULL; -static int nkeys = 0; static PyThread_type_lock keymutex = NULL; +static int nkeys = 0; /* PyThread_create_key() hands out nkeys+1 next */ -static struct key *find_key(int key, void *value) +/* Internal helper. + * If the current thread has a mapping for key, the appropriate struct key* + * is returned. NB: value is ignored in this case! + * If there is no mapping for key in the current thread, then: + * If value is NULL, NULL is returned. + * Else a mapping of key to value is created for the current thread, + * and a pointer to a new struct key* is returned; except that if + * malloc() can't find room for a new struct key*, NULL is returned. + * So when value==NULL, this acts like a pure lookup routine, and when + * value!=NULL, this acts like dict.setdefault(), returning an existing + * mapping if one exists, else creating a new mapping. + * + * Caution: this used to be too clever, trying to hold keymutex only + * around the "p->next = keyhead; keyhead = p" pair. That allowed + * another thread to mutate the list, via key deletion, concurrent with + * find_key() crawling over the list. Hilarity ensued. For example, when + * the for-loop here does "p = p->next", p could end up pointing at a + * record that PyThread_delete_key_value() was concurrently free()'ing. + * That could lead to anything, from failing to find a key that exists, to + * segfaults. Now we lock the whole routine. + */ +static struct key * +find_key(int key, void *value) { struct key *p; long id = PyThread_get_thread_ident(); + + PyThread_acquire_lock(keymutex, 1); for (p = keyhead; p != NULL; p = p->next) { if (p->id == id && p->key == key) - return p; + goto Done; + } + if (value == NULL) { + assert(p == NULL); + goto Done; } - if (value == NULL) - return NULL; p = (struct key *)malloc(sizeof(struct key)); if (p != NULL) { p->id = id; p->key = key; p->value = value; - PyThread_acquire_lock(keymutex, 1); p->next = keyhead; keyhead = p; - PyThread_release_lock(keymutex); } + Done: + PyThread_release_lock(keymutex); return p; } -int PyThread_create_key(void) +/* Return a new key. This must be called before any other functions in + * this family, and callers must arrange to serialize calls to this + * function. No violations are detected. + */ +int +PyThread_create_key(void) { + /* All parts of this function are wrong if it's called by multiple + * threads simultaneously. + */ if (keymutex == NULL) keymutex = PyThread_allocate_lock(); return ++nkeys; } -void PyThread_delete_key(int key) +/* Forget the associations for key across *all* threads. */ +void +PyThread_delete_key(int key) { struct key *p, **q; + PyThread_acquire_lock(keymutex, 1); q = &keyhead; while ((p = *q) != NULL) { @@ -208,28 +286,46 @@ PyThread_release_lock(keymutex); } -int PyThread_set_key_value(int key, void *value) +/* Confusing: If the current thread has an association for key, + * value is ignored, and 0 is returned. Else an attempt is made to create + * an association of key to value for the current thread. 0 is returned + * if that succeeds, but -1 is returned if there's not enough memory + * to create the association. value must not be NULL. + */ +int +PyThread_set_key_value(int key, void *value) { - struct key *p = find_key(key, value); + struct key *p; + + assert(value != NULL); + p = find_key(key, value); if (p == NULL) return -1; else return 0; } -void *PyThread_get_key_value(int key) +/* Retrieve the value associated with key in the current thread, or NULL + * if the current thread doesn't have an association for key. + */ +void * +PyThread_get_key_value(int key) { struct key *p = find_key(key, NULL); + if (p == NULL) return NULL; else return p->value; } -void PyThread_delete_key_value(int key) +/* Forget the current thread's association for key, if any. */ +void +PyThread_delete_key_value(int key) { long id = PyThread_get_thread_ident(); struct key *p, **q; + PyThread_acquire_lock(keymutex, 1); q = &keyhead; while ((p = *q) != NULL) { From fdrake at users.sourceforge.net Wed Nov 10 08:48:20 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 08:48:24 2004 Subject: [Python-checkins] python/dist/src/Doc/perl l2hinit.perl,1.86,1.87 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7583 Modified Files: l2hinit.perl Log Message: override a bit of LaTeX2HTML so empty table cells don't disappear from the output Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- l2hinit.perl 5 Nov 2004 06:42:22 -0000 1.86 +++ l2hinit.perl 10 Nov 2004 07:48:17 -0000 1.87 @@ -622,6 +622,49 @@ %declarations); +# This is a modified version of what's provided by LaTeX2HTML; see the +# comment on the middle stanza for an explanation of why we keep our +# own version. +# +# This routine must be called once on the text only, +# else it will "eat up" sensitive constructs. +sub text_cleanup { + # MRO: replaced $* with /m + s/(\s*\n){3,}/\n\n/gom; # Replace consecutive blank lines with one + s/<(\/?)P>\s*(\w)/<$1P>\n$2/gom; # clean up paragraph starts and ends + s/$O\d+$C//go; # Get rid of bracket id's + s/$OP\d+$CP//go; # Get rid of processed bracket id's + s/()?/(length($1) || length($2)) ? "$1--$2" : "-"/ge; + # Spacing commands + s/\\( |$)/ /go; + #JKR: There should be no more comments in the source now. + #s/([^\\]?)%/$1/go; # Remove the comment character + # Cannot treat \, as a command because , is a delimiter ... + s/\\,/ /go; + # Replace tilde's with non-breaking spaces + s/ *~/ /g; + + # This is why we have this copy of this routine; the following + # isn't so desirable as the author/maintainers of LaTeX2HTML seem + # to think. It's not commented out in the main script, so we have + # to override the whole thing. In particular, we don't want empty + # table cells to disappear. + + ### DANGEROUS ?? ### + # remove redundant (not

) empty tags, incl. with attributes + #s/\n?<([^PD >][^>]*)>\s*<\/\1>//g; + #s/\n?<([^PD >][^>]*)>\s*<\/\1>//g; + # remove redundant empty tags (not

or or ) + #s/<\/(TT|[^PTH][A-Z]+)><\1>//g; + #s/<([^PD ]+)(\s[^>]*)?>\n*<\/\1>//g; + + #JCL(jcl-hex) + # Replace ^^ special chars (according to p.47 of the TeX book) + # Useful when coming from the .aux file (german umlauts, etc.) + s/\^\^([^0-9a-f])/chr((64+ord($1))&127)/ge; + s/\^\^([0-9a-f][0-9a-f])/chr(hex($1))/ge; +} + # This is used to map the link rel attributes LaTeX2HTML uses to those # currently recommended by the W3C. sub custom_REL_hook { From fdrake at users.sourceforge.net Wed Nov 10 09:07:03 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 09:07:07 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.151,1.152 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11243 Modified Files: python.perl Log Message: more XHTML friendliness:

becomes well-formed Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.151 retrieving revision 1.152 diff -u -d -r1.151 -r1.152 --- python.perl 4 Nov 2004 03:23:04 -0000 1.151 +++ python.perl 10 Nov 2004 08:07:00 -0000 1.152 @@ -1895,7 +1895,7 @@ if ($text =~ /\.$/) { $period = ''; } - return ('
' + return ('
' . "\n
Module " . "$module:" . "\n
$text$period\n
" @@ -1918,7 +1918,7 @@ my $url = get_rfc_url($rfcnum, $format); my $icon = get_link_icon($url); my $attrtitle = strip_html_markup($title); - return '
' + return '
' . "\n
$what $rfcnum, $title$icon" @@ -1942,13 +1942,13 @@ my $text = next_argument(); if ($url) { my $icon = get_link_icon($url); - return '
' + return '
' . "\n
$title$icon
" . "\n
$text
\n
" . $_; } - return '
' + return '
' . "\n
$title
" . "\n
$text
\n
" @@ -1961,7 +1961,7 @@ my $linktext = next_argument(); my $text = next_argument(); my $icon = get_link_icon($url); - return '
' + return '
' . "\n
$linktext$icon
" . "\n
$text
\n
" @@ -1973,7 +1973,7 @@ my $url = next_argument(); my $text = next_argument(); my $icon = get_link_icon($url); - return '
' + return '
' . "\n
$url$icon
" . "\n
$text
\n
" From fdrake at users.sourceforge.net Wed Nov 10 09:08:30 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 09:08:33 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.152,1.153 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11508/perl Modified Files: python.perl Log Message: more more styling to the CSS Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.152 retrieving revision 1.153 diff -u -d -r1.152 -r1.153 --- python.perl 10 Nov 2004 08:07:00 -0000 1.152 +++ python.perl 10 Nov 2004 08:08:26 -0000 1.153 @@ -1871,7 +1871,7 @@ sub do_env_seealso{ return ("
\n " - . "

See Also:

\n" + . "

See Also:

\n" . $_[0] . '
'); } From fdrake at users.sourceforge.net Wed Nov 10 09:08:30 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 09:08:33 2004 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.37,1.38 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11508/html Modified Files: style.css Log Message: more more styling to the CSS Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- style.css 19 Oct 2004 15:40:38 -0000 1.37 +++ style.css 10 Nov 2004 08:08:26 -0000 1.38 @@ -141,7 +141,8 @@ border: thin solid black; padding: 0pt 1em 4pt 1em; } -.seealso .heading { font-size: 110%; } +.seealso > .heading { font-size: 110%; + font-weight: bold; } /* * Class 'availability' is used for module availability statements at From loewis at users.sourceforge.net Wed Nov 10 09:22:54 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Wed Nov 10 09:22:57 2004 Subject: [Python-checkins] python/nondist/peps pep-0291.txt,1.12,1.13 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14524 Modified Files: pep-0291.txt Log Message: Bump distutils compat to 2.1, following http://mail.python.org/pipermail/distutils-sig/2004-September/004168.html Index: pep-0291.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0291.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- pep-0291.txt 13 Oct 2004 15:57:42 -0000 1.12 +++ pep-0291.txt 10 Nov 2004 08:22:51 -0000 1.13 @@ -81,7 +81,7 @@ Barry Warsaw compiler Jeremy Hylton 2.1 decimal Raymond Hettinger 2.3 [2] - distutils Andrew Kuchling 1.5.2 + distutils Andrew Kuchling 2.1 email Barry Warsaw 2.1 / 2.3 [1] logging Vinay Sajip 1.5.2 sre Fredrik Lundh 2.1 From theller at users.sourceforge.net Wed Nov 10 10:02:00 2004 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Wed Nov 10 10:02:03 2004 Subject: [Python-checkins] python/dist/src/Lib/distutils msvccompiler.py, 1.60, 1.61 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23302 Modified Files: msvccompiler.py Log Message: Avoid a linker warning: MSVC 7 doesn't support /pdb:None, the debug info will always be in a .pdb file. Index: msvccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/msvccompiler.py,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- msvccompiler.py 18 Jul 2004 06:14:42 -0000 1.60 +++ msvccompiler.py 10 Nov 2004 09:01:41 -0000 1.61 @@ -237,9 +237,14 @@ '/Z7', '/D_DEBUG'] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] - self.ldflags_shared_debug = [ - '/DLL', '/nologo', '/INCREMENTAL:no', '/pdb:None', '/DEBUG' - ] + if self.__version >= 7: + self.ldflags_shared_debug = [ + '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG' + ] + else: + self.ldflags_shared_debug = [ + '/DLL', '/nologo', '/INCREMENTAL:no', '/pdb:None', '/DEBUG' + ] self.ldflags_static = [ '/nologo'] From rhettinger at users.sourceforge.net Wed Nov 10 14:08:39 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Nov 10 14:08:43 2004 Subject: [Python-checkins] python/dist/src/Modules zipimport.c,1.17,1.18 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10631 Modified Files: zipimport.c Log Message: SF patch 1062495: Modules/zipimport.c does not compile on solaris (Contributed by Niki W. Waibel.) Simple renaming to avoid a conflict that prevented compilation on Solaris. Index: zipimport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/zipimport.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- zipimport.c 7 Sep 2003 13:36:48 -0000 1.17 +++ zipimport.c 10 Nov 2004 13:08:35 -0000 1.18 @@ -250,7 +250,7 @@ return len; } -enum module_info { +enum zi_module_info { MI_ERROR, MI_NOT_FOUND, MI_MODULE, @@ -258,7 +258,7 @@ }; /* Return some information about a module. */ -static enum module_info +static enum zi_module_info get_module_info(ZipImporter *self, char *fullname) { char *subname, path[MAXPATHLEN + 1]; @@ -291,7 +291,7 @@ ZipImporter *self = (ZipImporter *)obj; PyObject *path = NULL; char *fullname; - enum module_info mi; + enum zi_module_info mi; if (!PyArg_ParseTuple(args, "s|O:zipimporter.find_module", &fullname, &path)) @@ -379,7 +379,7 @@ { ZipImporter *self = (ZipImporter *)obj; char *fullname; - enum module_info mi; + enum zi_module_info mi; if (!PyArg_ParseTuple(args, "s:zipimporter.is_package", &fullname)) @@ -457,7 +457,7 @@ PyObject *toc_entry; char *fullname, *subname, path[MAXPATHLEN+1]; int len; - enum module_info mi; + enum zi_module_info mi; if (!PyArg_ParseTuple(args, "s:zipimporter.get_source", &fullname)) return NULL; From rhettinger at users.sourceforge.net Wed Nov 10 14:13:08 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Nov 10 14:13:11 2004 Subject: [Python-checkins] python/dist/src/Misc ACKS,1.288,1.289 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11730 Modified Files: ACKS Log Message: SF patch 1062495: Modules/zipimport.c does not compile on solaris (Contributed by Niki W. Waibel.) Simple renaming to avoid a conflict that prevented compilation on Solaris. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.288 retrieving revision 1.289 diff -u -d -r1.288 -r1.289 --- ACKS 7 Nov 2004 16:13:49 -0000 1.288 +++ ACKS 10 Nov 2004 13:13:05 -0000 1.289 @@ -605,6 +605,7 @@ Kurt Vile Norman Vine Frank Visser +Niki W. Waibel Charles Waldman Richard Walker Larry Wall From fdrake at users.sourceforge.net Wed Nov 10 16:37:56 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 16:37:59 2004 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.38,1.39 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15203/html Modified Files: style.css Log Message: move much of the table styling out of the HTML and into the CSS; this also makes some constructs more XHTML friendly (including adding in some missing tags) Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- style.css 10 Nov 2004 08:08:26 -0000 1.38 +++ style.css 10 Nov 2004 15:37:53 -0000 1.39 @@ -125,8 +125,49 @@ .file { font-family: avantgarde, sans-serif; } .guilabel { font-family: avantgarde, sans-serif; } -.tableheader { background-color: #99ccff; - font-family: avantgarde, sans-serif; } +.realtable { border-collapse: collapse; + border-color: black; + border-style: solid; + border-width: 0px 0px 2px 0px; + /* This "empty-cells" property should allow us to + avoid having anything for empty cells, + but many browsers don't implement this at + all. */ + empty-cells: show; + margin-left: auto; + margin-right: auto; + padding-left: 0.4em; + padding-right: 0.4em; + } +.realtable tbody { vertical-align: baseline; } +.realtable tfoot { display: table-footer-group; } +.realtable thead { background-color: #99ccff; + border-width: 0px 0px 2px 1px; + display: table-header-group; + font-family: avantgarde, sans-serif; + font-weight: bold; + vertical-align: baseline; + } +.realtable thead :first-child { + border-width: 0px 0px 2px 0px; + } +.realtable thead th { border-width: 0px 0px 2px 1px } +.realtable td, +.realtable th { border-color: black; + border-style: solid; + border-width: 0px 0px 1px 1px; + padding-left: 0.4em; + padding-right: 0.4em; + text-align: inherit; + } +.realtable td:first-child, +.realtable th:first-child { + border-left-width: 0px; + vertical-align: baseline; + } +.realtable .center { text-align: center; } +.realtable .left { text-align: left; } +.realtable .right { text-align: right; } .refcount-info { font-style: italic; } .refcount-info .value { font-weight: bold; From fdrake at users.sourceforge.net Wed Nov 10 16:37:56 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 16:38:00 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.153,1.154 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15203/perl Modified Files: python.perl Log Message: move much of the table styling out of the HTML and into the CSS; this also makes some constructs more XHTML friendly (including adding in some missing tags) Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.153 retrieving revision 1.154 diff -u -d -r1.153 -r1.154 --- python.perl 10 Nov 2004 08:08:26 -0000 1.153 +++ python.perl 10 Nov 2004 15:37:54 -0000 1.154 @@ -1360,13 +1360,13 @@ my $mark = substr($a, 0, 1); my $r = ''; if ($mark eq 'c') - { $r = ' align="center"'; } + { $r = ' class="center"'; } elsif ($mark eq 'r') - { $r = ' align="right"'; } + { $r = ' class="right" '; } elsif ($mark eq 'l') - { $r = ' align="left"'; } + { $r = ' class="left" '; } elsif ($mark eq 'p') - { $r = ' align="left"'; } + { $r = ' class="left" '; } return $r; } @@ -1410,14 +1410,14 @@ my $a1 = $col_aligns[0]; my $a2 = $col_aligns[1]; s/\\lineii' + return '' . "\n " - . "\n " - . "\n $th1$h1\ " - . "\n $th2$h2\ " + . "\n " + . "\n $th1$h1" + . "\n $th2$h2" . "\n " . "\n " - . "\n " + . "\n " . $_ . "\n " . "\n
"; @@ -1434,15 +1434,9 @@ my $c2 = next_argument(); s/[\s\n]+//; my($sfont, $efont) = get_table_col1_fonts(); - $c1 = ' ' if ($c1 eq ''); - $c2 = ' ' if ($c2 eq ''); my($c1align, $c2align) = split('\|', $aligns); - my $padding = ''; - if ($c1align =~ /align="right"/ || $c1 eq '') { - $padding = ' '; - } - return "\n $c1align$sfont$c1$efont$padding\n" - . " $c2align$c2" + return "\n $c1align$sfont$c1$efont\n" + . " $c2align$c2" . $_; } @@ -1460,15 +1454,15 @@ my $a2 = $col_aligns[1]; my $a3 = $col_aligns[2]; s/\\lineiii' + return '' . "\n " - . "\n " - . "\n $th1$h1\ " - . "\n $th2$h2\ " - . "\n $th3$h3\ " + . "\n " + . "\n $th1$h1" + . "\n $th2$h2" + . "\n $th3$h3" . "\n " . "\n " - . "\n " + . "\n " . $_ . "\n " . "\n
"; @@ -1486,17 +1480,10 @@ my $c3 = next_argument(); s/[\s\n]+//; my($sfont, $efont) = get_table_col1_fonts(); - $c1 = ' ' if ($c1 eq ''); - $c2 = ' ' if ($c2 eq ''); - $c3 = ' ' if ($c3 eq ''); my($c1align, $c2align, $c3align) = split('\|', $aligns); - my $padding = ''; - if ($c1align =~ /align="right"/ || $c1 eq '') { - $padding = ' '; - } - return "\n $c1align$sfont$c1$efont$padding\n" + return "\n $c1align$sfont$c1$efont\n" . " $c2align$c2\n" - . " $c3align$c3" + . " $c3align$c3" . $_; } @@ -1516,16 +1503,16 @@ my $a3 = $col_aligns[2]; my $a4 = $col_aligns[3]; s/\\lineiv' + return '' . "\n " - . "\n " - . "\n $th1$h1\ " - . "\n $th2$h2\ " - . "\n $th3$h3\ " - . "\n $th4$h4\ " + . "\n " + . "\n $th1$h1" + . "\n $th2$h2" + . "\n $th3$h3" + . "\n $th4$h4" . "\n " . "\n " - . "\n " + . "\n " . $_ . "\n " . "\n
"; @@ -1544,19 +1531,11 @@ my $c4 = next_argument(); s/[\s\n]+//; my($sfont, $efont) = get_table_col1_fonts(); - $c1 = ' ' if ($c1 eq ''); - $c2 = ' ' if ($c2 eq ''); - $c3 = ' ' if ($c3 eq ''); - $c4 = ' ' if ($c4 eq ''); my($c1align, $c2align, $c3align, $c4align) = split('\|', $aligns); - my $padding = ''; - if ($c1align =~ /align="right"/ || $c1 eq '') { - $padding = ' '; - } - return "\n $c1align$sfont$c1$efont$padding\n" + return "\n $c1align$sfont$c1$efont\n" . " $c2align$c2\n" . " $c3align$c3\n" - . " $c4align$c4" + . " $c4align$c4" . $_; } @@ -1578,17 +1557,17 @@ my $a4 = $col_aligns[3]; my $a5 = $col_aligns[4]; s/\\linev' + return '' . "\n " - . "\n " - . "\n $th1$h1\ " - . "\n $th2$h2\ " - . "\n $th3$h3\ " - . "\n $th4$h4\ " - . "\n $th5$h5\ " + . "\n " + . "\n $th1$h1" + . "\n $th2$h2" + . "\n $th3$h3" + . "\n $th4$h4" + . "\n $th5$h5" . "\n " . "\n " - . "\n " + . "\n " . $_ . "\n " . "\n
"; @@ -1608,21 +1587,12 @@ my $c5 = next_argument(); s/[\s\n]+//; my($sfont, $efont) = get_table_col1_fonts(); - $c1 = ' ' if ($c1 eq ''); - $c2 = ' ' if ($c2 eq ''); - $c3 = ' ' if ($c3 eq ''); - $c4 = ' ' if ($c4 eq ''); - $c5 = ' ' if ($c5 eq ''); my($c1align, $c2align, $c3align, $c4align, $c5align) = split('\|',$aligns); - my $padding = ''; - if ($c1align =~ /align="right"/ || $c1 eq '') { - $padding = ' '; - } - return "\n $c1align$sfont$c1$efont$padding\n" + return "\n $c1align$sfont$c1$efont\n" . " $c2align$c2\n" . " $c3align$c3\n" . " $c4align$c4\n" - . " $c5align$c5" + . " $c5align$c5" . $_; } From fdrake at users.sourceforge.net Wed Nov 10 16:39:58 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 16:40:01 2004 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.39,1.40 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15878 Modified Files: style.css Log Message: remove comment that seems to be wrong after all; browsers do implement this, but I was misled by a LaTeX2HTML wart that I worked around yesterday Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- style.css 10 Nov 2004 15:37:53 -0000 1.39 +++ style.css 10 Nov 2004 15:39:50 -0000 1.40 @@ -129,10 +129,6 @@ border-color: black; border-style: solid; border-width: 0px 0px 2px 0px; - /* This "empty-cells" property should allow us to - avoid having anything for empty cells, - but many browsers don't implement this at - all. */ empty-cells: show; margin-left: auto; margin-right: auto; From fdrake at users.sourceforge.net Wed Nov 10 16:49:28 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 16:49:32 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.154,1.155 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18204 Modified Files: python.perl Log Message: add a comment about one of the remaining warts in the table formatting Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.154 retrieving revision 1.155 diff -u -d -r1.154 -r1.155 --- python.perl 10 Nov 2004 15:37:54 -0000 1.154 +++ python.perl 10 Nov 2004 15:49:25 -0000 1.155 @@ -1326,6 +1326,12 @@ } +# For tables, we include a class on every cell to allow the CSS to set +# the text-align property; this is because support for styling columns +# via the element appears nearly non-existant on even the latest +# browsers (Mozilla 1.7 is stable at the time of this writing). +# Hopefully this can be improved as browsers evolve. + @col_aligns = ('', '', '', '', ''); %FontConversions = ('cdata' => 'tt class="cdata"', From fdrake at users.sourceforge.net Wed Nov 10 16:54:49 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 16:54:54 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.155,1.156 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19759 Modified Files: python.perl Log Message: remove unreachable cruft Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.155 retrieving revision 1.156 diff -u -d -r1.155 -r1.156 --- python.perl 10 Nov 2004 15:49:25 -0000 1.155 +++ python.perl 10 Nov 2004 15:54:46 -0000 1.156 @@ -1726,8 +1726,6 @@ } $the_title .= "\n"; return $the_title . $_; - $the_title .= "\n"; - return $the_title . $_ ; } From fdrake at users.sourceforge.net Wed Nov 10 17:51:20 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 17:51:24 2004 Subject: [Python-checkins] python/dist/src/Doc/ref ref2.tex,1.55,1.56 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1197 Modified Files: ref2.tex Log Message: minor markup nits; fix missing whitespace Index: ref2.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref2.tex,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- ref2.tex 14 Sep 2004 07:52:22 -0000 1.55 +++ ref2.tex 10 Nov 2004 16:51:17 -0000 1.56 @@ -397,8 +397,8 @@ One syntactic restriction not indicated by these productions is that whitespace is not allowed between the \grammartoken{stringprefix} and the rest of the string literal. The source character set is defined -by the encoding declaration; it is \ASCII if no encoding declaration -is given in the source file; see \ref{encodings}. +by the encoding declaration; it is \ASCII{} if no encoding declaration +is given in the source file; see section~\ref{encodings}. \index{triple-quoted string} \index{Unicode Consortium} From fdrake at users.sourceforge.net Wed Nov 10 18:02:48 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 18:02:51 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.156,1.157 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3667/perl Modified Files: python.perl Log Message: move table formatting for grammar productions from HTML to CSS Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.156 retrieving revision 1.157 diff -u -d -r1.156 -r1.157 --- python.perl 10 Nov 2004 15:54:46 -0000 1.156 +++ python.perl 10 Nov 2004 17:02:43 -0000 1.157 @@ -791,7 +791,7 @@ } $BackpatchGrammarFiles{"$CURRENT_FILE"} = 1; } - return "$token" . $_; + return "$token" . $_; } sub do_cmd_grammartoken{ @@ -809,7 +809,7 @@ $DefinedGrammars{$lang} .= $_; return ("
\n" . "
\n" - . "\n" + . "
\n" . translate_commands(translate_environments($_)) . "
\n" . "
\n" @@ -828,12 +828,12 @@ my $lang = $CURRENT_GRAMMAR; local($CURRENT_TOKEN) = $token; if ($lang eq '*') { - return ("\n" - . " $token\n" - . "  ::= \n" - . " " + return ("\n" + . " $token\n" + . " ::=\n" + . " " . translate_commands($defn) - . "" + . "" . $_); } my $target; @@ -844,13 +844,13 @@ $target = "$CURRENT_FILE\#tok-$lang-$token"; } $TokenToTargetMapping{"$CURRENT_GRAMMAR:$token"} = $target; - return ("\n" - . " " - . "$token\n" - . "  ::= \n" - . " " + return ("\n" + . " " + . "$token\n" + . " ::=\n" + . " " . translate_commands($defn) - . "" + . "" . $_); } @@ -858,9 +858,9 @@ local($_) = @_; my $defn = next_argument(); $defn =~ s/^( +)/' ' x length $1/e; - return ("\n" - . "  \n" - . "  \n" + return ("\n" + . " \n" + . " \n" . " " . translate_commands($defn) . "" From fdrake at users.sourceforge.net Wed Nov 10 18:03:16 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 18:03:19 2004 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.40,1.41 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3667/html Modified Files: style.css Log Message: move table formatting for grammar productions from HTML to CSS Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- style.css 10 Nov 2004 15:39:50 -0000 1.40 +++ style.css 10 Nov 2004 17:02:42 -0000 1.41 @@ -108,6 +108,8 @@ padding: 0.05in; } .grammar-footer { padding: 0.05in; font-size: 85%; } +.grammartoken { font-family: "lucida typewriter", lucidatypewriter, + monospace; } .productions { background-color: #bbeeff; } .productions a:active { color: #ff0000; } @@ -115,7 +117,28 @@ .productions a:visited:hover { background-color: #99ccff; } .productions a:visited { color: #551a8b; } .productions a:link { color: #0000bb; } -.productions table { vertical-align: baseline; } +.productions table { vertical-align: baseline; + empty-cells: show; } +.productions > table td, +.productions > table th { padding: 2px; } +.productions > table td:first-child, +.productions > table td:last-child { + font-family: "lucida typewriter", + lucidatypewriter, + monospace; + } +/* same as the second selector above, but expressed differently for Opera */ +.productions > table td:first-child + td + td { + font-family: "lucida typewriter", + lucidatypewriter, + monospace; + vertical-align: baseline; + } +.productions > table td:first-child + td { + padding-left: 1em; + padding-right: 1em; + } +.productions > table tr { vertical-align: baseline; } .email { font-family: avantgarde, sans-serif; } .mailheader { font-family: avantgarde, sans-serif; } From fdrake at users.sourceforge.net Wed Nov 10 18:56:36 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 18:56:40 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.157,1.158 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17058/perl Modified Files: python.perl Log Message: more HTML styling detail changes Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.157 retrieving revision 1.158 diff -u -d -r1.157 -r1.158 --- python.perl 10 Nov 2004 17:02:43 -0000 1.157 +++ python.perl 10 Nov 2004 17:56:29 -0000 1.158 @@ -106,7 +106,7 @@ # words typeset in a special way (not in HTML though) sub do_cmd_ABC{ 'ABC' . $_[0]; } -sub do_cmd_UNIX{ 'Unix' +sub do_cmd_UNIX{ 'Unix' . $_[0]; } sub do_cmd_ASCII{ 'ASCII' . $_[0]; } sub do_cmd_POSIX{ 'POSIX' . $_[0]; } @@ -239,7 +239,7 @@ sub do_cmd_dfn{ return use_wrappers($_[0], '', ''); } sub do_cmd_emph{ - return use_wrappers($_[0], '', ''); } + return use_wrappers($_[0], '', ''); } sub do_cmd_file{ return use_wrappers($_[0], '', ''); } sub do_cmd_filenq{ @@ -249,7 +249,7 @@ sub do_cmd_kbd{ return use_wrappers($_[0], '', ''); } sub do_cmd_strong{ - return use_wrappers($_[0], '', ''); } + return use_wrappers($_[0], '', ''); } sub do_cmd_textbf{ return use_wrappers($_[0], '', ''); } sub do_cmd_textit{ From fdrake at users.sourceforge.net Wed Nov 10 18:57:19 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 18:57:22 2004 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.41,1.42 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17058/html Modified Files: style.css Log Message: more HTML styling detail changes Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- style.css 10 Nov 2004 17:02:42 -0000 1.41 +++ style.css 10 Nov 2004 17:56:28 -0000 1.42 @@ -50,6 +50,14 @@ h2 { font-size: 150%; } h3, h4 { font-size: 120%; } +/* These are section titles used in navigation links, so make sure we + * match the section header font here, even it not the weight. + */ +.sectref { font-family: avantgarde, sans-serif; } +/* And the label before the titles in navigation: */ +.navlabel { font-size: 85%; } + + /* LaTeX2HTML insists on inserting
elements into headers which * are marked with \label. This little bit of CSS magic ensures that * these elements don't cause spurious whitespace to be added. @@ -63,6 +71,8 @@ font-style: italic; font-weight: normal; } +.Unix { font-variant: small-caps; } + .typelabel { font-family: lucida, sans-serif; } .navigation td { background-color: #99ccff; @@ -89,7 +99,9 @@ div.note .label { margin-right: 0.5em; font-family: sans-serif; } -.release-info { font-style: italic; } +address { font-size: 80%; } +.release-info { font-style: italic; + font-size: 80%; } .titlegraphic { vertical-align: top; } From fdrake at users.sourceforge.net Wed Nov 10 20:22:19 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 20:22:23 2004 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.42,1.43 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4160/html Modified Files: style.css Log Message: - hack for MSIE5 to make (real) tables center - remove last
element (long deprecated in HTML) Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- style.css 10 Nov 2004 17:56:28 -0000 1.42 +++ style.css 10 Nov 2004 19:22:05 -0000 1.43 @@ -196,9 +196,9 @@ border-left-width: 0px; vertical-align: baseline; } -.realtable .center { text-align: center; } -.realtable .left { text-align: left; } -.realtable .right { text-align: right; } +.center { text-align: center; } +.left { text-align: left; } +.right { text-align: right; } .refcount-info { font-style: italic; } .refcount-info .value { font-weight: bold; From fdrake at users.sourceforge.net Wed Nov 10 20:22:40 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 10 20:22:43 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.158,1.159 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4160/perl Modified Files: python.perl Log Message: - hack for MSIE5 to make (real) tables center - remove last
element (long deprecated in HTML) Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.158 retrieving revision 1.159 diff -u -d -r1.158 -r1.159 --- python.perl 10 Nov 2004 17:56:29 -0000 1.158 +++ python.perl 10 Nov 2004 19:22:02 -0000 1.159 @@ -1416,7 +1416,7 @@ my $a1 = $col_aligns[0]; my $a2 = $col_aligns[1]; s/\\lineii' + return '
' . "\n " . "\n " . "\n $th1$h1" @@ -1426,7 +1426,7 @@ . "\n " . $_ . "\n " - . "\n
"; + . "\n
"; } sub do_env_longtableii{ @@ -1460,7 +1460,7 @@ my $a2 = $col_aligns[1]; my $a3 = $col_aligns[2]; s/\\lineiii' + return '
' . "\n " . "\n " . "\n $th1$h1" @@ -1471,7 +1471,7 @@ . "\n " . $_ . "\n " - . "\n
"; + . "\n
"; } sub do_env_longtableiii{ @@ -1509,7 +1509,7 @@ my $a3 = $col_aligns[2]; my $a4 = $col_aligns[3]; s/\\lineiv' + return '
' . "\n " . "\n " . "\n $th1$h1" @@ -1521,7 +1521,7 @@ . "\n " . $_ . "\n " - . "\n
"; + . "\n
"; } sub do_env_longtableiv{ @@ -1563,7 +1563,7 @@ my $a4 = $col_aligns[3]; my $a5 = $col_aligns[4]; s/\\linev' + return '
' . "\n " . "\n " . "\n $th1$h1" @@ -1576,7 +1576,7 @@ . "\n " . $_ . "\n " - . "\n
"; + . "\n
"; } sub do_env_longtablev{ @@ -1720,9 +1720,9 @@ } } else { - $the_title .= ("\n
" + $the_title .= ("\n
" . make_my_titlepage() - . "\n
"); + . "\n"); } $the_title .= "\n"; return $the_title . $_; From loewis at users.sourceforge.net Wed Nov 10 23:23:18 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Wed Nov 10 23:23:21 2004 Subject: [Python-checkins] python/dist/src/Lib/distutils __init__.py, 1.25, 1.26 archive_util.py, 1.16, 1.17 bcppcompiler.py, 1.17, 1.18 ccompiler.py, 1.60, 1.61 cmd.py, 1.38, 1.39 core.py, 1.63, 1.64 cygwinccompiler.py, 1.28, 1.29 debug.py, 1.3, 1.4 dep_util.py, 1.6, 1.7 dir_util.py, 1.14, 1.15 dist.py, 1.71, 1.72 errors.py, 1.12, 1.13 fancy_getopt.py, 1.29, 1.30 file_util.py, 1.16, 1.17 filelist.py, 1.17, 1.18 log.py, 1.6, 1.7 msvccompiler.py, 1.61, 1.62 mwerkscompiler.py, 1.12, 1.13 spawn.py, 1.18, 1.19 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15410 Modified Files: __init__.py archive_util.py bcppcompiler.py ccompiler.py cmd.py core.py cygwinccompiler.py debug.py dep_util.py dir_util.py dist.py errors.py fancy_getopt.py file_util.py filelist.py log.py msvccompiler.py mwerkscompiler.py spawn.py Log Message: Update compatibility comments to 2.1, corresponding to PEP 291 1.13. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/__init__.py,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- __init__.py 23 Jul 2004 19:47:32 -0000 1.25 +++ __init__.py 10 Nov 2004 22:23:13 -0000 1.26 @@ -8,7 +8,7 @@ setup (...) """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: archive_util.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/archive_util.py,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- archive_util.py 18 Jul 2004 06:14:41 -0000 1.16 +++ archive_util.py 10 Nov 2004 22:23:13 -0000 1.17 @@ -3,7 +3,7 @@ Utility functions for creating archive files (tarballs, zip files, that sort of thing).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: bcppcompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/bcppcompiler.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- bcppcompiler.py 18 Jul 2004 06:14:42 -0000 1.17 +++ bcppcompiler.py 10 Nov 2004 22:23:13 -0000 1.18 @@ -11,7 +11,7 @@ # someone should sit down and factor out the common code as # WindowsCCompiler! --GPW -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: ccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ccompiler.py,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- ccompiler.py 29 Aug 2004 16:40:55 -0000 1.60 +++ ccompiler.py 10 Nov 2004 22:23:13 -0000 1.61 @@ -3,7 +3,7 @@ Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: cmd.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/cmd.py,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- cmd.py 18 Jul 2004 06:14:42 -0000 1.38 +++ cmd.py 10 Nov 2004 22:23:14 -0000 1.39 @@ -4,7 +4,7 @@ in the distutils.command package. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: core.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/core.py,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- core.py 14 Oct 2004 10:02:07 -0000 1.63 +++ core.py 10 Nov 2004 22:23:14 -0000 1.64 @@ -6,7 +6,7 @@ really defined in distutils.dist and distutils.cmd. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: cygwinccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/cygwinccompiler.py,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- cygwinccompiler.py 4 Aug 2004 02:36:18 -0000 1.28 +++ cygwinccompiler.py 10 Nov 2004 22:23:14 -0000 1.29 @@ -45,7 +45,7 @@ # * mingw gcc 3.2/ld 2.13 works # (ld supports -shared) -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: debug.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/debug.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- debug.py 18 Jul 2004 06:14:42 -0000 1.3 +++ debug.py 10 Nov 2004 22:23:14 -0000 1.4 @@ -1,6 +1,6 @@ import os -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: dep_util.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/dep_util.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- dep_util.py 19 Nov 2002 13:12:27 -0000 1.6 +++ dep_util.py 10 Nov 2004 22:23:14 -0000 1.7 @@ -4,7 +4,7 @@ and groups of files; also, function based entirely on such timestamp dependency analysis.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: dir_util.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/dir_util.py,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- dir_util.py 18 Jul 2004 06:14:42 -0000 1.14 +++ dir_util.py 10 Nov 2004 22:23:14 -0000 1.15 @@ -2,7 +2,7 @@ Utility functions for manipulating directories and directory trees.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: dist.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/dist.py,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- dist.py 13 Oct 2004 13:22:34 -0000 1.71 +++ dist.py 10 Nov 2004 22:23:14 -0000 1.72 @@ -4,7 +4,7 @@ being built/installed/distributed. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: errors.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/errors.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- errors.py 19 Nov 2002 13:12:27 -0000 1.12 +++ errors.py 10 Nov 2004 22:23:14 -0000 1.13 @@ -8,7 +8,7 @@ This module is safe to use in "from ... import *" mode; it only exports symbols whose names start with "Distutils" and end with "Error".""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: fancy_getopt.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/fancy_getopt.py,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- fancy_getopt.py 2 Aug 2004 17:58:51 -0000 1.29 +++ fancy_getopt.py 10 Nov 2004 22:23:14 -0000 1.30 @@ -8,7 +8,7 @@ * options set attributes of a passed-in object """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: file_util.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/file_util.py,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- file_util.py 18 Jul 2004 06:14:42 -0000 1.16 +++ file_util.py 10 Nov 2004 22:23:14 -0000 1.17 @@ -3,7 +3,7 @@ Utility functions for operating on single files. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: filelist.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/filelist.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- filelist.py 18 Jul 2004 06:14:42 -0000 1.17 +++ filelist.py 10 Nov 2004 22:23:14 -0000 1.18 @@ -4,7 +4,7 @@ and building lists of files. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: log.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/log.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- log.py 3 Aug 2004 18:53:07 -0000 1.6 +++ log.py 10 Nov 2004 22:23:14 -0000 1.7 @@ -1,6 +1,6 @@ """A simple log mechanism styled after PEP 282.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. Index: msvccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/msvccompiler.py,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- msvccompiler.py 10 Nov 2004 09:01:41 -0000 1.61 +++ msvccompiler.py 10 Nov 2004 22:23:14 -0000 1.62 @@ -8,7 +8,7 @@ # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: mwerkscompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/mwerkscompiler.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- mwerkscompiler.py 19 Nov 2002 13:12:27 -0000 1.12 +++ mwerkscompiler.py 10 Nov 2004 22:23:14 -0000 1.13 @@ -4,7 +4,7 @@ for MetroWerks CodeWarrior on the Macintosh. Needs work to support CW on Windows.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: spawn.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/spawn.py,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- spawn.py 18 Jul 2004 06:14:42 -0000 1.18 +++ spawn.py 10 Nov 2004 22:23:14 -0000 1.19 @@ -6,7 +6,7 @@ executable name. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" From loewis at users.sourceforge.net Wed Nov 10 23:23:19 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Wed Nov 10 23:23:21 2004 Subject: [Python-checkins] python/dist/src/Lib/distutils/command __init__.py, 1.20, 1.21 bdist.py, 1.29, 1.30 bdist_dumb.py, 1.24, 1.25 bdist_rpm.py, 1.45, 1.46 bdist_wininst.py, 1.55, 1.56 build.py, 1.35, 1.36 build_clib.py, 1.27, 1.28 build_ext.py, 1.97, 1.98 build_py.py, 1.45, 1.46 build_scripts.py, 1.24, 1.25 clean.py, 1.15, 1.16 config.py, 1.17, 1.18 install.py, 1.71, 1.72 install_data.py, 1.21, 1.22 install_headers.py, 1.10, 1.11 install_lib.py, 1.43, 1.44 install_scripts.py, 1.15, 1.16 sdist.py, 1.58, 1.59 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15410/command Modified Files: __init__.py bdist.py bdist_dumb.py bdist_rpm.py bdist_wininst.py build.py build_clib.py build_ext.py build_py.py build_scripts.py clean.py config.py install.py install_data.py install_headers.py install_lib.py install_scripts.py sdist.py Log Message: Update compatibility comments to 2.1, corresponding to PEP 291 1.13. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/__init__.py,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- __init__.py 13 Oct 2004 12:35:28 -0000 1.20 +++ __init__.py 10 Nov 2004 22:23:14 -0000 1.21 @@ -3,7 +3,7 @@ Package containing implementation of all the standard Distutils commands.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: bdist.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist.py,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- bdist.py 18 Jul 2004 06:14:42 -0000 1.29 +++ bdist.py 10 Nov 2004 22:23:14 -0000 1.30 @@ -3,7 +3,7 @@ Implements the Distutils 'bdist' command (create a built [binary] distribution).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: bdist_dumb.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist_dumb.py,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- bdist_dumb.py 18 Jul 2004 06:14:42 -0000 1.24 +++ bdist_dumb.py 10 Nov 2004 22:23:14 -0000 1.25 @@ -4,7 +4,7 @@ distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: bdist_rpm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist_rpm.py,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- bdist_rpm.py 17 Sep 2004 08:34:12 -0000 1.45 +++ bdist_rpm.py 10 Nov 2004 22:23:14 -0000 1.46 @@ -3,7 +3,7 @@ Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: bdist_wininst.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist_wininst.py,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- bdist_wininst.py 27 Oct 2004 21:54:33 -0000 1.55 +++ bdist_wininst.py 10 Nov 2004 22:23:14 -0000 1.56 @@ -3,7 +3,7 @@ Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: build.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build.py,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- build.py 25 Aug 2004 11:37:43 -0000 1.35 +++ build.py 10 Nov 2004 22:23:15 -0000 1.36 @@ -2,7 +2,7 @@ Implements the Distutils 'build' command.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: build_clib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_clib.py,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- build_clib.py 19 Nov 2002 13:12:28 -0000 1.27 +++ build_clib.py 10 Nov 2004 22:23:15 -0000 1.28 @@ -4,7 +4,7 @@ that is included in the module distribution and needed by an extension module.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: build_ext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_ext.py,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- build_ext.py 14 Oct 2004 10:02:08 -0000 1.97 +++ build_ext.py 10 Nov 2004 22:23:15 -0000 1.98 @@ -4,7 +4,7 @@ modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: build_py.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_py.py,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- build_py.py 18 Jun 2004 20:39:11 -0000 1.45 +++ build_py.py 10 Nov 2004 22:23:15 -0000 1.46 @@ -2,7 +2,7 @@ Implements the Distutils 'build_py' command.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: build_scripts.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_scripts.py,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- build_scripts.py 25 Aug 2004 11:37:43 -0000 1.24 +++ build_scripts.py 10 Nov 2004 22:23:15 -0000 1.25 @@ -2,7 +2,7 @@ Implements the Distutils 'build_scripts' command.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: clean.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/clean.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- clean.py 19 Nov 2002 13:12:28 -0000 1.15 +++ clean.py 10 Nov 2004 22:23:15 -0000 1.16 @@ -4,7 +4,7 @@ # contributed by Bastian Kleineidam , added 2000-03-18 -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: config.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/config.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- config.py 18 Feb 2003 01:28:51 -0000 1.17 +++ config.py 10 Nov 2004 22:23:15 -0000 1.18 @@ -9,7 +9,7 @@ this header file lives". """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: install.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install.py,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- install.py 13 Oct 2004 12:35:28 -0000 1.71 +++ install.py 10 Nov 2004 22:23:15 -0000 1.72 @@ -4,7 +4,7 @@ from distutils import log -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: install_data.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_data.py,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- install_data.py 26 Nov 2002 21:28:23 -0000 1.21 +++ install_data.py 10 Nov 2004 22:23:15 -0000 1.22 @@ -5,7 +5,7 @@ # contributed by Bastian Kleineidam -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: install_headers.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_headers.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- install_headers.py 19 Nov 2002 13:12:28 -0000 1.10 +++ install_headers.py 10 Nov 2004 22:23:15 -0000 1.11 @@ -3,7 +3,7 @@ Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: install_lib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_lib.py,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- install_lib.py 28 Jul 2004 14:55:10 -0000 1.43 +++ install_lib.py 10 Nov 2004 22:23:15 -0000 1.44 @@ -1,4 +1,4 @@ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: install_scripts.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_scripts.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- install_scripts.py 29 Nov 2002 19:45:58 -0000 1.15 +++ install_scripts.py 10 Nov 2004 22:23:15 -0000 1.16 @@ -5,7 +5,7 @@ # contributed by Bastian Kleineidam -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" Index: sdist.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/sdist.py,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- sdist.py 31 May 2004 19:27:59 -0000 1.58 +++ sdist.py 10 Nov 2004 22:23:15 -0000 1.59 @@ -2,7 +2,7 @@ Implements the Distutils 'sdist' command (create a source distribution).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" From fdrake at users.sourceforge.net Thu Nov 11 05:39:59 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 11 05:40:03 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libsys.tex,1.75,1.76 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29116 Modified Files: libsys.tex Log Message: - remove use of a "list" environment (replace with a table) - fix minor markup nits Index: libsys.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsys.tex,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- libsys.tex 11 Sep 2004 16:50:05 -0000 1.75 +++ libsys.tex 11 Nov 2004 04:39:56 -0000 1.76 @@ -269,19 +269,16 @@ a string while all other values are integers. \var{platform} may be one of the following values: - \begin{list}{}{\leftmargin 0.7in \labelwidth 0.65in} - \item[0 (\constant{VER_PLATFORM_WIN32s})] - Win32s on Windows 3.1. - \item[1 (\constant{VER_PLATFORM_WIN32_WINDOWS})] - Windows 95/98/ME - \item[2 (\constant{VER_PLATFORM_WIN32_NT})] - Windows NT/2000/XP - \item[3 (\constant{VER_PLATFORM_WIN32_CE})] - Windows CE. - \end{list} - - This function wraps the Win32 \function{GetVersionEx()} function; - see the Microsoft Documentation for more information about these + + \begin{tableii}{l|l}{constant}{Constant}{Platform} + \lineii{VER_PLATFORM_WIN32s} {Win32s on Windows 3.1} + \lineii{VER_PLATFORM_WIN32_WINDOWS}{Windows 95/98/ME} + \lineii{VER_PLATFORM_WIN32_NT} {Windows NT/2000/XP} + \lineii{VER_PLATFORM_WIN32_CE} {Windows CE} + \end{tableii} + + This function wraps the Win32 \cfunction{GetVersionEx()} function; + see the Microsoft documentation for more information about these fields. Availability: Windows. @@ -319,7 +316,7 @@ interactive user to import a debugger module and engage in post-mortem debugging without having to re-execute the command that caused the error. (Typical use is \samp{import pdb; pdb.pm()} to - enter the post-mortem debugger; see chapter \ref{debugger}, ``The + enter the post-mortem debugger; see chapter~\ref{debugger}, ``The Python Debugger,'' for more information.) The meaning of the variables is the same as that of the return @@ -445,7 +442,7 @@ \begin{funcdesc}{setprofile}{profilefunc} Set the system's profile function,\index{profile function} which allows you to implement a Python source code profiler in - Python.\index{profiler} See chapter \ref{profile} for more + Python.\index{profiler} See chapter~\ref{profile} for more information on the Python profiler. The system's profile function is called similarly to the system's trace function (see \function{settrace()}), but it isn't called for each executed line From fdrake at users.sourceforge.net Thu Nov 11 05:41:27 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 11 05:41:30 2004 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.43,1.44 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29483 Modified Files: style.css Log Message: remove unhelpful property setting that overrides the right setting for text-align in .realtable cells; fix suggested by Richard Brodie Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- style.css 10 Nov 2004 19:22:05 -0000 1.43 +++ style.css 11 Nov 2004 04:41:24 -0000 1.44 @@ -189,7 +189,6 @@ border-width: 0px 0px 1px 1px; padding-left: 0.4em; padding-right: 0.4em; - text-align: inherit; } .realtable td:first-child, .realtable th:first-child { From fdrake at users.sourceforge.net Thu Nov 11 06:04:59 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 11 06:05:02 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libre.tex,1.111,1.112 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1765 Modified Files: libre.tex Log Message: Replace last two uses of the "list" environment with "description" environments. Closes SF bug #692442: Konqueror can't render docs because of malformed HTML. While the generated HTML is still terrible, the cited cases of
have been removed. The general problem of XHTML conformance has not been solved, but is endemic to LaTeX2HTML output. Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 --- libre.tex 28 Sep 2004 03:12:01 -0000 1.111 +++ libre.tex 11 Nov 2004 05:04:55 -0000 1.112 @@ -78,8 +78,8 @@ affect how the regular expressions around them are interpreted. The special characters are: - -\begin{list}{}{\leftmargin 0.7in \labelwidth 0.65in} +% +\begin{description} \item[\character{.}] (Dot.) In the default mode, this matches any character except a newline. If the \constant{DOTALL} flag has been @@ -306,14 +306,14 @@ \code{'user@host.com'}, but not with \code{' Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8340 Modified Files: python.perl Log Message: add a comment explaining a particular text transformation Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.159 retrieving revision 1.160 diff -u -d -r1.159 -r1.160 --- python.perl 10 Nov 2004 19:22:02 -0000 1.159 +++ python.perl 11 Nov 2004 05:42:13 -0000 1.160 @@ -158,6 +158,9 @@ sub codetext($){ my $text = "$_[0]"; + # Make sure that "---" is not converted to "--" later when + # LaTeX2HTML tries converting em-dashes based on the conventional + # TeX font ligatures: $text =~ s/--/-\-/go; return $text; } From fdrake at users.sourceforge.net Thu Nov 11 07:14:07 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 11 07:14:12 2004 Subject: [Python-checkins] python/dist/src/Doc/ref ref5.tex, 1.85, 1.86 ref6.tex, 1.72, 1.73 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13793/ref Modified Files: ref5.tex ref6.tex Log Message: Fix SF bug #1061770: Manual typesets bit-shift operators as guillemet Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- ref5.tex 2 Nov 2004 18:57:33 -0000 1.85 +++ ref5.tex 11 Nov 2004 06:14:05 -0000 1.86 @@ -802,9 +802,10 @@ operations: \begin{productionlist} + % The empty groups below prevent conversion to guillemets. \production{shift_expr} {\token{a_expr} - | \token{shift_expr} ( "<<" | ">>" ) \token{a_expr}} + | \token{shift_expr} ( "<{}<" | ">{}>" ) \token{a_expr}} \end{productionlist} These operators accept plain or long integers as arguments. The Index: ref6.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- ref6.tex 31 Aug 2004 10:06:59 -0000 1.72 +++ ref6.tex 11 Nov 2004 06:14:05 -0000 1.73 @@ -275,7 +275,8 @@ {\token{target} \token{augop} \token{expression_list}} \production{augop} {"+=" | "-=" | "*=" | "/=" | "\%=" | "**="} - \productioncont{| ">>=" | "<<=" | "\&=" | "\textasciicircum=" | "|="} + % The empty groups below prevent conversion to guillemets. + \productioncont{| ">{}>=" | "<{}<=" | "\&=" | "\textasciicircum=" | "|="} \end{productionlist} (See section~\ref{primaries} for the syntax definitions for the last From fdrake at users.sourceforge.net Thu Nov 11 07:14:07 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 11 07:14:13 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libstdtypes.tex, 1.168, 1.169 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13793/lib Modified Files: libstdtypes.tex Log Message: Fix SF bug #1061770: Manual typesets bit-shift operators as guillemet Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.168 retrieving revision 1.169 diff -u -d -r1.168 -r1.169 --- libstdtypes.tex 4 Nov 2004 11:29:09 -0000 1.168 +++ libstdtypes.tex 11 Nov 2004 06:14:05 -0000 1.169 @@ -318,8 +318,9 @@ \lineiii{\var{x} | \var{y}}{bitwise \dfn{or} of \var{x} and \var{y}}{} \lineiii{\var{x} \^{} \var{y}}{bitwise \dfn{exclusive or} of \var{x} and \var{y}}{} \lineiii{\var{x} \&{} \var{y}}{bitwise \dfn{and} of \var{x} and \var{y}}{} - \lineiii{\var{x} << \var{n}}{\var{x} shifted left by \var{n} bits}{(1), (2)} - \lineiii{\var{x} >> \var{n}}{\var{x} shifted right by \var{n} bits}{(1), (3)} + % The empty groups below prevent conversion to guillemets. + \lineiii{\var{x} <{}< \var{n}}{\var{x} shifted left by \var{n} bits}{(1), (2)} + \lineiii{\var{x} >{}> \var{n}}{\var{x} shifted right by \var{n} bits}{(1), (3)} \hline \lineiii{\~\var{x}}{the bits of \var{x} inverted}{} \end{tableiii} From fdrake at users.sourceforge.net Thu Nov 11 07:14:08 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 11 07:14:13 2004 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew20.tex, 1.51, 1.52 whatsnew23.tex, 1.165, 1.166 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13793/whatsnew Modified Files: whatsnew20.tex whatsnew23.tex Log Message: Fix SF bug #1061770: Manual typesets bit-shift operators as guillemet Index: whatsnew20.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew20.tex,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- whatsnew20.tex 2 Jan 2004 06:57:49 -0000 1.51 +++ whatsnew20.tex 11 Nov 2004 06:14:05 -0000 1.52 @@ -397,9 +397,10 @@ statement \code{a += 2} increments the value of the variable \code{a} by 2, equivalent to the slightly lengthier \code{a = a + 2}. +% The empty groups below prevent conversion to guillemets. The full list of supported assignment operators is \code{+=}, \code{-=}, \code{*=}, \code{/=}, \code{\%=}, \code{**=}, \code{\&=}, -\code{|=}, \verb|^=|, \code{>>=}, and \code{<<=}. Python classes can +\code{|=}, \verb|^=|, \code{>{}>=}, and \code{<{}<=}. Python classes can override the augmented assignment operators by defining methods named \method{__iadd__}, \method{__isub__}, etc. For example, the following \class{Number} class stores a number and supports using += to create a Index: whatsnew23.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew23.tex,v retrieving revision 1.165 retrieving revision 1.166 diff -u -d -r1.165 -r1.166 --- whatsnew23.tex 2 Jan 2004 06:57:50 -0000 1.165 +++ whatsnew23.tex 11 Nov 2004 06:14:05 -0000 1.166 @@ -2325,13 +2325,15 @@ they're stored as 32-bit numbers and result in a negative value, but in Python 2.4 they'll become positive long integers. +% The empty groups below prevent conversion to guillemets. There are a few ways to fix this warning. If you really need a positive number, just add an \samp{L} to the end of the literal. If you're trying to get a 32-bit integer with low bits set and have -previously used an expression such as \code{~(1 << 31)}, it's probably +previously used an expression such as \code{\textasciitilde(1 <{}< 31)}, +it's probably clearest to start with all bits set and clear the desired upper bits. For example, to clear just the top bit (bit 31), you could write -\code{0xffffffffL {\&}{\textasciitilde}(1L<<31)}. +\code{0xffffffffL {\&}{\textasciitilde}(1L<{}<31)}. \item You can no longer disable assertions by assigning to \code{__debug__}. From fdrake at users.sourceforge.net Thu Nov 11 07:16:44 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 11 07:16:48 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libstdtypes.tex, 1.129.8.11, 1.129.8.12 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14282/lib Modified Files: Tag: release23-maint libstdtypes.tex Log Message: Fix SF bug #1061770: Manual typesets bit-shift operators as guillemet Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.129.8.11 retrieving revision 1.129.8.12 diff -u -d -r1.129.8.11 -r1.129.8.12 --- libstdtypes.tex 6 Sep 2004 15:54:43 -0000 1.129.8.11 +++ libstdtypes.tex 11 Nov 2004 06:16:42 -0000 1.129.8.12 @@ -316,8 +316,9 @@ \lineiii{\var{x} | \var{y}}{bitwise \dfn{or} of \var{x} and \var{y}}{} \lineiii{\var{x} \^{} \var{y}}{bitwise \dfn{exclusive or} of \var{x} and \var{y}}{} \lineiii{\var{x} \&{} \var{y}}{bitwise \dfn{and} of \var{x} and \var{y}}{} - \lineiii{\var{x} << \var{n}}{\var{x} shifted left by \var{n} bits}{(1), (2)} - \lineiii{\var{x} >> \var{n}}{\var{x} shifted right by \var{n} bits}{(1), (3)} + % The empty groups below prevent conversion to guillemets. + \lineiii{\var{x} <{}< \var{n}}{\var{x} shifted left by \var{n} bits}{(1), (2)} + \lineiii{\var{x} >{}> \var{n}}{\var{x} shifted right by \var{n} bits}{(1), (3)} \hline \lineiii{\~\var{x}}{the bits of \var{x} inverted}{} \end{tableiii} From fdrake at users.sourceforge.net Thu Nov 11 07:16:45 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 11 07:16:48 2004 Subject: [Python-checkins] python/dist/src/Doc/ref ref5.tex, 1.76.10.4, 1.76.10.5 ref6.tex, 1.68.8.2, 1.68.8.3 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14282/ref Modified Files: Tag: release23-maint ref5.tex ref6.tex Log Message: Fix SF bug #1061770: Manual typesets bit-shift operators as guillemet Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.76.10.4 retrieving revision 1.76.10.5 diff -u -d -r1.76.10.4 -r1.76.10.5 --- ref5.tex 2 Nov 2004 18:59:18 -0000 1.76.10.4 +++ ref5.tex 11 Nov 2004 06:16:42 -0000 1.76.10.5 @@ -753,9 +753,10 @@ operations: \begin{productionlist} + % The empty groups below prevent conversion to guillemets. \production{shift_expr} {\token{a_expr} - | \token{shift_expr} ( "<<" | ">>" ) \token{a_expr}} + | \token{shift_expr} ( "<{}<" | ">{}>" ) \token{a_expr}} \end{productionlist} These operators accept plain or long integers as arguments. The Index: ref6.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v retrieving revision 1.68.8.2 retrieving revision 1.68.8.3 diff -u -d -r1.68.8.2 -r1.68.8.3 --- ref6.tex 1 Jan 2004 05:46:30 -0000 1.68.8.2 +++ ref6.tex 11 Nov 2004 06:16:42 -0000 1.68.8.3 @@ -275,7 +275,8 @@ {\token{target} \token{augop} \token{expression_list}} \production{augop} {"+=" | "-=" | "*=" | "/=" | "\%=" | "**="} - \productioncont{| ">>=" | "<<=" | "\&=" | "\textasciicircum=" | "|="} + % The empty groups below prevent conversion to guillemets. + \productioncont{| ">{}>=" | "<{}<=" | "\&=" | "\textasciicircum=" | "|="} \end{productionlist} (See section~\ref{primaries} for the syntax definitions for the last From fdrake at users.sourceforge.net Thu Nov 11 07:16:45 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 11 07:16:49 2004 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew20.tex, 1.48.8.1, 1.48.8.2 whatsnew23.tex, 1.159.4.3, 1.159.4.4 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14282/whatsnew Modified Files: Tag: release23-maint whatsnew20.tex whatsnew23.tex Log Message: Fix SF bug #1061770: Manual typesets bit-shift operators as guillemet Index: whatsnew20.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew20.tex,v retrieving revision 1.48.8.1 retrieving revision 1.48.8.2 diff -u -d -r1.48.8.1 -r1.48.8.2 --- whatsnew20.tex 20 Oct 2003 14:34:45 -0000 1.48.8.1 +++ whatsnew20.tex 11 Nov 2004 06:16:42 -0000 1.48.8.2 @@ -394,9 +394,10 @@ statement \code{a += 2} increments the value of the variable \code{a} by 2, equivalent to the slightly lengthier \code{a = a + 2}. +% The empty groups below prevent conversion to guillemets. The full list of supported assignment operators is \code{+=}, \code{-=}, \code{*=}, \code{/=}, \code{\%=}, \code{**=}, \code{\&=}, -\code{|=}, \verb|^=|, \code{>>=}, and \code{<<=}. Python classes can +\code{|=}, \verb|^=|, \code{>{}>=}, and \code{<{}<=}. Python classes can override the augmented assignment operators by defining methods named \method{__iadd__}, \method{__isub__}, etc. For example, the following \class{Number} class stores a number and supports using += to create a Index: whatsnew23.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew23.tex,v retrieving revision 1.159.4.3 retrieving revision 1.159.4.4 diff -u -d -r1.159.4.3 -r1.159.4.4 --- whatsnew23.tex 23 Dec 2003 16:47:44 -0000 1.159.4.3 +++ whatsnew23.tex 11 Nov 2004 06:16:42 -0000 1.159.4.4 @@ -2344,13 +2344,15 @@ they're stored as 32-bit numbers and result in a negative value, but in Python 2.4 they'll become positive long integers. +% The empty groups below prevent conversion to guillemets. There are a few ways to fix this warning. If you really need a positive number, just add an \samp{L} to the end of the literal. If you're trying to get a 32-bit integer with low bits set and have -previously used an expression such as \code{~(1 << 31)}, it's probably +previously used an expression such as \code{\textasciitilde(1 <{}< 31)}, +it's probably clearest to start with all bits set and clear the desired upper bits. For example, to clear just the top bit (bit 31), you could write -\code{0xffffffffL {\&}{\textasciitilde}(1L<<31)}. +\code{0xffffffffL {\&}{\textasciitilde}(1L<{}<31)}. \item You can no longer disable assertions by assigning to \code{__debug__}. From fdrake at users.sourceforge.net Thu Nov 11 09:05:41 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Nov 11 09:05:44 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.160,1.161 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2106 Modified Files: python.perl Log Message: remove some generated cruft now that we avoid the removal of elements with no content (due to the text_cleanup() override in l2hinit.perl) Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.160 retrieving revision 1.161 diff -u -d -r1.160 -r1.161 --- python.perl 11 Nov 2004 05:42:13 -0000 1.160 +++ python.perl 11 Nov 2004 08:05:34 -0000 1.161 @@ -743,16 +743,15 @@ sub do_cmd_nodename{ return do_cmd_label($_[0]); } sub init_myformat(){ - # These markers must be non-empty or the main latex2html script - # may remove a surrounding element that has not other content as - # "extraneous"; this ensures these elements (usually hyperlink - # targets) are not removed improperly. We use comments since - # there's no meaningful actual content. + # This depends on the override of text_cleanup() in l2hinit.perl; + # if that function cleans out empty tags, the first three of these + # variables must be set to comments. + # # Thanks to Dave Kuhlman for figuring why some named anchors were # being lost. - $anchor_invisible_mark = ''; - $anchor_invisible_mark2 = ''; - $anchor_mark = ''; + $anchor_invisible_mark = ''; + $anchor_invisible_mark2 = ''; + $anchor_mark = ''; $icons{'anchor_mark'} = ''; } init_myformat(); From vsajip at users.sourceforge.net Thu Nov 11 14:54:51 2004 From: vsajip at users.sourceforge.net (vsajip@users.sourceforge.net) Date: Thu Nov 11 14:54:55 2004 Subject: [Python-checkins] python/dist/src/Doc/lib liblogging.tex,1.32,1.33 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12857 Modified Files: liblogging.tex Log Message: Minor grammatical errors fixed Index: liblogging.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblogging.tex,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- liblogging.tex 7 Nov 2004 16:11:35 -0000 1.32 +++ liblogging.tex 11 Nov 2004 13:54:48 -0000 1.33 @@ -79,7 +79,8 @@ \item \class{BaseRotatingHandler} is tha base class for handlers that rotate log files at a certain point. It is not meant to be instantiated -directly. Instead, use RotatingFileHandler or TimedRotatingFileHandler. +directly. Instead, use \class{RotatingFileHandler} or +\class{TimedRotatingFileHandler}. \item \class{RotatingFileHandler} instances send error messages to disk files, with support for maximum log file sizes and log file rotation. @@ -703,8 +704,7 @@ def main(): logging.basicConfig( - format="%(relativeCreated)5d %(name)-15s %(levelname)-8s %(message)s", - datefmt="%H:%M:%S") + format="%(relativeCreated)5d %(name)-15s %(levelname)-8s %(message)s") tcpserver = LogRecordSocketReceiver() print "About to start TCP server..." tcpserver.serve_until_stopped() @@ -713,9 +713,8 @@ main() \end{verbatim} -If you first run the server, and then the client. On the client side, nothing -is printed on the client console; on the server side, you should see something -like this: +First run the server, and then the client. On the client side, nothing is +printed on the console; on the server side, you should see something like: \begin{verbatim} About to start TCP server... @@ -910,7 +909,7 @@ Returns a new instance of the \class{TimedRotatingFileHandler} class. The specified file is opened and used as the stream for logging. On rotating it also sets the filename suffix. Rotating happens based on the product -of \var{when} and \var{interval}. +of \var{when} and \var{interval}. You can use the \var{when} to specify the type of \var{interval}. The list of possible values is, note that they are not case sensitive: From gward at users.sourceforge.net Fri Nov 12 02:20:20 2004 From: gward at users.sourceforge.net (gward@users.sourceforge.net) Date: Fri Nov 12 02:20:26 2004 Subject: [Python-checkins] python/dist/src/Doc/lib liboptparse.tex, 1.17, 1.18 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10732 Modified Files: liboptparse.tex Log Message: SF #1063757: fix markup error (had LaTeX markup in the reST source, oops!). Index: liboptparse.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liboptparse.tex,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- liboptparse.tex 1 Oct 2004 01:16:39 -0000 1.17 +++ liboptparse.tex 12 Nov 2004 01:20:17 -0000 1.18 @@ -704,7 +704,7 @@ \subsubsection{Defining options\label{optparse-defining-options}} Each Option instance represents a set of synonymous command-line option -strings, e.g. programopt{\{}f{\}} and longprogramopt{\{}--file{\}}. You can +strings, e.g. \programopt{-f} and \longprogramopt{file}. You can specify any number of short or long option strings, but you must specify at least one overall option string. From facundobatista at users.sourceforge.net Fri Nov 12 03:03:40 2004 From: facundobatista at users.sourceforge.net (facundobatista@users.sourceforge.net) Date: Fri Nov 12 03:03:43 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libdecimal.tex,1.19,1.20 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21079 Modified Files: libdecimal.tex Log Message: SF bug 1060644. Better explanation of min() and max() methods. Thanks Raymond Hettinger and Tim Peters. Index: libdecimal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdecimal.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- libdecimal.tex 28 Sep 2004 03:08:57 -0000 1.19 +++ libdecimal.tex 12 Nov 2004 02:03:36 -0000 1.20 @@ -355,13 +355,17 @@ \end{methoddesc} \begin{methoddesc}{max}{other\optional{, context}} - Like \samp{max(self, other)} but returns \constant{NaN} if either is a - \constant{NaN}. Applies the context rounding rule before returning. + Like \samp{max(self, other)} except that the context rounding rule + is applied before returning and that \constant{NaN} values are + either signalled or ignored (depending on the context and whether + they are signaling or quiet). \end{methoddesc} \begin{methoddesc}{min}{other\optional{, context}} - Like \samp{min(self, other)} but returns \constant{NaN} if either is a - \constant{NaN}. Applies the context rounding rule before returning. + Like \samp{min(self, other)} except that the context rounding rule + is applied before returning and that \constant{NaN} values are + either signalled or ignored (depending on the context and whether + they are signaling or quiet). \end{methoddesc} \begin{methoddesc}{normalize}{\optional{context}} From jvr at users.sourceforge.net Fri Nov 12 09:02:40 2004 From: jvr at users.sourceforge.net (jvr@users.sourceforge.net) Date: Fri Nov 12 09:02:44 2004 Subject: [Python-checkins] python/dist/src/Lib/plat-mac plistlib.py, 1.15, 1.16 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/plat-mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21212 Modified Files: plistlib.py Log Message: reordered a couple of things Index: plistlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/plistlib.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- plistlib.py 26 Oct 2004 10:30:55 -0000 1.15 +++ plistlib.py 12 Nov 2004 08:02:35 -0000 1.16 @@ -61,6 +61,7 @@ import binascii import datetime from cStringIO import StringIO +import re def readPlist(pathOrFile): @@ -176,11 +177,6 @@ self.file.write("\n") -import re -# Regex to strip all control chars, but for \t \n \r and \f -_controlStripper = re.compile(r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0e\x0f" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]") - # Contents should conform to a subset of ISO 8601 # (in particular, YYYY '-' MM '-' DD 'T' HH ':' MM ':' SS 'Z'. Smaller units may be omitted with # a loss of precision) @@ -203,6 +199,11 @@ d.hour, d.minute, d.second ) + +# Regex to strip all control chars, but for \t \n \r and \f +_controlStripper = re.compile(r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0e\x0f" + "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]") + def _escapeAndEncode(text): text = text.replace("\r\n", "\n") # convert DOS line endings text = text.replace("\r", "\n") # convert Mac line endings From jvr at users.sourceforge.net Fri Nov 12 09:14:52 2004 From: jvr at users.sourceforge.net (jvr@users.sourceforge.net) Date: Fri Nov 12 09:14:55 2004 Subject: [Python-checkins] python/dist/src/Lib/plat-mac plistlib.py, 1.16, 1.17 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/plat-mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23449 Modified Files: plistlib.py Log Message: - \f is not a valid XML character - reformatted regex pattern, use r"" consistently Index: plistlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/plistlib.py,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- plistlib.py 12 Nov 2004 08:02:35 -0000 1.16 +++ plistlib.py 12 Nov 2004 08:14:49 -0000 1.17 @@ -200,9 +200,10 @@ ) -# Regex to strip all control chars, but for \t \n \r and \f -_controlStripper = re.compile(r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0e\x0f" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]") +# Regex to strip all control chars, but for \t \n and \r +_controlStripper = re.compile( + r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f" + r"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]") def _escapeAndEncode(text): text = text.replace("\r\n", "\n") # convert DOS line endings From jvr at users.sourceforge.net Fri Nov 12 09:34:35 2004 From: jvr at users.sourceforge.net (jvr@users.sourceforge.net) Date: Fri Nov 12 09:34:37 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_plistlib.py, 1.5, 1.6 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27637 Modified Files: test_plistlib.py Log Message: testing control chars and non-dict root objects Index: test_plistlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_plistlib.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- test_plistlib.py 26 Oct 2004 11:02:08 -0000 1.5 +++ test_plistlib.py 12 Nov 2004 08:34:32 -0000 1.6 @@ -164,6 +164,22 @@ pl2 = plistlib.readPlist(StringIO(f.getvalue())) self.assertEqual(dict(pl), dict(pl2)) + def test_controlcharacters(self): + # chars in the range 0..31 are replaced by '?', except for + # \r, \n and \t since they aren't legal XML characters + testString = "".join([chr(i) for i in range(32)]) + expectedResult = '?????????\t\n??\n??????????????????' + xml = plistlib.writePlistToString(testString) + result = plistlib.readPlistFromString(xml) + self.assertEqual(result, expectedResult) + + def test_nondictroot(self): + test1 = "abc" + test2 = [1, 2, 3, "abc"] + result1 = plistlib.readPlistFromString(plistlib.writePlistToString(test1)) + result2 = plistlib.readPlistFromString(plistlib.writePlistToString(test2)) + self.assertEqual(test1, result1) + self.assertEqual(test2, result2) def test_main(): From jvr at users.sourceforge.net Fri Nov 12 10:36:15 2004 From: jvr at users.sourceforge.net (jvr@users.sourceforge.net) Date: Fri Nov 12 10:36:20 2004 Subject: [Python-checkins] python/dist/src/Lib/plat-mac plistlib.py, 1.17, 1.18 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/plat-mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7266/plat-mac Modified Files: plistlib.py Log Message: On second thought: "Errors should never pass silently", so barf when a string contains control chars that are illegal for XML Index: plistlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/plistlib.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- plistlib.py 12 Nov 2004 08:14:49 -0000 1.17 +++ plistlib.py 12 Nov 2004 09:36:11 -0000 1.18 @@ -200,18 +200,21 @@ ) -# Regex to strip all control chars, but for \t \n and \r -_controlStripper = re.compile( +# Regex to find any control chars, except for \t \n and \r +_controlCharPat = re.compile( r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f" r"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]") def _escapeAndEncode(text): + m = _controlCharPat.search(text) + if m is not None: + raise ValueError("strings can't contains control characters; " + "use plistlib.Data instead") text = text.replace("\r\n", "\n") # convert DOS line endings text = text.replace("\r", "\n") # convert Mac line endings text = text.replace("&", "&") # escape '&' text = text.replace("<", "<") # escape '<' text = text.replace(">", ">") # escape '>' - text = _controlStripper.sub("?", text) # replace control chars with '?' return text.encode("utf-8") # encode as UTF-8 From jvr at users.sourceforge.net Fri Nov 12 10:36:17 2004 From: jvr at users.sourceforge.net (jvr@users.sourceforge.net) Date: Fri Nov 12 10:36:21 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_plistlib.py, 1.6, 1.7 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7266/test Modified Files: test_plistlib.py Log Message: On second thought: "Errors should never pass silently", so barf when a string contains control chars that are illegal for XML Index: test_plistlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_plistlib.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- test_plistlib.py 12 Nov 2004 08:34:32 -0000 1.6 +++ test_plistlib.py 12 Nov 2004 09:36:12 -0000 1.7 @@ -165,13 +165,16 @@ self.assertEqual(dict(pl), dict(pl2)) def test_controlcharacters(self): - # chars in the range 0..31 are replaced by '?', except for - # \r, \n and \t since they aren't legal XML characters - testString = "".join([chr(i) for i in range(32)]) - expectedResult = '?????????\t\n??\n??????????????????' - xml = plistlib.writePlistToString(testString) - result = plistlib.readPlistFromString(xml) - self.assertEqual(result, expectedResult) + for i in range(128): + c = chr(i) + testString = "string containing %s" % c + if i >= 32 or c in "\r\n\t": + # \r, \n and \t are the only legal control chars in XML + plistlib.writePlistToString(testString) + else: + self.assertRaises(ValueError, + plistlib.writePlistToString, + testString) def test_nondictroot(self): test1 = "abc" From astrand at users.sourceforge.net Fri Nov 12 16:51:51 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Fri Nov 12 16:51:54 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_subprocess.py, 1.13, 1.14 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29027 Modified Files: test_subprocess.py Log Message: Use os.chdir/os.getcwd instead of os.path.realpath, to support Tru64 TEMP dirs with {memb} strings. Fixes #1063571. Index: test_subprocess.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_subprocess.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- test_subprocess.py 21 Oct 2004 19:28:34 -0000 1.13 +++ test_subprocess.py 12 Nov 2004 15:51:48 -0000 1.14 @@ -208,7 +208,12 @@ def test_cwd(self): tmpdir = os.getenv("TEMP", "/tmp") - tmpdir = os.path.realpath(tmpdir) + # We cannot use os.path.realpath to canonicalize the path, + # since it doesn't expand Tru64 {memb} strings. See bug 1063571. + cwd = os.getcwd() + os.chdir(tmpdir) + tmpdir = os.getcwd() + os.chdir(cwd) p = subprocess.Popen([sys.executable, "-c", 'import sys,os;' \ 'sys.stdout.write(os.getcwd())'], From tim_one at users.sourceforge.net Fri Nov 12 17:12:19 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri Nov 12 17:12:21 2004 Subject: [Python-checkins] python/dist/src/Lib difflib.py,1.27,1.28 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1129/Lib Modified Files: difflib.py Log Message: SF bug 1054821: difflib HtmlDiff() extra space on inserted 1 character lines Simple correction from the code's author (Dan Gass). Index: difflib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/difflib.py,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- difflib.py 10 Sep 2004 12:58:16 -0000 1.27 +++ difflib.py 12 Nov 2004 16:12:15 -0000 1.28 @@ -1367,8 +1367,8 @@ text = lines.pop(0)[2:] # if line of text is just a newline, insert a space so there is # something for the user to highlight and see. - if len(text) <= 1: - text = ' '+text + if not text: + text = ' ' # insert marks that won't be noticed by an xml/html escaper. text = '\0' + format_key + text + '\1' # Return line of text, first allow user's line formatter to do it's From betamagalhaes34kjd4 at hotmail.com Fri Nov 12 17:56:12 2004 From: betamagalhaes34kjd4 at hotmail.com (Roberta Magalhães) Date: Fri Nov 12 17:56:01 2004 Subject: [Python-checkins] Cadastros de e-mails Message-ID: <20041112165600.103551E4009@bag.python.org> Cadastros de e-mails para mala direta e e-mail marketing. Listas atualizadas e personalizadas. Visite agora: http://www.gueb.de/dvgamail MALA DIRETA, email, E-MAILS PARA MALAS DIRETAS, E-mails por segmenta??o, listas, emails por segmento, Programas gr?tis, Listas, divulga??o por e-mail, spam, softwares gratuitos, mala direta, listas de e-mails, divulga??o de sites e promo??o de home pages, http://www.gueb.de/dvgamail From doerwalter at users.sourceforge.net Fri Nov 12 19:51:41 2004 From: doerwalter at users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Fri Nov 12 19:51:54 2004 Subject: [Python-checkins] python/dist/src/Lib/test regrtest.py,1.163,1.164 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8210/Lib/test Modified Files: regrtest.py Log Message: Add options to regrtest.py to make it possible to specify where to put the coverage files when -T is used. Index: regrtest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v retrieving revision 1.163 retrieving revision 1.164 diff -u -d -r1.163 -r1.164 --- regrtest.py 31 Aug 2004 13:45:22 -0000 1.163 +++ regrtest.py 12 Nov 2004 18:51:27 -0000 1.164 @@ -20,6 +20,8 @@ -h: help -- print this text and exit -t: threshold -- call gc.set_threshold(N) -T: coverage -- turn on code coverage using the trace module +-D: coverdir -- Directory where coverage files are put +-N: nocoverdir -- Put coverage files alongside modules -L: runleaks -- run the leaks(1) command just before exit -R: huntrleaks -- search for reference leaks (needs debug build, v. slow) @@ -31,6 +33,10 @@ -T turns on code coverage tracing with the trace module. +-D specifies the directory where coverage files are put. + +-N Put coverage files alongside modules. + -s means to run only a single test and exit. This is useful when doing memory analysis on the Python interpreter (which tend to consume too many resources to run the full regression test non-stop). The @@ -141,8 +147,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False, exclude=False, single=False, randomize=False, fromfile=None, - findleaks=False, use_resources=None, trace=False, runleaks=False, - huntrleaks=False): + findleaks=False, use_resources=None, trace=False, coverdir='coverage', + runleaks=False, huntrleaks=False): """Execute a test suite. This also parses command-line options and modifies its behavior @@ -160,18 +166,19 @@ files beginning with test_ will be used. The other default arguments (verbose, quiet, generate, exclude, single, - randomize, findleaks, use_resources, and trace) allow programmers calling - main() directly to set the values that would normally be set by flags on - the command line. + randomize, findleaks, use_resources, trace and coverdir) allow programmers + calling main() directly to set the values that would normally be set by + flags on the command line. """ test_support.record_original_stdout(sys.stdout) try: - opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsrf:lu:t:TLR:', + opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsrf:lu:t:TD:NLR:', ['help', 'verbose', 'quiet', 'generate', 'exclude', 'single', 'random', 'fromfile', 'findleaks', 'use=', 'threshold=', 'trace', - 'runleaks', 'huntrleaks=' + 'coverdir=', 'nocoverdir', 'runleaks', + 'huntrleaks=' ]) except getopt.error, msg: usage(2, msg) @@ -206,6 +213,10 @@ gc.set_threshold(int(a)) elif o in ('-T', '--coverage'): trace = True + elif o in ('-D', '--coverdir'): + coverdir = os.path.join(os.getcwd(), a) + elif o in ('-N', '--nocoverdir'): + coverdir = None elif o in ('-R', '--huntrleaks'): huntrleaks = a.split(':') if len(huntrleaks) != 3: @@ -304,7 +315,6 @@ import trace tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix], trace=False, count=True) - coverdir = os.path.join(os.getcwd(), 'coverage') test_support.verbose = verbose # Tell tests to be moderately quiet test_support.use_resources = use_resources save_modules = sys.modules.keys() From fdrake at users.sourceforge.net Sat Nov 13 02:20:28 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Nov 13 02:20:32 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.161,1.162 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32607 Modified Files: python.perl Log Message: avoid the inane markup generated by LaTeX2HTML for \LaTeX; that simply doesn't look right in HTML Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.161 retrieving revision 1.162 diff -u -d -r1.161 -r1.162 --- python.perl 11 Nov 2004 08:05:34 -0000 1.161 +++ python.perl 13 Nov 2004 01:20:24 -0000 1.162 @@ -106,8 +106,8 @@ # words typeset in a special way (not in HTML though) sub do_cmd_ABC{ 'ABC' . $_[0]; } -sub do_cmd_UNIX{ 'Unix' - . $_[0]; } +sub do_cmd_UNIX{ 'Unix' . $_[0]; } +sub do_cmd_LaTeX{ 'LaTeX' . $_[0]; } sub do_cmd_ASCII{ 'ASCII' . $_[0]; } sub do_cmd_POSIX{ 'POSIX' . $_[0]; } sub do_cmd_C{ 'C' . $_[0]; } From fdrake at users.sourceforge.net Sat Nov 13 05:41:03 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Nov 13 05:41:06 2004 Subject: [Python-checkins] python/dist/src/Doc/doc doc.tex,1.89,1.90 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3852 Modified Files: doc.tex Log Message: - wrap a long line - add directory information for the "What's New" document Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- doc.tex 5 Nov 2004 04:23:24 -0000 1.89 +++ doc.tex 13 Nov 2004 04:41:01 -0000 1.90 @@ -120,7 +120,8 @@ \lineii{doc/} {\citetitle[../doc/doc.html]{Documenting Python}} \lineii{ext/} - {\citetitle[../ext/ext.html]{Extending and Embedding the Python Interpreter}} + {\citetitle[../ext/ext.html] + {Extending and Embedding the Python Interpreter}} \lineii{inst/} {\citetitle[../inst/inst.html]{Installing Python Modules}} \lineii{lib/} @@ -131,6 +132,9 @@ {\citetitle[../ref/ref.html]{Python Reference Manual}} \lineii{tut/} {\citetitle[../tut/tut.html]{Python Tutorial}} + \lineii{whatsnew/} + {\citetitle[../whatsnew/whatsnew24.html] + {What's New in Python \shortversion}} \end{tableii} \term{Format-Specific Output} From fdrake at users.sourceforge.net Sat Nov 13 06:46:21 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Nov 13 06:46:24 2004 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.162,1.163 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15553/perl Modified Files: python.perl Log Message: if we treat \LaTeX specially, we need to do the same for \TeX Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.162 retrieving revision 1.163 diff -u -d -r1.162 -r1.163 --- python.perl 13 Nov 2004 01:20:24 -0000 1.162 +++ python.perl 13 Nov 2004 05:46:18 -0000 1.163 @@ -108,6 +108,7 @@ sub do_cmd_ABC{ 'ABC' . $_[0]; } sub do_cmd_UNIX{ 'Unix' . $_[0]; } sub do_cmd_LaTeX{ 'LaTeX' . $_[0]; } +sub do_cmd_TeX{ 'TeX' . $_[0]; } sub do_cmd_ASCII{ 'ASCII' . $_[0]; } sub do_cmd_POSIX{ 'POSIX' . $_[0]; } sub do_cmd_C{ 'C' . $_[0]; } From loewis at users.sourceforge.net Sat Nov 13 12:13:37 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Nov 13 12:13:40 2004 Subject: [Python-checkins] python/dist/src setup.py,1.203,1.204 Message-ID: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6575 Modified Files: setup.py Log Message: Patch #1050475: Fix various x86_64 build issues regrtest.py: skip rgbimg and imageop as they are not built on 64-bit systems. _tkinter.c: replace %.8x with %p for printing pointers. setup.py: add lib64 into the library directories. Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.203 retrieving revision 1.204 diff -u -d -r1.203 -r1.204 --- setup.py 13 Oct 2004 15:54:16 -0000 1.203 +++ setup.py 13 Nov 2004 11:13:34 -0000 1.204 @@ -265,7 +265,10 @@ # lib_dirs and inc_dirs are used to search for files; # if a file is found in one of those directories, it can # be assumed that no additional -I,-L directives are needed. - lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib', '/usr/lib/lib64'] + lib_dirs = self.compiler.library_dirs + [ + '/lib64', '/usr/lib64', + '/lib', '/usr/lib', + ] inc_dirs = self.compiler.include_dirs + ['/usr/include'] exts = [] @@ -990,6 +993,7 @@ added_lib_dirs.append('/usr/openwin/lib') elif os.path.exists('/usr/X11R6/include'): include_dirs.append('/usr/X11R6/include') + added_lib_dirs.append('/usr/X11R6/lib64') added_lib_dirs.append('/usr/X11R6/lib') elif os.path.exists('/usr/X11R5/include'): include_dirs.append('/usr/X11R5/include') From loewis at users.sourceforge.net Sat Nov 13 12:13:37 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Nov 13 12:13:40 2004 Subject: [Python-checkins] python/dist/src/Lib/test regrtest.py,1.164,1.165 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6575/Lib/test Modified Files: regrtest.py Log Message: Patch #1050475: Fix various x86_64 build issues regrtest.py: skip rgbimg and imageop as they are not built on 64-bit systems. _tkinter.c: replace %.8x with %p for printing pointers. setup.py: add lib64 into the library directories. Index: regrtest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v retrieving revision 1.164 retrieving revision 1.165 diff -u -d -r1.164 -r1.165 --- regrtest.py 12 Nov 2004 18:51:27 -0000 1.164 +++ regrtest.py 13 Nov 2004 11:13:35 -0000 1.165 @@ -1099,6 +1099,10 @@ if eval('test_codecmaps_' + cc).skip_expected: self.expected.add('test_codecmaps_' + cc) + if sys.maxint == 9223372036854775807L: + self.expected.add('test_rgbimg') + self.expected.add('test_imageop') + if not sys.platform in ("mac", "darwin"): MAC_ONLY = ["test_macostools", "test_macfs", "test_aepack", "test_plistlib", "test_scriptpackages"] From loewis at users.sourceforge.net Sat Nov 13 12:13:37 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Nov 13 12:13:41 2004 Subject: [Python-checkins] python/dist/src/Modules _tkinter.c,1.167,1.168 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6575/Modules Modified Files: _tkinter.c Log Message: Patch #1050475: Fix various x86_64 build issues regrtest.py: skip rgbimg and imageop as they are not built on 64-bit systems. _tkinter.c: replace %.8x with %p for printing pointers. setup.py: add lib64 into the library directories. Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.167 retrieving revision 1.168 diff -u -d -r1.167 -r1.168 --- _tkinter.c 4 Aug 2004 02:16:48 -0000 1.167 +++ _tkinter.c 13 Nov 2004 11:13:35 -0000 1.168 @@ -805,8 +805,8 @@ PyTclObject_repr(PyTclObject *self) { char buf[50]; - PyOS_snprintf(buf, 50, "<%s object at 0x%.8x>", - self->value->typePtr->name, (int)self->value); + PyOS_snprintf(buf, 50, "<%s object at %p>", + self->value->typePtr->name, self->value); return PyString_FromString(buf); } From tim_one at users.sourceforge.net Sat Nov 13 17:18:34 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sat Nov 13 17:18:37 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_calendar.py, 1.7, 1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1137/Lib/test Modified Files: test_calendar.py Log Message: SF bug 1065388: calendar day/month name lookup too slow __getitem__() methods: compute only the new spellings needed to satisfy the given indexing object. This is purely an optimization (it should have no effect on visible semantics). Index: test_calendar.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_calendar.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- test_calendar.py 8 Jul 2004 17:14:17 -0000 1.7 +++ test_calendar.py 13 Nov 2004 16:18:31 -0000 1.8 @@ -37,10 +37,9 @@ self.assertEqual(len(value), 7) self.assertEqual(len(value[:]), 7) # ensure they're all unique - d = {} - for v in value: - d[v] = 1 - self.assertEqual(len(d), 7) + self.assertEqual(len(set(value)), 7) + # verify it "acts like a sequence" in two forms of iteration + self.assertEqual(value[::-1], list(reversed(value))) def test_months(self): for attr in "month_name", "month_abbr": @@ -49,10 +48,9 @@ self.assertEqual(len(value[:]), 13) self.assertEqual(value[0], "") # ensure they're all unique - d = {} - for v in value: - d[v] = 1 - self.assertEqual(len(d), 13) + self.assertEqual(len(set(value)), 13) + # verify it "acts like a sequence" in two forms of iteration + self.assertEqual(value[::-1], list(reversed(value))) class MonthCalendarTestCase(unittest.TestCase): From tim_one at users.sourceforge.net Sat Nov 13 17:18:34 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sat Nov 13 17:18:37 2004 Subject: [Python-checkins] python/dist/src/Lib calendar.py,1.34,1.35 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1137/Lib Modified Files: calendar.py Log Message: SF bug 1065388: calendar day/month name lookup too slow __getitem__() methods: compute only the new spellings needed to satisfy the given indexing object. This is purely an optimization (it should have no effect on visible semantics). Index: calendar.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/calendar.py,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- calendar.py 7 Jun 2004 03:47:06 -0000 1.34 +++ calendar.py 13 Nov 2004 16:18:31 -0000 1.35 @@ -28,27 +28,37 @@ # fresh on each call, in case the user changes locale between calls. class _localized_month: + + _months = [datetime.date(2001, i+1, 1).strftime for i in range(12)] + _months.insert(0, lambda x: "") + def __init__(self, format): self.format = format def __getitem__(self, i): - data = [datetime.date(2001, j, 1).strftime(self.format) - for j in range(1, 13)] - data.insert(0, "") - return data[i] + funcs = self._months[i] + if isinstance(i, slice): + return [f(self.format) for f in funcs] + else: + return funcs(self.format) def __len__(self): return 13 class _localized_day: + + # January 1, 2001, was a Monday. + _days = [datetime.date(2001, 1, i+1).strftime for i in range(7)] + def __init__(self, format): self.format = format def __getitem__(self, i): - # January 1, 2001, was a Monday. - data = [datetime.date(2001, 1, j+1).strftime(self.format) - for j in range(7)] - return data[i] + funcs = self._days[i] + if isinstance(i, slice): + return [f(self.format) for f in funcs] + else: + return funcs(self.format) def __len__(self): return 7 From tim_one at users.sourceforge.net Sat Nov 13 17:18:35 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sat Nov 13 17:18:38 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1187,1.1188 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1137/Misc Modified Files: NEWS Log Message: SF bug 1065388: calendar day/month name lookup too slow __getitem__() methods: compute only the new spellings needed to satisfy the given indexing object. This is purely an optimization (it should have no effect on visible semantics). Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1187 retrieving revision 1.1188 diff -u -d -r1.1187 -r1.1188 --- NEWS 8 Nov 2004 22:07:37 -0000 1.1187 +++ NEWS 13 Nov 2004 16:18:32 -0000 1.1188 @@ -32,6 +32,17 @@ - ``doctest``'s new support for adding ``pdb.set_trace()`` calls to doctests was broken in a dramatic but shallow way. Fixed. +- Bug 1065388: ``calendar``'s ``day_name``, ``day_abbr``, ``month_name``, + and ``month_abbr`` attributes emulate sequences of locale-correct + spellings of month and day names. Because the locale can change at + any time, the correct spelling is recomputed whenever one of these is + indexed. In the worst case, the index may be a slice object, so these + recomputed every day or month name each time they were indexed. This is + much slower than necessary in the usual case, when the index is just an + integer. In that case, only the single spelling needed is recomputed + now; and, when the index is a slice object, only the spellings needed + by the slice are recomputed now. + - Patch 1061679: Added ``__all__`` to pickletools.py. Build From fdrake at users.sourceforge.net Sat Nov 13 18:45:41 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Nov 13 18:45:44 2004 Subject: [Python-checkins] python/dist/src/Doc/tools push-docs.sh,1.21,1.22 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21262/tools Modified Files: push-docs.sh Log Message: add another way to specify an alternate name for the documentation set, so that this is harder to forget to do for development of new styles Index: push-docs.sh =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/push-docs.sh,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- push-docs.sh 2 Nov 2004 19:20:43 -0000 1.21 +++ push-docs.sh 13 Nov 2004 17:45:39 -0000 1.22 @@ -26,6 +26,7 @@ DOCTYPE="devel" fi +DOCTYPE_SPECIFIED=false EXPLANATION='' ANNOUNCE=true @@ -55,6 +56,7 @@ ;; -t) DOCTYPE="$2" + DOCTYPE_SPECIFIED=true shift 2 ;; -F) @@ -99,9 +101,17 @@ exit 2 fi +# switch to .../Doc/ cd .. -# now in .../Doc/ +# If $DOCTYPE was not specified explicitly, look for .doctype in +# .../Doc/ and use the content of that file if present. +if $DOCTYPE_SPECIFIED ; then + : +elif [ -f .doctype ] ; then + DOCTYPE="`cat .doctype`" +fi + make --no-print-directory ${PKGTYPE}html || exit $? PACKAGE="html-$VERSION.$PKGEXT" scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $? From fdrake at users.sourceforge.net Sat Nov 13 18:45:41 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Nov 13 18:45:44 2004 Subject: [Python-checkins] python/dist/src/Doc .cvsignore,1.23,1.24 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21262 Modified Files: .cvsignore Log Message: add another way to specify an alternate name for the documentation set, so that this is harder to forget to do for development of new styles Index: .cvsignore =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/.cvsignore,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- .cvsignore 23 Apr 2003 15:04:52 -0000 1.23 +++ .cvsignore 13 Nov 2004 17:45:38 -0000 1.24 @@ -3,3 +3,4 @@ *.zip *.tar pkglist.html +.doctype From kbk at users.sourceforge.net Sat Nov 13 22:06:02 2004 From: kbk at users.sourceforge.net (kbk@users.sourceforge.net) Date: Sat Nov 13 22:06:05 2004 Subject: [Python-checkins] python/dist/src/Lib/idlelib NEWS.txt, 1.44, 1.45 PyShell.py, 1.91, 1.92 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31520 Modified Files: NEWS.txt PyShell.py Log Message: The change in the linecache.checkcache() signature at rev 1.13 caused IDLE to exit when an exception was raised while running w/o the subprocess. Python Bug 1063840 M NEWS.txt M PyShell.py Index: NEWS.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- NEWS.txt 4 Nov 2004 05:23:17 -0000 1.44 +++ NEWS.txt 13 Nov 2004 21:05:57 -0000 1.45 @@ -3,6 +3,9 @@ *Release date: XX-XXX-2004* +- A change to the linecache.py API caused IDLE to exit when an exception was + raised while running without the subprocess (-n switch). Python Bug 1063840. + What's New in IDLE 1.1b2? ========================= Index: PyShell.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/PyShell.py,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- PyShell.py 22 Aug 2004 05:14:32 -0000 1.91 +++ PyShell.py 13 Nov 2004 21:05:58 -0000 1.92 @@ -73,14 +73,16 @@ return s warnings.formatwarning = idle_formatwarning -def extended_linecache_checkcache(orig_checkcache=linecache.checkcache): +def extended_linecache_checkcache(filename=None, + orig_checkcache=linecache.checkcache): """Extend linecache.checkcache to preserve the entries - Rather than repeating the linecache code, patch it to save the pyshell# - entries, call the original linecache.checkcache(), and then restore the - saved entries. Assigning the orig_checkcache keyword arg freezes its value - at definition time to the (original) method linecache.checkcache(), i.e. - makes orig_checkcache lexical. + Rather than repeating the linecache code, patch it to save the + entries, call the original linecache.checkcache() + (which destroys them), and then restore the saved entries. + + orig_checkcache is bound at definition time to the original + method, allowing it to be patched. """ cache = linecache.cache From fdrake at users.sourceforge.net Sat Nov 13 22:58:04 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Nov 13 22:58:08 2004 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.44,1.45 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9674 Modified Files: style.css Log Message: avoid applying :active to anchors that are only link targets (no href attribute) Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- style.css 11 Nov 2004 04:41:24 -0000 1.44 +++ style.css 13 Nov 2004 21:58:01 -0000 1.45 @@ -38,7 +38,7 @@ body { color: #000000; background-color: #ffffff; } -a:active { color: #ff0000; } +a:link:active { color: #ff0000; } a:link:hover { background-color: #bbeeff; } a:visited:hover { background-color: #bbeeff; } a:visited { color: #551a8b; } From ricardobssilverio2kd at mail.com Sun Nov 14 00:05:45 2004 From: ricardobssilverio2kd at mail.com (Ricardo Silverio) Date: Sun Nov 14 00:05:30 2004 Subject: [Python-checkins] e-mails para mala direta Message-ID: <20041113230529.0F3191E4002@bag.python.org> MALA DIRETA, email, E-MAILS PARA MALAS DIRETAS, E-mails por segmenta??o, listas, emails por segmento Cadastros de e-mails para mala direta e e-mail marketing. Listas atualizadas e personalizadas. http://www.estacion.de/maladireta Listas de e-mails, divulga??o de sites e promo??o de home pages,Programas gr?tis, Listas, divulga??o por e-mail, spam, softwares gratuitos, mala direta, http://www.estacion.de/maladireta From loewis at users.sourceforge.net Sun Nov 14 11:21:06 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun Nov 14 11:21:10 2004 Subject: [Python-checkins] python/dist/src/Lib pydoc.py,1.99,1.100 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15608 Modified Files: pydoc.py Log Message: Back out rev 1.96; see #1009389. Index: pydoc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- pydoc.py 7 Nov 2004 19:16:05 -0000 1.99 +++ pydoc.py 14 Nov 2004 10:21:04 -0000 1.100 @@ -37,7 +37,7 @@ __author__ = "Ka-Ping Yee " __date__ = "26 February 2001" __version__ = "$Revision$" -__credits__ = u"""Guido van Rossum, for an excellent programming language. +__credits__ = """Guido van Rossum, for an excellent programming language. Tommy Burnette, the original creator of manpy. Paul Prescod, for all his work on onlinehelp. Richard Chamberlain, for the first implementation of textdoc. From tim_one at users.sourceforge.net Mon Nov 15 04:50:19 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 15 04:50:22 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libdatetime.tex, 1.52, 1.53 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19983/Doc/lib Modified Files: libdatetime.tex Log Message: SF bug 1066438: datetime.replace method description error Repair typo in example. Index: libdatetime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- libdatetime.tex 30 Dec 2003 20:36:20 -0000 1.52 +++ libdatetime.tex 15 Nov 2004 03:50:16 -0000 1.53 @@ -398,7 +398,7 @@ \item[(4)] In other words, \code{date1 < date2} if and only if \code{\var{date1}.toordinal() < - \var{date2}.toordinal()}. + \var{date2}.toordinal()}. In order to stop comparison from falling back to the default scheme of comparing object addresses, date comparison normally raises \exception{TypeError} if the other comparand @@ -423,7 +423,7 @@ Return a date with the same value, except for those members given new values by whichever keyword arguments are specified. For example, if \code{d == date(2002, 12, 31)}, then - \code{d.replace(day=26) == date(2000, 12, 26)}. + \code{d.replace(day=26) == date(2002, 12, 26)}. \end{methoddesc} \begin{methoddesc}{timetuple}{} @@ -432,8 +432,8 @@ 0, and the DST flag is -1. \code{\var{d}.timetuple()} is equivalent to \code{time.struct_time((\var{d}.year, \var{d}.month, \var{d}.day, - 0, 0, 0, - \var{d}.weekday(), + 0, 0, 0, + \var{d}.weekday(), \var{d}.toordinal() - date(\var{d}.year, 1, 1).toordinal() + 1, -1))} \end{methoddesc} @@ -475,7 +475,7 @@ year 2004 begins on Monday, 29 Dec 2003 and ends on Sunday, 4 Jan 2004, so that \code{date(2003, 12, 29).isocalendar() == (2004, 1, 1)} - and + and \code{date(2004, 1, 4).isocalendar() == (2004, 1, 7)}. \end{methoddesc} @@ -687,7 +687,7 @@ \lineii{\var{timedelta} = \var{datetime1} - \var{datetime2}}{(3)} \lineii{\var{datetime1} < \var{datetime2}} - {Compares \class{datetime} to \class{datetime}. + {Compares \class{datetime} to \class{datetime}. (4)} \end{tableii} @@ -736,7 +736,7 @@ \item[(4)] \var{datetime1} is considered less than \var{datetime2} -when \var{datetime1} precedes \var{datetime2} in time. +when \var{datetime1} precedes \var{datetime2} in time. If one comparand is naive and the other is aware, \exception{TypeError} is raised. If both From doerwalter at users.sourceforge.net Mon Nov 15 14:51:44 2004 From: doerwalter at users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Mon Nov 15 14:51:47 2004 Subject: [Python-checkins] python/dist/src/Lib pprint.py,1.30,1.31 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31518/Lib Modified Files: pprint.py Log Message: Fix pprint to be able to handle objects that don't have a __repr__ attribute. Fixes SF bug #1065456. Index: pprint.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pprint.py,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- pprint.py 14 May 2004 16:31:56 -0000 1.30 +++ pprint.py 15 Nov 2004 13:51:41 -0000 1.31 @@ -131,7 +131,7 @@ write = stream.write if sepLines: - r = typ.__repr__ + r = getattr(typ, "__repr__", None) if issubclass(typ, dict) and r is dict.__repr__: write('{') if self._indent_per_level > 1: @@ -229,7 +229,7 @@ write(qget(char, repr(char)[1:-1])) return ("%s%s%s" % (closure, sio.getvalue(), closure)), True, False - r = typ.__repr__ + r = getattr(typ, "__repr__", None) if issubclass(typ, dict) and r is dict.__repr__: if not object: return "{}", True, False From anthonybaxter at users.sourceforge.net Mon Nov 15 16:03:28 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Nov 15 16:03:31 2004 Subject: [Python-checkins] python/dist/src/Include patchlevel.h,2.81,2.82 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13353/Include Modified Files: patchlevel.h Log Message: preparing for rc1 Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.81 retrieving revision 2.82 diff -u -d -r2.81 -r2.82 --- patchlevel.h 2 Nov 2004 13:03:54 -0000 2.81 +++ patchlevel.h 15 Nov 2004 15:03:25 -0000 2.82 @@ -14,7 +14,7 @@ /* Values for PY_RELEASE_LEVEL */ #define PY_RELEASE_LEVEL_ALPHA 0xA #define PY_RELEASE_LEVEL_BETA 0xB -#define PY_RELEASE_LEVEL_GAMMA 0xC +#define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */ #define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ /* Higher for patch releases */ @@ -22,11 +22,11 @@ #define PY_MAJOR_VERSION 2 #define PY_MINOR_VERSION 4 #define PY_MICRO_VERSION 0 -#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA -#define PY_RELEASE_SERIAL 2 +#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA +#define PY_RELEASE_SERIAL 1 /* Version as a string */ -#define PY_VERSION "2.4b2" +#define PY_VERSION "2.4c1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ From kbk at users.sourceforge.net Tue Nov 16 22:28:44 2004 From: kbk at users.sourceforge.net (kbk@users.sourceforge.net) Date: Tue Nov 16 22:28:46 2004 Subject: [Python-checkins] python/dist/src/Lib/idlelib configDialog.py, 1.59, 1.60 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6890 Modified Files: configDialog.py Log Message: Saving a Keyset w/o making changes (by using the "Save as New Custom Key Set" button) caused IDLE to fail on restart (no new keyset was created in config-keys.cfg). Also true for Theme/highlights. Python Bug 1064535. M configDialog.py Index: configDialog.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/configDialog.py,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- configDialog.py 4 Jun 2004 06:31:08 -0000 1.59 +++ configDialog.py 16 Nov 2004 21:28:36 -0000 1.60 @@ -1165,6 +1165,9 @@ cfgTypeHasChanges = True if cfgTypeHasChanges: idleConf.userCfg[configType].Save() + for configType in ['keys', 'highlight']: + # save these even if unchanged! + idleConf.userCfg[configType].Save() self.ResetChangedItems() #clear the changed items dict def ActivateConfigChanges(self): From kbk at users.sourceforge.net Tue Nov 16 22:31:11 2004 From: kbk at users.sourceforge.net (kbk@users.sourceforge.net) Date: Tue Nov 16 22:31:14 2004 Subject: [Python-checkins] python/dist/src/Lib/idlelib NEWS.txt,1.45,1.46 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7792 Modified Files: NEWS.txt Log Message: Saving a Keyset w/o making changes (by using the "Save as New Custom Key Set" button) caused IDLE to fail on restart (no new keyset was created in config-keys.cfg). Also true for Theme/highlights. Python Bug 1064535. Index: NEWS.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- NEWS.txt 13 Nov 2004 21:05:57 -0000 1.45 +++ NEWS.txt 16 Nov 2004 21:31:08 -0000 1.46 @@ -3,6 +3,10 @@ *Release date: XX-XXX-2004* +- Saving a Keyset w/o making changes (by using the "Save as New Custom Key Set" + button) caused IDLE to fail on restart (no new keyset was created in + config-keys.cfg). Also true for Theme/highlights. Python Bug 1064535. + - A change to the linecache.py API caused IDLE to exit when an exception was raised while running without the subprocess (-n switch). Python Bug 1063840. From montanaro at users.sourceforge.net Wed Nov 17 17:04:19 2004 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Wed Nov 17 17:04:22 2004 Subject: [Python-checkins] python/dist/src/Misc gdbinit,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15720 Modified Files: gdbinit Log Message: split functionality into pystack and pystackv commands. The former will work with core dumps because it avoids calling any Python API routines. The latter prints all the local variable values as well as the stack frames but won't work with core dumps because it relies on _PyObject_Dump to print variables. Index: gdbinit =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/gdbinit,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- gdbinit 7 Aug 2004 20:11:22 -0000 1.7 +++ gdbinit 17 Nov 2004 16:04:15 -0000 1.8 @@ -43,12 +43,16 @@ end end -# print the current frame +# print the current frame - verbose +define pyframev + pyframe + pylocals +end + define pyframe - set $__fn = PyString_AsString(co->co_filename) - set $__n = PyString_AsString(co->co_name) + set $__fn = (char *)((PyStringObject *)co->co_filename)->ob_sval + set $__n = (char *)((PyStringObject *)co->co_name)->ob_sval printf "%s (%d): %s\n", $__fn, f->f_lineno, $__n - pylocals end # Here's a somewhat fragile way to print the entire Python stack from gdb. @@ -72,3 +76,14 @@ end select-frame 0 end + +# print the entire Python call stack - verbose mode +define pystackv + while $pc < Py_Main || $pc > Py_GetArgcArgv + if $pc > PyEval_EvalFrame && $pc < PyEval_EvalCodeEx + pyframev + end + up-silently 1 + end + select-frame 0 +end From astrand at users.sourceforge.net Wed Nov 17 21:06:46 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Wed Nov 17 21:06:48 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_subprocess.py, 1.14, 1.15 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9325 Modified Files: test_subprocess.py Log Message: Remove tempfile after use in test_call_string. In test_args_string, remove the tempfile before assertEqual. Index: test_subprocess.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_subprocess.py,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- test_subprocess.py 12 Nov 2004 15:51:48 -0000 1.14 +++ test_subprocess.py 17 Nov 2004 20:06:35 -0000 1.15 @@ -436,8 +436,8 @@ os.chmod(fname, 0700) p = subprocess.Popen(fname) p.wait() - self.assertEqual(p.returncode, 47) os.remove(fname) + self.assertEqual(p.returncode, 47) def test_invalid_args(self): # invalid arguments should raise ValueError @@ -477,6 +477,7 @@ os.close(f) os.chmod(fname, 0700) rc = subprocess.call(fname) + os.remove(fname) self.assertEqual(rc, 47) From rhettinger at users.sourceforge.net Thu Nov 18 06:51:55 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Nov 18 06:51:58 2004 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.112, 1.113 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8208 Modified Files: whatsnew24.tex Log Message: Comment for performance measurement. Index: whatsnew24.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v retrieving revision 1.112 retrieving revision 1.113 diff -u -d -r1.112 -r1.113 --- whatsnew24.tex 9 Nov 2004 02:58:02 -0000 1.112 +++ whatsnew24.tex 18 Nov 2004 05:51:53 -0000 1.113 @@ -1085,6 +1085,14 @@ \end{itemize} % XXX fill in these figures +% pystone is almost useless for comparing different versions of Python; +% instead, it excels at predicting relative Python performance on +% different machines. +% So, this section would be more informative if it used other tools +% such as pybench and parrotbench. For a more application oriented +% benchmark, try comparing the timings of test_decimal.py under 2.3 +% and 2.4. + The net result of the 2.4 optimizations is that Python 2.4 runs the pystone benchmark around XX\% faster than Python 2.3 and YY\% faster than Python 2.2. From rhettinger at users.sourceforge.net Thu Nov 18 07:14:31 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Nov 18 07:14:34 2004 Subject: [Python-checkins] python/dist/src/Doc/tut tut.tex,1.257,1.258 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11683 Modified Files: tut.tex Log Message: SF bug #1067023: A small typo Make a minor clarification between "written" and "displayed". Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.257 retrieving revision 1.258 diff -u -d -r1.257 -r1.258 --- tut.tex 2 Nov 2004 18:24:26 -0000 1.257 +++ tut.tex 18 Nov 2004 06:14:27 -0000 1.258 @@ -464,8 +464,8 @@ -3 \end{verbatim} -Like in C, the equal sign (\character{=}) is used to assign a value to a -variable. The value of an assignment is not written: +The equal sign (\character{=}) is used to assign a value to a variable. +Afterwards, no result is displayed before the next interactive prompt: \begin{verbatim} >>> width = 20 From rhettinger at users.sourceforge.net Thu Nov 18 07:20:33 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Nov 18 07:20:36 2004 Subject: [Python-checkins] python/dist/src/Doc/tut tut.tex,1.258,1.259 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12331 Modified Files: tut.tex Log Message: SF bug #1067018: Obsolete info in Tutorial 9.1 Removed a section that is out of date after type/class unification. While there was still some validity, the paragraph offered more confusion that insight. Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.258 retrieving revision 1.259 diff -u -d -r1.258 -r1.259 --- tut.tex 18 Nov 2004 06:14:27 -0000 1.258 +++ tut.tex 18 Nov 2004 06:20:30 -0000 1.259 @@ -3660,15 +3660,6 @@ terms, since its object-oriented semantics are closer to those of Python than \Cpp, but I expect that few readers have heard of it.) -I also have to warn you that there's a terminological pitfall for -object-oriented readers: the word ``object'' in Python does not -necessarily mean a class instance. Like \Cpp{} and Modula-3, and -unlike Smalltalk, not all types in Python are classes: the basic -built-in types like integers and lists are not, and even somewhat more -exotic types like files aren't. However, \emph{all} Python types -share a little bit of common semantics that is best described by using -the word object. - Objects have individuality, and multiple names (in multiple scopes) can be bound to the same object. This is known as aliasing in other languages. This is usually not appreciated on a first glance at From rhettinger at users.sourceforge.net Thu Nov 18 07:50:22 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Nov 18 07:50:24 2004 Subject: [Python-checkins] python/dist/src/Doc/ext newtypes.tex,1.39,1.40 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17942 Modified Files: newtypes.tex Log Message: SF bug #1066036: Typo about PyErr_WriteUnraisable() Index: newtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/newtypes.tex,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- newtypes.tex 15 Jul 2004 04:23:13 -0000 1.39 +++ newtypes.tex 18 Nov 2004 06:50:19 -0000 1.40 @@ -1039,7 +1039,7 @@ cbresult = PyObject_CallObject(self->my_callback, NULL); if (cbresult == NULL) - PyErr_WriteUnraisable(); + PyErr_WriteUnraisable(self->my_callback); else Py_DECREF(cbresult); From loewis at users.sourceforge.net Thu Nov 18 09:00:36 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Nov 18 09:00:40 2004 Subject: [Python-checkins] python/dist/src/Tools/msi msi.py,1.14,1.15 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/msi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30136 Modified Files: msi.py Log Message: Add missing have_tcl conditions Index: msi.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/msi/msi.py,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- msi.py 7 Nov 2004 07:08:25 -0000 1.14 +++ msi.py 18 Nov 2004 08:00:33 -0000 1.15 @@ -330,8 +330,10 @@ add_data(db, "Binary", [("Script", msilib.Binary("inst.vbs"))]) # See "Custom Action Type 6" add_data(db, "CustomAction", - [("CheckDir", 6, "Script", "CheckDir"), - ("UpdateEditIDLE", 6, "Script", "UpdateEditIDLE")]) + [("CheckDir", 6, "Script", "CheckDir")]) + if have_tcl: + add_data(db, "CustomAction", + [("UpdateEditIDLE", 6, "Script", "UpdateEditIDLE")]) os.unlink("inst.vbs") @@ -1035,6 +1037,16 @@ ewi = "Edit with IDLE" pat2 = r"Software\Classes\%sPython.%sFile\DefaultIcon" pat3 = r"Software\Classes\%sPython.%sFile" + tcl_verbs = [] + if have_tcl: + tcl_verbs=[ + ("py.IDLE", -1, pat % (testprefix, "", ewi), "", + r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -n -e "%1"', + "REGISTRY.tcl"), + ("pyw.IDLE", -1, pat % (testprefix, "NoCon", ewi), "", + r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -n -e "%1"', + "REGISTRY.tcl"), + ] add_data(db, "Registry", [# Extensions ("py.ext", -1, r"Software\Classes\."+ext, "", @@ -1057,12 +1069,7 @@ r'"[TARGETDIR]pythonw.exe" "%1" %*', "REGISTRY.def"), ("pyc.open", -1, pat % (testprefix, "Compiled", "open"), "", r'"[TARGETDIR]python.exe" "%1" %*', "REGISTRY.def"), - ("py.IDLE", -1, pat % (testprefix, "", ewi), "", - r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -n -e "%1"', - "REGISTRY.tcl"), - ("pyw.IDLE", -1, pat % (testprefix, "NoCon", ewi), "", - r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -n -e "%1"', - "REGISTRY.tcl"), + ] + tcl_verbs + [ #Icons ("py.icon", -1, pat2 % (testprefix, ""), "", r'[TARGETDIR]py.ico', "REGISTRY.def"), From rhettinger at users.sourceforge.net Thu Nov 18 09:39:36 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Nov 18 09:39:39 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libpdb.tex,1.42,1.43 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5298 Modified Files: libpdb.tex Log Message: SF patch #1068456: small update for pdb docs Index: libpdb.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpdb.tex,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- libpdb.tex 7 Nov 2004 06:18:37 -0000 1.42 +++ libpdb.tex 18 Nov 2004 08:39:33 -0000 1.43 @@ -42,6 +42,13 @@ python -m pdb myscript.py \end{verbatim} +When invoked as a script, pdb will automatically enter post-mortem debugging +if the program being debugged exits abnormally. After post-mortem debugging +(or after normal exit of the program), pdb will restart the program. +Automatic restarting preserves pdb's state (such as breakpoints) and in most +cases is more useful than quitting the debugger upon program's exit. +\versionadded[Restarting post-mortem behavior added]{2.4} + Typical usage to inspect a crashed program is: \begin{verbatim} From rhettinger at users.sourceforge.net Thu Nov 18 10:41:49 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Nov 18 10:41:53 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1188,1.1189 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17509 Modified Files: NEWS Log Message: Mark PyRange_New() as deprecated. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1188 retrieving revision 1.1189 diff -u -d -r1.1188 -r1.1189 --- NEWS 13 Nov 2004 16:18:32 -0000 1.1188 +++ NEWS 18 Nov 2004 09:41:45 -0000 1.1189 @@ -55,7 +55,8 @@ C API ----- -... +- The PyRange_New() function is deprecated. + Documentation ------------- From anthonybaxter at users.sourceforge.net Thu Nov 18 13:32:29 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Thu Nov 18 13:32:33 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1189,1.1190 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20524/Misc Modified Files: NEWS Log Message: 2.4rc1 Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1189 retrieving revision 1.1190 diff -u -d -r1.1189 -r1.1190 --- NEWS 18 Nov 2004 09:41:45 -0000 1.1189 +++ NEWS 18 Nov 2004 12:32:25 -0000 1.1190 @@ -7,7 +7,7 @@ What's New in Python 2.4 (release candidate 1|beta 3) ===================================================== -*Release date: XX-XXX-2004* +*Release date: 18-NOV-2004* Core and builtins ----------------- From anthonybaxter at users.sourceforge.net Thu Nov 18 13:32:29 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Thu Nov 18 13:32:33 2004 Subject: [Python-checkins] python/dist/src/Misc/RPM python-2.4.spec,1.6,1.7 Message-ID: Update of /cvsroot/python/python/dist/src/Misc/RPM In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20524/Misc/RPM Modified Files: python-2.4.spec Log Message: 2.4rc1 Index: python-2.4.spec =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/RPM/python-2.4.spec,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- python-2.4.spec 3 Nov 2004 06:21:37 -0000 1.6 +++ python-2.4.spec 18 Nov 2004 12:32:27 -0000 1.7 @@ -33,7 +33,7 @@ ################################# %define name python -%define version 2.4b2 +%define version 2.4c1 %define libvers 2.4 %define release 1pydotorg %define __prefix /usr From anthonybaxter at users.sourceforge.net Thu Nov 18 13:32:30 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Thu Nov 18 13:32:34 2004 Subject: [Python-checkins] python/dist/src/Lib/idlelib NEWS.txt, 1.46, 1.47 idlever.py, 1.19, 1.20 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20524/Lib/idlelib Modified Files: NEWS.txt idlever.py Log Message: 2.4rc1 Index: NEWS.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- NEWS.txt 16 Nov 2004 21:31:08 -0000 1.46 +++ NEWS.txt 18 Nov 2004 12:32:27 -0000 1.47 @@ -1,7 +1,7 @@ What's New in IDLE 1.1b3/rc1? ============================= -*Release date: XX-XXX-2004* +*Release date: 18-NOV-2004* - Saving a Keyset w/o making changes (by using the "Save as New Custom Key Set" button) caused IDLE to fail on restart (no new keyset was created in Index: idlever.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/idlever.py,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- idlever.py 3 Nov 2004 06:21:36 -0000 1.19 +++ idlever.py 18 Nov 2004 12:32:27 -0000 1.20 @@ -1 +1 @@ -IDLE_VERSION = "1.1b2" +IDLE_VERSION = "1.1c1" From akuchling at users.sourceforge.net Fri Nov 19 15:26:26 2004 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Fri Nov 19 15:26:29 2004 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.113, 1.114 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5041 Modified Files: whatsnew24.tex Log Message: Bump version number; update patch/bug counts; bet that the final release will be in December Index: whatsnew24.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v retrieving revision 1.113 retrieving revision 1.114 diff -u -d -r1.113 -r1.114 --- whatsnew24.tex 18 Nov 2004 05:51:53 -0000 1.113 +++ whatsnew24.tex 19 Nov 2004 14:26:23 -0000 1.114 @@ -10,7 +10,7 @@ % \title{What's New in Python 2.4} -\release{0.9} +\release{1.0} \author{A.M.\ Kuchling} \authoraddress{ \strong{Python Software Foundation}\\ @@ -21,8 +21,8 @@ \maketitle \tableofcontents -This article explains the new features in Python 2.4, scheduled for -release in December 2004. +This article explains the new features in Python 2.4, released in December +2004. Python 2.4 is a medium-sized release. It doesn't introduce as many changes as the radical Python 2.2, but introduces more features than @@ -30,9 +30,8 @@ features are function decorators and generator expressions; most other changes are to the standard library. -% XXX update these figures as we go -According to the CVS change logs, there were 421 patches applied and -413 bugs fixed between Python 2.3 and 2.4. Both figures are likely to +According to the CVS change logs, there were 481 patches applied and +502 bugs fixed between Python 2.3 and 2.4. Both figures are likely to be underestimates. This article doesn't attempt to provide a complete specification of From akuchling at users.sourceforge.net Fri Nov 19 15:27:56 2004 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Fri Nov 19 15:27:59 2004 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.114, 1.115 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5333 Modified Files: whatsnew24.tex Log Message: It's GTK+, apparently; remove XXX comment Index: whatsnew24.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -r1.114 -r1.115 --- whatsnew24.tex 19 Nov 2004 14:26:23 -0000 1.114 +++ whatsnew24.tex 19 Nov 2004 14:27:54 -0000 1.115 @@ -823,7 +823,6 @@ Not setting the numeric locale caused trouble for extensions that used third-party C libraries, however, because they wouldn't have the -% XXX is it GTK or GTk? correct locale set. The motivating example was GTK+, whose user interface widgets weren't displaying numbers in the current locale. @@ -1393,7 +1392,6 @@ \item The \module{poplib} module now supports POP over SSL. \item The \module{profile} module can now profile C extension functions. -% XXX more to say about this? (Contributed by Nick Bastin.) \item The \module{random} module has a new method called From akuchling at users.sourceforge.net Fri Nov 19 15:43:39 2004 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Fri Nov 19 15:43:42 2004 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.115, 1.116 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9038 Modified Files: whatsnew24.tex Log Message: Last pass to fill in contributor names; remove stray 'contributed by' from the incompatible changes section; remove some XXX comments Index: whatsnew24.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- whatsnew24.tex 19 Nov 2004 14:27:54 -0000 1.115 +++ whatsnew24.tex 19 Nov 2004 14:43:36 -0000 1.116 @@ -6,9 +6,6 @@ % Feel free to add commented-out reminders of things that need % to be covered. --amk -% XXX pydoc can display links to module docs -- but when? -% - \title{What's New in Python 2.4} \release{1.0} \author{A.M.\ Kuchling} @@ -1021,7 +1018,7 @@ a partially-initialized module object in \code{sys.modules}. The incomplete module object left behind would fool further imports of the same module into succeeding, leading to confusing errors. -% (XXX contributed by Tim?) +(Fixed by Tim Peters.) \item \constant{None} is now a constant; code that binds a new value to the name \samp{None} is now a syntax error. @@ -1177,7 +1174,7 @@ The \method{read()} method now returns a list of the files that were successfully parsed, and the \method{set()} method raises \exception{TypeError} if passed a \var{value} argument that isn't a - string. + string. (Contributed by John Belmonte and David Goodger.) \item The \module{curses} module now supports the ncurses extension \function{use_default_colors()}. On platforms where the terminal @@ -1389,7 +1386,8 @@ \module{posix} module that underlies the \module{os} module. (Contributed by J. Raynor.) -\item The \module{poplib} module now supports POP over SSL. +\item The \module{poplib} module now supports POP over SSL. (Contributed by +Hector Urtubia.) \item The \module{profile} module can now profile C extension functions. (Contributed by Nick Bastin.) @@ -1408,6 +1406,7 @@ earlier in the expression. If the specified group matched, the regular expression pattern \var{A} will be tested against the string; if the group didn't match, the pattern \var{B} will be used instead. + (Contributed by Gustavo Niemeyer.) \item The \module{re} module is also no longer recursive, thanks to a massive amount of work by Gustavo Niemeyer. In a recursive regular @@ -1462,6 +1461,7 @@ \item The \module{xmlrpclib} module now supports a multi-call extension for transmitting multiple XML-RPC calls in a single HTTP operation. +(Contributed by Brian Quinlan.) \item The \module{mpz}, \module{rotor}, and \module{xreadlines} modules have been removed. @@ -1492,6 +1492,9 @@ \class{HTTPCookieProcessor} manages a cookie jar that is used when accessing URLs. +This module was contributed by John J. Lee. + + % ================== \subsection{doctest} @@ -1654,11 +1657,11 @@ \program{configure} script will let you profile the interpreter with \program{gprof}, and providing the \longprogramopt{--with-tsc} switch enables profiling using the Pentium's Time-Stamp-Counter - register. (The \longprogramopt{--with-tsc} switch is slightly + register. Note that the \longprogramopt{--with-tsc} switch is slightly misnamed, because the profiling feature also works on the PowerPC platform, though that processor architecture doesn't call that - register ``the TSC register''.) - + register ``the TSC register''. (Contributed by Jeremy Hylton.) + \item The \ctype{tracebackobject} type has been renamed to \ctype{PyTracebackObject}. \end{itemize} @@ -1694,7 +1697,6 @@ \item The \function{zip()} built-in function and \function{itertools.izip()} now return an empty list instead of raising a \exception{TypeError} exception if called with no arguments. - (Contributed by Raymond Hettinger.) \item \function{dircache.listdir()} now passes exceptions to the caller instead of returning empty lists. From akuchling at users.sourceforge.net Fri Nov 19 15:55:32 2004 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Fri Nov 19 15:55:35 2004 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.116, 1.117 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11667 Modified Files: whatsnew24.tex Log Message: Fill in the benchmark figures, bogus or not; add a disclaimer Index: whatsnew24.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v retrieving revision 1.116 retrieving revision 1.117 diff -u -d -r1.116 -r1.117 --- whatsnew24.tex 19 Nov 2004 14:43:36 -0000 1.116 +++ whatsnew24.tex 19 Nov 2004 14:55:28 -0000 1.117 @@ -1079,7 +1079,6 @@ \end{itemize} -% XXX fill in these figures % pystone is almost useless for comparing different versions of Python; % instead, it excels at predicting relative Python performance on % different machines. @@ -1089,8 +1088,10 @@ % and 2.4. The net result of the 2.4 optimizations is that Python 2.4 runs the -pystone benchmark around XX\% faster than Python 2.3 and YY\% faster -than Python 2.2. +pystone benchmark around 5\% faster than Python 2.3 and 35\% faster +than Python 2.2. (pystone is not a particularly good benchmark, but +it's the most commonly used measurement of Python's performance. Your +own applications may show greater or smaller benefits from Python~2.4.) %====================================================================== From kbk at users.sourceforge.net Fri Nov 19 16:46:53 2004 From: kbk at users.sourceforge.net (kbk@users.sourceforge.net) Date: Fri Nov 19 16:46:57 2004 Subject: [Python-checkins] python/dist/src/Lib/idlelib NEWS.txt, 1.47, 1.48 idlever.py, 1.20, 1.21 run.py, 1.29, 1.30 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24220 Modified Files: NEWS.txt idlever.py run.py Log Message: On OpenBSD, terminating IDLE with ctrl-c from the command line caused a stuck subprocess MainThread because only the SocketThread was exiting. M NEWS.txt M idlever.py M run.py Index: NEWS.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- NEWS.txt 18 Nov 2004 12:32:27 -0000 1.47 +++ NEWS.txt 19 Nov 2004 15:46:49 -0000 1.48 @@ -1,3 +1,11 @@ +What's New in IDLE 1.1rc2? +============================= + +*Release date: XX-NOV-2004* + +- On OpenBSD, terminating IDLE with ctrl-c from the command line caused a + stuck subprocess MainThread because only the SocketThread was exiting. + What's New in IDLE 1.1b3/rc1? ============================= Index: idlever.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/idlever.py,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- idlever.py 18 Nov 2004 12:32:27 -0000 1.20 +++ idlever.py 19 Nov 2004 15:46:49 -0000 1.21 @@ -1 +1 @@ -IDLE_VERSION = "1.1c1" +IDLE_VERSION = "1.1c2" Index: run.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/run.py,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- run.py 4 Jul 2004 01:25:56 -0000 1.29 +++ run.py 19 Nov 2004 15:46:49 -0000 1.30 @@ -215,6 +215,7 @@ Interrupt the MainThread and exit server if link is dropped. """ + global quitting try: raise except SystemExit: @@ -233,7 +234,8 @@ traceback.print_exc(file=erf) print>>erf, '\n*** Unrecoverable, server exiting!' print>>erf, '-'*40 - exit() + quitting = True + thread.interrupt_main() class MyHandler(rpc.RPCHandler): From facundobatista at users.sourceforge.net Sat Nov 20 01:33:54 2004 From: facundobatista at users.sourceforge.net (facundobatista@users.sourceforge.net) Date: Sat Nov 20 01:33:57 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libdecimal.tex,1.20,1.21 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22542 Modified Files: libdecimal.tex Log Message: Fixed quantize syntax. Index: libdecimal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdecimal.tex,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- libdecimal.tex 12 Nov 2004 02:03:36 -0000 1.20 +++ libdecimal.tex 20 Nov 2004 00:33:51 -0000 1.21 @@ -378,7 +378,7 @@ \end{methoddesc} \begin{methoddesc}{quantize} - {\optional{exp \optional{, rounding\optional{, context\optional{, watchexp}}}}} + {exp \optional{, rounding\optional{, context\optional{, watchexp}}}} Quantize makes the exponent the same as \var{exp}. Searches for a rounding method in \var{rounding}, then in \var{context}, and then in the current context. From bcannon at users.sourceforge.net Sat Nov 20 22:10:09 2004 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Sat Nov 20 22:10:12 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_socket.py, 1.76, 1.77 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27427/Lib/test Modified Files: test_socket.py Log Message: Add 'linux2' as one of the platforms that does not use the echo service as one of the test possiblities for testGetServBy(). Index: test_socket.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_socket.py,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- test_socket.py 18 Aug 2004 15:13:41 -0000 1.76 +++ test_socket.py 20 Nov 2004 21:10:07 -0000 1.77 @@ -311,7 +311,8 @@ # Find one service that exists, then check all the related interfaces. # I've ordered this by protocols that have both a tcp and udp # protocol, at least for modern Linuxes. - if sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', 'darwin'): + if sys.platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', + 'darwin'): # avoid the 'echo' service on this platform, as there is an # assumption breaking non-standard port/protocol entry services = ('daytime', 'qotd', 'domain') From loewis at users.sourceforge.net Sun Nov 21 11:16:28 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun Nov 21 11:16:31 2004 Subject: [Python-checkins] python/dist/src/Tools/msi msi.py,1.15,1.16 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/msi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3832 Modified Files: msi.py Log Message: Include site-packages directory. Index: msi.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/msi/msi.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- msi.py 18 Nov 2004 08:00:33 -0000 1.15 +++ msi.py 21 Nov 2004 10:16:26 -0000 1.16 @@ -876,6 +876,7 @@ dirs[dir]=lib lib.glob("*.txt") if dir=='site-packages': + lib.add_file("README.txt", src="README") continue files = lib.glob("*.py") files += lib.glob("*.pyw") From lemburg at users.sourceforge.net Mon Nov 22 14:02:32 2004 From: lemburg at users.sourceforge.net (lemburg@users.sourceforge.net) Date: Mon Nov 22 14:02:35 2004 Subject: [Python-checkins] python/dist/src/Include unicodeobject.h, 2.47, 2.48 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv780/Include Modified Files: unicodeobject.h Log Message: Correct the handling of 0-termination of PyUnicode_AsWideChar() and its usage in PyLocale_strcoll(). Clarify the documentation on this. Thanks to Andreas Degert for pointing this out. Index: unicodeobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v retrieving revision 2.47 retrieving revision 2.48 diff -u -d -r2.47 -r2.48 --- unicodeobject.h 31 Oct 2004 05:46:59 -0000 2.47 +++ unicodeobject.h 22 Nov 2004 13:02:29 -0000 2.48 @@ -512,10 +512,16 @@ int size /* size of buffer */ ); -/* Copies the Unicode Object contents into the whcar_t buffer w. At +/* Copies the Unicode Object contents into the wchar_t buffer w. At most size wchar_t characters are copied. - Returns the number of wchar_t characters copied or -1 in case of an + Note that the resulting wchar_t string may or may not be + 0-terminated. It is the responsibility of the caller to make sure + that the wchar_t string is 0-terminated in case this is required by + the application. + + Returns the number of wchar_t characters copied (excluding a + possibly trailing 0-termination character) or -1 in case of an error. */ PyAPI_FUNC(int) PyUnicode_AsWideChar( From lemburg at users.sourceforge.net Mon Nov 22 14:02:32 2004 From: lemburg at users.sourceforge.net (lemburg@users.sourceforge.net) Date: Mon Nov 22 14:02:37 2004 Subject: [Python-checkins] python/dist/src/Modules _localemodule.c, 2.49, 2.50 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv780/Modules Modified Files: _localemodule.c Log Message: Correct the handling of 0-termination of PyUnicode_AsWideChar() and its usage in PyLocale_strcoll(). Clarify the documentation on this. Thanks to Andreas Degert for pointing this out. Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.49 retrieving revision 2.50 diff -u -d -r2.49 -r2.50 --- _localemodule.c 27 Aug 2004 05:00:22 -0000 2.49 +++ _localemodule.c 22 Nov 2004 13:02:30 -0000 2.50 @@ -305,7 +305,6 @@ } /* Convert the unicode strings to wchar[]. */ len1 = PyUnicode_GET_SIZE(os1) + 1; - len2 = PyUnicode_GET_SIZE(os2) + 1; ws1 = PyMem_MALLOC(len1 * sizeof(wchar_t)); if (!ws1) { PyErr_NoMemory(); @@ -313,6 +312,8 @@ } if (PyUnicode_AsWideChar((PyUnicodeObject*)os1, ws1, len1) == -1) goto done; + ws1[len1 - 1] = 0; + len2 = PyUnicode_GET_SIZE(os2) + 1; ws2 = PyMem_MALLOC(len2 * sizeof(wchar_t)); if (!ws2) { PyErr_NoMemory(); @@ -320,6 +321,7 @@ } if (PyUnicode_AsWideChar((PyUnicodeObject*)os2, ws2, len2) == -1) goto done; + ws2[len2 - 1] = 0; /* Collate the strings. */ result = PyInt_FromLong(wcscoll(ws1, ws2)); done: From lemburg at users.sourceforge.net Mon Nov 22 14:02:34 2004 From: lemburg at users.sourceforge.net (lemburg@users.sourceforge.net) Date: Mon Nov 22 14:02:39 2004 Subject: [Python-checkins] python/dist/src/Objects unicodeobject.c, 2.229, 2.230 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv780/Objects Modified Files: unicodeobject.c Log Message: Correct the handling of 0-termination of PyUnicode_AsWideChar() and its usage in PyLocale_strcoll(). Clarify the documentation on this. Thanks to Andreas Degert for pointing this out. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.229 retrieving revision 2.230 diff -u -d -r2.229 -r2.230 --- unicodeobject.c 15 Oct 2004 07:45:05 -0000 2.229 +++ unicodeobject.c 22 Nov 2004 13:02:30 -0000 2.230 @@ -384,8 +384,11 @@ PyErr_BadInternalCall(); return -1; } + + /* If possible, try to copy the 0-termination as well */ if (size > PyUnicode_GET_SIZE(unicode)) - size = PyUnicode_GET_SIZE(unicode); + size = PyUnicode_GET_SIZE(unicode) + 1; + #ifdef HAVE_USABLE_WCHAR_T memcpy(w, unicode->str, size * sizeof(wchar_t)); #else @@ -398,6 +401,9 @@ } #endif + if (size > PyUnicode_GET_SIZE(unicode)) + return PyUnicode_GET_SIZE(unicode); + else return size; } From lemburg at users.sourceforge.net Mon Nov 22 14:02:34 2004 From: lemburg at users.sourceforge.net (lemburg@users.sourceforge.net) Date: Mon Nov 22 14:02:40 2004 Subject: [Python-checkins] python/dist/src/Doc/api concrete.tex,1.57,1.58 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/api In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv780/Doc/api Modified Files: concrete.tex Log Message: Correct the handling of 0-termination of PyUnicode_AsWideChar() and its usage in PyLocale_strcoll(). Clarify the documentation on this. Thanks to Andreas Degert for pointing this out. Index: concrete.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/concrete.tex,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- concrete.tex 29 Sep 2004 21:39:26 -0000 1.57 +++ concrete.tex 22 Nov 2004 13:02:31 -0000 1.58 @@ -995,9 +995,13 @@ wchar_t *w, int size} Copies the Unicode object contents into the \ctype{wchar_t} buffer - \var{w}. At most \var{size} \ctype{wchar_t} characters are copied. - Returns the number of \ctype{wchar_t} characters copied or -1 in - case of an error. + \var{w}. At most \var{size} \ctype{wchar_t} characters are copied + (excluding a possibly trailing 0-termination character). Returns + the number of \ctype{wchar_t} characters copied or -1 in case of an + error. Note that the resulting \ctype{wchar_t} string may or may + not be 0-terminated. It is the responsibility of the caller to make + sure that the \ctype{wchar_t} string is 0-terminated in case this is + required by the application. \end{cfuncdesc} From tim_one at users.sourceforge.net Mon Nov 22 17:49:05 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 22 17:49:08 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex,1.144,1.145 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21891/Doc/lib Modified Files: libos.tex Log Message: SF bug 1071087: os.walk example for deleting a full tree is sometime wrong. Clarify that the example assumes no links are present; the point of the example is to illustrate a need for topdown=False, not to wrestle with platform-dependent link convolutions. Also spell os.path.join() out in full, instead of using a shortcut import. The bug reporter was confused by that too, and it's clearer this way. Bugfix candidate; but I don't intend to backport it. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.144 retrieving revision 1.145 diff -u -d -r1.144 -r1.145 --- libos.tex 4 Nov 2004 21:27:48 -0000 1.144 +++ libos.tex 22 Nov 2004 16:49:02 -0000 1.145 @@ -1185,16 +1185,16 @@ directory is empty: \begin{verbatim} -import os -from os.path import join -# Delete everything reachable from the directory named in 'top'. +# Delete everything reachable from the directory named in 'top', +# assuming there are no symbolic links. # CAUTION: This is dangerous! For example, if top == '/', it # could delete all your disk files. +import os for root, dirs, files in os.walk(top, topdown=False): for name in files: - os.remove(join(root, name)) + os.remove(os.path.join(root, name)) for name in dirs: - os.rmdir(join(root, name)) + os.rmdir(os.path.join(root, name)) \end{verbatim} \versionadded{2.3} From tim_one at users.sourceforge.net Mon Nov 22 17:53:48 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Nov 22 17:53:51 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex,1.145,1.146 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24459/Doc/lib Modified Files: libos.tex Log Message: os.walk(): Changed the "sum of bytes consumed by files" example to use a generator expression instead of a listcomp. Not a backport candidate (genexps are new in 2.4). Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.145 retrieving revision 1.146 diff -u -d -r1.145 -r1.146 --- libos.tex 22 Nov 2004 16:49:02 -0000 1.145 +++ libos.tex 22 Nov 2004 16:53:46 -0000 1.146 @@ -1174,7 +1174,7 @@ from os.path import join, getsize for root, dirs, files in os.walk('python/Lib/email'): print root, "consumes", - print sum([getsize(join(root, name)) for name in files]), + print sum(getsize(join(root, name)) for name in files), print "bytes in", len(files), "non-directory files" if 'CVS' in dirs: dirs.remove('CVS') # don't visit CVS directories From jlgijsbers at users.sourceforge.net Tue Nov 23 10:27:30 2004 From: jlgijsbers at users.sourceforge.net (jlgijsbers@users.sourceforge.net) Date: Tue Nov 23 10:27:33 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_shutil.py,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14357 Modified Files: test_shutil.py Log Message: Bug #1071513: don't test on Cygwin, as chmod doesn't work reliably there (http://www.cygwin.com/faq/faq_3.html#SEC41). Also check whether onerror has actually been called so this test will fail on assertion instead of on trying to chmod a non-existent file. Index: test_shutil.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_shutil.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- test_shutil.py 1 Nov 2004 02:40:52 -0000 1.9 +++ test_shutil.py 23 Nov 2004 09:27:27 -0000 1.10 @@ -3,6 +3,7 @@ import unittest import shutil import tempfile +import sys import stat import os import os.path @@ -15,7 +16,7 @@ filename = tempfile.mktemp() self.assertRaises(OSError, shutil.rmtree, filename) - if hasattr(os, 'chmod'): + if hasattr(os, 'chmod') and sys.platform[:6] != 'cygwin': def test_on_error(self): self.errorState = 0 os.mkdir(TESTFN) @@ -29,6 +30,8 @@ os.chmod(TESTFN, stat.S_IREAD) shutil.rmtree(TESTFN, onerror=self.check_args_to_onerror) + # Test whether onerror has actually been called. + self.assertEqual(self.errorState, 2) # Make writable again. os.chmod(TESTFN, old_dir_mode) @@ -47,6 +50,7 @@ self.assertEqual(func, os.rmdir) self.assertEqual(arg, TESTFN) self.assertEqual(exc[0], OSError) + self.errorState = 2 def test_rmtree_dont_delete_file(self): # When called on a file instead of a directory, don't delete it. From kbk at users.sourceforge.net Tue Nov 23 19:06:16 2004 From: kbk at users.sourceforge.net (kbk@users.sourceforge.net) Date: Tue Nov 23 19:06:19 2004 Subject: [Python-checkins] python/dist/src/Python ceval.c,2.418,2.419 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15637/Python Modified Files: ceval.c Log Message: Hye-Shik Chang's fix for Bug 875692. Improve signal handling, especially when using threads, by forcing an early re-execution of PyEval_EvalFrame() "periodic" code when things_to_do is not cleared by Py_MakePendingCalls(). M Misc/NEWS M Python/ceval.c Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.418 retrieving revision 2.419 diff -u -d -r2.418 -r2.419 --- ceval.c 11 Oct 2004 02:40:50 -0000 2.418 +++ ceval.c 23 Nov 2004 18:06:08 -0000 2.419 @@ -786,6 +786,12 @@ why = WHY_EXCEPTION; goto on_error; } + if (things_to_do) + /* MakePendingCalls() didn't succeed. + Force early re-execution of this + "periodic" code, possibly after + a thread switch */ + _Py_Ticker = 0; } #ifdef WITH_THREAD if (interpreter_lock) { From kbk at users.sourceforge.net Tue Nov 23 19:06:40 2004 From: kbk at users.sourceforge.net (kbk@users.sourceforge.net) Date: Tue Nov 23 19:06:43 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1190,1.1191 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15637/Misc Modified Files: NEWS Log Message: Hye-Shik Chang's fix for Bug 875692. Improve signal handling, especially when using threads, by forcing an early re-execution of PyEval_EvalFrame() "periodic" code when things_to_do is not cleared by Py_MakePendingCalls(). M Misc/NEWS M Python/ceval.c Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1190 retrieving revision 1.1191 diff -u -d -r1.1190 -r1.1191 --- NEWS 18 Nov 2004 12:32:25 -0000 1.1190 +++ NEWS 23 Nov 2004 18:06:03 -0000 1.1191 @@ -4,6 +4,19 @@ (editors: check NEWS.help for information about editing NEWS using ReST.) +What's New in Python 2.4 release candidate 2 +===================================================== + +*Release date: XX-NOV-2004* + +Core and builtins +----------------- + +- Bug 875692: Improve signal handling, especially when using threads, by + forcing an early re-execution of PyEval_EvalFrame() "periodic" code when + things_to_do is not cleared by Py_MakePendingCalls(). + + What's New in Python 2.4 (release candidate 1|beta 3) ===================================================== From bcannon at users.sourceforge.net Wed Nov 24 04:01:46 2004 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Wed Nov 24 04:01:49 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_tcl.py,1.5,1.6 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12512/Lib/test Modified Files: test_tcl.py Log Message: Have testLoadTkFailure() skip on cygwin since Tcl/Tk on cygwin renders to the Windows GDI directly and thus does not need a DISPLAY environment variable. Thanks Jason Tishler. Index: test_tcl.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_tcl.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- test_tcl.py 8 Jul 2004 04:22:19 -0000 1.5 +++ test_tcl.py 24 Nov 2004 03:01:36 -0000 1.6 @@ -129,7 +129,9 @@ import os old_display = None import sys - if sys.platform.startswith('win') or sys.platform.startswith('darwin'): + if (sys.platform.startswith('win') or + sys.platform.startswith('darwin') or + sys.platform.startswith('cygwin')): return # no failure possible on windows? if 'DISPLAY' in os.environ: old_display = os.environ['DISPLAY'] From rhettinger at users.sourceforge.net Wed Nov 24 06:53:29 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Nov 24 06:53:32 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libdecimal.tex,1.21,1.22 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18609 Modified Files: libdecimal.tex Log Message: SF bug #1071566: moneyfmt recipe in decimal documentation has error Index: libdecimal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdecimal.tex,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- libdecimal.tex 20 Nov 2004 00:33:51 -0000 1.21 +++ libdecimal.tex 24 Nov 2004 05:53:26 -0000 1.22 @@ -993,6 +993,8 @@ '1.234.568-' >>> moneyfmt(d, curr='$', neg='(', trailneg=')') '($1,234,567.89)' + >>> moneyfmt(Decimal(123456)) + '123,456.00' """ q = Decimal((0, (1,), -places)) # 2 places --> '0.01' @@ -1009,7 +1011,7 @@ while digits: build(next()) i += 1 - if i == 3: + if i == 3 and digits: i = 0 build(sep) build(curr) From rhettinger at users.sourceforge.net Wed Nov 24 08:28:51 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Nov 24 08:28:54 2004 Subject: [Python-checkins] python/dist/src/Lib decimal.py,1.30,1.31 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2088 Modified Files: decimal.py Log Message: SF bug #1071588 coercing decimal to int doesn't work between -1 and 1 Index: decimal.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/decimal.py,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- decimal.py 27 Oct 2004 06:21:46 -0000 1.30 +++ decimal.py 24 Nov 2004 07:28:48 -0000 1.31 @@ -1410,14 +1410,14 @@ return context._raise_error(InvalidContext) elif self._isinfinity(): raise OverflowError, "Cannot convert infinity to long" - if not self: - return 0 - sign = '-'*self._sign if self._exp >= 0: - s = sign + ''.join(map(str, self._int)) + '0'*self._exp - return int(s) - s = sign + ''.join(map(str, self._int))[:self._exp] - return int(s) + s = ''.join(map(str, self._int)) + '0'*self._exp + else: + s = ''.join(map(str, self._int))[:self._exp] + if s == '': + s = '0' + sign = '-'*self._sign + return int(sign + s) def __long__(self): """Converts to a long. From rhettinger at users.sourceforge.net Wed Nov 24 08:28:51 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Nov 24 08:28:55 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_decimal.py, 1.14, 1.15 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2088/test Modified Files: test_decimal.py Log Message: SF bug #1071588 coercing decimal to int doesn't work between -1 and 1 Index: test_decimal.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_decimal.py,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- test_decimal.py 4 Sep 2004 20:09:13 -0000 1.14 +++ test_decimal.py 24 Nov 2004 07:28:48 -0000 1.15 @@ -967,13 +967,13 @@ self.assertEqual(d, e) def test_int(self): - data = '1.0 1.1 1.9 2.0 0.0 -1.0 -1.1 -1.9 -2.0'.split() - for s in data: + for x in range(-250, 250): + s = '%0.2f' % (x / 100.0) # should work the same as for floats self.assertEqual(int(Decimal(s)), int(float(s))) - # should work the same as ROUND_DOWN + # should work the same as to_integral in the ROUND_DOWN mode d = Decimal(s) - r = Context(prec=1, rounding=ROUND_DOWN).create_decimal(s) + r = d.to_integral(ROUND_DOWN) self.assertEqual(Decimal(int(d)), r) class ContextAPItests(unittest.TestCase): From fdrake at users.sourceforge.net Wed Nov 24 15:57:07 2004 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Nov 24 15:57:10 2004 Subject: [Python-checkins] python/dist/src/Doc Makefile.deps,1.118,1.119 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30194 Modified Files: Makefile.deps Log Message: add missing dependency Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- Makefile.deps 31 Aug 2004 13:22:43 -0000 1.118 +++ Makefile.deps 24 Nov 2004 14:57:04 -0000 1.119 @@ -141,6 +141,7 @@ lib/libmath.tex \ lib/librand.tex \ lib/libwhrandom.tex \ + lib/libdecimal.tex \ lib/libarray.tex \ lib/liballos.tex \ lib/libos.tex \ From effbot at users.sourceforge.net Wed Nov 24 23:31:15 2004 From: effbot at users.sourceforge.net (effbot@users.sourceforge.net) Date: Wed Nov 24 23:31:17 2004 Subject: [Python-checkins] python/dist/src/Lib/distutils msvccompiler.py, 1.62, 1.63 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7702/Lib/distutils Modified Files: msvccompiler.py Log Message: SF patch #1071739 (by Christos Georgiou) This patch offers a better explanation in case the MS VC++ (free) toolkit is installed but the .NET Framework SDK is not. Index: msvccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/msvccompiler.py,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- msvccompiler.py 10 Nov 2004 22:23:14 -0000 1.62 +++ msvccompiler.py 24 Nov 2004 22:31:11 -0000 1.63 @@ -124,10 +124,15 @@ self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir") net = r"Software\Microsoft\.NETFramework" self.set_macro("FrameworkDir", net, "installroot") - if version > 7.0: - self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") - else: - self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") + try: + if version > 7.0: + self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") + else: + self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") + except KeyError, exc: # + raise DistutilsPlatformError, \ + ("The .NET Framework SDK needs to be installed before " + "building extensions for Python.") p = r"Software\Microsoft\NET Framework Setup\Product" for base in HKEYS: From akuchling at users.sourceforge.net Thu Nov 25 02:15:28 2004 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Thu Nov 25 02:15:31 2004 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.117, 1.118 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13432 Modified Files: whatsnew24.tex Log Message: Following a LtU thread, change introductory paragraph of decimal section Index: whatsnew24.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- whatsnew24.tex 19 Nov 2004 14:55:28 -0000 1.117 +++ whatsnew24.tex 25 Nov 2004 01:15:25 -0000 1.118 @@ -7,7 +7,7 @@ % to be covered. --amk \title{What's New in Python 2.4} -\release{1.0} +\release{1.01} \author{A.M.\ Kuchling} \authoraddress{ \strong{Python Software Foundation}\\ @@ -525,10 +525,12 @@ Python has always supported floating-point (FP) numbers, based on the underlying C \ctype{double} type, as a data type. However, while most -programming languages provide a floating-point type, most people (even -programmers) are unaware that computing with floating-point numbers -entails certain unavoidable inaccuracies. The new decimal type -provides a way to avoid these inaccuracies. +programming languages provide a floating-point type, many people (even +programmers) are unaware that floating-point numbers don't represent +certain decimal fractions accurately. The new \class{Decimal} type +can represent these fractions accurately, up to a user-specified +precision limit. + \subsection{Why is Decimal needed?} @@ -1726,7 +1728,7 @@ The author would like to thank the following people for offering suggestions, corrections and assistance with various drafts of this -article: Hye-Shik Chang, Michael Dyck, Raymond Hettinger, Hamish Lawson, -Fredrik Lundh. +article: Koray Can, Hye-Shik Chang, Michael Dyck, Raymond Hettinger, +Brian Hurt, Hamish Lawson, Fredrik Lundh. \end{document} From perky at users.sourceforge.net Thu Nov 25 05:04:23 2004 From: perky at users.sourceforge.net (perky@users.sourceforge.net) Date: Thu Nov 25 05:04:27 2004 Subject: [Python-checkins] python/dist/src/Modules readline.c,2.78,2.79 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14827/Modules Modified Files: readline.c Log Message: Rename a static variable "history_length" to "_history_length". GNU readline exports a global variable that has such a name already and the collision makes gcc4 doesn't compile the source. Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.78 retrieving revision 2.79 diff -u -d -r2.78 -r2.79 --- readline.c 7 Oct 2004 13:46:33 -0000 2.78 +++ readline.c 25 Nov 2004 04:04:20 -0000 2.79 @@ -94,7 +94,7 @@ return Py_None; } -static int history_length = -1; /* do not truncate history by default */ +static int _history_length = -1; /* do not truncate history by default */ PyDoc_STRVAR(doc_read_history_file, "read_history_file([filename]) -> None\n\ Load a readline history file.\n\ @@ -110,8 +110,8 @@ if (!PyArg_ParseTuple(args, "|z:write_history_file", &s)) return NULL; errno = write_history(s); - if (!errno && history_length >= 0) - history_truncate_file(s, history_length); + if (!errno && _history_length >= 0) + history_truncate_file(s, _history_length); if (errno) return PyErr_SetFromErrno(PyExc_IOError); Py_INCREF(Py_None); @@ -129,10 +129,10 @@ static PyObject* set_history_length(PyObject *self, PyObject *args) { - int length = history_length; + int length = _history_length; if (!PyArg_ParseTuple(args, "i:set_history_length", &length)) return NULL; - history_length = length; + _history_length = length; Py_INCREF(Py_None); return Py_None; } @@ -149,7 +149,7 @@ static PyObject* get_history_length(PyObject *self, PyObject *noarg) { - return PyInt_FromLong(history_length); + return PyInt_FromLong(_history_length); } PyDoc_STRVAR(get_history_length_doc, From rhettinger at users.sourceforge.net Thu Nov 25 05:47:14 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Nov 25 05:47:17 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libdecimal.tex,1.22,1.23 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23982 Modified Files: libdecimal.tex Log Message: Make sure the money formatting recipe can doesn't run out of digits to the right of the decimal point. Index: libdecimal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdecimal.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- libdecimal.tex 24 Nov 2004 05:53:26 -0000 1.22 +++ libdecimal.tex 25 Nov 2004 04:47:09 -0000 1.23 @@ -979,12 +979,12 @@ places: required number of places after the decimal point curr: optional currency symbol before the sign (may be blank) - sep: optional grouping separator (comma, period, or blank) + sep: optional grouping separator (comma, period, space, or blank) dp: decimal point indicator (comma or period) only specify as blank when places is zero - pos: optional sign for positive numbers: "+", space or blank - neg: optional sign for negative numbers: "-", "(", space or blank - trailneg:optional trailing minus indicator: "-", ")", space or blank + pos: optional sign for positive numbers: '+', space or blank + neg: optional sign for negative numbers: '-', '(', space or blank + trailneg:optional trailing minus indicator: '-', ')', space or blank >>> d = Decimal('-1234567.8901') >>> moneyfmt(d, curr='$') @@ -993,19 +993,25 @@ '1.234.568-' >>> moneyfmt(d, curr='$', neg='(', trailneg=')') '($1,234,567.89)' - >>> moneyfmt(Decimal(123456)) - '123,456.00' - + >>> moneyfmt(Decimal(123456789), sep=' ') + '123 456 789.00' + >>> moneyfmt(Decimal('-0.02'), neg='<', trailneg='>') + '<.02>' + """ q = Decimal((0, (1,), -places)) # 2 places --> '0.01' sign, digits, exp = value.quantize(q).as_tuple() + assert exp == -places result = [] digits = map(str, digits) build, next = result.append, digits.pop if sign: build(trailneg) for i in range(places): - build(next()) + if digits: + build(next()) + else: + build('0') build(dp) i = 0 while digits: From rhettinger at users.sourceforge.net Thu Nov 25 06:16:24 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Nov 25 06:16:27 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libstdtypes.tex, 1.169, 1.170 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29014 Modified Files: libstdtypes.tex Log Message: Clarify the ordering of dictionary keys. Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.169 retrieving revision 1.170 diff -u -d -r1.169 -r1.170 --- libstdtypes.tex 11 Nov 2004 06:14:05 -0000 1.169 +++ libstdtypes.tex 25 Nov 2004 05:16:19 -0000 1.170 @@ -1367,8 +1367,10 @@ \item[(2)] \versionadded{2.2} -\item[(3)] Keys and values are listed in random order. If -\method{items()}, \method{keys()}, \method{values()}, +\item[(3)] Keys and values are listed in an arbitrary order which is +non-random, varies across Python implementations, and depends on the +dictionary's history of insertions and deletions. +If \method{items()}, \method{keys()}, \method{values()}, \method{iteritems()}, \method{iterkeys()}, and \method{itervalues()} are called with no intervening modifications to the dictionary, the lists will directly correspond. This allows the creation of From rhettinger at users.sourceforge.net Thu Nov 25 06:35:36 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Nov 25 06:35:41 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libdecimal.tex,1.23,1.24 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32532 Modified Files: libdecimal.tex Log Message: Fix typo. Index: libdecimal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdecimal.tex,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- libdecimal.tex 25 Nov 2004 04:47:09 -0000 1.23 +++ libdecimal.tex 25 Nov 2004 05:35:32 -0000 1.24 @@ -1095,7 +1095,7 @@ return +s def sin(x): - """Return the cosine of x as measured in radians. + """Return the sine of x as measured in radians. >>> print sin(Decimal('0.5')) 0.4794255386042030002732879352 From doerwalter at users.sourceforge.net Thu Nov 25 13:23:26 2004 From: doerwalter at users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Thu Nov 25 13:23:29 2004 Subject: [Python-checkins] python/dist/src/Lib/xml __init__.py,1.14,1.15 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11999/Lib/xml Modified Files: __init__.py Log Message: Fix typo in comment. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/__init__.py,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- __init__.py 13 Oct 2004 19:57:14 -0000 1.14 +++ __init__.py 25 Nov 2004 12:23:23 -0000 1.15 @@ -32,7 +32,7 @@ try: v = _xmlplus.version_info except AttributeError: - # _xmlplue is too old; ignore it + # _xmlplus is too old; ignore it pass else: if v >= _MINIMUM_XMLPLUS_VERSION: From astrand at users.sourceforge.net Sat Nov 27 08:44:13 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Sat Nov 27 08:44:17 2004 Subject: [Python-checkins] python/nondist/peps pep-0324.txt,1.6,1.7 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32293 Modified Files: pep-0324.txt Log Message: Corrected example "replacing shell pipe line". Index: pep-0324.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0324.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pep-0324.txt 12 Oct 2004 16:37:47 -0000 1.6 +++ pep-0324.txt 27 Nov 2004 07:44:10 -0000 1.7 @@ -354,7 +354,7 @@ output=`dmesg | grep hda` ==> p1 = Popen(["dmesg"], stdout=PIPE) - p2 = Popen(["grep", "hda"], stdin=p1.stdout) + p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE) output = p2.communicate()[0] From bwarsaw at users.sourceforge.net Sun Nov 28 01:21:45 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Sun Nov 28 01:21:50 2004 Subject: [Python-checkins] python/dist/src/Lib/email FeedParser.py, 1.11, 1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6103/Lib/email Modified Files: FeedParser.py Log Message: Fix for SF bug #1072623. When the last line of the input string does not end in a newline, and it's an end boundary, the FeedParser wasn't recognizing it as such. Tweak the regexp to make the ending linesep optional. For grins, clear self._partial when closing the BufferedSubFile. Added a test case. Index: FeedParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/FeedParser.py,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- FeedParser.py 9 Oct 2004 23:00:11 -0000 1.11 +++ FeedParser.py 28 Nov 2004 00:21:41 -0000 1.12 @@ -62,6 +62,7 @@ def close(self): # Don't forget any trailing partial line. self._lines.append(self._partial) + self._partial = '' self._closed = True def readline(self): @@ -279,7 +280,7 @@ separator = '--' + boundary boundaryre = re.compile( '(?P' + re.escape(separator) + - r')(?P--)?(?P[ \t]*)(?P\r\n|\r|\n)$') + r')(?P--)?(?P[ \t]*)(?P\r\n|\r|\n)?$') capturing_preamble = True preamble = [] linesep = False From bwarsaw at users.sourceforge.net Sun Nov 28 01:21:45 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Sun Nov 28 01:21:51 2004 Subject: [Python-checkins] python/dist/src/Lib/email/test test_email.py, 1.65, 1.66 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6103/Lib/email/test Modified Files: test_email.py Log Message: Fix for SF bug #1072623. When the last line of the input string does not end in a newline, and it's an end boundary, the FeedParser wasn't recognizing it as such. Tweak the regexp to make the ending linesep optional. For grins, clear self._partial when closing the BufferedSubFile. Added a test case. Index: test_email.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- test_email.py 6 Nov 2004 00:04:20 -0000 1.65 +++ test_email.py 28 Nov 2004 00:21:42 -0000 1.66 @@ -1351,6 +1351,20 @@ eq(msg.get_boundary(), ' XXXX') eq(len(msg.get_payload()), 2) + def test_boundary_without_trailing_newline(self): + m = Parser().parsestr("""\ +Content-Type: multipart/mixed; boundary="===============0012394164==" +MIME-Version: 1.0 + +--===============0012394164== +Content-Type: image/file1.jpg +MIME-Version: 1.0 +Content-Transfer-Encoding: base64 + +YXNkZg== +--===============0012394164==--""") + self.assertEquals(m.get_payload(0).get_payload(), 'YXNkZg==') + # Test some badly formatted messages From tim_one at users.sourceforge.net Sun Nov 28 02:10:04 2004 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sun Nov 28 02:10:07 2004 Subject: [Python-checkins] python/dist/src/Lib/distutils msvccompiler.py, 1.63, 1.64 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16026/Lib/distutils Modified Files: msvccompiler.py Log Message: Whitespace normalization. Index: msvccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/msvccompiler.py,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- msvccompiler.py 24 Nov 2004 22:31:11 -0000 1.63 +++ msvccompiler.py 28 Nov 2004 01:10:01 -0000 1.64 @@ -124,12 +124,12 @@ self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir") net = r"Software\Microsoft\.NETFramework" self.set_macro("FrameworkDir", net, "installroot") - try: - if version > 7.0: - self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") - else: - self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") - except KeyError, exc: # + try: + if version > 7.0: + self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") + else: + self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") + except KeyError, exc: # raise DistutilsPlatformError, \ ("The .NET Framework SDK needs to be installed before " "building extensions for Python.") From bwarsaw at users.sourceforge.net Mon Nov 29 02:10:17 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Mon Nov 29 02:10:20 2004 Subject: [Python-checkins] python/dist/src/Lib/email __init__.py,1.34,1.35 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19040 Modified Files: __init__.py Log Message: There's likely nothing more to do to the email package before Python 2.4 is final, so I'm marking email's version number as "3.0" (e.g. final). Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/__init__.py,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- __init__.py 9 Oct 2004 23:01:11 -0000 1.34 +++ __init__.py 29 Nov 2004 01:10:14 -0000 1.35 @@ -4,7 +4,7 @@ """A package for parsing, handling, and generating email messages.""" -__version__ = '3.0b1' +__version__ = '3.0' __all__ = [ 'base64MIME', From anthonybaxter at users.sourceforge.net Mon Nov 29 02:40:34 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Nov 29 02:40:36 2004 Subject: [Python-checkins] python/dist/src/Lib/idlelib idlever.py,1.21,1.22 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25566/Lib/idlelib Modified Files: idlever.py Log Message: preparing for 2.4 final (wooooooo!) Index: idlever.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/idlever.py,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- idlever.py 19 Nov 2004 15:46:49 -0000 1.21 +++ idlever.py 29 Nov 2004 01:40:31 -0000 1.22 @@ -1 +1 @@ -IDLE_VERSION = "1.1c2" +IDLE_VERSION = "1.1" From anthonybaxter at users.sourceforge.net Mon Nov 29 02:40:34 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Nov 29 02:40:37 2004 Subject: [Python-checkins] python/dist/src/Include patchlevel.h,2.82,2.83 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25566/Include Modified Files: patchlevel.h Log Message: preparing for 2.4 final (wooooooo!) Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.82 retrieving revision 2.83 diff -u -d -r2.82 -r2.83 --- patchlevel.h 15 Nov 2004 15:03:25 -0000 2.82 +++ patchlevel.h 29 Nov 2004 01:40:30 -0000 2.83 @@ -22,11 +22,11 @@ #define PY_MAJOR_VERSION 2 #define PY_MINOR_VERSION 4 #define PY_MICRO_VERSION 0 -#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA -#define PY_RELEASE_SERIAL 1 +#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL +#define PY_RELEASE_SERIAL 0 /* Version as a string */ -#define PY_VERSION "2.4c1" +#define PY_VERSION "2.4" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ From anthonybaxter at users.sourceforge.net Mon Nov 29 02:40:34 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Nov 29 02:40:38 2004 Subject: [Python-checkins] python/dist/src/Misc/RPM python-2.4.spec,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Misc/RPM In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25566/Misc/RPM Modified Files: python-2.4.spec Log Message: preparing for 2.4 final (wooooooo!) Index: python-2.4.spec =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/RPM/python-2.4.spec,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- python-2.4.spec 18 Nov 2004 12:32:27 -0000 1.7 +++ python-2.4.spec 29 Nov 2004 01:40:31 -0000 1.8 @@ -33,7 +33,7 @@ ################################# %define name python -%define version 2.4c1 +%define version 2.4 %define libvers 2.4 %define release 1pydotorg %define __prefix /usr From bwarsaw at users.sourceforge.net Mon Nov 29 04:46:56 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Mon Nov 29 04:46:59 2004 Subject: [Python-checkins] python/dist/src/Lib/email FeedParser.py, 1.12, 1.13 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19352/Lib/email Modified Files: FeedParser.py Log Message: RFC 2822 describes the characters allowed in a header field name. Conform to this, and add test cases. Index: FeedParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/FeedParser.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- FeedParser.py 28 Nov 2004 00:21:41 -0000 1.12 +++ FeedParser.py 29 Nov 2004 03:46:54 -0000 1.13 @@ -27,7 +27,9 @@ NLCRE_bol = re.compile('(\r\n|\r|\n)') NLCRE_eol = re.compile('(\r\n|\r|\n)$') NLCRE_crack = re.compile('(\r\n|\r|\n)') -headerRE = re.compile(r'^(From |[-\w]{2,}:|[\t ])') +# RFC 2822 $3.6.8 Optional fields. ftext is %d33-57 / %d59-126, Any character +# except controls, SP, and ":". +headerRE = re.compile(r'^(From |[\041-\071\073-\176]{2,}:|[\t ])') EMPTYSTRING = '' NL = '\n' From bwarsaw at users.sourceforge.net Mon Nov 29 04:46:56 2004 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Mon Nov 29 04:47:00 2004 Subject: [Python-checkins] python/dist/src/Lib/email/test test_email.py, 1.66, 1.67 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19352/Lib/email/test Modified Files: test_email.py Log Message: RFC 2822 describes the characters allowed in a header field name. Conform to this, and add test cases. Index: test_email.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- test_email.py 28 Nov 2004 00:21:42 -0000 1.66 +++ test_email.py 29 Nov 2004 03:46:54 -0000 1.67 @@ -2402,6 +2402,22 @@ eq(msg.get('Header'), value1) eq(msg.get('Next-Header'), value2) + def test_rfc2822_header_syntax(self): + eq = self.assertEqual + m = '>From: foo\nFrom: bar\n!"#QUX;~: zoo\n\nbody' + msg = email.message_from_string(m) + eq(len(msg.keys()), 3) + keys = msg.keys() + keys.sort() + eq(keys, ['!"#QUX;~', '>From', 'From']) + eq(msg.get_payload(), 'body') + + def test_rfc2822_space_not_allowed_in_header(self): + eq = self.assertEqual + m = '>From foo@example.com 11:25:53\nFrom: bar\n!"#QUX;~: zoo\n\nbody' + msg = email.message_from_string(m) + eq(len(msg.keys()), 0) + class TestBase64(unittest.TestCase): From rhettinger at users.sourceforge.net Mon Nov 29 06:54:51 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Nov 29 06:54:55 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_heapq.py,1.15,1.16 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10916/test Modified Files: test_heapq.py Log Message: Fix argument order in pure python version of nsmallest() and nlargest(). Index: test_heapq.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_heapq.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- test_heapq.py 28 Sep 2004 00:03:54 -0000 1.15 +++ test_heapq.py 29 Nov 2004 05:54:48 -0000 1.16 @@ -39,8 +39,11 @@ self.check_invariant(results) self.assertRaises(TypeError, heappush, []) - self.assertRaises(TypeError, heappush, None, None) - self.assertRaises(TypeError, heappop, None) + try: + self.assertRaises(TypeError, heappush, None, None) + self.assertRaises(TypeError, heappop, None) + except AttributeError: + pass def check_invariant(self, heap): # Check the heap invariant. From rhettinger at users.sourceforge.net Mon Nov 29 06:54:51 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Nov 29 06:54:56 2004 Subject: [Python-checkins] python/dist/src/Lib heapq.py,1.26,1.27 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10916 Modified Files: heapq.py Log Message: Fix argument order in pure python version of nsmallest() and nlargest(). Index: heapq.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/heapq.py,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- heapq.py 6 Sep 2004 07:04:09 -0000 1.26 +++ heapq.py 29 Nov 2004 05:54:47 -0000 1.27 @@ -175,7 +175,7 @@ for i in reversed(xrange(n//2)): _siftup(x, i) -def nlargest(iterable, n): +def nlargest(n, iterable): """Find the n largest elements in a dataset. Equivalent to: sorted(iterable, reverse=True)[:n] @@ -195,7 +195,7 @@ result.sort(reverse=True) return result -def nsmallest(iterable, n): +def nsmallest(n, iterable): """Find the n smallest elements in a dataset. Equivalent to: sorted(iterable)[:n] From rhettinger at users.sourceforge.net Mon Nov 29 09:53:21 2004 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Nov 29 09:53:25 2004 Subject: [Python-checkins] python/dist/src/Doc/tut tut.tex,1.259,1.260 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14092 Modified Files: tut.tex Log Message: Fix a nit. Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.259 retrieving revision 1.260 diff -u -d -r1.259 -r1.260 --- tut.tex 18 Nov 2004 06:20:30 -0000 1.259 +++ tut.tex 29 Nov 2004 08:53:14 -0000 1.260 @@ -4413,7 +4413,7 @@ Another key feature is that the local variables and execution state are automatically saved between calls. This made the function easier to write -and much more clear than an approach using class variables like +and much more clear than an approach using instance variables like \code{self.index} and \code{self.data}. In addition to automatic method creation and saving program state, when From loewis at users.sourceforge.net Mon Nov 29 10:57:17 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon Nov 29 10:57:20 2004 Subject: [Python-checkins] python/dist/src/PCbuild BUILDno.txt, 1.64, 1.65 pythoncore.vcproj, 1.24, 1.25 Message-ID: Update of /cvsroot/python/python/dist/src/PCbuild In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28106 Modified Files: BUILDno.txt pythoncore.vcproj Log Message: Bump buildno for 2.4 release Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- BUILDno.txt 7 Nov 2004 10:08:29 -0000 1.64 +++ BUILDno.txt 29 Nov 2004 09:57:14 -0000 1.65 @@ -33,6 +33,8 @@ Windows Python BUILD numbers ---------------------------- + 60 2.4 + 29-Nov-2004 59 2.4.0c1 7-Nov-2004 58 2.4.0b2 Index: pythoncore.vcproj =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/pythoncore.vcproj,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- pythoncore.vcproj 7 Nov 2004 10:08:29 -0000 1.24 +++ pythoncore.vcproj 29 Nov 2004 09:57:14 -0000 1.25 @@ -1385,7 +1385,7 @@ Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" - PreprocessorDefinitions="BUILD=59"/> + PreprocessorDefinitions="BUILD=60"/> @@ -1393,7 +1393,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" - PreprocessorDefinitions="BUILD=59"/> + PreprocessorDefinitions="BUILD=60"/> @@ -1401,7 +1401,7 @@ Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" - PreprocessorDefinitions="BUILD=59"/> + PreprocessorDefinitions="BUILD=60"/> Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6913 Modified Files: tut.tex Log Message: REVERT revision 1.260; the trunk is FROZEN. This change can be made on the trunk and release24-maint branch after the trunk is unfrozen. Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.260 retrieving revision 1.261 diff -u -d -r1.260 -r1.261 --- tut.tex 29 Nov 2004 08:53:14 -0000 1.260 +++ tut.tex 29 Nov 2004 13:12:44 -0000 1.261 @@ -4413,7 +4413,7 @@ Another key feature is that the local variables and execution state are automatically saved between calls. This made the function easier to write -and much more clear than an approach using instance variables like +and much more clear than an approach using class variables like \code{self.index} and \code{self.data}. In addition to automatic method creation and saving program state, when From anthonybaxter at users.sourceforge.net Tue Nov 30 02:28:58 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Nov 30 02:29:01 2004 Subject: [Python-checkins] python/dist/src/Lib/idlelib NEWS.txt,1.48,1.49 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27119/Lib/idlelib Modified Files: NEWS.txt Log Message: doodedoodedoo on the way to 2.4 final Index: NEWS.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- NEWS.txt 19 Nov 2004 15:46:49 -0000 1.48 +++ NEWS.txt 30 Nov 2004 01:28:55 -0000 1.49 @@ -1,7 +1,7 @@ -What's New in IDLE 1.1rc2? -============================= +What's New in IDLE 1.1? +======================= -*Release date: XX-NOV-2004* +*Release date: 30-NOV-2004* - On OpenBSD, terminating IDLE with ctrl-c from the command line caused a stuck subprocess MainThread because only the SocketThread was exiting. From anthonybaxter at users.sourceforge.net Tue Nov 30 02:28:58 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Nov 30 02:29:02 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1191,1.1192 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27119/Misc Modified Files: NEWS Log Message: doodedoodedoo on the way to 2.4 final Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1191 retrieving revision 1.1192 diff -u -d -r1.1191 -r1.1192 --- NEWS 23 Nov 2004 18:06:03 -0000 1.1191 +++ NEWS 30 Nov 2004 01:28:52 -0000 1.1192 @@ -4,10 +4,10 @@ (editors: check NEWS.help for information about editing NEWS using ReST.) -What's New in Python 2.4 release candidate 2 -===================================================== +What's New in Python 2.4 final? +=============================== -*Release date: XX-NOV-2004* +*Release date: 30-NOV-2004* Core and builtins ----------------- @@ -30,11 +30,6 @@ aside, all bugs in all three reports are fixed now. -Extension Modules ------------------ - -... - Library ------- @@ -71,37 +66,6 @@ - The PyRange_New() function is deprecated. -Documentation -------------- - -... - -Tests ------ - -... - -Windows -------- - -... - -Mac ---- - -... - -New platforms -------------- - -... - -Tools/Demos ------------ - -... - - What's New in Python 2.4 beta 2? ================================ From anthonybaxter at users.sourceforge.net Tue Nov 30 02:49:20 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Nov 30 02:49:24 2004 Subject: [Python-checkins] python/dist/src README,1.183,1.184 Message-ID: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31544 Modified Files: README Log Message: update gcc ref Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.183 retrieving revision 1.184 diff -u -d -r1.183 -r1.184 --- README 2 Sep 2004 16:37:51 -0000 1.183 +++ README 30 Nov 2004 01:49:18 -0000 1.184 @@ -217,7 +217,7 @@ optimization. This is a common problem with some versions of gcc, and some vendor-supplied compilers, which can sometimes be worked around by turning off optimization. Consider switching to stable versions -(gcc 2.95.2, or contact your vendor.) +(gcc 2.95.2, gcc 3.x, or contact your vendor.) From Python 2.0 onward, all Python C code is ANSI C. Compiling using old K&R-C-only compilers is no longer possible. ANSI C compilers are From anthonybaxter at users.sourceforge.net Tue Nov 30 12:53:14 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Nov 30 12:53:22 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1192,1.1193 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23239 Modified Files: NEWS Log Message: whoops! Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1192 retrieving revision 1.1193 diff -u -d -r1.1192 -r1.1193 --- NEWS 30 Nov 2004 01:28:52 -0000 1.1192 +++ NEWS 30 Nov 2004 11:53:10 -0000 1.1193 @@ -17,8 +17,8 @@ things_to_do is not cleared by Py_MakePendingCalls(). -What's New in Python 2.4 (release candidate 1|beta 3) -===================================================== +What's New in Python 2.4 (release candidate 1) +============================================== *Release date: 18-NOV-2004* From anthonybaxter at users.sourceforge.net Tue Nov 30 14:16:17 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Nov 30 14:16:20 2004 Subject: [Python-checkins] python/dist/src/Include patchlevel.h,2.83,2.84 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6434/Include Modified Files: patchlevel.h Log Message: post 2.4 release machinations Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.83 retrieving revision 2.84 diff -u -d -r2.83 -r2.84 --- patchlevel.h 29 Nov 2004 01:40:30 -0000 2.83 +++ patchlevel.h 30 Nov 2004 13:16:15 -0000 2.84 @@ -20,13 +20,13 @@ /* Version parsed out into numeric values */ #define PY_MAJOR_VERSION 2 -#define PY_MINOR_VERSION 4 +#define PY_MINOR_VERSION 5 #define PY_MICRO_VERSION 0 -#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL +#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA #define PY_RELEASE_SERIAL 0 /* Version as a string */ -#define PY_VERSION "2.4" +#define PY_VERSION "2.5a0" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ From anthonybaxter at users.sourceforge.net Tue Nov 30 14:17:00 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Nov 30 14:17:02 2004 Subject: [Python-checkins] python/dist/src/Include patchlevel.h, 2.83, 2.83.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6590/Include Modified Files: Tag: release24-maint patchlevel.h Log Message: post 2.4 machinations (branch) Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.83 retrieving revision 2.83.2.1 diff -u -d -r2.83 -r2.83.2.1 --- patchlevel.h 29 Nov 2004 01:40:30 -0000 2.83 +++ patchlevel.h 30 Nov 2004 13:16:58 -0000 2.83.2.1 @@ -26,7 +26,7 @@ #define PY_RELEASE_SERIAL 0 /* Version as a string */ -#define PY_VERSION "2.4" +#define PY_VERSION "2.4+" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ From anthonybaxter at users.sourceforge.net Tue Nov 30 14:44:11 2004 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Nov 30 14:44:14 2004 Subject: [Python-checkins] python/nondist/peps pep-0000.txt, 1.294, 1.295 pep-0320.txt, 1.20, 1.21 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12639 Modified Files: pep-0000.txt pep-0320.txt Log Message: pep 320 is finished. someone else can create the 2.5 release schedule pep Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.294 retrieving revision 1.295 diff -u -d -r1.294 -r1.295 --- pep-0000.txt 3 Nov 2004 16:58:30 -0000 1.294 +++ pep-0000.txt 30 Nov 2004 13:44:08 -0000 1.295 @@ -57,7 +57,6 @@ I 290 Code Migration and Modernization Hettinger I 291 Backward Compatibility for Standard Library Norwitz I 306 How to Change Python's Grammar Hudson - I 320 Python 2.4 Release Schedule Warsaw I 333 Python Web Server Gateway Interface v1.0 Eby I 3000 Python 3.0 Plans Kuchling, Cannon @@ -170,6 +169,7 @@ SF 305 CSV File API Montanaro, et al SF 307 Extensions to the pickle protocol GvR, Peters SF 311 Simplified GIL Acquisition for Extensions Hammond + IF 320 Python 2.4 Release Schedule Warsaw, et al SF 322 Reverse Iteration Hettinger SF 327 Decimal Data Type Batista @@ -351,7 +351,7 @@ SR 317 Eliminate Implicit Exception Instantiation Taschuk SA 318 Decorators for Functions and Methods Smith, et al S 319 Python Synchronize/Asynchronize Block Pelletier - I 320 Python 2.4 Release Schedule Warsaw + IF 320 Python 2.4 Release Schedule Warsaw, et al S 321 Date/Time Parsing and Formatting Kuchling SF 322 Reverse Iteration Hettinger S 323 Copyable Iterators Martelli Index: pep-0320.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0320.txt,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- pep-0320.txt 4 Nov 2004 03:20:23 -0000 1.20 +++ pep-0320.txt 30 Nov 2004 13:44:08 -0000 1.21 @@ -2,11 +2,11 @@ Title: Python 2.4 Release Schedule Version: $Revision$ Author: Barry Warsaw, Raymond Hettinger and Anthony Baxter -Status: Incomplete +Status: Final Type: Informational Created: 29-Jul-2003 Python-Version: 2.4 -Post-History: +Post-History: 1-Dec-2004 Abstract @@ -16,7 +16,7 @@ beta release. Bugs may be fixed until the final release. There will be at least two alpha releases, two beta releases, and - one release candidate. The release date is not yet fixed. + one release candidate. The release date was 30th November, 2004. Release Manager @@ -37,9 +37,9 @@ November 3: beta 2 [completed] - November 18: release candidate 1 [scheduled] + November 18: release candidate 1 [completed] - November 30: final [scheduled] + November 30: final [completed] Completed features for 2.4 From mwh at users.sourceforge.net Tue Nov 30 15:31:57 2004 From: mwh at users.sourceforge.net (mwh@users.sourceforge.net) Date: Tue Nov 30 15:32:00 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libfcntl.tex,1.36,1.37 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24300/Doc/lib Modified Files: libfcntl.tex Log Message: Hear the #error: change the default value of the mutable_arg argument to ioctl() and remove the warning when it is not supplied. Index: libfcntl.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfcntl.tex,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- libfcntl.tex 21 Jul 2004 01:41:14 -0000 1.36 +++ libfcntl.tex 30 Nov 2004 14:31:54 -0000 1.37 @@ -78,11 +78,9 @@ long which is then passed to \function{ioctl()} and copied back into the supplied buffer. - If \var{mutate_flag} is not supplied, then in 2.3 it defaults to - false. This is planned to change over the next few Python versions: - in 2.4 failing to supply \var{mutate_flag} will get a warning but - the same behavior and in versions later than 2.5 it will default to - true. + If \var{mutate_flag} is not supplied, then from Python 2.5 it + defaults to true, which is a change from versions 2.3 and 2.4. + Supply the argument explicitly if version portability is a priority. An example: From mwh at users.sourceforge.net Tue Nov 30 15:31:56 2004 From: mwh at users.sourceforge.net (mwh@users.sourceforge.net) Date: Tue Nov 30 15:32:04 2004 Subject: [Python-checkins] python/dist/src/Modules fcntlmodule.c,2.42,2.43 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24300/Modules Modified Files: fcntlmodule.c Log Message: Hear the #error: change the default value of the mutable_arg argument to ioctl() and remove the warning when it is not supplied. Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.42 retrieving revision 2.43 diff -u -d -r2.42 -r2.43 --- fcntlmodule.c 3 Jun 2004 12:47:26 -0000 2.42 +++ fcntlmodule.c 30 Nov 2004 14:31:54 -0000 2.43 @@ -99,7 +99,7 @@ int ret; char *str; int len; - int mutate_arg = 0; + int mutate_arg = 1; char buf[1024]; if (PyArg_ParseTuple(args, "O&iw#|i:ioctl", @@ -107,16 +107,6 @@ &str, &len, &mutate_arg)) { char *arg; - if (PyTuple_Size(args) == 3) { -#if (PY_MAJOR_VERSION>2) || (PY_MINOR_VERSION>=5) -#error Remove the warning, change mutate_arg to 1 -#endif - if (PyErr_Warn(PyExc_FutureWarning, - "ioctl with mutable buffer will mutate the buffer by default in 2.5" - ) < 0) - return NULL; - mutate_arg = 0; - } if (mutate_arg) { if (len <= sizeof buf) { memcpy(buf, str, len); From akuchling at users.sourceforge.net Tue Nov 30 15:42:26 2004 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue Nov 30 15:42:29 2004 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.118, 1.119 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26919 Modified Files: whatsnew24.tex Log Message: Update release date. Index: whatsnew24.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- whatsnew24.tex 25 Nov 2004 01:15:25 -0000 1.118 +++ whatsnew24.tex 30 Nov 2004 14:42:24 -0000 1.119 @@ -18,8 +18,8 @@ \maketitle \tableofcontents -This article explains the new features in Python 2.4, released in December -2004. +This article explains the new features in Python 2.4, released on +November~30, 2004. Python 2.4 is a medium-sized release. It doesn't introduce as many changes as the radical Python 2.2, but introduces more features than From astrand at users.sourceforge.net Tue Nov 30 19:06:44 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Tue Nov 30 19:06:47 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libsubprocess.tex, 1.2, 1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20008/Doc/lib Modified Files: libsubprocess.tex Log Message: Corrected example for replacing shell pipeline. Fixes bug 1073790. Index: libsubprocess.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsubprocess.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- libsubprocess.tex 7 Nov 2004 16:38:08 -0000 1.2 +++ libsubprocess.tex 30 Nov 2004 18:06:41 -0000 1.3 @@ -239,7 +239,7 @@ output=`dmesg | grep hda` ==> p1 = Popen(["dmesg"], stdout=PIPE) -p2 = Popen(["grep", "hda"], stdin=p1.stdout) +p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE) output = p2.communicate()[0] \end{verbatim} From astrand at users.sourceforge.net Tue Nov 30 19:06:45 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Tue Nov 30 19:06:48 2004 Subject: [Python-checkins] python/dist/src/Lib subprocess.py,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20008/Lib Modified Files: subprocess.py Log Message: Corrected example for replacing shell pipeline. Fixes bug 1073790. Index: subprocess.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/subprocess.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- subprocess.py 7 Nov 2004 14:30:34 -0000 1.8 +++ subprocess.py 30 Nov 2004 18:06:42 -0000 1.9 @@ -229,7 +229,7 @@ output=`dmesg | grep hda` ==> p1 = Popen(["dmesg"], stdout=PIPE) -p2 = Popen(["grep", "hda"], stdin=p1.stdout) +p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE) output = p2.communicate()[0] From astrand at users.sourceforge.net Tue Nov 30 19:11:41 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Tue Nov 30 19:11:43 2004 Subject: [Python-checkins] python/dist/src/Lib subprocess.py,1.8,1.8.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21169/Lib Modified Files: Tag: release24-maint subprocess.py Log Message: Corrected example for replacing shell pipeline. Fixes bug 1073790. Index: subprocess.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/subprocess.py,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -d -r1.8 -r1.8.2.1 --- subprocess.py 7 Nov 2004 14:30:34 -0000 1.8 +++ subprocess.py 30 Nov 2004 18:11:37 -0000 1.8.2.1 @@ -229,7 +229,7 @@ output=`dmesg | grep hda` ==> p1 = Popen(["dmesg"], stdout=PIPE) -p2 = Popen(["grep", "hda"], stdin=p1.stdout) +p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE) output = p2.communicate()[0] From astrand at users.sourceforge.net Tue Nov 30 19:11:41 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Tue Nov 30 19:11:44 2004 Subject: [Python-checkins] python/dist/src/Doc/lib libsubprocess.tex, 1.2, 1.2.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21169/Doc/lib Modified Files: Tag: release24-maint libsubprocess.tex Log Message: Corrected example for replacing shell pipeline. Fixes bug 1073790. Index: libsubprocess.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsubprocess.tex,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -d -r1.2 -r1.2.2.1 --- libsubprocess.tex 7 Nov 2004 16:38:08 -0000 1.2 +++ libsubprocess.tex 30 Nov 2004 18:11:36 -0000 1.2.2.1 @@ -239,7 +239,7 @@ output=`dmesg | grep hda` ==> p1 = Popen(["dmesg"], stdout=PIPE) -p2 = Popen(["grep", "hda"], stdin=p1.stdout) +p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE) output = p2.communicate()[0] \end{verbatim} From astrand at users.sourceforge.net Tue Nov 30 22:04:47 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Tue Nov 30 22:04:49 2004 Subject: [Python-checkins] python/dist/src/Lib subprocess.py,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2346 Modified Files: subprocess.py Log Message: Raise TypeError if bufsize argument is not an integer. Patch 1071755, slightly modified. Index: subprocess.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/subprocess.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- subprocess.py 30 Nov 2004 18:06:42 -0000 1.9 +++ subprocess.py 30 Nov 2004 21:04:44 -0000 1.10 @@ -504,6 +504,9 @@ """Create new Popen instance.""" _cleanup() + if not isinstance(bufsize, (int, long)): + raise TypeError("bufsize must be an integer") + if mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " From astrand at users.sourceforge.net Tue Nov 30 22:04:47 2004 From: astrand at users.sourceforge.net (astrand@users.sourceforge.net) Date: Tue Nov 30 22:04:51 2004 Subject: [Python-checkins] python/dist/src/Lib/test test_subprocess.py, 1.15, 1.16 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2346/test Modified Files: test_subprocess.py Log Message: Raise TypeError if bufsize argument is not an integer. Patch 1071755, slightly modified. Index: test_subprocess.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_subprocess.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- test_subprocess.py 17 Nov 2004 20:06:35 -0000 1.15 +++ test_subprocess.py 30 Nov 2004 21:04:45 -0000 1.16 @@ -394,6 +394,17 @@ # Subsequent invocations should just return the returncode self.assertEqual(p.wait(), 0) + + def test_invalid_bufsize(self): + # an invalid type of the bufsize argument should raise + # TypeError. + try: + subprocess.Popen([sys.executable, "-c", "pass"], "orange") + except TypeError: + pass + else: + self.fail("Expected TypeError") + # # POSIX tests # From loewis at users.sourceforge.net Tue Nov 30 23:08:38 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Tue Nov 30 23:08:42 2004 Subject: [Python-checkins] python/dist/src configure.in, 1.475, 1.475.2.1 configure, 1.462, 1.462.2.1 Message-ID: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17211 Modified Files: Tag: release24-maint configure.in configure Log Message: Fix term.h check so that HAVE_TERM_H is actually generated. Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.475 retrieving revision 1.475.2.1 diff -u -d -r1.475 -r1.475.2.1 --- configure.in 7 Nov 2004 01:24:11 -0000 1.475 +++ configure.in 30 Nov 2004 22:08:27 -0000 1.475.2.1 @@ -974,7 +974,7 @@ AC_HEADER_MAJOR # On Solaris, term.h requires curses.h -AC_CHECK_HEADER(term.h,,,[ +AC_CHECK_HEADERS(term.h,,,[ #ifdef HAVE_CURSES_H #include #endif Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.462 retrieving revision 1.462.2.1 diff -u -d -r1.462 -r1.462.2.1 --- configure 7 Nov 2004 01:24:12 -0000 1.462 +++ configure 30 Nov 2004 22:08:28 -0000 1.462.2.1 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.474 . +# From configure.in Revision: 1.475 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for python 2.4. # @@ -5382,9 +5382,13 @@ # On Solaris, term.h requires curses.h -echo "$as_me:$LINENO: checking for term.h" >&5 -echo $ECHO_N "checking for term.h... $ECHO_C" >&6 -if test "${ac_cv_header_term_h+set}" = set; then + +for ac_header in term.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5399,7 +5403,7 @@ #endif -#include +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -5423,18 +5427,25 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_header_term_h=yes + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_term_h=no +eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_term_h" >&5 -echo "${ECHO_T}$ac_cv_header_term_h" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi + +done # checks for typedefs From loewis at users.sourceforge.net Tue Nov 30 23:09:40 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Tue Nov 30 23:09:43 2004 Subject: [Python-checkins] python/dist/src configure, 1.462, 1.463 configure.in, 1.475, 1.476 Message-ID: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17364 Modified Files: configure configure.in Log Message: Bump version number to 2.5. Fix term.h check so that HAVE_TERM_H is actually generated. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.462 retrieving revision 1.463 diff -u -d -r1.462 -r1.463 --- configure 7 Nov 2004 01:24:12 -0000 1.462 +++ configure 30 Nov 2004 22:09:37 -0000 1.463 @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.in Revision: 1.474 . +# From configure.in Revision: 1.475 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for python 2.4. +# Generated by GNU Autoconf 2.59 for python 2.5. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -268,8 +268,8 @@ # Identity of this package. PACKAGE_NAME='python' PACKAGE_TARNAME='python' -PACKAGE_VERSION='2.4' -PACKAGE_STRING='python 2.4' +PACKAGE_VERSION='2.5' +PACKAGE_STRING='python 2.5' PACKAGE_BUGREPORT='' ac_unique_file="Include/object.h" @@ -779,7 +779,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures python 2.4 to adapt to many kinds of systems. +\`configure' configures python 2.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -836,7 +836,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of python 2.4:";; + short | recursive ) echo "Configuration of python 2.5:";; esac cat <<\_ACEOF @@ -983,7 +983,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -python configure 2.4 +python configure 2.5 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -997,7 +997,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by python $as_me 2.4, which was +It was created by python $as_me 2.5, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1349,7 +1349,7 @@ mv confdefs.h.new confdefs.h -VERSION=2.4 +VERSION=2.5 SOVERSION=1.0 @@ -5382,9 +5382,13 @@ # On Solaris, term.h requires curses.h -echo "$as_me:$LINENO: checking for term.h" >&5 -echo $ECHO_N "checking for term.h... $ECHO_C" >&6 -if test "${ac_cv_header_term_h+set}" = set; then + +for ac_header in term.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5399,7 +5403,7 @@ #endif -#include +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -5423,18 +5427,25 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_header_term_h=yes + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_term_h=no +eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_term_h" >&5 -echo "${ECHO_T}$ac_cv_header_term_h" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi +done # checks for typedefs @@ -20524,7 +20535,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by python $as_me 2.4, which was +This file was extended by python $as_me 2.5, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20584,7 +20595,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -python config.status 2.4 +python config.status 2.5 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.475 retrieving revision 1.476 diff -u -d -r1.475 -r1.476 --- configure.in 7 Nov 2004 01:24:11 -0000 1.475 +++ configure.in 30 Nov 2004 22:09:37 -0000 1.476 @@ -1,7 +1,7 @@ dnl Process this file with autoconf 2.0 or later to make a configure script. # Set VERSION so we only need to edit in one place (i.e., here) -m4_define(PYTHON_VERSION, 2.4) +m4_define(PYTHON_VERSION, 2.5) AC_REVISION($Revision$) AC_PREREQ(2.53) @@ -974,7 +974,7 @@ AC_HEADER_MAJOR # On Solaris, term.h requires curses.h -AC_CHECK_HEADER(term.h,,,[ +AC_CHECK_HEADERS(term.h,,,[ #ifdef HAVE_CURSES_H #include #endif From loewis at users.sourceforge.net Tue Nov 30 23:18:43 2004 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Tue Nov 30 23:18:45 2004 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.1193,1.1193.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19362/Misc Modified Files: Tag: release24-maint NEWS Log Message: Properly define HAVE_TERM_H if term.h is detected. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.1193 retrieving revision 1.1193.2.1 diff -u -d -r1.1193 -r1.1193.2.1 --- NEWS 30 Nov 2004 11:53:10 -0000 1.1193 +++ NEWS 30 Nov 2004 22:18:39 -0000 1.1193.2.1 @@ -4,6 +4,23 @@ (editors: check NEWS.help for information about editing NEWS using ReST.) +What's New in Python 2.4.1? +=========================== + +*Release date: xx-xxx-2005* + +Core and builtins +----------------- + +Library +------- + +Build +----- + +- term.h is now properly detected again. + + What's New in Python 2.4 final? ===============================