From rhettinger at users.sourceforge.net Mon Sep 1 16:12:10 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 18:12:14 2003 Subject: [Python-checkins] python/dist/src/Objects descrobject.c, 2.35, 2.36 dictobject.c, 2.146, 2.147 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv13315 Modified Files: descrobject.c dictobject.c Log Message: SF patch #798467: Update docstring of has_key for bool changes (Contributed by George Yoshida.) Index: descrobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/descrobject.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -d -r2.35 -r2.36 *** descrobject.c 9 Apr 2003 17:05:33 -0000 2.35 --- descrobject.c 1 Sep 2003 22:12:07 -0000 2.36 *************** *** 766,770 **** static PyMethodDef proxy_methods[] = { {"has_key", (PyCFunction)proxy_has_key, METH_O, ! PyDoc_STR("D.has_key(k) -> 1 if D has a key k, else 0")}, {"get", (PyCFunction)proxy_get, METH_VARARGS, PyDoc_STR("D.get(k[,d]) -> D[k] if D.has_key(k), else d." --- 766,770 ---- static PyMethodDef proxy_methods[] = { {"has_key", (PyCFunction)proxy_has_key, METH_O, ! PyDoc_STR("D.has_key(k) -> True if D has a key k, else False")}, {"get", (PyCFunction)proxy_get, METH_VARARGS, PyDoc_STR("D.get(k[,d]) -> D[k] if D.has_key(k), else d." Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.146 retrieving revision 2.147 diff -C2 -d -r2.146 -r2.147 *** dictobject.c 7 May 2003 00:49:40 -0000 2.146 --- dictobject.c 1 Sep 2003 22:12:08 -0000 2.147 *************** *** 1734,1738 **** PyDoc_STRVAR(has_key__doc__, ! "D.has_key(k) -> 1 if D has a key k, else 0"); PyDoc_STRVAR(get__doc__, --- 1734,1738 ---- PyDoc_STRVAR(has_key__doc__, ! "D.has_key(k) -> True if D has a key k, else False"); PyDoc_STRVAR(get__doc__, From rhettinger at users.sourceforge.net Mon Sep 1 16:14:44 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 18:14:48 2003 Subject: [Python-checkins] python/dist/src/Objects descrobject.c, 2.35, 2.35.10.1 dictobject.c, 2.146, 2.146.8.1 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv13909 Modified Files: Tag: release23-maint descrobject.c dictobject.c Log Message: SF patch #798467: Update docstring of has_key for bool changes (Contributed by George Yoshida.) Index: descrobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/descrobject.c,v retrieving revision 2.35 retrieving revision 2.35.10.1 diff -C2 -d -r2.35 -r2.35.10.1 *** descrobject.c 9 Apr 2003 17:05:33 -0000 2.35 --- descrobject.c 1 Sep 2003 22:14:42 -0000 2.35.10.1 *************** *** 766,770 **** static PyMethodDef proxy_methods[] = { {"has_key", (PyCFunction)proxy_has_key, METH_O, ! PyDoc_STR("D.has_key(k) -> 1 if D has a key k, else 0")}, {"get", (PyCFunction)proxy_get, METH_VARARGS, PyDoc_STR("D.get(k[,d]) -> D[k] if D.has_key(k), else d." --- 766,770 ---- static PyMethodDef proxy_methods[] = { {"has_key", (PyCFunction)proxy_has_key, METH_O, ! PyDoc_STR("D.has_key(k) -> True if D has a key k, else False")}, {"get", (PyCFunction)proxy_get, METH_VARARGS, PyDoc_STR("D.get(k[,d]) -> D[k] if D.has_key(k), else d." Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.146 retrieving revision 2.146.8.1 diff -C2 -d -r2.146 -r2.146.8.1 *** dictobject.c 7 May 2003 00:49:40 -0000 2.146 --- dictobject.c 1 Sep 2003 22:14:42 -0000 2.146.8.1 *************** *** 1734,1738 **** PyDoc_STRVAR(has_key__doc__, ! "D.has_key(k) -> 1 if D has a key k, else 0"); PyDoc_STRVAR(get__doc__, --- 1734,1738 ---- PyDoc_STRVAR(has_key__doc__, ! "D.has_key(k) -> True if D has a key k, else False"); PyDoc_STRVAR(get__doc__, From rhettinger at users.sourceforge.net Mon Sep 1 16:17:21 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 18:17:28 2003 Subject: [Python-checkins] python/dist/src/Misc ACKS,1.244,1.245 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv14584 Modified Files: ACKS Log Message: SF patch #798467: Update docstring of has_key for bool changes (Contributed by George Yoshida.) Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.244 retrieving revision 1.245 diff -C2 -d -r1.244 -r1.245 *** ACKS 13 Aug 2003 23:11:04 -0000 1.244 --- ACKS 1 Sep 2003 22:17:18 -0000 1.245 *************** *** 605,608 **** --- 605,609 ---- Ka-Ping Yee Bob Yodlowski + George Yoshida Masazumi Yoshikawa Danny Yoo From rhettinger at users.sourceforge.net Mon Sep 1 16:25:44 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 18:25:47 2003 Subject: [Python-checkins] python/dist/src/Modules posixmodule.c, 2.301, 2.302 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv15943 Modified Files: posixmodule.c Log Message: SF patch #798534: Windows os.popen needlessly gets a reference to tuple () (Contributed by Andrew Gaul.) Fixes a minor leak. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.301 retrieving revision 2.302 diff -C2 -d -r2.301 -r2.302 *** posixmodule.c 6 Aug 2003 02:46:58 -0000 2.301 --- posixmodule.c 1 Sep 2003 22:25:41 -0000 2.302 *************** *** 3616,3620 **** posix_popen(PyObject *self, PyObject *args) { ! PyObject *f, *s; int tm = 0; --- 3616,3620 ---- posix_popen(PyObject *self, PyObject *args) { ! PyObject *f; int tm = 0; *************** *** 3624,3629 **** if (!PyArg_ParseTuple(args, "s|si:popen", &cmdstring, &mode, &bufsize)) return NULL; - - s = PyTuple_New(0); if (*mode == 'r') --- 3624,3627 ---- From rhettinger at users.sourceforge.net Mon Sep 1 16:32:41 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 18:32:44 2003 Subject: [Python-checkins] python/dist/src/Modules posixmodule.c, 2.300.8.1, 2.300.8.2 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv17088 Modified Files: Tag: release23-maint posixmodule.c Log Message: SF patch #798534: Windows os.popen needlessly gets a reference to tuple () (Contributed by Andrew Gaul.) Fixes a minor leak. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.300.8.1 retrieving revision 2.300.8.2 diff -C2 -d -r2.300.8.1 -r2.300.8.2 *** posixmodule.c 6 Aug 2003 02:47:56 -0000 2.300.8.1 --- posixmodule.c 1 Sep 2003 22:32:39 -0000 2.300.8.2 *************** *** 3616,3620 **** posix_popen(PyObject *self, PyObject *args) { ! PyObject *f, *s; int tm = 0; --- 3616,3620 ---- posix_popen(PyObject *self, PyObject *args) { ! PyObject *f; int tm = 0; *************** *** 3624,3629 **** if (!PyArg_ParseTuple(args, "s|si:popen", &cmdstring, &mode, &bufsize)) return NULL; - - s = PyTuple_New(0); if (*mode == 'r') --- 3624,3627 ---- From rhettinger at users.sourceforge.net Mon Sep 1 16:34:34 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 18:34:37 2003 Subject: [Python-checkins] python/dist/src/Misc ACKS,1.245,1.246 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv17432 Modified Files: ACKS Log Message: SF patch #798534: Windows os.popen needlessly gets a reference to tuple () (Contributed by Andrew Gaul.) Fixes a minor leak. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.245 retrieving revision 1.246 diff -C2 -d -r1.245 -r1.246 *** ACKS 1 Sep 2003 22:17:18 -0000 1.245 --- ACKS 1 Sep 2003 22:34:31 -0000 1.246 *************** *** 191,194 **** --- 191,195 ---- Fred Gansevles Lars Marius Garshol + Andrew Gaul Stephen M. Gava Harry Henry Gebel From rhettinger at users.sourceforge.net Mon Sep 1 16:50:54 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 18:50:58 2003 Subject: [Python-checkins] python/dist/src/Doc/lib liblogging.tex,1.12,1.13 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv19933 Modified Files: liblogging.tex Log Message: SF patch #791153: inconsistency with implementation(logging) (Contributed by George Yoshida.) Index: liblogging.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblogging.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** liblogging.tex 8 Jul 2003 16:26:34 -0000 1.12 --- liblogging.tex 1 Sep 2003 22:50:52 -0000 1.13 *************** *** 367,371 **** Initializes the \class{Handler} instance by setting its level, setting the list of filters to the empty list and creating a lock (using ! \method{getLock()}) for serializing access to an I/O mechanism. \end{methoddesc} --- 367,371 ---- Initializes the \class{Handler} instance by setting its level, setting the list of filters to the empty list and creating a lock (using ! \method{createLock()}) for serializing access to an I/O mechanism. \end{methoddesc} From rhettinger at users.sourceforge.net Mon Sep 1 16:52:16 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 18:52:18 2003 Subject: [Python-checkins] python/dist/src/Doc/lib liblogging.tex, 1.12, 1.12.8.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv20151 Modified Files: Tag: release23-maint liblogging.tex Log Message: SF patch #791153: inconsistency with implementation(logging) (Contributed by George Yoshida.) Index: liblogging.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblogging.tex,v retrieving revision 1.12 retrieving revision 1.12.8.1 diff -C2 -d -r1.12 -r1.12.8.1 *** liblogging.tex 8 Jul 2003 16:26:34 -0000 1.12 --- liblogging.tex 1 Sep 2003 22:52:14 -0000 1.12.8.1 *************** *** 367,371 **** Initializes the \class{Handler} instance by setting its level, setting the list of filters to the empty list and creating a lock (using ! \method{getLock()}) for serializing access to an I/O mechanism. \end{methoddesc} --- 367,371 ---- Initializes the \class{Handler} instance by setting its level, setting the list of filters to the empty list and creating a lock (using ! \method{createLock()}) for serializing access to an I/O mechanism. \end{methoddesc} From rhettinger at users.sourceforge.net Mon Sep 1 17:13:06 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 19:13:10 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libcodecs.tex,1.23,1.24 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv23416 Modified Files: libcodecs.tex Log Message: Minor typo Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** libcodecs.tex 12 Aug 2003 00:01:15 -0000 1.23 --- libcodecs.tex 1 Sep 2003 23:13:04 -0000 1.24 *************** *** 815,819 **** {Unicode string} {Implements \rfc{3490}. ! \versionadded{2.3}. See also \refmodule{encodings.idna}} --- 815,819 ---- {Unicode string} {Implements \rfc{3490}. ! \versionadded{2.3} See also \refmodule{encodings.idna}} From rhettinger at users.sourceforge.net Mon Sep 1 17:13:46 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 19:13:51 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libcodecs.tex, 1.22.8.1, 1.22.8.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv23504 Modified Files: Tag: release23-maint libcodecs.tex Log Message: Minor typo Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.22.8.1 retrieving revision 1.22.8.2 diff -C2 -d -r1.22.8.1 -r1.22.8.2 *** libcodecs.tex 11 Aug 2003 23:43:04 -0000 1.22.8.1 --- libcodecs.tex 1 Sep 2003 23:13:44 -0000 1.22.8.2 *************** *** 815,819 **** {Unicode string} {Implements \rfc{3490}. ! \versionadded{2.3}. See also \refmodule{encodings.idna}} --- 815,819 ---- {Unicode string} {Implements \rfc{3490}. ! \versionadded{2.3} See also \refmodule{encodings.idna}} From rhettinger at users.sourceforge.net Mon Sep 1 17:30:47 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 19:30:50 2003 Subject: [Python-checkins] python/dist/src/Lib ConfigParser.py,1.58,1.59 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv26082 Modified Files: ConfigParser.py Log Message: SF patch #790443: add SafeConfigParser to __all__ (Contributed by George Yoshida.) Index: ConfigParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** ConfigParser.py 29 Jun 2003 04:23:35 -0000 1.58 --- ConfigParser.py 1 Sep 2003 23:30:44 -0000 1.59 *************** *** 93,97 **** "InterpolationError", "InterpolationDepthError", "InterpolationSyntaxError", "ParsingError", ! "MissingSectionHeaderError", "ConfigParser", "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"] --- 93,97 ---- "InterpolationError", "InterpolationDepthError", "InterpolationSyntaxError", "ParsingError", ! "MissingSectionHeaderError", "ConfigParser", "SafeConfigParser", "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"] From rhettinger at users.sourceforge.net Mon Sep 1 17:31:41 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 19:31:55 2003 Subject: [Python-checkins] python/dist/src/Lib ConfigParser.py, 1.58, 1.58.8.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv26389 Modified Files: Tag: release23-maint ConfigParser.py Log Message: SF patch #790443: add SafeConfigParser to __all__ (Contributed by George Yoshida.) Index: ConfigParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v retrieving revision 1.58 retrieving revision 1.58.8.1 diff -C2 -d -r1.58 -r1.58.8.1 *** ConfigParser.py 29 Jun 2003 04:23:35 -0000 1.58 --- ConfigParser.py 1 Sep 2003 23:31:39 -0000 1.58.8.1 *************** *** 93,97 **** "InterpolationError", "InterpolationDepthError", "InterpolationSyntaxError", "ParsingError", ! "MissingSectionHeaderError", "ConfigParser", "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"] --- 93,97 ---- "InterpolationError", "InterpolationDepthError", "InterpolationSyntaxError", "ParsingError", ! "MissingSectionHeaderError", "ConfigParser", "SafeConfigParser", "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"] From rhettinger at users.sourceforge.net Mon Sep 1 19:53:03 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 21:53:07 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_slice.py,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv15714 Modified Files: test_slice.py Log Message: SF patch #736962: Port tests to unittest (Part 2) (Contributed by Walter Dörwald.) * Convert test_slice.py to unittest format * Expand the test coverage. Index: test_slice.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_slice.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_slice.py 5 Nov 2002 15:28:50 -0000 1.4 --- test_slice.py 2 Sep 2003 01:53:01 -0000 1.5 *************** *** 1,16 **** # tests for slice objects; in particular the indices method. ! from test.test_support import vereq import sys ! vereq(slice(None ).indices(10), (0, 10, 1)) ! vereq(slice(None, None, 2).indices(10), (0, 10, 2)) ! vereq(slice(1, None, 2).indices(10), (1, 10, 2)) ! vereq(slice(None, None, -1).indices(10), (9, -1, -1)) ! vereq(slice(None, None, -2).indices(10), (9, -1, -2)) ! vereq(slice(3, None, -2).indices(10), (3, -1, -2)) ! vereq(slice(-100, 100 ).indices(10), slice(None).indices(10)) ! vereq(slice(100, -100, -1).indices(10), slice(None, None, -1).indices(10)) ! vereq(slice(-100L, 100L, 2L).indices(10), (0, 10, 2)) ! vereq(range(10)[::sys.maxint - 1], [0]) --- 1,94 ---- # tests for slice objects; in particular the indices method. ! import unittest ! from test import test_support ! import sys ! class SliceTest(unittest.TestCase): ! def test_constructor(self): ! self.assertRaises(TypeError, slice) ! self.assertRaises(TypeError, slice, 1, 2, 3, 4) ! ! def test_repr(self): ! self.assertEqual(repr(slice(1, 2, 3)), "slice(1, 2, 3)") ! ! def test_cmp(self): ! s1 = slice(1, 2, 3) ! s2 = slice(1, 2, 3) ! s3 = slice(1, 2, 4) ! self.assertEqual(s1, s2) ! self.assertNotEqual(s1, s3) ! ! class Exc(Exception): ! pass ! ! class BadCmp(object): ! def __eq__(self, other): ! raise Exc ! ! s1 = slice(BadCmp()) ! s2 = slice(BadCmp()) ! self.assertRaises(Exc, cmp, s1, s2) ! self.assertEqual(s1, s1) ! ! s1 = slice(1, BadCmp()) ! s2 = slice(1, BadCmp()) ! self.assertEqual(s1, s1) ! self.assertRaises(Exc, cmp, s1, s2) ! ! s1 = slice(1, 2, BadCmp()) ! s2 = slice(1, 2, BadCmp()) ! self.assertEqual(s1, s1) ! self.assertRaises(Exc, cmp, s1, s2) ! ! def test_members(self): ! s = slice(1) ! self.assertEqual(s.start, None) ! self.assertEqual(s.stop, 1) ! self.assertEqual(s.step, None) ! ! s = slice(1, 2) ! self.assertEqual(s.start, 1) ! self.assertEqual(s.stop, 2) ! self.assertEqual(s.step, None) ! ! s = slice(1, 2, 3) ! self.assertEqual(s.start, 1) ! self.assertEqual(s.stop, 2) ! self.assertEqual(s.step, 3) ! ! class AnyClass: ! pass ! ! obj = AnyClass() ! s = slice(obj) ! self.assert_(s.stop is obj) ! ! def test_indices(self): ! self.assertEqual(slice(None ).indices(10), (0, 10, 1)) ! self.assertEqual(slice(None, None, 2).indices(10), (0, 10, 2)) ! self.assertEqual(slice(1, None, 2).indices(10), (1, 10, 2)) ! self.assertEqual(slice(None, None, -1).indices(10), (9, -1, -1)) ! self.assertEqual(slice(None, None, -2).indices(10), (9, -1, -2)) ! self.assertEqual(slice(3, None, -2).indices(10), (3, -1, -2)) ! self.assertEqual( ! slice(-100, 100 ).indices(10), ! slice(None).indices(10) ! ) ! self.assertEqual( ! slice(100, -100, -1).indices(10), ! slice(None, None, -1).indices(10) ! ) ! self.assertEqual(slice(-100L, 100L, 2L).indices(10), (0, 10, 2)) ! ! self.assertEqual(range(10)[::sys.maxint - 1], [0]) ! ! self.assertRaises(OverflowError, slice(None).indices, 1L<<100) ! ! def test_main(): ! test_support.run_unittest(SliceTest) ! ! if __name__ == "__main__": ! test_main() From rhettinger at users.sourceforge.net Mon Sep 1 20:09:07 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 22:09:14 2003 Subject: [Python-checkins] python/dist/src/Lib doctest.py,1.30,1.31 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv17836 Modified Files: doctest.py Log Message: SF 798269: bug fix for doctest (sf bug id: 798254 (Contributed by Alexander Belopolsky.) Doctest would crash when encountering unbound methods: class A: def f(self): pass class C(A): g = A.f Index: doctest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** doctest.py 16 Jul 2003 19:25:22 -0000 1.30 --- doctest.py 2 Sep 2003 02:09:05 -0000 1.31 *************** *** 303,306 **** --- 303,307 ---- from inspect import isclass as _isclass from inspect import isfunction as _isfunction + from inspect import ismethod as _ismethod from inspect import ismodule as _ismodule from inspect import classify_class_attrs as _classify_class_attrs *************** *** 931,939 **** if type(v) in _StringTypes: f, t = self.runstring(v, thisname) ! elif _isfunction(v) or _isclass(v): f, t = self.rundoc(v, thisname) else: raise TypeError("Tester.run__test__: values in " ! "dict must be strings, functions " "or classes; " + `v`) failures = failures + f --- 932,940 ---- if type(v) in _StringTypes: f, t = self.runstring(v, thisname) ! elif _isfunction(v) or _isclass(v) or _ismethod(v): f, t = self.rundoc(v, thisname) else: raise TypeError("Tester.run__test__: values in " ! "dict must be strings, functions, methods, " "or classes; " + `v`) failures = failures + f From rhettinger at users.sourceforge.net Mon Sep 1 20:10:11 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 22:10:20 2003 Subject: [Python-checkins] python/dist/src/Lib doctest.py,1.30,1.30.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv18405 Modified Files: Tag: release23-maint doctest.py Log Message: SF 798269: bug fix for doctest (sf bug id: 798254 (Contributed by Alexander Belopolsky.) Doctest would crash when encountering unbound methods: class A: def f(self): pass class C(A): g = A.f Index: doctest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v retrieving revision 1.30 retrieving revision 1.30.6.1 diff -C2 -d -r1.30 -r1.30.6.1 *** doctest.py 16 Jul 2003 19:25:22 -0000 1.30 --- doctest.py 2 Sep 2003 02:10:09 -0000 1.30.6.1 *************** *** 303,306 **** --- 303,307 ---- from inspect import isclass as _isclass from inspect import isfunction as _isfunction + from inspect import ismethod as _ismethod from inspect import ismodule as _ismodule from inspect import classify_class_attrs as _classify_class_attrs *************** *** 931,939 **** if type(v) in _StringTypes: f, t = self.runstring(v, thisname) ! elif _isfunction(v) or _isclass(v): f, t = self.rundoc(v, thisname) else: raise TypeError("Tester.run__test__: values in " ! "dict must be strings, functions " "or classes; " + `v`) failures = failures + f --- 932,940 ---- if type(v) in _StringTypes: f, t = self.runstring(v, thisname) ! elif _isfunction(v) or _isclass(v) or _ismethod(v): f, t = self.rundoc(v, thisname) else: raise TypeError("Tester.run__test__: values in " ! "dict must be strings, functions, methods, " "or classes; " + `v`) failures = failures + f From rhettinger at users.sourceforge.net Mon Sep 1 20:13:44 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 22:13:46 2003 Subject: [Python-checkins] python/dist/src/Misc ACKS,1.246,1.247 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv18975 Modified Files: ACKS Log Message: SF 798269: bug fix for doctest (sf bug id: 798254 (Contributed by Alexander Belopolsky.) Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.246 retrieving revision 1.247 diff -C2 -d -r1.246 -r1.247 *** ACKS 1 Sep 2003 22:34:31 -0000 1.246 --- ACKS 2 Sep 2003 02:13:42 -0000 1.247 *************** *** 47,50 **** --- 47,51 ---- Thomas Bellman Juan M. Bello Rivas + Alexander Belopolsky Andy Bensky Michel Van den Bergh From rhettinger at users.sourceforge.net Mon Sep 1 20:17:48 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 22:17:52 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.22,1.831.4.23 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv19551 Modified Files: Tag: release23-maint NEWS Log Message: SF 798269: bug fix for doctest (sf bug id: 798254 (Contributed by Alexander Belopolsky.) Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.22 retrieving revision 1.831.4.23 diff -C2 -d -r1.831.4.22 -r1.831.4.23 *** NEWS 30 Aug 2003 22:14:45 -0000 1.831.4.22 --- NEWS 2 Sep 2003 02:17:46 -0000 1.831.4.23 *************** *** 36,39 **** --- 36,41 ---- ------- + - Bug #798254: doctest.py can now handle unbound methods. + - Bug #797650: textwrap.py now avoids an infinite loop when one of the indent arguments is set longer than the total width. From rhettinger at users.sourceforge.net Mon Sep 1 20:32:56 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 22:33:00 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libhttplib.tex,1.34,1.35 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv21704 Modified Files: libhttplib.tex Log Message: SF patch #798255: Document httplib.HTTPResponse.read "amt" argument (Contributed by Jeff Epler.) Index: libhttplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libhttplib.tex,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** libhttplib.tex 20 May 2003 02:56:35 -0000 1.34 --- libhttplib.tex 2 Sep 2003 02:32:54 -0000 1.35 *************** *** 198,203 **** \class{HTTPResponse} instances have the following methods and attributes: ! \begin{methoddesc}{read}{} ! Reads and returns the response body. \end{methoddesc} --- 198,203 ---- \class{HTTPResponse} instances have the following methods and attributes: ! \begin{methoddesc}{read}{\optional{amt}} ! Reads and returns the response body, or up to the next \var{amt} bytes. \end{methoddesc} From rhettinger at users.sourceforge.net Mon Sep 1 20:34:14 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 1 22:34:17 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libhttplib.tex, 1.34, 1.34.10.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv21873 Modified Files: Tag: release23-maint libhttplib.tex Log Message: SF patch #798255: Document httplib.HTTPResponse.read "amt" argument (Contributed by Jeff Epler.) Index: libhttplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libhttplib.tex,v retrieving revision 1.34 retrieving revision 1.34.10.1 diff -C2 -d -r1.34 -r1.34.10.1 *** libhttplib.tex 20 May 2003 02:56:35 -0000 1.34 --- libhttplib.tex 2 Sep 2003 02:34:12 -0000 1.34.10.1 *************** *** 198,203 **** \class{HTTPResponse} instances have the following methods and attributes: ! \begin{methoddesc}{read}{} ! Reads and returns the response body. \end{methoddesc} --- 198,203 ---- \class{HTTPResponse} instances have the following methods and attributes: ! \begin{methoddesc}{read}{\optional{amt}} ! Reads and returns the response body, or up to the next \var{amt} bytes. \end{methoddesc} From rhettinger at users.sourceforge.net Mon Sep 1 22:19:04 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 2 00:19:07 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_itertools.py, 1.15.6.2, 1.15.6.3 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv5305 Modified Files: Tag: release23-maint test_itertools.py Log Message: Fix failing test Index: test_itertools.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_itertools.py,v retrieving revision 1.15.6.2 retrieving revision 1.15.6.3 diff -C2 -d -r1.15.6.2 -r1.15.6.3 *** test_itertools.py 30 Aug 2003 22:16:59 -0000 1.15.6.2 --- test_itertools.py 2 Sep 2003 04:19:02 -0000 1.15.6.3 *************** *** 88,92 **** self.assertEqual(take(3,izip('abcdef', count())), zip('abcdef', range(3))) self.assertEqual(list(izip('abcdef')), zip('abcdef')) ! self.assertEqual(list(izip()), zip()) self.assertRaises(TypeError, izip, 3) self.assertRaises(TypeError, izip, range(3), 3) --- 88,92 ---- self.assertEqual(take(3,izip('abcdef', count())), zip('abcdef', range(3))) self.assertEqual(list(izip('abcdef')), zip('abcdef')) ! self.assertEqual(list(izip()), []) self.assertRaises(TypeError, izip, 3) self.assertRaises(TypeError, izip, range(3), 3) From rhettinger at users.sourceforge.net Mon Sep 1 22:24:36 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 2 00:24:40 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.23,1.831.4.24 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv6021 Modified Files: Tag: release23-maint NEWS Log Message: SF patch #798534: Windows os.popen needlessly gets a reference to tuple () (Contributed by Andrew Gaul.) Fixes a minor leak. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.23 retrieving revision 1.831.4.24 diff -C2 -d -r1.831.4.23 -r1.831.4.24 *** NEWS 2 Sep 2003 02:17:46 -0000 1.831.4.23 --- NEWS 2 Sep 2003 04:24:34 -0000 1.831.4.24 *************** *** 21,24 **** --- 21,26 ---- ----------------- + - Patch #798534: fixed memory leak in os.popen(). + - Bug #793826: re-ordered the reference counting code in itertools.izip() to prevent re-entrancy anomalies. Also, From rhettinger at users.sourceforge.net Mon Sep 1 23:42:04 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 2 01:42:08 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_filecmp.py,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv16228/test Modified Files: test_filecmp.py Log Message: SF bug #453515: filecmp.dircmp case sensitivity bug Index: test_filecmp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_filecmp.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_filecmp.py 1 May 2003 17:45:37 -0000 1.2 --- test_filecmp.py 2 Sep 2003 05:42:02 -0000 1.3 *************** *** 50,54 **** for dir in [self.dir, self.dir_same, self.dir_diff]: os.mkdir(dir) ! output = open(os.path.join(dir, 'file'), 'w') output.write(data) output.close() --- 50,58 ---- for dir in [self.dir, self.dir_same, self.dir_diff]: os.mkdir(dir) ! if dir is self.dir_same: ! fn = 'FiLe' # Verify case-insensitive comparison ! else: ! fn = 'file' ! output = open(os.path.join(dir, fn), 'w') output.write(data) output.close() *************** *** 94,98 **** # Check attributes for comparison of two identical directories d = filecmp.dircmp(self.dir, self.dir_same) ! self.failUnless(d.left_list == d.right_list == ['file']) self.failUnless(d.common == ['file']) self.failUnless(d.left_only == d.right_only == []) --- 98,102 ---- # Check attributes for comparison of two identical directories d = filecmp.dircmp(self.dir, self.dir_same) ! self.assertEqual([d.left_list, d.right_list],[['file'], ['FiLe']]) self.failUnless(d.common == ['file']) self.failUnless(d.left_only == d.right_only == []) From rhettinger at users.sourceforge.net Mon Sep 1 23:42:04 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 2 01:42:10 2003 Subject: [Python-checkins] python/dist/src/Lib filecmp.py,1.16,1.17 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv16228 Modified Files: filecmp.py Log Message: SF bug #453515: filecmp.dircmp case sensitivity bug Index: filecmp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/filecmp.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** filecmp.py 27 Feb 2003 00:05:31 -0000 1.16 --- filecmp.py 2 Sep 2003 05:42:00 -0000 1.17 *************** *** 13,17 **** import stat import warnings ! from itertools import ifilter, ifilterfalse __all__ = ["cmp","dircmp","cmpfiles"] --- 13,17 ---- import stat import warnings ! from itertools import ifilter, ifilterfalse, imap, izip __all__ = ["cmp","dircmp","cmpfiles"] *************** *** 136,144 **** def phase1(self): # Compute common names ! b = dict.fromkeys(self.right_list) ! common = dict.fromkeys(ifilter(b.has_key, self.left_list)) ! self.left_only = list(ifilterfalse(common.has_key, self.left_list)) ! self.right_only = list(ifilterfalse(common.has_key, self.right_list)) ! self.common = common.keys() def phase2(self): # Distinguish files, directories, funnies --- 136,144 ---- def phase1(self): # Compute common names ! a = dict(izip(imap(os.path.normcase, self.left_list), self.left_list)) ! b = dict(izip(imap(os.path.normcase, self.right_list), self.right_list)) ! self.common = map(a.__getitem__, ifilter(b.has_key, a)) ! self.left_only = map(a.__getitem__, ifilterfalse(b.has_key, a)) ! self.right_only = map(b.__getitem__, ifilterfalse(a.has_key, b)) def phase2(self): # Distinguish files, directories, funnies From rhettinger at users.sourceforge.net Mon Sep 1 23:47:19 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 2 01:47:23 2003 Subject: [Python-checkins] python/dist/src/Lib filecmp.py,1.16,1.16.10.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv17023/Lib Modified Files: Tag: release23-maint filecmp.py Log Message: SF bug #453515: filecmp.dircmp case sensitivity bug Index: filecmp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/filecmp.py,v retrieving revision 1.16 retrieving revision 1.16.10.1 diff -C2 -d -r1.16 -r1.16.10.1 *** filecmp.py 27 Feb 2003 00:05:31 -0000 1.16 --- filecmp.py 2 Sep 2003 05:47:17 -0000 1.16.10.1 *************** *** 13,17 **** import stat import warnings ! from itertools import ifilter, ifilterfalse __all__ = ["cmp","dircmp","cmpfiles"] --- 13,17 ---- import stat import warnings ! from itertools import ifilter, ifilterfalse, imap, izip __all__ = ["cmp","dircmp","cmpfiles"] *************** *** 136,144 **** def phase1(self): # Compute common names ! b = dict.fromkeys(self.right_list) ! common = dict.fromkeys(ifilter(b.has_key, self.left_list)) ! self.left_only = list(ifilterfalse(common.has_key, self.left_list)) ! self.right_only = list(ifilterfalse(common.has_key, self.right_list)) ! self.common = common.keys() def phase2(self): # Distinguish files, directories, funnies --- 136,144 ---- def phase1(self): # Compute common names ! a = dict(izip(imap(os.path.normcase, self.left_list), self.left_list)) ! b = dict(izip(imap(os.path.normcase, self.right_list), self.right_list)) ! self.common = map(a.__getitem__, ifilter(b.has_key, a)) ! self.left_only = map(a.__getitem__, ifilterfalse(b.has_key, a)) ! self.right_only = map(b.__getitem__, ifilterfalse(a.has_key, b)) def phase2(self): # Distinguish files, directories, funnies From rhettinger at users.sourceforge.net Mon Sep 1 23:47:19 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 2 01:47:26 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_filecmp.py, 1.2, 1.2.8.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv17023/Lib/test Modified Files: Tag: release23-maint test_filecmp.py Log Message: SF bug #453515: filecmp.dircmp case sensitivity bug Index: test_filecmp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_filecmp.py,v retrieving revision 1.2 retrieving revision 1.2.8.1 diff -C2 -d -r1.2 -r1.2.8.1 *** test_filecmp.py 1 May 2003 17:45:37 -0000 1.2 --- test_filecmp.py 2 Sep 2003 05:47:17 -0000 1.2.8.1 *************** *** 50,54 **** for dir in [self.dir, self.dir_same, self.dir_diff]: os.mkdir(dir) ! output = open(os.path.join(dir, 'file'), 'w') output.write(data) output.close() --- 50,58 ---- for dir in [self.dir, self.dir_same, self.dir_diff]: os.mkdir(dir) ! if dir is self.dir_same: ! fn = 'FiLe' # Verify case-insensitive comparison ! else: ! fn = 'file' ! output = open(os.path.join(dir, fn), 'w') output.write(data) output.close() *************** *** 94,98 **** # Check attributes for comparison of two identical directories d = filecmp.dircmp(self.dir, self.dir_same) ! self.failUnless(d.left_list == d.right_list == ['file']) self.failUnless(d.common == ['file']) self.failUnless(d.left_only == d.right_only == []) --- 98,102 ---- # Check attributes for comparison of two identical directories d = filecmp.dircmp(self.dir, self.dir_same) ! self.assertEqual([d.left_list, d.right_list],[['file'], ['FiLe']]) self.failUnless(d.common == ['file']) self.failUnless(d.left_only == d.right_only == []) From rhettinger at users.sourceforge.net Mon Sep 1 23:47:19 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 2 01:47:29 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.24,1.831.4.25 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv17023/Misc Modified Files: Tag: release23-maint NEWS Log Message: SF bug #453515: filecmp.dircmp case sensitivity bug Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.24 retrieving revision 1.831.4.25 diff -C2 -d -r1.831.4.24 -r1.831.4.25 *** NEWS 2 Sep 2003 04:24:34 -0000 1.831.4.24 --- NEWS 2 Sep 2003 05:47:16 -0000 1.831.4.25 *************** *** 38,41 **** --- 38,44 ---- ------- + - Bug #453515: filecmp.dircmp() can now make case insensitive + filename comparisons. + - Bug #798254: doctest.py can now handle unbound methods. From rhettinger at users.sourceforge.net Tue Sep 2 00:59:23 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 2 02:59:28 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_filecmp.py,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv25797 Modified Files: test_filecmp.py Log Message: Only apply case-insensitivity test on appropriate platforms.' test_filecmp.py Index: test_filecmp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_filecmp.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_filecmp.py 2 Sep 2003 05:42:02 -0000 1.3 --- test_filecmp.py 2 Sep 2003 06:59:21 -0000 1.4 *************** *** 47,54 **** self.dir_same = os.path.join(tmpdir, 'dir-same') self.dir_diff = os.path.join(tmpdir, 'dir-diff') data = 'Contents of file go here.\n' for dir in [self.dir, self.dir_same, self.dir_diff]: os.mkdir(dir) ! if dir is self.dir_same: fn = 'FiLe' # Verify case-insensitive comparison else: --- 47,55 ---- self.dir_same = os.path.join(tmpdir, 'dir-same') self.dir_diff = os.path.join(tmpdir, 'dir-diff') + self.caseinsensitive = os.path.normcase('A') == os.path.normcase('a') data = 'Contents of file go here.\n' for dir in [self.dir, self.dir_same, self.dir_diff]: os.mkdir(dir) ! if self.caseinsensitive and dir is self.dir_same: fn = 'FiLe' # Verify case-insensitive comparison else: *************** *** 98,102 **** # Check attributes for comparison of two identical directories d = filecmp.dircmp(self.dir, self.dir_same) ! self.assertEqual([d.left_list, d.right_list],[['file'], ['FiLe']]) self.failUnless(d.common == ['file']) self.failUnless(d.left_only == d.right_only == []) --- 99,106 ---- # Check attributes for comparison of two identical directories d = filecmp.dircmp(self.dir, self.dir_same) ! if self.caseinsensitive: ! self.assertEqual([d.left_list, d.right_list],[['file'], ['FiLe']]) ! else: ! self.assertEqual([d.left_list, d.right_list],[['file'], ['file']]) self.failUnless(d.common == ['file']) self.failUnless(d.left_only == d.right_only == []) From rhettinger at users.sourceforge.net Tue Sep 2 01:01:13 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 2 03:01:19 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_filecmp.py, 1.2.8.1, 1.2.8.2 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv26169 Modified Files: Tag: release23-maint test_filecmp.py Log Message: Only apply case-insensitivity test on appropriate platforms.' test_filecmp.py Index: test_filecmp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_filecmp.py,v retrieving revision 1.2.8.1 retrieving revision 1.2.8.2 diff -C2 -d -r1.2.8.1 -r1.2.8.2 *** test_filecmp.py 2 Sep 2003 05:47:17 -0000 1.2.8.1 --- test_filecmp.py 2 Sep 2003 07:01:11 -0000 1.2.8.2 *************** *** 47,54 **** self.dir_same = os.path.join(tmpdir, 'dir-same') self.dir_diff = os.path.join(tmpdir, 'dir-diff') data = 'Contents of file go here.\n' for dir in [self.dir, self.dir_same, self.dir_diff]: os.mkdir(dir) ! if dir is self.dir_same: fn = 'FiLe' # Verify case-insensitive comparison else: --- 47,55 ---- self.dir_same = os.path.join(tmpdir, 'dir-same') self.dir_diff = os.path.join(tmpdir, 'dir-diff') + self.caseinsensitive = os.path.normcase('A') == os.path.normcase('a') data = 'Contents of file go here.\n' for dir in [self.dir, self.dir_same, self.dir_diff]: os.mkdir(dir) ! if self.caseinsensitive and dir is self.dir_same: fn = 'FiLe' # Verify case-insensitive comparison else: *************** *** 98,102 **** # Check attributes for comparison of two identical directories d = filecmp.dircmp(self.dir, self.dir_same) ! self.assertEqual([d.left_list, d.right_list],[['file'], ['FiLe']]) self.failUnless(d.common == ['file']) self.failUnless(d.left_only == d.right_only == []) --- 99,106 ---- # Check attributes for comparison of two identical directories d = filecmp.dircmp(self.dir, self.dir_same) ! if self.caseinsensitive: ! self.assertEqual([d.left_list, d.right_list],[['file'], ['FiLe']]) ! else: ! self.assertEqual([d.left_list, d.right_list],[['file'], ['file']]) self.failUnless(d.common == ['file']) self.failUnless(d.left_only == d.right_only == []) From akuchling at users.sourceforge.net Tue Sep 2 05:44:46 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue Sep 2 07:44:50 2003 Subject: [Python-checkins] python/dist/src/Lib/curses has_key.py,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/curses In directory sc8-pr-cvs1:/tmp/cvs-serv4371 Modified Files: has_key.py Log Message: [Patch #759208] Fix has_key emulation to not raise KeyError Index: has_key.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/has_key.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** has_key.py 13 Aug 2001 13:45:22 -0000 1.2 --- has_key.py 2 Sep 2003 11:44:44 -0000 1.3 *************** *** 164,168 **** # Figure out the correct capability name for the keycode. ! capability_name = _capability_names[ch] #Check the current terminal description for that capability; --- 164,170 ---- # Figure out the correct capability name for the keycode. ! capability_name = _capability_names.get(ch) ! if capability_name is None: ! return 0 #Check the current terminal description for that capability; From akuchling at users.sourceforge.net Tue Sep 2 05:46:34 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue Sep 2 07:46:38 2003 Subject: [Python-checkins] python/dist/src/Lib/curses has_key.py, 1.2, 1.2.30.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/curses In directory sc8-pr-cvs1:/tmp/cvs-serv4705 Modified Files: Tag: release23-branch has_key.py Log Message: [Patch #759208] Fix has_key emulation to not raise KeyError Index: has_key.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/has_key.py,v retrieving revision 1.2 retrieving revision 1.2.30.1 diff -C2 -d -r1.2 -r1.2.30.1 *** has_key.py 13 Aug 2001 13:45:22 -0000 1.2 --- has_key.py 2 Sep 2003 11:46:32 -0000 1.2.30.1 *************** *** 164,168 **** # Figure out the correct capability name for the keycode. ! capability_name = _capability_names[ch] #Check the current terminal description for that capability; --- 164,170 ---- # Figure out the correct capability name for the keycode. ! capability_name = _capability_names.get(ch) ! if capability_name is None: ! return 0 #Check the current terminal description for that capability; From akuchling at users.sourceforge.net Tue Sep 2 05:52:08 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue Sep 2 07:52:13 2003 Subject: [Python-checkins] python/dist/src/Lib/curses has_key.py,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/curses In directory sc8-pr-cvs1:/tmp/cvs-serv5574 Modified Files: has_key.py Log Message: Modernize code a bit: use isinstance instead of type(); return True/False Index: has_key.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/curses/has_key.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** has_key.py 2 Sep 2003 11:44:44 -0000 1.3 --- has_key.py 2 Sep 2003 11:52:06 -0000 1.4 *************** *** 161,175 **** def has_key(ch): ! if type(ch) == type( '' ): ch = ord(ch) # Figure out the correct capability name for the keycode. capability_name = _capability_names.get(ch) if capability_name is None: ! return 0 #Check the current terminal description for that capability; #if present, return true, else return false. ! if _curses.tigetstr( capability_name ): return 1 ! else: return 0 if __name__ == '__main__': --- 161,178 ---- def has_key(ch): ! if isinstance(ch, str): ! ch = ord(ch) # Figure out the correct capability name for the keycode. capability_name = _capability_names.get(ch) if capability_name is None: ! return False #Check the current terminal description for that capability; #if present, return true, else return false. ! if _curses.tigetstr( capability_name ): ! return True ! else: ! return False if __name__ == '__main__': From fdrake at users.sourceforge.net Tue Sep 2 10:01:09 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 2 12:01:15 2003 Subject: [Python-checkins] python/dist/src/Lib csv.py,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv15336 Modified Files: csv.py Log Message: use the long names for re compilation options; this makes it easier to figure out what the code is doing Index: csv.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/csv.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** csv.py 12 Jun 2003 04:05:00 -0000 1.7 --- csv.py 2 Sep 2003 16:01:07 -0000 1.8 *************** *** 208,212 **** '(?P>[^\w\n"\'])(?P ?)(?P["\']).*?(?P=quote)(?:$|\n)', # ,".*?" '(?:^|\n)(?P["\']).*?(?P=quote)(?:$|\n)'): # ".*?" (no delim, no space) ! regexp = re.compile(restr, re.S | re.M) matches = regexp.findall(data) if matches: --- 208,212 ---- '(?P>[^\w\n"\'])(?P ?)(?P["\']).*?(?P=quote)(?:$|\n)', # ,".*?" '(?:^|\n)(?P["\']).*?(?P=quote)(?:$|\n)'): # ".*?" (no delim, no space) ! regexp = re.compile(restr, re.DOTALL | re.MULTILINE) matches = regexp.findall(data) if matches: From fdrake at users.sourceforge.net Thu Sep 4 13:52:04 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 4 17:12:53 2003 Subject: [Python-checkins] python/dist/src/Doc/mac undoc.tex,1.11,1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/mac In directory sc8-pr-cvs1:/tmp/cvs-serv17480 Modified Files: undoc.tex Log Message: adjust markup to avoid suppressing a word space in content Index: undoc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/undoc.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** undoc.tex 7 Aug 2003 14:31:08 -0000 1.11 --- undoc.tex 4 Sep 2003 19:52:02 -0000 1.12 *************** *** 85,91 **** \modulesynopsis{Create CodeWarrior projects.} \module{mkcwproject} creates project files for the Metrowerks CodeWarrior development environment. It is a helper module for ! \module{distutils}\refbimodindex{distutils} but can be used separately for more control. --- 85,92 ---- \modulesynopsis{Create CodeWarrior projects.} + \refmodindex{distutils} \module{mkcwproject} creates project files for the Metrowerks CodeWarrior development environment. It is a helper module for ! \module{distutils} but can be used separately for more control. From fdrake at users.sourceforge.net Thu Sep 4 13:30:18 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 4 17:13:02 2003 Subject: [Python-checkins] python/dist/src/Doc/perl l2hinit.perl,1.75,1.76 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1:/tmp/cvs-serv11932/perl Modified Files: l2hinit.perl Log Message: Make the redundent portion of the lower navigation area disappear from the printed version for browsers that support "@media print" in CSS. Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** l2hinit.perl 5 Aug 2003 03:45:37 -0000 1.75 --- l2hinit.perl 4 Sep 2003 19:30:15 -0000 1.76 *************** *** 228,239 **** sub top_navigation_panel() { ! return "\n" . make_nav_panel() ! . "

\n"; } sub bot_navigation_panel() { ! return "\n


\n" . make_nav_panel() . "
\n" . get_version_text() --- 228,241 ---- sub top_navigation_panel() { ! return "\n
\n" . make_nav_panel() ! . "

\n"; } sub bot_navigation_panel() { ! return "\n
\n" ! . "


\n" . make_nav_panel() + . "
\n" . "
\n" . get_version_text() From fdrake at users.sourceforge.net Thu Sep 4 13:30:17 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 4 17:13:08 2003 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.28,1.29 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1:/tmp/cvs-serv11932/html Modified Files: style.css Log Message: Make the redundent portion of the lower navigation area disappear from the printed version for browsers that support "@media print" in CSS. Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** style.css 29 Aug 2003 04:09:26 -0000 1.28 --- style.css 4 Sep 2003 19:30:15 -0000 1.29 *************** *** 141,142 **** --- 141,150 ---- */ .availability .platform { font-weight: bold; } + + + /* + * Some specialization for printed output. + */ + @media print { + #bottom-navigation-panel { display: none; } + } From loewis at users.sourceforge.net Thu Sep 4 13:02:22 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:19 2003 Subject: [Python-checkins] python/dist/src/Objects fileobject.c, 2.179, 2.179.8.1 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv6327/Objects Modified Files: Tag: release23-maint fileobject.c Log Message: Patch #788249: Pass an explicit buffer to setvbuf in PyFile_SetBufSize(). Fixes #603724. Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.179 retrieving revision 2.179.8.1 diff -C2 -d -r2.179 -r2.179.8.1 *** fileobject.c 18 May 2003 12:56:25 -0000 2.179 --- fileobject.c 4 Sep 2003 19:02:20 -0000 2.179.8.1 *************** *** 283,288 **** PyFile_SetBufSize(PyObject *f, int bufsize) { if (bufsize >= 0) { - #ifdef HAVE_SETVBUF int type; switch (bufsize) { --- 283,288 ---- PyFile_SetBufSize(PyObject *f, int bufsize) { + PyFileObject *file = (PyFileObject *)f; if (bufsize >= 0) { int type; switch (bufsize) { *************** *** 290,305 **** type = _IONBF; break; case 1: type = _IOLBF; bufsize = BUFSIZ; break; default: type = _IOFBF; } ! setvbuf(((PyFileObject *)f)->f_fp, (char *)NULL, ! type, bufsize); #else /* !HAVE_SETVBUF */ ! if (bufsize <= 1) ! setbuf(((PyFileObject *)f)->f_fp, (char *)NULL); #endif /* !HAVE_SETVBUF */ } --- 290,317 ---- type = _IONBF; break; + #ifdef HAVE_SETVBUF case 1: type = _IOLBF; bufsize = BUFSIZ; break; + #endif default: type = _IOFBF; + #ifndef HAVE_SETVBUF + bufsize = BUFSIZ; + #endif + break; } ! fflush(file->f_fp); ! if (type == _IONBF) { ! PyMem_Free(file->f_setbuf); ! file->f_setbuf = NULL; ! } else { ! file->f_setbuf = PyMem_Realloc(file->f_setbuf, bufsize); ! } ! #ifdef HAVE_SETVBUF ! setvbuf(file->f_fp, file->f_setbuf, type, bufsize); #else /* !HAVE_SETVBUF */ ! setbuf(file->f_fp, file->f_setbuf); #endif /* !HAVE_SETVBUF */ } *************** *** 376,379 **** --- 388,392 ---- { int sts = 0; + PyMem_Free(f->f_setbuf); if (f->f_fp != NULL) { if (f->f_close != NULL) { *************** *** 1928,1931 **** --- 1941,1945 ---- if (open_the_file(foself, name, mode) == NULL) goto Error; + foself->f_setbuf = NULL; PyFile_SetBufSize(self, bufsize); goto Done; From loewis at users.sourceforge.net Thu Sep 4 13:02:22 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:22 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.32,1.831.4.33 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv6327/Misc Modified Files: Tag: release23-maint NEWS Log Message: Patch #788249: Pass an explicit buffer to setvbuf in PyFile_SetBufSize(). Fixes #603724. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.32 retrieving revision 1.831.4.33 diff -C2 -d -r1.831.4.32 -r1.831.4.33 *** NEWS 4 Sep 2003 18:52:07 -0000 1.831.4.32 --- NEWS 4 Sep 2003 19:02:20 -0000 1.831.4.33 *************** *** 13,16 **** --- 13,18 ---- ----------------- + - Bug #603724: Pass an explicit buffer to setvbuf in PyFile_SetBufSize(). + - Bug #795506: The % formatting operator did not support '%F' as had been documented. From loewis at users.sourceforge.net Thu Sep 4 13:02:22 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:24 2003 Subject: [Python-checkins] python/dist/src/Include fileobject.h, 2.32, 2.32.8.1 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1:/tmp/cvs-serv6327/Include Modified Files: Tag: release23-maint fileobject.h Log Message: Patch #788249: Pass an explicit buffer to setvbuf in PyFile_SetBufSize(). Fixes #603724. Index: fileobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/fileobject.h,v retrieving revision 2.32 retrieving revision 2.32.8.1 diff -C2 -d -r2.32 -r2.32.8.1 *** fileobject.h 10 May 2003 07:08:50 -0000 2.32 --- fileobject.h 4 Sep 2003 19:02:20 -0000 2.32.8.1 *************** *** 20,23 **** --- 20,24 ---- char* f_bufend; /* Points after last occupied position */ char* f_bufptr; /* Current buffer position */ + char *f_setbuf; /* Buffer for setbuf(3) and setvbuf(3) */ #ifdef WITH_UNIVERSAL_NEWLINES int f_univ_newline; /* Handle any newline convention */ From loewis at users.sourceforge.net Thu Sep 4 13:01:48 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:26 2003 Subject: [Python-checkins] python/dist/src/Objects fileobject.c,2.180,2.181 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv5789/Objects Modified Files: fileobject.c Log Message: Patch #788249: Pass an explicit buffer to setvbuf in PyFile_SetBufSize(). Fixes #603724. Will backport to 2.3. Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.180 retrieving revision 2.181 diff -C2 -d -r2.180 -r2.181 *** fileobject.c 15 Aug 2003 20:05:45 -0000 2.180 --- fileobject.c 4 Sep 2003 19:01:46 -0000 2.181 *************** *** 284,289 **** PyFile_SetBufSize(PyObject *f, int bufsize) { if (bufsize >= 0) { - #ifdef HAVE_SETVBUF int type; switch (bufsize) { --- 284,289 ---- PyFile_SetBufSize(PyObject *f, int bufsize) { + PyFileObject *file = (PyFileObject *)f; if (bufsize >= 0) { int type; switch (bufsize) { *************** *** 291,306 **** type = _IONBF; break; case 1: type = _IOLBF; bufsize = BUFSIZ; break; default: type = _IOFBF; } ! setvbuf(((PyFileObject *)f)->f_fp, (char *)NULL, ! type, bufsize); #else /* !HAVE_SETVBUF */ ! if (bufsize <= 1) ! setbuf(((PyFileObject *)f)->f_fp, (char *)NULL); #endif /* !HAVE_SETVBUF */ } --- 291,318 ---- type = _IONBF; break; + #ifdef HAVE_SETVBUF case 1: type = _IOLBF; bufsize = BUFSIZ; break; + #endif default: type = _IOFBF; + #ifndef HAVE_SETVBUF + bufsize = BUFSIZ; + #endif + break; } ! fflush(file->f_fp); ! if (type == _IONBF) { ! PyMem_Free(file->f_setbuf); ! file->f_setbuf = NULL; ! } else { ! file->f_setbuf = PyMem_Realloc(file->f_setbuf, bufsize); ! } ! #ifdef HAVE_SETVBUF ! setvbuf(file->f_fp, file->f_setbuf, type, bufsize); #else /* !HAVE_SETVBUF */ ! setbuf(file->f_fp, file->f_setbuf); #endif /* !HAVE_SETVBUF */ } *************** *** 377,380 **** --- 389,393 ---- { int sts = 0; + PyMem_Free(f->f_setbuf); if (f->f_fp != NULL) { if (f->f_close != NULL) { *************** *** 1929,1932 **** --- 1942,1946 ---- if (open_the_file(foself, name, mode) == NULL) goto Error; + foself->f_setbuf = NULL; PyFile_SetBufSize(self, bufsize); goto Done; From loewis at users.sourceforge.net Thu Sep 4 13:01:48 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:27 2003 Subject: [Python-checkins] python/dist/src/Include fileobject.h,2.32,2.33 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1:/tmp/cvs-serv5789/Include Modified Files: fileobject.h Log Message: Patch #788249: Pass an explicit buffer to setvbuf in PyFile_SetBufSize(). Fixes #603724. Will backport to 2.3. Index: fileobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/fileobject.h,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -d -r2.32 -r2.33 *** fileobject.h 10 May 2003 07:08:50 -0000 2.32 --- fileobject.h 4 Sep 2003 19:01:45 -0000 2.33 *************** *** 20,23 **** --- 20,24 ---- char* f_bufend; /* Points after last occupied position */ char* f_bufptr; /* Current buffer position */ + char *f_setbuf; /* Buffer for setbuf(3) and setvbuf(3) */ #ifdef WITH_UNIVERSAL_NEWLINES int f_univ_newline; /* Handle any newline convention */ From loewis at users.sourceforge.net Thu Sep 4 12:52:10 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:31 2003 Subject: [Python-checkins] python/dist/src configure, 1.416.4.1, 1.416.4.2 configure.in, 1.427.4.1, 1.427.4.2 Message-ID: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv4112 Modified Files: Tag: release23-maint configure configure.in Log Message: Patch #798202: detect redhat9 Tcl/Tk in configure script. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.416.4.1 retrieving revision 1.416.4.2 diff -C2 -d -r1.416.4.1 -r1.416.4.2 *** configure 9 Aug 2003 09:07:55 -0000 1.416.4.1 --- configure 4 Sep 2003 18:52:06 -0000 1.416.4.2 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.427 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.427.4.1 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. *************** *** 17509,17512 **** --- 17509,17564 ---- fi + echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5 + echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6 + have_ucs4_tcl=no + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + #include + #if TCL_UTF_MAX != 6 + # error "NOT UCS4_TCL" + #endif + int + main () + { + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + + cat >>confdefs.h <<\_ACEOF + #define HAVE_UCS4_TCL 1 + _ACEOF + + have_ucs4_tcl=yes + + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5 + echo "${ECHO_T}$have_ucs4_tcl" >&6 + echo "$as_me:$LINENO: checking what type to use for unicode" >&5 echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6 *************** *** 17522,17526 **** then # Without any arguments, Py_UNICODE defaults to two-byte mode ! enable_unicode="ucs2" fi --- 17574,17583 ---- then # Without any arguments, Py_UNICODE defaults to two-byte mode ! case "$have_ucs4_tcl" in ! yes) enable_unicode="ucs4" ! ;; ! *) enable_unicode="ucs2" ! ;; ! esac fi Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.427.4.1 retrieving revision 1.427.4.2 diff -C2 -d -r1.427.4.1 -r1.427.4.2 *** configure.in 9 Aug 2003 09:07:56 -0000 1.427.4.1 --- configure.in 4 Sep 2003 18:52:07 -0000 1.427.4.2 *************** *** 2636,2639 **** --- 2636,2651 ---- fi + AC_MSG_CHECKING(for UCS-4 tcl) + have_ucs4_tcl=no + AC_TRY_COMPILE([ + #include + #if TCL_UTF_MAX != 6 + # error "NOT UCS4_TCL" + #endif], [], [ + AC_DEFINE(HAVE_UCS4_TCL, 1, [Define this if you have tcl and TCL_UTF_MAX==6]) + have_ucs4_tcl=yes + ]) + AC_MSG_RESULT($have_ucs4_tcl) + AC_MSG_CHECKING(what type to use for unicode) dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output *************** *** 2646,2650 **** then # Without any arguments, Py_UNICODE defaults to two-byte mode ! enable_unicode="ucs2" fi --- 2658,2667 ---- then # Without any arguments, Py_UNICODE defaults to two-byte mode ! case "$have_ucs4_tcl" in ! yes) enable_unicode="ucs4" ! ;; ! *) enable_unicode="ucs2" ! ;; ! esac fi From loewis at users.sourceforge.net Thu Sep 4 12:52:10 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:37 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.31,1.831.4.32 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv4112/Misc Modified Files: Tag: release23-maint NEWS Log Message: Patch #798202: detect redhat9 Tcl/Tk in configure script. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.31 retrieving revision 1.831.4.32 diff -C2 -d -r1.831.4.31 -r1.831.4.32 *** NEWS 4 Sep 2003 18:46:39 -0000 1.831.4.31 --- NEWS 4 Sep 2003 18:52:07 -0000 1.831.4.32 *************** *** 102,105 **** --- 102,107 ---- ----- + - Patch #798202: detect redhat9 Tcl/Tk in configure script. + C API ----- From loewis at users.sourceforge.net Thu Sep 4 12:50:57 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:41 2003 Subject: [Python-checkins] python/dist/src configure, 1.419, 1.420 configure.in, 1.430, 1.431 Message-ID: Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv3845 Modified Files: configure configure.in Log Message: Patch #798202: detect redhat9 Tcl/Tk in configure script. Will backport to 2.2. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.419 retrieving revision 1.420 diff -C2 -d -r1.419 -r1.420 *** configure 4 Sep 2003 11:04:04 -0000 1.419 --- configure 4 Sep 2003 18:50:52 -0000 1.420 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.429 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.430 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. *************** *** 17521,17524 **** --- 17521,17576 ---- fi + echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5 + echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6 + have_ucs4_tcl=no + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + #include + #if TCL_UTF_MAX != 6 + # error "NOT UCS4_TCL" + #endif + int + main () + { + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + + cat >>confdefs.h <<\_ACEOF + #define HAVE_UCS4_TCL 1 + _ACEOF + + have_ucs4_tcl=yes + + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5 + echo "${ECHO_T}$have_ucs4_tcl" >&6 + echo "$as_me:$LINENO: checking what type to use for unicode" >&5 echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6 *************** *** 17534,17538 **** then # Without any arguments, Py_UNICODE defaults to two-byte mode ! enable_unicode="ucs2" fi --- 17586,17595 ---- then # Without any arguments, Py_UNICODE defaults to two-byte mode ! case "$have_ucs4_tcl" in ! yes) enable_unicode="ucs4" ! ;; ! *) enable_unicode="ucs2" ! ;; ! esac fi Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.430 retrieving revision 1.431 diff -C2 -d -r1.430 -r1.431 *** configure.in 4 Sep 2003 11:04:04 -0000 1.430 --- configure.in 4 Sep 2003 18:50:54 -0000 1.431 *************** *** 2648,2651 **** --- 2648,2663 ---- fi + AC_MSG_CHECKING(for UCS-4 tcl) + have_ucs4_tcl=no + AC_TRY_COMPILE([ + #include + #if TCL_UTF_MAX != 6 + # error "NOT UCS4_TCL" + #endif], [], [ + AC_DEFINE(HAVE_UCS4_TCL, 1, [Define this if you have tcl and TCL_UTF_MAX==6]) + have_ucs4_tcl=yes + ]) + AC_MSG_RESULT($have_ucs4_tcl) + AC_MSG_CHECKING(what type to use for unicode) dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output *************** *** 2658,2662 **** then # Without any arguments, Py_UNICODE defaults to two-byte mode ! enable_unicode="ucs2" fi --- 2670,2679 ---- then # Without any arguments, Py_UNICODE defaults to two-byte mode ! case "$have_ucs4_tcl" in ! yes) enable_unicode="ucs4" ! ;; ! *) enable_unicode="ucs2" ! ;; ! esac fi From loewis at users.sourceforge.net Thu Sep 4 12:46:41 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:52 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.30,1.831.4.31 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv2966/Misc Modified Files: Tag: release23-maint NEWS Log Message: Patch #794826: Add __file__ in dynamically loaded modules for multiple interpreters. Fixes #698282. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.30 retrieving revision 1.831.4.31 diff -C2 -d -r1.831.4.30 -r1.831.4.31 *** NEWS 4 Sep 2003 18:26:06 -0000 1.831.4.30 --- NEWS 4 Sep 2003 18:46:39 -0000 1.831.4.31 *************** *** 21,24 **** --- 21,26 ---- ----------------- + - Bug #698282: Add __file__ to dynamic modules in multiple interpreters. + - Patch #798145: Return correct information from nl_langinfo(RADIXCHAR). From loewis at users.sourceforge.net Thu Sep 4 12:46:41 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:54 2003 Subject: [Python-checkins] python/dist/src/Python importdl.c,2.70,2.70.14.1 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv2966/Python Modified Files: Tag: release23-maint importdl.c Log Message: Patch #794826: Add __file__ in dynamically loaded modules for multiple interpreters. Fixes #698282. Index: importdl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.c,v retrieving revision 2.70 retrieving revision 2.70.14.1 diff -C2 -d -r2.70 -r2.70.14.1 *** importdl.c 26 Aug 2002 21:15:11 -0000 2.70 --- importdl.c 4 Sep 2003 18:46:39 -0000 2.70.14.1 *************** *** 55,60 **** if (PyErr_Occurred()) return NULL; - if (_PyImport_FixupExtension(name, pathname) == NULL) - return NULL; m = PyDict_GetItemString(PyImport_GetModuleDict(), name); --- 55,58 ---- *************** *** 67,70 **** --- 65,71 ---- if (PyModule_AddStringConstant(m, "__file__", pathname) < 0) PyErr_Clear(); /* Not important enough to report */ + + if (_PyImport_FixupExtension(name, pathname) == NULL) + return NULL; if (Py_VerboseFlag) PySys_WriteStderr( From loewis at users.sourceforge.net Thu Sep 4 12:46:02 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:13:58 2003 Subject: [Python-checkins] python/dist/src/Python importdl.c,2.70,2.71 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv2698/Python Modified Files: importdl.c Log Message: Patch #794826: Add __file__ in dynamically loaded modules for multiple interpreters. Fixes #698282. Will backport to 2.3. Index: importdl.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/importdl.c,v retrieving revision 2.70 retrieving revision 2.71 diff -C2 -d -r2.70 -r2.71 *** importdl.c 26 Aug 2002 21:15:11 -0000 2.70 --- importdl.c 4 Sep 2003 18:45:59 -0000 2.71 *************** *** 55,60 **** if (PyErr_Occurred()) return NULL; - if (_PyImport_FixupExtension(name, pathname) == NULL) - return NULL; m = PyDict_GetItemString(PyImport_GetModuleDict(), name); --- 55,58 ---- *************** *** 67,70 **** --- 65,71 ---- if (PyModule_AddStringConstant(m, "__file__", pathname) < 0) PyErr_Clear(); /* Not important enough to report */ + + if (_PyImport_FixupExtension(name, pathname) == NULL) + return NULL; if (Py_VerboseFlag) PySys_WriteStderr( From loewis at users.sourceforge.net Thu Sep 4 12:30:17 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:14:08 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libdatetime.tex, 1.49.8.1, 1.49.8.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv32202/Doc/lib Modified Files: Tag: release23-maint libdatetime.tex Log Message: Patch #792338: Correct documentation for timetuple return type. Index: libdatetime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v retrieving revision 1.49.8.1 retrieving revision 1.49.8.2 diff -C2 -d -r1.49.8.1 -r1.49.8.2 *** libdatetime.tex 22 Aug 2003 16:27:03 -0000 1.49.8.1 --- libdatetime.tex 4 Sep 2003 18:30:15 -0000 1.49.8.2 *************** *** 429,441 **** \begin{methoddesc}{timetuple}{} ! Return a 9-element tuple of the form returned by \function{time.localtime()}. The hours, minutes and seconds are 0, and the DST flag is -1. \code{\var{d}.timetuple()} is equivalent to ! \code{(\var{d}.year, \var{d}.month, \var{d}.day, 0, 0, 0, \var{d}.weekday(), \var{d}.toordinal() - date(\var{d}.year, 1, 1).toordinal() + 1, ! -1)} \end{methoddesc} --- 429,441 ---- \begin{methoddesc}{timetuple}{} ! Return a \class{time.struct_time} such as returned by \function{time.localtime()}. The hours, minutes and seconds are 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(), \var{d}.toordinal() - date(\var{d}.year, 1, 1).toordinal() + 1, ! -1))} \end{methoddesc} *************** *** 859,870 **** \begin{methoddesc}{timetuple}{} ! Return a 9-element tuple of the form returned by \function{time.localtime()}. \code{\var{d}.timetuple()} is equivalent to ! \code{(\var{d}.year, \var{d}.month, \var{d}.day, \var{d}.hour, \var{d}.minute, \var{d}.second, \var{d}.weekday(), \var{d}.toordinal() - date(\var{d}.year, 1, 1).toordinal() + 1, ! dst)} The \member{tm_isdst} flag of the result is set according to the \method{dst()} method: if \member{tzinfo} is \code{None} or --- 859,870 ---- \begin{methoddesc}{timetuple}{} ! Return a \class{time.struct_time} such as returned by \function{time.localtime()}. \code{\var{d}.timetuple()} is equivalent to ! \code{time.struct_time((\var{d}.year, \var{d}.month, \var{d}.day, \var{d}.hour, \var{d}.minute, \var{d}.second, \var{d}.weekday(), \var{d}.toordinal() - date(\var{d}.year, 1, 1).toordinal() + 1, ! dst))} The \member{tm_isdst} flag of the result is set according to the \method{dst()} method: if \member{tzinfo} is \code{None} or *************** *** 882,886 **** If \var{d} is aware, \var{d} is normalized to UTC time, by subtracting ! \code{\var{d}.utcoffset()}, and a timetuple for the normalized time is returned. \member{tm_isdst} is forced to 0. Note that the result's \member{tm_year} member may be --- 882,886 ---- If \var{d} is aware, \var{d} is normalized to UTC time, by subtracting ! \code{\var{d}.utcoffset()}, and a \class{time.struct_time} for the normalized time is returned. \member{tm_isdst} is forced to 0. Note that the result's \member{tm_year} member may be From loewis at users.sourceforge.net Thu Sep 4 12:29:55 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:14:12 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libdatetime.tex, 1.49, 1.50 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv31912/Doc/lib Modified Files: libdatetime.tex Log Message: Patch #792338: Correct documentation for timetuple return type. Index: libdatetime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** libdatetime.tex 16 Jul 2003 21:14:35 -0000 1.49 --- libdatetime.tex 4 Sep 2003 18:29:53 -0000 1.50 *************** *** 429,441 **** \begin{methoddesc}{timetuple}{} ! Return a 9-element tuple of the form returned by \function{time.localtime()}. The hours, minutes and seconds are 0, and the DST flag is -1. \code{\var{d}.timetuple()} is equivalent to ! \code{(\var{d}.year, \var{d}.month, \var{d}.day, 0, 0, 0, \var{d}.weekday(), \var{d}.toordinal() - date(\var{d}.year, 1, 1).toordinal() + 1, ! -1)} \end{methoddesc} --- 429,441 ---- \begin{methoddesc}{timetuple}{} ! Return a \class{time.struct_time} such as returned by \function{time.localtime()}. The hours, minutes and seconds are 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(), \var{d}.toordinal() - date(\var{d}.year, 1, 1).toordinal() + 1, ! -1))} \end{methoddesc} *************** *** 859,870 **** \begin{methoddesc}{timetuple}{} ! Return a 9-element tuple of the form returned by \function{time.localtime()}. \code{\var{d}.timetuple()} is equivalent to ! \code{(\var{d}.year, \var{d}.month, \var{d}.day, \var{d}.hour, \var{d}.minute, \var{d}.second, \var{d}.weekday(), \var{d}.toordinal() - date(\var{d}.year, 1, 1).toordinal() + 1, ! dst)} The \member{tm_isdst} flag of the result is set according to the \method{dst()} method: \member{tzinfo} is \code{None} or --- 859,870 ---- \begin{methoddesc}{timetuple}{} ! Return a \class{time.struct_time} such as returned by \function{time.localtime()}. \code{\var{d}.timetuple()} is equivalent to ! \code{time.struct_time((\var{d}.year, \var{d}.month, \var{d}.day, \var{d}.hour, \var{d}.minute, \var{d}.second, \var{d}.weekday(), \var{d}.toordinal() - date(\var{d}.year, 1, 1).toordinal() + 1, ! dst))} The \member{tm_isdst} flag of the result is set according to the \method{dst()} method: \member{tzinfo} is \code{None} or *************** *** 882,886 **** If \var{d} is aware, \var{d} is normalized to UTC time, by subtracting ! \code{\var{d}.utcoffset()}, and a timetuple for the normalized time is returned. \member{tm_isdst} is forced to 0. Note that the result's \member{tm_year} member may be --- 882,886 ---- If \var{d} is aware, \var{d} is normalized to UTC time, by subtracting ! \code{\var{d}.utcoffset()}, and a \class{time.struct_time} for the normalized time is returned. \member{tm_isdst} is forced to 0. Note that the result's \member{tm_year} member may be From loewis at users.sourceforge.net Thu Sep 4 12:26:09 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:14:20 2003 Subject: [Python-checkins] python/dist/src/Modules _localemodule.c, 2.40.4.1, 2.40.4.2 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv31547/Modules Modified Files: Tag: release23-maint _localemodule.c Log Message: Patch #798145: Return correct information from nl_langinfo(RADIXCHAR). Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.40.4.1 retrieving revision 2.40.4.2 diff -C2 -d -r2.40.4.1 -r2.40.4.2 *** _localemodule.c 3 Sep 2003 04:53:15 -0000 2.40.4.1 --- _localemodule.c 4 Sep 2003 18:26:07 -0000 2.40.4.2 *************** *** 580,583 **** --- 580,595 ---- returns numeric values in the char* return value, which would crash PyString_FromString. */ + #ifdef RADIXCHAR + if (saved_numeric) { + if(item == RADIXCHAR) { + Py_INCREF(decimal_point); + return decimal_point; + } + if(item == THOUSEP) { + Py_INCREF(thousands_sep); + return thousands_sep; + } + } + #endif for (i = 0; langinfo_constants[i].name; i++) if (langinfo_constants[i].value == item) From loewis at users.sourceforge.net Thu Sep 4 12:26:09 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:14:27 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.29,1.831.4.30 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv31547/Misc Modified Files: Tag: release23-maint NEWS Log Message: Patch #798145: Return correct information from nl_langinfo(RADIXCHAR). Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.29 retrieving revision 1.831.4.30 diff -C2 -d -r1.831.4.29 -r1.831.4.30 *** NEWS 3 Sep 2003 05:15:18 -0000 1.831.4.29 --- NEWS 4 Sep 2003 18:26:06 -0000 1.831.4.30 *************** *** 21,24 **** --- 21,26 ---- ----------------- + - Patch #798145: Return correct information from nl_langinfo(RADIXCHAR). + - Bug #797447: Correct confusing error message for unsupported locales. From loewis at users.sourceforge.net Thu Sep 4 12:24:49 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:14:33 2003 Subject: [Python-checkins] python/dist/src/Modules _localemodule.c, 2.41, 2.42 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv31045/Modules Modified Files: _localemodule.c Log Message: Patch #798145: Return correct information from nl_langinfo(RADIXCHAR). Will backport to 2.3. Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -d -r2.41 -r2.42 *** _localemodule.c 3 Sep 2003 04:50:13 -0000 2.41 --- _localemodule.c 4 Sep 2003 18:24:47 -0000 2.42 *************** *** 580,583 **** --- 580,595 ---- returns numeric values in the char* return value, which would crash PyString_FromString. */ + #ifdef RADIXCHAR + if (saved_numeric) { + if(item == RADIXCHAR) { + Py_INCREF(decimal_point); + return decimal_point; + } + if(item == THOUSEP) { + Py_INCREF(thousands_sep); + return thousands_sep; + } + } + #endif for (i = 0; langinfo_constants[i].name; i++) if (langinfo_constants[i].value == item) From loewis at users.sourceforge.net Thu Sep 4 12:24:49 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 17:14:37 2003 Subject: [Python-checkins] python/dist/src/Lib/test test__locale.py, NONE, 1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv31045/Lib/test Added Files: test__locale.py Log Message: Patch #798145: Return correct information from nl_langinfo(RADIXCHAR). Will backport to 2.3. --- NEW FILE: test__locale.py --- from test.test_support import verbose, TestSkipped from _locale import setlocale, LC_NUMERIC, RADIXCHAR, THOUSEP, nl_langinfo from _locale import localeconv, Error candidate_locales = ['es_UY', 'fr_FR', 'fi_FI', 'es_CO', 'pt_PT', 'it_IT', 'et_EE', 'es_PY', 'no_NO', 'nl_NL', 'lv_LV', 'el_GR', 'be_BY', 'fr_BE', 'ro_RO', 'ru_UA', 'ru_RU', 'es_VE', 'ca_ES', 'se_NO', 'es_EC', 'id_ID', 'ka_GE', 'es_CL', 'hu_HU', 'wa_BE', 'lt_LT', 'sl_SI', 'hr_HR', 'es_AR', 'es_ES', 'oc_FR', 'gl_ES', 'bg_BG', 'is_IS', 'mk_MK', 'de_AT', 'pt_BR', 'da_DK', 'nn_NO', 'cs_CZ', 'de_LU', 'es_BO', 'sq_AL', 'sk_SK', 'fr_CH', 'de_DE', 'sr_YU', 'br_FR', 'nl_BE', 'sv_FI', 'pl_PL', 'fr_CA', 'fo_FO', 'bs_BA', 'fr_LU', 'kl_GL', 'fa_IR', 'de_BE', 'sv_SE', 'it_CH', 'uk_UA', 'eu_ES', 'vi_VN', 'af_ZA', 'nb_NO', 'en_DK', 'tg_TJ'] saw_locale = 0 for loc in candidate_locales: try: setlocale(LC_NUMERIC, loc) except Error: continue if verbose: print "locale %r" % loc saw_locale = 1 nl_radixchar = nl_langinfo(RADIXCHAR) li_radixchar = localeconv()['decimal_point'] if nl_radixchar != li_radixchar: print "%r != %r" % (nl_radixchar, li_radixchar) nl_radixchar = nl_langinfo(THOUSEP) li_radixchar = localeconv()['thousands_sep'] if nl_radixchar != li_radixchar: print "%r != %r" % (nl_radixchar, li_radixchar) if not saw_locale: raise ImportError, "None of the listed locales found" From jlt63 at users.sourceforge.net Thu Sep 4 05:59:52 2003 From: jlt63 at users.sourceforge.net (jlt63@users.sourceforge.net) Date: Thu Sep 4 17:15:35 2003 Subject: [Python-checkins] python/dist/src/Modules gcmodule.c,2.71,2.72 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv18555/Modules Modified Files: gcmodule.c Log Message: Bug #794140: cygwin builds do not embed The embed2.diff patch solves the user's problem by exporting the missing symbols from the Python core so Python can be embedded in another Cygwin application (well, at lest vim). Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.71 retrieving revision 2.72 diff -C2 -d -r2.71 -r2.72 *** gcmodule.c 17 Apr 2003 17:29:21 -0000 2.71 --- gcmodule.c 4 Sep 2003 11:59:50 -0000 2.72 *************** *** 952,956 **** }; ! void initgc(void) { --- 952,956 ---- }; ! PyMODINIT_FUNC initgc(void) { From jlt63 at users.sourceforge.net Thu Sep 4 05:59:52 2003 From: jlt63 at users.sourceforge.net (jlt63@users.sourceforge.net) Date: Thu Sep 4 17:15:40 2003 Subject: [Python-checkins] python/dist/src/Include pyport.h,2.62,2.63 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1:/tmp/cvs-serv18555/Include Modified Files: pyport.h Log Message: Bug #794140: cygwin builds do not embed The embed2.diff patch solves the user's problem by exporting the missing symbols from the Python core so Python can be embedded in another Cygwin application (well, at lest vim). Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.62 retrieving revision 2.63 diff -C2 -d -r2.62 -r2.63 *** pyport.h 4 Sep 2003 11:04:06 -0000 2.62 --- pyport.h 4 Sep 2003 11:59:50 -0000 2.63 *************** *** 429,433 **** # define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE /* module init functions inside the core need no external linkage */ ! # define PyMODINIT_FUNC void # else /* Py_BUILD_CORE */ /* Building an extension module, or an embedded situation */ --- 429,438 ---- # define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE /* module init functions inside the core need no external linkage */ ! /* except for Cygwin to handle embedding (FIXME: BeOS too?) */ ! # if defined(__CYGWIN__) ! # define PyMODINIT_FUNC __declspec(dllexport) void ! # else /* __CYGWIN__ */ ! # define PyMODINIT_FUNC void ! # endif /* __CYGWIN__ */ # else /* Py_BUILD_CORE */ /* Building an extension module, or an embedded situation */ From jlt63 at users.sourceforge.net Thu Sep 4 05:59:53 2003 From: jlt63 at users.sourceforge.net (jlt63@users.sourceforge.net) Date: Thu Sep 4 17:15:48 2003 Subject: [Python-checkins] python/dist/src/Python import.c, 2.222, 2.223 marshal.c, 1.74, 1.75 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv18555/Python Modified Files: import.c marshal.c Log Message: Bug #794140: cygwin builds do not embed The embed2.diff patch solves the user's problem by exporting the missing symbols from the Python core so Python can be embedded in another Cygwin application (well, at lest vim). Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.222 retrieving revision 2.223 diff -C2 -d -r2.222 -r2.223 *** import.c 11 Jul 2003 15:01:02 -0000 2.222 --- import.c 4 Sep 2003 11:59:50 -0000 2.223 *************** *** 2842,2846 **** } ! void initimp(void) { --- 2842,2846 ---- } ! PyMODINIT_FUNC initimp(void) { Index: marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** marshal.c 30 Jul 2002 11:44:44 -0000 1.74 --- marshal.c 4 Sep 2003 11:59:50 -0000 1.75 *************** *** 876,880 **** }; ! void PyMarshal_Init(void) { --- 876,880 ---- }; ! PyMODINIT_FUNC PyMarshal_Init(void) { From fdrake at users.sourceforge.net Thu Sep 4 15:25:07 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 4 17:25:11 2003 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.139,1.140 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1:/tmp/cvs-serv7163 Modified Files: python.perl Log Message: make sure cells are really generated for all table cells, even those that are left empty fixes first of the problems reported in SF bug #727692 Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -d -r1.139 -r1.140 *** python.perl 5 Aug 2003 05:00:23 -0000 1.139 --- python.perl 4 Sep 2003 21:25:03 -0000 1.140 *************** *** 1407,1410 **** --- 1407,1411 ---- s/[\s\n]+//; my($sfont, $efont) = get_table_col1_fonts(); + $c1 = ' ' if ($c1 eq ''); $c2 = ' ' if ($c2 eq ''); my($c1align, $c2align) = split('\|', $aligns); *************** *** 1458,1461 **** --- 1459,1464 ---- 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); *************** *** 1514,1517 **** --- 1517,1523 ---- 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); *************** *** 1575,1578 **** --- 1581,1588 ---- 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); From bwarsaw at users.sourceforge.net Tue Sep 2 21:25:30 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 17:52:00 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.25,1.831.4.26 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv10526 Modified Files: Tag: release23-maint NEWS Log Message: Document the Pynche patch. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.25 retrieving revision 1.831.4.26 diff -C2 -d -r1.831.4.25 -r1.831.4.26 *** NEWS 2 Sep 2003 05:47:16 -0000 1.831.4.25 --- NEWS 3 Sep 2003 03:25:27 -0000 1.831.4.26 *************** *** 84,87 **** --- 84,93 ---- trailing full-stop. + Tools/Demos + ----------- + + - Pynche was fixed to not crash when there is no ~/.pynche file and no + -d option was given. + Build ----- From bwarsaw at users.sourceforge.net Tue Sep 2 22:22:41 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 18:08:56 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.26,1.831.4.27 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv20137 Modified Files: Tag: release23-maint NEWS Log Message: NEWS about email package 794466 patch. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.26 retrieving revision 1.831.4.27 diff -C2 -d -r1.831.4.26 -r1.831.4.27 *** NEWS 3 Sep 2003 03:25:27 -0000 1.831.4.26 --- NEWS 3 Sep 2003 04:22:39 -0000 1.831.4.27 *************** *** 50,54 **** - The email package handles some RFC 2231 parameters with missing ! CHARSET fields better. - sets.py now runs under Py2.2. In addition, the argument restrictions --- 50,55 ---- - The email package handles some RFC 2231 parameters with missing ! CHARSET fields better. It also includes a patch to parameter ! parsing when semicolons appear inside quotes. - sets.py now runs under Py2.2. In addition, the argument restrictions From bwarsaw at users.sourceforge.net Tue Sep 2 22:22:03 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 18:15:17 2003 Subject: [Python-checkins] python/dist/src/Lib/email/test test_email.py, 1.50.10.1, 1.50.10.2 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email/test In directory sc8-pr-cvs1:/tmp/cvs-serv20016 Modified Files: Tag: release23-maint test_email.py Log Message: test_get_param_with_semis_in_quotes(): Test case for SF bug #794466. Backport candidate. Index: test_email.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v retrieving revision 1.50.10.1 retrieving revision 1.50.10.2 diff -C2 -d -r1.50.10.1 -r1.50.10.2 *** test_email.py 19 Aug 2003 04:52:29 -0000 1.50.10.1 --- test_email.py 3 Sep 2003 04:22:00 -0000 1.50.10.2 *************** *** 314,317 **** --- 314,324 ---- self.assertEqual(msg.get_payload(1).get_param('name'), 'wibble.JPG') + def test_get_param_with_semis_in_quotes(self): + msg = email.message_from_string( + 'Content-Type: image/pjpeg; name="Jim&&Jill"\n') + self.assertEqual(msg.get_param('name'), 'Jim&&Jill') + self.assertEqual(msg.get_param('name', unquote=False), + '"Jim&&Jill"') + def test_has_key(self): msg = email.message_from_string('Header: exists') From fdrake at users.sourceforge.net Thu Sep 4 16:16:47 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 4 18:16:52 2003 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.29,1.30 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1:/tmp/cvs-serv16390/html Modified Files: style.css Log Message: Suppress more online-only navigation in the printed HTML. Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** style.css 4 Sep 2003 19:30:15 -0000 1.29 --- style.css 4 Sep 2003 22:16:45 -0000 1.30 *************** *** 147,150 **** */ @media print { ! #bottom-navigation-panel { display: none; } } --- 147,150 ---- */ @media print { ! .online-navigation { display: none; } } From fdrake at users.sourceforge.net Thu Sep 4 16:16:47 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 4 18:16:55 2003 Subject: [Python-checkins] python/dist/src/Doc/perl l2hinit.perl,1.76,1.77 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1:/tmp/cvs-serv16390/perl Modified Files: l2hinit.perl Log Message: Suppress more online-only navigation in the printed HTML. Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** l2hinit.perl 4 Sep 2003 19:30:15 -0000 1.76 --- l2hinit.perl 4 Sep 2003 22:16:45 -0000 1.77 *************** *** 27,31 **** $BODYTEXT = ''; ! $CHILDLINE = "\n


\n"; $VERBOSITY = 0; --- 27,31 ---- $BODYTEXT = ''; ! $CHILDLINE = "\n



\n"; $VERBOSITY = 0; *************** *** 181,198 **** . "\n" # left-hand side ! . "\n$PREVIOUS" ! . "\n$UP" ! . "\n$NEXT" # title box . "\n$t_title" # right-hand side ! . "\n$CONTENTS" ! . "\n$CUSTOM_BUTTONS" # module index ! . "\n$INDEX" . "\n\n" # textual navigation . make_nav_sectref("Previous", "prev", $PREVIOUS_TITLE) . make_nav_sectref("Up", "parent", $UP_TITLE) . make_nav_sectref("Next", "next", $NEXT_TITLE) ); # remove these; they are unnecessary and cause errors from validation --- 181,201 ---- . "\n" # left-hand side ! . "\n$PREVIOUS" ! . "\n$UP" ! . "\n$NEXT" # title box . "\n$t_title" # right-hand side ! . "\n$CONTENTS" ! # module index ! . "\n$CUSTOM_BUTTONS" ! . "\n$INDEX" . "\n\n" # textual navigation + . "
\n" . make_nav_sectref("Previous", "prev", $PREVIOUS_TITLE) . make_nav_sectref("Up", "parent", $UP_TITLE) . make_nav_sectref("Next", "next", $NEXT_TITLE) + . "
\n" ); # remove these; they are unnecessary and cause errors from validation *************** *** 206,209 **** --- 209,215 ---- $toc =~ s/ NAME=\"tex2html\d+\"\s*href=/ href=/gi; $toc =~ s|(\s*)?||gi; + if ($toc =~ / NAME=["']CHILD_LINKS["']/) { + return "
\n$toc
\n"; + } return $toc; } *************** *** 234,238 **** sub bot_navigation_panel() { ! return "\n
\n" . "


\n" . make_nav_panel() --- 240,244 ---- sub bot_navigation_panel() { ! return "\n
\n" . "


\n" . make_nav_panel() From fdrake at users.sourceforge.net Thu Sep 4 16:21:19 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 4 18:21:38 2003 Subject: [Python-checkins] python/dist/src/Doc/perl l2hinit.perl,1.77,1.78 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1:/tmp/cvs-serv17125 Modified Files: l2hinit.perl Log Message: normalize whitespace Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** l2hinit.perl 4 Sep 2003 22:16:45 -0000 1.77 --- l2hinit.perl 4 Sep 2003 22:21:17 -0000 1.78 *************** *** 52,56 **** use File::Basename; ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*'); ! chop $mydir; # remove trailing '/' $mydir = getcwd() . "$dd$mydir" unless $mydir =~ s|^/|/|; --- 52,56 ---- use File::Basename; ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*'); ! chop $mydir; # remove trailing '/' $mydir = getcwd() . "$dd$mydir" unless $mydir =~ s|^/|/|; *************** *** 253,257 **** my($icon, $current_file, @link) = @_; my($dummy, $file, $title) = split($delim, ! $section_info{join(' ',@link)}); if ($icon =~ /\/) { my $r = get_my_icon($1); --- 253,257 ---- my($icon, $current_file, @link) = @_; my($dummy, $file, $title) = split($delim, ! $section_info{join(' ',@link)}); if ($icon =~ /\/) { my $r = get_my_icon($1); *************** *** 260,280 **** if ($title && ($file ne $current_file)) { $title = purify($title); ! $title = get_first_words($title, $WORDS_IN_NAVIGATION_PANEL_TITLES); ! return (make_href($file, $icon), make_href($file, "$title")) ! } elsif ($icon eq get_my_icon('up') && $EXTERNAL_UP_LINK) { ! return (make_href($EXTERNAL_UP_LINK, $icon), ! make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE")) ! } elsif ($icon eq get_my_icon('previous') ! && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) { ! return (make_href($EXTERNAL_PREV_LINK, $icon), ! make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE")) ! } elsif ($icon eq get_my_icon('next') ! && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) { ! return (make_href($EXTERNAL_DOWN_LINK, $icon), ! make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE")) ! } return (&inactive_img($icon), ""); } --- 260,280 ---- if ($title && ($file ne $current_file)) { $title = purify($title); ! $title = get_first_words($title, $WORDS_IN_NAVIGATION_PANEL_TITLES); ! return (make_href($file, $icon), make_href($file, "$title")) ! } elsif ($icon eq get_my_icon('up') && $EXTERNAL_UP_LINK) { ! return (make_href($EXTERNAL_UP_LINK, $icon), ! make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE")) ! } elsif ($icon eq get_my_icon('previous') ! && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) { ! return (make_href($EXTERNAL_PREV_LINK, $icon), ! make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE")) ! } elsif ($icon eq get_my_icon('next') ! && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) { ! return (make_href($EXTERNAL_DOWN_LINK, $icon), ! make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE")) ! } return (&inactive_img($icon), ""); } *************** *** 317,324 **** my $index; if ($letters) { ! $index = `$prog --columns $columns --letters $datafile`; } else { ! $index = `$prog --columns $columns $datafile`; } if (!s/$mark/$prefix$index/) { --- 317,324 ---- my $index; if ($letters) { ! $index = `$prog --columns $columns --letters $datafile`; } else { ! $index = `$prog --columns $columns $datafile`; } if (!s/$mark/$prefix$index/) { *************** *** 345,371 **** my $prefix = ''; foreach $key (keys %Modules) { ! $key =~ s/([a-zA-Z0-9._]*)<\/tt>/$1/; ! my $plat = "$ModulePlatforms{$key}"; ! $plat = '' ! if ($plat eq $IGNORE_PLATFORM_ANNOTATION); ! if (!$first) { ! $allthesame = 0 ! if ($prevplat ne $plat); ! } ! else { $first = 0; } ! $prevplat = $plat; } open(MODIDXFILE, '>modindex.dat') || die "\n$!\n"; foreach $key (keys %Modules) { ! # dump the line in the data file; just use a dummy seqno field ! my $nkey = $1; ! my $moditem = "$Modules{$key}"; ! my $plat = ''; ! $key =~ s/([a-zA-Z0-9._]*)<\/tt>/$1/; ! if ($ModulePlatforms{$key} && !$allthesame) { ! $plat = (" ($ModulePlatforms{$key}" ! . ')'); ! } ! print MODIDXFILE $moditem . $IDXFILE_FIELD_SEP . "$key$plat###\n"; } --- 345,371 ---- my $prefix = ''; foreach $key (keys %Modules) { ! $key =~ s/([a-zA-Z0-9._]*)<\/tt>/$1/; ! my $plat = "$ModulePlatforms{$key}"; ! $plat = '' ! if ($plat eq $IGNORE_PLATFORM_ANNOTATION); ! if (!$first) { ! $allthesame = 0 ! if ($prevplat ne $plat); ! } ! else { $first = 0; } ! $prevplat = $plat; } open(MODIDXFILE, '>modindex.dat') || die "\n$!\n"; foreach $key (keys %Modules) { ! # dump the line in the data file; just use a dummy seqno field ! my $nkey = $1; ! my $moditem = "$Modules{$key}"; ! my $plat = ''; ! $key =~ s/([a-zA-Z0-9._]*)<\/tt>/$1/; ! if ($ModulePlatforms{$key} && !$allthesame) { ! $plat = (" ($ModulePlatforms{$key}" ! . ')'); ! } ! print MODIDXFILE $moditem . $IDXFILE_FIELD_SEP . "$key$plat###\n"; } *************** *** 382,386 **** } if (!$allthesame) { ! $prefix .= < Some module names are followed by an annotation indicating what --- 382,386 ---- } if (!$allthesame) { ! $prefix .= < Some module names are followed by an annotation indicating what *************** *** 390,394 **** } insert_index($idx_module_mark, 'modindex.dat', $MODULE_INDEX_COLUMNS, 0, ! $prefix); } --- 390,394 ---- } insert_index($idx_module_mark, 'modindex.dat', $MODULE_INDEX_COLUMNS, 0, ! $prefix); } *************** *** 418,426 **** $tocfile = $CURRENT_FILE; my($closures, $reopens) = preserve_open_tags(); ! anchor_label('contents', $CURRENT_FILE, $_); # this is added $MY_CONTENTS_PAGE = "$CURRENT_FILE"; join('', "
\n\\tableofchildlinks[off]", $closures ! , make_section_heading($toc_title, 'h2'), $toc_mark ! , $reopens, $_); } # In addition to the standard stuff, add label to allow named node files. --- 418,426 ---- $tocfile = $CURRENT_FILE; my($closures, $reopens) = preserve_open_tags(); ! anchor_label('contents', $CURRENT_FILE, $_); # this is added $MY_CONTENTS_PAGE = "$CURRENT_FILE"; join('', "
\n\\tableofchildlinks[off]", $closures ! , make_section_heading($toc_title, 'h2'), $toc_mark ! , $reopens, $_); } # In addition to the standard stuff, add label to allow named node files. *************** *** 430,437 **** $loffile = $CURRENT_FILE; my($closures, $reopens) = preserve_open_tags(); ! anchor_label('lof', $CURRENT_FILE, $_); # this is added join('', "
\n", $closures ! , make_section_heading($lof_title, 'h2'), $lof_mark ! , $reopens, $_); } # In addition to the standard stuff, add label to allow named node files. --- 430,437 ---- $loffile = $CURRENT_FILE; my($closures, $reopens) = preserve_open_tags(); ! anchor_label('lof', $CURRENT_FILE, $_); # this is added join('', "
\n", $closures ! , make_section_heading($lof_title, 'h2'), $lof_mark ! , $reopens, $_); } # In addition to the standard stuff, add label to allow named node files. *************** *** 441,461 **** $lotfile = $CURRENT_FILE; my($closures, $reopens) = preserve_open_tags(); ! anchor_label('lot', $CURRENT_FILE, $_); # this is added join('', "
\n", $closures ! , make_section_heading($lot_title, 'h2'), $lot_mark ! , $reopens, $_); } # In addition to the standard stuff, add label to allow named node files. sub do_cmd_textohtmlinfopage { local($_) = @_; ! if ($INFO) { # ! anchor_label("about",$CURRENT_FILE,$_); # this is added ! } # ! my $the_version = ''; # and the rest is ! if ($t_date) { # mostly ours ! $the_version = ",\n$t_date"; ! if ($PACKAGE_VERSION) { ! $the_version .= ", Release $PACKAGE_VERSION$RELEASE_INFO"; ! } } my $about; --- 441,461 ---- $lotfile = $CURRENT_FILE; my($closures, $reopens) = preserve_open_tags(); ! anchor_label('lot', $CURRENT_FILE, $_); # this is added join('', "
\n", $closures ! , make_section_heading($lot_title, 'h2'), $lot_mark ! , $reopens, $_); } # In addition to the standard stuff, add label to allow named node files. sub do_cmd_textohtmlinfopage { local($_) = @_; ! if ($INFO) { # ! anchor_label("about",$CURRENT_FILE,$_); # this is added ! } # ! my $the_version = ''; # and the rest is ! if ($t_date) { # mostly ours ! $the_version = ",\n$t_date"; ! if ($PACKAGE_VERSION) { ! $the_version .= ", Release $PACKAGE_VERSION$RELEASE_INFO"; ! } } my $about; *************** *** 483,487 **** my $heading = make_section_heading($idx_title, 'h2') . $idx_mark; my($pre, $post) = minimize_open_tags($heading); ! anchor_label('genindex',$CURRENT_FILE,$_); # this is added return "
\n" . $pre . $_; } --- 483,487 ---- my $heading = make_section_heading($idx_title, 'h2') . $idx_mark; my($pre, $post) = minimize_open_tags($heading); ! anchor_label('genindex',$CURRENT_FILE,$_); # this is added return "
\n" . $pre . $_; } *************** *** 509,516 **** # before the appropriate environments to force sectioning. ! # XXX This *assumes* that if there are two {theindex} environments, ! # the first is the module index and the second is the standard ! # index. This is sufficient for the current Python documentation, ! # but that's about it. sub add_bbl_and_idx_dummy_commands { --- 509,516 ---- # before the appropriate environments to force sectioning. ! # XXX This *assumes* that if there are two {theindex} environments, ! # the first is the module index and the second is the standard ! # index. This is sufficient for the current Python documentation, ! # but that's about it. sub add_bbl_and_idx_dummy_commands { *************** *** 549,553 **** $global{'max_id'} = $id; # not sure why.... s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o; ! s/[\\]printindex/\\textohtmlindex /o; } else { --- 549,553 ---- $global{'max_id'} = $id; # not sure why.... s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o; ! s/[\\]printindex/\\textohtmlindex /o; } else { *************** *** 569,593 **** #RRM: do not alter user-set value for $MAX_SPLIT_DEPTH foreach $level ("part", "chapter", "section", "subsection", ! "subsubsection", "paragraph") { ! last if (($outermost_level) = /\\($level)$delimiter_rx/); } $level = ($outermost_level ? $section_commands{$outermost_level} : ! do {$outermost_level = 'section'; 3;}); #RRM: but calculate value for $MAX_SPLIT_DEPTH when a $REL_DEPTH was given ! if ($REL_DEPTH && $MAX_SPLIT_DEPTH) { ! $MAX_SPLIT_DEPTH = $level + $MAX_SPLIT_DEPTH; } elsif (!($MAX_SPLIT_DEPTH)) { $MAX_SPLIT_DEPTH = 1 }; %unnumbered_section_commands = ('tableofcontents' => $level, ! 'listoffigures' => $level, ! 'listoftables' => $level, ! 'bibliography' => $level, ! 'textohtmlindex' => $level, ! 'textohtmlmoduleindex' => $level); $section_headings{'textohtmlmoduleindex'} = 'h1'; %section_commands = (%unnumbered_section_commands, ! %section_commands); make_sections_rx(); --- 569,593 ---- #RRM: do not alter user-set value for $MAX_SPLIT_DEPTH foreach $level ("part", "chapter", "section", "subsection", ! "subsubsection", "paragraph") { ! last if (($outermost_level) = /\\($level)$delimiter_rx/); } $level = ($outermost_level ? $section_commands{$outermost_level} : ! do {$outermost_level = 'section'; 3;}); #RRM: but calculate value for $MAX_SPLIT_DEPTH when a $REL_DEPTH was given ! if ($REL_DEPTH && $MAX_SPLIT_DEPTH) { ! $MAX_SPLIT_DEPTH = $level + $MAX_SPLIT_DEPTH; } elsif (!($MAX_SPLIT_DEPTH)) { $MAX_SPLIT_DEPTH = 1 }; %unnumbered_section_commands = ('tableofcontents' => $level, ! 'listoffigures' => $level, ! 'listoftables' => $level, ! 'bibliography' => $level, ! 'textohtmlindex' => $level, ! 'textohtmlmoduleindex' => $level); $section_headings{'textohtmlmoduleindex'} = 'h1'; %section_commands = (%unnumbered_section_commands, ! %section_commands); make_sections_rx(); *************** *** 605,609 **** # %declarations = ('preform' => '
', ! %declarations); --- 605,609 ---- # %declarations = ('preform' => '
', ! %declarations); *************** *** 637,648 **** # allow user-modification of the tag; thanks Dan Young if (defined &custom_TITLE_hook) { ! $title = &custom_TITLE_hook($title, $toc_sec_title); } if ($DOCTYPE =~ /\/\/[\w\.]+\s*$/) { # language spec included ! $DTDcomment = "<!DOCTYPE html PUBLIC \"$DOCTYPE\">\n"; } else { ! $DTDcomment = "<!DOCTYPE html PUBLIC \"$DOCTYPE//" ! . ($ISO_LANGUAGE ? $ISO_LANGUAGE : $isolanguage) . "\">\n"; } if ($MY_PARTIAL_HEADER eq '') { --- 637,648 ---- # allow user-modification of the <title> tag; thanks Dan Young if (defined &custom_TITLE_hook) { ! $title = &custom_TITLE_hook($title, $toc_sec_title); } if ($DOCTYPE =~ /\/\/[\w\.]+\s*$/) { # language spec included ! $DTDcomment = "<!DOCTYPE html PUBLIC \"$DOCTYPE\">\n"; } else { ! $DTDcomment = "<!DOCTYPE html PUBLIC \"$DOCTYPE//" ! . ($ISO_LANGUAGE ? $ISO_LANGUAGE : $isolanguage) . "\">\n"; } if ($MY_PARTIAL_HEADER eq '') { *************** *** 720,722 **** } ! 1; # This must be the last line --- 720,722 ---- } ! 1; # This must be the last line From bwarsaw at users.sourceforge.net Tue Sep 2 22:21:31 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 19:04:49 2003 Subject: [Python-checkins] python/dist/src/Lib/email Message.py, 1.32.10.1, 1.32.10.2 Message-ID: <E19uP99-0005CA-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1:/tmp/cvs-serv19963 Modified Files: Tag: release23-maint Message.py Log Message: A fix for parsing parameters when there are semicolons inside the quotes. Fixes SF bug #794466, with the essential patch provided by Stuart D. Gathman. Specifically, _parseparam(), _get_params_preserve(): Use the parsing function that takes quotes into account, as given (essentially) in the bug report's test program. Index: Message.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/Message.py,v retrieving revision 1.32.10.1 retrieving revision 1.32.10.2 diff -C2 -d -r1.32.10.1 -r1.32.10.2 *** Message.py 19 Aug 2003 04:52:27 -0000 1.32.10.1 --- Message.py 3 Sep 2003 04:21:29 -0000 1.32.10.2 *************** *** 59,62 **** --- 59,79 ---- return param + def _parseparam(s): + plist = [] + while s[:1] == ';': + s = s[1:] + end = s.find(';') + while end > 0 and s.count('"', 0, end) % 2: + end = s.find(';', end + 1) + if end < 0: + end = len(s) + f = s[:end] + if '=' in f: + i = f.index('=') + f = f[:i].strip().lower() + '=' + f[i+1:].strip() + plist.append(f.strip()) + s = s[end:] + return plist + def _unquotevalue(value): *************** *** 526,530 **** return failobj params = [] ! for p in paramre.split(value): try: name, val = p.split('=', 1) --- 543,547 ---- return failobj params = [] ! for p in _parseparam(';' + value): try: name, val = p.split('=', 1) From bwarsaw at users.sourceforge.net Tue Sep 2 22:10:55 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 19:08:37 2003 Subject: [Python-checkins] python/dist/src/Lib/email/test test_email.py, 1.51, 1.52 Message-ID: <E19uOyt-0004dS-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/email/test In directory sc8-pr-cvs1:/tmp/cvs-serv17808 Modified Files: test_email.py Log Message: test_get_param_with_semis_in_quotes(): Test case for SF bug #794466. Backport candidate. Index: test_email.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** test_email.py 19 Aug 2003 03:54:24 -0000 1.51 --- test_email.py 3 Sep 2003 04:10:52 -0000 1.52 *************** *** 314,317 **** --- 314,324 ---- self.assertEqual(msg.get_payload(1).get_param('name'), 'wibble.JPG') + def test_get_param_with_semis_in_quotes(self): + msg = email.message_from_string( + 'Content-Type: image/pjpeg; name="Jim&&Jill"\n') + self.assertEqual(msg.get_param('name'), 'Jim&&Jill') + self.assertEqual(msg.get_param('name', unquote=False), + '"Jim&&Jill"') + def test_has_key(self): msg = email.message_from_string('Header: exists') From bwarsaw at users.sourceforge.net Tue Sep 2 21:15:52 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 19:11:20 2003 Subject: [Python-checkins] python/dist/src/Tools/pynche Main.py,2.22,2.23 Message-ID: <E19uO7c-0002Ii-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/pynche In directory sc8-pr-cvs1:/tmp/cvs-serv8837 Modified Files: Main.py Log Message: Fix for SF bug #780996, crash when no .pynche file exists and -d option is not given. If dbfile isn't given and can't be retrieved from the optionsdb, just initialize it to the first element in RGB_TXT. Backport candidate. Index: Main.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/pynche/Main.py,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -d -r2.22 -r2.23 *** Main.py 21 Oct 2002 14:23:48 -0000 2.22 --- Main.py 3 Sep 2003 03:15:50 -0000 2.23 *************** *** 47,51 **** """ ! __version__ = '1.4' import sys --- 47,51 ---- """ ! __version__ = '1.4.1' import sys *************** *** 128,135 **** # in the .pynche file. if dbfile is None: ! dbfile = s.optiondb()['DBFILE'] # find a parseable color database colordb = None files = RGB_TXT[:] while colordb is None: try: --- 128,137 ---- # in the .pynche file. if dbfile is None: ! dbfile = s.optiondb().get('DBFILE') # find a parseable color database colordb = None files = RGB_TXT[:] + if dbfile is None: + dbfile = files.pop() while colordb is None: try: From bwarsaw at users.sourceforge.net Tue Sep 2 21:20:40 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 19:19:13 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.848,1.849 Message-ID: <E19uOCG-0002Wp-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv9715 Modified Files: NEWS Log Message: Document the Pynche patch. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.848 retrieving revision 1.849 diff -C2 -d -r1.848 -r1.849 *** NEWS 27 Aug 2003 04:55:52 -0000 1.848 --- NEWS 3 Sep 2003 03:20:37 -0000 1.849 *************** *** 73,76 **** --- 73,79 ---- C-c C-h + - Pynche was fixed to not crash when there is no ~/.pynche file and no + -d option was given. + Build ----- From jlt63 at users.sourceforge.net Thu Sep 4 05:04:09 2003 From: jlt63 at users.sourceforge.net (jlt63@users.sourceforge.net) Date: Thu Sep 4 19:20:38 2003 Subject: [Python-checkins] python/dist/src/Include pyport.h,2.61,2.62 Message-ID: <E19uruL-0002FG-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1:/tmp/cvs-serv8405/Include Modified Files: pyport.h Log Message: This patch enables the building of Cygwin Python with a static core which still supports shared extensions. It takes advantage the latest Cygwin binutils (i.e., 20030901-1) which can export symbols from executables: http://cygwin.com/ml/cygwin-announce/2003-09/msg00002.html Additionally, it finally lays to rest the following mailing list subthread: http://mail.python.org/pipermail/python-list/2002-May/102500.html I tested the patch under Red Hat Linux 8.0 too Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.61 retrieving revision 2.62 diff -C2 -d -r2.61 -r2.62 *** pyport.h 10 May 2003 07:36:54 -0000 2.61 --- pyport.h 4 Sep 2003 11:04:06 -0000 2.62 *************** *** 422,426 **** #endif ! #if defined(Py_ENABLE_SHARED) /* only get special linkage if built as shared */ # if defined(HAVE_DECLSPEC_DLL) # ifdef Py_BUILD_CORE --- 422,427 ---- #endif ! /* only get special linkage if built as shared or platform is Cygwin */ ! #if defined(Py_ENABLE_SHARED) || defined(__CYGWIN__) # if defined(HAVE_DECLSPEC_DLL) # ifdef Py_BUILD_CORE From loewis at users.sourceforge.net Tue Sep 2 22:53:19 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 19:23:37 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.27,1.831.4.28 Message-ID: <E19uPdv-0006SV-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv24806/Misc Modified Files: Tag: release23-maint NEWS Log Message: Use de_DE in example, change message for unknown locale. Fixes #797447. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.27 retrieving revision 1.831.4.28 diff -C2 -d -r1.831.4.27 -r1.831.4.28 *** NEWS 3 Sep 2003 04:22:39 -0000 1.831.4.27 --- NEWS 3 Sep 2003 04:53:15 -0000 1.831.4.28 *************** *** 21,24 **** --- 21,26 ---- ----------------- + - Bug #797447: Correct confusing error message for unsupported locales. + - Patch #798534: fixed memory leak in os.popen(). From bwarsaw at users.sourceforge.net Tue Sep 2 21:23:47 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 19:27:42 2003 Subject: [Python-checkins] python/dist/src/Tools/pynche Main.py, 2.22, 2.22.14.1 Message-ID: <E19uOFH-0002fP-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/pynche In directory sc8-pr-cvs1:/tmp/cvs-serv10250 Modified Files: Tag: release23-maint Main.py Log Message: Fix for SF bug #780996, crash when no .pynche file exists and -d option is not given. If dbfile isn't given and can't be retrieved from the optionsdb, just initialize it to the first element in RGB_TXT. (backported) Index: Main.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/pynche/Main.py,v retrieving revision 2.22 retrieving revision 2.22.14.1 diff -C2 -d -r2.22 -r2.22.14.1 *** Main.py 21 Oct 2002 14:23:48 -0000 2.22 --- Main.py 3 Sep 2003 03:23:44 -0000 2.22.14.1 *************** *** 47,51 **** """ ! __version__ = '1.4' import sys --- 47,51 ---- """ ! __version__ = '1.4.1' import sys *************** *** 128,135 **** # in the .pynche file. if dbfile is None: ! dbfile = s.optiondb()['DBFILE'] # find a parseable color database colordb = None files = RGB_TXT[:] while colordb is None: try: --- 128,137 ---- # in the .pynche file. if dbfile is None: ! dbfile = s.optiondb().get('DBFILE') # find a parseable color database colordb = None files = RGB_TXT[:] + if dbfile is None: + dbfile = files.pop() while colordb is None: try: From bwarsaw at users.sourceforge.net Tue Sep 2 22:15:25 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 19:38:23 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS, 1.337.2.4.2.92, 1.337.2.4.2.93 Message-ID: <E19uP3F-0004yK-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv19106 Modified Files: Tag: release22-maint NEWS Log Message: NEWS about email package 794466 patch. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.337.2.4.2.92 retrieving revision 1.337.2.4.2.93 diff -C2 -d -r1.337.2.4.2.92 -r1.337.2.4.2.93 *** NEWS 19 Aug 2003 04:55:06 -0000 1.337.2.4.2.92 --- NEWS 3 Sep 2003 04:15:23 -0000 1.337.2.4.2.93 *************** *** 4,8 **** - The email package handles some RFC 2231 parameters with missing ! CHARSET fields better. - SF #746304: Builtin functions are now copy.[deep]copyable. --- 4,9 ---- - The email package handles some RFC 2231 parameters with missing ! CHARSET fields better. It also includes a patch to parameter ! parsing when semicolons appear inside quotes. - SF #746304: Builtin functions are now copy.[deep]copyable. From jlt63 at users.sourceforge.net Thu Sep 4 05:04:09 2003 From: jlt63 at users.sourceforge.net (jlt63@users.sourceforge.net) Date: Thu Sep 4 19:46:46 2003 Subject: [Python-checkins] python/dist/src Makefile.pre.in, 1.136, 1.137 configure.in, 1.429, 1.430 configure, 1.418, 1.419 Message-ID: <E19uruL-0002FC-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv8405 Modified Files: Makefile.pre.in configure.in configure Log Message: This patch enables the building of Cygwin Python with a static core which still supports shared extensions. It takes advantage the latest Cygwin binutils (i.e., 20030901-1) which can export symbols from executables: http://cygwin.com/ml/cygwin-announce/2003-09/msg00002.html Additionally, it finally lays to rest the following mailing list subthread: http://mail.python.org/pipermail/python-list/2002-May/102500.html I tested the patch under Red Hat Linux 8.0 too Index: Makefile.pre.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.pre.in,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -d -r1.136 -r1.137 *** Makefile.pre.in 13 Jul 2003 10:10:42 -0000 1.136 --- Makefile.pre.in 4 Sep 2003 11:04:04 -0000 1.137 *************** *** 380,387 **** $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources ! # This rule builds the Cygwin Python DLL ! libpython$(VERSION).dll.a: $(LIBRARY_OBJS) ! $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ ! $(LIBS) $(MODLIBS) $(SYSLIBS) --- 380,391 ---- $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources ! # This rule builds the Cygwin Python DLL and import library if configured ! # for a shared core library; otherwise, this rule is a noop. ! $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS) ! if test -n "$(DLLLIBRARY)"; then \ ! $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ ! $(LIBS) $(MODLIBS) $(SYSLIBS); \ ! else true; \ ! fi Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.429 retrieving revision 1.430 diff -C2 -d -r1.429 -r1.430 *** configure.in 9 Aug 2003 09:06:52 -0000 1.429 --- configure.in 4 Sep 2003 11:04:04 -0000 1.430 *************** *** 540,543 **** --- 540,550 ---- ;; esac + else # shared is disabled + case $ac_sys_system in + CYGWIN*) + BLDLIBRARY='$(LIBRARY)' + LDLIBRARY='libpython$(VERSION).dll.a' + ;; + esac fi *************** *** 1372,1375 **** --- 1379,1387 ---- fi;; esac;; + CYGWIN*) + if test $enable_shared = "no" + then + LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)' + fi;; esac fi Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.418 retrieving revision 1.419 diff -C2 -d -r1.418 -r1.419 *** configure 9 Aug 2003 09:06:51 -0000 1.418 --- configure 4 Sep 2003 11:04:04 -0000 1.419 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.428 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.429 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. *************** *** 3620,3623 **** --- 3620,3630 ---- ;; esac + else # shared is disabled + case $ac_sys_system in + CYGWIN*) + BLDLIBRARY='$(LIBRARY)' + LDLIBRARY='libpython$(VERSION).dll.a' + ;; + esac fi *************** *** 10193,10196 **** --- 10200,10208 ---- fi;; esac;; + CYGWIN*) + if test $enable_shared = "no" + then + LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)' + fi;; esac fi From bwarsaw at users.sourceforge.net Tue Sep 2 22:09:53 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 19:59:36 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.849,1.850 Message-ID: <E19uOxt-0004aP-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv17606 Modified Files: NEWS Log Message: NEWS about email package 794466 patch. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.849 retrieving revision 1.850 diff -C2 -d -r1.849 -r1.850 *** NEWS 3 Sep 2003 03:20:37 -0000 1.849 --- NEWS 3 Sep 2003 04:09:49 -0000 1.850 *************** *** 35,39 **** - The email package handles some RFC 2231 parameters with missing ! CHARSET fields better. - sets.py now runs under Py2.2. In addition, the argument restrictions --- 35,40 ---- - The email package handles some RFC 2231 parameters with missing ! CHARSET fields better. It also includes a patch to parameter ! parsing when semicolons appear inside quotes. - sets.py now runs under Py2.2. In addition, the argument restrictions From loewis at users.sourceforge.net Tue Sep 2 22:53:19 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 20:58:20 2003 Subject: [Python-checkins] python/dist/src/Doc/lib liblocale.tex, 1.33.10.1, 1.33.10.2 Message-ID: <E19uPdv-0006Sb-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv24806/Doc/lib Modified Files: Tag: release23-maint liblocale.tex Log Message: Use de_DE in example, change message for unknown locale. Fixes #797447. Index: liblocale.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblocale.tex,v retrieving revision 1.33.10.1 retrieving revision 1.33.10.2 diff -C2 -d -r1.33.10.1 -r1.33.10.2 *** liblocale.tex 25 Aug 2003 04:34:46 -0000 1.33.10.1 --- liblocale.tex 3 Sep 2003 04:53:17 -0000 1.33.10.2 *************** *** 399,403 **** >>> import locale >>> loc = locale.setlocale(locale.LC_ALL) # get current locale ! >>> locale.setlocale(locale.LC_ALL, 'de') # use German locale >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale --- 399,403 ---- >>> import locale >>> loc = locale.setlocale(locale.LC_ALL) # get current locale ! >>> locale.setlocale(locale.LC_ALL, 'de_DE') # use German locale; name might vary with platform >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale From bwarsaw at users.sourceforge.net Tue Sep 2 22:08:15 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 20:59:43 2003 Subject: [Python-checkins] python/dist/src/Lib/email Message.py,1.33,1.34 Message-ID: <E19uOwJ-0004WC-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1:/tmp/cvs-serv17359 Modified Files: Message.py Log Message: A fix for parsing parameters when there are semicolons inside the quotes. Fixes SF bug #794466, with the essential patch provided by Stuart D. Gathman. Specifically, _parseparam(), _get_params_preserve(): Use the parsing function that takes quotes into account, as given (essentially) in the bug report's test program. Backport candidate. Index: Message.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/Message.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Message.py 19 Aug 2003 03:53:02 -0000 1.33 --- Message.py 3 Sep 2003 04:08:13 -0000 1.34 *************** *** 59,62 **** --- 59,79 ---- return param + def _parseparam(s): + plist = [] + while s[:1] == ';': + s = s[1:] + end = s.find(';') + while end > 0 and s.count('"', 0, end) % 2: + end = s.find(';', end + 1) + if end < 0: + end = len(s) + f = s[:end] + if '=' in f: + i = f.index('=') + f = f[:i].strip().lower() + '=' + f[i+1:].strip() + plist.append(f.strip()) + s = s[end:] + return plist + def _unquotevalue(value): *************** *** 526,530 **** return failobj params = [] ! for p in paramre.split(value): try: name, val = p.split('=', 1) --- 543,547 ---- return failobj params = [] ! for p in _parseparam(';' + value): try: name, val = p.split('=', 1) From loewis at users.sourceforge.net Tue Sep 2 22:53:47 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 21:50:34 2003 Subject: [Python-checkins] python/dist/src/Modules _localemodule.c, 2.40, 2.40.4.1 Message-ID: <E19uPeN-0006SN-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv24806/Modules Modified Files: Tag: release23-maint _localemodule.c Log Message: Use de_DE in example, change message for unknown locale. Fixes #797447. Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.40 retrieving revision 2.40.4.1 diff -C2 -d -r2.40 -r2.40.4.1 *** _localemodule.c 24 Jul 2003 14:15:07 -0000 2.40 --- _localemodule.c 3 Sep 2003 04:53:15 -0000 2.40.4.1 *************** *** 1,4 **** /*********************************************************** ! Copyright (C) 1997, 2002 Martin von Loewis Permission to use, copy, modify, and distribute this software and its --- 1,4 ---- /*********************************************************** ! Copyright (C) 1997, 2002, 2003 Martin von Loewis Permission to use, copy, modify, and distribute this software and its *************** *** 178,182 **** if (!result) { /* operation failed, no setting was changed */ ! PyErr_SetString(Error, "locale setting not supported"); return NULL; } --- 178,182 ---- if (!result) { /* operation failed, no setting was changed */ ! PyErr_SetString(Error, "unsupported locale setting"); return NULL; } From loewis at users.sourceforge.net Tue Sep 2 23:15:22 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 22:11:42 2003 Subject: [Python-checkins] python/dist/src/Lib/idlelib IOBinding.py, 1.19.8.1, 1.19.8.2 Message-ID: <E19uPzG-0007EM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1:/tmp/cvs-serv27668/Lib/idlelib Modified Files: Tag: release23-maint IOBinding.py Log Message: Catch locale.error as well. Fixes #788378. Index: IOBinding.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/IOBinding.py,v retrieving revision 1.19.8.1 retrieving revision 1.19.8.2 diff -C2 -d -r1.19.8.1 -r1.19.8.2 *** IOBinding.py 5 Aug 2003 05:52:18 -0000 1.19.8.1 --- IOBinding.py 3 Sep 2003 05:15:20 -0000 1.19.8.2 *************** *** 30,34 **** import locale locale.setlocale(locale.LC_CTYPE, "") ! except ImportError: pass --- 30,34 ---- import locale locale.setlocale(locale.LC_CTYPE, "") ! except (ImportError, locale.error): pass From bwarsaw at users.sourceforge.net Tue Sep 2 22:14:31 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 22:11:48 2003 Subject: [Python-checkins] python/dist/src/Lib/email/test test_email.py, 1.17.2.8, 1.17.2.9 Message-ID: <E19uP2N-0004wK-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/email/test In directory sc8-pr-cvs1:/tmp/cvs-serv18979 Modified Files: Tag: release22-maint test_email.py Log Message: test_get_param_with_semis_in_quotes(): Test case for SF bug #794466. Backport candidate. Index: test_email.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v retrieving revision 1.17.2.8 retrieving revision 1.17.2.9 diff -C2 -d -r1.17.2.8 -r1.17.2.9 *** test_email.py 19 Aug 2003 04:56:47 -0000 1.17.2.8 --- test_email.py 3 Sep 2003 04:14:29 -0000 1.17.2.9 *************** *** 314,317 **** --- 314,324 ---- self.assertEqual(msg.get_payload(1).get_param('name'), 'wibble.JPG') + def test_get_param_with_semis_in_quotes(self): + msg = email.message_from_string( + 'Content-Type: image/pjpeg; name="Jim&&Jill"\n') + self.assertEqual(msg.get_param('name'), 'Jim&&Jill') + self.assertEqual(msg.get_param('name', unquote=False), + '"Jim&&Jill"') + def test_has_key(self): msg = email.message_from_string('Header: exists') From loewis at users.sourceforge.net Tue Sep 2 23:13:16 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 22:20:58 2003 Subject: [Python-checkins] python/dist/src/Lib/idlelib IOBinding.py, 1.20, 1.21 Message-ID: <E19uPxE-00079Q-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1:/tmp/cvs-serv27403/Lib/idlelib Modified Files: IOBinding.py Log Message: Catch locale.error as well. Fixes #788378. Will backport to 2.3. Index: IOBinding.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/IOBinding.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** IOBinding.py 5 Aug 2003 05:51:20 -0000 1.20 --- IOBinding.py 3 Sep 2003 05:13:14 -0000 1.21 *************** *** 30,34 **** import locale locale.setlocale(locale.LC_CTYPE, "") ! except ImportError: pass --- 30,34 ---- import locale locale.setlocale(locale.LC_CTYPE, "") ! except (ImportError, locale.error): pass From bwarsaw at users.sourceforge.net Tue Sep 2 22:14:03 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Thu Sep 4 23:34:00 2003 Subject: [Python-checkins] python/dist/src/Lib/email Message.py, 1.9.6.5, 1.9.6.6 Message-ID: <E19uP1v-0004vI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1:/tmp/cvs-serv18894 Modified Files: Tag: release22-maint Message.py Log Message: A fix for parsing parameters when there are semicolons inside the quotes. Fixes SF bug #794466, with the essential patch provided by Stuart D. Gathman. Specifically, _parseparam(), _get_params_preserve(): Use the parsing function that takes quotes into account, as given (essentially) in the bug report's test program. Backport candidate. Index: Message.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/Message.py,v retrieving revision 1.9.6.5 retrieving revision 1.9.6.6 diff -C2 -d -r1.9.6.5 -r1.9.6.6 *** Message.py 19 Aug 2003 04:56:46 -0000 1.9.6.5 --- Message.py 3 Sep 2003 04:14:01 -0000 1.9.6.6 *************** *** 59,62 **** --- 59,79 ---- return param + def _parseparam(s): + plist = [] + while s[:1] == ';': + s = s[1:] + end = s.find(';') + while end > 0 and s.count('"', 0, end) % 2: + end = s.find(';', end + 1) + if end < 0: + end = len(s) + f = s[:end] + if '=' in f: + i = f.index('=') + f = f[:i].strip().lower() + '=' + f[i+1:].strip() + plist.append(f.strip()) + s = s[end:] + return plist + def _unquotevalue(value): *************** *** 526,530 **** return failobj params = [] ! for p in paramre.split(value): try: name, val = p.split('=', 1) --- 543,547 ---- return failobj params = [] ! for p in _parseparam(';' + value): try: name, val = p.split('=', 1) From loewis at users.sourceforge.net Tue Sep 2 22:50:15 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 23:36:11 2003 Subject: [Python-checkins] python/dist/src/Doc/lib liblocale.tex,1.34,1.35 Message-ID: <E19uPax-0006Kp-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv24175/Doc/lib Modified Files: liblocale.tex Log Message: Use de_DE in example, change message for unknown locale. Fixes #797447. Will backport to 2.3. Index: liblocale.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblocale.tex,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** liblocale.tex 25 Aug 2003 04:28:04 -0000 1.34 --- liblocale.tex 3 Sep 2003 04:50:13 -0000 1.35 *************** *** 399,403 **** >>> import locale >>> loc = locale.setlocale(locale.LC_ALL) # get current locale ! >>> locale.setlocale(locale.LC_ALL, 'de') # use German locale >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale --- 399,403 ---- >>> import locale >>> loc = locale.setlocale(locale.LC_ALL) # get current locale ! >>> locale.setlocale(locale.LC_ALL, 'de_DE') # use German locale; name might vary with platform >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale From loewis at users.sourceforge.net Tue Sep 2 22:50:15 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Thu Sep 4 23:36:27 2003 Subject: [Python-checkins] python/dist/src/Modules _localemodule.c, 2.40, 2.41 Message-ID: <E19uPax-0006Ku-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv24175/Modules Modified Files: _localemodule.c Log Message: Use de_DE in example, change message for unknown locale. Fixes #797447. Will backport to 2.3. Index: _localemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -d -r2.40 -r2.41 *** _localemodule.c 24 Jul 2003 14:15:07 -0000 2.40 --- _localemodule.c 3 Sep 2003 04:50:13 -0000 2.41 *************** *** 1,4 **** /*********************************************************** ! Copyright (C) 1997, 2002 Martin von Loewis Permission to use, copy, modify, and distribute this software and its --- 1,4 ---- /*********************************************************** ! Copyright (C) 1997, 2002, 2003 Martin von Loewis Permission to use, copy, modify, and distribute this software and its *************** *** 178,182 **** if (!result) { /* operation failed, no setting was changed */ ! PyErr_SetString(Error, "locale setting not supported"); return NULL; } --- 178,182 ---- if (!result) { /* operation failed, no setting was changed */ ! PyErr_SetString(Error, "unsupported locale setting"); return NULL; } From loewis at users.sourceforge.net Tue Sep 2 23:15:22 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Fri Sep 5 00:07:58 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.28,1.831.4.29 Message-ID: <E19uPzG-0007EK-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv27668/Misc Modified Files: Tag: release23-maint NEWS Log Message: Catch locale.error as well. Fixes #788378. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.28 retrieving revision 1.831.4.29 diff -C2 -d -r1.831.4.28 -r1.831.4.29 *** NEWS 3 Sep 2003 04:53:15 -0000 1.831.4.28 --- NEWS 3 Sep 2003 05:15:18 -0000 1.831.4.29 *************** *** 81,84 **** --- 81,86 ---- ---- + - Bug #788378: Handle locale.error. + - Bug #774680: IDLE now does not fail to save the file anymore if the Tk buffer is not a Unicode string, yet eol_convention is. From csapython at thor.dotsrc.org Fri Sep 5 08:58:43 2003 From: csapython at thor.dotsrc.org (csapython@thor.dotsrc.org) Date: Fri Sep 5 07:58:46 2003 Subject: [Python-checkins] distutils testfil,NONE,1.1 Message-ID: <E19vFEh-0002lj-Ga@mail.python.org> Update of /pack/cvs-test/distutils In directory thor:/tmp/cvs-serv9985 Added Files: testfil Log Message: Test --- NEW FILE: testfil --- From csapython at thor.dotsrc.org Fri Sep 5 09:01:01 2003 From: csapython at thor.dotsrc.org (csapython@thor.dotsrc.org) Date: Fri Sep 5 08:01:03 2003 Subject: [Python-checkins] distutils testfil,1.1,NONE Message-ID: <E19vFGv-000314-LU@mail.python.org> Update of /pack/cvs-test/distutils In directory thor:/tmp/cvs-serv10015 Removed Files: testfil Log Message: --- testfil DELETED --- From csapython at thor.dotsrc.org Fri Sep 5 09:02:30 2003 From: csapython at thor.dotsrc.org (csapython@thor.dotsrc.org) Date: Fri Sep 5 08:02:32 2003 Subject: [Python-checkins] distutils testfil,1.2,1.3 Message-ID: <E19vFIM-0003K3-CX@mail.python.org> Update of /pack/cvs-test/distutils In directory thor:/tmp/cvs-serv10043 Added Files: testfil Log Message: test From testpy at thor.dotsrc.org Fri Sep 5 09:25:06 2003 From: testpy at thor.dotsrc.org (testpy@thor.dotsrc.org) Date: Fri Sep 5 08:25:08 2003 Subject: [Python-checkins] distutils testfil,1.3,1.4 Message-ID: <E19vFeD-0005qW-U1@mail.python.org> Update of /pack/cvs-test/distutils In directory thor:/tmp/cvs-serv10166 Modified Files: testfil Log Message: update Index: testfil =================================================================== RCS file: /pack/cvs-test/distutils/testfil,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testfil 5 Sep 2003 12:02:27 -0000 1.3 --- testfil 5 Sep 2003 12:25:02 -0000 1.4 *************** *** 0 **** --- 1 ---- + hest From fdrake at users.sourceforge.net Fri Sep 5 07:48:05 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 09:48:13 2003 Subject: [Python-checkins] python/dist/src/Doc/mac libmacui.tex,1.18,1.19 Message-ID: <E19vGwX-0000dL-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory sc8-pr-cvs1:/tmp/cvs-serv2408 Modified Files: libmacui.tex Log Message: clean up some markup Index: libmacui.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacui.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** libmacui.tex 12 Feb 2003 09:58:33 -0000 1.18 --- libmacui.tex 5 Sep 2003 13:48:02 -0000 1.19 *************** *** 16,20 **** ! \begin{funcdesc}{Message}{str\optional{, id\optional{, ok=None}}} Displays a modal dialog with the message text \var{str}, which should be at most 255 characters long. The button text defaults to ``OK'', but is --- 16,20 ---- ! \begin{funcdesc}{Message}{str\optional{, id\optional{, ok}}} Displays a modal dialog with the message text \var{str}, which should be at most 255 characters long. The button text defaults to ``OK'', but is *************** *** 31,36 **** the ``OK'' and ``Cancel'' buttons can be changed with the \var{ok} and \var{cancel} arguments. All strings can be at most 255 bytes long. ! \function{AskString()} returns the string entered or \code{None} in case ! the user cancelled. \end{funcdesc} --- 31,36 ---- the ``OK'' and ``Cancel'' buttons can be changed with the \var{ok} and \var{cancel} arguments. All strings can be at most 255 bytes long. ! \function{AskString()} returns the string entered or \constant{None} ! in case the user cancelled. \end{funcdesc} *************** *** 129,137 **** } Post a dialog asking the user for a file to open, and return the file ! selected or \var{None} if the user cancelled. \var{message} is a text message to display, \var{typeList} is a list of 4-char filetypes allowable, ! \var{defaultLocation} is the pathname, FSSpec or FSRef of the folder ! to show initially, \var{location} is the \code{(x, y)} position on the screen where the dialog is shown, --- 129,137 ---- } Post a dialog asking the user for a file to open, and return the file ! selected or \constant{None} if the user cancelled. \var{message} is a text message to display, \var{typeList} is a list of 4-char filetypes allowable, ! \var{defaultLocation} is the pathname, \class{FSSpec} or \class{FSRef} ! of the folder to show initially, \var{location} is the \code{(x, y)} position on the screen where the dialog is shown, *************** *** 140,149 **** \var{cancelButtonLabel} is a string to show in stead of ``Cancel'' in the cancel button, ! \var{wanted} is the type of value wanted as a return: \class{string}, \class{unicode}, \class{FSSpec}, \class{FSRef} and subtypes thereof are acceptable. For a description of the other arguments please see the Apple Navigation ! Services documentation and the EasyDialogs sourcecode. \end{funcdesc} --- 140,149 ---- \var{cancelButtonLabel} is a string to show in stead of ``Cancel'' in the cancel button, ! \var{wanted} is the type of value wanted as a return: \class{str}, \class{unicode}, \class{FSSpec}, \class{FSRef} and subtypes thereof are acceptable. For a description of the other arguments please see the Apple Navigation ! Services documentation and the \module{EasyDialogs} source code. \end{funcdesc} *************** *** 165,172 **** \optional{, wanted} } ! Post a dialog asking the user for a file to save to, and return the file ! selected or \var{None} if the user cancelled. \var{savedFileName} is the ! default for the file name to save to (the return value). See AskFileForOpen ! for a description of the other arguments. \end{funcdesc} --- 165,173 ---- \optional{, wanted} } ! Post a dialog asking the user for a file to save to, and return the ! file selected or \constant{None} if the user cancelled. ! \var{savedFileName} is the default for the file name to save to (the ! return value). See \function{AskFileForOpen()} for a description of ! the other arguments. \end{funcdesc} *************** *** 186,192 **** \optional{, wanted} } ! Post a dialog asking the user to select a folder, and return the folder ! selected or \var{None} if the user cancelled. See AskFileForOpen ! for a description of the arguments. \end{funcdesc} --- 187,193 ---- \optional{, wanted} } ! Post a dialog asking the user to select a folder, and return the ! folder selected or \constant{None} if the user cancelled. See ! \function{AskFileForOpen()} for a description of the arguments. \end{funcdesc} From fdrake at users.sourceforge.net Fri Sep 5 07:58:28 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 09:58:39 2003 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.30,1.31 Message-ID: <E19vH6a-00016w-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1:/tmp/cvs-serv4265 Modified Files: style.css Log Message: make the padding inside a "See also" box more consistent around the sides Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** style.css 4 Sep 2003 22:16:45 -0000 1.30 --- style.css 5 Sep 2003 13:58:26 -0000 1.31 *************** *** 132,136 **** .seealso { background-color: #fffaf0; border: thin solid black; ! padding: 4pt; } .seealso .heading { font-size: 110%; } --- 132,136 ---- .seealso { background-color: #fffaf0; border: thin solid black; ! padding: 0pt 1em 4pt 1em; } .seealso .heading { font-size: 110%; } From fdrake at users.sourceforge.net Fri Sep 5 08:01:18 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 10:01:24 2003 Subject: [Python-checkins] python/dist/src/Doc/mac libmacfs.tex,1.29,1.30 Message-ID: <E19vH9K-0001I3-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory sc8-pr-cvs1:/tmp/cvs-serv4950 Modified Files: libmacfs.tex Log Message: fix minor markup nits Index: libmacfs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacfs.tex,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** libmacfs.tex 12 Feb 2003 09:58:33 -0000 1.29 --- libmacfs.tex 5 Sep 2003 14:01:15 -0000 1.30 *************** *** 9,17 **** \deprecated{2.3}{The macfs module should be considered obsolete. For \class{FSSpec}, \class{FSRef} and \class{Alias} handling use the ! Carbon.File or Carbon.Folder module. For file dialogs use the ! \module{EasyDialogs} module.} ! This module provides access to Macintosh FSSpec handling, the Alias ! Manager, \program{finder} aliases and the Standard File package. \index{Macintosh Alias Manager} \index{Alias Manager, Macintosh} --- 9,17 ---- \deprecated{2.3}{The macfs module should be considered obsolete. For \class{FSSpec}, \class{FSRef} and \class{Alias} handling use the ! \module{Carbon.File} or \refmodule{Carbon.Folder} module. For file ! dialogs use the \refmodule{EasyDialogs} module.} ! This module provides access to Macintosh \class{FSSpec} handling, the ! Alias Manager, \program{finder} aliases and the Standard File package. \index{Macintosh Alias Manager} \index{Alias Manager, Macintosh} *************** *** 96,100 **** current directory, i.e. what \function{os.getcwd()} returns. ! Note that starting with system 7.5 the user can change Standard File behaviour with the ``general controls'' control panel, thereby making this call inoperative. --- 96,100 ---- current directory, i.e. what \function{os.getcwd()} returns. ! Note that starting with System 7.5 the user can change Standard File behaviour with the ``general controls'' control panel, thereby making this call inoperative. *************** *** 102,106 **** \begin{funcdesc}{FindFolder}{where, which, create} ! Locates one of the ``special'' folders that MacOS knows about, such as the trash or the Preferences folder. \var{where} is the disk to search, \var{which} is the 4-character string specifying which folder to --- 102,106 ---- \begin{funcdesc}{FindFolder}{where, which, create} ! Locates one of the ``special'' folders that Mac OS knows about, such as the trash or the Preferences folder. \var{where} is the disk to search, \var{which} is the 4-character string specifying which folder to From fdrake at users.sourceforge.net Fri Sep 5 08:06:37 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 10:06:55 2003 Subject: [Python-checkins] python/dist/src/Doc/mac libmacui.tex,1.20,1.21 Message-ID: <E19vHET-0001YA-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory sc8-pr-cvs1:/tmp/cvs-serv5943 Modified Files: libmacui.tex Log Message: add index entry Index: libmacui.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacui.tex,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** libmacui.tex 5 Sep 2003 13:59:10 -0000 1.20 --- libmacui.tex 5 Sep 2003 14:06:35 -0000 1.21 *************** *** 144,147 **** --- 144,148 ---- acceptable. + \index{Navigation Services} For a description of the other arguments please see the Apple Navigation Services documentation and the \module{EasyDialogs} source code. From rhettinger at users.sourceforge.net Fri Sep 5 08:38:43 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 5 10:38:49 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.33,1.831.4.34 Message-ID: <E19vHjX-0003wM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv15068/Misc Modified Files: Tag: release23-maint NEWS Log Message: SF bug #800796: Difference between hash() and __hash__() slice(5).__hash__() now raises a TypeError. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.33 retrieving revision 1.831.4.34 diff -C2 -d -r1.831.4.33 -r1.831.4.34 *** NEWS 4 Sep 2003 19:02:20 -0000 1.831.4.33 --- NEWS 5 Sep 2003 14:38:30 -0000 1.831.4.34 *************** *** 13,16 **** --- 13,18 ---- ----------------- + - Bug #800796: slice(1).__hash__() now raises a TypeError, unhashable type. + - Bug #603724: Pass an explicit buffer to setvbuf in PyFile_SetBufSize(). From rhettinger at users.sourceforge.net Fri Sep 5 08:39:05 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 5 10:39:08 2003 Subject: [Python-checkins] python/dist/src/Objects sliceobject.c, 2.21, 2.21.16.1 Message-ID: <E19vHjt-0003vr-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv15068/Objects Modified Files: Tag: release23-maint sliceobject.c Log Message: SF bug #800796: Difference between hash() and __hash__() slice(5).__hash__() now raises a TypeError. Index: sliceobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v retrieving revision 2.21 retrieving revision 2.21.16.1 diff -C2 -d -r2.21 -r2.21.16.1 *** sliceobject.c 29 Dec 2002 16:33:11 -0000 2.21 --- sliceobject.c 5 Sep 2003 14:38:26 -0000 2.21.16.1 *************** *** 279,282 **** --- 279,289 ---- } + static long + slice_hash(PySliceObject *v) + { + PyErr_SetString(PyExc_TypeError, "unhashable type"); + return -1L; + } + PyTypeObject PySlice_Type = { PyObject_HEAD_INIT(&PyType_Type) *************** *** 294,298 **** 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ ! 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ --- 301,305 ---- 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ ! (hashfunc)slice_hash, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ From rhettinger at users.sourceforge.net Fri Sep 5 08:27:32 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 5 11:13:50 2003 Subject: [Python-checkins] python/dist/src/Objects sliceobject.c,2.21,2.22 Message-ID: <E19vHYi-0003KC-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv12639/Objects Modified Files: sliceobject.c Log Message: SF bug #800796: Difference between hash() and __hash__() slice(5).__hash__() now raises a TypeError. Index: sliceobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -d -r2.21 -r2.22 *** sliceobject.c 29 Dec 2002 16:33:11 -0000 2.21 --- sliceobject.c 5 Sep 2003 14:27:30 -0000 2.22 *************** *** 279,282 **** --- 279,289 ---- } + static long + slice_hash(PySliceObject *v) + { + PyErr_SetString(PyExc_TypeError, "unhashable type"); + return -1L; + } + PyTypeObject PySlice_Type = { PyObject_HEAD_INIT(&PyType_Type) *************** *** 294,298 **** 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ ! 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ --- 301,305 ---- 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ ! (hashfunc)slice_hash, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ From rhettinger at users.sourceforge.net Fri Sep 5 08:27:32 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 5 11:13:57 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_slice.py,1.5,1.6 Message-ID: <E19vHYi-0003KH-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv12639/Lib/test Modified Files: test_slice.py Log Message: SF bug #800796: Difference between hash() and __hash__() slice(5).__hash__() now raises a TypeError. Index: test_slice.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_slice.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_slice.py 2 Sep 2003 01:53:01 -0000 1.5 --- test_slice.py 5 Sep 2003 14:27:30 -0000 1.6 *************** *** 15,18 **** --- 15,23 ---- self.assertEqual(repr(slice(1, 2, 3)), "slice(1, 2, 3)") + def test_hash(self): + # Verify clearing of SF bug #800796 + self.assertRaises(TypeError, hash, slice(5)) + self.assertRaises(TypeError, slice(5).__hash__) + def test_cmp(self): s1 = slice(1, 2, 3) From fdrake at users.sourceforge.net Fri Sep 5 07:59:13 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 11:25:09 2003 Subject: [Python-checkins] python/dist/src/Doc/mac libmacui.tex,1.19,1.20 Message-ID: <E19vH7J-00019O-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory sc8-pr-cvs1:/tmp/cvs-serv4420 Modified Files: libmacui.tex Log Message: add a relevant "see also" link Index: libmacui.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacui.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** libmacui.tex 5 Sep 2003 13:48:02 -0000 1.19 --- libmacui.tex 5 Sep 2003 13:59:10 -0000 1.20 *************** *** 192,195 **** --- 192,204 ---- \end{funcdesc} + + \begin{seealso} + \seetitle + [http://developer.apple.com/documentation/Carbon/Reference/Navigation_Services_Ref/] + {Navigation Services Reference}{Programmer's reference documentation + for the Navigation Services, a part of the Carbon framework.} + \end{seealso} + + \subsection{ProgressBar Objects \label{progressbar-objects}} From fdrake at users.sourceforge.net Fri Sep 5 09:36:25 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 11:36:38 2003 Subject: [Python-checkins] python/dist/src/Doc/perl SynopsisTable.pm, 1.8, 1.9 Message-ID: <E19vIdN-00078b-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1:/tmp/cvs-serv27421 Modified Files: SynopsisTable.pm Log Message: normalize whitespace Index: SynopsisTable.pm =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/SynopsisTable.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SynopsisTable.pm 17 Aug 2001 17:20:44 -0000 1.8 --- SynopsisTable.pm 5 Sep 2003 15:36:23 -0000 1.9 *************** *** 8,15 **** my($self,$name,$key,$type) = @_; if ($self->{names}) { ! $self->{names} .= ",$name"; } else { ! $self->{names} .= "$name"; } $self->{info}{$name} = "$key,$type,"; --- 8,15 ---- my($self,$name,$key,$type) = @_; if ($self->{names}) { ! $self->{names} .= ",$name"; } else { ! $self->{names} .= "$name"; } $self->{info}{$name} = "$key,$type,"; *************** *** 46,51 **** print "names: ", $self->{names}, "\n\n"; foreach $name (split /,/, $self->{names}) { ! my($key,$type,$synopsis) = $self->get($name); ! print "$name($key) is $type: $synopsis\n"; } } --- 46,51 ---- print "names: ", $self->{names}, "\n\n"; foreach $name (split /,/, $self->{names}) { ! my($key,$type,$synopsis) = $self->get($name); ! print "$name($key) is $type: $synopsis\n"; } } *************** *** 57,69 **** my $name; foreach $name (split /,/, $self->{names}) { ! my($key,$type,$synopsis) = $self->get($name); ! my $link = "<a href='module-$key.html'>"; ! $synopsis =~ s/<tex2html_percent_mark>/%/g; ! $synopsis =~ s/<tex2html_ampersand_mark>/\&/g; ! $data .= (' <tr' . ($oddrow ? " class='oddrow'>\n " : '>') ! . "<td><b><tt class='module'>$link$name</a></tt></b></td>\n" . " <td>\ </td>\n" ! . " <td class='synopsis'>$synopsis</td></tr>\n"); $oddrow = !$oddrow; } --- 57,69 ---- my $name; foreach $name (split /,/, $self->{names}) { ! my($key,$type,$synopsis) = $self->get($name); ! my $link = "<a href='module-$key.html'>"; ! $synopsis =~ s/<tex2html_percent_mark>/%/g; ! $synopsis =~ s/<tex2html_ampersand_mark>/\&/g; ! $data .= (' <tr' . ($oddrow ? " class='oddrow'>\n " : '>') ! . "<td><b><tt class='module'>$link$name</a></tt></b></td>\n" . " <td>\ </td>\n" ! . " <td class='synopsis'>$synopsis</td></tr>\n"); $oddrow = !$oddrow; } *************** *** 93,95 **** } ! 1; # This must be the last line -- Perl is bogus! --- 93,95 ---- } ! 1; # This must be the last line -- Perl is bogus! From fdrake at users.sourceforge.net Fri Sep 5 09:43:02 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 11:43:11 2003 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.140,1.141 Message-ID: <E19vIjm-0007Zf-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1:/tmp/cvs-serv29083 Modified Files: python.perl Log Message: fix some nuissance formatting problems for the "alltt" environment; there's still a bug for the environment, but that's worked around in this change as well Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.140 retrieving revision 1.141 diff -C2 -d -r1.140 -r1.141 *** python.perl 4 Sep 2003 21:25:03 -0000 1.140 --- python.perl 5 Sep 2003 15:43:00 -0000 1.141 *************** *** 2023,2029 **** $_ = &translate_commands($_) if (/\\/); ! # preserve space-runs, using   ! while (s/(\S) ( +)/$1$2;SPMnbsp;/g){}; ! s/(<BR>) /$1;SPMnbsp;/g; $_ = join('', $closures, $alltt_start, $local_reopens --- 2023,2032 ---- $_ = &translate_commands($_) if (/\\/); ! # remove spurious <BR> someone sticks in; not sure where they ! # actually come from ! # XXX the replacement space is there to accomodate something ! # broken that inserts a space in front of the first line of ! # the environment ! s/<BR>/ /gi; $_ = join('', $closures, $alltt_start, $local_reopens From fdrake at users.sourceforge.net Fri Sep 5 09:44:00 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 11:44:04 2003 Subject: [Python-checkins] python/dist/src/Doc/perl python.perl,1.141,1.142 Message-ID: <E19vIki-0007ch-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1:/tmp/cvs-serv29299 Modified Files: python.perl Log Message: normalize whitespace; detabify Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.141 retrieving revision 1.142 diff -C2 -d -r1.141 -r1.142 *** python.perl 5 Sep 2003 15:43:00 -0000 1.141 --- python.perl 5 Sep 2003 15:43:58 -0000 1.142 *************** *** 1,3 **** ! # python.perl by Fred L. Drake, Jr. <fdrake@acm.org> -*- perl -*- # # Heavily based on Guido van Rossum's myformat.perl (now obsolete). --- 1,3 ---- ! # python.perl by Fred L. Drake, Jr. <fdrake@acm.org> -*- perl -*- # # Heavily based on Guido van Rossum's myformat.perl (now obsolete). *************** *** 17,21 **** $param = missing_braces() unless ((s/$next_pair_pr_rx/$param=$2;''/eo) ! ||(s/$next_pair_rx/$param=$2;''/eo)); return $param; } --- 17,21 ---- $param = missing_braces() unless ((s/$next_pair_pr_rx/$param=$2;''/eo) ! ||(s/$next_pair_rx/$param=$2;''/eo)); return $param; } *************** *** 66,83 **** s/[\\]([a-zA-Z]+)\s*(=\s*)?[\\]([a-zA-Z]*)/$matched=1; ''/e; if ($matched) { ! my($new, $old) = ($1, $3); ! eval "sub do_cmd_$new { do_cmd_$old" . '(@_); }'; ! print "\ndefining handler for \\$new using \\$old\n"; } else { ! s/[\\]([a-zA-Z]+)\s*(=\s*)?([^\\])/$matched=1; ''/es; ! if ($matched) { ! my($new, $char) = ($1, $3); ! eval "sub do_cmd_$new { \"\\$char\" . \$_[0]; }"; ! print "\ndefining handler for \\$new to insert '$char'\n"; ! } ! else { ! write_warnings("Could not interpret \\let construct..."); ! } } return $_; --- 66,83 ---- s/[\\]([a-zA-Z]+)\s*(=\s*)?[\\]([a-zA-Z]*)/$matched=1; ''/e; if ($matched) { ! my($new, $old) = ($1, $3); ! eval "sub do_cmd_$new { do_cmd_$old" . '(@_); }'; ! print "\ndefining handler for \\$new using \\$old\n"; } else { ! s/[\\]([a-zA-Z]+)\s*(=\s*)?([^\\])/$matched=1; ''/es; ! if ($matched) { ! my($new, $char) = ($1, $3); ! eval "sub do_cmd_$new { \"\\$char\" . \$_[0]; }"; ! print "\ndefining handler for \\$new to insert '$char'\n"; ! } ! else { ! write_warnings("Could not interpret \\let construct..."); ! } } return $_; *************** *** 305,309 **** # the variable name case-insensitive. add_index_entry("environment variables!$envvar@<tt>$envvar</tt>", ! $ahref); add_index_entry("$envvar (environment variable)", $ahref); $aname =~ s/<a/<a class="envvar"/; --- 305,309 ---- # the variable name case-insensitive. add_index_entry("environment variables!$envvar@<tt>$envvar</tt>", ! $ahref); add_index_entry("$envvar (environment variable)", $ahref); $aname =~ s/<a/<a class="envvar"/; *************** *** 484,488 **** open(INTLABELS, '>intlabels.pl') || die "\n$!\n"; print INTLABELS "%internal_labels = ();\n"; ! print INTLABELS "1; # hack in case there are no entries\n\n"; # Using \0 for this is bad because we can't use common tools to work with the --- 484,488 ---- open(INTLABELS, '>intlabels.pl') || die "\n$!\n"; print INTLABELS "%internal_labels = ();\n"; ! print INTLABELS "1; # hack in case there are no entries\n\n"; # Using \0 for this is bad because we can't use common tools to work with the *************** *** 523,538 **** my $i = 0; for (; $i < $count; ++$i) { ! my $name = $_[$i]; ! my $cmd = "idx_cmd_$name"; ! die "\nNo function $cmd() defined!\n" ! if (!defined &$cmd); ! eval ("sub do_cmd_$name { return process_index_macros(" ! . "\$_[0], '$name'); }"); ! if (length($IndexMacroPattern) == 0) { ! $IndexMacroPattern = "$name"; ! } ! else { ! $IndexMacroPattern .= "|$name"; ! } } } --- 523,538 ---- my $i = 0; for (; $i < $count; ++$i) { ! my $name = $_[$i]; ! my $cmd = "idx_cmd_$name"; ! die "\nNo function $cmd() defined!\n" ! if (!defined &$cmd); ! eval ("sub do_cmd_$name { return process_index_macros(" ! . "\$_[0], '$name'); }"); ! if (length($IndexMacroPattern) == 0) { ! $IndexMacroPattern = "$name"; ! } ! else { ! $IndexMacroPattern .= "|$name"; ! } } } *************** *** 541,563 **** sub process_index_macros($$){ local($_) = @_; ! my $cmdname = $_[1]; # This is what triggered us in the first place; ! # we know it's real, so just process it. my($name, $aname, $ahref) = new_link_info(); my $cmd = "idx_cmd_$cmdname"; print "\nIndexing: \\$cmdname" if $DEBUG_INDEXING; ! &$cmd($ahref); # modifies $_ and adds index entries while (/^[\s\n]*\\($IndexMacroPattern)</) { ! $cmdname = "$1"; ! print " \\$cmdname" ! if $DEBUG_INDEXING; ! $cmd = "idx_cmd_$cmdname"; ! if (!defined &$cmd) { ! last; ! } ! else { ! s/^[\s\n]*\\$cmdname//; ! &$cmd($ahref); ! } } if (/^[ \t\r\n]/) { --- 541,563 ---- sub process_index_macros($$){ local($_) = @_; ! my $cmdname = $_[1]; # This is what triggered us in the first place; ! # we know it's real, so just process it. my($name, $aname, $ahref) = new_link_info(); my $cmd = "idx_cmd_$cmdname"; print "\nIndexing: \\$cmdname" if $DEBUG_INDEXING; ! &$cmd($ahref); # modifies $_ and adds index entries while (/^[\s\n]*\\($IndexMacroPattern)</) { ! $cmdname = "$1"; ! print " \\$cmdname" ! if $DEBUG_INDEXING; ! $cmd = "idx_cmd_$cmdname"; ! if (!defined &$cmd) { ! last; ! } ! else { ! s/^[\s\n]*\\$cmdname//; ! &$cmd($ahref); ! } } if (/^[ \t\r\n]/) { *************** *** 649,656 **** if ($define eq 'DEF') { ! # add to the module index $str =~ /(<tt.*<\/tt>)/; my $nstr = $1; ! $Modules{$nstr} .= $ahref; } return "$aname$anchor_invisible_mark2</a>"; --- 649,656 ---- if ($define eq 'DEF') { ! # add to the module index $str =~ /(<tt.*<\/tt>)/; my $nstr = $1; ! $Modules{$nstr} .= $ahref; } return "$aname$anchor_invisible_mark2</a>"; *************** *** 665,672 **** my $section_tag = join('', @curr_sec_id); if ($word ne "built-in" && $word ne "extension" ! && $word ne "standard" && $word ne "") { ! write_warnings("Bad module type '$word'" ! . " for \\declaremodule (module $name)"); ! $word = ""; } $word = "$word " if $word; --- 665,672 ---- my $section_tag = join('', @curr_sec_id); if ($word ne "built-in" && $word ne "extension" ! && $word ne "standard" && $word ne "") { ! write_warnings("Bad module type '$word'" ! . " for \\declaremodule (module $name)"); ! $word = ""; } $word = "$word " if $word; *************** *** 707,711 **** # these should be adjusted a bit.... define_indexing_macro('refmodindex', 'refbimodindex', ! 'refexmodindex', 'refstmodindex'); sub idx_cmd_refmodindex($){ return ref_module_index_helper('', $_[0]); } --- 707,711 ---- # these should be adjusted a bit.... define_indexing_macro('refmodindex', 'refbimodindex', ! 'refexmodindex', 'refstmodindex'); sub idx_cmd_refmodindex($){ return ref_module_index_helper('', $_[0]); } *************** *** 898,904 **** my($myname, $mydir, $myext) = fileparse(__FILE__, '\..*'); ! chop $mydir; # remove trailing '/' ($myname, $mydir, $myext) = fileparse($mydir, '\..*'); ! chop $mydir; # remove trailing '/' $mydir = getcwd() . "$dd$mydir" unless $mydir =~ s|^/|/|; --- 898,904 ---- my($myname, $mydir, $myext) = fileparse(__FILE__, '\..*'); ! chop $mydir; # remove trailing '/' ($myname, $mydir, $myext) = fileparse($mydir, '\..*'); ! chop $mydir; # remove trailing '/' $mydir = getcwd() . "$dd$mydir" unless $mydir =~ s|^/|/|; *************** *** 932,936 **** "<tt class=\"cfunction\">$name()</tt>" . get_indexsubitem()); $idx =~ s/ \(.*\)//; ! $idx =~ s/\(\)//; # ???? - why both of these? $args =~ s/(\s|\*)([a-z_][a-z_0-9]*),/$1<var>$2<\/var>,/g; $args =~ s/(\s|\*)([a-z_][a-z_0-9]*)$/$1<var>$2<\/var>/s; --- 932,936 ---- "<tt class=\"cfunction\">$name()</tt>" . get_indexsubitem()); $idx =~ s/ \(.*\)//; ! $idx =~ s/\(\)//; # ???? - why both of these? $args =~ s/(\s|\*)([a-z_][a-z_0-9]*),/$1<var>$2<\/var>,/g; $args =~ s/(\s|\*)([a-z_][a-z_0-9]*)$/$1<var>$2<\/var>/s; *************** *** 1029,1033 **** my $var_name = next_argument(); my $idx = make_str_index_entry("<tt class=\"cdata\">$var_name</tt>" ! . get_indexsubitem()); $idx =~ s/ \(.*\)//; return "<dl><dt>$var_type <b>$idx</b></dt>\n" --- 1029,1033 ---- my $var_name = next_argument(); my $idx = make_str_index_entry("<tt class=\"cdata\">$var_name</tt>" ! . get_indexsubitem()); $idx =~ s/ \(.*\)//; return "<dl><dt>$var_type <b>$idx</b></dt>\n" *************** *** 1057,1061 **** my $idx = make_str_index_entry("<tt class=\"function\">$function_name()" . '</tt>' ! . get_indexsubitem()); $idx =~ s/ \(.*\)//; $idx =~ s/\(\)<\/tt>/<\/tt>/; --- 1057,1061 ---- my $idx = make_str_index_entry("<tt class=\"function\">$function_name()" . '</tt>' ! . get_indexsubitem()); $idx =~ s/ \(.*\)//; $idx =~ s/\(\)<\/tt>/<\/tt>/; *************** *** 1103,1116 **** my $idx; if ($INDEX_OPCODES) { ! $idx = make_str_index_entry("<tt class=\"opcode\">$opcode_name</tt>" . ' (byte code instruction)'); ! $idx =~ s/ \(byte code instruction\)//; } else { ! $idx = "<tt class=\"opcode\">$opcode_name</tt>"; } my $stuff = "<dl><dt><b>$idx</b>"; if ($arg_list) { ! $stuff .= "    <var>$arg_list</var>"; } return $stuff . "</dt>\n<dd>" . $_ . '</dt></dl>'; --- 1103,1116 ---- my $idx; if ($INDEX_OPCODES) { ! $idx = make_str_index_entry("<tt class=\"opcode\">$opcode_name</tt>" . ' (byte code instruction)'); ! $idx =~ s/ \(byte code instruction\)//; } else { ! $idx = "<tt class=\"opcode\">$opcode_name</tt>"; } my $stuff = "<dl><dt><b>$idx</b>"; if ($arg_list) { ! $stuff .= "    <var>$arg_list</var>"; } return $stuff . "</dt>\n<dd>" . $_ . '</dt></dl>'; *************** *** 1124,1128 **** return "<dl><dt><b>$idx</b></dt>\n<dd>" . $_ ! . '</dd></dl>'; } --- 1124,1128 ---- return "<dl><dt><b>$idx</b></dt>\n<dd>" . $_ ! . '</dd></dl>'; } *************** *** 1131,1135 **** my $idx = next_argument(); if (! $STRING_INDEX_TT) { ! $idx = "<tt>$idx</tt>"; } return "<dl><dt><b>$idx</b></dt>\n<dd>" . $_ . '</dd></dl>'; --- 1131,1135 ---- my $idx = next_argument(); if (! $STRING_INDEX_TT) { ! $idx = "<tt>$idx</tt>"; } return "<dl><dt><b>$idx</b></dt>\n<dd>" . $_ . '</dd></dl>'; *************** *** 1168,1172 **** my $arg_list = convert_args(next_argument()); $idx = make_str_index_entry( ! "<tt class=\"$what\">$THIS_CLASS</tt> ($what in $THIS_MODULE)" ); $idx =~ s/ \(.*\)//; my $prefix = "$TLSTART$what$TLEND$idx"; --- 1168,1172 ---- my $arg_list = convert_args(next_argument()); $idx = make_str_index_entry( ! "<tt class=\"$what\">$THIS_CLASS</tt> ($what in $THIS_MODULE)" ); $idx =~ s/ \(.*\)//; my $prefix = "$TLSTART$what$TLEND$idx"; *************** *** 1182,1186 **** $THIS_CLASS = next_argument(); $idx = make_str_index_entry( ! "<tt class=\"class\">$THIS_CLASS</tt> (class in $THIS_MODULE)"); $idx =~ s/ \(.*\)//; my $prefix = "${TLSTART}class$TLEND$idx"; --- 1182,1186 ---- $THIS_CLASS = next_argument(); $idx = make_str_index_entry( ! "<tt class=\"class\">$THIS_CLASS</tt> (class in $THIS_MODULE)"); $idx =~ s/ \(.*\)//; my $prefix = "${TLSTART}class$TLEND$idx"; *************** *** 1203,1207 **** my $extra = ''; if ($class_name) { ! $extra = " ($class_name method)"; } my $idx = make_str_index_entry( --- 1203,1207 ---- my $extra = ''; if ($class_name) { ! $extra = " ($class_name method)"; } my $idx = make_str_index_entry( *************** *** 1222,1226 **** my $extra = ''; if ($class_name) { ! $extra = " ($class_name method)"; } my $idx = make_str_index_entry( --- 1222,1226 ---- my $extra = ''; if ($class_name) { ! $extra = " ($class_name method)"; } my $idx = make_str_index_entry( *************** *** 1384,1397 **** s/\\lineii</\\lineii[$a1|$a2]</g; return '<table border align="center" style="border-collapse: collapse">' ! . "\n <thead>" ! . "\n <tr class=\"tableheader\">" ! . "\n $th1<b>$h1</b>\ </th>" ! . "\n $th2<b>$h2</b>\ </th>" ! . "\n </tr>" ! . "\n </thead>" ! . "\n <tbody valign=\"baseline\">" ! . $_ ! . "\n </tbody>" ! . "\n</table>"; } --- 1384,1397 ---- s/\\lineii</\\lineii[$a1|$a2]</g; return '<table border align="center" style="border-collapse: collapse">' ! . "\n <thead>" ! . "\n <tr class=\"tableheader\">" ! . "\n $th1<b>$h1</b>\ </th>" ! . "\n $th2<b>$h2</b>\ </th>" ! . "\n </tr>" ! . "\n </thead>" ! . "\n <tbody valign=\"baseline\">" ! . $_ ! . "\n </tbody>" ! . "\n</table>"; } *************** *** 1416,1420 **** return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" . " $c2align$c2</td>" ! . $_; } --- 1416,1420 ---- return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" . " $c2align$c2</td>" ! . $_; } *************** *** 1434,1448 **** s/\\lineiii</\\lineiii[$a1|$a2|$a3]</g; return '<table border align="center" style="border-collapse: collapse">' ! . "\n <thead>" ! . "\n <tr class=\"tableheader\">" ! . "\n $th1<b>$h1</b>\ </th>" ! . "\n $th2<b>$h2</b>\ </th>" ! . "\n $th3<b>$h3</b>\ </th>" ! . "\n </tr>" ! . "\n </thead>" ! . "\n <tbody valign=\"baseline\">" ! . $_ ! . "\n </tbody>" ! . "\n</table>"; } --- 1434,1448 ---- s/\\lineiii</\\lineiii[$a1|$a2|$a3]</g; return '<table border align="center" style="border-collapse: collapse">' ! . "\n <thead>" ! . "\n <tr class=\"tableheader\">" ! . "\n $th1<b>$h1</b>\ </th>" ! . "\n $th2<b>$h2</b>\ </th>" ! . "\n $th3<b>$h3</b>\ </th>" ! . "\n </tr>" ! . "\n </thead>" ! . "\n <tbody valign=\"baseline\">" ! . $_ ! . "\n </tbody>" ! . "\n</table>"; } *************** *** 1469,1474 **** return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" . " $c2align$c2</td>\n" ! . " $c3align$c3</td>" ! . $_; } --- 1469,1474 ---- return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" . " $c2align$c2</td>\n" ! . " $c3align$c3</td>" ! . $_; } *************** *** 1490,1505 **** s/\\lineiv</\\lineiv[$a1|$a2|$a3|$a4]</g; return '<table border align="center" style="border-collapse: collapse">' ! . "\n <thead>" ! . "\n <tr class=\"tableheader\">" ! . "\n $th1<b>$h1</b>\ </th>" ! . "\n $th2<b>$h2</b>\ </th>" ! . "\n $th3<b>$h3</b>\ </th>" ! . "\n $th4<b>$h4</b>\ </th>" ! . "\n </tr>" ! . "\n </thead>" ! . "\n <tbody valign=\"baseline\">" ! . $_ ! . "\n </tbody>" ! . "\n</table>"; } --- 1490,1505 ---- s/\\lineiv</\\lineiv[$a1|$a2|$a3|$a4]</g; return '<table border align="center" style="border-collapse: collapse">' ! . "\n <thead>" ! . "\n <tr class=\"tableheader\">" ! . "\n $th1<b>$h1</b>\ </th>" ! . "\n $th2<b>$h2</b>\ </th>" ! . "\n $th3<b>$h3</b>\ </th>" ! . "\n $th4<b>$h4</b>\ </th>" ! . "\n </tr>" ! . "\n </thead>" ! . "\n <tbody valign=\"baseline\">" ! . $_ ! . "\n </tbody>" ! . "\n</table>"; } *************** *** 1512,1516 **** my $aligns = next_optional_argument(); my $c1 = next_argument(); ! my $c2 = next_argument(); my $c3 = next_argument(); my $c4 = next_argument(); --- 1512,1516 ---- my $aligns = next_optional_argument(); my $c1 = next_argument(); ! my $c2 = next_argument(); my $c3 = next_argument(); my $c4 = next_argument(); *************** *** 1528,1534 **** return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" . " $c2align$c2</td>\n" ! . " $c3align$c3</td>\n" ! . " $c4align$c4</td>" ! . $_; } --- 1528,1534 ---- return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" . " $c2align$c2</td>\n" ! . " $c3align$c3</td>\n" ! . " $c4align$c4</td>" ! . $_; } *************** *** 1552,1568 **** s/\\linev</\\linev[$a1|$a2|$a3|$a4|$a5]</g; return '<table border align="center" style="border-collapse: collapse">' ! . "\n <thead>" ! . "\n <tr class=\"tableheader\">" ! . "\n $th1<b>$h1</b>\ </th>" ! . "\n $th2<b>$h2</b>\ </th>" ! . "\n $th3<b>$h3</b>\ </th>" ! . "\n $th4<b>$h4</b>\ </th>" ! . "\n $th5<b>$h5</b>\ </th>" ! . "\n </tr>" ! . "\n </thead>" ! . "\n <tbody valign=\"baseline\">" ! . $_ ! . "\n </tbody>" ! . "\n</table>"; } --- 1552,1568 ---- s/\\linev</\\linev[$a1|$a2|$a3|$a4|$a5]</g; return '<table border align="center" style="border-collapse: collapse">' ! . "\n <thead>" ! . "\n <tr class=\"tableheader\">" ! . "\n $th1<b>$h1</b>\ </th>" ! . "\n $th2<b>$h2</b>\ </th>" ! . "\n $th3<b>$h3</b>\ </th>" ! . "\n $th4<b>$h4</b>\ </th>" ! . "\n $th5<b>$h5</b>\ </th>" ! . "\n </tr>" ! . "\n </thead>" ! . "\n <tbody valign=\"baseline\">" ! . $_ ! . "\n </tbody>" ! . "\n</table>"; } *************** *** 1593,1600 **** return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" . " $c2align$c2</td>\n" ! . " $c3align$c3</td>\n" ! . " $c4align$c4</td>\n" ! . " $c5align$c5</td>" ! . $_; } --- 1593,1600 ---- return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" . " $c2align$c2</td>\n" ! . " $c3align$c3</td>\n" ! . " $c4align$c4</td>\n" ! . " $c5align$c5</td>" ! . $_; } *************** *** 1621,1625 **** my $the_title = ""; if ($t_title) { ! $the_title .= "\n<h1>$t_title</h1>"; } else { --- 1621,1625 ---- my $the_title = ""; if ($t_title) { ! $the_title .= "\n<h1>$t_title</h1>"; } else { *************** *** 1627,1641 **** } if ($t_author) { ! if ($t_authorURL) { ! my $href = translate_commands($t_authorURL); ! $href = make_named_href('author', $href, ! "<b><font size=\"+2\">$t_author" . '</font></b>'); ! $the_title .= "\n<p>$href</p>"; ! } else { ! $the_title .= ("\n<p><b><font size=\"+2\">$t_author" . '</font></b></p>'); ! } } else { --- 1627,1641 ---- } if ($t_author) { ! if ($t_authorURL) { ! my $href = translate_commands($t_authorURL); ! $href = make_named_href('author', $href, ! "<b><font size=\"+2\">$t_author" . '</font></b>'); ! $the_title .= "\n<p>$href</p>"; ! } else { ! $the_title .= ("\n<p><b><font size=\"+2\">$t_author" . '</font></b></p>'); ! } } else { *************** *** 1649,1664 **** } if ($t_affil) { ! $the_title .= "\n<p><i>$t_affil</i></p>"; } if ($t_date) { ! $the_title .= "\n<p>"; ! if ($PACKAGE_VERSION) { ! $the_title .= ('<strong>Release ' . "$PACKAGE_VERSION$RELEASE_INFO</strong><br />\n"); } ! $the_title .= "<strong>$t_date</strong></p>" } if ($t_address) { ! $the_title .= "\n<p>$t_address</p>"; } else { --- 1649,1664 ---- } if ($t_affil) { ! $the_title .= "\n<p><i>$t_affil</i></p>"; } if ($t_date) { ! $the_title .= "\n<p>"; ! if ($PACKAGE_VERSION) { ! $the_title .= ('<strong>Release ' . "$PACKAGE_VERSION$RELEASE_INFO</strong><br />\n"); } ! $the_title .= "<strong>$t_date</strong></p>" } if ($t_address) { ! $the_title .= "\n<p>$t_address</p>"; } else { *************** *** 1666,1670 **** } if ($t_email) { ! $the_title .= "\n<p>$t_email</p>"; } return $the_title; --- 1666,1670 ---- } if ($t_email) { ! $the_title .= "\n<p>$t_email</p>"; } return $the_title; *************** *** 1748,1754 **** my $key; foreach $key (keys %ModuleSynopses) { ! if ($key eq $chap) { ! return $ModuleSynopses{$chap}; ! } } my $st = SynopsisTable->new(); --- 1748,1754 ---- my $key; foreach $key (keys %ModuleSynopses) { ! if ($key eq $chap) { ! return $ModuleSynopses{$chap}; ! } } my $st = SynopsisTable->new(); *************** *** 1822,1830 **** # need to get contents of file in $_ while (/<tex2html-localmoduletable><(\d+)>/) { ! my $match = $&; ! my $chap = $1; ! my $st = get_synopsis_table($chap); ! my $data = $st->tohtml(); ! s/$match/$data/; } open(MYFILE,">$file"); --- 1822,1830 ---- # need to get contents of file in $_ while (/<tex2html-localmoduletable><(\d+)>/) { ! my $match = $&; ! my $chap = $1; ! my $st = get_synopsis_table($chap); ! my $data = $st->tohtml(); ! s/$match/$data/; } open(MYFILE,">$file"); *************** *** 1866,1870 **** unless $key; if ($text =~ /\.$/) { ! $period = ''; } return ('<dl compact class="seemodule">' --- 1866,1870 ---- unless $key; if ($text =~ /\.$/) { ! $period = ''; } return ('<dl compact class="seemodule">' *************** *** 2008,2025 **** ($local_closures, $local_reopens,@open_block_tags) = &preserve_open_block_tags ! if (@$open_tags_R); $open_tags_R = [ @open_block_tags ]; do { ! local($open_tags_R) = [ @open_block_tags ]; ! local(@save_open_tags) = (); ! local($cnt) = ++$global{'max_id'}; ! $_ = join('',"$O$cnt$C\\tt$O", ++$global{'max_id'}, $C ! , $_ , $O, $global{'max_id'}, "$C$O$cnt$C"); ! $_ = &translate_environments($_); ! $_ = &translate_commands($_) if (/\\/); # remove spurious <BR> someone sticks in; not sure where they --- 2008,2025 ---- ($local_closures, $local_reopens,@open_block_tags) = &preserve_open_block_tags ! if (@$open_tags_R); $open_tags_R = [ @open_block_tags ]; do { ! local($open_tags_R) = [ @open_block_tags ]; ! local(@save_open_tags) = (); ! local($cnt) = ++$global{'max_id'}; ! $_ = join('',"$O$cnt$C\\tt$O", ++$global{'max_id'}, $C ! , $_ , $O, $global{'max_id'}, "$C$O$cnt$C"); ! $_ = &translate_environments($_); ! $_ = &translate_commands($_) if (/\\/); # remove spurious <BR> someone sticks in; not sure where they *************** *** 2030,2038 **** s/<BR>/ /gi; ! $_ = join('', $closures, $alltt_start, $local_reopens ! , $_ ! , &balance_tags() #, $local_closures ! , $alltt_end, $reopens); ! undef $open_tags_R; undef @save_open_tags; }; $open_tags_R = [ @keep_open_tags ]; --- 2030,2038 ---- s/<BR>/ /gi; ! $_ = join('', $closures, $alltt_start, $local_reopens ! , $_ ! , &balance_tags() #, $local_closures ! , $alltt_end, $reopens); ! undef $open_tags_R; undef @save_open_tags; }; $open_tags_R = [ @keep_open_tags ]; *************** *** 2153,2155 **** } ! 1; # This must be the last line --- 2153,2155 ---- } ! 1; # This must be the last line From fdrake at users.sourceforge.net Fri Sep 5 09:50:22 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 11:50:35 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libfuture.tex,1.2,1.3 Message-ID: <E19vIqs-0007xi-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv30599 Modified Files: libfuture.tex Log Message: markup updates Index: libfuture.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuture.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** libfuture.tex 5 Aug 2003 11:40:21 -0000 1.2 --- libfuture.tex 5 Sep 2003 15:50:20 -0000 1.3 *************** *** 26,36 **** Each statement in \file{__future__.py} is of the form: ! \begin{verbatim} ! FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," ! CompilerFlag ")" ! \end{verbatim} ! where, normally, OptionalRelease is less then MandatoryRelease, and ! both are 5-tuples of the same form as \code{sys.version_info}: \begin{verbatim} --- 26,37 ---- Each statement in \file{__future__.py} is of the form: ! \begin{alltt} ! FeatureName = "_Feature(" \var{OptionalRelease} "," \var{MandatoryRelease} "," ! \var{CompilerFlag} ")" ! \end{alltt} ! where, normally, \var{OptionalRelease} is less than ! \var{MandatoryRelease}, and both are 5-tuples of the same form as ! \code{sys.version_info}: \begin{verbatim} *************** *** 43,59 **** \end{verbatim} ! OptionalRelease records the first release in which the feature was ! accepted. ! In the case of MandatoryReleases that have not yet occurred, ! MandatoryRelease predicts the release in which the feature will become ! part of the language. ! Else MandatoryRelease records when the feature became part of the ! language; in releases at or after that, modules no longer need a future statement to use the feature in question, but may continue to ! use such imports. ! MandatoryRelease may also be \code{None}, meaning that a planned feature got dropped. --- 44,60 ---- \end{verbatim} ! \var{OptionalRelease} records the first release in which the feature ! was accepted. ! In the case of a \var{MandatoryRelease} that has not yet occurred, ! \var{MandatoryRelease} predicts the release in which the feature will ! become part of the language. ! Else \var{MandatoryRelease} records when the feature became part of ! the language; in releases at or after that, modules no longer need a future statement to use the feature in question, but may continue to ! use such imports. ! \var{MandatoryRelease} may also be \code{None}, meaning that a planned feature got dropped. *************** *** 61,65 **** \method{getOptionalRelease()} and \method{getMandatoryRelease()}. ! CompilerFlag is the (bitfield) flag that should be passed in the fourth argument to the builtin function \function{compile()} to enable the feature in dynamically compiled code. This flag is stored in the --- 62,66 ---- \method{getOptionalRelease()} and \method{getMandatoryRelease()}. ! \var{CompilerFlag} is the (bitfield) flag that should be passed in the fourth argument to the builtin function \function{compile()} to enable the feature in dynamically compiled code. This flag is stored in the *************** *** 67,69 **** No feature description will ever be deleted from \module{__future__}. - --- 68,69 ---- From python at rcn.com Fri Sep 5 13:52:21 2003 From: python at rcn.com (Raymond Hettinger) Date: Fri Sep 5 13:03:33 2003 Subject: [Python-checkins] python/dist/src/Objects fileobject.c, 2.179, 2.179.8.1 References: <E19uzN8-0001f4-00@sc8-pr-cvs1.sourceforge.net> Message-ID: <000301c373ce$f47e9720$843bc797@oemcomputer> This checkin crashes test_dumbdbm.py and test_whichdbm.py when they are run in the debug mode. Raymond Hettinger From rhettinger at users.sourceforge.net Fri Sep 5 15:40:32 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 5 17:40:35 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.34,1.831.4.35 Message-ID: <E19vOJk-0002Mw-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv8317/Misc Modified Files: Tag: release23-maint NEWS Log Message: SF bug #801342: Bug (documentation or real, your choice) in random.sample. random.sample() uses one of two algorithms depending on the ratio of the sample size to the population size. One of the algorithms accepted any iterable population argument so long as it defined __len__(). The other had a stronger requirement that the population argument be indexable. While it met the documentation specifications which insisted that the population argument be a sequence, it made random.sample() less usable with sets. So, the second algorithm was modified to coerce non-indexable iterables and dictionaries into a tuple before proceeding. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.34 retrieving revision 1.831.4.35 diff -C2 -d -r1.831.4.34 -r1.831.4.35 *** NEWS 5 Sep 2003 14:38:30 -0000 1.831.4.34 --- NEWS 5 Sep 2003 21:40:29 -0000 1.831.4.35 *************** *** 68,71 **** --- 68,74 ---- it duplicates Set.union_update(). + - Bug #801342: random.sample() now accepts a Set as a possible argument. + Previously, it insisted that the population argument be indexable. + - Bug #778964: random.seed() now uses fractional seconds so that rapid successive, seeding calls will produce different sequences. From rhettinger at users.sourceforge.net Fri Sep 5 15:40:32 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 5 17:40:38 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_random.py, 1.12.8.1, 1.12.8.2 Message-ID: <E19vOJk-0002N4-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv8317/Lib/test Modified Files: Tag: release23-maint test_random.py Log Message: SF bug #801342: Bug (documentation or real, your choice) in random.sample. random.sample() uses one of two algorithms depending on the ratio of the sample size to the population size. One of the algorithms accepted any iterable population argument so long as it defined __len__(). The other had a stronger requirement that the population argument be indexable. While it met the documentation specifications which insisted that the population argument be a sequence, it made random.sample() less usable with sets. So, the second algorithm was modified to coerce non-indexable iterables and dictionaries into a tuple before proceeding. Index: test_random.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_random.py,v retrieving revision 1.12.8.1 retrieving revision 1.12.8.2 diff -C2 -d -r1.12.8.1 -r1.12.8.2 *** test_random.py 9 Aug 2003 18:20:16 -0000 1.12.8.1 --- test_random.py 5 Sep 2003 21:40:30 -0000 1.12.8.2 *************** *** 87,90 **** --- 87,101 ---- self.fail() + def test_sample_inputs(self): + # SF bug #801342 -- population can be any iterable defining __len__() + from sets import Set + self.gen.sample(Set(range(20)), 2) + self.gen.sample(range(20), 2) + self.gen.sample(xrange(20), 2) + self.gen.sample(dict.fromkeys('abcdefghijklmnopqrst'), 2) + self.gen.sample(str('abcdefghijklmnopqrst'), 2) + self.gen.sample(unicode('abcdefghijklmnopqrst'), 2) + self.gen.sample(tuple('abcdefghijklmnopqrst'), 2) + def test_gauss(self): # Ensure that the seed() method initializes all the hidden state. In From rhettinger at users.sourceforge.net Fri Sep 5 15:40:32 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 5 17:40:43 2003 Subject: [Python-checkins] python/dist/src/Lib random.py,1.51.8.1,1.51.8.2 Message-ID: <E19vOJk-0002My-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv8317/Lib Modified Files: Tag: release23-maint random.py Log Message: SF bug #801342: Bug (documentation or real, your choice) in random.sample. random.sample() uses one of two algorithms depending on the ratio of the sample size to the population size. One of the algorithms accepted any iterable population argument so long as it defined __len__(). The other had a stronger requirement that the population argument be indexable. While it met the documentation specifications which insisted that the population argument be a sequence, it made random.sample() less usable with sets. So, the second algorithm was modified to coerce non-indexable iterables and dictionaries into a tuple before proceeding. Index: random.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/random.py,v retrieving revision 1.51.8.1 retrieving revision 1.51.8.2 diff -C2 -d -r1.51.8.1 -r1.51.8.2 *** random.py 9 Aug 2003 18:20:16 -0000 1.51.8.1 --- random.py 5 Sep 2003 21:40:30 -0000 1.51.8.2 *************** *** 259,262 **** --- 259,266 ---- pool[j] = pool[n-i-1] # move non-selected item into vacancy else: + try: + n > 0 and (population[0], population[n//2], population[n-1]) + except (TypeError, KeyError): # handle sets and dictionaries + population = tuple(population) selected = {} for i in xrange(k): From jackjansen at users.sourceforge.net Fri Sep 5 16:09:16 2003 From: jackjansen at users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Fri Sep 5 18:09:20 2003 Subject: [Python-checkins] python/dist/src/Mac/OSX/Dist/resources.panther ReadMe.txt, 1.1.2.1, 1.1.2.2 Welcome.rtf, 1.1.2.1, 1.1.2.2 Message-ID: <E19vOlY-0003hw-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/OSX/Dist/resources.panther In directory sc8-pr-cvs1:/tmp/cvs-serv14205/Dist/resources.panther Modified Files: Tag: release23-maint ReadMe.txt Welcome.rtf Log Message: As of 7B53 things seem to work smoothly. Index: ReadMe.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSX/Dist/resources.panther/Attic/ReadMe.txt,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** ReadMe.txt 31 Aug 2003 23:40:51 -0000 1.1.2.1 --- ReadMe.txt 5 Sep 2003 22:09:14 -0000 1.1.2.2 *************** *** 1,6 **** This package will install MacPython 2.3 for Mac OS X ! 10.3. ! Installation requires approximately XXX MB of disk space, ignore the message that it will take zero bytes. --- 1,6 ---- This package will install MacPython 2.3 for Mac OS X ! 10.3 beta (build 7B53 or later). ! Installation requires approximately 3.3 MB of disk space, ignore the message that it will take zero bytes. Index: Welcome.rtf =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSX/Dist/resources.panther/Attic/Welcome.rtf,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Welcome.rtf 31 Aug 2003 23:40:51 -0000 1.1.2.1 --- Welcome.rtf 5 Sep 2003 22:09:14 -0000 1.1.2.2 *************** *** 8,12 **** \f1\b MacPython 2.3 \f0\b0 for ! \f1\b Mac OS X 10.3 \f0\b0 . \ \ --- 8,12 ---- \f1\b MacPython 2.3 \f0\b0 for ! \f1\b Mac OS X 10.3 beta (7B53 or later) \f0\b0 . \ \ From jackjansen at users.sourceforge.net Fri Sep 5 16:09:16 2003 From: jackjansen at users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Fri Sep 5 18:09:23 2003 Subject: [Python-checkins] python/dist/src/Mac/OSX/Dist build.panther, 1.1.2.1, 1.1.2.2 Message-ID: <E19vOlY-0003hu-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/OSX/Dist In directory sc8-pr-cvs1:/tmp/cvs-serv14205/Dist Modified Files: Tag: release23-maint build.panther Log Message: As of 7B53 things seem to work smoothly. Index: build.panther =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSX/Dist/Attic/build.panther,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** build.panther 31 Aug 2003 23:40:51 -0000 1.1.2.1 --- build.panther 5 Sep 2003 22:09:14 -0000 1.1.2.2 *************** *** 66,70 **** # Remove the temporary symlink ! # rm -r $INSTALLROOT/System # Unfortunately all the ...MODE arguments above still don't do the trick. --- 66,70 ---- # Remove the temporary symlink ! rm -r $INSTALLROOT/System # Unfortunately all the ...MODE arguments above still don't do the trick. From fdrake at users.sourceforge.net Fri Sep 5 19:10:16 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 21:10:20 2003 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.31,1.32 Message-ID: <E19vRai-0002cl-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1:/tmp/cvs-serv10084 Modified Files: style.css Log Message: avoid spurious vertical whitespace preceeding heading which are marked with a \label Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** style.css 5 Sep 2003 13:58:26 -0000 1.31 --- style.css 6 Sep 2003 01:10:14 -0000 1.32 *************** *** 50,53 **** --- 50,61 ---- h2 { font-size: 150%; } h3, h4 { font-size: 120%; } + + /* LaTeX2HTML insists on inserting <br> 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. + */ + h1>br, h2>br, h3>br, + h4>br, h5>br, h6>br { display: none; } + code, tt { font-family: "lucida typewriter", lucidatypewriter, monospace; } From fdrake at users.sourceforge.net Fri Sep 5 21:33:34 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 23:33:39 2003 Subject: [Python-checkins] python/dist/src/Doc/ref ref5.tex,1.76,1.77 Message-ID: <E19vTpO-0007tI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1:/tmp/cvs-serv30327 Modified Files: ref5.tex Log Message: - create a hyperlink for a section reference (also more robust in the face of section re-ordering) - fix minor markup nits for better presentation Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** ref5.tex 27 Jun 2003 17:12:43 -0000 1.76 --- ref5.tex 6 Sep 2003 03:33:32 -0000 1.77 *************** *** 64,69 **** \index{identifier} ! An identifier occurring as an atom is a name. See Section 4.1 for ! documentation of naming and binding. When the name is bound to an object, evaluation of the atom yields --- 64,69 ---- \index{identifier} ! An identifier occurring as an atom is a name. See ! section~\ref{naming} for documentation of naming and binding. When the name is bound to an object, evaluation of the atom yields *************** *** 72,79 **** \exindex{NameError} ! \strong{Private name mangling:}% \indexii{name}{mangling}% \indexii{private}{names}% ! when an identifier that textually occurs in a class definition begins with two or more underscore characters and does not end in two or more underscores, it is considered a \dfn{private name} of that class. --- 72,79 ---- \exindex{NameError} ! \strong{Private name mangling:} \indexii{name}{mangling}% \indexii{private}{names}% ! When an identifier that textually occurs in a class definition begins with two or more underscore characters and does not end in two or more underscores, it is considered a \dfn{private name} of that class. From fdrake at users.sourceforge.net Fri Sep 5 21:48:18 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 23:48:21 2003 Subject: [Python-checkins] python/dist/src/Doc/ref ref2.tex,1.48,1.48.10.1 Message-ID: <E19vU3e-0008Pe-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1:/tmp/cvs-serv32334/ref Modified Files: Tag: release23-maint ref2.tex Log Message: Elaborate the explanation of different flavors of _* identifiers. Fixes SF bug #520325. Index: ref2.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref2.tex,v retrieving revision 1.48 retrieving revision 1.48.10.1 diff -C2 -d -r1.48 -r1.48.10.1 *** ref2.tex 21 Jun 2003 13:40:02 -0000 1.48 --- ref2.tex 6 Sep 2003 03:48:16 -0000 1.48.10.1 *************** *** 321,343 **** Certain classes of identifiers (besides keywords) have special ! meanings. These are: ! \begin{tableiii}{l|l|l}{code}{Form}{Meaning}{Notes} ! \lineiii{_*}{Not imported by \samp{from \var{module} import *}}{(1)} ! \lineiii{__*__}{System-defined name}{} ! \lineiii{__*}{Class-private name mangling}{} ! \end{tableiii} ! See sections: \ref{import}, ``The \keyword{import} statement''; ! \ref{specialnames}, ``Special method names''; ! \ref{atom-identifiers}, ``Identifiers (Names)''. ! Note: - \begin{description} - \item[(1)] The special identifier \samp{_} is used in the interactive - interpreter to store the result of the last evaluation; it is stored - in the \module{__builtin__} module. When not in interactive mode, - \samp{_} has no special meaning and is not defined. \end{description} --- 321,357 ---- Certain classes of identifiers (besides keywords) have special ! meanings. These classes are identified by the patterns of leading and ! trailing underscore characters: ! \begin{description} ! \item[\code{_*}] ! Not imported by \samp{from \var{module} import *}. The special ! identifier \samp{_} is used in the interactive interpreter to store ! the result of the last evaluation; it is stored in the ! \module{__builtin__} module. When not in interactive mode, \samp{_} ! has no special meaning and is not defined. ! See section~\ref{import}, ``The \keyword{import} statement.'' ! \note{The name \samp{_} is often used in conjunction with ! internationalization; refer to the documentation for the ! \ulink{\module{gettext} module}{../lib/module-gettext.html} for more ! information on this convention.} ! ! \item[\code{__*__}] ! System-defined names. These names are defined by the interpreter ! and it's implementation (including the standard library); ! applications should not expect to define additional names using this ! convention. The set of names of this class defined by Python may be ! extended in future versions. ! See section~\ref{specialnames}, ``Special method names.'' ! ! \item[\code{__*}] ! Class-private names. Names in this category, when used within the ! context of a class definition, are re-written to use a mangled for ! to help avoid name clashes between ``private'' attributes of base ! and derived classes. ! See section~\ref{atom-identifiers}, ``Identifiers (Names).'' \end{description} From fdrake at users.sourceforge.net Fri Sep 5 21:48:54 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 23:48:57 2003 Subject: [Python-checkins] python/dist/src/Doc/ref ref2.tex, 1.34.6.7, 1.34.6.8 Message-ID: <E19vU4E-0008Qb-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1:/tmp/cvs-serv32393/ref Modified Files: Tag: release22-maint ref2.tex Log Message: Elaborate the explanation of different flavors of _* identifiers. Fixes SF bug #520325. Index: ref2.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref2.tex,v retrieving revision 1.34.6.7 retrieving revision 1.34.6.8 diff -C2 -d -r1.34.6.7 -r1.34.6.8 *** ref2.tex 19 Jan 2003 14:54:08 -0000 1.34.6.7 --- ref2.tex 6 Sep 2003 03:48:52 -0000 1.34.6.8 *************** *** 285,307 **** Certain classes of identifiers (besides keywords) have special ! meanings. These are: ! \begin{tableiii}{l|l|l}{code}{Form}{Meaning}{Notes} ! \lineiii{_*}{Not imported by \samp{from \var{module} import *}}{(1)} ! \lineiii{__*__}{System-defined name}{} ! \lineiii{__*}{Class-private name mangling}{} ! \end{tableiii} ! See sections: \ref{import}, ``The \keyword{import} statement''; ! \ref{specialnames}, ``Special method names''; ! \ref{atom-identifiers}, ``Identifiers (Names)''. ! Note: - \begin{description} - \item[(1)] The special identifier \samp{_} is used in the interactive - interpreter to store the result of the last evaluation; it is stored - in the \module{__builtin__} module. When not in interactive mode, - \samp{_} has no special meaning and is not defined. \end{description} --- 285,321 ---- Certain classes of identifiers (besides keywords) have special ! meanings. These classes are identified by the patterns of leading and ! trailing underscore characters: ! \begin{description} ! \item[\code{_*}] ! Not imported by \samp{from \var{module} import *}. The special ! identifier \samp{_} is used in the interactive interpreter to store ! the result of the last evaluation; it is stored in the ! \module{__builtin__} module. When not in interactive mode, \samp{_} ! has no special meaning and is not defined. ! See section~\ref{import}, ``The \keyword{import} statement.'' ! \note{The name \samp{_} is often used in conjunction with ! internationalization; refer to the documentation for the ! \ulink{\module{gettext} module}{../lib/module-gettext.html} for more ! information on this convention.} ! ! \item[\code{__*__}] ! System-defined names. These names are defined by the interpreter ! and it's implementation (including the standard library); ! applications should not expect to define additional names using this ! convention. The set of names of this class defined by Python may be ! extended in future versions. ! See section~\ref{specialnames}, ``Special method names.'' ! ! \item[\code{__*}] ! Class-private names. Names in this category, when used within the ! context of a class definition, are re-written to use a mangled for ! to help avoid name clashes between ``private'' attributes of base ! and derived classes. ! See section~\ref{atom-identifiers}, ``Identifiers (Names).'' \end{description} From fdrake at users.sourceforge.net Fri Sep 5 21:50:09 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri Sep 5 23:50:13 2003 Subject: [Python-checkins] python/dist/src/Doc/ref ref2.tex,1.48,1.49 Message-ID: <E19vU5R-0008Tj-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1:/tmp/cvs-serv32579/ref Modified Files: ref2.tex Log Message: Elaborate the explanation of different flavors of _* identifiers. Fixes SF bug #520325. Index: ref2.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref2.tex,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** ref2.tex 21 Jun 2003 13:40:02 -0000 1.48 --- ref2.tex 6 Sep 2003 03:50:07 -0000 1.49 *************** *** 321,343 **** Certain classes of identifiers (besides keywords) have special ! meanings. These are: ! \begin{tableiii}{l|l|l}{code}{Form}{Meaning}{Notes} ! \lineiii{_*}{Not imported by \samp{from \var{module} import *}}{(1)} ! \lineiii{__*__}{System-defined name}{} ! \lineiii{__*}{Class-private name mangling}{} ! \end{tableiii} ! See sections: \ref{import}, ``The \keyword{import} statement''; ! \ref{specialnames}, ``Special method names''; ! \ref{atom-identifiers}, ``Identifiers (Names)''. ! Note: - \begin{description} - \item[(1)] The special identifier \samp{_} is used in the interactive - interpreter to store the result of the last evaluation; it is stored - in the \module{__builtin__} module. When not in interactive mode, - \samp{_} has no special meaning and is not defined. \end{description} --- 321,357 ---- Certain classes of identifiers (besides keywords) have special ! meanings. These classes are identified by the patterns of leading and ! trailing underscore characters: ! \begin{description} ! \item[\code{_*}] ! Not imported by \samp{from \var{module} import *}. The special ! identifier \samp{_} is used in the interactive interpreter to store ! the result of the last evaluation; it is stored in the ! \module{__builtin__} module. When not in interactive mode, \samp{_} ! has no special meaning and is not defined. ! See section~\ref{import}, ``The \keyword{import} statement.'' ! \note{The name \samp{_} is often used in conjunction with ! internationalization; refer to the documentation for the ! \ulink{\module{gettext} module}{../lib/module-gettext.html} for more ! information on this convention.} ! ! \item[\code{__*__}] ! System-defined names. These names are defined by the interpreter ! and it's implementation (including the standard library); ! applications should not expect to define additional names using this ! convention. The set of names of this class defined by Python may be ! extended in future versions. ! See section~\ref{specialnames}, ``Special method names.'' ! ! \item[\code{__*}] ! Class-private names. Names in this category, when used within the ! context of a class definition, are re-written to use a mangled for ! to help avoid name clashes between ``private'' attributes of base ! and derived classes. ! See section~\ref{atom-identifiers}, ``Identifiers (Names).'' \end{description} From fdrake at users.sourceforge.net Fri Sep 5 22:19:45 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 6 00:19:48 2003 Subject: [Python-checkins] python/dist/src/Doc/texinputs python.sty, 1.102, 1.103 Message-ID: <E19vUY5-00012P-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory sc8-pr-cvs1:/tmp/cvs-serv3985 Modified Files: python.sty Log Message: add a note about how \ulink should be different than it actually is for PDF generation Index: python.sty =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/python.sty,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** python.sty 16 Jul 2003 14:01:56 -0000 1.102 --- python.sty 6 Sep 2003 04:19:43 -0000 1.103 *************** *** 931,934 **** --- 931,935 ---- % The \noindent here is a hack -- we're forcing pdfTeX into % horizontal mode since \pdfstartlink requires that. + % For PDF, we *should* only generate a link when the URL is absolute. \newcommand{\ulink}[2]{\noindent{% \pdfstartlink attr{/Border [0 0 0]} user{/S /URI /URI (#2)}% From rhettinger at users.sourceforge.net Fri Sep 5 22:25:56 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 6 00:26:00 2003 Subject: [Python-checkins] python/dist/src/Lib random.py,1.54,1.55 Message-ID: <E19vUe4-0001Fk-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv4664 Modified Files: random.py Log Message: SF bug #801342: Bug (documentation or real, your choice) in random.sample. random.sample() uses one of two algorithms depending on the ratio of the sample size to the population size. One of the algorithms accepted any iterable population argument so long as it defined __len__(). The other had a stronger requirement that the population argument be indexable. While it met the documentation specifications which insisted that the population argument be a sequence, it made random.sample() less usable with sets. So, the second algorithm was modified to coerce non-indexable iterables and dictionaries into a tuple before proceeding. Index: random.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/random.py,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** random.py 30 Aug 2003 01:24:19 -0000 1.54 --- random.py 6 Sep 2003 04:25:54 -0000 1.55 *************** *** 259,262 **** --- 259,266 ---- pool[j] = pool[n-i-1] # move non-selected item into vacancy else: + try: + n > 0 and (population[0], population[n//2], population[n-1]) + except (TypeError, KeyError): # handle sets and dictionaries + population = tuple(population) selected = {} for i in xrange(k): From rhettinger at users.sourceforge.net Fri Sep 5 22:25:56 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 6 00:26:09 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_random.py, 1.13, 1.14 Message-ID: <E19vUe4-0001Fn-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv4664/test Modified Files: test_random.py Log Message: SF bug #801342: Bug (documentation or real, your choice) in random.sample. random.sample() uses one of two algorithms depending on the ratio of the sample size to the population size. One of the algorithms accepted any iterable population argument so long as it defined __len__(). The other had a stronger requirement that the population argument be indexable. While it met the documentation specifications which insisted that the population argument be a sequence, it made random.sample() less usable with sets. So, the second algorithm was modified to coerce non-indexable iterables and dictionaries into a tuple before proceeding. Index: test_random.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_random.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** test_random.py 9 Aug 2003 18:30:57 -0000 1.13 --- test_random.py 6 Sep 2003 04:25:54 -0000 1.14 *************** *** 87,90 **** --- 87,100 ---- self.fail() + def test_sample_inputs(self): + # SF bug #801342 -- population can be any iterable defining __len__() + from sets import Set + self.gen.sample(Set(range(20)), 2) + self.gen.sample(range(20), 2) + self.gen.sample(xrange(20), 2) + self.gen.sample(dict.fromkeys('abcdefghijklmnopqrst'), 2) + self.gen.sample(str('abcdefghijklmnopqrst'), 2) + self.gen.sample(tuple('abcdefghijklmnopqrst'), 2) + def test_gauss(self): # Ensure that the seed() method initializes all the hidden state. In From rhettinger at users.sourceforge.net Fri Sep 5 22:39:56 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 6 00:39:59 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libtest.tex,1.2,1.3 Message-ID: <E19vUrc-0001jI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv6646 Modified Files: libtest.tex Log Message: SF bug #801486: Markup error. Index: libtest.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtest.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** libtest.tex 9 May 2003 19:10:12 -0000 1.2 --- libtest.tex 6 Sep 2003 04:39:54 -0000 1.3 *************** *** 30,35 **** ! \subsection{\module[test.testsupport]{test.test_support} --- ! --- Utility functions for tests} \declaremodule[test.testsupport]{standard}{test.test_support} --- 30,34 ---- ! \subsection{\module{test.test_support} --- Utility functions for tests} \declaremodule[test.testsupport]{standard}{test.test_support} From rhettinger at users.sourceforge.net Fri Sep 5 22:40:31 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 6 00:40:34 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libtest.tex,1.2,1.2.10.1 Message-ID: <E19vUsB-0001lM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv6772 Modified Files: Tag: release23-maint libtest.tex Log Message: SF bug #801486: Markup error. Index: libtest.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtest.tex,v retrieving revision 1.2 retrieving revision 1.2.10.1 diff -C2 -d -r1.2 -r1.2.10.1 *** libtest.tex 9 May 2003 19:10:12 -0000 1.2 --- libtest.tex 6 Sep 2003 04:40:29 -0000 1.2.10.1 *************** *** 30,35 **** ! \subsection{\module[test.testsupport]{test.test_support} --- ! --- Utility functions for tests} \declaremodule[test.testsupport]{standard}{test.test_support} --- 30,34 ---- ! \subsection{\module{test.test_support} --- Utility functions for tests} \declaremodule[test.testsupport]{standard}{test.test_support} From rhettinger at users.sourceforge.net Fri Sep 5 23:36:15 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 6 01:36:28 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libdatetime.tex, 1.50, 1.51 Message-ID: <E19vVk7-0003fB-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv14074 Modified Files: libdatetime.tex Log Message: SF bug 799367: grammar error Index: libdatetime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** libdatetime.tex 4 Sep 2003 18:29:53 -0000 1.50 --- libdatetime.tex 6 Sep 2003 05:36:13 -0000 1.51 *************** *** 820,824 **** Note that the default \method{tzinfo.fromutc()} method can be overridden ! in a \class{tzinfo} subclass to effect the result returned by \method{astimezone()}. Ignoring error cases, \method{astimezone()} acts like: --- 820,824 ---- Note that the default \method{tzinfo.fromutc()} method can be overridden ! in a \class{tzinfo} subclass to affect the result returned by \method{astimezone()}. Ignoring error cases, \method{astimezone()} acts like: From rhettinger at users.sourceforge.net Fri Sep 5 23:36:58 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 6 01:37:00 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libdatetime.tex, 1.49.8.2, 1.49.8.3 Message-ID: <E19vVko-0003gW-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv14156 Modified Files: Tag: release23-maint libdatetime.tex Log Message: SF bug 799367: grammar error Index: libdatetime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v retrieving revision 1.49.8.2 retrieving revision 1.49.8.3 diff -C2 -d -r1.49.8.2 -r1.49.8.3 *** libdatetime.tex 4 Sep 2003 18:30:15 -0000 1.49.8.2 --- libdatetime.tex 6 Sep 2003 05:36:56 -0000 1.49.8.3 *************** *** 820,824 **** Note that the default \method{tzinfo.fromutc()} method can be overridden ! in a \class{tzinfo} subclass to effect the result returned by \method{astimezone()}. Ignoring error cases, \method{astimezone()} acts like: --- 820,824 ---- Note that the default \method{tzinfo.fromutc()} method can be overridden ! in a \class{tzinfo} subclass to affect the result returned by \method{astimezone()}. Ignoring error cases, \method{astimezone()} acts like: From rhettinger at users.sourceforge.net Fri Sep 5 23:47:33 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 6 01:47:37 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.146,1.147 Message-ID: <E19vVv3-00042J-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv15508 Modified Files: libfuncs.tex Log Message: SF bug 799191: fix markup Index: libfuncs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v retrieving revision 1.146 retrieving revision 1.147 diff -C2 -d -r1.146 -r1.147 *** libfuncs.tex 25 Aug 2003 04:28:04 -0000 1.146 --- libfuncs.tex 6 Sep 2003 05:47:31 -0000 1.147 *************** *** 708,712 **** Return the \ASCII{} value of a string of one character or a Unicode character. E.g., \code{ord('a')} returns the integer \code{97}, ! \code{ord(u'\\u2020')} returns \code{8224}. This is the inverse of \function{chr()} for strings and of \function{unichr()} for Unicode characters. --- 708,712 ---- Return the \ASCII{} value of a string of one character or a Unicode character. E.g., \code{ord('a')} returns the integer \code{97}, ! \code{ord(u'\e u2020')} returns \code{8224}. This is the inverse of \function{chr()} for strings and of \function{unichr()} for Unicode characters. From rhettinger at users.sourceforge.net Fri Sep 5 23:48:09 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 6 01:48:12 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex, 1.143.8.2, 1.143.8.3 Message-ID: <E19vVvd-00043f-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv15592 Modified Files: Tag: release23-maint libfuncs.tex Log Message: SF bug 799191: fix markup Index: libfuncs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v retrieving revision 1.143.8.2 retrieving revision 1.143.8.3 diff -C2 -d -r1.143.8.2 -r1.143.8.3 *** libfuncs.tex 25 Aug 2003 04:34:46 -0000 1.143.8.2 --- libfuncs.tex 6 Sep 2003 05:48:07 -0000 1.143.8.3 *************** *** 708,712 **** Return the \ASCII{} value of a string of one character or a Unicode character. E.g., \code{ord('a')} returns the integer \code{97}, ! \code{ord(u'\\u2020')} returns \code{8224}. This is the inverse of \function{chr()} for strings and of \function{unichr()} for Unicode characters. --- 708,712 ---- Return the \ASCII{} value of a string of one character or a Unicode character. E.g., \code{ord('a')} returns the integer \code{97}, ! \code{ord(u'\e u2020')} returns \code{8224}. This is the inverse of \function{chr()} for strings and of \function{unichr()} for Unicode characters. From fdrake at users.sourceforge.net Sat Sep 6 00:42:03 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 6 02:42:08 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile.deps,1.110,1.111 Message-ID: <E19vWln-0005mQ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv22189 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.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** Makefile.deps 14 Jul 2003 12:12:56 -0000 1.110 --- Makefile.deps 6 Sep 2003 06:42:01 -0000 1.111 *************** *** 115,118 **** --- 115,119 ---- lib/libdoctest.tex \ lib/libunittest.tex \ + lib/libtest.tex \ lib/libtypes.tex \ lib/libtraceback.tex \ From fdrake at users.sourceforge.net Sat Sep 6 00:42:45 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 6 02:42:47 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile.deps, 1.110, 1.110.8.1 Message-ID: <E19vWmT-0005oM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv22330 Modified Files: Tag: release23-maint Makefile.deps Log Message: add missing dependency Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.110 retrieving revision 1.110.8.1 diff -C2 -d -r1.110 -r1.110.8.1 *** Makefile.deps 14 Jul 2003 12:12:56 -0000 1.110 --- Makefile.deps 6 Sep 2003 06:42:42 -0000 1.110.8.1 *************** *** 115,118 **** --- 115,119 ---- lib/libdoctest.tex \ lib/libunittest.tex \ + lib/libtest.tex \ lib/libtypes.tex \ lib/libtraceback.tex \ From fdrake at users.sourceforge.net Sat Sep 6 11:51:18 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 6 13:51:24 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libtest.tex,1.3,1.4 Message-ID: <E19vhDS-0004bV-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv17696/lib Modified Files: libtest.tex Log Message: - reorganize sections - correct section level error (module references are always \section) - many markup revisions, including some minor rewordings Index: libtest.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtest.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** libtest.tex 6 Sep 2003 04:39:54 -0000 1.3 --- libtest.tex 6 Sep 2003 17:51:16 -0000 1.4 *************** *** 3,26 **** \declaremodule{standard}{test} - \sectionauthor{Brett Cannon}{brett@python.org} ! \modulesynopsis{Regression tests package containing the testing suite for ! Python.} ! ! ! The \module{test} package contains all regression tests for Python as well as ! the modules \module{test_support} and \module{regrtest.py}. ! \module{test_support} is used to enhance your tests while \module{regrtest.py} ! drives the testing suite. Each module in the \module{test} package whose name starts with ! \code{'test_'} is a testing suite for a specific module or feature. ! All new tests should be written using the \module{unittest} module; using ! \module{unittest} is not required but makes the tests more flexible and ! maintenance of the tests easier. ! Some older tests are written to use \module{doctest} and a ``traditional'' ! testing style; these styles of tests will not be covered. \begin{seealso} --- 3,23 ---- \declaremodule{standard}{test} \sectionauthor{Brett Cannon}{brett@python.org} + \modulesynopsis{Regression tests package containing the testing suite + for Python.} ! The \module{test} package contains all regression tests for Python as ! well as the modules \module{test.test_support} and ! \module{test.regrtest}. \module{test.test_support} is used to enhance ! your tests while \module{test.regrtest} drives the testing suite. Each module in the \module{test} package whose name starts with ! \samp{test_} is a testing suite for a specific module or feature. ! All new tests should be written using the \refmodule{unittest} module; ! using \refmodule{unittest} is not required but makes the tests more ! flexible and maintenance of the tests easier. Some older tests are ! written to use \refmodule{doctest} and a ``traditional'' testing ! style; these styles of tests will not be covered. \begin{seealso} *************** *** 30,125 **** - \subsection{\module{test.test_support} --- Utility functions for tests} - \declaremodule[test.testsupport]{standard}{test.test_support} - - The \module{test.test_support} module contains functions for assisting - with writing regression tests. - - The \module{test.test_support} module defines the following exceptions: - - \begin{excdesc}{TestFailed} - Exception to be raised when a test fails. - \end{excdesc} - - \begin{excdesc}{TestSkipped} - Subclass of \exception{TestFailed}. - Raised when a test is skipped. - This occurs when a needed resource (such as a network connection) is not - available at the time of testing. - \end{excdesc} - - \begin{excdesc}{ResourceDenied} - Subclass of \exception{TestSkipped}. - Raised when a resource (such as a network connection) is not available. - Raised by the \function{requires} function. - \end{excdesc} - - - The \module{test_support} module defines the following constants: - - \begin{datadesc}{verbose} - \constant{True} when verbose output is enabled. - Should be checked when more detailed information is desired about a running - test. - \var{verbose} is set by \module{regrtest.py}. - \end{datadesc} - - \begin{datadesc}{have_unicode} - \constant{True} when Unicode support is available. - \end{datadesc} - - \begin{datadesc}{is_jython} - \constant{True} if the running interpreter is Jython. - \end{datadesc} - - \begin{datadesc}{TESTFN} - Set to the path that a temporary file may be created at. - Any temporary that is created should be closed and unlinked (removed). - \end{datadesc} - - - The \module{test_support} module defines the following functions: - - \begin{funcdesc}{forget}{module_name} - Removes the module named \var{module_name} from \module{sys.modules} and deletes - any byte-compiled files of the module. - \end{funcdesc} - - \begin{funcdesc}{is_resource_enabled}{resource} - Returns \constant{True} if \var{resource} is enabled and available. - The list of available resources is only set when \module{regrtest.py} is - executing the tests. - \end{funcdesc} - - \begin{funcdesc}{requires}{resource\optional{, msg}} - Raises \exception{ResourceDenied} if \var{resource} is not available. - \var{msg} is the argument to \exception{ResourceDenied} if it is raised. - Always returns true if called by a function whose \var{__name__} is - \code{"__main__"}. - Used when tests are executed by \module{regrtest.py}. - \end{funcdesc} - - \begin{funcdesc}{findfile}{filename} - Return the path to the file named \var{filename}. - If no match is found \var{filename} is returned. - This does not equal a failure since it could be the path to the file. - \end{funcdesc} - - \begin{funcdesc}{run_unittest}{*classes} - Execute \class{unittest.TestCase} subclasses passed to the function. - The function scans the classes for methods starting with the name - \code{"test_"} and executes the tests individually. - This is the preferred way to execute tests. - \end{funcdesc} - - \begin{funcdesc}{run_suite}{suite\optional{, testclass=None}} - Execute the \class{unittest.TestSuite} instance, \var{suite}. - The optional argument \var{testclass} accepts one of the test classes in the - suite so as to print out more detailed information on where the testing suite - originated from. - \end{funcdesc} - - - \subsection{Writing Unit Tests for the \module{test} package% \label{writing-tests}} --- 27,30 ---- *************** *** 127,131 **** It is preferred that tests for the \module{test} package use the \refmodule{unittest} module and follow a few guidelines. ! One is to have the name of all the test methods start with \code{"test_"} as well as the module's name. This is needed so that the methods are recognized by the test driver as --- 32,36 ---- It is preferred that tests for the \module{test} package use the \refmodule{unittest} module and follow a few guidelines. ! One is to have the name of all the test methods start with \samp{test_} as well as the module's name. This is needed so that the methods are recognized by the test driver as *************** *** 133,137 **** Also, no documentation string for the method should be included. A comment (such as ! \code{\# Tests function returns only True or False}) should be used to provide documentation for test methods. This is done because documentation strings get printed out if they exist and --- 38,42 ---- Also, no documentation string for the method should be included. A comment (such as ! \samp{\# Tests function returns only True or False}) should be used to provide documentation for test methods. This is done because documentation strings get printed out if they exist and *************** *** 179,184 **** \end{verbatim} ! This boilerplate code allows the testing suite to be run by \module{regrtest.py} ! as well as on its own as a script. The goal for regression testing is to try to break code. --- 84,89 ---- \end{verbatim} ! This boilerplate code allows the testing suite to be run by ! \module{test.regrtest} as well as on its own as a script. The goal for regression testing is to try to break code. *************** *** 209,214 **** anomalous behavior from side-effects of importing a module. \item Try to maximize code reuse. ! On occasion tests will vary by something as small as what type of input ! they take. Minimize code duplication by subclassing a basic test class with a class that specifies the input: --- 114,119 ---- anomalous behavior from side-effects of importing a module. \item Try to maximize code reuse. ! On occasion, tests will vary by something as small as what type ! of input is used. Minimize code duplication by subclassing a basic test class with a class that specifies the input: *************** *** 233,276 **** \begin{seealso} ! \seetitle{Test Driven Development}{A book by Kent Beck on writing tests before ! code} \end{seealso} ! \subsection{Running tests Using \module{regrtest.py} \label{regrtest}} ! ! \module{regrtest.py} is the script used to drive Python's regression test ! suite. Running the script by itself automatically starts running all regression tests in the \module{test} package. It does this by finding all modules in the package whose name starts with ! \code{test_}, importing them, and executing the function \function{test_main} ! if present. The names of tests to execute may also be passed to the script. ! Specifying a single regression test (\code{python regrtest.py test_spam.py}) ! will minimize output and only print whether the test passed or failed and thus ! minimize output. ! Running \module{regrtest.py} directly allows what resources are available for tests to use to be set. ! You do this by using the \code{-u} command-line option. ! Run \code{python regrtest.py -uall} to turn on all resources; ! specifying \code{all} as an option for \code{-u} enables all possible ! resources. If all but one resource is desired (a more common case), a comma-separated list of resources that are not desired may be listed after ! \code{all}. ! The command \code{python regrtest.py -uall,-audio,-largefile} will run ! \module{regrtest.py} with all resources except the audio and largefile ! resources. For a list of all resources and more command-line options, run ! \code{python regrtest.py -h}. Some other ways to execute the regression tests depend on what platform the tests are being executed on. ! On \UNIX{}, you can run \code{make test} at the top-level directory ! where Python was built. ! On Windows, executing \code{rt.bat} from your PCBuild directory will run all regression tests. --- 138,274 ---- \begin{seealso} ! \seetitle{Test Driven Development} ! {A book by Kent Beck on writing tests before code.} \end{seealso} + \subsection{Running tests Using \module{test.regrtest} \label{regrtest}} ! \module{test.regrtest} can be used as a script to drive Python's ! regression test suite. Running the script by itself automatically starts running all regression tests in the \module{test} package. It does this by finding all modules in the package whose name starts with ! \samp{test_}, importing them, and executing the function ! \function{test_main()} if present. The names of tests to execute may also be passed to the script. ! Specifying a single regression test (\program{python regrtest.py} ! \programopt{test_spam.py}) will minimize output and only print whether ! the test passed or failed and thus minimize output. ! Running \module{test.regrtest} directly allows what resources are available for tests to use to be set. ! You do this by using the \programopt{-u} command-line option. ! Run \program{python regrtest.py} \programopt{-uall} to turn on all ! resources; specifying \programopt{all} as an option for ! \programopt{-u} enables all possible resources. If all but one resource is desired (a more common case), a comma-separated list of resources that are not desired may be listed after ! \programopt{all}. ! The command \program{python regrtest.py} ! \programopt{-uall,-audio,-largefile} will run \module{test.regrtest} ! with all resources except the \programopt{audio} and ! \programopt{largefile} resources. For a list of all resources and more command-line options, run ! \program{python regrtest.py} \programopt{-h}. Some other ways to execute the regression tests depend on what platform the tests are being executed on. ! On \UNIX{}, you can run \program{make} \programopt{test} at the ! top-level directory where Python was built. ! On Windows, executing \program{rt.bat} from your \file{PCBuild} ! directory will run all regression tests. ! ! ! \section{\module{test.test_support} --- ! Utility functions for tests} ! ! \declaremodule[test.testsupport]{standard}{test.test_support} ! \modulesynopsis{Support for Python regression tests.} ! ! The \module{test.test_support} module provides support for Python's regression tests. + This module defines the following exceptions: + + \begin{excdesc}{TestFailed} + Exception to be raised when a test fails. + \end{excdesc} + + \begin{excdesc}{TestSkipped} + Subclass of \exception{TestFailed}. + Raised when a test is skipped. + This occurs when a needed resource (such as a network connection) is not + available at the time of testing. + \end{excdesc} + + \begin{excdesc}{ResourceDenied} + Subclass of \exception{TestSkipped}. + Raised when a resource (such as a network connection) is not available. + Raised by the \function{requires()} function. + \end{excdesc} + + + The \module{test.test_support} module defines the following constants: + + \begin{datadesc}{verbose} + \constant{True} when verbose output is enabled. + Should be checked when more detailed information is desired about a running + test. + \var{verbose} is set by \module{test.regrtest}. + \end{datadesc} + + \begin{datadesc}{have_unicode} + \constant{True} when Unicode support is available. + \end{datadesc} + + \begin{datadesc}{is_jython} + \constant{True} if the running interpreter is Jython. + \end{datadesc} + + \begin{datadesc}{TESTFN} + Set to the path that a temporary file may be created at. + Any temporary that is created should be closed and unlinked (removed). + \end{datadesc} + + + The \module{test.test_support} module defines the following functions: + + \begin{funcdesc}{forget}{module_name} + Removes the module named \var{module_name} from \code{sys.modules} and deletes + any byte-compiled files of the module. + \end{funcdesc} + + \begin{funcdesc}{is_resource_enabled}{resource} + Returns \constant{True} if \var{resource} is enabled and available. + The list of available resources is only set when \module{test.regrtest} + is executing the tests. + \end{funcdesc} + + \begin{funcdesc}{requires}{resource\optional{, msg}} + Raises \exception{ResourceDenied} if \var{resource} is not available. + \var{msg} is the argument to \exception{ResourceDenied} if it is raised. + Always returns true if called by a function whose \code{__name__} is + \code{'__main__'}. + Used when tests are executed by \module{test.regrtest}. + \end{funcdesc} + + \begin{funcdesc}{findfile}{filename} + Return the path to the file named \var{filename}. + If no match is found \var{filename} is returned. + This does not equal a failure since it could be the path to the file. + \end{funcdesc} + + \begin{funcdesc}{run_unittest}{*classes} + Execute \class{unittest.TestCase} subclasses passed to the function. + The function scans the classes for methods starting with the prefix + \samp{test_} and executes the tests individually. + This is the preferred way to execute tests. + \end{funcdesc} + + \begin{funcdesc}{run_suite}{suite\optional{, testclass}} + Execute the \class{unittest.TestSuite} instance \var{suite}. + The optional argument \var{testclass} accepts one of the test classes in the + suite so as to print out more detailed information on where the testing suite + originated from. + \end{funcdesc} From montanaro at users.sourceforge.net Sat Sep 6 13:52:14 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Sat Sep 6 15:52:21 2003 Subject: [Python-checkins] python/dist/src/Lib csv.py,1.8,1.9 Message-ID: <E19vj6U-0002bE-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv9566/Lib Modified Files: csv.py Log Message: **kwds arg was missing from __init__ for Dict{Reader,Writer} classes. will backport. Index: csv.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/csv.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** csv.py 2 Sep 2003 16:01:07 -0000 1.8 --- csv.py 6 Sep 2003 19:52:12 -0000 1.9 *************** *** 94,102 **** class DictReader: def __init__(self, f, fieldnames, restkey=None, restval=None, ! dialect="excel", *args): self.fieldnames = fieldnames # list of keys for the dict self.restkey = restkey # key to catch long rows self.restval = restval # default value for short rows ! self.reader = reader(f, dialect, *args) def __iter__(self): --- 94,102 ---- class DictReader: def __init__(self, f, fieldnames, restkey=None, restval=None, ! dialect="excel", *args, **kwds): self.fieldnames = fieldnames # list of keys for the dict self.restkey = restkey # key to catch long rows self.restval = restval # default value for short rows ! self.reader = reader(f, dialect, *args, **kwds) def __iter__(self): *************** *** 123,127 **** class DictWriter: def __init__(self, f, fieldnames, restval="", extrasaction="raise", ! dialect="excel", *args): self.fieldnames = fieldnames # list of keys for the dict self.restval = restval # for writing short dicts --- 123,127 ---- class DictWriter: def __init__(self, f, fieldnames, restval="", extrasaction="raise", ! dialect="excel", *args, **kwds): self.fieldnames = fieldnames # list of keys for the dict self.restval = restval # for writing short dicts *************** *** 131,135 **** extrasaction) self.extrasaction = extrasaction ! self.writer = writer(f, dialect, *args) def _dict_to_list(self, rowdict): --- 131,135 ---- extrasaction) self.extrasaction = extrasaction ! self.writer = writer(f, dialect, *args, **kwds) def _dict_to_list(self, rowdict): From montanaro at users.sourceforge.net Sat Sep 6 13:52:14 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Sat Sep 6 15:52:26 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.850,1.851 Message-ID: <E19vj6U-0002bC-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv9566/Misc Modified Files: NEWS Log Message: **kwds arg was missing from __init__ for Dict{Reader,Writer} classes. will backport. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.850 retrieving revision 1.851 diff -C2 -d -r1.850 -r1.851 *** NEWS 3 Sep 2003 04:09:49 -0000 1.850 --- NEWS 6 Sep 2003 19:52:12 -0000 1.851 *************** *** 34,37 **** --- 34,40 ---- ------- + - The csv module's DictReader and DictWriter classes now accept keyword + arguments. This was an omission in the initial implementation. + - The email package handles some RFC 2231 parameters with missing CHARSET fields better. It also includes a patch to parameter From montanaro at users.sourceforge.net Sat Sep 6 13:52:15 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Sat Sep 6 15:52:31 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_csv.py,1.9,1.10 Message-ID: <E19vj6V-0002bH-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv9566/Lib/test Modified Files: test_csv.py Log Message: **kwds arg was missing from __init__ for Dict{Reader,Writer} classes. will backport. Index: test_csv.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_csv.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** test_csv.py 12 Jun 2003 02:40:22 -0000 1.9 --- test_csv.py 6 Sep 2003 19:52:12 -0000 1.10 *************** *** 448,451 **** --- 448,458 ---- "4": '4', "5": '5', "6": '6'}) + def test_read_semi_sep(self): + reader = csv.DictReader(["1;2;abc;4;5;6\r\n"], + fieldnames="1 2 3 4 5 6".split(), + delimiter=';') + self.assertEqual(reader.next(), {"1": '1', "2": '2', "3": 'abc', + "4": '4', "5": '5', "6": '6'}) + class TestArrayWrites(unittest.TestCase): def test_int_write(self): From montanaro at users.sourceforge.net Sat Sep 6 13:52:30 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Sat Sep 6 15:52:38 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.35,1.831.4.36 Message-ID: <E19vj6k-0002by-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv10019/Misc Modified Files: Tag: release23-maint NEWS Log Message: **kwds arg was missing from __init__ for Dict{Reader,Writer} classes. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.35 retrieving revision 1.831.4.36 diff -C2 -d -r1.831.4.35 -r1.831.4.36 *** NEWS 5 Sep 2003 21:40:29 -0000 1.831.4.35 --- NEWS 6 Sep 2003 19:52:27 -0000 1.831.4.36 *************** *** 48,51 **** --- 48,54 ---- ------- + - The csv module's DictReader and DictWriter classes now accept keyword + arguments. This was an omission in the initial implementation. + - Bug #453515: filecmp.dircmp() can now make case insensitive filename comparisons. From montanaro at users.sourceforge.net Sat Sep 6 13:52:30 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Sat Sep 6 15:52:42 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_csv.py,1.9,1.9.8.1 Message-ID: <E19vj6k-0002c2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv10019/Lib/test Modified Files: Tag: release23-maint test_csv.py Log Message: **kwds arg was missing from __init__ for Dict{Reader,Writer} classes. Index: test_csv.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_csv.py,v retrieving revision 1.9 retrieving revision 1.9.8.1 diff -C2 -d -r1.9 -r1.9.8.1 *** test_csv.py 12 Jun 2003 02:40:22 -0000 1.9 --- test_csv.py 6 Sep 2003 19:52:28 -0000 1.9.8.1 *************** *** 448,451 **** --- 448,458 ---- "4": '4', "5": '5', "6": '6'}) + def test_read_semi_sep(self): + reader = csv.DictReader(["1;2;abc;4;5;6\r\n"], + fieldnames="1 2 3 4 5 6".split(), + delimiter=';') + self.assertEqual(reader.next(), {"1": '1', "2": '2', "3": 'abc', + "4": '4', "5": '5', "6": '6'}) + class TestArrayWrites(unittest.TestCase): def test_int_write(self): From montanaro at users.sourceforge.net Sat Sep 6 13:52:30 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Sat Sep 6 15:52:46 2003 Subject: [Python-checkins] python/dist/src/Lib csv.py,1.7,1.7.8.1 Message-ID: <E19vj6k-0002c0-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv10019/Lib Modified Files: Tag: release23-maint csv.py Log Message: **kwds arg was missing from __init__ for Dict{Reader,Writer} classes. Index: csv.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/csv.py,v retrieving revision 1.7 retrieving revision 1.7.8.1 diff -C2 -d -r1.7 -r1.7.8.1 *** csv.py 12 Jun 2003 04:05:00 -0000 1.7 --- csv.py 6 Sep 2003 19:52:28 -0000 1.7.8.1 *************** *** 94,102 **** class DictReader: def __init__(self, f, fieldnames, restkey=None, restval=None, ! dialect="excel", *args): self.fieldnames = fieldnames # list of keys for the dict self.restkey = restkey # key to catch long rows self.restval = restval # default value for short rows ! self.reader = reader(f, dialect, *args) def __iter__(self): --- 94,102 ---- class DictReader: def __init__(self, f, fieldnames, restkey=None, restval=None, ! dialect="excel", *args, **kwds): self.fieldnames = fieldnames # list of keys for the dict self.restkey = restkey # key to catch long rows self.restval = restval # default value for short rows ! self.reader = reader(f, dialect, *args, **kwds) def __iter__(self): *************** *** 123,127 **** class DictWriter: def __init__(self, f, fieldnames, restval="", extrasaction="raise", ! dialect="excel", *args): self.fieldnames = fieldnames # list of keys for the dict self.restval = restval # for writing short dicts --- 123,127 ---- class DictWriter: def __init__(self, f, fieldnames, restval="", extrasaction="raise", ! dialect="excel", *args, **kwds): self.fieldnames = fieldnames # list of keys for the dict self.restval = restval # for writing short dicts *************** *** 131,135 **** extrasaction) self.extrasaction = extrasaction ! self.writer = writer(f, dialect, *args) def _dict_to_list(self, rowdict): --- 131,135 ---- extrasaction) self.extrasaction = extrasaction ! self.writer = writer(f, dialect, *args, **kwds) def _dict_to_list(self, rowdict): From bcannon at users.sourceforge.net Sat Sep 6 20:22:18 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Sat Sep 6 22:22:22 2003 Subject: [Python-checkins] python/dist/src/Doc/api abstract.tex,1.27,1.28 Message-ID: <E19vpBy-0001pQ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory sc8-pr-cvs1:/tmp/cvs-serv6915/Doc/api Modified Files: abstract.tex Log Message: Fix minor LaTeX bug of not ending a \NULL{} with the curly braces to get the spacing correct in the output. Index: abstract.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/abstract.tex,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** abstract.tex 9 Aug 2003 04:37:14 -0000 1.27 --- abstract.tex 7 Sep 2003 02:22:16 -0000 1.28 *************** *** 832,836 **** \begin{cfuncdesc}{PyObject*}{PySequence_ITEM}{PyObject *o, int i} ! Return the \var{i}th element of \var{o} or \NULL on failure. Macro form of \cfunction{PySequence_GetItem()} but without checking that \cfunction{PySequence_Check(\var{o})} is true and without --- 832,836 ---- \begin{cfuncdesc}{PyObject*}{PySequence_ITEM}{PyObject *o, int i} ! Return the \var{i}th element of \var{o} or \NULL{} on failure. Macro form of \cfunction{PySequence_GetItem()} but without checking that \cfunction{PySequence_Check(\var{o})} is true and without From fdrake at users.sourceforge.net Sat Sep 6 20:26:56 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 6 22:26:59 2003 Subject: [Python-checkins] python/dist/src/Doc/api abstract.tex, 1.26.12.1, 1.26.12.2 Message-ID: <E19vpGS-0001ys-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory sc8-pr-cvs1:/tmp/cvs-serv7613 Modified Files: Tag: release23-maint abstract.tex Log Message: backport Brett's markup fix from revision 1.28: add missing {} after \NULL Index: abstract.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/abstract.tex,v retrieving revision 1.26.12.1 retrieving revision 1.26.12.2 diff -C2 -d -r1.26.12.1 -r1.26.12.2 *** abstract.tex 9 Aug 2003 04:38:25 -0000 1.26.12.1 --- abstract.tex 7 Sep 2003 02:26:54 -0000 1.26.12.2 *************** *** 832,836 **** \begin{cfuncdesc}{PyObject*}{PySequence_ITEM}{PyObject *o, int i} ! Return the \var{i}th element of \var{o} or \NULL on failure. Macro form of \cfunction{PySequence_GetItem()} but without checking that \cfunction{PySequence_Check(\var{o})} is true and without --- 832,836 ---- \begin{cfuncdesc}{PyObject*}{PySequence_ITEM}{PyObject *o, int i} ! Return the \var{i}th element of \var{o} or \NULL{} on failure. Macro form of \cfunction{PySequence_GetItem()} but without checking that \cfunction{PySequence_Check(\var{o})} is true and without From fdrake at users.sourceforge.net Sat Sep 6 20:32:57 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 6 22:32:59 2003 Subject: [Python-checkins] python/dist/src/Doc/api init.tex,1.11,1.12 Message-ID: <E19vpMH-0002AR-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory sc8-pr-cvs1:/tmp/cvs-serv8328 Modified Files: init.tex Log Message: fix \NULL with following space and no {} Index: init.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/init.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** init.tex 12 Aug 2003 00:01:14 -0000 1.11 --- init.tex 7 Sep 2003 02:32:55 -0000 1.12 *************** *** 683,687 **** caller should assume no current thread state is available. \versionchanged[Previously this could only be called when a current ! thread is active, and \NULL meant that an exception was raised]{2.3} \end{cfuncdesc} --- 683,687 ---- caller should assume no current thread state is available. \versionchanged[Previously this could only be called when a current ! thread is active, and \NULL{} meant that an exception was raised]{2.3} \end{cfuncdesc} From fdrake at users.sourceforge.net Sat Sep 6 20:33:39 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 6 22:33:41 2003 Subject: [Python-checkins] python/dist/src/Doc/ext newtypes.tex,1.32,1.33 Message-ID: <E19vpMx-0002Bk-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ext In directory sc8-pr-cvs1:/tmp/cvs-serv8410 Modified Files: newtypes.tex Log Message: fix \NULL with following space and no {} (two instances) Index: newtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/newtypes.tex,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** newtypes.tex 12 Aug 2003 00:01:14 -0000 1.32 --- newtypes.tex 7 Sep 2003 02:33:37 -0000 1.33 *************** *** 461,466 **** Python objects can be assigned. Further, the attributes can be deleted, setting the C pointers to \NULL. Even though we can make ! sure the members are initialized to non-\NULL values, the members can ! be set to \NULL if the attributes are deleted. We define a single method, \method{name}, that outputs the objects --- 461,466 ---- Python objects can be assigned. Further, the attributes can be deleted, setting the C pointers to \NULL. Even though we can make ! sure the members are initialized to non-\NULL{} values, the members can ! be set to \NULL{} if the attributes are deleted. We define a single method, \method{name}, that outputs the objects From fdrake at users.sourceforge.net Sat Sep 6 20:35:00 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 6 22:35:03 2003 Subject: [Python-checkins] python/dist/src/Doc/ext newtypes.tex, 1.31.8.1, 1.31.8.2 Message-ID: <E19vpOG-0002EB-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ext In directory sc8-pr-cvs1:/tmp/cvs-serv8556 Modified Files: Tag: release23-maint newtypes.tex Log Message: fix \NULL with following space and no {} (two instances) Index: newtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/newtypes.tex,v retrieving revision 1.31.8.1 retrieving revision 1.31.8.2 diff -C2 -d -r1.31.8.1 -r1.31.8.2 *** newtypes.tex 11 Aug 2003 23:43:04 -0000 1.31.8.1 --- newtypes.tex 7 Sep 2003 02:34:58 -0000 1.31.8.2 *************** *** 461,466 **** Python objects can be assigned. Further, the attributes can be deleted, setting the C pointers to \NULL. Even though we can make ! sure the members are initialized to non-\NULL values, the members can ! be set to \NULL if the attributes are deleted. We define a single method, \method{name}, that outputs the objects --- 461,466 ---- Python objects can be assigned. Further, the attributes can be deleted, setting the C pointers to \NULL. Even though we can make ! sure the members are initialized to non-\NULL{} values, the members can ! be set to \NULL{} if the attributes are deleted. We define a single method, \method{name}, that outputs the objects From fdrake at users.sourceforge.net Sat Sep 6 20:35:28 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 6 22:35:30 2003 Subject: [Python-checkins] python/dist/src/Doc/api init.tex, 1.10.8.1, 1.10.8.2 Message-ID: <E19vpOi-0002Fs-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory sc8-pr-cvs1:/tmp/cvs-serv8662 Modified Files: Tag: release23-maint init.tex Log Message: fix \NULL with following space and no {} Index: init.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/init.tex,v retrieving revision 1.10.8.1 retrieving revision 1.10.8.2 diff -C2 -d -r1.10.8.1 -r1.10.8.2 *** init.tex 11 Aug 2003 23:43:04 -0000 1.10.8.1 --- init.tex 7 Sep 2003 02:35:25 -0000 1.10.8.2 *************** *** 683,687 **** caller should assume no current thread state is available. \versionchanged[Previously this could only be called when a current ! thread is active, and \NULL meant that an exception was raised]{2.3} \end{cfuncdesc} --- 683,687 ---- caller should assume no current thread state is available. \versionchanged[Previously this could only be called when a current ! thread is active, and \NULL{} meant that an exception was raised]{2.3} \end{cfuncdesc} From tim_one at users.sourceforge.net Sat Sep 6 21:30:20 2003 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sat Sep 6 23:30:23 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.851,1.852 Message-ID: <E19vqFo-00044k-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv14962/python/Misc Modified Files: NEWS Log Message: SF bug 801631: file.truncate fault on windows. file_truncate(): C doesn't define what fflush(fp) does if fp is open for update, and the preceding I/O operation on fp was input. On Windows, fflush() actually changes the current file position then. Because Windows doesn't support ftruncate() directly, this not only caused Python's file.truncate() to change the file position (contra our docs), it also caused the file not to change size. Repaired by getting the initial file position at the start, restoring it at the end, and tossing all the complicated micro-efficiency checks trying to avoid "provably unnecessary" seeks. file.truncate() can't be a frequent operation, and seeking to the current file position has got to be cheap anyway. Bugfix candidate. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.851 retrieving revision 1.852 diff -C2 -d -r1.851 -r1.852 *** NEWS 6 Sep 2003 19:52:12 -0000 1.851 --- NEWS 7 Sep 2003 03:30:16 -0000 1.852 *************** *** 95,98 **** --- 95,102 ---- ------- + - file.truncate() could misbehave if the file was open for update + (modes r+, rb+, w+, wb+), and the most recent file operation before + the truncate() call was an input operation. SF bug 801631. + Mac ---- From tim_one at users.sourceforge.net Sat Sep 6 21:30:20 2003 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sat Sep 6 23:30:28 2003 Subject: [Python-checkins] python/dist/src/Objects fileobject.c,2.181,2.182 Message-ID: <E19vqFo-00044q-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv14962/python/Objects Modified Files: fileobject.c Log Message: SF bug 801631: file.truncate fault on windows. file_truncate(): C doesn't define what fflush(fp) does if fp is open for update, and the preceding I/O operation on fp was input. On Windows, fflush() actually changes the current file position then. Because Windows doesn't support ftruncate() directly, this not only caused Python's file.truncate() to change the file position (contra our docs), it also caused the file not to change size. Repaired by getting the initial file position at the start, restoring it at the end, and tossing all the complicated micro-efficiency checks trying to avoid "provably unnecessary" seeks. file.truncate() can't be a frequent operation, and seeking to the current file position has got to be cheap anyway. Bugfix candidate. Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.181 retrieving revision 2.182 diff -C2 -d -r2.181 -r2.182 *** fileobject.c 4 Sep 2003 19:01:46 -0000 2.181 --- fileobject.c 7 Sep 2003 03:30:18 -0000 2.182 *************** *** 97,101 **** char *msg = "Is a directory"; #endif ! PyObject *exc = PyObject_CallFunction(PyExc_IOError, "(is)", EISDIR, msg); PyErr_SetObject(PyExc_IOError, exc); --- 97,101 ---- char *msg = "Is a directory"; #endif ! PyObject *exc = PyObject_CallFunction(PyExc_IOError, "(is)", EISDIR, msg); PyErr_SetObject(PyExc_IOError, exc); *************** *** 138,142 **** Py_INCREF(Py_None); f->f_encoding = Py_None; ! if (f->f_name == NULL || f->f_mode == NULL) return NULL; --- 138,142 ---- Py_INCREF(Py_None); f->f_encoding = Py_None; ! if (f->f_name == NULL || f->f_mode == NULL) return NULL; *************** *** 190,195 **** #ifdef MS_WINDOWS if (PyUnicode_Check(f->f_name)) { ! PyObject *wmode; ! wmode = PyUnicode_DecodeASCII(mode, strlen(mode), NULL); if (f->f_name && wmode) { Py_BEGIN_ALLOW_THREADS --- 190,195 ---- #ifdef MS_WINDOWS if (PyUnicode_Check(f->f_name)) { ! PyObject *wmode; ! wmode = PyUnicode_DecodeASCII(mode, strlen(mode), NULL); if (f->f_name && wmode) { Py_BEGIN_ALLOW_THREADS *************** *** 530,545 **** file_truncate(PyFileObject *f, PyObject *args) { - int ret; Py_off_t newsize; ! PyObject *newsizeobj; if (f->f_fp == NULL) return err_closed(); - newsizeobj = NULL; if (!PyArg_UnpackTuple(args, "truncate", 0, 1, &newsizeobj)) return NULL; /* Set newsize to current postion if newsizeobj NULL, else to the ! specified value. */ if (newsizeobj != NULL) { #if !defined(HAVE_LARGEFILE_SUPPORT) --- 530,560 ---- file_truncate(PyFileObject *f, PyObject *args) { Py_off_t newsize; ! PyObject *newsizeobj = NULL; ! Py_off_t initialpos; ! int ret; if (f->f_fp == NULL) return err_closed(); if (!PyArg_UnpackTuple(args, "truncate", 0, 1, &newsizeobj)) return NULL; + /* Get current file position. If the file happens to be open for + * update and the last operation was an input operation, C doesn't + * define what the later fflush() will do, but we promise truncate() + * won't change the current position (and fflush() *does* change it + * then at least on Windows). The easiest thing is to capture + * current pos now and seek back to it at the end. + */ + Py_BEGIN_ALLOW_THREADS + errno = 0; + initialpos = _portable_ftell(f->f_fp); + Py_END_ALLOW_THREADS + if (initialpos == -1) + goto onioerror; + /* Set newsize to current postion if newsizeobj NULL, else to the ! * specified value. ! */ if (newsizeobj != NULL) { #if !defined(HAVE_LARGEFILE_SUPPORT) *************** *** 553,567 **** return NULL; } ! else { ! /* Default to current position. */ ! Py_BEGIN_ALLOW_THREADS ! errno = 0; ! newsize = _portable_ftell(f->f_fp); ! Py_END_ALLOW_THREADS ! if (newsize == -1) ! goto onioerror; ! } ! /* Flush the file. */ Py_BEGIN_ALLOW_THREADS errno = 0; --- 568,578 ---- return NULL; } ! else /* default to current position */ ! newsize = initialpos; ! /* Flush the stream. We're mixing stream-level I/O with lower-level ! * I/O, and a flush may be necessary to synch both platform views ! * of the current file state. ! */ Py_BEGIN_ALLOW_THREADS errno = 0; *************** *** 575,604 **** so don't even try using it. */ { - Py_off_t current; /* current file position */ HANDLE hFile; - int error; ! /* current <- current file postion. */ ! if (newsizeobj == NULL) ! current = newsize; ! else { ! Py_BEGIN_ALLOW_THREADS ! errno = 0; ! current = _portable_ftell(f->f_fp); ! Py_END_ALLOW_THREADS ! if (current == -1) ! goto onioerror; ! } ! ! /* Move to newsize. */ ! if (current != newsize) { ! Py_BEGIN_ALLOW_THREADS ! errno = 0; ! error = _portable_fseek(f->f_fp, newsize, SEEK_SET) ! != 0; ! Py_END_ALLOW_THREADS ! if (error) ! goto onioerror; ! } /* Truncate. Note that this may grow the file! */ --- 586,598 ---- so don't even try using it. */ { HANDLE hFile; ! /* Have to move current pos to desired endpoint on Windows. */ ! Py_BEGIN_ALLOW_THREADS ! errno = 0; ! ret = _portable_fseek(f->f_fp, newsize, SEEK_SET) != 0; ! Py_END_ALLOW_THREADS ! if (ret) ! goto onioerror; /* Truncate. Note that this may grow the file! */ *************** *** 606,629 **** errno = 0; hFile = (HANDLE)_get_osfhandle(fileno(f->f_fp)); ! error = hFile == (HANDLE)-1; ! if (!error) { ! error = SetEndOfFile(hFile) == 0; ! if (error) errno = EACCES; } Py_END_ALLOW_THREADS ! if (error) goto onioerror; - - /* Restore original file position. */ - if (current != newsize) { - Py_BEGIN_ALLOW_THREADS - errno = 0; - error = _portable_fseek(f->f_fp, current, SEEK_SET) - != 0; - Py_END_ALLOW_THREADS - if (error) - goto onioerror; - } } #else --- 600,612 ---- errno = 0; hFile = (HANDLE)_get_osfhandle(fileno(f->f_fp)); ! ret = hFile == (HANDLE)-1; ! if (ret == 0) { ! ret = SetEndOfFile(hFile) == 0; ! if (ret) errno = EACCES; } Py_END_ALLOW_THREADS ! if (ret) goto onioerror; } #else *************** *** 632,638 **** ret = ftruncate(fileno(f->f_fp), newsize); Py_END_ALLOW_THREADS ! if (ret != 0) goto onioerror; #endif /* !MS_WINDOWS */ Py_INCREF(Py_None); return Py_None; --- 615,630 ---- ret = ftruncate(fileno(f->f_fp), newsize); Py_END_ALLOW_THREADS ! if (ret != 0) ! goto onioerror; #endif /* !MS_WINDOWS */ + /* Restore original file position. */ + Py_BEGIN_ALLOW_THREADS + errno = 0; + ret = _portable_fseek(f->f_fp, initialpos, SEEK_SET) != 0; + Py_END_ALLOW_THREADS + if (ret) + goto onioerror; + Py_INCREF(Py_None); return Py_None; *************** *** 867,871 **** Py_BEGIN_ALLOW_THREADS errno = 0; ! nnow = Py_UniversalNewlineFread(ptr+ndone, ntodo, f->f_fp, (PyObject *)f); Py_END_ALLOW_THREADS --- 859,863 ---- Py_BEGIN_ALLOW_THREADS errno = 0; ! nnow = Py_UniversalNewlineFread(ptr+ndone, ntodo, f->f_fp, (PyObject *)f); Py_END_ALLOW_THREADS *************** *** 1138,1143 **** skipnextlf = 0; if (c == '\n') { ! /* Seeing a \n here with ! * skipnextlf true means we * saw a \r before. */ --- 1130,1135 ---- skipnextlf = 0; if (c == '\n') { ! /* Seeing a \n here with ! * skipnextlf true means we * saw a \r before. */ *************** *** 1735,1740 **** return Py_BuildValue("(sss)", "\r", "\n", "\r\n"); default: ! PyErr_Format(PyExc_SystemError, ! "Unknown newlines value 0x%x\n", f->f_newlinetypes); return NULL; --- 1727,1732 ---- return Py_BuildValue("(sss)", "\r", "\n", "\r\n"); default: ! PyErr_Format(PyExc_SystemError, ! "Unknown newlines value 0x%x\n", f->f_newlinetypes); return NULL; *************** *** 1746,1750 **** {"closed", (getter)get_closed, NULL, "True if the file is closed"}, #ifdef WITH_UNIVERSAL_NEWLINES ! {"newlines", (getter)get_newlines, NULL, "end-of-line convention used in this file"}, #endif --- 1738,1742 ---- {"closed", (getter)get_closed, NULL, "True if the file is closed"}, #ifdef WITH_UNIVERSAL_NEWLINES ! {"newlines", (getter)get_newlines, NULL, "end-of-line convention used in this file"}, #endif *************** *** 1761,1766 **** } ! /* Make sure that file has a readahead buffer with at least one byte ! (unless at EOF) and no more than bufsize. Returns negative value on error */ static int --- 1753,1758 ---- } ! /* Make sure that file has a readahead buffer with at least one byte ! (unless at EOF) and no more than bufsize. Returns negative value on error */ static int *************** *** 1770,1774 **** if (f->f_buf != NULL) { ! if( (f->f_bufend - f->f_bufptr) >= 1) return 0; else --- 1762,1766 ---- if (f->f_buf != NULL) { ! if( (f->f_bufend - f->f_bufptr) >= 1) return 0; else *************** *** 1797,1802 **** /* Used by file_iternext. The returned string will start with 'skip' ! uninitialized bytes followed by the remainder of the line. Don't be ! horrified by the recursive call: maximum recursion depth is limited by logarithmic buffer growth to about 50 even when reading a 1gb line. */ --- 1789,1794 ---- /* Used by file_iternext. The returned string will start with 'skip' ! uninitialized bytes followed by the remainder of the line. Don't be ! horrified by the recursive call: maximum recursion depth is limited by logarithmic buffer growth to about 50 even when reading a 1gb line. */ *************** *** 1810,1818 **** if (f->f_buf == NULL) ! if (readahead(f, bufsize) < 0) return NULL; len = f->f_bufend - f->f_bufptr; ! if (len == 0) return (PyStringObject *) PyString_FromStringAndSize(NULL, skip); --- 1802,1810 ---- if (f->f_buf == NULL) ! if (readahead(f, bufsize) < 0) return NULL; len = f->f_bufend - f->f_bufptr; ! if (len == 0) return (PyStringObject *) PyString_FromStringAndSize(NULL, skip); *************** *** 1823,1827 **** s = (PyStringObject *) PyString_FromStringAndSize(NULL, skip+len); ! if (s == NULL) return NULL; memcpy(PyString_AS_STRING(s)+skip, f->f_bufptr, len); --- 1815,1819 ---- s = (PyStringObject *) PyString_FromStringAndSize(NULL, skip+len); ! if (s == NULL) return NULL; memcpy(PyString_AS_STRING(s)+skip, f->f_bufptr, len); *************** *** 2080,2084 **** } #ifdef Py_USING_UNICODE ! if ((flags & Py_PRINT_RAW) && PyUnicode_Check(v) && enc != Py_None) { char *cenc = PyString_AS_STRING(enc); --- 2072,2076 ---- } #ifdef Py_USING_UNICODE ! if ((flags & Py_PRINT_RAW) && PyUnicode_Check(v) && enc != Py_None) { char *cenc = PyString_AS_STRING(enc); From tim_one at users.sourceforge.net Sat Sep 6 21:30:48 2003 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sat Sep 6 23:30:52 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_file.py,1.12,1.13 Message-ID: <E19vqGG-00044d-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv14962/python/Lib/test Modified Files: test_file.py Log Message: SF bug 801631: file.truncate fault on windows. file_truncate(): C doesn't define what fflush(fp) does if fp is open for update, and the preceding I/O operation on fp was input. On Windows, fflush() actually changes the current file position then. Because Windows doesn't support ftruncate() directly, this not only caused Python's file.truncate() to change the file position (contra our docs), it also caused the file not to change size. Repaired by getting the initial file position at the start, restoring it at the end, and tossing all the complicated micro-efficiency checks trying to avoid "provably unnecessary" seeks. file.truncate() can't be a frequent operation, and seeking to the current file position has got to be cheap anyway. Bugfix candidate. Index: test_file.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_file.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** test_file.py 4 May 2003 04:16:50 -0000 1.12 --- test_file.py 7 Sep 2003 03:30:16 -0000 1.13 *************** *** 133,134 **** --- 133,162 ---- os.unlink(TESTFN) + + def bug801631(): + # SF bug <http://www.python.org/sf/801631> + # "file.truncate fault on windows" + f = file(TESTFN, 'wb') + f.write('12345678901') # 11 bytes + f.close() + + f = file(TESTFN,'rb+') + data = f.read(5) + if data != '12345': + raise TestFailed("Read on file opened for update failed %r" % data) + if f.tell() != 5: + raise TestFailed("File pos after read wrong %d" % f.tell()) + + f.truncate() + if f.tell() != 5: + raise TestFailed("File pos after ftruncate wrong %d" % f.tell()) + + f.close() + size = os.path.getsize(TESTFN) + if size != 5: + raise TestFailed("File size after ftruncate wrong %d" % size) + + try: + bug801631() + finally: + os.unlink(TESTFN) From jvr at users.sourceforge.net Sun Sep 7 07:36:50 2003 From: jvr at users.sourceforge.net (jvr@users.sourceforge.net) Date: Sun Sep 7 09:37:01 2003 Subject: [Python-checkins] python/dist/src/Modules zipimport.c,1.16,1.17 Message-ID: <E19vzik-0007r3-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv30012 Modified Files: zipimport.c Log Message: Patch #801349: 64-bit fix for AMD64 from Gwenole Beauchesne. Classical problem with int vs. long mismatch in varargs. 2.3 backport candidate. Index: zipimport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/zipimport.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** zipimport.c 22 Jul 2003 18:10:15 -0000 1.16 --- zipimport.c 7 Sep 2003 13:36:48 -0000 1.17 *************** *** 876,880 **** goto error; } ! data = PyObject_CallFunction(decompress, "Ol", raw_data, -15); error: Py_DECREF(raw_data); --- 876,880 ---- goto error; } ! data = PyObject_CallFunction(decompress, "Oi", raw_data, -15); error: Py_DECREF(raw_data); From goodger at users.sourceforge.net Sun Sep 7 07:55:33 2003 From: goodger at users.sourceforge.net (goodger@users.sourceforge.net) Date: Sun Sep 7 09:55:37 2003 Subject: [Python-checkins] python/nondist/peps pep-0296.txt,1.2,1.3 Message-ID: <E19w00r-0001Aw-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv4504 Modified Files: pep-0296.txt Log Message: mark withdrawn Index: pep-0296.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0296.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pep-0296.txt 2 Aug 2002 18:05:59 -0000 1.2 --- pep-0296.txt 7 Sep 2003 13:55:30 -0000 1.3 *************** *** 4,12 **** Last-Modified: $Date$ Author: xscottg at yahoo.com (Scott Gilbert) ! Status: Draft Type: Standards Track Created: 12-Jul-2002 Python-Version: 2.3 Post-History: --- 4,17 ---- Last-Modified: $Date$ Author: xscottg at yahoo.com (Scott Gilbert) ! Status: Rejected Type: Standards Track Created: 12-Jul-2002 Python-Version: 2.3 Post-History: + + + Notice + + This PEP is withdrawn by the author. From goodger at users.sourceforge.net Sun Sep 7 07:56:14 2003 From: goodger at users.sourceforge.net (goodger@users.sourceforge.net) Date: Sun Sep 7 09:56:26 2003 Subject: [Python-checkins] python/nondist/peps pep-0000.txt,1.250,1.251 Message-ID: <E19w01W-0001DB-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv4631 Modified Files: pep-0000.txt Log Message: mark 296 withdrawn Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.250 retrieving revision 1.251 diff -C2 -d -r1.250 -r1.251 *** pep-0000.txt 13 Aug 2003 18:06:34 -0000 1.250 --- pep-0000.txt 7 Sep 2003 13:56:12 -0000 1.251 *************** *** 100,104 **** S 292 Simpler String Substitutions Warsaw S 294 Type Names in the types Module Tirosh - S 296 Adding a bytes Object Type Gilbert S 297 Support for System Upgrades Lemburg S 298 The Locked Buffer Interface Heller --- 100,103 ---- *************** *** 184,187 **** --- 183,187 ---- SR 289 Generator Comprehensions Hettinger SR 295 Interpretation of multiline string constants Koltsov + SR 296 Adding a bytes Object Type Gilbert SR 308 If-then-else expression GvR, Hettinger SD 316 Programming by Contract for Python Way *************** *** 310,314 **** S 294 Type Names in the types Module Tirosh SR 295 Interpretation of multiline string constants Koltsov ! S 296 Adding a bytes Object Type Gilbert S 297 Support for System Upgrades Lemburg S 298 The Locked Buffer Interface Heller --- 310,314 ---- S 294 Type Names in the types Module Tirosh SR 295 Interpretation of multiline string constants Koltsov ! SR 296 Adding a bytes Object Type Gilbert S 297 Support for System Upgrades Lemburg S 298 The Locked Buffer Interface Heller From loewis at users.sourceforge.net Sun Sep 7 14:42:31 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun Sep 7 16:42:35 2003 Subject: [Python-checkins] python/dist/src/Objects fileobject.c,2.182,2.183 Message-ID: <E19w6Mh-0004ab-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv17569/Objects Modified Files: fileobject.c Log Message: Only release buffer after file has been closed. Fixes #800824. Will backport to 2.2. Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.182 retrieving revision 2.183 diff -C2 -d -r2.182 -r2.183 *** fileobject.c 7 Sep 2003 03:30:18 -0000 2.182 --- fileobject.c 7 Sep 2003 20:42:29 -0000 2.183 *************** *** 389,393 **** { int sts = 0; - PyMem_Free(f->f_setbuf); if (f->f_fp != NULL) { if (f->f_close != NULL) { --- 389,392 ---- *************** *** 399,402 **** --- 398,402 ---- f->f_fp = NULL; } + PyMem_Free(f->f_setbuf); if (sts == EOF) return PyErr_SetFromErrno(PyExc_IOError); From loewis at users.sourceforge.net Sun Sep 7 14:43:26 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun Sep 7 16:43:29 2003 Subject: [Python-checkins] python/dist/src/Objects fileobject.c, 2.179.8.1, 2.179.8.2 Message-ID: <E19w6Na-0004d2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv17730/Objects Modified Files: Tag: release23-maint fileobject.c Log Message: Only release buffer after file has been closed. Fixes #800824. Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.179.8.1 retrieving revision 2.179.8.2 diff -C2 -d -r2.179.8.1 -r2.179.8.2 *** fileobject.c 4 Sep 2003 19:02:20 -0000 2.179.8.1 --- fileobject.c 7 Sep 2003 20:43:24 -0000 2.179.8.2 *************** *** 388,392 **** { int sts = 0; - PyMem_Free(f->f_setbuf); if (f->f_fp != NULL) { if (f->f_close != NULL) { --- 388,391 ---- *************** *** 398,401 **** --- 397,401 ---- f->f_fp = NULL; } + PyMem_Free(f->f_setbuf); if (sts == EOF) return PyErr_SetFromErrno(PyExc_IOError); From rhettinger at users.sourceforge.net Sun Sep 7 17:38:10 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sun Sep 7 19:38:16 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libdl.tex, 1.5, 1.5.24.1 libweakref.tex, 1.19, 1.19.8.1 Message-ID: <E19w96g-0003uh-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv15037 Modified Files: Tag: release23-maint libdl.tex libweakref.tex Log Message: Fix NULL markup. Index: libdl.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdl.tex,v retrieving revision 1.5 retrieving revision 1.5.24.1 diff -C2 -d -r1.5 -r1.5.24.1 *** libdl.tex 28 Nov 2001 07:26:15 -0000 1.5 --- libdl.tex 7 Sep 2003 23:38:08 -0000 1.5.24.1 *************** *** 88,92 **** The arguments must be either Python integers, which will be passed as is, Python strings, to which a pointer will be passed, ! or \code{None}, which will be passed as \NULL. Note that strings should only be passed to functions as \ctype{const char*}, as Python will not like its string mutated. --- 88,92 ---- The arguments must be either Python integers, which will be passed as is, Python strings, to which a pointer will be passed, ! or \code{None}, which will be passed as \NULL{}. Note that strings should only be passed to functions as \ctype{const char*}, as Python will not like its string mutated. Index: libweakref.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libweakref.tex,v retrieving revision 1.19 retrieving revision 1.19.8.1 diff -C2 -d -r1.19 -r1.19.8.1 *** libweakref.tex 2 Jul 2003 15:10:38 -0000 1.19 --- libweakref.tex 7 Sep 2003 23:38:08 -0000 1.19.8.1 *************** *** 251,255 **** The type constructor is responsible for initializing the weak reference ! list to \NULL: \begin{verbatim} --- 251,255 ---- The type constructor is responsible for initializing the weak reference ! list to \NULL{}: \begin{verbatim} *************** *** 267,271 **** weak reference manager to clear any weak references. This should be done before any other parts of the destruction have occurred, but is ! only required if the weak reference list is non-\NULL: \begin{verbatim} --- 267,271 ---- weak reference manager to clear any weak references. This should be done before any other parts of the destruction have occurred, but is ! only required if the weak reference list is non-\NULL{}: \begin{verbatim} From rhettinger at users.sourceforge.net Mon Sep 8 11:33:33 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 13:33:37 2003 Subject: [Python-checkins] python/dist/src/Tools/scripts texcheck.py, 1.7, 1.8 Message-ID: <E19wPtN-0005Vm-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv21178 Modified Files: texcheck.py Log Message: Check for \NULL markup errors. Index: texcheck.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/scripts/texcheck.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** texcheck.py 25 Aug 2003 04:36:21 -0000 1.7 --- texcheck.py 8 Sep 2003 17:33:31 -0000 1.8 *************** *** 100,103 **** --- 100,104 ---- braces = re.compile(r'({)|(})') doubledwords = re.compile(r'(\b[A-za-z]+\b) \b\1\b') + nullmarkup = re.compile(r'\NULL(?!\{\})') openers = [] # Stack of pending open delimiters *************** *** 151,154 **** --- 152,159 ---- if '\\' + cmd in validcmds: print 'Warning, forward slash used on line %d with cmd: /%s' % (lineno, cmd) + + # Check for bad markup + if nullmarkup.search(line): + print r'Warning, \NULL should be written as \NULL{} on line %d' % (lineno,) # Validate commands From rhettinger at users.sourceforge.net Mon Sep 8 11:36:13 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 13:36:18 2003 Subject: [Python-checkins] python/dist/src/Tools/scripts texcheck.py, 1.6, 1.6.8.1 Message-ID: <E19wPvx-0005gw-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv21871 Modified Files: Tag: release23-maint texcheck.py Log Message: Check for \NULL markup errors and doubled words. Index: texcheck.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/scripts/texcheck.py,v retrieving revision 1.6 retrieving revision 1.6.8.1 diff -C2 -d -r1.6 -r1.6.8.1 *** texcheck.py 16 May 2003 03:06:39 -0000 1.6 --- texcheck.py 8 Sep 2003 17:36:11 -0000 1.6.8.1 *************** *** 99,102 **** --- 99,104 ---- delimiters = re.compile(r'\\(begin|end){([_a-zA-Z]+)}|([()\[\]])') braces = re.compile(r'({)|(})') + doubledwords = re.compile(r'(\b[A-za-z]+\b) \b\1\b') + nullmarkup = re.compile(r'\NULL(?!\{\})') openers = [] # Stack of pending open delimiters *************** *** 151,154 **** --- 153,160 ---- print 'Warning, forward slash used on line %d with cmd: /%s' % (lineno, cmd) + # Check for bad markup + if nullmarkup.search(line): + print r'Warning, \NULL should be written as \NULL{} on line %d' % (lineno,) + # Validate commands nc = line.find(r'\newcommand') *************** *** 176,179 **** --- 182,187 ---- print r'Style warning, avoid use of i.e or e.g. on line %d' % (lineno,) + for dw in doubledwords.findall(line): + print r'Doubled word warning. "%s" on line %d' % (dw, lineno) lastline = lineno From fdrake at acm.org Mon Sep 8 14:47:23 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Mon Sep 8 13:47:30 2003 Subject: [Python-checkins] python/dist/src/Tools/scripts texcheck.py, 1.6, 1.6.8.1 In-Reply-To: <E19wPvx-0005gw-00@sc8-pr-cvs1.sourceforge.net> References: <E19wPvx-0005gw-00@sc8-pr-cvs1.sourceforge.net> Message-ID: <16220.49323.826643.988319@grendel.zope.com> rhettinger@users.sourceforge.net writes: > texcheck.py > Log Message: > Check for \NULL markup errors and doubled words. ... > + nullmarkup = re.compile(r'\NULL(?!\{\})') ... > + # Check for bad markup > + if nullmarkup.search(line): > + print r'Warning, \NULL should be written as \NULL{} on line %d' % (lineno,) Guess you didn't get my email in time... This isn't the right check. You only need to check for '\NULL[\s\n]'; the whitespace immediately after \NULL is what causes problems. The same check should be performed for \ABC, \UNIX, \POSIX, \ASCII, \Cpp, \C, \EOF, \infinity, and \plusminus (I think that's the complete list). -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation From rhettinger at users.sourceforge.net Mon Sep 8 12:06:48 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 14:06:52 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.36,1.831.4.37 Message-ID: <E19wQPY-0007IL-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv28022 Modified Files: Tag: release23-maint NEWS Log Message: texcheck.py checks for double word errors and \NULL markup. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.36 retrieving revision 1.831.4.37 diff -C2 -d -r1.831.4.36 -r1.831.4.37 *** NEWS 6 Sep 2003 19:52:27 -0000 1.831.4.36 --- NEWS 8 Sep 2003 18:06:46 -0000 1.831.4.37 *************** *** 109,112 **** --- 109,114 ---- -d option was given. + - texcheck.py now checks for double word errors and erroneous \NULL markup. + Build ----- From fdrake at users.sourceforge.net Mon Sep 8 12:10:17 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Mon Sep 8 14:10:21 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libtest.tex, 1.2.10.1, 1.2.10.2 Message-ID: <E19wQSv-0007TW-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv28717 Modified Files: Tag: release23-maint libtest.tex Log Message: backport from trunk: - reorganize sections - lots of markup changes Index: libtest.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtest.tex,v retrieving revision 1.2.10.1 retrieving revision 1.2.10.2 diff -C2 -d -r1.2.10.1 -r1.2.10.2 *** libtest.tex 6 Sep 2003 04:40:29 -0000 1.2.10.1 --- libtest.tex 8 Sep 2003 18:10:15 -0000 1.2.10.2 *************** *** 3,26 **** \declaremodule{standard}{test} - \sectionauthor{Brett Cannon}{brett@python.org} ! \modulesynopsis{Regression tests package containing the testing suite for ! Python.} ! ! ! The \module{test} package contains all regression tests for Python as well as ! the modules \module{test_support} and \module{regrtest.py}. ! \module{test_support} is used to enhance your tests while \module{regrtest.py} ! drives the testing suite. Each module in the \module{test} package whose name starts with ! \code{'test_'} is a testing suite for a specific module or feature. ! All new tests should be written using the \module{unittest} module; using ! \module{unittest} is not required but makes the tests more flexible and ! maintenance of the tests easier. ! Some older tests are written to use \module{doctest} and a ``traditional'' ! testing style; these styles of tests will not be covered. \begin{seealso} --- 3,23 ---- \declaremodule{standard}{test} \sectionauthor{Brett Cannon}{brett@python.org} + \modulesynopsis{Regression tests package containing the testing suite + for Python.} ! The \module{test} package contains all regression tests for Python as ! well as the modules \module{test.test_support} and ! \module{test.regrtest}. \module{test.test_support} is used to enhance ! your tests while \module{test.regrtest} drives the testing suite. Each module in the \module{test} package whose name starts with ! \samp{test_} is a testing suite for a specific module or feature. ! All new tests should be written using the \refmodule{unittest} module; ! using \refmodule{unittest} is not required but makes the tests more ! flexible and maintenance of the tests easier. Some older tests are ! written to use \refmodule{doctest} and a ``traditional'' testing ! style; these styles of tests will not be covered. \begin{seealso} *************** *** 30,125 **** - \subsection{\module{test.test_support} --- Utility functions for tests} - \declaremodule[test.testsupport]{standard}{test.test_support} - - The \module{test.test_support} module contains functions for assisting - with writing regression tests. - - The \module{test.test_support} module defines the following exceptions: - - \begin{excdesc}{TestFailed} - Exception to be raised when a test fails. - \end{excdesc} - - \begin{excdesc}{TestSkipped} - Subclass of \exception{TestFailed}. - Raised when a test is skipped. - This occurs when a needed resource (such as a network connection) is not - available at the time of testing. - \end{excdesc} - - \begin{excdesc}{ResourceDenied} - Subclass of \exception{TestSkipped}. - Raised when a resource (such as a network connection) is not available. - Raised by the \function{requires} function. - \end{excdesc} - - - The \module{test_support} module defines the following constants: - - \begin{datadesc}{verbose} - \constant{True} when verbose output is enabled. - Should be checked when more detailed information is desired about a running - test. - \var{verbose} is set by \module{regrtest.py}. - \end{datadesc} - - \begin{datadesc}{have_unicode} - \constant{True} when Unicode support is available. - \end{datadesc} - - \begin{datadesc}{is_jython} - \constant{True} if the running interpreter is Jython. - \end{datadesc} - - \begin{datadesc}{TESTFN} - Set to the path that a temporary file may be created at. - Any temporary that is created should be closed and unlinked (removed). - \end{datadesc} - - - The \module{test_support} module defines the following functions: - - \begin{funcdesc}{forget}{module_name} - Removes the module named \var{module_name} from \module{sys.modules} and deletes - any byte-compiled files of the module. - \end{funcdesc} - - \begin{funcdesc}{is_resource_enabled}{resource} - Returns \constant{True} if \var{resource} is enabled and available. - The list of available resources is only set when \module{regrtest.py} is - executing the tests. - \end{funcdesc} - - \begin{funcdesc}{requires}{resource\optional{, msg}} - Raises \exception{ResourceDenied} if \var{resource} is not available. - \var{msg} is the argument to \exception{ResourceDenied} if it is raised. - Always returns true if called by a function whose \var{__name__} is - \code{"__main__"}. - Used when tests are executed by \module{regrtest.py}. - \end{funcdesc} - - \begin{funcdesc}{findfile}{filename} - Return the path to the file named \var{filename}. - If no match is found \var{filename} is returned. - This does not equal a failure since it could be the path to the file. - \end{funcdesc} - - \begin{funcdesc}{run_unittest}{*classes} - Execute \class{unittest.TestCase} subclasses passed to the function. - The function scans the classes for methods starting with the name - \code{"test_"} and executes the tests individually. - This is the preferred way to execute tests. - \end{funcdesc} - - \begin{funcdesc}{run_suite}{suite\optional{, testclass=None}} - Execute the \class{unittest.TestSuite} instance, \var{suite}. - The optional argument \var{testclass} accepts one of the test classes in the - suite so as to print out more detailed information on where the testing suite - originated from. - \end{funcdesc} - - - \subsection{Writing Unit Tests for the \module{test} package% \label{writing-tests}} --- 27,30 ---- *************** *** 127,131 **** It is preferred that tests for the \module{test} package use the \refmodule{unittest} module and follow a few guidelines. ! One is to have the name of all the test methods start with \code{"test_"} as well as the module's name. This is needed so that the methods are recognized by the test driver as --- 32,36 ---- It is preferred that tests for the \module{test} package use the \refmodule{unittest} module and follow a few guidelines. ! One is to have the name of all the test methods start with \samp{'test_'} as well as the module's name. This is needed so that the methods are recognized by the test driver as *************** *** 133,137 **** Also, no documentation string for the method should be included. A comment (such as ! \code{\# Tests function returns only True or False}) should be used to provide documentation for test methods. This is done because documentation strings get printed out if they exist and --- 38,42 ---- Also, no documentation string for the method should be included. A comment (such as ! \samp{\# Tests function returns only True or False}) should be used to provide documentation for test methods. This is done because documentation strings get printed out if they exist and *************** *** 179,184 **** \end{verbatim} ! This boilerplate code allows the testing suite to be run by \module{regrtest.py} ! as well as on its own as a script. The goal for regression testing is to try to break code. --- 84,89 ---- \end{verbatim} ! This boilerplate code allows the testing suite to be run by ! \module{test.regrtest} as well as on its own as a script. The goal for regression testing is to try to break code. *************** *** 209,214 **** anomalous behavior from side-effects of importing a module. \item Try to maximize code reuse. ! On occasion tests will vary by something as small as what type of input ! they take. Minimize code duplication by subclassing a basic test class with a class that specifies the input: --- 114,119 ---- anomalous behavior from side-effects of importing a module. \item Try to maximize code reuse. ! On occasion, tests will vary by something as small as what type ! of input is used. Minimize code duplication by subclassing a basic test class with a class that specifies the input: *************** *** 233,276 **** \begin{seealso} ! \seetitle{Test Driven Development}{A book by Kent Beck on writing tests before ! code} \end{seealso} ! \subsection{Running tests Using \module{regrtest.py} \label{regrtest}} ! ! \module{regrtest.py} is the script used to drive Python's regression test ! suite. Running the script by itself automatically starts running all regression tests in the \module{test} package. It does this by finding all modules in the package whose name starts with ! \code{test_}, importing them, and executing the function \function{test_main} ! if present. The names of tests to execute may also be passed to the script. ! Specifying a single regression test (\code{python regrtest.py test_spam.py}) ! will minimize output and only print whether the test passed or failed and thus ! minimize output. ! Running \module{regrtest.py} directly allows what resources are available for tests to use to be set. ! You do this by using the \code{-u} command-line option. ! Run \code{python regrtest.py -uall} to turn on all resources; ! specifying \code{all} as an option for \code{-u} enables all possible ! resources. If all but one resource is desired (a more common case), a comma-separated list of resources that are not desired may be listed after ! \code{all}. ! The command \code{python regrtest.py -uall,-audio,-largefile} will run ! \module{regrtest.py} with all resources except the audio and largefile ! resources. For a list of all resources and more command-line options, run ! \code{python regrtest.py -h}. Some other ways to execute the regression tests depend on what platform the tests are being executed on. ! On \UNIX{}, you can run \code{make test} at the top-level directory ! where Python was built. ! On Windows, executing \code{rt.bat} from your PCBuild directory will run all regression tests. --- 138,274 ---- \begin{seealso} ! \seetitle{Test Driven Development} ! {A book by Kent Beck on writing tests before code.} \end{seealso} + \subsection{Running tests Using \module{test.regrtest} \label{regrtest}} ! \module{test.regrtest} can be used as a script to drive Python's ! regression test suite. Running the script by itself automatically starts running all regression tests in the \module{test} package. It does this by finding all modules in the package whose name starts with ! \samp{test_}, importing them, and executing the function ! \function{test_main()} if present. The names of tests to execute may also be passed to the script. ! Specifying a single regression test (\program{python regrtest.py} ! \programopt{test_spam.py}) will minimize output and only print whether ! the test passed or failed and thus minimize output. ! Running \module{test.regrtest} directly allows what resources are available for tests to use to be set. ! You do this by using the \programopt{-u} command-line option. ! Run \program{python regrtest.py} \programopt{-uall} to turn on all ! resources; specifying \programopt{all} as an option for ! \programopt{-u} enables all possible resources. If all but one resource is desired (a more common case), a comma-separated list of resources that are not desired may be listed after ! \programopt{all}. ! The command \program{python regrtest.py} ! \programopt{-uall,-audio,-largefile} will run \module{test.regrtest} ! with all resources except the \programopt{audio} and ! \programopt{largefile} resources. For a list of all resources and more command-line options, run ! \program{python regrtest.py} \programopt{-h}. Some other ways to execute the regression tests depend on what platform the tests are being executed on. ! On \UNIX{}, you can run \program{make} \programopt{test} at the ! top-level directory where Python was built. ! On Windows, executing \program{rt.bat} from your \file{PCBuild} ! directory will run all regression tests. ! ! ! \section{\module{test.test_support} --- ! Utility functions for tests} ! ! \declaremodule[test.testsupport]{standard}{test.test_support} ! \modulesynopsis{Support for Python regression tests.} ! ! The \module{test.test_support} module provides support for Python's regression tests. + This module defines the following exceptions: + + \begin{excdesc}{TestFailed} + Exception to be raised when a test fails. + \end{excdesc} + + \begin{excdesc}{TestSkipped} + Subclass of \exception{TestFailed}. + Raised when a test is skipped. + This occurs when a needed resource (such as a network connection) is not + available at the time of testing. + \end{excdesc} + + \begin{excdesc}{ResourceDenied} + Subclass of \exception{TestSkipped}. + Raised when a resource (such as a network connection) is not available. + Raised by the \function{requires()} function. + \end{excdesc} + + + The \module{test.test_support} module defines the following constants: + + \begin{datadesc}{verbose} + \constant{True} when verbose output is enabled. + Should be checked when more detailed information is desired about a running + test. + \var{verbose} is set by \module{test.regrtest}. + \end{datadesc} + + \begin{datadesc}{have_unicode} + \constant{True} when Unicode support is available. + \end{datadesc} + + \begin{datadesc}{is_jython} + \constant{True} if the running interpreter is Jython. + \end{datadesc} + + \begin{datadesc}{TESTFN} + Set to the path that a temporary file may be created at. + Any temporary that is created should be closed and unlinked (removed). + \end{datadesc} + + + The \module{test.test_support} module defines the following functions: + + \begin{funcdesc}{forget}{module_name} + Removes the module named \var{module_name} from \code{sys.modules} and deletes + any byte-compiled files of the module. + \end{funcdesc} + + \begin{funcdesc}{is_resource_enabled}{resource} + Returns \constant{True} if \var{resource} is enabled and available. + The list of available resources is only set when \module{test.regrtest} + is executing the tests. + \end{funcdesc} + + \begin{funcdesc}{requires}{resource\optional{, msg}} + Raises \exception{ResourceDenied} if \var{resource} is not available. + \var{msg} is the argument to \exception{ResourceDenied} if it is raised. + Always returns true if called by a function whose \code{__name__} is + \code{'__main__'}. + Used when tests are executed by \module{test.regrtest}. + \end{funcdesc} + + \begin{funcdesc}{findfile}{filename} + Return the path to the file named \var{filename}. + If no match is found \var{filename} is returned. + This does not equal a failure since it could be the path to the file. + \end{funcdesc} + + \begin{funcdesc}{run_unittest}{*classes} + Execute \class{unittest.TestCase} subclasses passed to the function. + The function scans the classes for methods starting with the prefix + \samp{test_} and executes the tests individually. + This is the preferred way to execute tests. + \end{funcdesc} + + \begin{funcdesc}{run_suite}{suite\optional{, testclass}} + Execute the \class{unittest.TestSuite} instance \var{suite}. + The optional argument \var{testclass} accepts one of the test classes in the + suite so as to print out more detailed information on where the testing suite + originated from. + \end{funcdesc} From rhettinger at users.sourceforge.net Mon Sep 8 12:41:20 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 14:41:26 2003 Subject: [Python-checkins] python/dist/src/Tools/scripts texcheck.py, 1.8, 1.9 Message-ID: <E19wQwy-0000mq-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv3018 Modified Files: texcheck.py Log Message: Generalize the last change to check for other markup spacing errors. Index: texcheck.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/scripts/texcheck.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** texcheck.py 8 Sep 2003 17:33:31 -0000 1.8 --- texcheck.py 8 Sep 2003 18:41:18 -0000 1.9 *************** *** 100,104 **** braces = re.compile(r'({)|(})') doubledwords = re.compile(r'(\b[A-za-z]+\b) \b\1\b') ! nullmarkup = re.compile(r'\NULL(?!\{\})') openers = [] # Stack of pending open delimiters --- 100,104 ---- braces = re.compile(r'({)|(})') doubledwords = re.compile(r'(\b[A-za-z]+\b) \b\1\b') ! spacingmarkup = re.compile(r'\\(ABC|ASCII|C|Cpp|EOF|infinity|NULL|plusminus|POSIX|UNIX)\s') openers = [] # Stack of pending open delimiters *************** *** 153,159 **** print 'Warning, forward slash used on line %d with cmd: /%s' % (lineno, cmd) ! # Check for bad markup ! if nullmarkup.search(line): ! print r'Warning, \NULL should be written as \NULL{} on line %d' % (lineno,) # Validate commands --- 153,159 ---- print 'Warning, forward slash used on line %d with cmd: /%s' % (lineno, cmd) ! # Check for markup requiring {} for correct spacing ! for cmd in spacingmarkup.findall(line): ! print r'Warning, \%s should be written as \%s{} on line %d' % (cmd, cmd, lineno) # Validate commands From rhettinger at users.sourceforge.net Mon Sep 8 12:43:48 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 14:43:51 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.37,1.831.4.38 Message-ID: <E19wQzM-0000tF-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv3408 Modified Files: Tag: release23-maint NEWS Log Message: Generalize the last change to check for other markup spacing errors. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.37 retrieving revision 1.831.4.38 diff -C2 -d -r1.831.4.37 -r1.831.4.38 *** NEWS 8 Sep 2003 18:06:46 -0000 1.831.4.37 --- NEWS 8 Sep 2003 18:43:46 -0000 1.831.4.38 *************** *** 109,113 **** -d option was given. ! - texcheck.py now checks for double word errors and erroneous \NULL markup. Build --- 109,113 ---- -d option was given. ! - texcheck.py now checks for double word errors and erroneous spacing markup. Build From rhettinger at users.sourceforge.net Mon Sep 8 12:52:20 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 14:52:46 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex, 1.128, 1.129 libshlex.tex, 1.16, 1.17 libstdtypes.tex, 1.131, 1.132 libtime.tex, 1.60, 1.61 Message-ID: <E19wR7c-0001Md-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv5233 Modified Files: libos.tex libshlex.tex libstdtypes.tex libtime.tex Log Message: Fix spacing markup and other sundries. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -d -r1.128 -r1.129 *** libos.tex 31 Aug 2003 05:09:52 -0000 1.128 --- libos.tex 8 Sep 2003 18:52:18 -0000 1.129 *************** *** 422,426 **** \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX.1, \UNIX 95, \UNIX 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the --- 422,426 ---- \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX.1, \UNIX{} 95, \UNIX{} 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the *************** *** 794,798 **** \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX.1, \UNIX 95, \UNIX 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the --- 794,798 ---- \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX.1, \UNIX{} 95, \UNIX{} 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the *************** *** 1081,1085 **** When \var{topdown} is true, the caller can modify the \var{dirnames} list ! in-place (e.g., via \keyword{del} or slice assignment), and \function{walk()} will only recurse into the subdirectories whose names remain in \var{dirnames}; this can be used to prune the search, --- 1081,1085 ---- When \var{topdown} is true, the caller can modify the \var{dirnames} list ! in-place (perhaps unsing \keyword{del} or slice assignment), and \function{walk()} will only recurse into the subdirectories whose names remain in \var{dirnames}; this can be used to prune the search, *************** *** 1668,1672 **** \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX, \UNIX 95, \UNIX 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the --- 1668,1672 ---- \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX, \UNIX{} 95, \UNIX{} 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the Index: libshlex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshlex.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** libshlex.tex 20 Apr 2003 01:57:03 -0000 1.16 --- libshlex.tex 8 Sep 2003 18:52:18 -0000 1.17 *************** *** 118,122 **** Pop the last-pushed input source from the input stack. This is the same method used internally when the lexer reaches ! \EOF on a stacked input stream. \versionadded{2.1} \end{methoddesc} --- 118,122 ---- Pop the last-pushed input source from the input stack. This is the same method used internally when the lexer reaches ! \EOF{} on a stacked input stream. \versionadded{2.1} \end{methoddesc} Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** libstdtypes.tex 30 Aug 2003 23:31:31 -0000 1.131 --- libstdtypes.tex 8 Sep 2003 18:52:18 -0000 1.132 *************** *** 417,422 **** constructed by the comma operator (not within square brackets), with or without enclosing parentheses, but an empty tuple must have the ! enclosing parentheses, e.g., \code{a, b, c} or \code{()}. A single ! item tuple must have a trailing comma, e.g., \code{(d,)}. \obindex{sequence} \obindex{string} --- 417,422 ---- constructed by the comma operator (not within square brackets), with or without enclosing parentheses, but an empty tuple must have the ! enclosing parentheses, such as \code{a, b, c} or \code{()}. A single ! item tuple must have a trailing comma, such as \code{(d,)}. \obindex{sequence} \obindex{string} *************** *** 1362,1366 **** size as if zero-filled, or increase to the specified size with undefined new content. ! Availability: Windows, many \UNIX variants. \end{methoddesc} --- 1362,1366 ---- size as if zero-filled, or increase to the specified size with undefined new content. ! Availability: Windows, many \UNIX{} variants. \end{methoddesc} Index: libtime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** libtime.tex 1 Jul 2003 07:19:17 -0000 1.60 --- libtime.tex 8 Sep 2003 18:52:18 -0000 1.61 *************** *** 358,362 **** \item[offset] ! The offset has the form: \plusminus hh[:mm[:ss]]. This indicates the value added the local time to arrive at UTC. If preceded by a '-', the timezone is east of the Prime --- 358,362 ---- \item[offset] ! The offset has the form: \plusminus{} hh[:mm[:ss]]. This indicates the value added the local time to arrive at UTC. If preceded by a '-', the timezone is east of the Prime From rhettinger at users.sourceforge.net Mon Sep 8 12:55:03 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 14:55:07 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex, 1.127.10.1, 1.127.10.2 libshlex.tex, 1.16, 1.16.12.1 libstdtypes.tex, 1.129.8.2, 1.129.8.3 libtime.tex, 1.60, 1.60.8.1 Message-ID: <E19wRAF-0001Uh-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv5690 Modified Files: Tag: release23-maint libos.tex libshlex.tex libstdtypes.tex libtime.tex Log Message: Fix spacing markup and other sundries. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.127.10.1 retrieving revision 1.127.10.2 diff -C2 -d -r1.127.10.1 -r1.127.10.2 *** libos.tex 31 Aug 2003 05:11:15 -0000 1.127.10.1 --- libos.tex 8 Sep 2003 18:55:01 -0000 1.127.10.2 *************** *** 422,426 **** \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX.1, \UNIX 95, \UNIX 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the --- 422,426 ---- \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX.1, \UNIX{} 95, \UNIX{} 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the *************** *** 794,798 **** \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX.1, \UNIX 95, \UNIX 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the --- 794,798 ---- \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX.1, \UNIX{} 95, \UNIX{} 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the *************** *** 1081,1085 **** When \var{topdown} is true, the caller can modify the \var{dirnames} list ! in-place (e.g., via \keyword{del} or slice assignment), and \function{walk()} will only recurse into the subdirectories whose names remain in \var{dirnames}; this can be used to prune the search, --- 1081,1085 ---- When \var{topdown} is true, the caller can modify the \var{dirnames} list ! in-place (perhaps unsing \keyword{del} or slice assignment), and \function{walk()} will only recurse into the subdirectories whose names remain in \var{dirnames}; this can be used to prune the search, *************** *** 1668,1672 **** \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX, \UNIX 95, \UNIX 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the --- 1668,1672 ---- \var{name} specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are ! specified in a number of standards (\POSIX, \UNIX{} 95, \UNIX{} 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the Index: libshlex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshlex.tex,v retrieving revision 1.16 retrieving revision 1.16.12.1 diff -C2 -d -r1.16 -r1.16.12.1 *** libshlex.tex 20 Apr 2003 01:57:03 -0000 1.16 --- libshlex.tex 8 Sep 2003 18:55:01 -0000 1.16.12.1 *************** *** 118,122 **** Pop the last-pushed input source from the input stack. This is the same method used internally when the lexer reaches ! \EOF on a stacked input stream. \versionadded{2.1} \end{methoddesc} --- 118,122 ---- Pop the last-pushed input source from the input stack. This is the same method used internally when the lexer reaches ! \EOF{} on a stacked input stream. \versionadded{2.1} \end{methoddesc} Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.129.8.2 retrieving revision 1.129.8.3 diff -C2 -d -r1.129.8.2 -r1.129.8.3 *** libstdtypes.tex 30 Aug 2003 23:35:56 -0000 1.129.8.2 --- libstdtypes.tex 8 Sep 2003 18:55:01 -0000 1.129.8.3 *************** *** 417,422 **** constructed by the comma operator (not within square brackets), with or without enclosing parentheses, but an empty tuple must have the ! enclosing parentheses, e.g., \code{a, b, c} or \code{()}. A single ! item tuple must have a trailing comma, e.g., \code{(d,)}. \obindex{sequence} \obindex{string} --- 417,422 ---- constructed by the comma operator (not within square brackets), with or without enclosing parentheses, but an empty tuple must have the ! enclosing parentheses, such as \code{a, b, c} or \code{()}. A single ! item tuple must have a trailing comma, such as \code{(d,)}. \obindex{sequence} \obindex{string} *************** *** 1362,1366 **** size as if zero-filled, or increase to the specified size with undefined new content. ! Availability: Windows, many \UNIX variants. \end{methoddesc} --- 1362,1366 ---- size as if zero-filled, or increase to the specified size with undefined new content. ! Availability: Windows, many \UNIX{} variants. \end{methoddesc} Index: libtime.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v retrieving revision 1.60 retrieving revision 1.60.8.1 diff -C2 -d -r1.60 -r1.60.8.1 *** libtime.tex 1 Jul 2003 07:19:17 -0000 1.60 --- libtime.tex 8 Sep 2003 18:55:01 -0000 1.60.8.1 *************** *** 358,362 **** \item[offset] ! The offset has the form: \plusminus hh[:mm[:ss]]. This indicates the value added the local time to arrive at UTC. If preceded by a '-', the timezone is east of the Prime --- 358,362 ---- \item[offset] ! The offset has the form: \plusminus{} hh[:mm[:ss]]. This indicates the value added the local time to arrive at UTC. If preceded by a '-', the timezone is east of the Prime From rhettinger at users.sourceforge.net Mon Sep 8 13:01:07 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 15:02:37 2003 Subject: [Python-checkins] python/dist/src/Doc/ext extending.tex,1.24,1.25 Message-ID: <E19wRG7-0002D4-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ext In directory sc8-pr-cvs1:/tmp/cvs-serv8463 Modified Files: extending.tex Log Message: Fix spacing markup and other sundries. Index: extending.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/extending.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** extending.tex 20 May 2003 05:31:16 -0000 1.24 --- extending.tex 8 Sep 2003 19:01:04 -0000 1.25 *************** *** 1,3 **** ! \chapter{Extending Python with C or \Cpp \label{intro}} --- 1,3 ---- ! \chapter{Extending Python with \C{} or \Cpp{} \label{intro}} *************** *** 350,354 **** Note that PyMODINIT_FUNC declares the function as \code{void} return type, declares any special linkage declarations required by the platform, and for ! \Cpp declares the function as \code{extern "C"}. When the Python program imports module \module{spam} for the first --- 350,354 ---- Note that PyMODINIT_FUNC declares the function as \code{void} return type, declares any special linkage declarations required by the platform, and for ! \Cpp{} declares the function as \code{extern "C"}. When the Python program imports module \module{spam} for the first From rhettinger at users.sourceforge.net Mon Sep 8 13:02:01 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 15:02:42 2003 Subject: [Python-checkins] python/dist/src/Doc/ext extending.tex, 1.24, 1.24.10.1 Message-ID: <E19wRGz-0002GL-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ext In directory sc8-pr-cvs1:/tmp/cvs-serv8683 Modified Files: Tag: release23-maint extending.tex Log Message: Fix spacing markup and other sundries. Index: extending.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/extending.tex,v retrieving revision 1.24 retrieving revision 1.24.10.1 diff -C2 -d -r1.24 -r1.24.10.1 *** extending.tex 20 May 2003 05:31:16 -0000 1.24 --- extending.tex 8 Sep 2003 19:01:57 -0000 1.24.10.1 *************** *** 1,3 **** ! \chapter{Extending Python with C or \Cpp \label{intro}} --- 1,3 ---- ! \chapter{Extending Python with \C{} or \Cpp{} \label{intro}} *************** *** 350,354 **** Note that PyMODINIT_FUNC declares the function as \code{void} return type, declares any special linkage declarations required by the platform, and for ! \Cpp declares the function as \code{extern "C"}. When the Python program imports module \module{spam} for the first --- 350,354 ---- Note that PyMODINIT_FUNC declares the function as \code{void} return type, declares any special linkage declarations required by the platform, and for ! \Cpp{} declares the function as \code{extern "C"}. When the Python program imports module \module{spam} for the first From rhettinger at users.sourceforge.net Mon Sep 8 13:15:45 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 15:15:49 2003 Subject: [Python-checkins] python/dist/src/Lib random.py, 1.51.8.2, 1.51.8.3 sets.py, 1.44.8.2, 1.44.8.3 Message-ID: <E19wRUH-0003FN-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv12475 Modified Files: Tag: release23-maint random.py sets.py Log Message: Set the warnings stacklevel to two. Index: random.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/random.py,v retrieving revision 1.51.8.2 retrieving revision 1.51.8.3 diff -C2 -d -r1.51.8.2 -r1.51.8.3 *** random.py 5 Sep 2003 21:40:30 -0000 1.51.8.2 --- random.py 8 Sep 2003 19:15:43 -0000 1.51.8.3 *************** *** 334,339 **** import warnings warnings.warn("The cunifvariate function is deprecated; Use (mean " ! "+ arc * (Random.random() - 0.5)) % Math.pi instead", ! DeprecationWarning) return (mean + arc * (self.random() - 0.5)) % _pi --- 334,339 ---- import warnings warnings.warn("The cunifvariate function is deprecated; Use (mean " ! "+ arc * (Random.random() - 0.5)) % Math.pi instead.", ! DeprecationWarning, 2) return (mean + arc * (self.random() - 0.5)) % _pi *************** *** 488,493 **** import warnings warnings.warn("The stdgamma function is deprecated; " ! "use gammavariate() instead", ! DeprecationWarning) return self.gammavariate(alpha, 1.0) --- 488,493 ---- import warnings warnings.warn("The stdgamma function is deprecated; " ! "use gammavariate() instead.", ! DeprecationWarning, 2) return self.gammavariate(alpha, 1.0) Index: sets.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sets.py,v retrieving revision 1.44.8.2 retrieving revision 1.44.8.3 diff -C2 -d -r1.44.8.2 -r1.44.8.3 *** sets.py 17 Aug 2003 22:08:58 -0000 1.44.8.2 --- sets.py 8 Sep 2003 19:15:43 -0000 1.44.8.3 *************** *** 503,508 **** import warnings warnings.warn("The update() method is going to be deprecated; " ! "Use union_update() instead", ! PendingDeprecationWarning) self._update(iterable) --- 503,508 ---- import warnings warnings.warn("The update() method is going to be deprecated; " ! "Use union_update() instead.", ! PendingDeprecationWarning, 2) self._update(iterable) From rhettinger at users.sourceforge.net Mon Sep 8 13:16:38 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 15:16:42 2003 Subject: [Python-checkins] python/dist/src/Lib sets.py,1.46,1.47 Message-ID: <E19wRV8-0003I0-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv12639 Modified Files: sets.py Log Message: Set the warnings stacklevel to two. Index: sets.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sets.py,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** sets.py 17 Aug 2003 08:34:09 -0000 1.46 --- sets.py 8 Sep 2003 19:16:36 -0000 1.47 *************** *** 503,508 **** import warnings warnings.warn("The update() method deprecated; " ! "Use union_update() instead", ! DeprecationWarning) self._update(iterable) --- 503,508 ---- import warnings warnings.warn("The update() method deprecated; " ! "Use union_update() instead.", ! DeprecationWarning, 2) self._update(iterable) From rhettinger at users.sourceforge.net Mon Sep 8 17:58:43 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 19:58:47 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_itertools.py, 1.18, 1.19 Message-ID: <E19wVu7-0002cb-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv9975/Lib/test Modified Files: test_itertools.py Log Message: Add an example to address a common question of how to split iterators. Index: test_itertools.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_itertools.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** test_itertools.py 29 Aug 2003 23:09:58 -0000 1.18 --- test_itertools.py 8 Sep 2003 23:58:40 -0000 1.19 *************** *** 488,491 **** --- 488,494 ---- Samuele + >>> def take(n, seq): + ... return list(islice(seq, n)) + >>> def enumerate(iterable): ... return izip(count(), iterable) *************** *** 540,549 **** ... yield result ! >>> def take(n, seq): ! ... return list(islice(seq, n)) This is not part of the examples but it tests to make sure the definitions perform as purported. >>> list(enumerate('abc')) [(0, 'a'), (1, 'b'), (2, 'c')] --- 543,566 ---- ... yield result ! >>> def tee(iterable): ! ... "Return two independent iterators from a single iterable" ! ... def gen(next, data={}, cnt=[0]): ! ... dpop = data.pop ! ... for i in count(): ! ... if i == cnt[0]: ! ... item = data[i] = next() ! ... cnt[0] += 1 ! ... else: ! ... item = dpop(i) ! ... yield item ! ... next = iter(iterable).next ! ... return (gen(next), gen(next)) This is not part of the examples but it tests to make sure the definitions perform as purported. + >>> take(10, count()) + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + >>> list(enumerate('abc')) [(0, 'a'), (1, 'b'), (2, 'c')] *************** *** 591,596 **** 32 ! >>> take(10, count()) ! [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] """ --- 608,622 ---- 32 ! >>> def irange(start, stop): ! ... for i in range(start, stop): ! ... yield i ! ! >>> x, y = tee(irange(2,10)) ! >>> list(x), list(y) ! ([2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 9]) ! ! >>> x, y = tee(irange(2,10)) ! >>> zip(x, y) ! [(2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)] """ From rhettinger at users.sourceforge.net Mon Sep 8 18:07:46 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 8 20:07:56 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libitertools.tex, 1.12.6.3, 1.12.6.4 Message-ID: <E19wW2s-00032n-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv11687 Modified Files: Tag: release23-maint libitertools.tex Log Message: Add an example to address a common question of how to split iterators. Index: libitertools.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libitertools.tex,v retrieving revision 1.12.6.3 retrieving revision 1.12.6.4 diff -C2 -d -r1.12.6.3 -r1.12.6.4 *** libitertools.tex 30 Aug 2003 22:14:45 -0000 1.12.6.3 --- libitertools.tex 9 Sep 2003 00:07:44 -0000 1.12.6.4 *************** *** 322,332 **** \end{verbatim} ! This section has further examples of how itertools can be combined. ! Note that \function{enumerate()} and \method{iteritems()} already ! have highly efficient implementations in Python. They are only ! included here to illustrate how higher level tools can be created ! from building blocks. \begin{verbatim} def enumerate(iterable): return izip(count(), iterable) --- 322,334 ---- \end{verbatim} ! This section shows how itertools can be combined to create other more ! powerful itertools. Note that \function{enumerate()} and \method{iteritems()} ! already have efficient implementations in Python. They are only included here ! to illustrate how higher level tools can be created from building blocks. \begin{verbatim} + def take(n, seq): + return list(islice(seq, n)) + def enumerate(iterable): return izip(count(), iterable) *************** *** 381,386 **** yield result ! def take(n, seq): ! return list(islice(seq, n)) \end{verbatim} --- 383,399 ---- yield result ! def tee(iterable): ! "Return two independent iterators from a single iterable" ! def gen(next, data={}, cnt=[0]): ! dpop = data.pop ! for i in count(): ! if i == cnt[0]: ! item = data[i] = next() ! cnt[0] += 1 ! else: ! item = dpop(i) ! yield item ! next = iter(iterable).next ! return (gen(next), gen(next)) \end{verbatim} From rhettinger at users.sourceforge.net Mon Sep 8 19:30:16 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 9 02:29:54 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libre.tex,1.103,1.104 Message-ID: <E19wXKi-0006RR-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv24643 Modified Files: libre.tex Log Message: SF #801306: Bad RE in scanf example Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** libre.tex 31 Aug 2003 05:29:02 -0000 1.103 --- libre.tex 9 Sep 2003 01:30:13 -0000 1.104 *************** *** 868,872 **** {\regexp{[-+]?\e d+}} \lineii{\code{\%e}, \code{\%E}, \code{\%f}, \code{\%g}} ! {\regexp{[-+]?(\e d+(\e.\e d*)?|\e d*\e.\e d+)([eE]\e d+)?}} \lineii{\code{\%i}} {\regexp{[-+]?(0[xX][\e dA-Fa-f]+|0[0-7]*|\e d+)}} --- 868,872 ---- {\regexp{[-+]?\e d+}} \lineii{\code{\%e}, \code{\%E}, \code{\%f}, \code{\%g}} ! {\regexp{[-+]?(\e d+(\e.\e d*)?|\e d*\e.\e d+)([eE][-+]?\e d+)?}} \lineii{\code{\%i}} {\regexp{[-+]?(0[xX][\e dA-Fa-f]+|0[0-7]*|\e d+)}} From rhettinger at users.sourceforge.net Mon Sep 8 19:14:02 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 9 02:35:54 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex, 1.143.8.3, 1.143.8.4 Message-ID: <E19wX50-0005ik-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv21929 Modified Files: Tag: release23-maint libfuncs.tex Log Message: SF bug #560286: Add docs for 'basestring' Index: libfuncs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v retrieving revision 1.143.8.3 retrieving revision 1.143.8.4 diff -C2 -d -r1.143.8.3 -r1.143.8.4 *** libfuncs.tex 6 Sep 2003 05:48:07 -0000 1.143.8.3 --- libfuncs.tex 9 Sep 2003 01:13:59 -0000 1.143.8.4 *************** *** 81,84 **** --- 81,93 ---- \end{funcdesc} + \begin{funcdesc}{basestring}{} + This abstract type is the superclass for \class{str} and \class{unicode}. + It cannot be called or instantiated, but it can be used to test whether + an object is an instance of \class{str} or \class{unicode}. + \code{isinstance(obj, basestring)} is equivalent to + \code{isinstance(obj, (str, unicode))}. + \versionadded{2.3} + \end{funcdesc} + \begin{funcdesc}{bool}{\optional{x}} Convert a value to a Boolean, using the standard truth testing From rhettinger at users.sourceforge.net Mon Sep 8 19:32:18 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 9 02:43:26 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libre.tex, 1.101.8.2, 1.101.8.3 Message-ID: <E19wXMg-0006Z6-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv25211 Modified Files: Tag: release23-maint libre.tex Log Message: SF #801306: Bad RE in scanf example Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.101.8.2 retrieving revision 1.101.8.3 diff -C2 -d -r1.101.8.2 -r1.101.8.3 *** libre.tex 31 Aug 2003 05:30:18 -0000 1.101.8.2 --- libre.tex 9 Sep 2003 01:32:16 -0000 1.101.8.3 *************** *** 868,872 **** {\regexp{[-+]?\e d+}} \lineii{\code{\%e}, \code{\%E}, \code{\%f}, \code{\%g}} ! {\regexp{[-+]?(\e d+(\e.\e d*)?|\e d*\e.\e d+)([eE]\e d+)?}} \lineii{\code{\%i}} {\regexp{[-+]?(0[xX][\e dA-Fa-f]+|0[0-7]*|\e d+)}} --- 868,872 ---- {\regexp{[-+]?\e d+}} \lineii{\code{\%e}, \code{\%E}, \code{\%f}, \code{\%g}} ! {\regexp{[-+]?(\e d+(\e.\e d*)?|\e d*\e.\e d+)([eE][-+]?\e d+)?}} \lineii{\code{\%i}} {\regexp{[-+]?(0[xX][\e dA-Fa-f]+|0[0-7]*|\e d+)}} From rhettinger at users.sourceforge.net Mon Sep 8 19:12:20 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 9 02:55:34 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.147,1.148 Message-ID: <E19wX3M-0005en-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv21687 Modified Files: libfuncs.tex Log Message: SF bug #560286: Add docs for 'basestring' Index: libfuncs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v retrieving revision 1.147 retrieving revision 1.148 diff -C2 -d -r1.147 -r1.148 *** libfuncs.tex 6 Sep 2003 05:47:31 -0000 1.147 --- libfuncs.tex 9 Sep 2003 01:12:18 -0000 1.148 *************** *** 81,84 **** --- 81,93 ---- \end{funcdesc} + \begin{funcdesc}{basestring}{} + This abstract type is the superclass for \class{str} and \class{unicode}. + It cannot be called or instantiated, but it can be used to test whether + an object is an instance of \class{str} or \class{unicode}. + \code{isinstance(obj, basestring)} is equivalent to + \code{isinstance(obj, (str, unicode))}. + \versionadded{2.3} + \end{funcdesc} + \begin{funcdesc}{bool}{\optional{x}} Convert a value to a Boolean, using the standard truth testing From fdrake at users.sourceforge.net Tue Sep 9 13:49:20 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 9 15:49:24 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libpickle.tex,1.43,1.44 Message-ID: <E19woUK-0007ju-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv29740 Modified Files: libpickle.tex Log Message: end-of-sentence punctuation comes *before* \footnote, not after Index: libpickle.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** libpickle.tex 12 Aug 2003 00:01:15 -0000 1.43 --- libpickle.tex 9 Sep 2003 19:49:18 -0000 1.44 *************** *** 321,325 **** corresponding \class{Unpickler} instance. If the same object is pickled by multiple \method{dump()} calls, the \method{load()} will ! all yield references to the same object\footnote{\emph{Warning}: this is intended for pickling multiple objects without intervening modifications to the objects or their parts. If you modify an object --- 321,325 ---- corresponding \class{Unpickler} instance. If the same object is pickled by multiple \method{dump()} calls, the \method{load()} will ! all yield references to the same object.\footnote{\emph{Warning}: this is intended for pickling multiple objects without intervening modifications to the objects or their parts. If you modify an object *************** *** 329,333 **** There are two problems here: (1) detecting changes, and (2) marshalling a minimal set of changes. Garbage Collection may also ! become a problem here.}. \class{Unpickler} objects are defined as: --- 329,333 ---- There are two problems here: (1) detecting changes, and (2) marshalling a minimal set of changes. Garbage Collection may also ! become a problem here.} \class{Unpickler} objects are defined as: *************** *** 403,409 **** attributes are pickled. Thus the defining module must be importable in the unpickling environment, and the module must contain the named ! object, otherwise an exception will be raised\footnote{The exception raised will likely be an \exception{ImportError} or an ! \exception{AttributeError} but it could be something else.}. Similarly, classes are pickled by named reference, so the same --- 403,409 ---- attributes are pickled. Thus the defining module must be importable in the unpickling environment, and the module must contain the named ! object, otherwise an exception will be raised.\footnote{The exception raised will likely be an \exception{ImportError} or an ! \exception{AttributeError} but it could be something else.} Similarly, classes are pickled by named reference, so the same *************** *** 473,478 **** Upon unpickling, if the class also defines the method \method{__setstate__()}, it is called with the unpickled ! state\footnote{These methods can also be used to implement copying ! class instances.}. If there is no \method{__setstate__()} method, the pickled state must be a dictionary and its items are assigned to the new instance's dictionary. If a class defines both --- 473,478 ---- Upon unpickling, if the class also defines the method \method{__setstate__()}, it is called with the unpickled ! state.\footnote{These methods can also be used to implement copying ! class instances.} If there is no \method{__setstate__()} method, the pickled state must be a dictionary and its items are assigned to the new instance's dictionary. If a class defines both *************** *** 553,557 **** The resolution of such names is not defined by the \module{pickle} module; it will delegate this resolution to user defined functions on ! the pickler and unpickler\footnote{The actual mechanism for associating these user defined functions is slightly different for \module{pickle} and \module{cPickle}. The description given here --- 553,557 ---- The resolution of such names is not defined by the \module{pickle} module; it will delegate this resolution to user defined functions on ! the pickler and unpickler.\footnote{The actual mechanism for associating these user defined functions is slightly different for \module{pickle} and \module{cPickle}. The description given here *************** *** 559,563 **** module could also use subclassing to effect the same results, overriding the \method{persistent_id()} and \method{persistent_load()} ! methods in the derived classes.}. To define external persistent id resolution, you need to set the --- 559,563 ---- module could also use subclassing to effect the same results, overriding the \method{persistent_id()} and \method{persistent_load()} ! methods in the derived classes.} To define external persistent id resolution, you need to set the *************** *** 633,638 **** functionality exists so that a pickle data stream can be ``sniffed'' for object references without actually instantiating all the objects ! in a pickle\footnote{We'll leave you with the image of Guido and Jim ! sitting around sniffing pickles in their living rooms.}. Setting \member{persistent_load} to a list is usually used in conjunction with the \method{noload()} method on the Unpickler. --- 633,638 ---- functionality exists so that a pickle data stream can be ``sniffed'' for object references without actually instantiating all the objects ! in a pickle.\footnote{We'll leave you with the image of Guido and Jim ! sitting around sniffing pickles in their living rooms.} Setting \member{persistent_load} to a list is usually used in conjunction with the \method{noload()} method on the Unpickler. *************** *** 653,657 **** are subject to change in future versions of Python. We intend to someday provide a common interface for controlling this behavior, ! which will work in either \module{pickle} or \module{cPickle}.}. In the \module{pickle} module, you need to derive a subclass from --- 653,657 ---- are subject to change in future versions of Python. We intend to someday provide a common interface for controlling this behavior, ! which will work in either \module{pickle} or \module{cPickle}.} In the \module{pickle} module, you need to derive a subclass from *************** *** 791,800 **** \module{cPickle} are identical, so it is possible to use \module{pickle} and \module{cPickle} interchangeably with existing ! pickles\footnote{Since the pickle data format is actually a tiny stack-oriented programming language, and some freedom is taken in the encodings of certain objects, it is possible that the two modules produce different data streams for the same input objects. However it is guaranteed that they will always be able to read each other's ! data streams.}. There are additional minor differences in API between \module{cPickle} --- 791,800 ---- \module{cPickle} are identical, so it is possible to use \module{pickle} and \module{cPickle} interchangeably with existing ! pickles.\footnote{Since the pickle data format is actually a tiny stack-oriented programming language, and some freedom is taken in the encodings of certain objects, it is possible that the two modules produce different data streams for the same input objects. However it is guaranteed that they will always be able to read each other's ! data streams.} There are additional minor differences in API between \module{cPickle} From rhettinger at users.sourceforge.net Tue Sep 9 18:11:31 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 9 20:11:37 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex,1.129,1.130 Message-ID: <E19wsa3-0005BS-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv19908 Modified Files: libos.tex Log Message: Fix typo. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** libos.tex 8 Sep 2003 18:52:18 -0000 1.129 --- libos.tex 10 Sep 2003 00:11:28 -0000 1.130 *************** *** 1081,1085 **** When \var{topdown} is true, the caller can modify the \var{dirnames} list ! in-place (perhaps unsing \keyword{del} or slice assignment), and \function{walk()} will only recurse into the subdirectories whose names remain in \var{dirnames}; this can be used to prune the search, --- 1081,1085 ---- When \var{topdown} is true, the caller can modify the \var{dirnames} list ! in-place (perhaps using \keyword{del} or slice assignment), and \function{walk()} will only recurse into the subdirectories whose names remain in \var{dirnames}; this can be used to prune the search, From rhettinger at users.sourceforge.net Tue Sep 9 18:12:32 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 9 20:12:34 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex, 1.127.10.2, 1.127.10.3 Message-ID: <E19wsb2-0005Ej-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv20113 Modified Files: Tag: release23-maint libos.tex Log Message: Fix typo. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.127.10.2 retrieving revision 1.127.10.3 diff -C2 -d -r1.127.10.2 -r1.127.10.3 *** libos.tex 8 Sep 2003 18:55:01 -0000 1.127.10.2 --- libos.tex 10 Sep 2003 00:12:29 -0000 1.127.10.3 *************** *** 1081,1085 **** When \var{topdown} is true, the caller can modify the \var{dirnames} list ! in-place (perhaps unsing \keyword{del} or slice assignment), and \function{walk()} will only recurse into the subdirectories whose names remain in \var{dirnames}; this can be used to prune the search, --- 1081,1085 ---- When \var{topdown} is true, the caller can modify the \var{dirnames} list ! in-place (perhaps using \keyword{del} or slice assignment), and \function{walk()} will only recurse into the subdirectories whose names remain in \var{dirnames}; this can be used to prune the search, From kbk at users.sourceforge.net Tue Sep 9 20:42:20 2003 From: kbk at users.sourceforge.net (kbk@users.sourceforge.net) Date: Tue Sep 9 22:42:24 2003 Subject: [Python-checkins] python/dist/src/Lib/idlelib idle.py, 1.10, 1.11 rpc.py, 1.26, 1.27 idle, 1.12, NONE Message-ID: <E19wuw0-0004An-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1:/tmp/cvs-serv15420 Modified Files: idle.py rpc.py Removed Files: idle Log Message: Python Bug 775061 1. Remove "idle" script, it lives in Tools/scripts/ now. 2. Remove shebang from idle.py, should be called explicitly. 3. Remove obsolete test code from rpc.py; needs unit test. Index: idle.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/idle.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** idle.py 24 May 2003 21:01:39 -0000 1.10 --- idle.py 10 Sep 2003 02:42:18 -0000 1.11 *************** *** 1,4 **** - #!/usr/bin/python - try: import idlelib.PyShell --- 1,2 ---- Index: rpc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/rpc.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** rpc.py 5 Jun 2003 23:51:28 -0000 1.26 --- rpc.py 10 Sep 2003 02:42:18 -0000 1.27 *************** *** 593,667 **** return value - # - # Self Test - # - - def testServer(addr): - # XXX 25 Jul 02 KBK needs update to use rpc.py register/unregister methods - class RemotePerson: - def __init__(self,name): - self.name = name - def greet(self, name): - print "(someone called greet)" - print "Hello %s, I am %s." % (name, self.name) - print - def getName(self): - print "(someone called getName)" - print - return self.name - def greet_this_guy(self, name): - print "(someone called greet_this_guy)" - print "About to greet %s ..." % name - remote_guy = self.server.current_handler.get_remote_proxy(name) - remote_guy.greet("Thomas Edison") - print "Done." - print - - person = RemotePerson("Thomas Edison") - svr = RPCServer(addr) - svr.register('thomas', person) - person.server = svr # only required if callbacks are used - - # svr.serve_forever() - svr.handle_request() # process once only - - def testClient(addr): - "demonstrates RPC Client" - # XXX 25 Jul 02 KBK needs update to use rpc.py register/unregister methods - import time - clt=RPCClient(addr) - thomas = clt.get_remote_proxy("thomas") - print "The remote person's name is ..." - print thomas.getName() - # print clt.remotecall("thomas", "getName", (), {}) - print - time.sleep(1) - print "Getting remote thomas to say hi..." - thomas.greet("Alexander Bell") - #clt.remotecall("thomas","greet",("Alexander Bell",), {}) - print "Done." - print - time.sleep(2) - # demonstrates remote server calling local instance - class LocalPerson: - def __init__(self,name): - self.name = name - def greet(self, name): - print "You've greeted me!" - def getName(self): - return self.name - person = LocalPerson("Alexander Bell") - clt.register("alexander",person) - thomas.greet_this_guy("alexander") - # clt.remotecall("thomas","greet_this_guy",("alexander",), {}) - - def test(): - addr=(LOCALHOST, 8833) - if len(sys.argv) == 2: - if sys.argv[1]=='-server': - testServer(addr) - return - testClient(addr) ! if __name__ == '__main__': ! test() --- 593,597 ---- return value ! # XXX KBK 09Sep03 We need a proper unit test for this module. Previously ! # existing test code was removed at Rev 1.27. --- idle DELETED --- From rhettinger at users.sourceforge.net Tue Sep 9 21:31:49 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 9 23:31:52 2003 Subject: [Python-checkins] python/dist/src/Lib/logging config.py, 1.7, 1.7.10.1 Message-ID: <E19wvht-0006B2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/logging In directory sc8-pr-cvs1:/tmp/cvs-serv23703/Lib/logging Modified Files: Tag: release23-maint config.py Log Message: SF #792649: RESET_ERROR is not defined(logging module) Index: config.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/logging/config.py,v retrieving revision 1.7 retrieving revision 1.7.10.1 diff -C2 -d -r1.7 -r1.7.10.1 *** config.py 2 Mar 2003 20:47:29 -0000 1.7 --- config.py 10 Sep 2003 03:31:46 -0000 1.7.10.1 *************** *** 33,36 **** --- 33,40 ---- DEFAULT_LOGGING_CONFIG_PORT = 9030 + if sys.platform == "win32": + RESET_ERROR = 10054 #WSAECONNRESET + else: + RESET_ERROR = 104 #ECONNRESET # From rhettinger at users.sourceforge.net Tue Sep 9 21:31:49 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 9 23:31:57 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.38,1.831.4.39 Message-ID: <E19wvht-0006B7-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv23703/Misc Modified Files: Tag: release23-maint NEWS Log Message: SF #792649: RESET_ERROR is not defined(logging module) Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.38 retrieving revision 1.831.4.39 diff -C2 -d -r1.831.4.38 -r1.831.4.39 *** NEWS 8 Sep 2003 18:43:46 -0000 1.831.4.38 --- NEWS 10 Sep 2003 03:31:47 -0000 1.831.4.39 *************** *** 48,51 **** --- 48,53 ---- ------- + - Bug #792649: logging.ConfigStreamHandler had an uninitialized variable + - The csv module's DictReader and DictWriter classes now accept keyword arguments. This was an omission in the initial implementation. From rhettinger at users.sourceforge.net Tue Sep 9 21:54:52 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 9 23:54:58 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libre.tex,1.104,1.105 Message-ID: <E19ww4C-0007G3-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv27832 Modified Files: libre.tex Log Message: SF patch #800899: Making "|" directive from REs a bit clearer. Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** libre.tex 9 Sep 2003 01:30:13 -0000 1.104 --- libre.tex 10 Sep 2003 03:54:50 -0000 1.105 *************** *** 187,198 **** creates a regular expression that will match either A or B. An arbitrary number of REs can be separated by the \character{|} in this ! way. This can be used inside groups (see below) as well. REs ! separated by \character{|} are tried from left to right, and the first ! one that allows the complete pattern to match is considered the ! accepted branch. This means that if \code{A} matches, \code{B} will ! never be tested, even if it would produce a longer overall match. In ! other words, the \character{|} operator is never greedy. To match a ! literal \character{|}, use \regexp{\e|}, or enclose it inside a ! character class, as in \regexp{[|]}. \item[\code{(...)}] Matches whatever regular expression is inside the --- 187,197 ---- creates a regular expression that will match either A or B. An arbitrary number of REs can be separated by the \character{|} in this ! way. This can be used inside groups (see below) as well. As the target ! string is scanned, REs separated by \character{|} are tried from left to ! right. When one pattern completely matches, that branch is accepted. ! This means that once \code{A} matches, \code{B} will not be tested further, ! even if it would produce a longer overall match. In other words, the ! \character{|} operator is never greedy. To match a literal \character{|}, ! use \regexp{\e|}, or enclose it inside a character class, as in \regexp{[|]}. \item[\code{(...)}] Matches whatever regular expression is inside the From rhettinger at users.sourceforge.net Tue Sep 9 21:55:28 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 9 23:55:31 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libre.tex, 1.101.8.3, 1.101.8.4 Message-ID: <E19ww4m-0007IH-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv28029 Modified Files: Tag: release23-maint libre.tex Log Message: SF patch #800899: Making "|" directive from REs a bit clearer. Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.101.8.3 retrieving revision 1.101.8.4 diff -C2 -d -r1.101.8.3 -r1.101.8.4 *** libre.tex 9 Sep 2003 01:32:16 -0000 1.101.8.3 --- libre.tex 10 Sep 2003 03:55:26 -0000 1.101.8.4 *************** *** 187,198 **** creates a regular expression that will match either A or B. An arbitrary number of REs can be separated by the \character{|} in this ! way. This can be used inside groups (see below) as well. REs ! separated by \character{|} are tried from left to right, and the first ! one that allows the complete pattern to match is considered the ! accepted branch. This means that if \code{A} matches, \code{B} will ! never be tested, even if it would produce a longer overall match. In ! other words, the \character{|} operator is never greedy. To match a ! literal \character{|}, use \regexp{\e|}, or enclose it inside a ! character class, as in \regexp{[|]}. \item[\code{(...)}] Matches whatever regular expression is inside the --- 187,197 ---- creates a regular expression that will match either A or B. An arbitrary number of REs can be separated by the \character{|} in this ! way. This can be used inside groups (see below) as well. As the target ! string is scanned, REs separated by \character{|} are tried from left to ! right. When one pattern completely matches, that branch is accepted. ! This means that once \code{A} matches, \code{B} will not be tested further, ! even if it would produce a longer overall match. In other words, the ! \character{|} operator is never greedy. To match a literal \character{|}, ! use \regexp{\e|}, or enclose it inside a character class, as in \regexp{[|]}. \item[\code{(...)}] Matches whatever regular expression is inside the From rhettinger at users.sourceforge.net Tue Sep 9 22:44:32 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Sep 10 00:44:35 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libdbhash.tex,1.5,1.6 Message-ID: <E19wwqG-0000uE-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv3384 Modified Files: libdbhash.tex Log Message: SF bug #802302: Invalid documentation for dbhash. The documentation severely departed for the actual implementation. Index: libdbhash.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdbhash.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** libdbhash.tex 27 Jun 2001 13:49:59 -0000 1.5 --- libdbhash.tex 10 Sep 2003 04:44:29 -0000 1.6 *************** *** 67,87 **** \end{methoddesc} ! \begin{methoddesc}[dbhash]{next}{key} ! Returns the key that follows \var{key} in the traversal. The following code prints every key in the database \code{db}, without having to create a list in memory that contains them all: \begin{verbatim} ! k = db.first() ! while k != None: ! print k ! k = db.next(k) \end{verbatim} \end{methoddesc} ! \begin{methoddesc}[dbhash]{previous}{key} ! Return the key that comes before \var{key} in a forward-traversal of ! the database. In conjunction with \method{last()}, this may be used ! to implement a reverse-order traversal. \end{methoddesc} --- 67,86 ---- \end{methoddesc} ! \begin{methoddesc}[dbhash]{next}{} ! Returns the key next key in a database traversal. The following code prints every key in the database \code{db}, without having to create a list in memory that contains them all: \begin{verbatim} ! print db.first() ! for i in xrange(1, len(d)): ! print db.next() \end{verbatim} \end{methoddesc} ! \begin{methoddesc}[dbhash]{previous}{} ! Returns the previous key in a forward-traversal of the database. ! In conjunction with \method{last()}, this may be used to implement ! a reverse-order traversal. \end{methoddesc} From rhettinger at users.sourceforge.net Tue Sep 9 22:45:24 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Sep 10 00:45:27 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libdbhash.tex, 1.5, 1.5.36.1 Message-ID: <E19wwr6-0000wW-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv3615 Modified Files: Tag: release23-maint libdbhash.tex Log Message: SF bug #802302: Invalid documentation for dbhash. The documentation severely departed for the actual implementation. Index: libdbhash.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdbhash.tex,v retrieving revision 1.5 retrieving revision 1.5.36.1 diff -C2 -d -r1.5 -r1.5.36.1 *** libdbhash.tex 27 Jun 2001 13:49:59 -0000 1.5 --- libdbhash.tex 10 Sep 2003 04:45:22 -0000 1.5.36.1 *************** *** 67,87 **** \end{methoddesc} ! \begin{methoddesc}[dbhash]{next}{key} ! Returns the key that follows \var{key} in the traversal. The following code prints every key in the database \code{db}, without having to create a list in memory that contains them all: \begin{verbatim} ! k = db.first() ! while k != None: ! print k ! k = db.next(k) \end{verbatim} \end{methoddesc} ! \begin{methoddesc}[dbhash]{previous}{key} ! Return the key that comes before \var{key} in a forward-traversal of ! the database. In conjunction with \method{last()}, this may be used ! to implement a reverse-order traversal. \end{methoddesc} --- 67,86 ---- \end{methoddesc} ! \begin{methoddesc}[dbhash]{next}{} ! Returns the key next key in a database traversal. The following code prints every key in the database \code{db}, without having to create a list in memory that contains them all: \begin{verbatim} ! print db.first() ! for i in xrange(1, len(d)): ! print db.next() \end{verbatim} \end{methoddesc} ! \begin{methoddesc}[dbhash]{previous}{} ! Returns the previous key in a forward-traversal of the database. ! In conjunction with \method{last()}, this may be used to implement ! a reverse-order traversal. \end{methoddesc} From montanaro at users.sourceforge.net Wed Sep 10 10:47:53 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Wed Sep 10 12:47:58 2003 Subject: [Python-checkins] python/dist/src/Lib pydoc.py,1.86,1.87 Message-ID: <E19x88H-0001bI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv6144 Modified Files: pydoc.py Log Message: display link to module docs when it looks like the object module is a core module Index: pydoc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** pydoc.py 27 Jun 2003 15:45:41 -0000 1.86 --- pydoc.py 10 Sep 2003 16:47:51 -0000 1.87 *************** *** 25,28 **** --- 25,36 ---- Run "pydoc -w <name>" to write out the HTML documentation for a module to a file named "<name>.html". + + Module docs for core modules are assumed to be in + + http://www.python.org/doc/current/lib/ + + This can be overridden by setting the PYTHONDOCS environment variable + to a different URL or to a local directory containing the Library + Reference Manual pages. """ *************** *** 296,299 **** --- 304,334 ---- docmodule = docclass = docroutine = docother = fail + def getdocloc(self, object): + """Return the location of module docs or None""" + + try: + file = inspect.getabsfile(object) + except TypeError: + file = '(built-in)' + + docloc = os.environ.get("PYTHONDOCS", + "http://www.python.org/doc/current/lib") + basedir = os.path.join(sys.exec_prefix, "lib", + "python"+sys.version[0:3]) + if (isinstance(object, type(os)) and + (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', + 'marshal', 'posix', 'signal', 'sys', + 'thread', 'zipimport') or + (file.startswith(basedir) and + not file.startswith(os.path.join(basedir, 'site-packages'))))): + if docloc.startswith("http://"): + docloc = (docloc.rstrip("/") + + "/module-%s.html" % object.__name__) + else: + docloc = os.path.join(docloc, "module-%s.html" % name) + else: + docloc = None + return docloc + # -------------------------------------------- HTML documentation generator *************** *** 536,541 **** if info: head = head + ' (%s)' % join(info, ', ') result = self.heading( ! head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink) modules = inspect.getmembers(object, inspect.ismodule) --- 571,582 ---- if info: head = head + ' (%s)' % join(info, ', ') + docloc = self.getdocloc(object) + if docloc is not None: + docloc = '<br><a href="%(docloc)s">Module Docs</a>' % locals() + else: + docloc = '' result = self.heading( ! head, '#ffffff', '#7799ee', ! '<a href=".">index</a><br>' + filelink + docloc) modules = inspect.getmembers(object, inspect.ismodule) *************** *** 951,954 **** --- 992,1000 ---- file = '(built-in)' result = result + self.section('FILE', file) + + docloc = self.getdocloc(object) + if docloc is not None: + result = result + self.section('MODULE DOCS', docloc) + if desc: result = result + self.section('DESCRIPTION', desc) From rhettinger at users.sourceforge.net Wed Sep 10 12:45:20 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Sep 10 14:45:24 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libre.tex,1.105,1.106 Message-ID: <E19x9xw-0008NG-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv32079 Modified Files: libre.tex Log Message: SF bug #803842: Wrong description of regexp concatenation Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** libre.tex 10 Sep 2003 03:54:50 -0000 1.105 --- libre.tex 10 Sep 2003 18:45:12 -0000 1.106 *************** *** 52,59 **** Regular expressions can be concatenated to form new regular expressions; if \emph{A} and \emph{B} are both regular expressions, ! then \emph{AB} is also a regular expression. If a string \emph{p} ! matches A and another string \emph{q} matches B, the string \emph{pq} ! will match AB if \emph{A} and \emph{B} do no specify boundary ! conditions that are no longer satisfied by \emph{pq}. Thus, complex expressions can easily be constructed from simpler primitive expressions like the ones described here. For details of the theory --- 52,60 ---- Regular expressions can be concatenated to form new regular expressions; if \emph{A} and \emph{B} are both regular expressions, ! then \emph{AB} is also a regular expression. In general, if a string ! \emph{p} matches \emph{A} and another string \emph{q} matches \emph{B}, ! the string \emph{pq} will match AB. This holds unless \emph{A} or ! \emph{B} contain low precedence operations; boundary conditions between ! \emph{A} and \emph{B}; or have numbered group references. Thus, complex expressions can easily be constructed from simpler primitive expressions like the ones described here. For details of the theory From rhettinger at users.sourceforge.net Wed Sep 10 12:45:57 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Sep 10 14:46:06 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libre.tex, 1.101.8.4, 1.101.8.5 Message-ID: <E19x9yX-0008Pj-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv32304 Modified Files: Tag: release23-maint libre.tex Log Message: SF bug #803842: Wrong description of regexp concatenation Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.101.8.4 retrieving revision 1.101.8.5 diff -C2 -d -r1.101.8.4 -r1.101.8.5 *** libre.tex 10 Sep 2003 03:55:26 -0000 1.101.8.4 --- libre.tex 10 Sep 2003 18:45:55 -0000 1.101.8.5 *************** *** 52,59 **** Regular expressions can be concatenated to form new regular expressions; if \emph{A} and \emph{B} are both regular expressions, ! then \emph{AB} is also a regular expression. If a string \emph{p} ! matches A and another string \emph{q} matches B, the string \emph{pq} ! will match AB if \emph{A} and \emph{B} do no specify boundary ! conditions that are no longer satisfied by \emph{pq}. Thus, complex expressions can easily be constructed from simpler primitive expressions like the ones described here. For details of the theory --- 52,60 ---- Regular expressions can be concatenated to form new regular expressions; if \emph{A} and \emph{B} are both regular expressions, ! then \emph{AB} is also a regular expression. In general, if a string ! \emph{p} matches \emph{A} and another string \emph{q} matches \emph{B}, ! the string \emph{pq} will match AB. This holds unless \emph{A} or ! \emph{B} contain low precedence operations; boundary conditions between ! \emph{A} and \emph{B}; or have numbered group references. Thus, complex expressions can easily be constructed from simpler primitive expressions like the ones described here. For details of the theory From rhettinger at users.sourceforge.net Wed Sep 10 12:54:51 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Sep 10 14:54:55 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libcsv.tex,1.8,1.9 Message-ID: <E19xA79-0000ZC-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv2128 Modified Files: libcsv.tex Log Message: SF bug #803679: Missing section number in csv module documentation Index: libcsv.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcsv.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** libcsv.tex 31 Aug 2003 05:44:54 -0000 1.8 --- libcsv.tex 10 Sep 2003 18:54:49 -0000 1.9 *************** *** 64,68 **** given to override individual formatting parameters in the current dialect. For more information about the dialect and formatting ! parameters, see section~\ref{fmt-params}, ``Dialects and Formatting Parameters'' for details of these parameters. --- 64,68 ---- given to override individual formatting parameters in the current dialect. For more information about the dialect and formatting ! parameters, see section~\ref{csv-fmt-params}, ``Dialects and Formatting Parameters'' for details of these parameters. *************** *** 85,89 **** formatting parameters in the current dialect. For more information about the dialect and formatting parameters, see ! section~\ref{fmt-params}, ``Dialects and Formatting Parameters'' for details of these parameters. To make it as easy as possible to interface with modules which implement the DB API, the value --- 85,89 ---- formatting parameters in the current dialect. For more information about the dialect and formatting parameters, see ! section~\ref{csv-fmt-params}, ``Dialects and Formatting Parameters'' for details of these parameters. To make it as easy as possible to interface with modules which implement the DB API, the value From rhettinger at users.sourceforge.net Wed Sep 10 12:57:06 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Sep 10 14:57:10 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libcsv.tex, 1.7.8.1, 1.7.8.2 Message-ID: <E19xA9K-0000gM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv2547 Modified Files: Tag: release23-maint libcsv.tex Log Message: SF bug #803679: Missing section number in csv module documentation Index: libcsv.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcsv.tex,v retrieving revision 1.7.8.1 retrieving revision 1.7.8.2 diff -C2 -d -r1.7.8.1 -r1.7.8.2 *** libcsv.tex 31 Aug 2003 05:46:43 -0000 1.7.8.1 --- libcsv.tex 10 Sep 2003 18:57:04 -0000 1.7.8.2 *************** *** 64,68 **** given to override individual formatting parameters in the current dialect. For more information about the dialect and formatting ! parameters, see section~\ref{fmt-params}, ``Dialects and Formatting Parameters'' for details of these parameters. --- 64,68 ---- given to override individual formatting parameters in the current dialect. For more information about the dialect and formatting ! parameters, see section~\ref{csv-fmt-params}, ``Dialects and Formatting Parameters'' for details of these parameters. *************** *** 85,89 **** formatting parameters in the current dialect. For more information about the dialect and formatting parameters, see ! section~\ref{fmt-params}, ``Dialects and Formatting Parameters'' for details of these parameters. To make it as easy as possible to interface with modules which implement the DB API, the value --- 85,89 ---- formatting parameters in the current dialect. For more information about the dialect and formatting parameters, see ! section~\ref{csv-fmt-params}, ``Dialects and Formatting Parameters'' for details of these parameters. To make it as easy as possible to interface with modules which implement the DB API, the value From montanaro at users.sourceforge.net Wed Sep 10 13:04:15 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Wed Sep 10 15:04:19 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libpydoc.tex,1.1,1.2 Message-ID: <E19xAGF-00017N-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv4196/Doc/lib Modified Files: libpydoc.tex Log Message: mention new module doc display feature of pydoc in libref and NEWS Index: libpydoc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpydoc.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** libpydoc.tex 18 Dec 2001 16:31:44 -0000 1.1 --- libpydoc.tex 10 Sep 2003 19:04:13 -0000 1.2 *************** *** 61,62 **** --- 61,67 ---- the module you would get if you started the Python interpreter and typed \samp{import spam}. + + Module docs for core modules are assumed to reside in + {}\url{http://www.python.org/doc/current/lib/}. This can be overridden by + setting the \envvar{PYTHONDOCS} environment variable to a different URL or + to a local directory containing the Library Reference Manual pages. From montanaro at users.sourceforge.net Wed Sep 10 13:04:15 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Wed Sep 10 15:04:23 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.852,1.853 Message-ID: <E19xAGF-00017S-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv4196/Misc Modified Files: NEWS Log Message: mention new module doc display feature of pydoc in libref and NEWS Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.852 retrieving revision 1.853 diff -C2 -d -r1.852 -r1.853 *** NEWS 7 Sep 2003 03:30:16 -0000 1.852 --- NEWS 10 Sep 2003 19:04:13 -0000 1.853 *************** *** 63,66 **** --- 63,71 ---- ----------- + - The pydoc script will display a link to the module documentation for + modules determined to be part of the core distribution. The documentation + base directory defaults to http://www.python.org/doc/current/lib/ but can + be changed by setting the PYTHONDOCS environment variable. + - texcheck.py now detects double word errors. From bcannon at users.sourceforge.net Wed Sep 10 13:37:44 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Wed Sep 10 15:37:48 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libselect.tex,1.21,1.22 Message-ID: <E19xAme-0003J6-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv12455/Doc/lib Modified Files: libselect.tex Log Message: select.select() now accepts a sequence (as defined by PySequence_Fast()) for its first three arguments. Closes RFE #798046 . Index: libselect.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libselect.tex,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** libselect.tex 29 Apr 2003 13:56:40 -0000 1.21 --- libselect.tex 10 Sep 2003 19:37:42 -0000 1.22 *************** *** 33,42 **** \begin{funcdesc}{select}{iwtd, owtd, ewtd\optional{, timeout}} This is a straightforward interface to the \UNIX{} \cfunction{select()} ! system call. The first three arguments are lists of `waitable objects': either integers representing file descriptors or objects with a parameterless method named \method{fileno()} returning ! such an integer. The three lists of waitable objects are for input, ! output and `exceptional conditions', respectively. Empty lists are ! allowed, but acceptance of three empty lists is platform-dependent. (It is known to work on \UNIX{} but not on Windows.) The optional \var{timeout} argument specifies a time-out as a floating point number --- 33,42 ---- \begin{funcdesc}{select}{iwtd, owtd, ewtd\optional{, timeout}} This is a straightforward interface to the \UNIX{} \cfunction{select()} ! system call. The first three arguments are sequences of `waitable objects': either integers representing file descriptors or objects with a parameterless method named \method{fileno()} returning ! such an integer. The three sequences of waitable objects are for input, ! output and `exceptional conditions', respectively. Empty sequences are ! allowed, but acceptance of three empty sequences is platform-dependent. (It is known to work on \UNIX{} but not on Windows.) The optional \var{timeout} argument specifies a time-out as a floating point number *************** *** 50,54 **** returned. ! Among the acceptable object types in the lists are Python file objects (e.g. \code{sys.stdin}, or objects returned by \function{open()} or \function{os.popen()}), socket objects --- 50,54 ---- returned. ! Among the acceptable object types in the sequences are Python file objects (e.g. \code{sys.stdin}, or objects returned by \function{open()} or \function{os.popen()}), socket objects From bcannon at users.sourceforge.net Wed Sep 10 13:37:45 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Wed Sep 10 15:37:56 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.853,1.854 Message-ID: <E19xAmf-0003JH-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv12455/Misc Modified Files: NEWS Log Message: select.select() now accepts a sequence (as defined by PySequence_Fast()) for its first three arguments. Closes RFE #798046 . Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.853 retrieving revision 1.854 diff -C2 -d -r1.853 -r1.854 *** NEWS 10 Sep 2003 19:04:13 -0000 1.853 --- NEWS 10 Sep 2003 19:37:42 -0000 1.854 *************** *** 25,28 **** --- 25,30 ---- ----------------- + - select.select() now accepts sequences for its first three arguments. + - cStringIO now supports the f.closed attribute. From bcannon at users.sourceforge.net Wed Sep 10 13:37:45 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Wed Sep 10 15:38:01 2003 Subject: [Python-checkins] python/dist/src/Modules selectmodule.c,2.73,2.74 Message-ID: <E19xAmf-0003JO-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv12455/Modules Modified Files: selectmodule.c Log Message: select.select() now accepts a sequence (as defined by PySequence_Fast()) for its first three arguments. Closes RFE #798046 . Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.73 retrieving revision 2.74 diff -C2 -d -r2.73 -r2.74 *** selectmodule.c 11 Feb 2003 17:18:58 -0000 2.73 --- selectmodule.c 10 Sep 2003 19:37:42 -0000 2.74 *************** *** 76,85 **** */ static int ! list2set(PyObject *list, fd_set *set, pylist fd2obj[FD_SETSIZE + 1]) { int i; int max = -1; int index = 0; ! int len = PyList_Size(list); PyObject* o = NULL; --- 76,86 ---- */ static int ! seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1]) { int i; int max = -1; int index = 0; ! int len = -1; ! PyObject* fast_seq = NULL; PyObject* o = NULL; *************** *** 87,95 **** FD_ZERO(set); for (i = 0; i < len; i++) { SOCKET v; /* any intervening fileno() calls could decr this refcnt */ ! if (!(o = PyList_GetItem(list, i))) return -1; --- 88,102 ---- FD_ZERO(set); + fast_seq=PySequence_Fast(seq, "arguments 1-3 must be sequences"); + if (!fast_seq) + return -1; + + len = PySequence_Fast_GET_SIZE(fast_seq); + for (i = 0; i < len; i++) { SOCKET v; /* any intervening fileno() calls could decr this refcnt */ ! if (!(o = PySequence_Fast_GET_ITEM(fast_seq, i))) return -1; *************** *** 122,129 **** --- 129,138 ---- fd2obj[++index].sentinel = -1; } + Py_DECREF(fast_seq); return max+1; finally: Py_XDECREF(o); + Py_DECREF(fast_seq); return -1; } *************** *** 230,242 **** } - /* sanity check first three arguments */ - if (!PyList_Check(ifdlist) || - !PyList_Check(ofdlist) || - !PyList_Check(efdlist)) - { - PyErr_SetString(PyExc_TypeError, - "arguments 1-3 must be lists"); - return NULL; - } #ifdef SELECT_USES_HEAP --- 239,242 ---- *************** *** 252,266 **** } #endif /* SELECT_USES_HEAP */ ! /* Convert lists to fd_sets, and get maximum fd number ! * propagates the Python exception set in list2set() */ rfd2obj[0].sentinel = -1; wfd2obj[0].sentinel = -1; efd2obj[0].sentinel = -1; ! if ((imax=list2set(ifdlist, &ifdset, rfd2obj)) < 0) goto finally; ! if ((omax=list2set(ofdlist, &ofdset, wfd2obj)) < 0) goto finally; ! if ((emax=list2set(efdlist, &efdset, efd2obj)) < 0) goto finally; max = imax; --- 252,266 ---- } #endif /* SELECT_USES_HEAP */ ! /* Convert sequences to fd_sets, and get maximum fd number ! * propagates the Python exception set in seq2set() */ rfd2obj[0].sentinel = -1; wfd2obj[0].sentinel = -1; efd2obj[0].sentinel = -1; ! if ((imax=seq2set(ifdlist, &ifdset, rfd2obj)) < 0) goto finally; ! if ((omax=seq2set(ofdlist, &ofdset, wfd2obj)) < 0) goto finally; ! if ((emax=seq2set(efdlist, &efdset, efd2obj)) < 0) goto finally; max = imax; *************** *** 619,623 **** \n\ Wait until one or more file descriptors are ready for some kind of I/O.\n\ ! The first three arguments are lists of file descriptors to be waited for:\n\ rlist -- wait until ready for reading\n\ wlist -- wait until ready for writing\n\ --- 619,623 ---- \n\ Wait until one or more file descriptors are ready for some kind of I/O.\n\ ! The first three arguments are sequences of file descriptors to be waited for:\n\ rlist -- wait until ready for reading\n\ wlist -- wait until ready for writing\n\ From jhylton at users.sourceforge.net Wed Sep 10 13:57:33 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Wed Sep 10 15:57:42 2003 Subject: [Python-checkins] python/dist/src/Lib/test test__locale.py,1.1,1.2 Message-ID: <E19xB5p-0004SP-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv17121 Modified Files: test__locale.py Log Message: Fix inconsistent mix of tabs and spaces that caused test to fail. Index: test__locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test__locale.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test__locale.py 4 Sep 2003 18:24:46 -0000 1.1 --- test__locale.py 10 Sep 2003 19:57:31 -0000 1.2 *************** *** 18,34 **** setlocale(LC_NUMERIC, loc) except Error: ! continue if verbose: ! print "locale %r" % loc saw_locale = 1 nl_radixchar = nl_langinfo(RADIXCHAR) li_radixchar = localeconv()['decimal_point'] if nl_radixchar != li_radixchar: ! print "%r != %r" % (nl_radixchar, li_radixchar) nl_radixchar = nl_langinfo(THOUSEP) li_radixchar = localeconv()['thousands_sep'] if nl_radixchar != li_radixchar: ! print "%r != %r" % (nl_radixchar, li_radixchar) if not saw_locale: raise ImportError, "None of the listed locales found" - --- 18,33 ---- setlocale(LC_NUMERIC, loc) except Error: ! continue if verbose: ! print "locale %r" % loc saw_locale = 1 nl_radixchar = nl_langinfo(RADIXCHAR) li_radixchar = localeconv()['decimal_point'] if nl_radixchar != li_radixchar: ! print "%r != %r" % (nl_radixchar, li_radixchar) nl_radixchar = nl_langinfo(THOUSEP) li_radixchar = localeconv()['thousands_sep'] if nl_radixchar != li_radixchar: ! print "%r != %r" % (nl_radixchar, li_radixchar) if not saw_locale: raise ImportError, "None of the listed locales found" From jhylton at users.sourceforge.net Wed Sep 10 14:19:56 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Wed Sep 10 16:20:00 2003 Subject: [Python-checkins] python/dist/src/Lib/test test__locale.py,1.2,1.3 Message-ID: <E19xBRU-0005hO-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv21903 Modified Files: test__locale.py Log Message: Oops. Really fix the indentation problem this time. Index: test__locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test__locale.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test__locale.py 10 Sep 2003 19:57:31 -0000 1.2 --- test__locale.py 10 Sep 2003 20:19:54 -0000 1.3 *************** *** 4,33 **** candidate_locales = ['es_UY', 'fr_FR', 'fi_FI', 'es_CO', 'pt_PT', 'it_IT', ! 'et_EE', 'es_PY', 'no_NO', 'nl_NL', 'lv_LV', 'el_GR', 'be_BY', 'fr_BE', ! 'ro_RO', 'ru_UA', 'ru_RU', 'es_VE', 'ca_ES', 'se_NO', 'es_EC', 'id_ID', ! 'ka_GE', 'es_CL', 'hu_HU', 'wa_BE', 'lt_LT', 'sl_SI', 'hr_HR', 'es_AR', ! 'es_ES', 'oc_FR', 'gl_ES', 'bg_BG', 'is_IS', 'mk_MK', 'de_AT', 'pt_BR', ! 'da_DK', 'nn_NO', 'cs_CZ', 'de_LU', 'es_BO', 'sq_AL', 'sk_SK', 'fr_CH', ! 'de_DE', 'sr_YU', 'br_FR', 'nl_BE', 'sv_FI', 'pl_PL', 'fr_CA', 'fo_FO', ! 'bs_BA', 'fr_LU', 'kl_GL', 'fa_IR', 'de_BE', 'sv_SE', 'it_CH', 'uk_UA', ! 'eu_ES', 'vi_VN', 'af_ZA', 'nb_NO', 'en_DK', 'tg_TJ'] saw_locale = 0 for loc in candidate_locales: try: ! setlocale(LC_NUMERIC, loc) except Error: ! continue if verbose: ! print "locale %r" % loc saw_locale = 1 nl_radixchar = nl_langinfo(RADIXCHAR) li_radixchar = localeconv()['decimal_point'] if nl_radixchar != li_radixchar: ! print "%r != %r" % (nl_radixchar, li_radixchar) nl_radixchar = nl_langinfo(THOUSEP) li_radixchar = localeconv()['thousands_sep'] if nl_radixchar != li_radixchar: ! print "%r != %r" % (nl_radixchar, li_radixchar) if not saw_locale: raise ImportError, "None of the listed locales found" --- 4,33 ---- candidate_locales = ['es_UY', 'fr_FR', 'fi_FI', 'es_CO', 'pt_PT', 'it_IT', ! 'et_EE', 'es_PY', 'no_NO', 'nl_NL', 'lv_LV', 'el_GR', 'be_BY', 'fr_BE', ! 'ro_RO', 'ru_UA', 'ru_RU', 'es_VE', 'ca_ES', 'se_NO', 'es_EC', 'id_ID', ! 'ka_GE', 'es_CL', 'hu_HU', 'wa_BE', 'lt_LT', 'sl_SI', 'hr_HR', 'es_AR', ! 'es_ES', 'oc_FR', 'gl_ES', 'bg_BG', 'is_IS', 'mk_MK', 'de_AT', 'pt_BR', ! 'da_DK', 'nn_NO', 'cs_CZ', 'de_LU', 'es_BO', 'sq_AL', 'sk_SK', 'fr_CH', ! 'de_DE', 'sr_YU', 'br_FR', 'nl_BE', 'sv_FI', 'pl_PL', 'fr_CA', 'fo_FO', ! 'bs_BA', 'fr_LU', 'kl_GL', 'fa_IR', 'de_BE', 'sv_SE', 'it_CH', 'uk_UA', ! 'eu_ES', 'vi_VN', 'af_ZA', 'nb_NO', 'en_DK', 'tg_TJ'] saw_locale = 0 for loc in candidate_locales: try: ! setlocale(LC_NUMERIC, loc) except Error: ! continue if verbose: ! print "locale %r" % loc saw_locale = 1 nl_radixchar = nl_langinfo(RADIXCHAR) li_radixchar = localeconv()['decimal_point'] if nl_radixchar != li_radixchar: ! print "%r != %r" % (nl_radixchar, li_radixchar) nl_radixchar = nl_langinfo(THOUSEP) li_radixchar = localeconv()['thousands_sep'] if nl_radixchar != li_radixchar: ! print "%r != %r" % (nl_radixchar, li_radixchar) if not saw_locale: raise ImportError, "None of the listed locales found" From fdrake at users.sourceforge.net Wed Sep 10 14:47:45 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Sep 10 16:47:48 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libpickle.tex,1.44,1.45 Message-ID: <E19xBsP-0007d2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv29315 Modified Files: libpickle.tex Log Message: - add version annotation for HIGHEST_PROTOCOL - cleaned up some markup Index: libpickle.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** libpickle.tex 9 Sep 2003 19:49:18 -0000 1.44 --- libpickle.tex 10 Sep 2003 20:47:43 -0000 1.45 *************** *** 165,168 **** --- 165,169 ---- The highest protocol version available. This value can be passed as a \var{protocol} value. + \versionadded{2.3} \end{datadesc} *************** *** 256,265 **** The \module{pickle} module also exports two callables\footnote{In the \module{pickle} module these callables are classes, which you could ! subclass to customize the behavior. However, in the \module{cPickle} ! modules these callables are factory functions and so cannot be ! subclassed. One of the common reasons to subclass is to control what objects can actually be unpickled. See section~\ref{pickle-sub} for ! more details.}, \class{Pickler} and ! \class{Unpickler}: \begin{classdesc}{Pickler}{file\optional{, protocol\optional{, bin}}} --- 257,265 ---- The \module{pickle} module also exports two callables\footnote{In the \module{pickle} module these callables are classes, which you could ! subclass to customize the behavior. However, in the \refmodule{cPickle} ! module these callables are factory functions and so cannot be ! subclassed. One common reason to subclass is to control what objects can actually be unpickled. See section~\ref{pickle-sub} for ! more details.}, \class{Pickler} and \class{Unpickler}: \begin{classdesc}{Pickler}{file\optional{, protocol\optional{, bin}}} From fdrake at users.sourceforge.net Wed Sep 10 14:50:08 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Sep 10 16:50:11 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libpickle.tex, 1.42.10.1, 1.42.10.2 Message-ID: <E19xBui-0007mL-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv29890 Modified Files: Tag: release23-maint libpickle.tex Log Message: - add version annotation for HIGHEST_PROTOCOL - cleaned up some markup Index: libpickle.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v retrieving revision 1.42.10.1 retrieving revision 1.42.10.2 diff -C2 -d -r1.42.10.1 -r1.42.10.2 *** libpickle.tex 11 Aug 2003 23:43:04 -0000 1.42.10.1 --- libpickle.tex 10 Sep 2003 20:50:06 -0000 1.42.10.2 *************** *** 165,168 **** --- 165,169 ---- The highest protocol version available. This value can be passed as a \var{protocol} value. + \versionadded{2.3} \end{datadesc} *************** *** 254,265 **** \end{excdesc} ! The \module{pickle} module also exports two callables\footnote{In the \module{pickle} module these callables are classes, which you could ! subclass to customize the behavior. However, in the \module{cPickle} ! modules these callables are factory functions and so cannot be ! subclassed. One of the common reasons to subclass is to control what ! objects can actually be unpickled. See section~\ref{pickle-sub} for ! more details.}, \class{Pickler} and ! \class{Unpickler}: \begin{classdesc}{Pickler}{file\optional{, protocol\optional{, bin}}} --- 255,265 ---- \end{excdesc} ! The \module{pickle} module also exports two callables,\footnote{In the \module{pickle} module these callables are classes, which you could ! subclass to customize the behavior. However, in the ! \refmodule{cPickle} module these callables are factory functions and ! so cannot be subclassed. One common reason to subclass is to control ! what objects can actually be unpickled. See section~\ref{pickle-sub} ! for more details.} \class{Pickler} and \class{Unpickler}: \begin{classdesc}{Pickler}{file\optional{, protocol\optional{, bin}}} From rhettinger at users.sourceforge.net Wed Sep 10 15:13:01 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Sep 10 17:13:07 2003 Subject: [Python-checkins] python/dist/src/Demo/classes Rev.py, 1.3, 1.4 Vec.py, 1.3, 1.4 Message-ID: <E19xCGr-0000kP-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/classes In directory sc8-pr-cvs1:/tmp/cvs-serv2764 Modified Files: Rev.py Vec.py Log Message: SF patch #803449: modernize demo scripts (Contributed by George Yoshida.) Index: Rev.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/classes/Rev.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Rev.py 24 Apr 2003 17:08:24 -0000 1.3 --- Rev.py 10 Sep 2003 21:12:59 -0000 1.4 *************** *** 1,82 **** ! # A class which presents the reverse of a sequence without duplicating it. ! # From: "Steven D. Majewski" <sdm7g@elvis.med.virginia.edu> - # It works on mutable or inmutable sequences. - # - # >>> for c in Rev( 'Hello World!' ) : sys.stdout.write( c ) - # ... else: sys.stdout.write( '\n' ) - # ... - # !dlroW olleH - # - # The .forw is so you can use anonymous sequences in __init__, and still - # keep a reference the forward sequence. ) - # If you give it a non-anonymous mutable sequence, the reverse sequence - # will track the updated values. ( but not reassignment! - another - # good reason to use anonymous values in creating the sequence to avoid - # confusion. Maybe it should be change to copy input sequence to break - # the connection completely ? ) - # - # >>> nnn = range( 0, 3 ) - # >>> rnn = Rev( nnn ) - # >>> for n in rnn: print n - # ... - # 2 - # 1 - # 0 - # >>> for n in range( 4, 6 ): nnn.append( n ) # update nnn - # ... - # >>> for n in rnn: print n # prints reversed updated values - # ... - # 5 - # 4 - # 2 - # 1 - # 0 - # >>> nnn = nnn[1:-1] - # >>> nnn - # [1, 2, 4] - # >>> for n in rnn: print n # prints reversed values of old nnn - # ... - # 5 - # 4 - # 2 - # 1 - # 0 - # >>> - # - # WH = Rev( 'Hello World!' ) - # print WH.forw, WH.back - # nnn = Rev( range( 1, 10 ) ) - # print nnn.forw - # print nnn - # - # produces output: - # - # Hello World! !dlroW olleH - # [1, 2, 3, 4, 5, 6, 7, 8, 9] - # [9, 8, 7, 6, 5, 4, 3, 2, 1] # ! # >>>rrr = Rev( nnn ) ! # >>>rrr ! # <1, 2, 3, 4, 5, 6, 7, 8, 9> - from string import joinfields class Rev: ! def __init__( self, seq ): self.forw = seq self.back = self ! def __len__( self ): ! return len( self.forw ) ! def __getitem__( self, j ): ! return self.forw[ -( j + 1 ) ] ! def __repr__( self ): seq = self.forw ! if type(seq) == type( [] ) : wrap = '[]' sep = ', ' ! elif type(seq) == type( () ) : wrap = '()' sep = ', ' ! elif type(seq) == type( '' ) : wrap = '' sep = '' --- 1,83 ---- ! ''' ! A class which presents the reverse of a sequence without duplicating it. ! From: "Steven D. Majewski" <sdm7g@elvis.med.virginia.edu> ! ! It works on mutable or inmutable sequences. ! ! >>> chars = list(Rev('Hello World!')) ! >>> print ''.join(chars) ! !dlroW olleH ! ! The .forw is so you can use anonymous sequences in __init__, and still ! keep a reference the forward sequence. ) ! If you give it a non-anonymous mutable sequence, the reverse sequence ! will track the updated values. ( but not reassignment! - another ! good reason to use anonymous values in creating the sequence to avoid ! confusion. Maybe it should be change to copy input sequence to break ! the connection completely ? ) ! ! >>> nnn = range(3) ! >>> rnn = Rev(nnn) ! >>> for n in rnn: print n ! ... ! 2 ! 1 ! 0 ! >>> for n in range(4, 6): nnn.append(n) # update nnn ! ... ! >>> for n in rnn: print n # prints reversed updated values ! ... ! 5 ! 4 ! 2 ! 1 ! 0 ! >>> nnn = nnn[1:-1] ! >>> nnn ! [1, 2, 4] ! >>> for n in rnn: print n # prints reversed values of old nnn ! ... ! 5 ! 4 ! 2 ! 1 ! 0 # ! >>> WH = Rev('Hello World!') ! >>> print WH.forw, WH.back ! Hello World! !dlroW olleH ! >>> nnn = Rev(range(1, 10)) ! >>> print nnn.forw ! [1, 2, 3, 4, 5, 6, 7, 8, 9] ! >>> print nnn.back ! [9, 8, 7, 6, 5, 4, 3, 2, 1] ! ! >>> rrr = Rev(nnn) ! >>> rrr ! <1, 2, 3, 4, 5, 6, 7, 8, 9> ! ! ''' class Rev: ! def __init__(self, seq): self.forw = seq self.back = self ! ! def __len__(self): ! return len(self.forw) ! ! def __getitem__(self, j): ! return self.forw[-(j + 1)] ! ! def __repr__(self): seq = self.forw ! if isinstance(seq, list): wrap = '[]' sep = ', ' ! elif isinstance(seq, tuple): wrap = '()' sep = ', ' ! elif isinstance(seq, str): wrap = '' sep = '' *************** *** 84,89 **** wrap = '<>' sep = ', ' ! outstrs = [] ! for item in self.back : ! outstrs.append( str( item ) ) ! return wrap[:1] + joinfields( outstrs, sep ) + wrap[-1:] --- 85,95 ---- wrap = '<>' sep = ', ' ! outstrs = [str(item) for item in self.back] ! return wrap[:1] + sep.join(outstrs) + wrap[-1:] ! ! def _test(): ! import doctest, Rev ! return doctest.testmod(Rev) ! ! if __name__ == "__main__": ! _test() Index: Vec.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/classes/Vec.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Vec.py 24 Apr 2003 17:08:24 -0000 1.3 --- Vec.py 10 Sep 2003 21:12:59 -0000 1.4 *************** *** 3,7 **** def vec(*v): ! return apply(Vec, v) --- 3,7 ---- def vec(*v): ! return Vec(*v) *************** *** 9,27 **** def __init__(self, *v): ! self.v = [] ! for x in v: ! self.v.append(x) ! def fromlist(self, v): ! self.v = [] ! if type(v) <> type([]): raise TypeError self.v = v[:] return self - def __repr__(self): ! return 'vec(' + `self.v`[1:-1] + ')' def __len__(self): --- 9,22 ---- def __init__(self, *v): ! self.v = list(v) def fromlist(self, v): ! if not isinstance(v, list): raise TypeError self.v = v[:] return self def __repr__(self): ! return 'vec(' + repr(self.v)[1:-1] + ')' def __len__(self): *************** *** 31,53 **** return self.v[i] ! def __add__(a, b): # Element-wise addition ! v = [] ! for i in range(len(a)): ! v.append(a[i] + b[i]) return Vec().fromlist(v) ! def __sub__(a, b): # Element-wise subtraction ! v = [] ! for i in range(len(a)): ! v.append(a[i] - b[i]) return Vec().fromlist(v) def __mul__(self, scalar): # Multiply by scalar ! v = [] ! for i in range(len(self.v)): ! v.append(self.v[i]*scalar) return Vec().fromlist(v) --- 26,42 ---- return self.v[i] ! def __add__(self, other): # Element-wise addition ! v = map(lambda x, y: x+y, self, other) return Vec().fromlist(v) ! def __sub__(self, other): # Element-wise subtraction ! v = map(lambda x, y: x-y, self, other) return Vec().fromlist(v) def __mul__(self, scalar): # Multiply by scalar ! v = map(lambda x: x*scalar, self.v) return Vec().fromlist(v) *************** *** 60,63 **** --- 49,53 ---- print b print a+b + print a-b print a*3.0 From fdrake at users.sourceforge.net Wed Sep 10 22:08:49 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 11 00:08:52 2003 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.32,1.33 Message-ID: <E19xIlF-00048Z-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1:/tmp/cvs-serv15897 Modified Files: style.css Log Message: try to fix up the padding inside a notice environment so they fit in a little better, with similar spacing characteristics with the seealso environment Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** style.css 6 Sep 2003 01:10:14 -0000 1.32 --- style.css 11 Sep 2003 04:08:47 -0000 1.33 *************** *** 73,77 **** div.warning { background-color: #fffaf0; border: thin solid black; ! padding: 0.5em; margin-left: 2em; margin-right: 2em; } --- 73,77 ---- div.warning { background-color: #fffaf0; border: thin solid black; ! padding: 1em 1em 0em 1em; margin-left: 2em; margin-right: 2em; } *************** *** 83,87 **** div.note { background-color: #fffaf0; border: thin solid black; ! padding: 0.5em; margin-left: 2em; margin-right: 2em; } --- 83,87 ---- div.note { background-color: #fffaf0; border: thin solid black; ! padding: 1em 1em 0em 1em; margin-left: 2em; margin-right: 2em; } From fdrake at users.sourceforge.net Wed Sep 10 22:14:22 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 11 00:14:27 2003 Subject: [Python-checkins] python/dist/src/Doc/perl l2hinit.perl,1.78,1.79 Message-ID: <E19xIqc-0004N3-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1:/tmp/cvs-serv16798 Modified Files: l2hinit.perl Log Message: remove useless <br/> from the top navigation panel Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** l2hinit.perl 4 Sep 2003 22:21:17 -0000 1.78 --- l2hinit.perl 11 Sep 2003 04:14:20 -0000 1.79 *************** *** 236,240 **** return "\n<div id='top-navigation-panel'>\n" . make_nav_panel() ! . "<br /><hr /></div>\n"; } --- 236,240 ---- return "\n<div id='top-navigation-panel'>\n" . make_nav_panel() ! . "<hr /></div>\n"; } From fdrake at users.sourceforge.net Wed Sep 10 22:28:16 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 11 00:28:19 2003 Subject: [Python-checkins] python/dist/src/Doc/tut tut.tex,1.202,1.203 Message-ID: <E19xJ44-0004uN-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1:/tmp/cvs-serv18860 Modified Files: tut.tex Log Message: - add several links into the library reference - update a couple of URLs to point to more recent portions of python.org Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.202 retrieving revision 1.203 diff -C2 -d -r1.202 -r1.203 *** tut.tex 30 Aug 2003 23:21:32 -0000 1.202 --- tut.tex 11 Sep 2003 04:28:13 -0000 1.203 *************** *** 330,346 **** encoding. The list of possible encodings can be found in the \citetitle[../lib/lib.html]{Python Library Reference}, in the section ! on \module{codecs}. ! If your editor supports saving files as \code{UTF-8} with an UTF-8 ! signature (aka BOM -- Byte Order Mark), you can use that instead of an encoding declaration. IDLE supports this capability if \code{Options/General/Default Source Encoding/UTF-8} is set. Notice that this signature is not understood in older Python releases (2.2 and earlier), and also not understood by the operating system for ! \code{\#!} files. By using UTF-8 (either through the signature or an encoding declaration), characters of most languages in the world can be used ! simultaneously in string literals and comments. Using non-ASCII characters in identifiers is not supported. To display all these characters properly, your editor must recognize that the file is --- 330,346 ---- encoding. The list of possible encodings can be found in the \citetitle[../lib/lib.html]{Python Library Reference}, in the section ! on \ulink{\module{codecs}}{../lib/module-codecs.html}. ! If your editor supports saving files as \code{UTF-8} with a UTF-8 ! \emph{byte order mark} (aka BOM), you can use that instead of an encoding declaration. IDLE supports this capability if \code{Options/General/Default Source Encoding/UTF-8} is set. Notice that this signature is not understood in older Python releases (2.2 and earlier), and also not understood by the operating system for ! \code{\#!} files. By using UTF-8 (either through the signature or an encoding declaration), characters of most languages in the world can be used ! simultaneously in string literals and comments. Using non-\ASCII characters in identifiers is not supported. To display all these characters properly, your editor must recognize that the file is *************** *** 880,884 **** The latter two are variable-length encodings that store each Unicode character in one or more bytes. The default encoding is ! normally set to ASCII, which passes through characters in the range 0 to 127 and rejects any other characters with an error. When a Unicode string is printed, written to a file, or converted --- 880,884 ---- The latter two are variable-length encodings that store each Unicode character in one or more bytes. The default encoding is ! normally set to \ASCII, which passes through characters in the range 0 to 127 and rejects any other characters with an error. When a Unicode string is printed, written to a file, or converted *************** *** 2394,2398 **** attempt to load the script as a module when that module is imported. This will generally be an error. See section~\ref{standardModules}, ! ``Standard Modules.'' for more information. --- 2394,2398 ---- attempt to load the script as a module when that module is imported. This will generally be an error. See section~\ref{standardModules}, ! ``Standard Modules,'' for more information. *************** *** 2460,2466 **** \item ! The module \module{compileall}\refstmodindex{compileall} can create ! \file{.pyc} files (or \file{.pyo} files when \programopt{-O} is used) for ! all modules in a directory. \end{itemize} --- 2460,2467 ---- \item ! The module \ulink{\module{compileall}}{../lib/module-compileall.html}% ! {} \refstmodindex{compileall} can create \file{.pyc} files (or ! \file{.pyo} files when \programopt{-O} is used) for all modules in a ! directory. \end{itemize} *************** *** 2479,2483 **** the \module{amoeba} module is only provided on systems that somehow support Amoeba primitives. One particular module deserves some ! attention: \module{sys}\refstmodindex{sys}, which is built into every Python interpreter. The variables \code{sys.ps1} and \code{sys.ps2} define the strings used as primary and secondary --- 2480,2485 ---- the \module{amoeba} module is only provided on systems that somehow support Amoeba primitives. One particular module deserves some ! attention: \ulink{\module{sys}}{../lib/module-sys.html}% ! \refstmodindex{sys}, which is built into every Python interpreter. The variables \code{sys.ps1} and \code{sys.ps2} define the strings used as primary and secondary *************** *** 2762,2773 **** The submodules often need to refer to each other. For example, the ! \module{surround} module might use the \module{echo} module. In fact, such references ! are so common that the \code{import} statement first looks in the containing package before looking in the standard module search path. Thus, the surround module can simply use \code{import echo} or \code{from echo import echofilter}. If the imported module is not found in the current package (the package of which the current module ! is a submodule), the \code{import} statement looks for a top-level module ! with the given name. When packages are structured into subpackages (as with the --- 2764,2776 ---- The submodules often need to refer to each other. For example, the ! \module{surround} module might use the \module{echo} module. In fact, ! such references ! are so common that the \keyword{import} statement first looks in the containing package before looking in the standard module search path. Thus, the surround module can simply use \code{import echo} or \code{from echo import echofilter}. If the imported module is not found in the current package (the package of which the current module ! is a submodule), the \keyword{import} statement looks for a top-level ! module with the given name. When packages are structured into subpackages (as with the *************** *** 2779,2791 **** Sound.Effects import echo}. - %(One could design a notation to refer to parent packages, similar to - %the use of ".." to refer to the parent directory in \UNIX{} and Windows - %filesystems. In fact, the \module{ni} module, which was the - %ancestor of this package system, supported this using \code{__} for - %the package containing the current module, - %\code{__.__} for the parent package, and so on. This feature was dropped - %because of its awkwardness; since most packages will have a relative - %shallow substructure, this is no big loss.) - \subsection{Packages in Multiple Directories} --- 2782,2785 ---- *************** *** 3124,3128 **** Rather than have users be constantly writing and debugging code to save complicated data types, Python provides a standard module called ! \module{pickle}. This is an amazing module that can take almost any Python object (even some forms of Python code!), and convert it to a string representation; this process is called \dfn{pickling}. --- 3118,3123 ---- Rather than have users be constantly writing and debugging code to save complicated data types, Python provides a standard module called ! \ulink{\module{pickle}}{../lib/module-pickle.html}. This is an ! amazing module that can take almost any Python object (even some forms of Python code!), and convert it to a string representation; this process is called \dfn{pickling}. *************** *** 3149,3158 **** (There are other variants of this, used when pickling many objects or when you don't want to write the pickled data to a file; consult the ! complete documentation for \module{pickle} in the Library Reference.) ! \module{pickle} is the standard way to make Python objects which can ! be stored and reused by other programs or by a future invocation of ! the same program; the technical term for this is a ! \dfn{persistent} object. Because \module{pickle} is so widely used, many authors who write Python extensions take care to ensure that new data types such as matrices can be properly pickled and unpickled. --- 3144,3156 ---- (There are other variants of this, used when pickling many objects or when you don't want to write the pickled data to a file; consult the ! complete documentation for ! \ulink{\module{pickle}}{../lib/module-pickle.html} in the ! \citetitle[../lib/]{Python Library Reference}.) ! \ulink{\module{pickle}}{../lib/module-pickle.html} is the standard way ! to make Python objects which can be stored and reused by other ! programs or by a future invocation of the same program; the technical ! term for this is a \dfn{persistent} object. Because ! \ulink{\module{pickle}}{../lib/module-pickle.html} is so widely used, many authors who write Python extensions take care to ensure that new data types such as matrices can be properly pickled and unpickled. *************** *** 4357,4362 **** bunch of Python-related personal home pages; many people have downloadable software there. Many more user-created Python modules ! can be found in a third-party repository at ! \url{http://www.vex.net/parnassus}. For Python-related questions and problem reports, you can post to the --- 4355,4360 ---- bunch of Python-related personal home pages; many people have downloadable software there. Many more user-created Python modules ! can be found in the \ulink{Python Package ! Index}{http://www.python.org/pypi} (PyPI). For Python-related questions and problem reports, you can post to the *************** *** 4371,4376 **** asking (and answering) questions, suggesting new features, and announcing new modules. Before posting, be sure to check the list of ! Frequently Asked Questions (also called the FAQ), at ! \url{http://www.python.org/doc/FAQ.html}, or look for it in the \file{Misc/} directory of the Python source distribution. Mailing list archives are available at \url{http://www.python.org/pipermail/}. --- 4369,4373 ---- asking (and answering) questions, suggesting new features, and announcing new modules. Before posting, be sure to check the list of ! \ulink{Frequently Asked Questions}{http://www.python.org/doc/faq/} (also called the FAQ), or look for it in the \file{Misc/} directory of the Python source distribution. Mailing list archives are available at \url{http://www.python.org/pipermail/}. *************** *** 4499,4503 **** the interactive commands, and removing the names avoids creating side effects in the interactive environments. You may find it convenient ! to keep some of the imported modules, such as \module{os}, which turn out to be needed in most sessions with the interpreter. --- 4496,4501 ---- the interactive commands, and removing the names avoids creating side effects in the interactive environments. You may find it convenient ! to keep some of the imported modules, such as ! \ulink{\module{os}}{../lib/module-os.html}, which turn out to be needed in most sessions with the interpreter. From fdrake at users.sourceforge.net Thu Sep 11 00:06:29 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 11 02:06:33 2003 Subject: [Python-checkins] python/dist/src/Doc/tut tut.tex,1.203,1.204 Message-ID: <E19xKb7-0000Y5-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1:/tmp/cvs-serv2102 Modified Files: tut.tex Log Message: - added many links into the library reference - removed use of the string module - fixed some broken markup Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.203 retrieving revision 1.204 diff -C2 -d -r1.203 -r1.204 *** tut.tex 11 Sep 2003 04:28:13 -0000 1.203 --- tut.tex 11 Sep 2003 06:06:26 -0000 1.204 *************** *** 658,670 **** \begin{verbatim} - >>> import string >>> 'str' 'ing' # <- This is ok 'string' ! >>> string.strip('str') + 'ing' # <- This is ok 'string' ! >>> string.strip('str') 'ing' # <- This is invalid File "<stdin>", line 1, in ? ! string.strip('str') 'ing' ! ^ SyntaxError: invalid syntax \end{verbatim} --- 658,669 ---- \begin{verbatim} >>> 'str' 'ing' # <- This is ok 'string' ! >>> 'str'.strip() + 'ing' # <- This is ok 'string' ! >>> 'str'.strip() 'ing' # <- This is invalid File "<stdin>", line 1, in ? ! 'str'.strip() 'ing' ! ^ SyntaxError: invalid syntax \end{verbatim} *************** *** 808,811 **** --- 807,825 ---- + \begin{seealso} + \seetitle[../lib/typesseq.html]{Sequence Types}% + {Strings, and the Unicode strings described in the next + section, are examples of \emph{sequence types}, and + support the common operations supported by such types.} + \seetitle[../lib/string-methods.html]{String Methods}% + {Both strings and Unicode strings support a large number of + methods for basic transformations and searching.} + \seetitle[../lib/typesseq-strings.html]{String Formatting Operations}% + {The formatting operations invoked when strings and Unicode + strings are the left operand of the \code{\%} operator are + described in more detail here.} + \end{seealso} + + \subsection{Unicode Strings \label{unicodeStrings}} \sectionauthor{Marc-Andre Lemburg}{mal@lemburg.com} *************** *** 1517,1521 **** When a final formal parameter of the form \code{**\var{name}} is ! present, it receives a dictionary containing all keyword arguments whose keyword doesn't correspond to a formal parameter. This may be combined with a formal parameter of the form --- 1531,1535 ---- When a final formal parameter of the form \code{**\var{name}} is ! present, it receives a \ulink{dictionary}{../lib/typesmapping.html} containing all keyword arguments whose keyword doesn't correspond to a formal parameter. This may be combined with a formal parameter of the form *************** *** 1979,1985 **** We saw that lists and strings have many common properties, such as indexing and slicing operations. They are two examples of ! \emph{sequence} data types. Since Python is an evolving language, ! other sequence data types may be added. There is also another ! standard sequence data type: the \emph{tuple}. A tuple consists of a number of values separated by commas, for --- 1993,2000 ---- We saw that lists and strings have many common properties, such as indexing and slicing operations. They are two examples of ! \ulink{\emph{sequence} data types}{../lib/typesseq.html}. Since ! Python is an evolving language, other sequence data types may be ! added. There is also another standard sequence data type: the ! \emph{tuple}. A tuple consists of a number of values separated by commas, for *************** *** 2051,2055 **** \section{Dictionaries \label{dictionaries}} ! Another useful data type built into Python is the \emph{dictionary}. Dictionaries are sometimes found in other languages as ``associative memories'' or ``associative arrays''. Unlike sequences, which are --- 2066,2071 ---- \section{Dictionaries \label{dictionaries}} ! Another useful data type built into Python is the ! \ulink{\emph{dictionary}}{../lib/typesmapping.html}. Dictionaries are sometimes found in other languages as ``associative memories'' or ``associative arrays''. Unlike sequences, which are *************** *** 2079,2087 **** value using a non-existent key. ! The \code{keys()} method of a dictionary object returns a list of all the keys used in the dictionary, in random order (if you want it ! sorted, just apply the \code{sort()} method to the list of keys). To check whether a single key is in the dictionary, use the ! \code{has_key()} method of the dictionary. Here is a small example using a dictionary: --- 2095,2103 ---- value using a non-existent key. ! The \method{keys()} method of a dictionary object returns a list of all the keys used in the dictionary, in random order (if you want it ! sorted, just apply the \method{sort()} method to the list of keys). To check whether a single key is in the dictionary, use the ! \method{has_key()} method of the dictionary. Here is a small example using a dictionary: *************** *** 2873,2881 **** \begin{verbatim} - >>> import string >>> for x in range(1, 11): ! ... print string.rjust(repr(x), 2), string.rjust(repr(x*x), 3), ... # Note trailing comma on previous line ! ... print string.rjust(repr(x*x*x), 4) ... 1 1 1 --- 2889,2896 ---- \begin{verbatim} >>> for x in range(1, 11): ! ... print repr(x).rjust(2), repr(x*x).rjust(3), ... # Note trailing comma on previous line ! ... print repr(x*x*x).rjust(4) ... 1 1 1 *************** *** 2907,2932 **** \keyword{print} works: it always adds spaces between its arguments.) ! This example demonstrates the function \function{string.rjust()}, which right-justifies a string in a field of a given width by padding ! it with spaces on the left. There are similar functions ! \function{string.ljust()} and \function{string.center()}. These ! functions do not write anything, they just return a new string. If the input string is too long, they don't truncate it, but return it unchanged; this will mess up your column lay-out but that's usually better than the alternative, which would be lying about a value. (If you really want truncation you can always add a slice operation, as in ! \samp{string.ljust(x,~n)[0:n]}.) ! There is another function, \function{string.zfill()}, which pads a numeric string on the left with zeros. It understands about plus and minus signs: \begin{verbatim} ! >>> import string ! >>> string.zfill('12', 5) '00012' ! >>> string.zfill('-3.14', 7) '-003.14' ! >>> string.zfill('3.14159265359', 5) '3.14159265359' \end{verbatim} --- 2922,2946 ---- \keyword{print} works: it always adds spaces between its arguments.) ! This example demonstrates the \method{rjust()} method of string objects, which right-justifies a string in a field of a given width by padding ! it with spaces on the left. There are similar methods ! \method{ljust()} and \method{center()}. These ! methods do not write anything, they just return a new string. If the input string is too long, they don't truncate it, but return it unchanged; this will mess up your column lay-out but that's usually better than the alternative, which would be lying about a value. (If you really want truncation you can always add a slice operation, as in ! \samp{x.ljust(~n)[:n]}.) ! There is another method, \method{zfill()}, which pads a numeric string on the left with zeros. It understands about plus and minus signs: \begin{verbatim} ! >>> '12'.zfill(5) '00012' ! >>> '-3.14'.zfill(7) '-003.14' ! >>> '3.14159265359'.zfill(5) '3.14159265359' \end{verbatim} *************** *** 3111,3115 **** bit more effort, since the \method{read()} method only returns strings, which will have to be passed to a function like ! \function{string.atoi()}, which takes a string like \code{'123'} and returns its numeric value 123. However, when you want to save more complex data types like lists, dictionaries, or class instances, --- 3125,3129 ---- bit more effort, since the \method{read()} method only returns strings, which will have to be passed to a function like ! \function{int()}, which takes a string like \code{'123'} and returns its numeric value 123. However, when you want to save more complex data types like lists, dictionaries, or class instances, *************** *** 3298,3307 **** \begin{verbatim} ! import string, sys try: f = open('myfile.txt') s = f.readline() ! i = int(string.strip(s)) except IOError, (errno, strerror): print "I/O error(%s): %s" % (errno, strerror) --- 3312,3321 ---- \begin{verbatim} ! import sys try: f = open('myfile.txt') s = f.readline() ! i = int(s.strip()) except IOError, (errno, strerror): print "I/O error(%s): %s" % (errno, strerror) *************** *** 4467,4471 **** in your \file{\~{}/.inputrc}. (Of course, this makes it harder to ! type indented continuation lines.) Automatic completion of variable and module names is optionally --- 4481,4486 ---- in your \file{\~{}/.inputrc}. (Of course, this makes it harder to ! type indented continuation lines if you're accustomed to using ! \kbd{Tab} for that purpose.) Automatic completion of variable and module names is optionally From fdrake at users.sourceforge.net Thu Sep 11 12:18:56 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 11 14:19:01 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libtempfile.tex, 1.21, 1.22 Message-ID: <E19xW1w-0006ie-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv25826 Modified Files: libtempfile.tex Log Message: fix markup buglets Index: libtempfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtempfile.tex,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** libtempfile.tex 22 Apr 2003 18:54:53 -0000 1.21 --- libtempfile.tex 11 Sep 2003 18:18:54 -0000 1.22 *************** *** 29,37 **** The module defines the following user-callable functions: ! \begin{funcdesc}{TemporaryFile}{\optional{mode='w+b'} ! \optional{, bufsize=-1} ! \optional{, suffix} ! \optional{, prefix} ! \optional{, dir}} Return a file (or file-like) object that can be used as a temporary storage area. The file is created using \function{mkstemp}. It will --- 29,35 ---- The module defines the following user-callable functions: ! \begin{funcdesc}{TemporaryFile}{\optional{mode=\code{'w+b'}\optional{, ! bufsize=\code{-1}\optional{, ! suffix\optional{, prefix\optional{, dir}}}}}} Return a file (or file-like) object that can be used as a temporary storage area. The file is created using \function{mkstemp}. It will *************** *** 53,61 **** \end{funcdesc} ! \begin{funcdesc}{NamedTemporaryFile}{\optional{mode='w+b'} ! \optional{, bufsize=-1} ! \optional{, suffix} ! \optional{, prefix} ! \optional{, dir}} This function operates exactly as \function{TemporaryFile()} does, except that the file is guaranteed to have a visible name in the file --- 51,58 ---- \end{funcdesc} ! \begin{funcdesc}{NamedTemporaryFile}{\optional{mode=\code{'w+b'}\optional{, ! bufsize=\code{-1}\optional{, ! suffix\optional{, prefix\optional{, ! dir}}}}}} This function operates exactly as \function{TemporaryFile()} does, except that the file is guaranteed to have a visible name in the file *************** *** 68,75 **** \end{funcdesc} ! \begin{funcdesc}{mkstemp}{\optional{suffix} ! \optional{, prefix} ! \optional{, dir} ! \optional{, text=False}} Creates a temporary file in the most secure manner possible. There are no race conditions in the file's creation, assuming that the --- 65,70 ---- \end{funcdesc} ! \begin{funcdesc}{mkstemp}{\optional{suffix\optional{, ! prefix\optional{, dir\optional{, text}}}}} Creates a temporary file in the most secure manner possible. There are no race conditions in the file's creation, assuming that the *************** *** 104,110 **** \end{funcdesc} ! \begin{funcdesc}{mkdtemp}{\optional{suffix} ! \optional{, prefix} ! \optional{, dir}} Creates a temporary directory in the most secure manner possible. There are no race conditions in the directory's creation. The --- 99,103 ---- \end{funcdesc} ! \begin{funcdesc}{mkdtemp}{\optional{suffix\optional{, prefix\optional{, dir}}}} Creates a temporary directory in the most secure manner possible. There are no race conditions in the directory's creation. The *************** *** 122,128 **** \end{funcdesc} ! \begin{funcdesc}{mktemp}{\optional{suffix} ! \optional{, prefix} ! \optional{, dir}} \deprecated{2.3}{Use \function{mkstemp()} instead.} Return an absolute pathname of a file that did not exist at the time --- 115,119 ---- \end{funcdesc} ! \begin{funcdesc}{mktemp}{\optional{suffix\optional{, prefix\optional{, dir}}}} \deprecated{2.3}{Use \function{mkstemp()} instead.} Return an absolute pathname of a file that did not exist at the time *************** *** 145,149 **** in this module. ! If \var{tempdir} is unset or \code{None} at any call to any of the above functions, Python searches a standard list of directories and sets \var{tempdir} to the first one which the calling user can create --- 136,140 ---- in this module. ! If \code{tempdir} is unset or \code{None} at any call to any of the above functions, Python searches a standard list of directories and sets \var{tempdir} to the first one which the calling user can create *************** *** 173,177 **** \begin{funcdesc}{gettempdir}{} Return the directory currently selected to create temporary files in. ! If \var{tempdir} is not None, this simply returns its contents; otherwise, the search described above is performed, and the result returned. --- 164,168 ---- \begin{funcdesc}{gettempdir}{} Return the directory currently selected to create temporary files in. ! If \code{tempdir} is not \code{None}, this simply returns its contents; otherwise, the search described above is performed, and the result returned. From rhettinger at users.sourceforge.net Thu Sep 11 18:02:40 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Sep 11 20:02:43 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libstdtypes.tex, 1.132, 1.133 Message-ID: <E19xbOa-0001jT-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv6428 Modified Files: libstdtypes.tex Log Message: SF bug #804280: fromkeys is not listed in index Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** libstdtypes.tex 8 Sep 2003 18:52:18 -0000 1.132 --- libstdtypes.tex 12 Sep 2003 00:02:37 -0000 1.133 *************** *** 1083,1087 **** object identity) may not be used as keys. Numeric types used for keys obey the normal rules for numeric ! comparison: if two numbers compare equal (e.g. \code{1} and \code{1.0}) then they can be used interchangeably to index the same dictionary entry. --- 1083,1087 ---- object identity) may not be used as keys. Numeric types used for keys obey the normal rules for numeric ! comparison: if two numbers compare equal (such as \code{1} and \code{1.0}) then they can be used interchangeably to index the same dictionary entry. *************** *** 1103,1106 **** --- 1103,1107 ---- \ttindex{copy()} \ttindex{has_key()} + \ttindex{fromkeys()} \ttindex{items()} \ttindex{keys()} *************** *** 1269,1273 **** \begin{methoddesc}[file]{next}{} ! A file object is its own iterator, i.e. \code{iter(\var{f})} returns \var{f} (unless \var{f} is closed). When a file is used as an iterator, typically in a \keyword{for} loop (for example, --- 1270,1274 ---- \begin{methoddesc}[file]{next}{} ! A file object is its own iterator, for example \code{iter(\var{f})} returns \var{f} (unless \var{f} is closed). When a file is used as an iterator, typically in a \keyword{for} loop (for example, *************** *** 1507,1512 **** Function objects also support getting and setting arbitrary ! attributes, which can be used to, e.g. attach metadata to functions. ! Regular attribute dot-notation is used to get and set such attributes. \emph{Note that the current implementation only supports function attributes on user-defined functions. Function attributes on --- 1508,1513 ---- Function objects also support getting and setting arbitrary ! attributes, which can be used, for example, to attach metadata to ! functions. Regular attribute dot-notation is used to get and set such attributes. \emph{Note that the current implementation only supports function attributes on user-defined functions. Function attributes on From rhettinger at users.sourceforge.net Thu Sep 11 18:03:58 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Sep 11 20:04:07 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libstdtypes.tex, 1.129.8.3, 1.129.8.4 Message-ID: <E19xbPq-0001mw-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv6847 Modified Files: Tag: release23-maint libstdtypes.tex Log Message: SF bug #804280: fromkeys is not listed in index Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.129.8.3 retrieving revision 1.129.8.4 diff -C2 -d -r1.129.8.3 -r1.129.8.4 *** libstdtypes.tex 8 Sep 2003 18:55:01 -0000 1.129.8.3 --- libstdtypes.tex 12 Sep 2003 00:03:56 -0000 1.129.8.4 *************** *** 1083,1087 **** object identity) may not be used as keys. Numeric types used for keys obey the normal rules for numeric ! comparison: if two numbers compare equal (e.g. \code{1} and \code{1.0}) then they can be used interchangeably to index the same dictionary entry. --- 1083,1087 ---- object identity) may not be used as keys. Numeric types used for keys obey the normal rules for numeric ! comparison: if two numbers compare equal (such as \code{1} and \code{1.0}) then they can be used interchangeably to index the same dictionary entry. *************** *** 1103,1106 **** --- 1103,1107 ---- \ttindex{copy()} \ttindex{has_key()} + \ttindex{fromkeys()} \ttindex{items()} \ttindex{keys()} *************** *** 1269,1273 **** \begin{methoddesc}[file]{next}{} ! A file object is its own iterator, i.e. \code{iter(\var{f})} returns \var{f} (unless \var{f} is closed). When a file is used as an iterator, typically in a \keyword{for} loop (for example, --- 1270,1274 ---- \begin{methoddesc}[file]{next}{} ! A file object is its own iterator, for example \code{iter(\var{f})} returns \var{f} (unless \var{f} is closed). When a file is used as an iterator, typically in a \keyword{for} loop (for example, *************** *** 1507,1512 **** Function objects also support getting and setting arbitrary ! attributes, which can be used to, e.g. attach metadata to functions. ! Regular attribute dot-notation is used to get and set such attributes. \emph{Note that the current implementation only supports function attributes on user-defined functions. Function attributes on --- 1508,1513 ---- Function objects also support getting and setting arbitrary ! attributes, which can be used, for example, to attach metadata to ! functions. Regular attribute dot-notation is used to get and set such attributes. \emph{Note that the current implementation only supports function attributes on user-defined functions. Function attributes on From rhettinger at users.sourceforge.net Fri Sep 12 00:33:39 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 12 02:33:44 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.854,1.855 Message-ID: <E19xhUx-0001Ei-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv4051/Misc Modified Files: NEWS Log Message: SF #662923 Add support for the iterator and mapping protocols. For Py2.3, this was done for shelve, dumbdbm and other mapping objects, but not for bsddb and dbhash which were inadvertently missed. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.854 retrieving revision 1.855 diff -C2 -d -r1.854 -r1.855 *** NEWS 10 Sep 2003 19:37:42 -0000 1.854 --- NEWS 12 Sep 2003 06:33:36 -0000 1.855 *************** *** 36,39 **** --- 36,43 ---- ------- + - The bsddb module and dbhash module now support the iterator and + mapping protocols which make them more substitutable for dictionaries + and shelves. + - The csv module's DictReader and DictWriter classes now accept keyword arguments. This was an omission in the initial implementation. From rhettinger at users.sourceforge.net Fri Sep 12 00:33:39 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 12 02:33:49 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_bsddb.py,1.12,1.13 Message-ID: <E19xhUx-0001Eo-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv4051/Lib/test Modified Files: test_bsddb.py Log Message: SF #662923 Add support for the iterator and mapping protocols. For Py2.3, this was done for shelve, dumbdbm and other mapping objects, but not for bsddb and dbhash which were inadvertently missed. Index: test_bsddb.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bsddb.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** test_bsddb.py 9 Aug 2002 16:37:35 -0000 1.12 --- test_bsddb.py 12 Sep 2003 06:33:37 -0000 1.13 *************** *** 21,30 **** if verbose: print 'creation...' ! f['0'] = '' ! f['a'] = 'Guido' ! f['b'] = 'van' ! f['c'] = 'Rossum' ! f['d'] = 'invented' ! f['f'] = 'Python' if verbose: print '%s %s %s' % (f['a'], f['b'], f['c']) --- 21,42 ---- if verbose: print 'creation...' ! keys = ['0', 'a', 'b', 'c', 'd', 'e', 'f'] ! values = ['', 'Guido', 'van', 'Rossum', 'invented', 'Python'] ! items = zip(keys, values) ! for k, v in items: ! f[k] = v ! ! # test mapping iteration methods ! from sets import Set ! def verifyset(s1, s2): ! verify(Set(s1) == Set(s2)) ! verify(keys, f.keys()) ! verify(values, f.values()) ! verify(items, f.items()) ! verify(keys, f) ! verify(keys, f.iterkeys()) ! verify(values, f.itervalues()) ! verify(items, f.iteritems()) ! if verbose: print '%s %s %s' % (f['a'], f['b'], f['c']) From rhettinger at users.sourceforge.net Fri Sep 12 00:33:39 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 12 02:33:54 2003 Subject: [Python-checkins] python/dist/src/Lib/bsddb __init__.py,1.5,1.6 Message-ID: <E19xhUx-0001Ek-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/bsddb In directory sc8-pr-cvs1:/tmp/cvs-serv4051/Lib/bsddb Modified Files: __init__.py Log Message: SF #662923 Add support for the iterator and mapping protocols. For Py2.3, this was done for shelve, dumbdbm and other mapping objects, but not for bsddb and dbhash which were inadvertently missed. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/__init__.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** __init__.py 24 Apr 2003 16:02:44 -0000 1.5 --- __init__.py 12 Sep 2003 06:33:37 -0000 1.6 *************** *** 53,58 **** #---------------------------------------------------------------------- ! class _DBWithCursor: """ A simple wrapper around DB that makes it look like the bsddbobject in --- 53,59 ---- #---------------------------------------------------------------------- + import UserDict ! class _DBWithCursor(UserDict.DictMixin): """ A simple wrapper around DB that makes it look like the bsddbobject in *************** *** 145,148 **** --- 146,157 ---- return self.db.sync() + def __iter__(self): + try: + yield self.first()[0] + next = self.next + while 1: + yield next()[0] + except _bsddb.DBNotFoundError: + return #---------------------------------------------------------------------- From rhettinger at users.sourceforge.net Fri Sep 12 00:33:39 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 12 02:33:59 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libbsddb.tex, 1.11, 1.12 libdbhash.tex, 1.6, 1.7 Message-ID: <E19xhUx-0001Ev-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv4051/Doc/lib Modified Files: libbsddb.tex libdbhash.tex Log Message: SF #662923 Add support for the iterator and mapping protocols. For Py2.3, this was done for shelve, dumbdbm and other mapping objects, but not for bsddb and dbhash which were inadvertently missed. Index: libbsddb.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbsddb.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** libbsddb.tex 28 May 2003 16:20:03 -0000 1.11 --- libbsddb.tex 12 Sep 2003 06:33:37 -0000 1.12 *************** *** 101,106 **** \subsection{Hash, BTree and Record Objects \label{bsddb-objects}} ! Once instantiated, hash, btree and record objects support the following ! methods: \begin{methoddesc}{close}{} --- 101,107 ---- \subsection{Hash, BTree and Record Objects \label{bsddb-objects}} ! Once instantiated, hash, btree and record objects support ! the same methods as dictionaries. In addition, they support ! the following methods: \begin{methoddesc}{close}{} *************** *** 178,181 **** --- 179,196 ---- >>> db.previous() ('1', '1') + >>> for k, v in db.iteritems(): + ... print k, v + 0 0 + 1 1 + 2 4 + 3 9 + 4 16 + 5 25 + 6 36 + 7 49 + 8 64 + 9 81 + >>> 8 in db + True >>> db.sync() 0 Index: libdbhash.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdbhash.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** libdbhash.tex 10 Sep 2003 04:44:29 -0000 1.6 --- libdbhash.tex 12 Sep 2003 06:33:37 -0000 1.7 *************** *** 52,61 **** The database objects returned by \function{open()} provide the methods ! common to all the DBM-style databases. The following methods are ! available in addition to the standard methods. \begin{methoddesc}[dbhash]{first}{} ! It's possible to loop over every key in the database using this method ! and the \method{next()} method. The traversal is ordered by the databases internal hash values, and won't be sorted by the key values. This method returns the starting key. --- 52,61 ---- The database objects returned by \function{open()} provide the methods ! common to all the DBM-style databases and mapping objects. The following ! methods are available in addition to the standard methods. \begin{methoddesc}[dbhash]{first}{} ! It's possible to loop over every key/value pair in the database using ! this method and the \method{next()} method. The traversal is ordered by the databases internal hash values, and won't be sorted by the key values. This method returns the starting key. *************** *** 63,72 **** \begin{methoddesc}[dbhash]{last}{} ! Return the last key in a database traversal. This may be used to begin a reverse-order traversal; see \method{previous()}. \end{methoddesc} \begin{methoddesc}[dbhash]{next}{} ! Returns the key next key in a database traversal. The following code prints every key in the database \code{db}, without having to create a list in memory that contains them all: --- 63,72 ---- \begin{methoddesc}[dbhash]{last}{} ! Return the last key/value pair in a database traversal. This may be used to begin a reverse-order traversal; see \method{previous()}. \end{methoddesc} \begin{methoddesc}[dbhash]{next}{} ! Returns the key next key/value pair in a database traversal. The following code prints every key in the database \code{db}, without having to create a list in memory that contains them all: *************** *** 80,84 **** \begin{methoddesc}[dbhash]{previous}{} ! Returns the previous key in a forward-traversal of the database. In conjunction with \method{last()}, this may be used to implement a reverse-order traversal. --- 80,84 ---- \begin{methoddesc}[dbhash]{previous}{} ! Returns the previous key/value pair in a forward-traversal of the database. In conjunction with \method{last()}, this may be used to implement a reverse-order traversal. From loewis at users.sourceforge.net Fri Sep 12 12:25:40 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Fri Sep 12 12:25:46 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_pep277.py,1.7,1.8 Message-ID: <E19xqjs-0006VQ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv24955/Lib/test Modified Files: test_pep277.py Log Message: Patch #790000: Allow os.access to handle Unicode file name. Index: test_pep277.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pep277.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_pep277.py 16 Jul 2003 03:46:38 -0000 1.7 --- test_pep277.py 12 Sep 2003 16:25:37 -0000 1.8 *************** *** 101,104 **** --- 101,105 ---- f.close() print repr(filename) + os.access(filename,os.R_OK) os.remove(filename) os.chdir(oldwd) From loewis at users.sourceforge.net Fri Sep 12 12:25:40 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Fri Sep 12 12:25:50 2003 Subject: [Python-checkins] python/dist/src/Modules posixmodule.c, 2.302, 2.303 Message-ID: <E19xqjs-0006Va-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv24955/Modules Modified Files: posixmodule.c Log Message: Patch #790000: Allow os.access to handle Unicode file name. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.302 retrieving revision 2.303 diff -C2 -d -r2.302 -r2.303 *** posixmodule.c 1 Sep 2003 22:25:41 -0000 2.302 --- posixmodule.c 12 Sep 2003 16:25:38 -0000 2.303 *************** *** 1028,1031 **** --- 1028,1047 ---- int res; + #ifdef Py_WIN_WIDE_FILENAMES + if (unicode_file_names()) { + PyUnicodeObject *po; + if (PyArg_ParseTuple(args, "Ui:access", &po, &mode)) { + Py_BEGIN_ALLOW_THREADS + /* PyUnicode_AS_UNICODE OK without thread lock as + it is a simple dereference. */ + res = _waccess(PyUnicode_AS_UNICODE(po), mode); + Py_END_ALLOW_THREADS + return(PyBool_FromLong(res == 0)); + } + /* Drop the argument parsing error as narrow strings + are also valid. */ + PyErr_Clear(); + } + #endif if (!PyArg_ParseTuple(args, "si:access", &path, &mode)) return NULL; From loewis at users.sourceforge.net Fri Sep 12 12:37:47 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Fri Sep 12 12:37:51 2003 Subject: [Python-checkins] python/dist/src/Lib htmllib.py,1.19,1.19.16.1 Message-ID: <E19xqvb-0007GE-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv27753/Lib Modified Files: Tag: release23-maint htmllib.py Log Message: Patch #793021: Implement htmllib.HTMLParser.reset. Fixes #711632. Index: htmllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/htmllib.py,v retrieving revision 1.19 retrieving revision 1.19.16.1 diff -C2 -d -r1.19 -r1.19.16.1 *** htmllib.py 29 May 2002 16:18:42 -0000 1.19 --- htmllib.py 12 Sep 2003 16:37:44 -0000 1.19.16.1 *************** *** 31,34 **** --- 31,37 ---- SGMLParser.__init__(self, verbose) self.formatter = formatter + + def reset(self): + SGMLParser.reset(self) self.savedata = None self.isindex = 0 From loewis at users.sourceforge.net Fri Sep 12 12:37:47 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Fri Sep 12 12:37:53 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.39,1.831.4.40 Message-ID: <E19xqvb-0007GJ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv27753/Misc Modified Files: Tag: release23-maint NEWS Log Message: Patch #793021: Implement htmllib.HTMLParser.reset. Fixes #711632. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.39 retrieving revision 1.831.4.40 diff -C2 -d -r1.831.4.39 -r1.831.4.40 *** NEWS 10 Sep 2003 03:31:47 -0000 1.831.4.39 --- NEWS 12 Sep 2003 16:37:45 -0000 1.831.4.40 *************** *** 48,51 **** --- 48,53 ---- ------- + - Bug #711632: Reset all state members in HTMLParser.reset. + - Bug #792649: logging.ConfigStreamHandler had an uninitialized variable From loewis at users.sourceforge.net Fri Sep 12 12:38:02 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Fri Sep 12 12:38:05 2003 Subject: [Python-checkins] python/dist/src/Lib htmllib.py,1.19,1.20 Message-ID: <E19xqvq-0007HM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv27873/Lib Modified Files: htmllib.py Log Message: Patch #793021: Implement htmllib.HTMLParser.reset. Fixes #711632. Backported to 2.3. Index: htmllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/htmllib.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** htmllib.py 29 May 2002 16:18:42 -0000 1.19 --- htmllib.py 12 Sep 2003 16:38:00 -0000 1.20 *************** *** 31,34 **** --- 31,37 ---- SGMLParser.__init__(self, verbose) self.formatter = formatter + + def reset(self): + SGMLParser.reset(self) self.savedata = None self.isindex = 0 From rhettinger at users.sourceforge.net Fri Sep 12 21:01:37 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 12 21:01:41 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_itertools.py, 1.19, 1.20 Message-ID: <E19xynB-0000UP-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv1877 Modified Files: test_itertools.py Log Message: Simplify doctest of tee(). Index: test_itertools.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_itertools.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** test_itertools.py 8 Sep 2003 23:58:40 -0000 1.19 --- test_itertools.py 13 Sep 2003 01:01:34 -0000 1.20 *************** *** 608,620 **** 32 ! >>> def irange(start, stop): ! ... for i in range(start, stop): ! ... yield i ! ! >>> x, y = tee(irange(2,10)) >>> list(x), list(y) ([2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 9]) ! >>> x, y = tee(irange(2,10)) >>> zip(x, y) [(2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)] --- 608,616 ---- 32 ! >>> x, y = tee(chain(xrange(2,10))) >>> list(x), list(y) ([2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 9]) ! >>> x, y = tee(chain(xrange(2,10))) >>> zip(x, y) [(2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)] From rhettinger at users.sourceforge.net Fri Sep 12 22:58:02 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 12 22:58:06 2003 Subject: [Python-checkins] python/dist/src/Lib unittest.py,1.24,1.25 Message-ID: <E19y0bq-0005Ir-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv20332 Modified Files: unittest.py Log Message: SF bug #804115: bad argument handling(unittest.py) Index: unittest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** unittest.py 13 Jul 2003 15:18:12 -0000 1.24 --- unittest.py 13 Sep 2003 02:58:00 -0000 1.25 *************** *** 561,566 **** return getattr(self.stream,attr) ! def writeln(self, *args): ! if args: self.write(*args) self.write('\n') # text-mode streams translate to \r\n if needed --- 561,566 ---- return getattr(self.stream,attr) ! def writeln(self, arg=None): ! if arg: self.write(arg) self.write('\n') # text-mode streams translate to \r\n if needed From rhettinger at users.sourceforge.net Fri Sep 12 22:59:03 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 12 22:59:06 2003 Subject: [Python-checkins] python/dist/src/Lib unittest.py,1.24,1.24.6.1 Message-ID: <E19y0cp-0005Kt-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv20455 Modified Files: Tag: release23-maint unittest.py Log Message: SF bug #804115: bad argument handling(unittest.py) Index: unittest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v retrieving revision 1.24 retrieving revision 1.24.6.1 diff -C2 -d -r1.24 -r1.24.6.1 *** unittest.py 13 Jul 2003 15:18:12 -0000 1.24 --- unittest.py 13 Sep 2003 02:59:00 -0000 1.24.6.1 *************** *** 561,566 **** return getattr(self.stream,attr) ! def writeln(self, *args): ! if args: self.write(*args) self.write('\n') # text-mode streams translate to \r\n if needed --- 561,566 ---- return getattr(self.stream,attr) ! def writeln(self, arg=None): ! if arg: self.write(arg) self.write('\n') # text-mode streams translate to \r\n if needed From rhettinger at users.sourceforge.net Fri Sep 12 23:18:36 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 12 23:18:41 2003 Subject: [Python-checkins] python/dist/src/Lib/bsddb __init__.py,1.6,1.7 Message-ID: <E19y0vk-00067s-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/bsddb In directory sc8-pr-cvs1:/tmp/cvs-serv23415 Modified Files: __init__.py Log Message: The previous change works much faster (one lookup per key) when iteritems() is defined. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/__init__.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** __init__.py 12 Sep 2003 06:33:37 -0000 1.6 --- __init__.py 13 Sep 2003 03:18:34 -0000 1.7 *************** *** 155,158 **** --- 155,167 ---- return + def iteritems(self): + try: + yield self.first() + next = self.next + while 1: + yield next() + except _bsddb.DBNotFoundError: + return + #---------------------------------------------------------------------- # Compatibility object factory functions From rhettinger at users.sourceforge.net Sat Sep 13 01:51:12 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 13 01:51:16 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_bsddb.py,1.13,1.14 Message-ID: <E19y3JP-0003i2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv14175 Modified Files: test_bsddb.py Log Message: * Converted test to unittest format. * Expanded coverage. Index: test_bsddb.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bsddb.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** test_bsddb.py 12 Sep 2003 06:33:37 -0000 1.13 --- test_bsddb.py 13 Sep 2003 05:51:09 -0000 1.14 *************** *** 1,94 **** #! /usr/bin/env python ! """Test script for the bsddb C module ! Roger E. Masse """ import os import bsddb import dbhash # Just so we know it's imported ! from test.test_support import verbose, verify, TESTFN ! def test(openmethod, what, ondisk=1): ! if verbose: ! print '\nTesting: ', what, (ondisk and "on disk" or "in memory") ! if ondisk: ! fname = TESTFN ! else: ! fname = None ! f = openmethod(fname, 'c') ! verify(f.keys() == []) ! if verbose: ! print 'creation...' ! keys = ['0', 'a', 'b', 'c', 'd', 'e', 'f'] ! values = ['', 'Guido', 'van', 'Rossum', 'invented', 'Python'] ! items = zip(keys, values) ! for k, v in items: ! f[k] = v ! # test mapping iteration methods ! from sets import Set ! def verifyset(s1, s2): ! verify(Set(s1) == Set(s2)) ! verify(keys, f.keys()) ! verify(values, f.values()) ! verify(items, f.items()) ! verify(keys, f) ! verify(keys, f.iterkeys()) ! verify(values, f.itervalues()) ! verify(items, f.iteritems()) ! if verbose: ! print '%s %s %s' % (f['a'], f['b'], f['c']) ! if what == 'BTree' : ! if verbose: ! print 'key ordering...' ! f.set_location(f.first()[0]) ! while 1: ! try: ! rec = f.next() ! except KeyError: ! if rec != f.last(): ! print 'Error, last != last!' ! f.previous() ! break ! if verbose: ! print rec ! if not f.has_key('a'): ! print 'Error, missing key!' ! f.sync() ! f.close() ! if ondisk: ! # if we're using an in-memory only db, we can't reopen it ! # so finish here. ! if verbose: ! print 'modification...' ! f = openmethod(fname, 'w') ! f['d'] = 'discovered' ! if verbose: ! print 'access...' ! for key in f.keys(): ! word = f[key] ! if verbose: ! print word ! f.close() ! try: ! os.remove(fname) ! except os.error: ! pass ! types = [(bsddb.btopen, 'BTree'), ! (bsddb.hashopen, 'Hash Table'), ! (bsddb.btopen, 'BTree', 0), ! (bsddb.hashopen, 'Hash Table', 0), ! # (bsddb.rnopen,'Record Numbers'), 'put' for RECNO for bsddb 1.85 ! # appears broken... at least on ! # Solaris Intel - rmasse 1/97 ! ] ! for type in types: ! test(*type) --- 1,167 ---- #! /usr/bin/env python ! """Test script for the bsddb C module by Roger E. Masse ! Adapted to unittest format and expanded scope by Raymond Hettinger """ import os import bsddb import dbhash # Just so we know it's imported ! import unittest ! from test import test_support ! from sets import Set ! class TestBSDDB(unittest.TestCase): ! def setUp(self): ! self.f = self.openmethod[0](self.fname, 'c') ! self.d = dict(q='Guido', w='van', e='Rossum', r='invented', t='Python', y='') ! for k, v in self.d.iteritems(): ! self.f[k] = v ! def tearDown(self): ! self.f.sync() ! self.f.close() ! if self.fname is None: ! return ! try: ! os.remove(self.fname) ! except os.error: ! pass ! def test_getitem(self): ! for k, v in self.d.iteritems(): ! self.assertEqual(self.f[k], v) ! def test_len(self): ! self.assertEqual(len(self.f), len(self.d)) ! def test_change(self): ! self.f['r'] = 'discovered' ! self.assertEqual(self.f['r'], 'discovered') ! self.assert_('r' in self.f.keys()) ! self.assert_('discovered' in self.f.values()) ! def test_close_and_reopen(self): ! if self.fname is None: ! # if we're using an in-memory only db, we can't reopen it ! # so finish here. ! return ! self.f.close() ! self.f = self.openmethod[0](self.fname, 'w') ! for k, v in self.d.iteritems(): ! self.assertEqual(self.f[k], v) ! def assertSetEquals(self, seqn1, seqn2): ! self.assertEqual(Set(seqn1), Set(seqn2)) ! def test_mapping_iteration_methods(self): ! f = self.f ! d = self.d ! self.assertSetEquals(d, f) ! self.assertSetEquals(d.keys(), f.keys()) ! self.assertSetEquals(d.values(), f.values()) ! self.assertSetEquals(d.items(), f.items()) ! self.assertSetEquals(d.iterkeys(), f.iterkeys()) ! self.assertSetEquals(d.itervalues(), f.itervalues()) ! self.assertSetEquals(d.iteritems(), f.iteritems()) ! def test_first_next_looping(self): ! items = [self.f.first()] ! for i in xrange(1, len(self.f)): ! items.append(self.f.next()) ! self.assertSetEquals(items, self.d.items()) ! def test_previous_last_looping(self): ! items = [self.f.last()] ! for i in xrange(1, len(self.f)): ! items.append(self.f.previous()) ! self.assertSetEquals(items, self.d.items()) ! ! def test_set_location(self): ! self.assertEqual(self.f.set_location('e'), ('e', self.d['e'])) ! ! def test_contains(self): ! for k in self.d: ! self.assert_(k in self.f) ! self.assert_('not here' not in self.f) ! ! def test_has_key(self): ! for k in self.d: ! self.assert_(self.f.has_key(k)) ! self.assert_(not self.f.has_key('not here')) ! ! def test_clear(self): ! self.f.clear() ! self.assertEqual(len(self.f), 0) ! ! def test_popitem(self): ! k, v = self.f.popitem() ! self.assert_(k in self.d) ! self.assert_(v in self.d.values()) ! self.assert_(k not in self.f) ! self.assertEqual(len(self.d)-1, len(self.f)) ! ! def test_pop(self): ! k = 'w' ! v = self.f.pop(k) ! self.assertEqual(v, self.d[k]) ! self.assert_(k not in self.f) ! self.assert_(v not in self.f.values()) ! self.assertEqual(len(self.d)-1, len(self.f)) ! ! def test_get(self): ! self.assertEqual(self.f.get('NotHere'), None) ! self.assertEqual(self.f.get('NotHere', 'Default'), 'Default') ! self.assertEqual(self.f.get('q', 'Default'), self.d['q']) ! ! def test_setdefault(self): ! self.assertEqual(self.f.setdefault('new', 'dog'), 'dog') ! self.assertEqual(self.f.setdefault('r', 'cat'), self.d['r']) ! ! def test_update(self): ! new = dict(y='life', u='of', i='brian') ! self.f.update(new) ! self.d.update(new) ! for k, v in self.d.iteritems(): ! self.assertEqual(self.f[k], v) ! ! def test_keyordering(self): ! if self.openmethod[0] is not bsddb.btopen: ! return ! keys = self.d.keys() ! keys.sort() ! self.assertEqual(self.f.first()[0], keys[0]) ! self.assertEqual(self.f.next()[0], keys[1]) ! self.assertEqual(self.f.last()[0], keys[-1]) ! self.assertEqual(self.f.previous()[0], keys[-2]) ! self.assertEqual(list(self.f), keys) ! ! class TestBTree(TestBSDDB): ! fname = test_support.TESTFN ! openmethod = [bsddb.btopen] ! ! class TestBTree_InMemory(TestBSDDB): ! fname = None ! openmethod = [bsddb.btopen] ! ! class TestHashTable(TestBSDDB): ! fname = test_support.TESTFN ! openmethod = [bsddb.hashopen] ! ! class TestHashTable_InMemory(TestBSDDB): ! fname = None ! openmethod = [bsddb.hashopen] ! ! ## # (bsddb.rnopen,'Record Numbers'), 'put' for RECNO for bsddb 1.85 ! ## # appears broken... at least on ! ## # Solaris Intel - rmasse 1/97 ! ! def test_main(verbose=None): ! test_support.run_unittest( ! TestBTree, ! TestHashTable, ! TestBTree_InMemory, ! TestHashTable_InMemory, ! ) ! ! if __name__ == "__main__": ! test_main(verbose=True) From bcannon at users.sourceforge.net Sun Sep 14 20:20:53 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Sun Sep 14 20:20:57 2003 Subject: [Python-checkins] python/dist/src/Python ast.c,1.1.2.31,1.1.2.32 Message-ID: <E19yh6r-0000VT-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv1322/Python Modified Files: Tag: ast-branch ast.c Log Message: Changes done to code from beginning of file to ast_for_listcomp, inclusive: - Properly indent and fix code syntactically - Raise exceptions (mostly PyExc_Exception to give an initial value) instead of printing to fprintf(stderr, ...) where appropriate. - Run asdl_seq_free() on objects allocated by asdl_seq_new() when an error has been detected - Add comments for functions when needed Index: ast.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/Attic/ast.c,v retrieving revision 1.1.2.31 retrieving revision 1.1.2.32 diff -C2 -d -r1.1.2.31 -r1.1.2.32 *** ast.c 26 Aug 2003 01:17:15 -0000 1.1.2.31 --- ast.c 15 Sep 2003 00:20:51 -0000 1.1.2.32 *************** *** 11,17 **** /* XXX TO DO ! re-indent this file ! internal error checking (such as function return values, etc.) ! syntax errors */ --- 11,18 ---- /* XXX TO DO [...967 lines suppressed...] } + for (j = 0; j < n_ifs; j++) { REQ(ch, list_iter); + ch = CHILD(ch, 0); REQ(ch, list_if); + asdl_seq_APPEND(ifs, CHILD(ch, 1)); if (NCH(ch) == 3) *************** *** 698,701 **** --- 826,832 ---- return result; } + + /* Do not name a variable 'expr'! Will cause a compile error. + */ static expr_ty From bcannon at users.sourceforge.net Sun Sep 14 20:25:09 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Sun Sep 14 20:25:12 2003 Subject: [Python-checkins] python/dist/src/Include asdl.h,1.1.2.4,1.1.2.5 Message-ID: <E19yhAz-0000lI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1:/tmp/cvs-serv2923/Include Modified Files: Tag: ast-branch asdl.h Log Message: Add comment about why the #ifdef for the various asdl_seq_* macros is what it is for Py_DEBUG Index: asdl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/Attic/asdl.h,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** asdl.h 24 Mar 2003 23:37:43 -0000 1.1.2.4 --- asdl.h 15 Sep 2003 00:25:07 -0000 1.1.2.5 *************** *** 27,30 **** --- 27,32 ---- void asdl_seq_free(asdl_seq *); + /* XXX: Normally should be Py_DEBUG, but asserts fail instantly at startup; + turned off for now */ #define asdl_seq_GET(S, I) (S)->elements[(I)] #ifdef Py_DEBUG From bcannon at users.sourceforge.net Sun Sep 14 20:25:50 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Sun Sep 14 20:25:53 2003 Subject: [Python-checkins] python/dist/src/Python compile.txt, 1.1.2.6, 1.1.2.7 Message-ID: <E19yhBe-0000mk-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv3012/Python Modified Files: Tag: ast-branch compile.txt Log Message: Add notes on asdl_seq_* functions and macros. Index: compile.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/Attic/compile.txt,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** compile.txt 25 Jul 2003 23:42:09 -0000 1.1.2.6 --- compile.txt 15 Sep 2003 00:25:48 -0000 1.1.2.7 *************** *** 106,118 **** - REQ(node, type) -- Assert that the node is the type that is expected ! XXX Function and macros for creating and using ``asdl_seq *`` types ! (found in Python/asdl.c and Include/asdl.h): ! + asdl_seq_new ! * when to use? ! * when to call asdl_seq_free? ! + asdl_seq_APPEND ! + asdl_seq_SET ! + asdl_seq_GET ! + asdl_seq_LEN --- 106,118 ---- - REQ(node, type) -- Assert that the node is the type that is expected ! Function and macros for creating and using ``asdl_seq *`` types ! as found in Python/asdl.c and Include/asdl.h: ! - asdl_seq_new(int) -- Allocate memory for an asdl_seq for length ! 'size' ! - asdl_seq_free(asdl_seq *) -- Free asdl_seq struct ! - asdl_seq_GET(seq, pos) -- Get item held at 'pos' ! - asdl_seq_SET(seq, pos, val) -- Set 'seq' at 'pos' to 'val' ! - asdl_seq_APPEND(seq, val) -- Set the end of 'seq' to 'val' ! - asdl_seq_LEN(seq) -- Return the length of 'seq' From purcell at users.sourceforge.net Mon Sep 15 07:01:24 2003 From: purcell at users.sourceforge.net (purcell@users.sourceforge.net) Date: Mon Sep 15 07:01:28 2003 Subject: [Python-checkins] python/dist/src/Lib unittest.py,1.25,1.26 Message-ID: <E19yr6i-0006oh-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv26052 Modified Files: unittest.py Log Message: Explicitly define public symbols via __all__: see discussion with Raymond Hettinger in comments for issue 804115 https://sourceforge.net/tracker/?func=detail&atid=105470&aid=804115&group_id=5470 Index: unittest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** unittest.py 13 Sep 2003 02:58:00 -0000 1.25 --- unittest.py 15 Sep 2003 11:01:21 -0000 1.26 *************** *** 57,60 **** --- 57,70 ---- ############################################################################## + # Exported classes and functions + ############################################################################## + __all__ = ['TestResult', 'TestCase', 'TestSuite', 'TextTestRunner', + 'TestLoader', 'FunctionTestCase', 'main', 'defaultTestLoader'] + + # Expose obsolete functions for backwards compatability + __all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases']) + + + ############################################################################## # Test framework core ############################################################################## From akuchling at users.sourceforge.net Mon Sep 15 08:27:21 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon Sep 15 08:27:32 2003 Subject: [Python-checkins] python/dist/src setup.py,1.171,1.172 Message-ID: <E19ysRt-0002nn-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv10759 Modified Files: setup.py Log Message: Remove possibly-misleading Expat version Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -d -r1.171 -r1.172 *** setup.py 10 Jul 2003 12:48:39 -0000 1.171 --- setup.py 15 Sep 2003 12:27:18 -0000 1.172 *************** *** 720,725 **** # group of developers on SourceForge; see www.libexpat.org for # more information. The pyexpat module was written by Paul ! # Prescod after a prototype by Jack Jansen. Source of Expat ! # 1.95.2 is included in Modules/expat/. Usage of a system # shared libexpat.so/expat.dll is not advised. # --- 720,725 ---- # group of developers on SourceForge; see www.libexpat.org for # more information. The pyexpat module was written by Paul ! # Prescod after a prototype by Jack Jansen. The Expat source ! # is included in Modules/expat/. Usage of a system # shared libexpat.so/expat.dll is not advised. # From akuchling at users.sourceforge.net Mon Sep 15 08:32:29 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon Sep 15 08:32:33 2003 Subject: [Python-checkins] python/dist/src setup.py,1.171,1.171.4.1 Message-ID: <E19ysWr-00034G-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv11787 Modified Files: Tag: release23-branch setup.py Log Message: Remove possibly-misleading Expat version Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.171 retrieving revision 1.171.4.1 diff -C2 -d -r1.171 -r1.171.4.1 *** setup.py 10 Jul 2003 12:48:39 -0000 1.171 --- setup.py 15 Sep 2003 12:32:27 -0000 1.171.4.1 *************** *** 720,725 **** # group of developers on SourceForge; see www.libexpat.org for # more information. The pyexpat module was written by Paul ! # Prescod after a prototype by Jack Jansen. Source of Expat ! # 1.95.2 is included in Modules/expat/. Usage of a system # shared libexpat.so/expat.dll is not advised. # --- 720,725 ---- # group of developers on SourceForge; see www.libexpat.org for # more information. The pyexpat module was written by Paul ! # Prescod after a prototype by Jack Jansen. The Expat source ! # is included in Modules/expat/. Usage of a system # shared libexpat.so/expat.dll is not advised. # From mwh at python.net Mon Sep 15 12:20:12 2003 From: mwh at python.net (Michael Hudson) Date: Mon Sep 15 12:19:56 2003 Subject: [Python-checkins] distutils testfil,1.3,1.4 In-Reply-To: <E19vFeD-0005qW-U1@mail.python.org> (testpy@thor.dotsrc.org's message of "Fri, 05 Sep 2003 08:25:06 -0400") References: <E19vFeD-0005qW-U1@mail.python.org> Message-ID: <2m4qzec9c3.fsf@starship.python.net> testpy@thor.dotsrc.org writes: > Update of /pack/cvs-test/distutils > In directory thor:/tmp/cvs-serv10166 > > Modified Files: > testfil > Log Message: > update > Umm...? -- The ultimate laziness is not using Perl. That saves you so much work you wouldn't believe it if you had never tried it. -- Erik Naggum, comp.lang.lisp From rhettinger at users.sourceforge.net Mon Sep 15 14:20:16 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 15 14:20:20 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libsha.tex, 1.10, 1.10.26.1 Message-ID: <E19yxxQ-0006kg-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv25763 Modified Files: Tag: release23-maint libsha.tex Log Message: SF bug #804113: Crypto terminology for crypto hash function Noted that the SHA algorithm is really SHA-1. (Contributed by Ronald Rivest.) Index: libsha.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsha.tex,v retrieving revision 1.10 retrieving revision 1.10.26.1 diff -C2 -d -r1.10 -r1.10.26.1 *** libsha.tex 2 Nov 2001 21:44:09 -0000 1.10 --- libsha.tex 15 Sep 2003 18:20:13 -0000 1.10.26.1 *************** *** 1,4 **** \section{\module{sha} --- ! SHA message digest algorithm} \declaremodule{builtin}{sha} --- 1,4 ---- \section{\module{sha} --- ! SHA-1 message digest algorithm} \declaremodule{builtin}{sha} *************** *** 8,17 **** This module implements the interface to NIST's\index{NIST} secure hash ! algorithm,\index{Secure Hash Algorithm} known as SHA. It is used in the same way as the \refmodule{md5} module:\ use \function{new()} to create an sha object, then feed this object with arbitrary strings using the \method{update()} method, and at any point you can ask it for the \dfn{digest} of the concatenation of the strings fed to it ! so far.\index{checksum!SHA} SHA digests are 160 bits instead of MD5's 128 bits. --- 8,18 ---- This module implements the interface to NIST's\index{NIST} secure hash ! algorithm,\index{Secure Hash Algorithm} known as SHA-1. SHA-1 is an ! improved version of the original SHA hash algorithm. It is used in the same way as the \refmodule{md5} module:\ use \function{new()} to create an sha object, then feed this object with arbitrary strings using the \method{update()} method, and at any point you can ask it for the \dfn{digest} of the concatenation of the strings fed to it ! so far.\index{checksum!SHA} SHA-1 digests are 160 bits instead of MD5's 128 bits. From rhettinger at users.sourceforge.net Mon Sep 15 14:20:55 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 15 14:21:10 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libsha.tex,1.10,1.11 Message-ID: <E19yxy3-0006mI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv26033 Modified Files: libsha.tex Log Message: SF bug #804113: Crypto terminology for crypto hash function Noted that the SHA algorithm is really SHA-1. (Contributed by Ronald Rivest.) Index: libsha.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsha.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** libsha.tex 2 Nov 2001 21:44:09 -0000 1.10 --- libsha.tex 15 Sep 2003 18:20:52 -0000 1.11 *************** *** 1,4 **** \section{\module{sha} --- ! SHA message digest algorithm} \declaremodule{builtin}{sha} --- 1,4 ---- \section{\module{sha} --- ! SHA-1 message digest algorithm} \declaremodule{builtin}{sha} *************** *** 8,17 **** This module implements the interface to NIST's\index{NIST} secure hash ! algorithm,\index{Secure Hash Algorithm} known as SHA. It is used in the same way as the \refmodule{md5} module:\ use \function{new()} to create an sha object, then feed this object with arbitrary strings using the \method{update()} method, and at any point you can ask it for the \dfn{digest} of the concatenation of the strings fed to it ! so far.\index{checksum!SHA} SHA digests are 160 bits instead of MD5's 128 bits. --- 8,18 ---- This module implements the interface to NIST's\index{NIST} secure hash ! algorithm,\index{Secure Hash Algorithm} known as SHA-1. SHA-1 is an ! improved version of the original SHA hash algorithm. It is used in the same way as the \refmodule{md5} module:\ use \function{new()} to create an sha object, then feed this object with arbitrary strings using the \method{update()} method, and at any point you can ask it for the \dfn{digest} of the concatenation of the strings fed to it ! so far.\index{checksum!SHA} SHA-1 digests are 160 bits instead of MD5's 128 bits. From rhettinger at users.sourceforge.net Mon Sep 15 17:43:19 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 15 17:43:23 2003 Subject: [Python-checkins] python/dist/src/Python compile.c,2.292,2.293 Message-ID: <E19z17v-0002YY-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv9525 Modified Files: compile.c Log Message: Fix leak discovered in test_new by Michael Hudson. Will backport to 2.3.1 Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.292 retrieving revision 2.293 diff -C2 -d -r2.292 -r2.293 *** compile.c 28 Aug 2003 14:42:14 -0000 2.292 --- compile.c 15 Sep 2003 21:43:16 -0000 2.293 *************** *** 105,108 **** --- 105,110 ---- int stacksize; int flags; + PyObject *co; + PyObject *empty; PyObject *code; PyObject *consts; *************** *** 128,146 **** return NULL; - if (freevars == NULL || cellvars == NULL) { - PyObject *empty = PyTuple_New(0); - if (empty == NULL) - return NULL; - if (freevars == NULL) { - freevars = empty; - Py_INCREF(freevars); - } - if (cellvars == NULL) { - cellvars = empty; - Py_INCREF(cellvars); - } - Py_DECREF(empty); - } - if (!PyObject_CheckReadBuffer(code)) { PyErr_SetString(PyExc_TypeError, --- 130,133 ---- *************** *** 149,156 **** } ! return (PyObject *)PyCode_New(argcount, nlocals, stacksize, flags, code, consts, names, varnames, freevars, cellvars, filename, name, ! firstlineno, lnotab); } --- 136,153 ---- } ! empty = PyTuple_New(0); ! if (empty == NULL) ! return NULL; ! if (freevars == NULL) ! freevars = empty; ! if (cellvars == NULL) ! cellvars = empty; ! ! co = (PyObject *) PyCode_New(argcount, nlocals, stacksize, flags, code, consts, names, varnames, freevars, cellvars, filename, name, ! firstlineno, lnotab); ! Py_DECREF(empty); ! return co; } From jhylton at users.sourceforge.net Mon Sep 15 23:11:02 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Mon Sep 15 23:11:07 2003 Subject: [Python-checkins] python/dist/src/Python bltinmodule.c,2.295,2.296 Message-ID: <E19z6F4-0001h7-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv6477 Modified Files: bltinmodule.c Log Message: Reflow long lines and reformat. Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.295 retrieving revision 2.296 diff -C2 -d -r2.295 -r2.296 *** bltinmodule.c 18 Aug 2003 18:28:45 -0000 2.295 --- bltinmodule.c 16 Sep 2003 03:10:59 -0000 2.296 *************** *** 2364,2383 **** int reslen; if (!PyUnicode_Check(item)) { ! PyErr_SetString(PyExc_TypeError, "can't filter unicode to unicode:" ! " __getitem__ returned different type"); Py_DECREF(item); goto Fail_1; } reslen = PyUnicode_GET_SIZE(item); ! if (reslen == 1) { PyUnicode_AS_UNICODE(result)[j++] = PyUnicode_AS_UNICODE(item)[0]; ! } else { /* do we need more space? */ ! int need = j + reslen + len-i-1; if (need > outlen) { ! /* overallocate, to avoid reallocations */ ! if (need<2*outlen) ! need = 2*outlen; if (PyUnicode_Resize(&result, need)) { Py_DECREF(item); --- 2364,2385 ---- int reslen; if (!PyUnicode_Check(item)) { ! PyErr_SetString(PyExc_TypeError, ! "can't filter unicode to unicode:" ! " __getitem__ returned different type"); Py_DECREF(item); goto Fail_1; } reslen = PyUnicode_GET_SIZE(item); ! if (reslen == 1) PyUnicode_AS_UNICODE(result)[j++] = PyUnicode_AS_UNICODE(item)[0]; ! else { /* do we need more space? */ ! int need = j + reslen + len - i - 1; if (need > outlen) { ! /* overallocate, ! to avoid reallocations */ ! if (need < 2 * outlen) ! need = 2 * outlen; if (PyUnicode_Resize(&result, need)) { Py_DECREF(item); *************** *** 2386,2394 **** outlen = need; } ! memcpy( ! PyUnicode_AS_UNICODE(result) + j, ! PyUnicode_AS_UNICODE(item), ! reslen*sizeof(Py_UNICODE) ! ); j += reslen; } --- 2388,2394 ---- outlen = need; } ! memcpy(PyUnicode_AS_UNICODE(result) + j, ! PyUnicode_AS_UNICODE(item), ! reslen*sizeof(Py_UNICODE)); j += reslen; } From jhylton at users.sourceforge.net Mon Sep 15 23:17:18 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Mon Sep 15 23:17:21 2003 Subject: [Python-checkins] python/dist/src/Python bltinmodule.c,2.296,2.297 Message-ID: <E19z6L8-0001x2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv7496 Modified Files: bltinmodule.c Log Message: Correct check of PyUnicode_Resize() return value. Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.296 retrieving revision 2.297 diff -C2 -d -r2.296 -r2.297 *** bltinmodule.c 16 Sep 2003 03:10:59 -0000 2.296 --- bltinmodule.c 16 Sep 2003 03:17:16 -0000 2.297 *************** *** 2382,2386 **** if (need < 2 * outlen) need = 2 * outlen; ! if (PyUnicode_Resize(&result, need)) { Py_DECREF(item); goto Fail_1; --- 2382,2387 ---- if (need < 2 * outlen) need = 2 * outlen; ! if (PyUnicode_Resize( ! &result, need) < 0) { Py_DECREF(item); goto Fail_1; From jhylton at users.sourceforge.net Mon Sep 15 23:41:47 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Mon Sep 15 23:41:50 2003 Subject: [Python-checkins] python/dist/src/Objects unicodeobject.c, 2.195, 2.196 Message-ID: <E19z6ip-00037q-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv12002 Modified Files: unicodeobject.c Log Message: Change checks of PyUnicode_Resize() return value for clarity. The unicode_resize() family only returns -1 or 0 so simply checking for != 0 is sufficient, but somewhat unclear. Many Python API functions return < 0 on error, reserving the right to return 0 or 1 on success. Change the call sites for consistency with these calls. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.195 retrieving revision 2.196 diff -C2 -d -r2.195 -r2.196 *** unicodeobject.c 27 Aug 2003 04:55:51 -0000 2.195 --- unicodeobject.c 16 Sep 2003 03:41:45 -0000 2.196 *************** *** 190,195 **** /* Keep-Alive optimization: we only upsize the buffer, never downsize it. */ ! if ((unicode->length < length) && ! unicode_resize(unicode, length)) { PyMem_DEL(unicode->str); goto onError; --- 190,195 ---- /* Keep-Alive optimization: we only upsize the buffer, never downsize it. */ ! if ((unicode->length < length) && ! unicode_resize(unicode, length) < 0) { PyMem_DEL(unicode->str); goto onError; *************** *** 251,256 **** } ! int PyUnicode_Resize(PyObject **unicode, ! int length) { register PyUnicodeObject *v; --- 251,255 ---- } ! int PyUnicode_Resize(PyObject **unicode, int length) { register PyUnicodeObject *v; *************** *** 754,758 **** if (requiredsize<2*outsize) requiredsize = 2*outsize; ! if (PyUnicode_Resize(output, requiredsize)) goto onError; *outptr = PyUnicode_AS_UNICODE(*output) + *outpos; --- 753,757 ---- if (requiredsize<2*outsize) requiredsize = 2*outsize; ! if (PyUnicode_Resize(output, requiredsize) < 0) goto onError; *outptr = PyUnicode_AS_UNICODE(*output) + *outpos; *************** *** 950,954 **** } ! if (_PyUnicode_Resize(&unicode, p - PyUnicode_AS_UNICODE(unicode))) goto onError; --- 949,953 ---- } ! if (_PyUnicode_Resize(&unicode, p - PyUnicode_AS_UNICODE(unicode)) < 0) goto onError; *************** *** 1252,1256 **** /* Adjust length */ ! if (_PyUnicode_Resize(&unicode, p - unicode->str)) goto onError; --- 1251,1255 ---- /* Adjust length */ ! if (_PyUnicode_Resize(&unicode, p - unicode->str) < 0) goto onError; *************** *** 1523,1527 **** /* Adjust length */ ! if (_PyUnicode_Resize(&unicode, p - unicode->str)) goto onError; --- 1522,1526 ---- /* Adjust length */ ! if (_PyUnicode_Resize(&unicode, p - unicode->str) < 0) goto onError; *************** *** 1833,1837 **** ; } ! if (_PyUnicode_Resize(&v, (int)(p - PyUnicode_AS_UNICODE(v)))) goto onError; Py_XDECREF(errorHandler); --- 1832,1836 ---- ; } ! if (_PyUnicode_Resize(&v, (int)(p - PyUnicode_AS_UNICODE(v))) < 0) goto onError; Py_XDECREF(errorHandler); *************** *** 2103,2107 **** ; } ! if (_PyUnicode_Resize(&v, (int)(p - PyUnicode_AS_UNICODE(v)))) goto onError; Py_XDECREF(errorHandler); --- 2102,2106 ---- ; } ! if (_PyUnicode_Resize(&v, (int)(p - PyUnicode_AS_UNICODE(v))) < 0) goto onError; Py_XDECREF(errorHandler); *************** *** 2539,2543 **** } if (p - PyUnicode_AS_UNICODE(v) < PyString_GET_SIZE(v)) ! if (_PyUnicode_Resize(&v, (int)(p - PyUnicode_AS_UNICODE(v)))) goto onError; Py_XDECREF(errorHandler); --- 2538,2542 ---- } if (p - PyUnicode_AS_UNICODE(v) < PyString_GET_SIZE(v)) ! if (_PyUnicode_Resize(&v, (int)(p - PyUnicode_AS_UNICODE(v))) < 0) goto onError; Py_XDECREF(errorHandler); *************** *** 2736,2740 **** extrachars += needed; if (_PyUnicode_Resize(&v, ! PyUnicode_GET_SIZE(v) + needed)) { Py_DECREF(x); goto onError; --- 2735,2739 ---- extrachars += needed; if (_PyUnicode_Resize(&v, ! PyUnicode_GET_SIZE(v) + needed) < 0) { Py_DECREF(x); goto onError; *************** *** 2761,2765 **** } if (p - PyUnicode_AS_UNICODE(v) < PyUnicode_GET_SIZE(v)) ! if (_PyUnicode_Resize(&v, (int)(p - PyUnicode_AS_UNICODE(v)))) goto onError; Py_XDECREF(errorHandler); --- 2760,2764 ---- } if (p - PyUnicode_AS_UNICODE(v) < PyUnicode_GET_SIZE(v)) ! if (_PyUnicode_Resize(&v, (int)(p - PyUnicode_AS_UNICODE(v))) < 0) goto onError; Py_XDECREF(errorHandler); *************** *** 3220,3224 **** if (requiredsize < 2 * *outsize) requiredsize = 2 * *outsize; ! if (_PyUnicode_Resize(outobj, requiredsize)) return -1; *outp = PyUnicode_AS_UNICODE(*outobj) + outpos; --- 3219,3223 ---- if (requiredsize < 2 * *outsize) requiredsize = 2 * *outsize; ! if (_PyUnicode_Resize(outobj, requiredsize) < 0) return -1; *outp = PyUnicode_AS_UNICODE(*outobj) + outpos; *************** *** 3399,3403 **** respos = str-PyUnicode_AS_UNICODE(res); if (respos<ressize) { ! if (_PyUnicode_Resize(&res, respos)) goto onError; } --- 3398,3402 ---- respos = str-PyUnicode_AS_UNICODE(res); if (respos<ressize) { ! if (_PyUnicode_Resize(&res, respos) < 0) goto onError; } *************** *** 3979,3983 **** itemlen = PyUnicode_GET_SIZE(item); while (reslen + itemlen + seplen >= sz) { ! if (_PyUnicode_Resize(&res, sz*2)) { Py_DECREF(item); goto onError; --- 3978,3982 ---- itemlen = PyUnicode_GET_SIZE(item); while (reslen + itemlen + seplen >= sz) { ! if (_PyUnicode_Resize(&res, sz*2) < 0) { Py_DECREF(item); goto onError; *************** *** 3996,4000 **** Py_DECREF(item); } ! if (_PyUnicode_Resize(&res, reslen)) goto onError; --- 3995,3999 ---- Py_DECREF(item); } ! if (_PyUnicode_Resize(&res, reslen) < 0) goto onError; *************** *** 6660,6664 **** } Py_DECREF(uformat); ! if (_PyUnicode_Resize(&result, reslen - rescnt)) goto onError; return (PyObject *)result; --- 6659,6663 ---- } Py_DECREF(uformat); ! if (_PyUnicode_Resize(&result, reslen - rescnt) < 0) goto onError; return (PyObject *)result; From rhettinger at users.sourceforge.net Tue Sep 16 00:27:54 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 00:27:58 2003 Subject: [Python-checkins] python/dist/src/Python compile.c,2.293,2.294 Message-ID: <E19z7RS-0005BS-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv19599 Modified Files: compile.c Log Message: Improve the leak fix so that PyTuple_New is only called when needed. Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.293 retrieving revision 2.294 diff -C2 -d -r2.293 -r2.294 *** compile.c 15 Sep 2003 21:43:16 -0000 2.293 --- compile.c 16 Sep 2003 04:27:52 -0000 2.294 *************** *** 106,110 **** int flags; PyObject *co; ! PyObject *empty; PyObject *code; PyObject *consts; --- 106,110 ---- int flags; PyObject *co; ! PyObject *empty = NULL; PyObject *code; PyObject *consts; *************** *** 136,146 **** } ! empty = PyTuple_New(0); ! if (empty == NULL) ! return NULL; ! if (freevars == NULL) ! freevars = empty; ! if (cellvars == NULL) ! cellvars = empty; co = (PyObject *) PyCode_New(argcount, nlocals, stacksize, flags, --- 136,148 ---- } ! if (freevars == NULL || cellvars == NULL) { ! empty = PyTuple_New(0); ! if (empty == NULL) ! return NULL; ! if (freevars == NULL) ! freevars = empty; ! if (cellvars == NULL) ! cellvars = empty; ! } co = (PyObject *) PyCode_New(argcount, nlocals, stacksize, flags, *************** *** 148,152 **** freevars, cellvars, filename, name, firstlineno, lnotab); ! Py_DECREF(empty); return co; } --- 150,154 ---- freevars, cellvars, filename, name, firstlineno, lnotab); ! Py_XDECREF(empty); return co; } From rhettinger at users.sourceforge.net Tue Sep 16 00:37:41 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 00:46:14 2003 Subject: [Python-checkins] python/dist/src/Lib/test test___all__.py, 1.34, 1.35 Message-ID: <E19z7av-0006H6-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv24044 Modified Files: test___all__.py Log Message: Test __all__ for unittest.py Index: test___all__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test___all__.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** test___all__.py 1 Jul 2003 05:49:02 -0000 1.34 --- test___all__.py 16 Sep 2003 04:37:39 -0000 1.35 *************** *** 60,64 **** self.check_all("Cookie") self.check_all("MimeWriter") ! self.check_all("Queue") self.check_all("SimpleHTTPServer") self.check_all("SocketServer") --- 60,64 ---- self.check_all("Cookie") self.check_all("MimeWriter") ! self.check_all("Queue") self.check_all("SimpleHTTPServer") self.check_all("SocketServer") *************** *** 175,178 **** --- 175,179 ---- self.check_all("traceback") self.check_all("tty") + self.check_all("unittest") self.check_all("urllib") self.check_all("urlparse") From rhettinger at users.sourceforge.net Tue Sep 16 00:55:35 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 00:55:38 2003 Subject: [Python-checkins] python/dist/src/Lib/test test___all__.py, 1.34, 1.34.6.1 Message-ID: <E19z7sE-0007EF-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv27701/test Modified Files: Tag: release23-maint test___all__.py Log Message: Backport addition of the __all__ attribute for unittest.py Index: test___all__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test___all__.py,v retrieving revision 1.34 retrieving revision 1.34.6.1 diff -C2 -d -r1.34 -r1.34.6.1 *** test___all__.py 1 Jul 2003 05:49:02 -0000 1.34 --- test___all__.py 16 Sep 2003 04:55:32 -0000 1.34.6.1 *************** *** 60,64 **** self.check_all("Cookie") self.check_all("MimeWriter") ! self.check_all("Queue") self.check_all("SimpleHTTPServer") self.check_all("SocketServer") --- 60,64 ---- self.check_all("Cookie") self.check_all("MimeWriter") ! self.check_all("Queue") self.check_all("SimpleHTTPServer") self.check_all("SocketServer") *************** *** 175,178 **** --- 175,179 ---- self.check_all("traceback") self.check_all("tty") + self.check_all("unittest") self.check_all("urllib") self.check_all("urlparse") From rhettinger at users.sourceforge.net Tue Sep 16 00:55:34 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 00:55:40 2003 Subject: [Python-checkins] python/dist/src/Lib unittest.py, 1.24.6.1, 1.24.6.2 Message-ID: <E19z7sE-0007ED-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv27701 Modified Files: Tag: release23-maint unittest.py Log Message: Backport addition of the __all__ attribute for unittest.py Index: unittest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v retrieving revision 1.24.6.1 retrieving revision 1.24.6.2 diff -C2 -d -r1.24.6.1 -r1.24.6.2 *** unittest.py 13 Sep 2003 02:59:00 -0000 1.24.6.1 --- unittest.py 16 Sep 2003 04:55:32 -0000 1.24.6.2 *************** *** 57,60 **** --- 57,70 ---- ############################################################################## + # Exported classes and functions + ############################################################################## + __all__ = ['TestResult', 'TestCase', 'TestSuite', 'TextTestRunner', + 'TestLoader', 'FunctionTestCase', 'main', 'defaultTestLoader'] + + # Expose obsolete functions for backwards compatability + __all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases']) + + + ############################################################################## # Test framework core ############################################################################## From rhettinger at users.sourceforge.net Tue Sep 16 00:36:35 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 01:04:37 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.40,1.831.4.41 Message-ID: <E19z7Zr-0005uJ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv22699/Misc Modified Files: Tag: release23-maint NEWS Log Message: Backport leak fix for new code objects. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.40 retrieving revision 1.831.4.41 diff -C2 -d -r1.831.4.40 -r1.831.4.41 *** NEWS 12 Sep 2003 16:37:45 -0000 1.831.4.40 --- NEWS 16 Sep 2003 04:36:32 -0000 1.831.4.41 *************** *** 13,16 **** --- 13,18 ---- ----------------- + - Fixed a leak when new code objects are instantiated. + - Bug #800796: slice(1).__hash__() now raises a TypeError, unhashable type. From rhettinger at users.sourceforge.net Tue Sep 16 01:29:52 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 01:29:56 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.41,1.831.4.42 Message-ID: <E19z8PQ-0000Ch-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv592/Misc Modified Files: Tag: release23-maint NEWS Log Message: Backport Neal's fix for bug #789402 -- a memory leak in fileobject.c Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.41 retrieving revision 1.831.4.42 diff -C2 -d -r1.831.4.41 -r1.831.4.42 *** NEWS 16 Sep 2003 04:36:32 -0000 1.831.4.41 --- NEWS 16 Sep 2003 05:29:50 -0000 1.831.4.42 *************** *** 13,16 **** --- 13,18 ---- ----------------- + - Bug #789402, fixed memory leak when opening a file object. + - Fixed a leak when new code objects are instantiated. From rhettinger at users.sourceforge.net Tue Sep 16 01:29:52 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 01:29:59 2003 Subject: [Python-checkins] python/dist/src/Objects fileobject.c, 2.179.8.2, 2.179.8.3 Message-ID: <E19z8PQ-0000Cj-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv592/Objects Modified Files: Tag: release23-maint fileobject.c Log Message: Backport Neal's fix for bug #789402 -- a memory leak in fileobject.c Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.179.8.2 retrieving revision 2.179.8.3 diff -C2 -d -r2.179.8.2 -r2.179.8.3 *** fileobject.c 7 Sep 2003 20:43:24 -0000 2.179.8.2 --- fileobject.c 16 Sep 2003 05:29:50 -0000 2.179.8.3 *************** *** 100,103 **** --- 100,104 ---- EISDIR, msg); PyErr_SetObject(PyExc_IOError, exc); + Py_XDECREF(exc); return NULL; } From rhettinger at users.sourceforge.net Tue Sep 16 00:36:35 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 02:26:37 2003 Subject: [Python-checkins] python/dist/src/Python compile.c,2.291,2.291.6.1 Message-ID: <E19z7Zr-0005uO-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv22699/Python Modified Files: Tag: release23-maint compile.c Log Message: Backport leak fix for new code objects. Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.291 retrieving revision 2.291.6.1 diff -C2 -d -r2.291 -r2.291.6.1 *** compile.c 15 Jul 2003 20:23:26 -0000 2.291 --- compile.c 16 Sep 2003 04:36:33 -0000 2.291.6.1 *************** *** 105,108 **** --- 105,110 ---- int stacksize; int flags; + PyObject *co; + PyObject *empty = NULL; PyObject *code; PyObject *consts; *************** *** 128,146 **** return NULL; - if (freevars == NULL || cellvars == NULL) { - PyObject *empty = PyTuple_New(0); - if (empty == NULL) - return NULL; - if (freevars == NULL) { - freevars = empty; - Py_INCREF(freevars); - } - if (cellvars == NULL) { - cellvars = empty; - Py_INCREF(cellvars); - } - Py_DECREF(empty); - } - if (!PyObject_CheckReadBuffer(code)) { PyErr_SetString(PyExc_TypeError, --- 130,133 ---- *************** *** 149,156 **** } ! return (PyObject *)PyCode_New(argcount, nlocals, stacksize, flags, code, consts, names, varnames, freevars, cellvars, filename, name, ! firstlineno, lnotab); } --- 136,155 ---- } ! if (freevars == NULL || cellvars == NULL) { ! empty = PyTuple_New(0); ! if (empty == NULL) ! return NULL; ! if (freevars == NULL) ! freevars = empty; ! if (cellvars == NULL) ! cellvars = empty; ! } ! ! co = (PyObject *) PyCode_New(argcount, nlocals, stacksize, flags, code, consts, names, varnames, freevars, cellvars, filename, name, ! firstlineno, lnotab); ! Py_XDECREF(empty); ! return co; } From rhettinger at users.sourceforge.net Tue Sep 16 03:11:48 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 03:11:52 2003 Subject: [Python-checkins] python/dist/src/Objects classobject.c, 2.170, 2.171 Message-ID: <E19zA04-0004kY-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv17931 Modified Files: classobject.c Log Message: Fix leak in classobject.c. The leak surfaced on the error exit when hashing a class that does not define __hash__ but does define a comparison. Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.170 retrieving revision 2.171 diff -C2 -d -r2.170 -r2.171 *** classobject.c 9 Apr 2003 19:35:08 -0000 2.170 --- classobject.c 16 Sep 2003 07:11:46 -0000 2.171 *************** *** 954,957 **** --- 954,958 ---- } } + Py_XDECREF(func); PyErr_SetString(PyExc_TypeError, "unhashable instance"); return -1; From rhettinger at users.sourceforge.net Tue Sep 16 03:13:58 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 03:14:01 2003 Subject: [Python-checkins] python/dist/src/Objects classobject.c, 2.170, 2.170.10.1 Message-ID: <E19zA2A-0004qz-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv18632/Objects Modified Files: Tag: release23-maint classobject.c Log Message: Fix leak in classobject.c. The leak surfaced on the error exit when hashing a class that does not define __hash__ but does define a comparison. Index: classobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v retrieving revision 2.170 retrieving revision 2.170.10.1 diff -C2 -d -r2.170 -r2.170.10.1 *** classobject.c 9 Apr 2003 19:35:08 -0000 2.170 --- classobject.c 16 Sep 2003 07:13:56 -0000 2.170.10.1 *************** *** 954,957 **** --- 954,958 ---- } } + Py_XDECREF(func); PyErr_SetString(PyExc_TypeError, "unhashable instance"); return -1; From rhettinger at users.sourceforge.net Tue Sep 16 03:13:59 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 03:14:04 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.42,1.831.4.43 Message-ID: <E19zA2B-0004r4-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv18632/Misc Modified Files: Tag: release23-maint NEWS Log Message: Fix leak in classobject.c. The leak surfaced on the error exit when hashing a class that does not define __hash__ but does define a comparison. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.42 retrieving revision 1.831.4.43 diff -C2 -d -r1.831.4.42 -r1.831.4.43 *** NEWS 16 Sep 2003 05:29:50 -0000 1.831.4.42 --- NEWS 16 Sep 2003 07:13:56 -0000 1.831.4.43 *************** *** 13,16 **** --- 13,19 ---- ----------------- + - Fixed a leak in class objects defining a comparison but not a hash + function. + - Bug #789402, fixed memory leak when opening a file object. From akuchling at users.sourceforge.net Tue Sep 16 08:07:58 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue Sep 16 08:08:05 2003 Subject: [Python-checkins] python/nondist/peps pep-0321.txt, NONE, 1.1 pep-0000.txt, 1.251, 1.252 Message-ID: <E19zEcg-00022z-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv7859 Modified Files: pep-0000.txt Added Files: pep-0321.txt Log Message: Add PEP 321: Date/time parsing --- NEW FILE: pep-0321.txt --- PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.1 $ Last-Modified: $Date: 2003/09/16 12:07:56 $ Author: A.M. Kuchling <amk@amk.ca> Status: Draft Type: Standards Track Content-Type: text/x-rst Python-Version: 2.4 Created: 16-Sep-2003 Post-History: Abstract ======== Python 2.3 added a number of simple date and time types in the ``datetime`` module. There's no support for parsing strings in various formats and returning a corresponding instance of one of the types. This PEP proposes adding a family of predefined parsing function for several commonly used date and time formats, and a facility for generic parsing. The types provided by the ``datetime`` module all have ``.isoformat()`` and ``.ctime()`` methods that return string representations of a time, and the ``.strftime()`` method can be used to construct new formats. There are a number of additional commonly-used formats that would be useful to have as part of the standard library; this PEP also suggests how to add them. Input Formats ======================= Useful formats to support include `ISO8601`_, `RFC2822`_, `ctime`_, and some that are commonly written by humans such as the American "MM/DD/YYYY", the European "YYYY/MM/DD", and variants such as "DD-Month-YYYY". XXX The Perl `ParseDate.pm`_ module supports many different input formats, both absolute and relative. Should we try to support them all? Options: 1) Add functions to the ``datetime`` module:: import datetime d = datetime.parse_iso8601("2003-09-15T10:34:54") 2) Add class methods to the various types. There are already various class methods such as ``.now()``, so this would be pretty natural.:: import datetime d = datetime.date.parse_iso8601("2003-09-15T10:34:54") 3) Add a separate module (possible names: date, date_parse, parse_date) or subpackage (possible names: datetime.parser) containing parsing functions:: import datetime d = datetime.parser.parse_iso8601("2003-09-15T10:34:54") Unresolved questions: * Naming convention to use. * What exception to raise on errors? ValueError, or a specialized exception? * Should you know what type you're expecting, or should the parsing figure it out? (e.g. ``parse_iso8601("yyyy-mm-dd")`` returns a ``date`` instance, but parsing "yyyy-mm-ddThh:mm:ss" returns a ``datetime``.) Should there be an option to signal an error if a time is provided where none is expected, or if no time is provided? * Anything special required for I18N? For time zones? Generic Input Parsing ======================= Is a strptime() implementation that returns ``datetime`` types sufficient? XXX if yes, describe strptime here. Can the existing pure-Python implementation be easily retargeted? Output Formats ======================= Not all input formats need to be supported as output formats, because it's pretty trivial to get the ``strftime()`` argument right for simple things such as YYYY/MM/DD. Only complicated formats need to be supported; RFC2822 is currently the only one I can think of. Options: 1) Provide predefined format strings, so you could write this:: import datetime d = datetime.datetime(...) print d.strftime(d.RFC2822_FORMAT) # or datetime.RFC2822_FORMAT? 2) Provide new methods on all the objects:: d = datetime.datetime(...) print d.rfc822_time() References ========== .. _RFC2822: http://rfc2822.x42.com .. _ISO8601: http://www.cl.cam.ac.uk/~mgk25/iso-time.html .. _ParseDate.pm: http://search.cpan.org/author/MUIR/Time-modules-2003.0211/lib/Time/ParseDate.pm .. _ctime: http://www.opengroup.org/onlinepubs/007908799/xsh/asctime.html Other useful links: http://www.egenix.com/files/python/mxDateTime.html http://ringmaster.arc.nasa.gov/tools/time_formats.html http://www.thinkage.ca/english/gcos/expl/b/lib/0tosec.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.251 retrieving revision 1.252 diff -C2 -d -r1.251 -r1.252 *** pep-0000.txt 7 Sep 2003 13:56:12 -0000 1.251 --- pep-0000.txt 16 Sep 2003 12:07:56 -0000 1.252 *************** *** 117,120 **** --- 117,121 ---- S 318 Function/Method Decorator Syntax Smith S 319 Python Synchronize/Asynchronize Block Pelletier + S 321 Date/Time Parsing and Formatting Kuchling S 754 IEEE 754 Floating Point Special Values Warnes *************** *** 334,337 **** --- 335,339 ---- S 319 Python Synchronize/Asynchronize Block Pelletier I 320 Python 2.4 Release Schedule Warsaw + S 321 Date/Time Parsing and Formatting Kuchling SR 666 Reject Foolish Indentation Creighton S 754 IEEE 754 Floating Point Special Values Warnes From jhylton at users.sourceforge.net Tue Sep 16 15:41:41 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Tue Sep 16 15:41:51 2003 Subject: [Python-checkins] python/dist/src/Objects unicodeobject.c, 2.196, 2.197 Message-ID: <E19zLhl-0005tY-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv22624/Objects Modified Files: unicodeobject.c Log Message: Double-fix of crash in Unicode freelist handling. If a length-1 Unicode string was in the freelist and it was uninitialized or pointed to a very large (magnitude) negative number, the check unicode_latin1[unicode->str[0]] == unicode could cause a segmentation violation, e.g. unicode->str[0] is 0xcbcbcbcb. Fix this in two ways: 1. Change guard befor unicode_latin1[] to test against 256U. If I understand correctly, the unsigned long used to store UCS4 on my box was getting converted to a signed long to compare with the signed constant 256. 2. Change _PyUnicode_New() to make sure the first element of str is always initialized to zero. There are several places in the code where the caller can exit with an error before initializing any of str, which would leave junk in str[0]. Also, silence a compiler warning on pointer vs. int arithmetic. Bug fix candidate. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.196 retrieving revision 2.197 diff -C2 -d -r2.196 -r2.197 *** unicodeobject.c 16 Sep 2003 03:41:45 -0000 2.196 --- unicodeobject.c 16 Sep 2003 19:41:39 -0000 2.197 *************** *** 133,137 **** if (unicode == unicode_empty || (unicode->length == 1 && ! unicode->str[0] < 256 && unicode_latin1[unicode->str[0]] == unicode)) { PyErr_SetString(PyExc_SystemError, --- 133,138 ---- if (unicode == unicode_empty || (unicode->length == 1 && ! /* XXX Is unicode->str[] always unsigned? */ ! unicode->str[0] < 256U && unicode_latin1[unicode->str[0]] == unicode)) { PyErr_SetString(PyExc_SystemError, *************** *** 212,215 **** --- 213,220 ---- goto onError; } + /* Initialize the first element to guard against cases where + the caller fails before initializing str. + */ + unicode->str[0] = 0; unicode->str[length] = 0; unicode->length = length; *************** *** 2528,2532 **** startinpos = s-starts; endinpos = startinpos + 1; ! outpos = p-PyUnicode_AS_UNICODE(v); if (unicode_decode_call_errorhandler( errors, &errorHandler, --- 2533,2537 ---- startinpos = s-starts; endinpos = startinpos + 1; ! outpos = p - (Py_UNICODE *)PyUnicode_AS_UNICODE(v); if (unicode_decode_call_errorhandler( errors, &errorHandler, From jhylton at users.sourceforge.net Tue Sep 16 15:41:41 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Tue Sep 16 15:41:56 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.855,1.856 Message-ID: <E19zLhl-0005tU-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv22624/Misc Modified Files: NEWS Log Message: Double-fix of crash in Unicode freelist handling. If a length-1 Unicode string was in the freelist and it was uninitialized or pointed to a very large (magnitude) negative number, the check unicode_latin1[unicode->str[0]] == unicode could cause a segmentation violation, e.g. unicode->str[0] is 0xcbcbcbcb. Fix this in two ways: 1. Change guard befor unicode_latin1[] to test against 256U. If I understand correctly, the unsigned long used to store UCS4 on my box was getting converted to a signed long to compare with the signed constant 256. 2. Change _PyUnicode_New() to make sure the first element of str is always initialized to zero. There are several places in the code where the caller can exit with an error before initializing any of str, which would leave junk in str[0]. Also, silence a compiler warning on pointer vs. int arithmetic. Bug fix candidate. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.855 retrieving revision 1.856 diff -C2 -d -r1.855 -r1.856 *** NEWS 12 Sep 2003 06:33:36 -0000 1.855 --- NEWS 16 Sep 2003 19:41:38 -0000 1.856 *************** *** 13,16 **** --- 13,21 ---- ----------------- + - Fixed a bug in the cache of length-one Unicode strings that could + lead to a seg fault. The specific problem occurred when an earlier, + non-fatal error left an uninitialized Unicode object in the + freelist. + - The % formatting operator now supports '%F' which is equivalent to '%f'. This has always been documented but never implemented. From jhylton at users.sourceforge.net Tue Sep 16 16:30:05 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Tue Sep 16 16:30:08 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.43,1.831.4.44 Message-ID: <E19zMSb-0004Zj-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv17511/Misc Modified Files: Tag: release23-maint NEWS Log Message: Backport: Double-fix of crash in Unicode freelist handling. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.43 retrieving revision 1.831.4.44 diff -C2 -d -r1.831.4.43 -r1.831.4.44 *** NEWS 16 Sep 2003 07:13:56 -0000 1.831.4.43 --- NEWS 16 Sep 2003 20:30:01 -0000 1.831.4.44 *************** *** 13,16 **** --- 13,21 ---- ----------------- + - Fixed a bug in the cache of length-one Unicode strings that could + lead to a seg fault. The specific problem occurred when an earlier, + non-fatal error left an uninitialized Unicode object in the + freelist. + - Fixed a leak in class objects defining a comparison but not a hash function. From jhylton at users.sourceforge.net Tue Sep 16 16:30:05 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Tue Sep 16 16:30:11 2003 Subject: [Python-checkins] python/dist/src/Objects unicodeobject.c, 2.190.6.5, 2.190.6.6 Message-ID: <E19zMSb-0004Zu-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv17511/Objects Modified Files: Tag: release23-maint unicodeobject.c Log Message: Backport: Double-fix of crash in Unicode freelist handling. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.190.6.5 retrieving revision 2.190.6.6 diff -C2 -d -r2.190.6.5 -r2.190.6.6 *** unicodeobject.c 27 Aug 2003 05:08:19 -0000 2.190.6.5 --- unicodeobject.c 16 Sep 2003 20:30:03 -0000 2.190.6.6 *************** *** 133,137 **** if (unicode == unicode_empty || (unicode->length == 1 && ! unicode->str[0] < 256 && unicode_latin1[unicode->str[0]] == unicode)) { PyErr_SetString(PyExc_SystemError, --- 133,137 ---- if (unicode == unicode_empty || (unicode->length == 1 && ! unicode->str[0] < 256U && unicode_latin1[unicode->str[0]] == unicode)) { PyErr_SetString(PyExc_SystemError, *************** *** 212,215 **** --- 212,216 ---- goto onError; } + unicode->str[0] = 0; unicode->str[length] = 0; unicode->length = length; From tim_one at users.sourceforge.net Tue Sep 16 16:31:02 2003 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Tue Sep 16 16:31:04 2003 Subject: [Python-checkins] python/dist/src/Objects unicodeobject.c, 2.197, 2.198 Message-ID: <E19zMTW-0004cb-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv17421/Objects Modified Files: unicodeobject.c Log Message: On c.l.py, Martin v. Löwis said that Py_UNICODE could be of a signed type, so fiddle Jeremy's fix to live with that. Also added more comments. Bugfix candidate (this bug is in all versions of Python, at least since 2.1). Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.197 retrieving revision 2.198 diff -C2 -d -r2.197 -r2.198 *** unicodeobject.c 16 Sep 2003 19:41:39 -0000 2.197 --- unicodeobject.c 16 Sep 2003 20:30:58 -0000 2.198 *************** *** 1,3 **** ! /* Unicode implementation based on original code by Fredrik Lundh, --- 1,3 ---- ! /* Unicode implementation based on original code by Fredrik Lundh, *************** *** 54,58 **** The implementation will keep allocated Unicode memory intact for [...1534 lines suppressed...] } --- 6333,6337 ---- if (dict == NULL) { PyErr_SetString(PyExc_TypeError, ! "format requires a mapping"); goto onError; } *************** *** 6571,6575 **** "unsupported format character '%c' (0x%x) " "at index %i", ! (31<=c && c<=126) ? (char)c : '?', (int)c, (int)(fmt -1 - PyUnicode_AS_UNICODE(uformat))); --- 6579,6583 ---- "unsupported format character '%c' (0x%x) " "at index %i", ! (31<=c && c<=126) ? (char)c : '?', (int)c, (int)(fmt -1 - PyUnicode_AS_UNICODE(uformat))); From rhettinger at users.sourceforge.net Tue Sep 16 17:42:15 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 17:42:18 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.44,1.831.4.45 Message-ID: <E19zNaR-0000Yp-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv1770/Misc Modified Files: Tag: release23-maint NEWS Log Message: Fix documentation bugs. Add support for iterators and other mapping methods. Convert tests to unittest format and expand their coverage. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.44 retrieving revision 1.831.4.45 diff -C2 -d -r1.831.4.44 -r1.831.4.45 *** NEWS 16 Sep 2003 20:30:01 -0000 1.831.4.44 --- NEWS 16 Sep 2003 21:42:12 -0000 1.831.4.45 *************** *** 60,63 **** --- 60,66 ---- ------- + - The bsddb module and dbhash module now support the iterator and + mapping protocols. + - Bug #711632: Reset all state members in HTMLParser.reset. From rhettinger at users.sourceforge.net Tue Sep 16 17:42:15 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 17:42:22 2003 Subject: [Python-checkins] python/dist/src/Lib/bsddb __init__.py, 1.5, 1.5.10.1 Message-ID: <E19zNaR-0000Yr-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/bsddb In directory sc8-pr-cvs1:/tmp/cvs-serv1770/Lib/bsddb Modified Files: Tag: release23-maint __init__.py Log Message: Fix documentation bugs. Add support for iterators and other mapping methods. Convert tests to unittest format and expand their coverage. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/__init__.py,v retrieving revision 1.5 retrieving revision 1.5.10.1 diff -C2 -d -r1.5 -r1.5.10.1 *** __init__.py 24 Apr 2003 16:02:44 -0000 1.5 --- __init__.py 16 Sep 2003 21:42:13 -0000 1.5.10.1 *************** *** 53,58 **** #---------------------------------------------------------------------- ! class _DBWithCursor: """ A simple wrapper around DB that makes it look like the bsddbobject in --- 53,59 ---- #---------------------------------------------------------------------- + import UserDict ! class _DBWithCursor(UserDict.DictMixin): """ A simple wrapper around DB that makes it look like the bsddbobject in *************** *** 145,148 **** --- 146,166 ---- return self.db.sync() + def __iter__(self): + try: + yield self.first()[0] + next = self.next + while 1: + yield next()[0] + except _bsddb.DBNotFoundError: + return + + def iteritems(self): + try: + yield self.first() + next = self.next + while 1: + yield next() + except _bsddb.DBNotFoundError: + return #---------------------------------------------------------------------- From rhettinger at users.sourceforge.net Tue Sep 16 17:42:15 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 17:42:24 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_bsddb.py, 1.12, 1.12.16.1 Message-ID: <E19zNaR-0000Yy-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv1770/Lib/test Modified Files: Tag: release23-maint test_bsddb.py Log Message: Fix documentation bugs. Add support for iterators and other mapping methods. Convert tests to unittest format and expand their coverage. Index: test_bsddb.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bsddb.py,v retrieving revision 1.12 retrieving revision 1.12.16.1 diff -C2 -d -r1.12 -r1.12.16.1 *** test_bsddb.py 9 Aug 2002 16:37:35 -0000 1.12 --- test_bsddb.py 16 Sep 2003 21:42:13 -0000 1.12.16.1 *************** *** 1,82 **** #! /usr/bin/env python ! """Test script for the bsddb C module ! Roger E. Masse """ import os import bsddb import dbhash # Just so we know it's imported ! from test.test_support import verbose, verify, TESTFN ! def test(openmethod, what, ondisk=1): ! if verbose: ! print '\nTesting: ', what, (ondisk and "on disk" or "in memory") ! if ondisk: ! fname = TESTFN ! else: ! fname = None ! f = openmethod(fname, 'c') ! verify(f.keys() == []) ! if verbose: ! print 'creation...' ! f['0'] = '' ! f['a'] = 'Guido' ! f['b'] = 'van' ! f['c'] = 'Rossum' ! f['d'] = 'invented' ! f['f'] = 'Python' ! if verbose: ! print '%s %s %s' % (f['a'], f['b'], f['c']) ! if what == 'BTree' : ! if verbose: ! print 'key ordering...' ! f.set_location(f.first()[0]) ! while 1: ! try: ! rec = f.next() ! except KeyError: ! if rec != f.last(): ! print 'Error, last != last!' ! f.previous() ! break ! if verbose: ! print rec ! if not f.has_key('a'): ! print 'Error, missing key!' ! f.sync() ! f.close() ! if ondisk: ! # if we're using an in-memory only db, we can't reopen it ! # so finish here. ! if verbose: ! print 'modification...' ! f = openmethod(fname, 'w') ! f['d'] = 'discovered' ! if verbose: ! print 'access...' ! for key in f.keys(): ! word = f[key] ! if verbose: ! print word ! f.close() ! try: ! os.remove(fname) ! except os.error: ! pass ! types = [(bsddb.btopen, 'BTree'), ! (bsddb.hashopen, 'Hash Table'), ! (bsddb.btopen, 'BTree', 0), ! (bsddb.hashopen, 'Hash Table', 0), ! # (bsddb.rnopen,'Record Numbers'), 'put' for RECNO for bsddb 1.85 ! # appears broken... at least on ! # Solaris Intel - rmasse 1/97 ! ] ! for type in types: ! test(*type) --- 1,167 ---- #! /usr/bin/env python ! """Test script for the bsddb C module by Roger E. Masse ! Adapted to unittest format and expanded scope by Raymond Hettinger """ import os import bsddb import dbhash # Just so we know it's imported ! import unittest ! from test import test_support ! from sets import Set ! class TestBSDDB(unittest.TestCase): ! def setUp(self): ! self.f = self.openmethod[0](self.fname, 'c') ! self.d = dict(q='Guido', w='van', e='Rossum', r='invented', t='Python', y='') ! for k, v in self.d.iteritems(): ! self.f[k] = v ! def tearDown(self): ! self.f.sync() ! self.f.close() ! if self.fname is None: ! return ! try: ! os.remove(self.fname) ! except os.error: ! pass ! def test_getitem(self): ! for k, v in self.d.iteritems(): ! self.assertEqual(self.f[k], v) ! def test_len(self): ! self.assertEqual(len(self.f), len(self.d)) ! def test_change(self): ! self.f['r'] = 'discovered' ! self.assertEqual(self.f['r'], 'discovered') ! self.assert_('r' in self.f.keys()) ! self.assert_('discovered' in self.f.values()) ! def test_close_and_reopen(self): ! if self.fname is None: ! # if we're using an in-memory only db, we can't reopen it ! # so finish here. ! return ! self.f.close() ! self.f = self.openmethod[0](self.fname, 'w') ! for k, v in self.d.iteritems(): ! self.assertEqual(self.f[k], v) ! def assertSetEquals(self, seqn1, seqn2): ! self.assertEqual(Set(seqn1), Set(seqn2)) ! def test_mapping_iteration_methods(self): ! f = self.f ! d = self.d ! self.assertSetEquals(d, f) ! self.assertSetEquals(d.keys(), f.keys()) ! self.assertSetEquals(d.values(), f.values()) ! self.assertSetEquals(d.items(), f.items()) ! self.assertSetEquals(d.iterkeys(), f.iterkeys()) ! self.assertSetEquals(d.itervalues(), f.itervalues()) ! self.assertSetEquals(d.iteritems(), f.iteritems()) ! ! def test_first_next_looping(self): ! items = [self.f.first()] ! for i in xrange(1, len(self.f)): ! items.append(self.f.next()) ! self.assertSetEquals(items, self.d.items()) ! ! def test_previous_last_looping(self): ! items = [self.f.last()] ! for i in xrange(1, len(self.f)): ! items.append(self.f.previous()) ! self.assertSetEquals(items, self.d.items()) ! ! def test_set_location(self): ! self.assertEqual(self.f.set_location('e'), ('e', self.d['e'])) ! ! def test_contains(self): ! for k in self.d: ! self.assert_(k in self.f) ! self.assert_('not here' not in self.f) ! ! def test_has_key(self): ! for k in self.d: ! self.assert_(self.f.has_key(k)) ! self.assert_(not self.f.has_key('not here')) ! ! def test_clear(self): ! self.f.clear() ! self.assertEqual(len(self.f), 0) ! ! def test_popitem(self): ! k, v = self.f.popitem() ! self.assert_(k in self.d) ! self.assert_(v in self.d.values()) ! self.assert_(k not in self.f) ! self.assertEqual(len(self.d)-1, len(self.f)) ! ! def test_pop(self): ! k = 'w' ! v = self.f.pop(k) ! self.assertEqual(v, self.d[k]) ! self.assert_(k not in self.f) ! self.assert_(v not in self.f.values()) ! self.assertEqual(len(self.d)-1, len(self.f)) ! ! def test_get(self): ! self.assertEqual(self.f.get('NotHere'), None) ! self.assertEqual(self.f.get('NotHere', 'Default'), 'Default') ! self.assertEqual(self.f.get('q', 'Default'), self.d['q']) ! ! def test_setdefault(self): ! self.assertEqual(self.f.setdefault('new', 'dog'), 'dog') ! self.assertEqual(self.f.setdefault('r', 'cat'), self.d['r']) ! ! def test_update(self): ! new = dict(y='life', u='of', i='brian') ! self.f.update(new) ! self.d.update(new) ! for k, v in self.d.iteritems(): ! self.assertEqual(self.f[k], v) ! ! def test_keyordering(self): ! if self.openmethod[0] is not bsddb.btopen: ! return ! keys = self.d.keys() ! keys.sort() ! self.assertEqual(self.f.first()[0], keys[0]) ! self.assertEqual(self.f.next()[0], keys[1]) ! self.assertEqual(self.f.last()[0], keys[-1]) ! self.assertEqual(self.f.previous()[0], keys[-2]) ! self.assertEqual(list(self.f), keys) ! ! class TestBTree(TestBSDDB): ! fname = test_support.TESTFN ! openmethod = [bsddb.btopen] ! ! class TestBTree_InMemory(TestBSDDB): ! fname = None ! openmethod = [bsddb.btopen] ! ! class TestHashTable(TestBSDDB): ! fname = test_support.TESTFN ! openmethod = [bsddb.hashopen] ! ! class TestHashTable_InMemory(TestBSDDB): ! fname = None ! openmethod = [bsddb.hashopen] ! ! ## # (bsddb.rnopen,'Record Numbers'), 'put' for RECNO for bsddb 1.85 ! ## # appears broken... at least on ! ## # Solaris Intel - rmasse 1/97 ! ! def test_main(verbose=None): ! test_support.run_unittest( ! TestBTree, ! TestHashTable, ! TestBTree_InMemory, ! TestHashTable_InMemory, ! ) ! ! if __name__ == "__main__": ! test_main(verbose=True) From rhettinger at users.sourceforge.net Tue Sep 16 17:42:15 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 17:42:28 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libdbhash.tex, 1.5.36.1, 1.5.36.2 libbsddb.tex, 1.11, 1.11.10.1 Message-ID: <E19zNaR-0000Z3-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv1770/Doc/lib Modified Files: Tag: release23-maint libdbhash.tex libbsddb.tex Log Message: Fix documentation bugs. Add support for iterators and other mapping methods. Convert tests to unittest format and expand their coverage. Index: libdbhash.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdbhash.tex,v retrieving revision 1.5.36.1 retrieving revision 1.5.36.2 diff -C2 -d -r1.5.36.1 -r1.5.36.2 *** libdbhash.tex 10 Sep 2003 04:45:22 -0000 1.5.36.1 --- libdbhash.tex 16 Sep 2003 21:42:13 -0000 1.5.36.2 *************** *** 52,61 **** The database objects returned by \function{open()} provide the methods ! common to all the DBM-style databases. The following methods are ! available in addition to the standard methods. \begin{methoddesc}[dbhash]{first}{} ! It's possible to loop over every key in the database using this method ! and the \method{next()} method. The traversal is ordered by the databases internal hash values, and won't be sorted by the key values. This method returns the starting key. --- 52,61 ---- The database objects returned by \function{open()} provide the methods ! common to all the DBM-style databases and mapping objects. The following ! methods are available in addition to the standard methods. \begin{methoddesc}[dbhash]{first}{} ! It's possible to loop over every key/value pair in the database using ! this method and the \method{next()} method. The traversal is ordered by the databases internal hash values, and won't be sorted by the key values. This method returns the starting key. *************** *** 63,72 **** \begin{methoddesc}[dbhash]{last}{} ! Return the last key in a database traversal. This may be used to begin a reverse-order traversal; see \method{previous()}. \end{methoddesc} \begin{methoddesc}[dbhash]{next}{} ! Returns the key next key in a database traversal. The following code prints every key in the database \code{db}, without having to create a list in memory that contains them all: --- 63,72 ---- \begin{methoddesc}[dbhash]{last}{} ! Return the last key/value pair in a database traversal. This may be used to begin a reverse-order traversal; see \method{previous()}. \end{methoddesc} \begin{methoddesc}[dbhash]{next}{} ! Returns the key next key/value pair in a database traversal. The following code prints every key in the database \code{db}, without having to create a list in memory that contains them all: *************** *** 74,78 **** \begin{verbatim} print db.first() ! for i in xrange(1, len(d)): print db.next() \end{verbatim} --- 74,78 ---- \begin{verbatim} print db.first() ! for i in xrange(1, len(db)): print db.next() \end{verbatim} *************** *** 80,84 **** \begin{methoddesc}[dbhash]{previous}{} ! Returns the previous key in a forward-traversal of the database. In conjunction with \method{last()}, this may be used to implement a reverse-order traversal. --- 80,84 ---- \begin{methoddesc}[dbhash]{previous}{} ! Returns the previous key/value pair in a forward-traversal of the database. In conjunction with \method{last()}, this may be used to implement a reverse-order traversal. Index: libbsddb.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbsddb.tex,v retrieving revision 1.11 retrieving revision 1.11.10.1 diff -C2 -d -r1.11 -r1.11.10.1 *** libbsddb.tex 28 May 2003 16:20:03 -0000 1.11 --- libbsddb.tex 16 Sep 2003 21:42:13 -0000 1.11.10.1 *************** *** 101,106 **** \subsection{Hash, BTree and Record Objects \label{bsddb-objects}} ! Once instantiated, hash, btree and record objects support the following ! methods: \begin{methoddesc}{close}{} --- 101,108 ---- \subsection{Hash, BTree and Record Objects \label{bsddb-objects}} ! Once instantiated, hash, btree and record objects support ! the same methods as dictionaries. In addition, they support ! the methods listed below. ! \versionchanged[Added mapping methods]{2.3.1} \begin{methoddesc}{close}{} *************** *** 178,181 **** --- 180,197 ---- >>> db.previous() ('1', '1') + >>> for k, v in db.iteritems(): + ... print k, v + 0 0 + 1 1 + 2 4 + 3 9 + 4 16 + 5 25 + 6 36 + 7 49 + 8 64 + 9 81 + >>> 8 in db + True >>> db.sync() 0 From rhettinger at users.sourceforge.net Tue Sep 16 17:45:24 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 17:45:27 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libdbhash.tex, 1.7, 1.8 libbsddb.tex, 1.12, 1.13 Message-ID: <E19zNdU-0000kU-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv2869 Modified Files: libdbhash.tex libbsddb.tex Log Message: Minor fixups Index: libdbhash.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdbhash.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** libdbhash.tex 12 Sep 2003 06:33:37 -0000 1.7 --- libdbhash.tex 16 Sep 2003 21:45:22 -0000 1.8 *************** *** 74,78 **** \begin{verbatim} print db.first() ! for i in xrange(1, len(d)): print db.next() \end{verbatim} --- 74,78 ---- \begin{verbatim} print db.first() ! for i in xrange(1, len(db)): print db.next() \end{verbatim} Index: libbsddb.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbsddb.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** libbsddb.tex 12 Sep 2003 06:33:37 -0000 1.12 --- libbsddb.tex 16 Sep 2003 21:45:22 -0000 1.13 *************** *** 103,107 **** Once instantiated, hash, btree and record objects support the same methods as dictionaries. In addition, they support ! the following methods: \begin{methoddesc}{close}{} --- 103,108 ---- Once instantiated, hash, btree and record objects support the same methods as dictionaries. In addition, they support ! the methods listed below. ! \versionchanged[Added dictionary methods]{2.3.1} \begin{methoddesc}{close}{} From rhettinger at users.sourceforge.net Tue Sep 16 18:04:34 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 18:04:36 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libunittest.tex, 1.14, 1.15 Message-ID: <E19zNw2-0001np-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv6908 Modified Files: libunittest.tex Log Message: * Minor wording change * Reference the doctest.DocTestSuite() conversion tool. Index: libunittest.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libunittest.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** libunittest.tex 10 Jul 2003 22:14:41 -0000 1.14 --- libunittest.tex 16 Sep 2003 22:04:31 -0000 1.15 *************** *** 92,96 **** ! \subsection{Minimal example \label{minimal-example}} The \module{unittest} module provides a rich set of tools for --- 92,96 ---- ! \subsection{Basic example \label{minimal-example}} The \module{unittest} module provides a rich set of tools for *************** *** 388,392 **** You can place the definitions of test cases and test suites in the ! same modules as the code they are to test (e.g.\ \file{widget.py}), but there are several advantages to placing the test code in a separate module, such as \file{widgettests.py}: --- 388,392 ---- You can place the definitions of test cases and test suites in the ! same modules as the code they are to test (such as \file{widget.py}), but there are several advantages to placing the test code in a separate module, such as \file{widgettests.py}: *************** *** 516,519 **** --- 516,525 ---- \end{verbatim} \end{funcdesc} + + In some cases, the existing tests may have be written using the + \module{doctest} module. If so, that module provides a + \class{DocTestSuite} class that can automatically build + \class{unittest.TestSuite} instances from the existing test code. + \versionadded{2.3} From rhettinger at users.sourceforge.net Tue Sep 16 18:05:36 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 16 18:05:39 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libunittest.tex, 1.14, 1.14.8.1 Message-ID: <E19zNx2-0001rl-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv7130 Modified Files: Tag: release23-maint libunittest.tex Log Message: * Minor wording change * Reference the doctest.DocTestSuite() conversion tool. Index: libunittest.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libunittest.tex,v retrieving revision 1.14 retrieving revision 1.14.8.1 diff -C2 -d -r1.14 -r1.14.8.1 *** libunittest.tex 10 Jul 2003 22:14:41 -0000 1.14 --- libunittest.tex 16 Sep 2003 22:05:33 -0000 1.14.8.1 *************** *** 92,96 **** ! \subsection{Minimal example \label{minimal-example}} The \module{unittest} module provides a rich set of tools for --- 92,96 ---- ! \subsection{Basic example \label{minimal-example}} The \module{unittest} module provides a rich set of tools for *************** *** 388,392 **** You can place the definitions of test cases and test suites in the ! same modules as the code they are to test (e.g.\ \file{widget.py}), but there are several advantages to placing the test code in a separate module, such as \file{widgettests.py}: --- 388,392 ---- You can place the definitions of test cases and test suites in the ! same modules as the code they are to test (such as \file{widget.py}), but there are several advantages to placing the test code in a separate module, such as \file{widgettests.py}: *************** *** 516,519 **** --- 516,525 ---- \end{verbatim} \end{funcdesc} + + In some cases, the existing tests may have be written using the + \module{doctest} module. If so, that module provides a + \class{DocTestSuite} class that can automatically build + \class{unittest.TestSuite} instances from the existing test code. + \versionadded{2.3} From jhylton at users.sourceforge.net Tue Sep 16 23:22:30 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Tue Sep 16 23:22:34 2003 Subject: [Python-checkins] python/dist/src/Objects unicodeobject.c, 2.190.6.6, 2.190.6.7 Message-ID: <E19zSti-0002d3-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv10100 Modified Files: Tag: release23-maint unicodeobject.c Log Message: Backport Tim's portability improvement and comments. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.190.6.6 retrieving revision 2.190.6.7 diff -C2 -d -r2.190.6.6 -r2.190.6.7 *** unicodeobject.c 16 Sep 2003 20:30:03 -0000 2.190.6.6 --- unicodeobject.c 17 Sep 2003 03:22:27 -0000 2.190.6.7 *************** *** 133,137 **** if (unicode == unicode_empty || (unicode->length == 1 && ! unicode->str[0] < 256U && unicode_latin1[unicode->str[0]] == unicode)) { PyErr_SetString(PyExc_SystemError, --- 133,142 ---- if (unicode == unicode_empty || (unicode->length == 1 && ! /* MvL said unicode->str[] may be signed. Python generally assumes ! * an int contains at least 32 bits, and we don't use more than ! * 32 bits even in a UCS4 build, so casting to unsigned int should ! * be correct. ! */ ! (unsigned int)unicode->str[0] < 256U && unicode_latin1[unicode->str[0]] == unicode)) { PyErr_SetString(PyExc_SystemError, *************** *** 212,215 **** --- 217,227 ---- goto onError; } + /* Initialize the first element to guard against cases where + * the caller fails before initializing str -- unicode_resize() + * reads str[0], and the Keep-Alive optimization can keep memory + * allocated for str alive across a call to unicode_dealloc(unicode). + * We don't want unicode_resize to read uninitialized memory in + * that case. + */ unicode->str[0] = 0; unicode->str[length] = 0; From jhylton at users.sourceforge.net Tue Sep 16 23:32:44 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Tue Sep 16 23:32:48 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS, 1.337.2.4.2.93, 1.337.2.4.2.94 Message-ID: <E19zT3c-000329-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv11644/Misc Modified Files: Tag: release22-maint NEWS Log Message: Backport: Double-fix of crash in Unicode freelist handling. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.337.2.4.2.93 retrieving revision 1.337.2.4.2.94 diff -C2 -d -r1.337.2.4.2.93 -r1.337.2.4.2.94 *** NEWS 3 Sep 2003 04:15:23 -0000 1.337.2.4.2.93 --- NEWS 17 Sep 2003 03:32:41 -0000 1.337.2.4.2.94 *************** *** 3,6 **** --- 3,11 ---- =========================== + - Fixed a bug in the cache of length-one Unicode strings that could + lead to a seg fault. The specific problem occurred when an earlier, + non-fatal error left an uninitialized Unicode object in the + freelist. + - The email package handles some RFC 2231 parameters with missing CHARSET fields better. It also includes a patch to parameter From jhylton at users.sourceforge.net Tue Sep 16 23:32:44 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Tue Sep 16 23:32:50 2003 Subject: [Python-checkins] python/dist/src/Objects unicodeobject.c, 2.124.6.21, 2.124.6.22 Message-ID: <E19zT3c-00032B-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1:/tmp/cvs-serv11644/Objects Modified Files: Tag: release22-maint unicodeobject.c Log Message: Backport: Double-fix of crash in Unicode freelist handling. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.124.6.21 retrieving revision 2.124.6.22 diff -C2 -d -r2.124.6.21 -r2.124.6.22 *** unicodeobject.c 11 Apr 2003 18:21:22 -0000 2.124.6.21 --- unicodeobject.c 17 Sep 2003 03:32:41 -0000 2.124.6.22 *************** *** 133,137 **** if (unicode == unicode_empty || (unicode->length == 1 && ! unicode->str[0] < 256 && unicode_latin1[unicode->str[0]] == unicode)) { PyErr_SetString(PyExc_SystemError, --- 133,142 ---- if (unicode == unicode_empty || (unicode->length == 1 && ! /* MvL said unicode->str[] may be signed. Python generally assumes ! * an int contains at least 32 bits, and we don't use more than ! * 32 bits even in a UCS4 build, so casting to unsigned int should ! * be correct. ! */ ! (unsigned int)unicode->str[0] < 256U && unicode_latin1[unicode->str[0]] == unicode)) { PyErr_SetString(PyExc_SystemError, *************** *** 212,215 **** --- 217,228 ---- goto onError; } + /* Initialize the first element to guard against cases where + * the caller fails before initializing str -- unicode_resize() + * reads str[0], and the Keep-Alive optimization can keep memory + * allocated for str alive across a call to unicode_dealloc(unicode). + * We don't want unicode_resize to read uninitialized memory in + * that case. + */ + unicode->str[0] = 0; unicode->str[length] = 0; unicode->length = length; From rhettinger at users.sourceforge.net Wed Sep 17 01:51:01 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Sep 17 01:51:07 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_textwrap.py, 1.23, 1.24 Message-ID: <E19zVDR-0008T4-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv32472/test Modified Files: test_textwrap.py Log Message: SF patch #806246: use basestring where possible (Contributed by George Yoshida.) Index: test_textwrap.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_textwrap.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** test_textwrap.py 30 Aug 2003 14:43:55 -0000 1.23 --- test_textwrap.py 17 Sep 2003 05:50:59 -0000 1.24 *************** *** 24,28 **** result.append(" %d: %r" % (i, textin[i])) result = '\n'.join(result) ! elif isinstance(textin, (str, unicode)): result = " %s\n" % repr(textin) return result --- 24,28 ---- result.append(" %d: %r" % (i, textin[i])) result = '\n'.join(result) ! elif isinstance(textin, basestring): result = " %s\n" % repr(textin) return result From rhettinger at users.sourceforge.net Wed Sep 17 01:51:01 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Sep 17 01:51:11 2003 Subject: [Python-checkins] python/dist/src/Lib doctest.py, 1.31, 1.32 pkgutil.py, 1.1, 1.2 Message-ID: <E19zVDR-0008Sm-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv32472 Modified Files: doctest.py pkgutil.py Log Message: SF patch #806246: use basestring where possible (Contributed by George Yoshida.) Index: doctest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** doctest.py 2 Sep 2003 02:09:05 -0000 1.31 --- doctest.py 17 Sep 2003 05:50:59 -0000 1.32 *************** *** 1188,1192 **** module = sys.modules[module] ! elif isinstance(module, (str, unicode)): # The ["*"] at the end is a mostly meaningless incantation with # a crucial property: if, e.g., module is 'a.b.c', it convinces --- 1188,1192 ---- module = sys.modules[module] ! elif isinstance(module, basestring): # The ["*"] at the end is a mostly meaningless incantation with # a crucial property: if, e.g., module is 'a.b.c', it convinces Index: pkgutil.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pkgutil.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pkgutil.py 23 Dec 2002 16:30:00 -0000 1.1 --- pkgutil.py 17 Sep 2003 05:50:59 -0000 1.2 *************** *** 51,55 **** for dir in sys.path: ! if not isinstance(dir, (str, unicode)) or not os.path.isdir(dir): continue subdir = os.path.join(dir, pname) --- 51,55 ---- for dir in sys.path: ! if not isinstance(dir, basestring) or not os.path.isdir(dir): continue subdir = os.path.join(dir, pname) From theller at users.sourceforge.net Wed Sep 17 13:11:04 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Wed Sep 17 13:13:42 2003 Subject: [Python-checkins] python/dist/src/Doc/dist dist.tex,1.56,1.57 Message-ID: <E19zfpY-0008Kr-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/dist In directory sc8-pr-cvs1:/tmp/cvs-serv32005 Modified Files: dist.tex Log Message: Fix a typo found by Eric D. Moyer, closes SF 807813. Will backport to 2.3. Index: dist.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/dist/dist.tex,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** dist.tex 2 Jul 2003 12:27:43 -0000 1.56 --- dist.tex 17 Sep 2003 17:11:01 -0000 1.57 *************** *** 1478,1482 **** This function can be used to retrieve special folder locations on Windows like the Start Menu or the Desktop. It returns the full path ! to the folder. 'csidl_string' must be on of the following strings: \begin{verbatim} --- 1478,1482 ---- This function can be used to retrieve special folder locations on Windows like the Start Menu or the Desktop. It returns the full path ! to the folder. 'csidl_string' must be one of the following strings: \begin{verbatim} From theller at users.sourceforge.net Wed Sep 17 13:12:33 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Wed Sep 17 13:13:46 2003 Subject: [Python-checkins] python/dist/src/Doc/dist dist.tex,1.56,1.56.8.1 Message-ID: <E19zfqz-0008QG-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/dist In directory sc8-pr-cvs1:/tmp/cvs-serv32369 Modified Files: Tag: release23-maint dist.tex Log Message: Fix a typo found by Eric D. Moyer, closes SF 807813. Will backport to 2.3. Index: dist.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/dist/dist.tex,v retrieving revision 1.56 retrieving revision 1.56.8.1 diff -C2 -d -r1.56 -r1.56.8.1 *** dist.tex 2 Jul 2003 12:27:43 -0000 1.56 --- dist.tex 17 Sep 2003 17:12:31 -0000 1.56.8.1 *************** *** 1478,1482 **** This function can be used to retrieve special folder locations on Windows like the Start Menu or the Desktop. It returns the full path ! to the folder. 'csidl_string' must be on of the following strings: \begin{verbatim} --- 1478,1482 ---- This function can be used to retrieve special folder locations on Windows like the Start Menu or the Desktop. It returns the full path ! to the folder. 'csidl_string' must be one of the following strings: \begin{verbatim} From bcannon at users.sourceforge.net Thu Sep 18 20:59:18 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Thu Sep 18 20:59:23 2003 Subject: [Python-checkins] python/dist/src configure, 1.420, 1.421 configure.in, 1.431, 1.432 pyconfig.h.in, 1.83, 1.84 Message-ID: <E1A09cE-00029p-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv8059 Modified Files: configure configure.in pyconfig.h.in Log Message: Improve detection of whether tzset is broken. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.420 retrieving revision 1.421 diff -C2 -d -r1.420 -r1.421 *** configure 4 Sep 2003 18:50:52 -0000 1.420 --- configure 19 Sep 2003 00:59:14 -0000 1.421 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.430 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.431 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. *************** *** 18255,18272 **** #include <stdlib.h> #include <time.h> int main() { ! int gmt_hour; ! int eastern_hour; ! time_t now; ! now = time((time_t*)NULL); putenv("TZ=UTC+0"); tzset(); ! gmt_hour = localtime(&now)->tm_hour; putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); tzset(); ! eastern_hour = localtime(&now)->tm_hour; ! if (eastern_hour == gmt_hour) exit(1); exit(0); } --- 18255,18291 ---- #include <stdlib.h> #include <time.h> + #include <string.h> int main() { ! /* Note that we need to ensure that not only does tzset(3) ! do 'something' with localtime, but it works as documented ! in the library reference and as expected by the test suite. ! ! Red Hat 6.2 doesn't understand the southern hemisphere ! after New Year's Day; it thinks swaps on that day. ! */ ! ! time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */ ! time_t midyear = groundhogday + (365 * 24 * 3600 / 2); ! putenv("TZ=UTC+0"); tzset(); ! if (localtime(&groundhogday)->tm_hour != 0) ! exit(1); ! putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); tzset(); ! if (localtime(&groundhogday)->tm_hour != 19) exit(1); + + putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0"); + tzset(); + if (localtime(&groundhogday)->tm_hour != 11) + exit(1); + if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT")) + exit(1); + if (strcmp(localtime(&midyear)->tm_zone, "AEST")) + exit(1); + exit(0); } Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.431 retrieving revision 1.432 diff -C2 -d -r1.431 -r1.432 *** configure.in 4 Sep 2003 18:50:54 -0000 1.431 --- configure.in 19 Sep 2003 00:59:16 -0000 1.432 *************** *** 2811,2828 **** #include <stdlib.h> #include <time.h> int main() { ! int gmt_hour; ! int eastern_hour; ! time_t now; ! now = time((time_t*)NULL); putenv("TZ=UTC+0"); tzset(); ! gmt_hour = localtime(&now)->tm_hour; putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); tzset(); ! eastern_hour = localtime(&now)->tm_hour; ! if (eastern_hour == gmt_hour) exit(1); exit(0); } --- 2811,2847 ---- #include <stdlib.h> #include <time.h> + #include <string.h> int main() { ! /* Note that we need to ensure that not only does tzset(3) ! do 'something' with localtime, but it works as documented ! in the library reference and as expected by the test suite. ! ! Red Hat 6.2 doesn't understand the southern hemisphere ! after New Year's Day; it thinks swaps on that day. ! */ ! ! time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */ ! time_t midyear = groundhogday + (365 * 24 * 3600 / 2); ! putenv("TZ=UTC+0"); tzset(); ! if (localtime(&groundhogday)->tm_hour != 0) ! exit(1); ! putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); tzset(); ! if (localtime(&groundhogday)->tm_hour != 19) ! exit(1); ! ! putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0"); ! tzset(); ! if (localtime(&groundhogday)->tm_hour != 11) ! exit(1); ! if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT")) ! exit(1); ! if (strcmp(localtime(&midyear)->tm_zone, "AEST")) exit(1); + exit(0); } Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** pyconfig.h.in 22 Jul 2003 15:20:49 -0000 1.83 --- pyconfig.h.in 19 Sep 2003 00:59:16 -0000 1.84 *************** *** 601,604 **** --- 601,607 ---- #undef HAVE_TZNAME + /* Define this if you have tcl and TCL_UTF_MAX==6 */ + #undef HAVE_UCS4_TCL + /* Define this if you have the type uintptr_t. */ #undef HAVE_UINTPTR_T From bcannon at users.sourceforge.net Thu Sep 18 21:00:21 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Thu Sep 18 21:00:24 2003 Subject: [Python-checkins] python/dist/src configure, 1.416.4.2, 1.416.4.3 configure.in, 1.427.4.2, 1.427.4.3 pyconfig.h.in, 1.83, 1.83.4.1 Message-ID: <E1A09dF-0002Dm-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv8336 Modified Files: Tag: release23-maint configure configure.in pyconfig.h.in Log Message: Improve detection of broken implementations of tzset(). Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.416.4.2 retrieving revision 1.416.4.3 diff -C2 -d -r1.416.4.2 -r1.416.4.3 *** configure 4 Sep 2003 18:52:06 -0000 1.416.4.2 --- configure 19 Sep 2003 01:00:10 -0000 1.416.4.3 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.427.4.1 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.427.4.2 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. *************** *** 18243,18260 **** #include <stdlib.h> #include <time.h> int main() { ! int gmt_hour; ! int eastern_hour; ! time_t now; ! now = time((time_t*)NULL); putenv("TZ=UTC+0"); tzset(); ! gmt_hour = localtime(&now)->tm_hour; putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); tzset(); ! eastern_hour = localtime(&now)->tm_hour; ! if (eastern_hour == gmt_hour) exit(1); exit(0); } --- 18243,18279 ---- #include <stdlib.h> #include <time.h> + #include <string.h> int main() { ! /* Note that we need to ensure that not only does tzset(3) ! do 'something' with localtime, but it works as documented ! in the library reference and as expected by the test suite. ! ! Linux 6.2 doesn't understand the southern hemisphere ! after New Year's Day. ! */ ! ! time_t groundhogday = 1044144000; /* GMT-based, well, it's a colony */ ! time_t midyear = groundhogday + (365 * 24 * 3600 / 2); ! putenv("TZ=UTC+0"); tzset(); ! if (localtime(&groundhogday)->tm_hour != 0) ! exit(1); ! putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); tzset(); ! if (localtime(&groundhogday)->tm_hour != 19) exit(1); + + putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0"); + tzset(); + if (localtime(&groundhogday)->tm_hour != 11) + exit(1); + if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT")) + exit(1); + if (strcmp(localtime(&midyear)->tm_zone, "AEST")) + exit(1); + exit(0); } Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.427.4.2 retrieving revision 1.427.4.3 diff -C2 -d -r1.427.4.2 -r1.427.4.3 *** configure.in 4 Sep 2003 18:52:07 -0000 1.427.4.2 --- configure.in 19 Sep 2003 01:00:16 -0000 1.427.4.3 *************** *** 2799,2816 **** #include <stdlib.h> #include <time.h> int main() { ! int gmt_hour; ! int eastern_hour; ! time_t now; ! now = time((time_t*)NULL); putenv("TZ=UTC+0"); tzset(); ! gmt_hour = localtime(&now)->tm_hour; putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); tzset(); ! eastern_hour = localtime(&now)->tm_hour; ! if (eastern_hour == gmt_hour) exit(1); exit(0); } --- 2799,2835 ---- #include <stdlib.h> #include <time.h> + #include <string.h> int main() { ! /* Note that we need to ensure that not only does tzset(3) ! do 'something' with localtime, but it works as documented ! in the library reference and as expected by the test suite. ! ! Linux 6.2 doesn't understand the southern hemisphere ! after New Year's Day. ! */ ! ! time_t groundhogday = 1044144000; /* GMT-based, well, it's a colony */ ! time_t midyear = groundhogday + (365 * 24 * 3600 / 2); ! putenv("TZ=UTC+0"); tzset(); ! if (localtime(&groundhogday)->tm_hour != 0) ! exit(1); ! putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); tzset(); ! if (localtime(&groundhogday)->tm_hour != 19) ! exit(1); ! ! putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0"); ! tzset(); ! if (localtime(&groundhogday)->tm_hour != 11) ! exit(1); ! if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT")) ! exit(1); ! if (strcmp(localtime(&midyear)->tm_zone, "AEST")) exit(1); + exit(0); } Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.83 retrieving revision 1.83.4.1 diff -C2 -d -r1.83 -r1.83.4.1 *** pyconfig.h.in 22 Jul 2003 15:20:49 -0000 1.83 --- pyconfig.h.in 19 Sep 2003 01:00:16 -0000 1.83.4.1 *************** *** 601,604 **** --- 601,607 ---- #undef HAVE_TZNAME + /* Define this if you have tcl and TCL_UTF_MAX==6 */ + #undef HAVE_UCS4_TCL + /* Define this if you have the type uintptr_t. */ #undef HAVE_UINTPTR_T From bcannon at users.sourceforge.net Thu Sep 18 21:02:02 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Thu Sep 18 21:02:04 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.45,1.831.4.46 Message-ID: <E1A09es-0002JI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv8817/Misc Modified Files: Tag: release23-maint NEWS Log Message: Mention improvement of detection of broken tzset() (patch #762934). Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.45 retrieving revision 1.831.4.46 diff -C2 -d -r1.831.4.45 -r1.831.4.46 *** NEWS 16 Sep 2003 21:42:12 -0000 1.831.4.45 --- NEWS 19 Sep 2003 01:01:59 -0000 1.831.4.46 *************** *** 133,136 **** --- 133,138 ---- ----- + - patch #762934: improve detection of broken implementations of tzset(). + - Patch #798202: detect redhat9 Tcl/Tk in configure script. From loewis at users.sourceforge.net Sat Sep 20 06:47:31 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 06:47:38 2003 Subject: [Python-checkins] python/dist/src configure, 1.416.4.3, 1.416.4.4 configure.in, 1.427.4.3, 1.427.4.4 Message-ID: <E1A0fH1-0004c2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv17566 Modified Files: Tag: release23-maint configure configure.in Log Message: Patch #805604: Do not check for sem_init, do not use -Kthread, if configured --without-threads. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.416.4.3 retrieving revision 1.416.4.4 diff -C2 -d -r1.416.4.3 -r1.416.4.4 *** configure 19 Sep 2003 01:00:10 -0000 1.416.4.3 --- configure 20 Sep 2003 10:47:26 -0000 1.416.4.4 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.427.4.2 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.427.4.3 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. *************** *** 4452,4462 **** else ac_cv_cxx_thread=no - CXX="$ac_save_cxx" fi rm -fr conftest* - else - CXX="$ac_save_cxx" fi fi echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 echo "${ECHO_T}$ac_cv_cxx_thread" >&6 --- 4452,4460 ---- else ac_cv_cxx_thread=no 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 *************** *** 10363,10367 **** fi # Dynamic linking for HP-UX ! echo "$as_me:$LINENO: checking for library containing sem_init" >&5 echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6 if test "${ac_cv_search_sem_init+set}" = set; then --- 10361,10368 ---- fi # Dynamic linking for HP-UX ! ! # only check for sem_ini if thread support is requested ! if test "$with_threads" = "yes" -o -z "$with_threads"; then ! echo "$as_me:$LINENO: checking for library containing sem_init" >&5 echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6 if test "${ac_cv_search_sem_init+set}" = set; then *************** *** 10469,10474 **** fi # 'Real Time' functions on Solaris ! # posix4 on Solaris 2.6 ! # pthread (first!) on Linux # check if we need libintl for locale functions echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 --- 10470,10477 ---- fi # 'Real Time' functions on Solaris ! # posix4 on Solaris 2.6 ! # pthread (first!) on Linux ! fi ! # check if we need libintl for locale functions echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 *************** *** 10889,10892 **** --- 10892,10898 ---- then CC="$CC -Kpthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -Kpthread" + fi cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 *************** *** 10898,10901 **** --- 10904,10910 ---- then CC="$CC -Kthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -Kthread" + fi cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 *************** *** 10907,10910 **** --- 10916,10922 ---- then CC="$CC -pthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -pthread" + fi cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.427.4.3 retrieving revision 1.427.4.4 diff -C2 -d -r1.427.4.3 -r1.427.4.4 *** configure.in 19 Sep 2003 01:00:16 -0000 1.427.4.3 --- configure.in 20 Sep 2003 10:47:28 -0000 1.427.4.4 *************** *** 869,873 **** if test "$ac_cv_kpthread" = "yes" then ! CXX="$CXX -Kpthread" ac_cv_cxx_thread=yes elif test "$ac_cv_kthread" = "yes" --- 869,873 ---- if test "$ac_cv_kpthread" = "yes" then ! CXX="$CXX -Kpthread" ac_cv_cxx_thread=yes elif test "$ac_cv_kthread" = "yes" *************** *** 891,901 **** else ac_cv_cxx_thread=no - CXX="$ac_save_cxx" fi rm -fr conftest* - else - CXX="$ac_save_cxx" fi fi AC_MSG_RESULT($ac_cv_cxx_thread) --- 891,899 ---- else ac_cv_cxx_thread=no fi rm -fr conftest* fi fi + CXX="$ac_save_cxx" AC_MSG_RESULT($ac_cv_cxx_thread) *************** *** 1411,1417 **** AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX ! AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris ! # posix4 on Solaris 2.6 ! # pthread (first!) on Linux # check if we need libintl for locale functions AC_CHECK_LIB(intl, textdomain, --- 1409,1420 ---- AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX ! ! # only check for sem_ini if thread support is requested ! if test "$with_threads" = "yes" -o -z "$with_threads"; then ! AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris ! # posix4 on Solaris 2.6 ! # pthread (first!) on Linux ! fi ! # check if we need libintl for locale functions AC_CHECK_LIB(intl, textdomain, *************** *** 1531,1534 **** --- 1534,1540 ---- then CC="$CC -Kpthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -Kpthread" + fi AC_DEFINE(WITH_THREAD) posix_threads=yes *************** *** 1537,1540 **** --- 1543,1549 ---- then CC="$CC -Kthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -Kthread" + fi AC_DEFINE(WITH_THREAD) posix_threads=yes *************** *** 1543,1546 **** --- 1552,1558 ---- then CC="$CC -pthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -pthread" + fi AC_DEFINE(WITH_THREAD) posix_threads=yes From loewis at users.sourceforge.net Sat Sep 20 06:47:49 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 06:47:54 2003 Subject: [Python-checkins] python/dist/src configure, 1.421, 1.422 configure.in, 1.432, 1.433 Message-ID: <E1A0fHJ-0004cp-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv17737 Modified Files: configure configure.in Log Message: Patch #805604: Do not check for sem_init, do not use -Kthread, if configured --without-threads. Backported to 2.3. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.421 retrieving revision 1.422 diff -C2 -d -r1.421 -r1.422 *** configure 19 Sep 2003 00:59:14 -0000 1.421 --- configure 20 Sep 2003 10:47:47 -0000 1.422 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.431 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.432 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. *************** *** 4459,4469 **** else ac_cv_cxx_thread=no - CXX="$ac_save_cxx" fi rm -fr conftest* - else - CXX="$ac_save_cxx" fi fi echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 echo "${ECHO_T}$ac_cv_cxx_thread" >&6 --- 4459,4467 ---- else ac_cv_cxx_thread=no 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 *************** *** 10375,10379 **** fi # Dynamic linking for HP-UX ! echo "$as_me:$LINENO: checking for library containing sem_init" >&5 echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6 if test "${ac_cv_search_sem_init+set}" = set; then --- 10373,10380 ---- fi # Dynamic linking for HP-UX ! ! # only check for sem_ini if thread support is requested ! if test "$with_threads" = "yes" -o -z "$with_threads"; then ! echo "$as_me:$LINENO: checking for library containing sem_init" >&5 echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6 if test "${ac_cv_search_sem_init+set}" = set; then *************** *** 10481,10486 **** fi # 'Real Time' functions on Solaris ! # posix4 on Solaris 2.6 ! # pthread (first!) on Linux # check if we need libintl for locale functions echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 --- 10482,10489 ---- fi # 'Real Time' functions on Solaris ! # posix4 on Solaris 2.6 ! # pthread (first!) on Linux ! fi ! # check if we need libintl for locale functions echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 *************** *** 10901,10904 **** --- 10904,10910 ---- then CC="$CC -Kpthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -Kpthread" + fi cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 *************** *** 10910,10913 **** --- 10916,10922 ---- then CC="$CC -Kthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -Kthread" + fi cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 *************** *** 10919,10922 **** --- 10928,10934 ---- then CC="$CC -pthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -pthread" + fi cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.432 retrieving revision 1.433 diff -C2 -d -r1.432 -r1.433 *** configure.in 19 Sep 2003 00:59:16 -0000 1.432 --- configure.in 20 Sep 2003 10:47:47 -0000 1.433 *************** *** 876,880 **** if test "$ac_cv_kpthread" = "yes" then ! CXX="$CXX -Kpthread" ac_cv_cxx_thread=yes elif test "$ac_cv_kthread" = "yes" --- 876,880 ---- if test "$ac_cv_kpthread" = "yes" then ! CXX="$CXX -Kpthread" ac_cv_cxx_thread=yes elif test "$ac_cv_kthread" = "yes" *************** *** 898,908 **** else ac_cv_cxx_thread=no - CXX="$ac_save_cxx" fi rm -fr conftest* - else - CXX="$ac_save_cxx" fi fi AC_MSG_RESULT($ac_cv_cxx_thread) --- 898,906 ---- else ac_cv_cxx_thread=no fi rm -fr conftest* fi fi + CXX="$ac_save_cxx" AC_MSG_RESULT($ac_cv_cxx_thread) *************** *** 1423,1429 **** AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX ! AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris ! # posix4 on Solaris 2.6 ! # pthread (first!) on Linux # check if we need libintl for locale functions AC_CHECK_LIB(intl, textdomain, --- 1421,1432 ---- AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX ! ! # only check for sem_ini if thread support is requested ! if test "$with_threads" = "yes" -o -z "$with_threads"; then ! AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris ! # posix4 on Solaris 2.6 ! # pthread (first!) on Linux ! fi ! # check if we need libintl for locale functions AC_CHECK_LIB(intl, textdomain, *************** *** 1543,1546 **** --- 1546,1552 ---- then CC="$CC -Kpthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -Kpthread" + fi AC_DEFINE(WITH_THREAD) posix_threads=yes *************** *** 1549,1552 **** --- 1555,1561 ---- then CC="$CC -Kthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -Kthread" + fi AC_DEFINE(WITH_THREAD) posix_threads=yes *************** *** 1555,1558 **** --- 1564,1570 ---- then CC="$CC -pthread" + if test "$ac_cv_cxx_thread" = "yes"; then + CXX="$CXX -pthread" + fi AC_DEFINE(WITH_THREAD) posix_threads=yes From loewis at users.sourceforge.net Sat Sep 20 06:50:30 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 06:50:36 2003 Subject: [Python-checkins] python/dist/src Makefile.pre.in,1.136,1.136.6.1 Message-ID: <E1A0fJu-0004ig-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv18033 Modified Files: Tag: release23-maint Makefile.pre.in Log Message: Patch #805678: Add .so symlink during make install. Index: Makefile.pre.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.pre.in,v retrieving revision 1.136 retrieving revision 1.136.6.1 diff -C2 -d -r1.136 -r1.136.6.1 *** Makefile.pre.in 13 Jul 2003 10:10:42 -0000 1.136 --- Makefile.pre.in 20 Sep 2003 10:50:28 -0000 1.136.6.1 *************** *** 610,613 **** --- 610,614 ---- else \ $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \ + (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \ fi; \ else true; \ From loewis at users.sourceforge.net Sat Sep 20 06:50:51 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 06:50:56 2003 Subject: [Python-checkins] python/dist/src Makefile.pre.in,1.137,1.138 Message-ID: <E1A0fKF-0004jD-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv18160 Modified Files: Makefile.pre.in Log Message: Patch #805678: Add .so symlink during make install. Backported to 2.3. Index: Makefile.pre.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.pre.in,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** Makefile.pre.in 4 Sep 2003 11:04:04 -0000 1.137 --- Makefile.pre.in 20 Sep 2003 10:50:48 -0000 1.138 *************** *** 614,617 **** --- 614,618 ---- else \ $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \ + (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \ fi; \ else true; \ From loewis at users.sourceforge.net Sat Sep 20 06:52:58 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 06:53:02 2003 Subject: [Python-checkins] python/dist/src/Lib/lib-tk Tkconstants.py, 1.9, 1.10 Message-ID: <E1A0fMI-0004mq-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory sc8-pr-cvs1:/tmp/cvs-serv18382 Modified Files: Tkconstants.py Log Message: Patch #805976: Add DOTBOX and UNDERLINE. Index: Tkconstants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkconstants.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Tkconstants.py 9 Aug 2003 09:52:42 -0000 1.9 --- Tkconstants.py 20 Sep 2003 10:52:56 -0000 1.10 *************** *** 87,90 **** --- 87,95 ---- EXTENDED='extended' + # Activestyle for list boxes + # NONE='none' is also valid + DOTBOX='dotbox' + UNDERLINE='underline' + # Various canvas styles PIESLICE='pieslice' From loewis at users.sourceforge.net Sat Sep 20 06:58:05 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 06:58:11 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.46,1.831.4.47 Message-ID: <E1A0fRF-0004xI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv18924/Misc Modified Files: Tag: release23-maint NEWS Log Message: Patch #793559: Reset __starttext_tag. Fixes #709491. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.46 retrieving revision 1.831.4.47 diff -C2 -d -r1.831.4.46 -r1.831.4.47 *** NEWS 19 Sep 2003 01:01:59 -0000 1.831.4.46 --- NEWS 20 Sep 2003 10:58:03 -0000 1.831.4.47 *************** *** 60,63 **** --- 60,65 ---- ------- + - Bug #709491: Reset __starttext_tag in sgmllib. + - The bsddb module and dbhash module now support the iterator and mapping protocols. From loewis at users.sourceforge.net Sat Sep 20 06:58:05 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 06:58:14 2003 Subject: [Python-checkins] python/dist/src/Lib sgmllib.py,1.45,1.45.8.1 Message-ID: <E1A0fRF-0004xD-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv18924/Lib Modified Files: Tag: release23-maint sgmllib.py Log Message: Patch #793559: Reset __starttext_tag. Fixes #709491. Index: sgmllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sgmllib.py,v retrieving revision 1.45 retrieving revision 1.45.8.1 diff -C2 -d -r1.45 -r1.45.8.1 *** sgmllib.py 29 Apr 2003 22:12:54 -0000 1.45 --- sgmllib.py 20 Sep 2003 10:58:03 -0000 1.45.8.1 *************** *** 62,65 **** --- 62,66 ---- def reset(self): """Reset this instance. Loses all unprocessed data.""" + self.__starttag_text = None self.rawdata = '' self.stack = [] *************** *** 222,226 **** return j-i - __starttag_text = None def get_starttag_text(self): return self.__starttag_text --- 223,226 ---- From loewis at users.sourceforge.net Sat Sep 20 06:58:40 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 06:58:44 2003 Subject: [Python-checkins] python/dist/src/Lib sgmllib.py,1.45,1.46 Message-ID: <E1A0fRo-0004yS-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv19101/Lib Modified Files: sgmllib.py Log Message: Patch #793559: Reset __starttext_tag. Fixes #709491. Backported to 2.3. Index: sgmllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sgmllib.py,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** sgmllib.py 29 Apr 2003 22:12:54 -0000 1.45 --- sgmllib.py 20 Sep 2003 10:58:38 -0000 1.46 *************** *** 62,65 **** --- 62,66 ---- def reset(self): """Reset this instance. Loses all unprocessed data.""" + self.__starttag_text = None self.rawdata = '' self.stack = [] *************** *** 222,226 **** return j-i - __starttag_text = None def get_starttag_text(self): return self.__starttag_text --- 223,226 ---- From loewis at users.sourceforge.net Sat Sep 20 07:04:47 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:04:52 2003 Subject: [Python-checkins] python/dist/src/Tools/freeze checkextensions_win32.py, 1.7, 1.7.14.1 Message-ID: <E1A0fXj-0005CX-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/freeze In directory sc8-pr-cvs1:/tmp/cvs-serv19952/Tools/freeze Modified Files: Tag: release23-maint checkextensions_win32.py Log Message: Patch #713645: Fix typo. Index: checkextensions_win32.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/checkextensions_win32.py,v retrieving revision 1.7 retrieving revision 1.7.14.1 diff -C2 -d -r1.7 -r1.7.14.1 *** checkextensions_win32.py 11 Sep 2002 20:36:00 -0000 1.7 --- checkextensions_win32.py 20 Sep 2003 11:04:44 -0000 1.7.14.1 *************** *** 60,64 **** defaultMapName = os.path.join( os.path.split(sys.argv[0])[0], "extensions_win32.ini") if not os.path.isfile(defaultMapName): ! sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found" % mapFileName) else: # must go on end, so other inis can override. --- 60,64 ---- defaultMapName = os.path.join( os.path.split(sys.argv[0])[0], "extensions_win32.ini") if not os.path.isfile(defaultMapName): ! sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found\n" % defaultMapName) else: # must go on end, so other inis can override. From loewis at users.sourceforge.net Sat Sep 20 07:04:47 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:04:55 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.47,1.831.4.48 Message-ID: <E1A0fXj-0005CV-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv19952/Misc Modified Files: Tag: release23-maint NEWS Log Message: Patch #713645: Fix typo. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.47 retrieving revision 1.831.4.48 diff -C2 -d -r1.831.4.47 -r1.831.4.48 *** NEWS 20 Sep 2003 10:58:03 -0000 1.831.4.47 --- NEWS 20 Sep 2003 11:04:44 -0000 1.831.4.48 *************** *** 127,130 **** --- 127,132 ---- ----------- + - Patch #713645: Fix typo in checkextensions_win32. + - Pynche was fixed to not crash when there is no ~/.pynche file and no -d option was given. From loewis at users.sourceforge.net Sat Sep 20 07:05:04 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:05:14 2003 Subject: [Python-checkins] python/dist/src/Tools/freeze checkextensions_win32.py, 1.7, 1.8 Message-ID: <E1A0fY0-0005EY-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/freeze In directory sc8-pr-cvs1:/tmp/cvs-serv20048 Modified Files: checkextensions_win32.py Log Message: Patch #713645: Fix typo. Index: checkextensions_win32.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/checkextensions_win32.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** checkextensions_win32.py 11 Sep 2002 20:36:00 -0000 1.7 --- checkextensions_win32.py 20 Sep 2003 11:05:01 -0000 1.8 *************** *** 60,64 **** defaultMapName = os.path.join( os.path.split(sys.argv[0])[0], "extensions_win32.ini") if not os.path.isfile(defaultMapName): ! sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found" % mapFileName) else: # must go on end, so other inis can override. --- 60,64 ---- defaultMapName = os.path.join( os.path.split(sys.argv[0])[0], "extensions_win32.ini") if not os.path.isfile(defaultMapName): ! sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found\n" % defaultMapName) else: # must go on end, so other inis can override. From loewis at users.sourceforge.net Sat Sep 20 07:09:08 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:09:13 2003 Subject: [Python-checkins] python/dist/src/Lib timeit.py,1.13,1.13.8.1 Message-ID: <E1A0fbw-0005VF-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv21016/Lib Modified Files: Tag: release23-maint timeit.py Log Message: Patch #808362: Fix typos. Index: timeit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/timeit.py,v retrieving revision 1.13 retrieving revision 1.13.8.1 diff -C2 -d -r1.13 -r1.13.8.1 *** timeit.py 29 Jun 2003 04:18:15 -0000 1.13 --- timeit.py 20 Sep 2003 11:09:06 -0000 1.13.8.1 *************** *** 34,38 **** of a second; on Unix, clock() has 1/100th of a second granularity and time() is much more precise. On either platform, the default timer ! functions measures wall clock time, not the CPU time. This means that other processes running on the same computer may interfere with the timing. The best thing to do when accurate timing is necessary is to --- 34,38 ---- of a second; on Unix, clock() has 1/100th of a second granularity and time() is much more precise. On either platform, the default timer ! functions measure wall clock time, not the CPU time. This means that other processes running on the same computer may interfere with the timing. The best thing to do when accurate timing is necessary is to From loewis at users.sourceforge.net Sat Sep 20 07:09:08 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:09:17 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libtimeit.tex, 1.4.10.1, 1.4.10.2 libunittest.tex, 1.14.8.1, 1.14.8.2 Message-ID: <E1A0fbw-0005VC-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv21016/Doc/lib Modified Files: Tag: release23-maint libtimeit.tex libunittest.tex Log Message: Patch #808362: Fix typos. Index: libtimeit.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtimeit.tex,v retrieving revision 1.4.10.1 retrieving revision 1.4.10.2 diff -C2 -d -r1.4.10.1 -r1.4.10.2 *** libtimeit.tex 31 Aug 2003 04:21:42 -0000 1.4.10.1 --- libtimeit.tex 20 Sep 2003 11:09:06 -0000 1.4.10.2 *************** *** 123,127 **** \function{time.clock()} has 1/100th of a second granularity and \function{time.time()} is much more precise. On either platform, the ! default timer functions measures wall clock time, not the CPU time. This means that other processes running on the same computer may interfere with the timing. The best thing to do when accurate timing --- 123,127 ---- \function{time.clock()} has 1/100th of a second granularity and \function{time.time()} is much more precise. On either platform, the ! default timer functions measure wall clock time, not the CPU time. This means that other processes running on the same computer may interfere with the timing. The best thing to do when accurate timing Index: libunittest.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libunittest.tex,v retrieving revision 1.14.8.1 retrieving revision 1.14.8.2 diff -C2 -d -r1.14.8.1 -r1.14.8.2 *** libunittest.tex 16 Sep 2003 22:05:33 -0000 1.14.8.1 --- libunittest.tex 20 Sep 2003 11:09:06 -0000 1.14.8.2 *************** *** 770,774 **** The following methods of the \class{TestResult} class are used to ! maintain the internal data structures, and mmay be extended in subclasses to support additional reporting requirements. This is particularly useful in building tools which support interactive --- 770,774 ---- The following methods of the \class{TestResult} class are used to ! maintain the internal data structures, and may be extended in subclasses to support additional reporting requirements. This is particularly useful in building tools which support interactive From loewis at users.sourceforge.net Sat Sep 20 07:09:30 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:09:36 2003 Subject: [Python-checkins] python/dist/src/Lib timeit.py,1.13,1.14 Message-ID: <E1A0fcI-0005W7-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv21184/Lib Modified Files: timeit.py Log Message: Patch #808362: Fix typos. Index: timeit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/timeit.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** timeit.py 29 Jun 2003 04:18:15 -0000 1.13 --- timeit.py 20 Sep 2003 11:09:28 -0000 1.14 *************** *** 34,38 **** of a second; on Unix, clock() has 1/100th of a second granularity and time() is much more precise. On either platform, the default timer ! functions measures wall clock time, not the CPU time. This means that other processes running on the same computer may interfere with the timing. The best thing to do when accurate timing is necessary is to --- 34,38 ---- of a second; on Unix, clock() has 1/100th of a second granularity and time() is much more precise. On either platform, the default timer ! functions measure wall clock time, not the CPU time. This means that other processes running on the same computer may interfere with the timing. The best thing to do when accurate timing is necessary is to From loewis at users.sourceforge.net Sat Sep 20 07:09:30 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:09:39 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libtimeit.tex, 1.5, 1.6 libunittest.tex, 1.15, 1.16 Message-ID: <E1A0fcI-0005W4-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv21184/Doc/lib Modified Files: libtimeit.tex libunittest.tex Log Message: Patch #808362: Fix typos. Index: libtimeit.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtimeit.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** libtimeit.tex 31 Aug 2003 04:20:12 -0000 1.5 --- libtimeit.tex 20 Sep 2003 11:09:28 -0000 1.6 *************** *** 123,127 **** \function{time.clock()} has 1/100th of a second granularity and \function{time.time()} is much more precise. On either platform, the ! default timer functions measures wall clock time, not the CPU time. This means that other processes running on the same computer may interfere with the timing. The best thing to do when accurate timing --- 123,127 ---- \function{time.clock()} has 1/100th of a second granularity and \function{time.time()} is much more precise. On either platform, the ! default timer functions measure wall clock time, not the CPU time. This means that other processes running on the same computer may interfere with the timing. The best thing to do when accurate timing Index: libunittest.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libunittest.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** libunittest.tex 16 Sep 2003 22:04:31 -0000 1.15 --- libunittest.tex 20 Sep 2003 11:09:28 -0000 1.16 *************** *** 770,774 **** The following methods of the \class{TestResult} class are used to ! maintain the internal data structures, and mmay be extended in subclasses to support additional reporting requirements. This is particularly useful in building tools which support interactive --- 770,774 ---- The following methods of the \class{TestResult} class are used to ! maintain the internal data structures, and may be extended in subclasses to support additional reporting requirements. This is particularly useful in building tools which support interactive From loewis at users.sourceforge.net Sat Sep 20 07:13:20 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:13:25 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.48,1.831.4.49 Message-ID: <E1A0fg0-0005fE-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv21723/Misc Modified Files: Tag: release23-maint NEWS Log Message: Patch #805613: Fix usage of the PTH library. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.48 retrieving revision 1.831.4.49 diff -C2 -d -r1.831.4.48 -r1.831.4.49 *** NEWS 20 Sep 2003 11:04:44 -0000 1.831.4.48 --- NEWS 20 Sep 2003 11:13:17 -0000 1.831.4.49 *************** *** 13,16 **** --- 13,18 ---- ----------------- + - Patch #805613: Fix usage of the PTH library. + - Fixed a bug in the cache of length-one Unicode strings that could lead to a seg fault. The specific problem occurred when an earlier, From loewis at users.sourceforge.net Sat Sep 20 07:13:20 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:13:28 2003 Subject: [Python-checkins] python/dist/src/Python thread.c, 2.46, 2.46.10.1 thread_pth.h, 2.9, 2.9.16.1 Message-ID: <E1A0fg0-0005fG-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv21723/Python Modified Files: Tag: release23-maint thread.c thread_pth.h Log Message: Patch #805613: Fix usage of the PTH library. Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.46 retrieving revision 2.46.10.1 diff -C2 -d -r2.46 -r2.46.10.1 *** thread.c 19 Apr 2003 15:41:53 -0000 2.46 --- thread.c 20 Sep 2003 11:13:18 -0000 2.46.10.1 *************** *** 99,102 **** --- 99,103 ---- #ifdef HAVE_PTH #include "thread_pth.h" + #undef _POSIX_THREADS #endif Index: thread_pth.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v retrieving revision 2.9 retrieving revision 2.9.16.1 diff -C2 -d -r2.9 -r2.9.16.1 *** thread_pth.h 19 Jan 2002 22:02:55 -0000 2.9 --- thread_pth.h 20 Sep 2003 11:13:18 -0000 2.9.16.1 *************** *** 31,34 **** --- 31,36 ---- #define CHECK_STATUS(name) if (status == -1) { printf("%d ", status); perror(name); error = 1; } + pth_attr_t PyThread_attr; + /* * Initialization. *************** *** 38,41 **** --- 40,46 ---- { pth_init(); + PyThread_attr = pth_attr_new(); + pth_attr_set(PyThread_attr, PTH_ATTR_STACK_SIZE, 1<<18); + pth_attr_set(PyThread_attr, PTH_ATTR_JOINABLE, FALSE); } *************** *** 52,56 **** PyThread_init_thread(); ! th = pth_spawn(PTH_ATTR_DEFAULT, (void* (*)(void *))func, (void *)arg --- 57,61 ---- PyThread_init_thread(); ! th = pth_spawn(PyThread_attr, (void* (*)(void *))func, (void *)arg From loewis at users.sourceforge.net Sat Sep 20 07:13:38 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:13:49 2003 Subject: [Python-checkins] python/dist/src/Python thread.c, 2.46, 2.47 thread_pth.h, 2.9, 2.10 Message-ID: <E1A0fgI-0005g2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv21807/Python Modified Files: thread.c thread_pth.h Log Message: Patch #805613: Fix usage of the PTH library. Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -d -r2.46 -r2.47 *** thread.c 19 Apr 2003 15:41:53 -0000 2.46 --- thread.c 20 Sep 2003 11:13:36 -0000 2.47 *************** *** 99,102 **** --- 99,103 ---- #ifdef HAVE_PTH #include "thread_pth.h" + #undef _POSIX_THREADS #endif Index: thread_pth.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -d -r2.9 -r2.10 *** thread_pth.h 19 Jan 2002 22:02:55 -0000 2.9 --- thread_pth.h 20 Sep 2003 11:13:36 -0000 2.10 *************** *** 31,34 **** --- 31,36 ---- #define CHECK_STATUS(name) if (status == -1) { printf("%d ", status); perror(name); error = 1; } + pth_attr_t PyThread_attr; + /* * Initialization. *************** *** 38,41 **** --- 40,46 ---- { pth_init(); + PyThread_attr = pth_attr_new(); + pth_attr_set(PyThread_attr, PTH_ATTR_STACK_SIZE, 1<<18); + pth_attr_set(PyThread_attr, PTH_ATTR_JOINABLE, FALSE); } *************** *** 52,56 **** PyThread_init_thread(); ! th = pth_spawn(PTH_ATTR_DEFAULT, (void* (*)(void *))func, (void *)arg --- 57,61 ---- PyThread_init_thread(); ! th = pth_spawn(PyThread_attr, (void* (*)(void *))func, (void *)arg From loewis at users.sourceforge.net Sat Sep 20 07:20:33 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 07:20:38 2003 Subject: [Python-checkins] python/dist/src/Modules posixmodule.c, 2.303, 2.304 Message-ID: <E1A0fmz-0005yP-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv22870 Modified Files: posixmodule.c Log Message: Patch #730597: Disable POPEN for RTEMS. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.303 retrieving revision 2.304 diff -C2 -d -r2.303 -r2.304 *** posixmodule.c 12 Sep 2003 16:25:38 -0000 2.303 --- posixmodule.c 20 Sep 2003 11:20:30 -0000 2.304 *************** *** 123,127 **** --- 123,129 ---- #define HAVE_OPENDIR 1 #define HAVE_PIPE 1 + #ifndef __rtems__ #define HAVE_POPEN 1 + #endif #define HAVE_SYSTEM 1 #define HAVE_WAIT 1 From loewis at users.sourceforge.net Sat Sep 20 11:29:45 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 11:29:50 2003 Subject: [Python-checkins] python/dist/src configure, 1.416.4.4, 1.416.4.5 configure.in, 1.427.4.4, 1.427.4.5 pyconfig.h.in, 1.83.4.1, 1.83.4.2 Message-ID: <E1A0jg9-0006qm-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv26173 Modified Files: Tag: release23-maint configure configure.in pyconfig.h.in Log Message: Check for declarations of fchdir and fsync. Fixes #800710. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.416.4.4 retrieving revision 1.416.4.5 diff -C2 -d -r1.416.4.4 -r1.416.4.5 *** configure 20 Sep 2003 10:47:26 -0000 1.416.4.4 --- configure 20 Sep 2003 15:29:40 -0000 1.416.4.5 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.427.4.3 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.427.4.4 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. *************** *** 13072,13080 **** - - - for ac_func in alarm chown clock confstr ctermid execv \ ! fchdir fork fsync fdatasync fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getpwent getwd \ --- 13072,13077 ---- for ac_func in alarm chown clock confstr ctermid execv \ ! fork fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getpwent getwd \ *************** *** 13297,13300 **** --- 13294,13435 ---- cat >>confdefs.h <<\_ACEOF #define HAVE_SYMLINK 1 + _ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for fchdir" >&5 + echo $ECHO_N "checking for fchdir... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <unistd.h> + int + main () + { + void *x=fchdir + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_FCHDIR 1 + _ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for fsync" >&5 + echo $ECHO_N "checking for fsync... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <unistd.h> + int + main () + { + void *x=fsync + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_SYNC 1 + _ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for fdatasync" >&5 + echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <unistd.h> + int + main () + { + void *x=fdatasync + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_FDATASYNC 1 _ACEOF Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.427.4.4 retrieving revision 1.427.4.5 diff -C2 -d -r1.427.4.4 -r1.427.4.5 *** configure.in 20 Sep 2003 10:47:28 -0000 1.427.4.4 --- configure.in 20 Sep 2003 15:29:42 -0000 1.427.4.5 *************** *** 2054,2058 **** # checks for library functions AC_CHECK_FUNCS(alarm chown clock confstr ctermid execv \ ! fchdir fork fsync fdatasync fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getpwent getwd \ --- 2054,2058 ---- # checks for library functions AC_CHECK_FUNCS(alarm chown clock confstr ctermid execv \ ! fork fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getpwent getwd \ *************** *** 2083,2086 **** --- 2083,2104 ---- AC_TRY_COMPILE([#include <unistd.h>], void *x=symlink, AC_DEFINE(HAVE_SYMLINK, 1, Define if you have the 'symlink' function.) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + AC_MSG_CHECKING(for fchdir) + AC_TRY_COMPILE([#include <unistd.h>], void *x=fchdir, + AC_DEFINE(HAVE_FCHDIR, 1, Define if you have the 'fchdir' function.) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + AC_MSG_CHECKING(for fsync) + AC_TRY_COMPILE([#include <unistd.h>], void *x=fsync, + AC_DEFINE(HAVE_SYNC, 1, Define if you have the 'fsync' function.) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + AC_MSG_CHECKING(for fdatasync) + AC_TRY_COMPILE([#include <unistd.h>], void *x=fdatasync, + AC_DEFINE(HAVE_FDATASYNC, 1, Define if you have the 'fdatasync' function.) AC_MSG_RESULT(yes), AC_MSG_RESULT(no) Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.83.4.1 retrieving revision 1.83.4.2 diff -C2 -d -r1.83.4.1 -r1.83.4.2 *** pyconfig.h.in 19 Sep 2003 01:00:16 -0000 1.83.4.1 --- pyconfig.h.in 20 Sep 2003 15:29:42 -0000 1.83.4.2 *************** *** 97,101 **** #undef HAVE_EXECV ! /* Define to 1 if you have the `fchdir' function. */ #undef HAVE_FCHDIR --- 97,101 ---- #undef HAVE_EXECV ! /* Define if you have the 'fchdir' function. */ #undef HAVE_FCHDIR *************** *** 103,107 **** #undef HAVE_FCNTL_H ! /* Define to 1 if you have the `fdatasync' function. */ #undef HAVE_FDATASYNC --- 103,107 ---- #undef HAVE_FCNTL_H ! /* Define if you have the 'fdatasync' function. */ #undef HAVE_FDATASYNC *************** *** 127,133 **** #undef HAVE_FSTATVFS - /* Define to 1 if you have the `fsync' function. */ - #undef HAVE_FSYNC - /* Define to 1 if you have the `ftell64' function. */ #undef HAVE_FTELL64 --- 127,130 ---- *************** *** 488,491 **** --- 485,491 ---- /* Define if you have the 'symlink' function. */ #undef HAVE_SYMLINK + + /* Define if you have the 'fsync' function. */ + #undef HAVE_SYNC /* Define to 1 if you have the `sysconf' function. */ From loewis at users.sourceforge.net Sat Sep 20 11:30:22 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 11:30:25 2003 Subject: [Python-checkins] python/dist/src configure, 1.422, 1.423 configure.in, 1.433, 1.434 pyconfig.h.in, 1.84, 1.85 Message-ID: <E1A0jgk-0006tj-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv26354 Modified Files: configure configure.in pyconfig.h.in Log Message: Check for declarations of fchdir and fsync. Fixes #800710. Backported to 2.3. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.422 retrieving revision 1.423 diff -C2 -d -r1.422 -r1.423 *** configure 20 Sep 2003 10:47:47 -0000 1.422 --- configure 20 Sep 2003 15:30:18 -0000 1.423 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.432 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.433 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. *************** *** 13084,13092 **** - - - for ac_func in alarm chown clock confstr ctermid execv \ ! fchdir fork fsync fdatasync fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getpwent getwd \ --- 13084,13089 ---- for ac_func in alarm chown clock confstr ctermid execv \ ! fork fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getpwent getwd \ *************** *** 13309,13312 **** --- 13306,13447 ---- cat >>confdefs.h <<\_ACEOF #define HAVE_SYMLINK 1 + _ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for fchdir" >&5 + echo $ECHO_N "checking for fchdir... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <unistd.h> + int + main () + { + void *x=fchdir + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_FCHDIR 1 + _ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for fsync" >&5 + echo $ECHO_N "checking for fsync... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <unistd.h> + int + main () + { + void *x=fsync + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_SYNC 1 + _ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for fdatasync" >&5 + echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <unistd.h> + int + main () + { + void *x=fdatasync + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_FDATASYNC 1 _ACEOF Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.433 retrieving revision 1.434 diff -C2 -d -r1.433 -r1.434 *** configure.in 20 Sep 2003 10:47:47 -0000 1.433 --- configure.in 20 Sep 2003 15:30:19 -0000 1.434 *************** *** 2066,2070 **** # checks for library functions AC_CHECK_FUNCS(alarm chown clock confstr ctermid execv \ ! fchdir fork fsync fdatasync fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getpwent getwd \ --- 2066,2070 ---- # checks for library functions AC_CHECK_FUNCS(alarm chown clock confstr ctermid execv \ ! fork fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getpwent getwd \ *************** *** 2095,2098 **** --- 2095,2116 ---- AC_TRY_COMPILE([#include <unistd.h>], void *x=symlink, AC_DEFINE(HAVE_SYMLINK, 1, Define if you have the 'symlink' function.) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + AC_MSG_CHECKING(for fchdir) + AC_TRY_COMPILE([#include <unistd.h>], void *x=fchdir, + AC_DEFINE(HAVE_FCHDIR, 1, Define if you have the 'fchdir' function.) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + AC_MSG_CHECKING(for fsync) + AC_TRY_COMPILE([#include <unistd.h>], void *x=fsync, + AC_DEFINE(HAVE_SYNC, 1, Define if you have the 'fsync' function.) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + AC_MSG_CHECKING(for fdatasync) + AC_TRY_COMPILE([#include <unistd.h>], void *x=fdatasync, + AC_DEFINE(HAVE_FDATASYNC, 1, Define if you have the 'fdatasync' function.) AC_MSG_RESULT(yes), AC_MSG_RESULT(no) Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** pyconfig.h.in 19 Sep 2003 00:59:16 -0000 1.84 --- pyconfig.h.in 20 Sep 2003 15:30:20 -0000 1.85 *************** *** 97,101 **** #undef HAVE_EXECV ! /* Define to 1 if you have the `fchdir' function. */ #undef HAVE_FCHDIR --- 97,101 ---- #undef HAVE_EXECV ! /* Define if you have the 'fchdir' function. */ #undef HAVE_FCHDIR *************** *** 103,107 **** #undef HAVE_FCNTL_H ! /* Define to 1 if you have the `fdatasync' function. */ #undef HAVE_FDATASYNC --- 103,107 ---- #undef HAVE_FCNTL_H ! /* Define if you have the 'fdatasync' function. */ #undef HAVE_FDATASYNC *************** *** 127,133 **** #undef HAVE_FSTATVFS - /* Define to 1 if you have the `fsync' function. */ - #undef HAVE_FSYNC - /* Define to 1 if you have the `ftell64' function. */ #undef HAVE_FTELL64 --- 127,130 ---- *************** *** 488,491 **** --- 485,491 ---- /* Define if you have the 'symlink' function. */ #undef HAVE_SYMLINK + + /* Define if you have the 'fsync' function. */ + #undef HAVE_SYNC /* Define to 1 if you have the `sysconf' function. */ From loewis at users.sourceforge.net Sat Sep 20 11:52:23 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 11:52:27 2003 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.2, 1.3 Message-ID: <E1A0k23-0007qG-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1:/tmp/cvs-serv29956/Doc/whatsnew Modified Files: whatsnew24.tex Log Message: Patch #707167: Pass dircache exceptions to the caller. Fixes #682813. Not backported because of behaviour change. Index: whatsnew24.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** whatsnew24.tex 13 Aug 2003 23:09:44 -0000 1.2 --- whatsnew24.tex 20 Sep 2003 15:52:20 -0000 1.3 *************** *** 125,129 **** \begin{itemize} ! \item Everything is all in the details! \end{itemize} --- 125,130 ---- \begin{itemize} ! \item dircache.listdir now passes exceptions to the caller, ! instead of returning empty lists. \end{itemize} From loewis at users.sourceforge.net Sat Sep 20 11:52:23 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 11:52:31 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_dircache.py, 1.5, 1.6 Message-ID: <E1A0k23-0007qL-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv29956/Lib/test Modified Files: test_dircache.py Log Message: Patch #707167: Pass dircache exceptions to the caller. Fixes #682813. Not backported because of behaviour change. Index: test_dircache.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_dircache.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_dircache.py 23 Jul 2002 19:03:50 -0000 1.5 --- test_dircache.py 20 Sep 2003 15:52:21 -0000 1.6 *************** *** 57,61 **** ## UNSUCCESSFUL CASES ! self.assertEquals(dircache.listdir(self.tempdir+"_nonexistent"), []) def test_annotate(self): --- 57,61 ---- ## UNSUCCESSFUL CASES ! self.assertRaises(OSError, dircache.listdir, self.tempdir+"_nonexistent") def test_annotate(self): From loewis at users.sourceforge.net Sat Sep 20 11:52:23 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 11:52:35 2003 Subject: [Python-checkins] python/dist/src/Lib dircache.py,1.11,1.12 Message-ID: <E1A0k23-0007qJ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv29956/Lib Modified Files: dircache.py Log Message: Patch #707167: Pass dircache exceptions to the caller. Fixes #682813. Not backported because of behaviour change. Index: dircache.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dircache.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** dircache.py 1 Jun 2002 19:51:15 -0000 1.11 --- dircache.py 20 Sep 2003 15:52:20 -0000 1.12 *************** *** 23,35 **** except KeyError: cached_mtime, list = -1, [] ! try: ! mtime = os.stat(path).st_mtime ! except os.error: ! return [] if mtime != cached_mtime: ! try: ! list = os.listdir(path) ! except os.error: ! return [] list.sort() cache[path] = mtime, list --- 23,29 ---- except KeyError: cached_mtime, list = -1, [] ! mtime = os.stat(path).st_mtime if mtime != cached_mtime: ! list = os.listdir(path) list.sort() cache[path] = mtime, list From loewis at users.sourceforge.net Sat Sep 20 11:52:23 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 11:52:38 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.856,1.857 Message-ID: <E1A0k23-0007qZ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv29956/Misc Modified Files: NEWS Log Message: Patch #707167: Pass dircache exceptions to the caller. Fixes #682813. Not backported because of behaviour change. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.856 retrieving revision 1.857 diff -C2 -d -r1.856 -r1.857 *** NEWS 16 Sep 2003 19:41:38 -0000 1.856 --- NEWS 20 Sep 2003 15:52:21 -0000 1.857 *************** *** 41,44 **** --- 41,47 ---- ------- + - dircache now passes exceptions to the caller, instead of returning + empty lists. + - The bsddb module and dbhash module now support the iterator and mapping protocols which make them more substitutable for dictionaries From loewis at users.sourceforge.net Sat Sep 20 12:08:34 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 12:08:37 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libreadline.tex, 1.10, 1.11 Message-ID: <E1A0kHi-0008R2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv32387/Doc/lib Modified Files: libreadline.tex Log Message: Patch #800697: Add readline.clear_history. Index: libreadline.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libreadline.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** libreadline.tex 21 Feb 2003 20:11:09 -0000 1.10 --- libreadline.tex 20 Sep 2003 16:08:32 -0000 1.11 *************** *** 43,46 **** --- 43,52 ---- \end{funcdesc} + \begin{funcdesc}{clear_history}{} + Clear the current history. (Note: this function is not available if + the installed version of GNU readline doesn't support it.) + \versionadded{2.4} + \end{funcdesc} + \begin{funcdesc}{get_history_length}{} Return the desired length of the history file. Negative values imply From loewis at users.sourceforge.net Sat Sep 20 12:08:35 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 12:08:41 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.857,1.858 Message-ID: <E1A0kHj-0008R8-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv32387/Misc Modified Files: NEWS Log Message: Patch #800697: Add readline.clear_history. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.857 retrieving revision 1.858 diff -C2 -d -r1.857 -r1.858 *** NEWS 20 Sep 2003 15:52:21 -0000 1.857 --- NEWS 20 Sep 2003 16:08:32 -0000 1.858 *************** *** 30,33 **** --- 30,35 ---- ----------------- + - readline.clear_history was added. + - select.select() now accepts sequences for its first three arguments. From loewis at users.sourceforge.net Sat Sep 20 12:08:35 2003 From: loewis at users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat Sep 20 12:08:44 2003 Subject: [Python-checkins] python/dist/src/Modules readline.c,2.64,2.65 Message-ID: <E1A0kHj-0008RB-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv32387/Modules Modified Files: readline.c Log Message: Patch #800697: Add readline.clear_history. Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.64 retrieving revision 2.65 diff -C2 -d -r2.64 -r2.65 *** readline.c 17 Jul 2003 16:26:58 -0000 2.64 --- readline.c 20 Sep 2003 16:08:33 -0000 2.65 *************** *** 413,416 **** --- 413,434 ---- + #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER + + /* Exported function to clear the current history */ + + static PyObject * + py_clear_history(PyObject *self, PyObject *noarg) + { + clear_history(); + Py_INCREF(Py_None); + return Py_None; + } + + PyDoc_STRVAR(doc_clear_history, + "clear_history() -> None\n\ + Clear the current readline history."); + #endif + + /* Exported function to insert text into the line buffer */ *************** *** 484,487 **** --- 502,508 ---- {"set_pre_input_hook", set_pre_input_hook, METH_VARARGS, doc_set_pre_input_hook}, + #endif + #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER + {"clear_history", py_clear_history, METH_NOARGS, doc_clear_history}, #endif {0, 0} From tim_one at users.sourceforge.net Sat Sep 20 18:06:16 2003 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sat Sep 20 18:06:21 2003 Subject: [Python-checkins] python/dist/src/Lib/test regrtest.py,1.145,1.146 Message-ID: <E1A0prs-0006s4-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv26340/Lib/test Modified Files: regrtest.py Log Message: test__locale (two underscores) can't pass on Windows: RADIXCHAR doesn't exist, and neither do any of the specific 5-letter locale names the test is looking for. Index: regrtest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v retrieving revision 1.145 retrieving revision 1.146 diff -C2 -d -r1.145 -r1.146 *** regrtest.py 23 Jul 2003 00:30:39 -0000 1.145 --- regrtest.py 20 Sep 2003 22:06:13 -0000 1.146 *************** *** 555,558 **** --- 555,559 ---- 'win32': """ + test__locale test_al test_bsddb185 From tim_one at users.sourceforge.net Sat Sep 20 18:16:28 2003 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sat Sep 20 18:16:32 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_urllibnet.py, 1.6, 1.7 Message-ID: <E1A0q1k-0007QT-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv28215/Lib/test Modified Files: test_urllibnet.py Log Message: SF patch 809915: Fix bogus address to hopefully always break. test_bad_address(): Recover from that VeriSign thought it would boost its corporate coffers to start resolving http://www.sadflkjsasadf.com/. Bugfix candidate -- although the bug is more VeriSign's than Python's! Index: test_urllibnet.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_urllibnet.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_urllibnet.py 17 Jul 2003 16:31:00 -0000 1.6 --- test_urllibnet.py 20 Sep 2003 22:16:26 -0000 1.7 *************** *** 104,108 **** # address. self.assertRaises(IOError, ! urllib.urlopen, "http://www.sadflkjsasadf.com/") class urlretrieveNetworkTests(unittest.TestCase): --- 104,115 ---- # address. self.assertRaises(IOError, ! # SF patch 809915: In Sep 2003, VeriSign started ! # highjacking invalid .com and .net addresses to ! # boost traffic to their own site. This test ! # started failing then. One hopes the .invalid ! # domain will be spared to serve its defined ! # purpose. ! # urllib.urlopen, "http://www.sadflkjsasadf.com/") ! urllib.urlopen, "http://www.python.invalid/") class urlretrieveNetworkTests(unittest.TestCase): From greg at users.sourceforge.net Sat Sep 20 19:51:36 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sat Sep 20 19:51:40 2003 Subject: [Python-checkins] python/dist/src/Lib/bsddb __init__.py,1.7,1.8 Message-ID: <E1A0rVo-00032i-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/bsddb In directory sc8-pr-cvs1:/tmp/cvs-serv11613 Modified Files: __init__.py Log Message: Maintain backwards compatibility with python < 2.3 by dynamically adding the iterator interface for python >= 2.3. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/__init__.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** __init__.py 13 Sep 2003 03:18:34 -0000 1.7 --- __init__.py 20 Sep 2003 23:51:34 -0000 1.8 *************** *** 53,59 **** #---------------------------------------------------------------------- import UserDict ! class _DBWithCursor(UserDict.DictMixin): """ A simple wrapper around DB that makes it look like the bsddbobject in --- 53,88 ---- #---------------------------------------------------------------------- + import sys + + # for backwards compatibility with python versions older than 2.3, the + # iterator interface is dynamically defined and added using a mixin + # class. old python can't tokenize it due to the yield keyword. + if sys.version >= '2.3': + exec """ import UserDict + class _iter_mixin(UserDict.DictMixin): + def __iter__(self): + try: + yield self.first()[0] + next = self.next + while 1: + yield next()[0] + except _bsddb.DBNotFoundError: + return ! def iteritems(self): ! try: ! yield self.first() ! next = self.next ! while 1: ! yield next() ! except _bsddb.DBNotFoundError: ! return ! """ ! else: ! class _iter_mixin: pass ! ! ! class _DBWithCursor(_iter_mixin): """ A simple wrapper around DB that makes it look like the bsddbobject in *************** *** 146,166 **** return self.db.sync() - def __iter__(self): - try: - yield self.first()[0] - next = self.next - while 1: - yield next()[0] - except _bsddb.DBNotFoundError: - return - - def iteritems(self): - try: - yield self.first() - next = self.next - while 1: - yield next() - except _bsddb.DBNotFoundError: - return #---------------------------------------------------------------------- --- 175,178 ---- From greg at users.sourceforge.net Sat Sep 20 20:08:16 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sat Sep 20 20:08:19 2003 Subject: [Python-checkins] python/dist/src/Modules _bsddb.c,1.18,1.19 Message-ID: <E1A0rlw-0003p2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv14110/extsrc Modified Files: _bsddb.c Log Message: Adds basic support for BerkeleyDB 4.2.x. Compiles and passes tests; new features in BerkeleyDB not exposed. notably: the DB_MPOOLFILE interface has not yet been wrapped in an object. Adds support for building and installing bsddb3 in python2.3 that has an older version of this module installed as bsddb without conflicts. The pybsddb.sf.net build/packaged version of the module uses a dynamicly loadable module called _pybsddb rather than _bsddb. Index: _bsddb.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_bsddb.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** _bsddb.c 28 Aug 2003 21:50:30 -0000 1.18 --- _bsddb.c 21 Sep 2003 00:08:14 -0000 1.19 *************** *** 37,41 **** * Handwritten code to wrap version 3.x of the Berkeley DB library, * written to replace a SWIG-generated file. It has since been updated ! * to compile with BerkeleyDB versions 3.2 through 4.1. * * This module was started by Andrew Kuchling to remove the dependency --- 37,41 ---- * Handwritten code to wrap version 3.x of the Berkeley DB library, * written to replace a SWIG-generated file. It has since been updated ! * to compile with BerkeleyDB versions 3.2 through 4.2. * * This module was started by Andrew Kuchling to remove the dependency *************** *** 94,98 **** #define DBVER (DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR) ! #define PY_BSDDB_VERSION "4.1.6" static char *rcs_id = "$Id$"; --- 94,98 ---- #define DBVER (DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR) ! #define PY_BSDDB_VERSION "4.2.0" static char *rcs_id = "$Id$"; *************** *** 2168,2171 **** --- 2168,2182 ---- if (outFileName) fclose(outFile); + + /* DB.verify acts as a DB handle destructor (like close); this was + * documented in BerkeleyDB 4.2 but had the undocumented effect + * of not being safe in prior versions while still requiring an explicit + * DB.close call afterwards. Lets call close for the user to emulate + * the safe 4.2 behaviour. */ + #if (DBVER <= 41) + self->db->close(self->db, 0); + #endif + self->db = NULL; + RETURN_IF_ERR(); RETURN_NONE(); *************** *** 4341,4345 **** #define ADD_INT(dict, NAME) _addIntToDict(dict, #NAME, NAME) ! DL_EXPORT(void) init_bsddb(void) --- 4352,4357 ---- #define ADD_INT(dict, NAME) _addIntToDict(dict, #NAME, NAME) ! #define MODULE_NAME_MAX_LEN 11 ! static char _bsddbModuleName[MODULE_NAME_MAX_LEN+1] = "_bsddb"; DL_EXPORT(void) init_bsddb(void) *************** *** 4366,4370 **** /* Create the module and add the functions */ ! m = Py_InitModule("_bsddb", bsddb_methods); /* Add some symbolic constants to the module */ --- 4378,4382 ---- /* Create the module and add the functions */ ! m = Py_InitModule(_bsddbModuleName, bsddb_methods); /* Add some symbolic constants to the module */ *************** *** 4387,4391 **** --- 4399,4409 ---- ADD_INT(d, DB_MAX_RECORDS); + #if (DBVER >= 42) + ADD_INT(d, DB_RPCCLIENT); + #else ADD_INT(d, DB_CLIENT); + /* allow apps to be written using DB_RPCCLIENT on older BerkeleyDB */ + _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT); + #endif ADD_INT(d, DB_XA_CREATE); *************** *** 4536,4540 **** ADD_INT(d, DB_CURLSN); #endif ! #if (DBVER >= 33) ADD_INT(d, DB_COMMIT); #endif --- 4554,4558 ---- ADD_INT(d, DB_CURLSN); #endif ! #if ((DBVER >= 33) && (DBVER <= 41)) ADD_INT(d, DB_COMMIT); #endif *************** *** 4611,4614 **** --- 4629,4644 ---- #endif + #if (DBVER >= 42) + ADD_INT(d, DB_TIME_NOTGRANTED); + ADD_INT(d, DB_TXN_NOT_DURABLE); + ADD_INT(d, DB_TXN_WRITE_NOSYNC); + ADD_INT(d, DB_LOG_AUTOREMOVE); + ADD_INT(d, DB_DIRECT_LOG); + ADD_INT(d, DB_DIRECT_DB); + ADD_INT(d, DB_INIT_REP); + ADD_INT(d, DB_ENCRYPT); + ADD_INT(d, DB_CHKSUM); + #endif + #if (DBVER >= 41) ADD_INT(d, DB_ENCRYPT_AES); *************** *** 4686,4688 **** --- 4716,4727 ---- Py_FatalError("can't initialize module _bsddb"); } + } + + /* allow this module to be named _pybsddb so that it can be installed + * and imported on top of python >= 2.3 that includes its own older + * copy of the library named _bsddb without importing the old version. */ + DL_EXPORT(void) init_pybsddb(void) + { + strncpy(_bsddbModuleName, "_pybsddb", MODULE_NAME_MAX_LEN); + init_bsddb(); } From greg at users.sourceforge.net Sat Sep 20 20:08:16 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sat Sep 20 20:08:23 2003 Subject: [Python-checkins] python/dist/src/Lib/bsddb __init__.py, 1.8, 1.9 db.py, 1.2, 1.3 dbshelve.py, 1.8, 1.9 dbtables.py, 1.8, 1.9 dbutils.py, 1.6, 1.7 Message-ID: <E1A0rlw-0003oi-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/bsddb In directory sc8-pr-cvs1:/tmp/cvs-serv14110/bsddb Modified Files: __init__.py db.py dbshelve.py dbtables.py dbutils.py Log Message: Adds basic support for BerkeleyDB 4.2.x. Compiles and passes tests; new features in BerkeleyDB not exposed. notably: the DB_MPOOLFILE interface has not yet been wrapped in an object. Adds support for building and installing bsddb3 in python2.3 that has an older version of this module installed as bsddb without conflicts. The pybsddb.sf.net build/packaged version of the module uses a dynamicly loadable module called _pybsddb rather than _bsddb. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/__init__.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** __init__.py 20 Sep 2003 23:51:34 -0000 1.8 --- __init__.py 21 Sep 2003 00:08:14 -0000 1.9 *************** *** 34,42 **** ! """Support for BerkeleyDB 3.1 through 4.1. """ try: ! import _bsddb except ImportError: # Remove ourselves from sys.modules --- 34,49 ---- ! """Support for BerkeleyDB 3.2 through 4.2. """ try: ! if __name__ == 'bsddb3': ! # import _pybsddb binary as it should be the more recent version from ! # a standalone pybsddb addon package than the version included with ! # python as bsddb._bsddb. ! import _pybsddb ! _bsddb = _pybsddb ! else: ! import _bsddb except ImportError: # Remove ourselves from sys.modules Index: db.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/db.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** db.py 19 Nov 2002 17:48:48 -0000 1.2 --- db.py 21 Sep 2003 00:08:14 -0000 1.3 *************** *** 38,44 **** # it just simply imports everything from _db. ! from _bsddb import * ! from _bsddb import __version__ ! if version() < (3, 1, 0): ! raise ImportError, "BerkeleyDB 3.x symbols not found. Perhaps python was statically linked with an older version?" --- 38,51 ---- # it just simply imports everything from _db. ! if __name__[:len('bsddb3.')] == 'bsddb3.': ! # import _pybsddb binary as it should be the more recent version from ! # a standalone pybsddb addon package than the version included with ! # python as bsddb._bsddb. ! from _pybsddb import * ! from _pybsddb import __version__ ! else: ! from _bsddb import * ! from _bsddb import __version__ ! if version() < (3, 2, 0): ! raise ImportError, "correct BerkeleyDB symbols not found. Perhaps python was statically linked with an older version?" Index: dbshelve.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/dbshelve.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dbshelve.py 24 Apr 2003 16:02:46 -0000 1.8 --- dbshelve.py 21 Sep 2003 00:08:14 -0000 1.9 *************** *** 36,45 **** # DictMixin is new in Python 2.3 class DictMixin: pass ! try: ! # For Python 2.3 ! from bsddb import db ! except ImportError: ! # For earlier Pythons w/distutils pybsddb ! from bsddb3 import db #------------------------------------------------------------------------ --- 36,40 ---- # DictMixin is new in Python 2.3 class DictMixin: pass ! import db #------------------------------------------------------------------------ Index: dbtables.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/dbtables.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dbtables.py 9 Jul 2003 04:45:59 -0000 1.8 --- dbtables.py 21 Sep 2003 00:08:14 -0000 1.9 *************** *** 27,35 **** try: # For Python 2.3 from bsddb.db import * - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3.db import * --- 27,35 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3.db import * + except ImportError: # For Python 2.3 from bsddb.db import * Index: dbutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/dbutils.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dbutils.py 28 Jan 2003 17:20:42 -0000 1.6 --- dbutils.py 21 Sep 2003 00:08:14 -0000 1.7 *************** *** 27,36 **** from time import sleep as _sleep ! try: ! # For Python 2.3 ! from bsddb import db ! except ImportError: ! # For earlier Pythons w/distutils pybsddb ! from bsddb3 import db # always sleep at least N seconds between retrys --- 27,31 ---- from time import sleep as _sleep ! import db # always sleep at least N seconds between retrys From greg at users.sourceforge.net Sat Sep 20 20:08:17 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sat Sep 20 20:08:26 2003 Subject: [Python-checkins] python/dist/src/Lib/bsddb/test test_all.py, 1.2, 1.3 test_associate.py, 1.5, 1.6 test_basics.py, 1.7, 1.8 test_compat.py, 1.5, 1.6 test_dbobj.py, 1.4, 1.5 test_dbshelve.py, 1.5, 1.6 test_dbtables.py, 1.5, 1.6 test_env_close.py, 1.5, 1.6 test_get_none.py, 1.4, 1.5 test_join.py, 1.6, 1.7 test_lock.py, 1.4, 1.5 test_misc.py, 1.4, 1.5 test_queue.py, 1.3, 1.4 test_recno.py, 1.6, 1.7 test_thread.py, 1.7, 1.8 Message-ID: <E1A0rlx-0003ot-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/bsddb/test In directory sc8-pr-cvs1:/tmp/cvs-serv14110/bsddb/test Modified Files: test_all.py test_associate.py test_basics.py test_compat.py test_dbobj.py test_dbshelve.py test_dbtables.py test_env_close.py test_get_none.py test_join.py test_lock.py test_misc.py test_queue.py test_recno.py test_thread.py Log Message: Adds basic support for BerkeleyDB 4.2.x. Compiles and passes tests; new features in BerkeleyDB not exposed. notably: the DB_MPOOLFILE interface has not yet been wrapped in an object. Adds support for building and installing bsddb3 in python2.3 that has an older version of this module installed as bsddb without conflicts. The pybsddb.sf.net build/packaged version of the module uses a dynamicly loadable module called _pybsddb rather than _bsddb. Index: test_all.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_all.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_all.py 28 Jan 2003 17:20:42 -0000 1.2 --- test_all.py 21 Sep 2003 00:08:14 -0000 1.3 *************** *** 18,26 **** def print_versions(): try: # For Python 2.3 from bsddb import db - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db print print '-=' * 38 --- 18,26 ---- def print_versions(): try: + # For Pythons w/distutils pybsddb + from bsddb3 import db + except ImportError: # For Python 2.3 from bsddb import db print print '-=' * 38 Index: test_associate.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_associate.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_associate.py 9 Jul 2003 04:45:59 -0000 1.5 --- test_associate.py 21 Sep 2003 00:08:14 -0000 1.6 *************** *** 18,26 **** try: # For Python 2.3 from bsddb import db, dbshelve - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db, dbshelve --- 18,26 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db, dbshelve + except ImportError: # For Python 2.3 from bsddb import db, dbshelve Index: test_basics.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_basics.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_basics.py 9 Jul 2003 04:45:59 -0000 1.7 --- test_basics.py 21 Sep 2003 00:08:14 -0000 1.8 *************** *** 14,22 **** try: # For Python 2.3 from bsddb import db - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db from test_all import verbose --- 14,22 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db + except ImportError: # For Python 2.3 from bsddb import db from test_all import verbose Index: test_compat.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_compat.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_compat.py 9 Jul 2003 05:29:24 -0000 1.5 --- test_compat.py 21 Sep 2003 00:08:14 -0000 1.6 *************** *** 11,19 **** try: # For Python 2.3 from bsddb import db, hashopen, btopen, rnopen - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db, hashopen, btopen, rnopen --- 11,19 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db, hashopen, btopen, rnopen + except ImportError: # For Python 2.3 from bsddb import db, hashopen, btopen, rnopen Index: test_dbobj.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_dbobj.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_dbobj.py 28 Jan 2003 17:20:44 -0000 1.4 --- test_dbobj.py 21 Sep 2003 00:08:14 -0000 1.5 *************** *** 5,13 **** try: # For Python 2.3 from bsddb import db, dbobj - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db, dbobj --- 5,13 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db, dbobj + except ImportError: # For Python 2.3 from bsddb import db, dbobj Index: test_dbshelve.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_dbshelve.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_dbshelve.py 28 Jan 2003 17:20:44 -0000 1.5 --- test_dbshelve.py 21 Sep 2003 00:08:14 -0000 1.6 *************** *** 10,18 **** try: # For Python 2.3 from bsddb import db, dbshelve - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db, dbshelve from test_all import verbose --- 10,18 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db, dbshelve + except ImportError: # For Python 2.3 from bsddb import db, dbshelve from test_all import verbose Index: test_dbtables.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_dbtables.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_dbtables.py 28 Jan 2003 17:20:44 -0000 1.5 --- test_dbtables.py 21 Sep 2003 00:08:14 -0000 1.6 *************** *** 32,40 **** try: # For Python 2.3 from bsddb import db, dbtables - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db, dbtables --- 32,40 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db, dbtables + except ImportError: # For Python 2.3 from bsddb import db, dbtables Index: test_env_close.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_env_close.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_env_close.py 28 Jan 2003 17:20:44 -0000 1.5 --- test_env_close.py 21 Sep 2003 00:08:14 -0000 1.6 *************** *** 10,18 **** try: # For Python 2.3 from bsddb import db - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db from test_all import verbose --- 10,18 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db + except ImportError: # For Python 2.3 from bsddb import db from test_all import verbose Index: test_get_none.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_get_none.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_get_none.py 28 Jan 2003 17:20:44 -0000 1.4 --- test_get_none.py 21 Sep 2003 00:08:14 -0000 1.5 *************** *** 9,17 **** try: # For Python 2.3 from bsddb import db - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db from test_all import verbose --- 9,17 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db + except ImportError: # For Python 2.3 from bsddb import db from test_all import verbose Index: test_join.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_join.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_join.py 21 Jul 2003 18:43:33 -0000 1.6 --- test_join.py 21 Sep 2003 00:08:14 -0000 1.7 *************** *** 17,25 **** try: # For Python 2.3 from bsddb import db, dbshelve - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db, dbshelve --- 17,25 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db, dbshelve + except ImportError: # For Python 2.3 from bsddb import db, dbshelve Index: test_lock.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_lock.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_lock.py 27 Mar 2003 17:23:29 -0000 1.4 --- test_lock.py 21 Sep 2003 00:08:14 -0000 1.5 *************** *** 20,28 **** try: # For Python 2.3 from bsddb import db - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db --- 20,28 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db + except ImportError: # For Python 2.3 from bsddb import db Index: test_misc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_misc.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_misc.py 3 Feb 2003 04:19:40 -0000 1.4 --- test_misc.py 21 Sep 2003 00:08:14 -0000 1.5 *************** *** 7,15 **** try: # For Python 2.3 from bsddb import db, dbshelve - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db, dbshelve #---------------------------------------------------------------------- --- 7,15 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db, dbshelve + except ImportError: # For Python 2.3 from bsddb import db, dbshelve #---------------------------------------------------------------------- Index: test_queue.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_queue.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_queue.py 28 Jan 2003 17:20:44 -0000 1.3 --- test_queue.py 21 Sep 2003 00:08:14 -0000 1.4 *************** *** 9,17 **** try: # For Python 2.3 from bsddb import db - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db from test_all import verbose --- 9,17 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db + except ImportError: # For Python 2.3 from bsddb import db from test_all import verbose Index: test_recno.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_recno.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_recno.py 28 Jan 2003 17:20:44 -0000 1.6 --- test_recno.py 21 Sep 2003 00:08:14 -0000 1.7 *************** *** 12,20 **** try: # For Python 2.3 from bsddb import db - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' --- 12,20 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db + except ImportError: # For Python 2.3 from bsddb import db letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' Index: test_thread.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_thread.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_thread.py 21 Jul 2003 23:01:34 -0000 1.7 --- test_thread.py 21 Sep 2003 00:08:14 -0000 1.8 *************** *** 29,37 **** try: # For Python 2.3 from bsddb import db, dbutils - except ImportError: - # For earlier Pythons w/distutils pybsddb - from bsddb3 import db, dbutils --- 29,37 ---- try: + # For Pythons w/distutils pybsddb + from bsddb3 import db, dbutils + except ImportError: # For Python 2.3 from bsddb import db, dbutils From bcannon at users.sourceforge.net Sat Sep 20 20:17:50 2003 From: bcannon at users.sourceforge.net (bcannon@users.sourceforge.net) Date: Sat Sep 20 20:17:53 2003 Subject: [Python-checkins] python/dist/src/Python ast.c,1.1.2.32,1.1.2.33 Message-ID: <E1A0rvC-0004Ds-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv16028/Python Modified Files: Tag: ast-branch ast.c Log Message: >From ast_for_atom() to the end of the file: - cleaned up syntax - check function return values - raise exceptions where appropriate Index: ast.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/Attic/ast.c,v retrieving revision 1.1.2.32 retrieving revision 1.1.2.33 diff -C2 -d -r1.1.2.32 -r1.1.2.33 *** ast.c 15 Sep 2003 00:20:51 -0000 1.1.2.32 --- ast.c 21 Sep 2003 00:17:48 -0000 1.1.2.33 *************** *** 11,17 **** /* XXX TO DO ! - re-indent this file ! - internal error checking (such as function return values, freeing memory, ! etc.) - syntax errors */ --- 11,16 ---- /* XXX TO DO [...1868 lines suppressed...] ! return ast_for_if_stmt(ch); ! case while_stmt: ! return ast_for_while_stmt(ch); ! case for_stmt: ! return ast_for_for_stmt(ch); ! case try_stmt: ! return ast_for_try_stmt(ch); ! case funcdef: ! return ast_for_funcdef(ch); ! case classdef: ! return ast_for_classdef(ch); ! default: ! PyErr_Format(PyExc_Exception, ! "unhandled small_stmt: TYPE=%d NCH=%d\n", ! TYPE(n), NCH(n)); ! return NULL; } } } From rhettinger at users.sourceforge.net Sun Sep 21 00:38:35 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sun Sep 21 00:38:39 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_urllibnet.py, 1.6, 1.6.6.1 Message-ID: <E1A0vzX-0004jj-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv18088 Modified Files: Tag: release23-maint test_urllibnet.py Log Message: Backport Tim's fix to SF #809915. Creates a url that should always be invalid. Index: test_urllibnet.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_urllibnet.py,v retrieving revision 1.6 retrieving revision 1.6.6.1 diff -C2 -d -r1.6 -r1.6.6.1 *** test_urllibnet.py 17 Jul 2003 16:31:00 -0000 1.6 --- test_urllibnet.py 21 Sep 2003 04:38:33 -0000 1.6.6.1 *************** *** 104,108 **** # address. self.assertRaises(IOError, ! urllib.urlopen, "http://www.sadflkjsasadf.com/") class urlretrieveNetworkTests(unittest.TestCase): --- 104,115 ---- # address. self.assertRaises(IOError, ! # SF patch 809915: In Sep 2003, VeriSign started ! # highjacking invalid .com and .net addresses to ! # boost traffic to their own site. This test ! # started failing then. One hopes the .invalid ! # domain will be spared to serve its defined ! # purpose. ! # urllib.urlopen, "http://www.sadflkjsasadf.com/") ! urllib.urlopen, "http://www.python.invalid/") class urlretrieveNetworkTests(unittest.TestCase): From rhettinger at users.sourceforge.net Sun Sep 21 00:51:48 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sun Sep 21 00:51:51 2003 Subject: [Python-checkins] python/dist/src/Lib/bsddb __init__.py, 1.5.10.1, 1.5.10.2 Message-ID: <E1A0wCK-00058W-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/bsddb In directory sc8-pr-cvs1:/tmp/cvs-serv19704 Modified Files: Tag: release23-maint __init__.py Log Message: Backport Greg's patch (1.7 to 1.8) for backwards code compatability. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/__init__.py,v retrieving revision 1.5.10.1 retrieving revision 1.5.10.2 diff -C2 -d -r1.5.10.1 -r1.5.10.2 *** __init__.py 16 Sep 2003 21:42:13 -0000 1.5.10.1 --- __init__.py 21 Sep 2003 04:51:46 -0000 1.5.10.2 *************** *** 53,59 **** #---------------------------------------------------------------------- import UserDict ! class _DBWithCursor(UserDict.DictMixin): """ A simple wrapper around DB that makes it look like the bsddbobject in --- 53,88 ---- #---------------------------------------------------------------------- + import sys + + # for backwards compatibility with python versions older than 2.3, the + # iterator interface is dynamically defined and added using a mixin + # class. old python can't tokenize it due to the yield keyword. + if sys.version >= '2.3': + exec """ import UserDict + class _iter_mixin(UserDict.DictMixin): + def __iter__(self): + try: + yield self.first()[0] + next = self.next + while 1: + yield next()[0] + except _bsddb.DBNotFoundError: + return ! def iteritems(self): ! try: ! yield self.first() ! next = self.next ! while 1: ! yield next() ! except _bsddb.DBNotFoundError: ! return ! """ ! else: ! class _iter_mixin: pass ! ! ! class _DBWithCursor(_iter_mixin): """ A simple wrapper around DB that makes it look like the bsddbobject in *************** *** 146,166 **** return self.db.sync() - def __iter__(self): - try: - yield self.first()[0] - next = self.next - while 1: - yield next()[0] - except _bsddb.DBNotFoundError: - return - - def iteritems(self): - try: - yield self.first() - next = self.next - while 1: - yield next() - except _bsddb.DBNotFoundError: - return #---------------------------------------------------------------------- --- 175,178 ---- From rhettinger at users.sourceforge.net Sun Sep 21 04:14:13 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sun Sep 21 04:14:22 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_sets.py,1.27,1.28 Message-ID: <E1A0zMD-0003dm-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv13992 Modified Files: test_sets.py Log Message: Improve and expand identity tests. Index: test_sets.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sets.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** test_sets.py 30 Aug 2003 22:54:55 -0000 1.27 --- test_sets.py 21 Sep 2003 08:14:11 -0000 1.28 *************** *** 1,5 **** #!/usr/bin/env python ! import unittest, operator, copy, pickle from sets import Set, ImmutableSet from test import test_support --- 1,5 ---- #!/usr/bin/env python ! import unittest, operator, copy, pickle, random from sets import Set, ImmutableSet from test import test_support *************** *** 712,727 **** class TestIdentities(unittest.TestCase): def setUp(self): ! self.a = Set('abracadabra') ! self.b = Set('alacazam') def test_binopsVsSubsets(self): a, b = self.a, self.b ! self.assert_(a - b < a) ! self.assert_(b - a < b) ! self.assert_(a & b < a) ! self.assert_(a & b < b) ! self.assert_(a | b > a) ! self.assert_(a | b > b) ! self.assert_(a ^ b < a | b) def test_commutativity(self): --- 712,727 ---- class TestIdentities(unittest.TestCase): def setUp(self): ! self.a = Set([random.randrange(100) for i in xrange(50)]) ! self.b = Set([random.randrange(100) for i in xrange(50)]) def test_binopsVsSubsets(self): a, b = self.a, self.b ! self.assert_(a - b <= a) ! self.assert_(b - a <= b) ! self.assert_(a & b <= a) ! self.assert_(a & b <= b) ! self.assert_(a | b >= a) ! self.assert_(a | b >= b) ! self.assert_(a ^ b <= a | b) def test_commutativity(self): *************** *** 745,753 **** def test_exclusion(self): ! # check that inverse operations show non-overlap a, b, zero = self.a, self.b, Set() self.assertEqual((a-b)&b, zero) self.assertEqual((b-a)&a, zero) self.assertEqual((a&b)&(a^b), zero) #============================================================================== --- 745,760 ---- def test_exclusion(self): ! # check that inverse operations do not overlap a, b, zero = self.a, self.b, Set() self.assertEqual((a-b)&b, zero) self.assertEqual((b-a)&a, zero) self.assertEqual((a&b)&(a^b), zero) + + def test_cardinality_relations(self): + a, b = self.a, self.b + self.assertEqual(len(a), len(a-b) + len(a&b)) + self.assertEqual(len(b), len(b-a) + len(a&b)) + self.assertEqual(len(a^b), len(a-b) + len(b-a)) + self.assertEqual(len(a|b), len(a-b) + len(a&b) + len(b-a)) #============================================================================== From akuchling at users.sourceforge.net Sun Sep 21 15:56:17 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Sun Sep 21 15:56:20 2003 Subject: [Python-checkins] python/nondist/sandbox/Lib bdist_dpkg.py, NONE, 1.1 Message-ID: <E1A1AJd-0000qn-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv3263 Added Files: bdist_dpkg.py Log Message: Stab at bdist_dpkg -- still needs a lot of work --- NEW FILE: bdist_dpkg.py --- """distutils.command.bdist_dpkg Implements the Distutils 'bdist_dpkg' command (create a Debian packaging). """ # This module should be kept compatible with Python 1.5.2. __revision__ = "$Id: bdist_dpkg.py,v 1.1 2003/09/21 19:56:14 akuchling Exp $" import sys, os, string import glob from types import * from distutils.core import Command from distutils.debug import DEBUG from distutils.util import get_platform from distutils.file_util import write_file from distutils.errors import * from distutils import log MARKER_STRING = "GENERATED BY BDIST_DPKG" class bdist_dpkg (Command): description = "create a DPKG distribution" user_options = [ ] boolean_options = [] def initialize_options (self): pass # initialize_options() def finalize_options (self): if os.name != 'posix': raise DistutilsPlatformError, \ ("don't know how to create DPKG " "distributions on platform %s" % os.name) # finalize_options() def run (self): if DEBUG: print "before _get_package_data():" self._create_dpkg_files() # build package log.info("building DPKG") #self.spawn(["dpkg-buildpackage", "-rfakeroot"]) # run() def _create_dpkg_files (self): # Files to create: # changelog, control, # Optional: docs, copyright # log.info("creating debian control files") if not os.path.exists('debian'): log.info("creating debian/ subdirectory") os.mkdir('debian') dirlist = "" for i in self.distribution.packages: dir = i dirlist += ' ' + dir dist = self.distribution package_name = dist.get_name().lower() d = {'name':dist.get_name(), 'package_name':package_name, 'pyversion': '%i.%i' % sys.version_info[0:2], 'dirlist':dirlist, 'marker':MARKER_STRING, } if not self._is_user_file('changelog') or True: log.info('writing changelog file') output = self._write_file('changelog') output.write("""%s (%s-%i) unstable; urgency=low * Dummy changelog line -- %s <%s> Wed, 11 Jun 2003 14:44:11 -0400 """ % (package_name, dist.get_version(), 1, # XXX build version dist.get_maintainer(), dist.get_maintainer_email())) output.close() if not self._is_user_file('control') or True: dist = self.distribution log.info('writing control file') output = self._write_file('control') #output.write('XXX-Dummy-Field: %s\n' % MARKER_STRING) output.write("Source: %s\n" % package_name) output.write("Priority: optional\n") output.write("Maintainer: %s <%s>\n" % (dist.get_maintainer(), dist.get_maintainer_email())) output.write("""Build-Depends: debhelper (>> 3.0.0) Standards-Version: 3.5.8 Section: libs """) output.write('\n') # Separator line output.write("Package: %s\n" % package_name) output.write("""Section: libs Architecture: all\n""") output.write("Depends: python%(pyversion)s\n" % d) output.write("Description: %s\n" % dist.get_description()) s = dist.get_long_description() s = string.replace(s, '\n', '\n ') output.write(' ' + s) output.close() if not self._is_user_file('postinst'): log.info('writing postinst file') output = self._write_file('postinst') output.write(POSTINST_FILE % d) output.close() if not self._is_user_file('prerm'): log.info('writing prerm file') output = self._write_file('prerm') output.write(PRERM_FILE % d) output.close() if not self._is_user_file('rules'): log.info('writing rules file') output = self._write_file('rules') output.write(RULES_FILE % d) output.close() os.chmod('debian/rules', 0755) def _write_file (self, filename): path = os.path.join('debian', filename) assert not self._is_user_file(path) output = open(path, 'w') return output def _is_user_file (self, filename): path = os.path.join('debian', filename) if not os.path.exists(path): return False input = open(path, 'r') while 1: L = input.readline() if L == "": break elif L.find(MARKER_STRING) != -1: return False return True # class bdist_dpkg PRERM_FILE = """#! /bin/sh # %(marker)s -- remove this line if you edit this file # prerm script for %(name)s set -e PACKAGE=%(name)s VERSION=%(pyversion)s LIB="/usr/lib/python$VERSION" DIRLIST="%(dirlist)s" case "$1" in remove|upgrade|failed-upgrade) for i in $DIRLIST ; do find $LIB/site-packages/$i -name '*.py[co]' -exec rm \{\} \; done ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac exit 0 """ POSTINST_FILE = """#! /bin/sh # %(marker)s -- remove this line if you edit this file # postinst script for %(name)s # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * <postinst> `configure' <most-recently-configured-version> # * <old-postinst> `abort-upgrade' <new version> # * <conflictor's-postinst> `abort-remove' `in-favour' <package> # <new-version> # * <deconfigured's-postinst> `abort-deconfigure' `in-favour' # <failed-install-package> <version> `removing' # <conflicting-package> <version> # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package # # quoting from the policy: # Any necessary prompting should almost always be confined to the # post-installation script, and should be protected with a conditional # so that unnecessary prompting doesn't happen if a package's # installation fails and the `postinst' is called with `abort-upgrade', # `abort-remove' or `abort-deconfigure'. PACKAGE=%(name)s VERSION=%(pyversion)s LIB="/usr/lib/python$VERSION" DIRLIST="%(dirlist)s" case "$1" in configure|abort-upgrade|abort-remove|abort-deconfigure) for i in $DIRLIST ; do /usr/bin/python$VERSION -O $LIB/compileall.py -q $LIB/site-packages/$i /usr/bin/python$VERSION $LIB/compileall.py -q $LIB/site-packages/$i done ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac exit 0 """ RULES_FILE = """#!/usr/bin/make -f # %(marker)s -- remove this line if you edit this file # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This is the debhelper compatibility version to use. export DH_COMPAT=4 build: build-stamp /usr/bin/python2.2 setup.py build build-stamp: touch build-stamp configure: # Do nothing clean: dh_testdir dh_testroot rm -f build-stamp -rm -rf build dh_clean install: build dh_testdir dh_testroot dh_clean -k /usr/bin/python%(pyversion)s setup.py install --no-compile --prefix=$(CURDIR)/debian/%(package_name)s/usr # Build architecture-independent files here. binary-indep: install dh_testdir dh_testroot dh_installdocs dh_installdeb dh_gencontrol dh_md5sums dh_builddeb # We have nothing to do by default. binary: binary-indep .PHONY: build clean binary-indep binary install """ From greg at users.sourceforge.net Sun Sep 21 19:06:22 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sun Sep 21 19:06:25 2003 Subject: [Python-checkins] python/dist/src/Modules _bsddb.c,1.17,1.17.6.1 Message-ID: <E1A1DHa-0001KT-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv4999 Modified Files: Tag: release23-maint _bsddb.c Log Message: port of 1.17->1.18 change. adds DBEnv.set_shm_key method. Index: _bsddb.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_bsddb.c,v retrieving revision 1.17 retrieving revision 1.17.6.1 diff -C2 -d -r1.17 -r1.17.6.1 *** _bsddb.c 15 Jul 2003 19:12:54 -0000 1.17 --- _bsddb.c 21 Sep 2003 23:06:20 -0000 1.17.6.1 *************** *** 3278,3281 **** --- 3278,3296 ---- static PyObject* + DBEnv_set_shm_key(DBEnvObject* self, PyObject* args) + { + int err; + long shm_key = 0; + + if (!PyArg_ParseTuple(args, "l:set_shm_key", &shm_key)) + return NULL; + CHECK_ENV_NOT_CLOSED(self); + + err = self->db_env->set_shm_key(self->db_env, shm_key); + RETURN_IF_ERR(); + RETURN_NONE(); + } + + static PyObject* DBEnv_set_cachesize(DBEnvObject* self, PyObject* args) { *************** *** 4077,4080 **** --- 4092,4096 ---- {"set_timeout", (PyCFunction)DBEnv_set_timeout, METH_VARARGS|METH_KEYWORDS}, #endif + {"set_shm_key", (PyCFunction)DBEnv_set_shm_key, METH_VARARGS}, {"set_cachesize", (PyCFunction)DBEnv_set_cachesize, METH_VARARGS}, {"set_data_dir", (PyCFunction)DBEnv_set_data_dir, METH_VARARGS}, From greg at users.sourceforge.net Sun Sep 21 19:10:26 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sun Sep 21 19:10:31 2003 Subject: [Python-checkins] python/dist/src/Modules _bsddb.c, 1.17.6.1, 1.17.6.2 Message-ID: <E1A1DLW-0001Vx-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv5605 Modified Files: Tag: release23-maint _bsddb.c Log Message: support for compiling with BerkeleyDB 4.2.x (soon to be released). this is a partial version of the 1.18->1.19 patch. i left out the ability for the module to also load as _pybsddb in addition to _bsddb as that applies more to pybsddb than python. Index: _bsddb.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_bsddb.c,v retrieving revision 1.17.6.1 retrieving revision 1.17.6.2 diff -C2 -d -r1.17.6.1 -r1.17.6.2 *** _bsddb.c 21 Sep 2003 23:06:20 -0000 1.17.6.1 --- _bsddb.c 21 Sep 2003 23:10:23 -0000 1.17.6.2 *************** *** 37,41 **** * Handwritten code to wrap version 3.x of the Berkeley DB library, * written to replace a SWIG-generated file. It has since been updated ! * to compile with BerkeleyDB versions 3.2 through 4.1. * * This module was started by Andrew Kuchling to remove the dependency --- 37,41 ---- * Handwritten code to wrap version 3.x of the Berkeley DB library, * written to replace a SWIG-generated file. It has since been updated ! * to compile with BerkeleyDB versions 3.2 through 4.2. * * This module was started by Andrew Kuchling to remove the dependency *************** *** 94,98 **** #define DBVER (DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR) ! #define PY_BSDDB_VERSION "4.1.6" static char *rcs_id = "$Id$"; --- 94,98 ---- #define DBVER (DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR) ! #define PY_BSDDB_VERSION "4.2.0" static char *rcs_id = "$Id$"; *************** *** 2168,2171 **** --- 2168,2182 ---- if (outFileName) fclose(outFile); + + /* DB.verify acts as a DB handle destructor (like close); this was + * documented in BerkeleyDB 4.2 but had the undocumented effect + * of not being safe in prior versions while still requiring an explicit + * DB.close call afterwards. Lets call close for the user to emulate + * the safe 4.2 behaviour. */ + #if (DBVER <= 41) + self->db->close(self->db, 0); + #endif + self->db = NULL; + RETURN_IF_ERR(); RETURN_NONE(); *************** *** 4341,4346 **** #define ADD_INT(dict, NAME) _addIntToDict(dict, #NAME, NAME) - - DL_EXPORT(void) init_bsddb(void) { --- 4352,4355 ---- *************** *** 4387,4391 **** --- 4396,4406 ---- ADD_INT(d, DB_MAX_RECORDS); + #if (DBVER >= 42) + ADD_INT(d, DB_RPCCLIENT); + #else ADD_INT(d, DB_CLIENT); + /* allow apps to be written using DB_RPCCLIENT on older BerkeleyDB */ + _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT); + #endif ADD_INT(d, DB_XA_CREATE); *************** *** 4536,4540 **** ADD_INT(d, DB_CURLSN); #endif ! #if (DBVER >= 33) ADD_INT(d, DB_COMMIT); #endif --- 4551,4555 ---- ADD_INT(d, DB_CURLSN); #endif ! #if ((DBVER >= 33) && (DBVER <= 41)) ADD_INT(d, DB_COMMIT); #endif *************** *** 4609,4612 **** --- 4624,4639 ---- ADD_INT(d, DB_PANIC_ENVIRONMENT); ADD_INT(d, DB_NOPANIC); + #endif + + #if (DBVER >= 42) + ADD_INT(d, DB_TIME_NOTGRANTED); + ADD_INT(d, DB_TXN_NOT_DURABLE); + ADD_INT(d, DB_TXN_WRITE_NOSYNC); + ADD_INT(d, DB_LOG_AUTOREMOVE); + ADD_INT(d, DB_DIRECT_LOG); + ADD_INT(d, DB_DIRECT_DB); + ADD_INT(d, DB_INIT_REP); + ADD_INT(d, DB_ENCRYPT); + ADD_INT(d, DB_CHKSUM); #endif From greg at users.sourceforge.net Sun Sep 21 19:18:32 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sun Sep 21 19:18:35 2003 Subject: [Python-checkins] python/dist/src/Lib/bsddb __init__.py, 1.5.10.2, 1.5.10.3 db.py, 1.2, 1.2.16.1 dbshelve.py, 1.8, 1.8.10.1 dbutils.py, 1.6, 1.6.12.1 Message-ID: <E1A1DTM-0001rG-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/bsddb In directory sc8-pr-cvs1:/tmp/cvs-serv7039 Modified Files: Tag: release23-maint __init__.py db.py dbshelve.py dbutils.py Log Message: simplify some import statements and clean up a docstring and BerkeleyDB library version check to mention that we support versions 3.2 - 4.2. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/__init__.py,v retrieving revision 1.5.10.2 retrieving revision 1.5.10.3 diff -C2 -d -r1.5.10.2 -r1.5.10.3 *** __init__.py 21 Sep 2003 04:51:46 -0000 1.5.10.2 --- __init__.py 21 Sep 2003 23:18:29 -0000 1.5.10.3 *************** *** 34,38 **** ! """Support for BerkeleyDB 3.1 through 4.1. """ --- 34,38 ---- ! """Support for BerkeleyDB 3.2 through 4.2. """ Index: db.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/db.py,v retrieving revision 1.2 retrieving revision 1.2.16.1 diff -C2 -d -r1.2 -r1.2.16.1 *** db.py 19 Nov 2002 17:48:48 -0000 1.2 --- db.py 21 Sep 2003 23:18:29 -0000 1.2.16.1 *************** *** 41,44 **** from _bsddb import __version__ ! if version() < (3, 1, 0): ! raise ImportError, "BerkeleyDB 3.x symbols not found. Perhaps python was statically linked with an older version?" --- 41,44 ---- from _bsddb import __version__ ! if version() < (3, 2, 0): ! raise ImportError, "correct BerkeleyDB symbols not found. Perhaps python was statically linked with an older version?" Index: dbshelve.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/dbshelve.py,v retrieving revision 1.8 retrieving revision 1.8.10.1 diff -C2 -d -r1.8 -r1.8.10.1 *** dbshelve.py 24 Apr 2003 16:02:46 -0000 1.8 --- dbshelve.py 21 Sep 2003 23:18:29 -0000 1.8.10.1 *************** *** 36,45 **** # DictMixin is new in Python 2.3 class DictMixin: pass ! try: ! # For Python 2.3 ! from bsddb import db ! except ImportError: ! # For earlier Pythons w/distutils pybsddb ! from bsddb3 import db #------------------------------------------------------------------------ --- 36,40 ---- # DictMixin is new in Python 2.3 class DictMixin: pass ! import db #------------------------------------------------------------------------ Index: dbutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/dbutils.py,v retrieving revision 1.6 retrieving revision 1.6.12.1 diff -C2 -d -r1.6 -r1.6.12.1 *** dbutils.py 28 Jan 2003 17:20:42 -0000 1.6 --- dbutils.py 21 Sep 2003 23:18:29 -0000 1.6.12.1 *************** *** 27,36 **** from time import sleep as _sleep ! try: ! # For Python 2.3 ! from bsddb import db ! except ImportError: ! # For earlier Pythons w/distutils pybsddb ! from bsddb3 import db # always sleep at least N seconds between retrys --- 27,31 ---- from time import sleep as _sleep ! import db # always sleep at least N seconds between retrys From greg at users.sourceforge.net Sun Sep 21 19:29:43 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sun Sep 21 19:29:46 2003 Subject: [Python-checkins] python/dist/src/Modules _bsddb.c,1.19,1.20 Message-ID: <E1A1DeB-0002Kn-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv8947/extsrc Modified Files: _bsddb.c Log Message: raise pybsddb version number to 4.2.1 to differentiate between it and the version in the python 2.3.1 tree. Index: _bsddb.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_bsddb.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** _bsddb.c 21 Sep 2003 00:08:14 -0000 1.19 --- _bsddb.c 21 Sep 2003 23:29:41 -0000 1.20 *************** *** 94,98 **** #define DBVER (DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR) ! #define PY_BSDDB_VERSION "4.2.0" static char *rcs_id = "$Id$"; --- 94,98 ---- #define DBVER (DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR) ! #define PY_BSDDB_VERSION "4.2.1" static char *rcs_id = "$Id$"; From greg at users.sourceforge.net Sun Sep 21 19:41:05 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sun Sep 21 19:41:08 2003 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew23.tex, 1.161, 1.162 Message-ID: <E1A1DpB-0002m5-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1:/tmp/cvs-serv10572 Modified Files: whatsnew23.tex Log Message: minor correction. python 2.3 was released with the bsddb module 4.1.6 not 4.1.1 Index: whatsnew23.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew23.tex,v retrieving revision 1.161 retrieving revision 1.162 diff -C2 -d -r1.161 -r1.162 *** whatsnew23.tex 29 Aug 2003 17:49:26 -0000 1.161 --- whatsnew23.tex 21 Sep 2003 23:41:02 -0000 1.162 *************** *** 1391,1395 **** (Contributed by Jason Orendorff.) ! \item The \module{bsddb} module has been replaced by version 4.1.1 of the \ulink{PyBSDDB}{http://pybsddb.sourceforge.net} package, providing a more complete interface to the transactional features of --- 1391,1395 ---- (Contributed by Jason Orendorff.) ! \item The \module{bsddb} module has been replaced by version 4.1.6 of the \ulink{PyBSDDB}{http://pybsddb.sourceforge.net} package, providing a more complete interface to the transactional features of From greg at users.sourceforge.net Sun Sep 21 19:42:19 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sun Sep 21 19:42:22 2003 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew23.tex, 1.159.4.1, 1.159.4.2 Message-ID: <E1A1DqN-0002p5-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory sc8-pr-cvs1:/tmp/cvs-serv10782 Modified Files: Tag: release23-maint whatsnew23.tex Log Message: minor correction. python 2.3 was released with the bsddb module 4.1.6 not 4.1.1 (port of 1.161->1.162) Index: whatsnew23.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew23.tex,v retrieving revision 1.159.4.1 retrieving revision 1.159.4.2 diff -C2 -d -r1.159.4.1 -r1.159.4.2 *** whatsnew23.tex 4 Aug 2003 22:49:42 -0000 1.159.4.1 --- whatsnew23.tex 21 Sep 2003 23:42:16 -0000 1.159.4.2 *************** *** 1391,1395 **** (Contributed by Jason Orendorff.) ! \item The \module{bsddb} module has been replaced by version 4.1.1 of the \ulink{PyBSDDB}{http://pybsddb.sourceforge.net} package, providing a more complete interface to the transactional features of --- 1391,1395 ---- (Contributed by Jason Orendorff.) ! \item The \module{bsddb} module has been replaced by version 4.1.6 of the \ulink{PyBSDDB}{http://pybsddb.sourceforge.net} package, providing a more complete interface to the transactional features of From bwarsaw at users.sourceforge.net Sun Sep 21 21:01:50 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Sun Sep 21 21:01:54 2003 Subject: [Python-checkins] python/nondist/peps pep-0101.txt,1.37,1.38 Message-ID: <E1A1F5K-00066n-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv23466 Modified Files: pep-0101.txt Log Message: Some updates from Sean. Index: pep-0101.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0101.txt,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** pep-0101.txt 31 Jul 2003 15:12:25 -0000 1.37 --- pep-0101.txt 22 Sep 2003 01:01:46 -0000 1.38 *************** *** 187,196 **** this stuff to build the source distribution. ! Fred tells Tim Peters where the documentation file is. This may ! generate some last minute changes on the branch. Once Fred is ! done, there can be no further checkins on the branch in the Doc/ ! directory -- not even by the RM. For final releases, Fred also ! sends email to Milan Zamazal for conversion to the GNU Info ! format, and to Hernan M. Foffani for conversion to HTML Help. Basically, if it's in Doc/, Fred will take care of it. --- 187,197 ---- this stuff to build the source distribution. ! Fred tells Tim Peters and Sean Reifschneider where the ! documentation file is. This may generate some last minute ! changes on the branch. Once Fred is done, there can be no ! further checkins on the branch in the Doc/ directory -- not even ! by the RM. For final releases, Fred also sends email to Milan ! Zamazal for conversion to the GNU Info format, and to Hernan ! M. Foffani for conversion to HTML Help. Basically, if it's in Doc/, Fred will take care of it. *************** *** 211,214 **** --- 212,221 ---- merging Windows-specific changes from trunk to branch, and from branch to trunk. + + ___ Sean Reifschneider grabs the HTML and uses this to build the + Linux RPMs. Sean performs his Red Hat magic, generating a set + of RPMs. He uploads these files to python.org. He then sends + the RM a notice which includes the location and MD5 checksum of + the RPMs. ___ Download the Windows executable from SourceForge to From bwarsaw at users.sourceforge.net Sun Sep 21 21:11:37 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Sun Sep 21 21:11:40 2003 Subject: [Python-checkins] python/nondist/peps pep-0101.txt,1.38,1.39 Message-ID: <E1A1FEn-0006Sw-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv24848 Modified Files: pep-0101.txt Log Message: More updates from Sean. Index: pep-0101.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0101.txt,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** pep-0101.txt 22 Sep 2003 01:01:46 -0000 1.38 --- pep-0101.txt 22 Sep 2003 01:11:35 -0000 1.39 *************** *** 140,143 **** --- 140,167 ---- version subpart macros just above PY_VERSION, as appropriate. + ___ Change the "%define version" line of Misc/RPM/python-2.3.spec to + the same string as PY_VERSION was changed to above. E.g. + + %define version 2.3.1 + + The following line, "%define libvers", should reflect the + major/minor number as one would usually see in the + "/usr/lib/python<libvers>" directory name. E.g. + + %define libvers 2.3 + + If the new release uses a major/minor version which is + different than is in the name of the current + "Misc/RPM/python-*.spec" file, rename the file: + + % mv python-2.3.spec python-2.4.spec + % cvs remove python-2.3.spec + % cvs add python-2.4.spec + % cvs commit + + ___ If this is a release candidate, mail Sean <jafo@tummy.com> + noting the impending release, so that RPMs can be built and + tested. + ___ Update the README file, which has a big banner at the top proclaiming its identity. *************** *** 176,182 **** file from the distribution. ! ___ For a final release, edit the first paragraph of Doc/whatsnew/whatsnewXX.tex to include the actual release date; ! e.g. "Python 2.3 was released on August 1, 2003." There's no need to edit this for alpha or beta releases. Note that Andrew often takes care of this. --- 200,206 ---- file from the distribution. ! ___ For a final release, edit the first paragraph of Doc/whatsnew/whatsnewXX.tex to include the actual release date; ! e.g. "Python 2.3 was released on August 1, 2003." There's no need to edit this for alpha or beta releases. Note that Andrew often takes care of this. From greg at users.sourceforge.net Sun Sep 21 21:16:50 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sun Sep 21 21:16:53 2003 Subject: [Python-checkins] python/dist/src setup.py,1.172,1.173 Message-ID: <E1A1FJq-0006f0-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv25531 Modified Files: setup.py Log Message: Add BerkeleyDB 4.2 to the library search for the bsddb module. Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.172 retrieving revision 1.173 diff -C2 -d -r1.172 -r1.173 *** setup.py 15 Sep 2003 12:27:18 -0000 1.172 --- setup.py 22 Sep 2003 01:16:48 -0000 1.173 *************** *** 469,482 **** # # This requires the Sleepycat DB code. The earliest supported version ! # of that library is 3.0, the latest supported version is 4.1. A list # of available releases can be found at # # http://www.sleepycat.com/update/index.html # when sorted in reverse order, keys for this dict must appear in the # order you wish to search - e.g., search for db4 before db3 db_try_this = { ! 'db4': {'libs': ('db-4.1', 'db41', 'db-4.0', 'db4',), ! 'libdirs': ('/usr/local/BerkeleyDB.4.1/lib', '/usr/local/BerkeleyDB.4.0/lib', '/usr/local/lib', --- 469,487 ---- # # This requires the Sleepycat DB code. The earliest supported version ! # of that library is 3.1, the latest supported version is 4.2. A list # of available releases can be found at # # http://www.sleepycat.com/update/index.html + # + # NOTE: 3.1 is only partially supported; expect the extended bsddb module + # test suite to show failures due to some missing methods and behaviours + # in BerkeleyDB 3.1. # when sorted in reverse order, keys for this dict must appear in the # order you wish to search - e.g., search for db4 before db3 db_try_this = { ! 'db4': {'libs': ('db-4.2', 'db42', 'db-4.1', 'db41', 'db-4.0', 'db4',), ! 'libdirs': ('/usr/local/BerkeleyDB.4.2/lib', ! '/usr/local/BerkeleyDB.4.1/lib', '/usr/local/BerkeleyDB.4.0/lib', '/usr/local/lib', *************** *** 484,488 **** '/sw/lib', ), ! 'incdirs': ('/usr/local/BerkeleyDB.4.1/include', '/usr/local/include/db41', '/usr/local/BerkeleyDB.4.0/include', --- 489,495 ---- '/sw/lib', ), ! 'incdirs': ('/usr/local/BerkeleyDB.4.2/include', ! '/usr/local/include/db42', ! '/usr/local/BerkeleyDB.4.1/include', '/usr/local/include/db41', '/usr/local/BerkeleyDB.4.0/include', From greg at users.sourceforge.net Sun Sep 21 21:19:48 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sun Sep 21 21:19:53 2003 Subject: [Python-checkins] python/dist/src setup.py,1.171,1.171.6.1 Message-ID: <E1A1FMi-0006oA-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv26052 Modified Files: Tag: release23-maint setup.py Log Message: Add BerkeleyDB 4.2 library to the bsddb module search path (backport 1.173) Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.171 retrieving revision 1.171.6.1 diff -C2 -d -r1.171 -r1.171.6.1 *** setup.py 10 Jul 2003 12:48:39 -0000 1.171 --- setup.py 22 Sep 2003 01:19:45 -0000 1.171.6.1 *************** *** 469,482 **** # # This requires the Sleepycat DB code. The earliest supported version ! # of that library is 3.0, the latest supported version is 4.1. A list # of available releases can be found at # # http://www.sleepycat.com/update/index.html # when sorted in reverse order, keys for this dict must appear in the # order you wish to search - e.g., search for db4 before db3 db_try_this = { ! 'db4': {'libs': ('db-4.1', 'db41', 'db-4.0', 'db4',), ! 'libdirs': ('/usr/local/BerkeleyDB.4.1/lib', '/usr/local/BerkeleyDB.4.0/lib', '/usr/local/lib', --- 469,487 ---- # # This requires the Sleepycat DB code. The earliest supported version ! # of that library is 3.1, the latest supported version is 4.2. A list # of available releases can be found at # # http://www.sleepycat.com/update/index.html + # + # NOTE: 3.1 is only partially supported; expect the extended bsddb module + # test suite to show failures due to some missing methods and behaviours + # in BerkeleyDB 3.1. # when sorted in reverse order, keys for this dict must appear in the # order you wish to search - e.g., search for db4 before db3 db_try_this = { ! 'db4': {'libs': ('db-4.2', 'db42', 'db-4.1', 'db41', 'db-4.0', 'db4',), ! 'libdirs': ('/usr/local/BerkeleyDB.4.2/lib', ! '/usr/local/BerkeleyDB.4.1/lib', '/usr/local/BerkeleyDB.4.0/lib', '/usr/local/lib', *************** *** 484,488 **** '/sw/lib', ), ! 'incdirs': ('/usr/local/BerkeleyDB.4.1/include', '/usr/local/include/db41', '/usr/local/BerkeleyDB.4.0/include', --- 489,495 ---- '/sw/lib', ), ! 'incdirs': ('/usr/local/BerkeleyDB.4.2/include', ! '/usr/local/include/db42', ! '/usr/local/BerkeleyDB.4.1/include', '/usr/local/include/db41', '/usr/local/BerkeleyDB.4.0/include', From z0wuos at bigfoot.com Mon Sep 22 10:20:21 2003 From: z0wuos at bigfoot.com (Dewitt Blackwell) Date: Mon Sep 22 00:17:54 2003 Subject: [Python-checkins] easy way to get sex rmkzpgij Message-ID: <fic$$5ln--$1yl9s6575-qxc5xg4-o@mpx.gsp> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-checkins/attachments/20030922/a5ceeeb6/attachment.html From anthonybaxter at users.sourceforge.net Mon Sep 22 00:21:07 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Sep 22 00:21:10 2003 Subject: [Python-checkins] python/dist/src/Misc/RPM python-2.3.spec, 1.2, 1.2.12.1 Message-ID: <E1A1ICB-0005rF-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM In directory sc8-pr-cvs1:/tmp/cvs-serv22471 Modified Files: Tag: release23-maint python-2.3.spec Log Message: RPM spec file updates from Sean Reifschneider. Index: python-2.3.spec =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/RPM/python-2.3.spec,v retrieving revision 1.2 retrieving revision 1.2.12.1 diff -C2 -d -r1.2 -r1.2.12.1 *** python-2.3.spec 24 Feb 2003 17:55:37 -0000 1.2 --- python-2.3.spec 22 Sep 2003 04:21:04 -0000 1.2.12.1 *************** *** 31,35 **** %define name python ! %define version 2.3b1 %define libvers 2.3 %define release 1pydotorg --- 31,35 ---- %define name python ! %define version 2.3.1 %define libvers 2.3 %define release 1pydotorg *************** *** 50,56 **** Source: Python-%{version}.tgz Source1: html-%{version}.tar.bz2 ! Patch0: Python-2.1-pythonpath.patch ! #Patch1: Python-2.1-expat.patch ! BuildRoot: /var/tmp/%{name}-%{version}-root BuildPrereq: expat-devel BuildPrereq: db4-devel --- 50,55 ---- Source: Python-%{version}.tgz Source1: html-%{version}.tar.bz2 ! #Patch0: Python-2.1-pythonpath.patch ! BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildPrereq: expat-devel BuildPrereq: db4-devel *************** *** 123,126 **** --- 122,128 ---- %changelog + * Fri Sep 19 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.1-1pydotorg] + - Updating to the 2.3.1 release. + * Mon Feb 24 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3b1-1pydotorg] - Updating to 2.3b1 release. *************** *** 176,181 **** %prep %setup -n Python-%{version} ! %patch0 -p1 ! #%patch1 ######## --- 178,182 ---- %prep %setup -n Python-%{version} ! #%patch0 -p1 ######## *************** *** 183,187 **** ######## %build ! ./configure %{ipv6} %{pymalloc} --prefix=%{__prefix} make --- 184,188 ---- ######## %build ! ./configure --enable-unicode=ucs4 %{ipv6} %{pymalloc} --prefix=%{__prefix} make *************** *** 224,228 **** # Tools echo '#!/bin/bash' >${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix} ! echo 'exec %{_prefix}/bin/python%{binsuffix} /usr/lib/python%{libvers}/Tools/idle/idle.py' >>$RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix} chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix} cp -a Tools $RPM_BUILD_ROOT%{_prefix}/lib/python%{libvers} --- 225,229 ---- # Tools echo '#!/bin/bash' >${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix} ! echo 'exec %{_prefix}/bin/python%{binsuffix} /usr/lib/python%{libvers}/idlelib/idle.py' >>$RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix} chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix} cp -a Tools $RPM_BUILD_ROOT%{_prefix}/lib/python%{libvers} *************** *** 238,243 **** rm -f tools.files ! find "$RPM_BUILD_ROOT""%{__prefix}"/lib/python%{libvers}/Tools -type f | ! sed "s|^${RPM_BUILD_ROOT}|/|" >tools.files echo "%{__prefix}"/bin/idle%{binsuffix} >>tools.files --- 239,245 ---- rm -f tools.files ! find "$RPM_BUILD_ROOT""%{__prefix}"/lib/python%{libvers}/idlelib \ ! "$RPM_BUILD_ROOT""%{__prefix}"/lib/python%{libvers}/Tools -type f | ! sed "s|^${RPM_BUILD_ROOT}|/|" >tools.files echo "%{__prefix}"/bin/idle%{binsuffix} >>tools.files *************** *** 250,259 **** ) ######## # CLEAN ######## %clean ! rm -fr $RPM_BUILD_ROOT ! rm -f mainpkg.files tools.files ######## --- 252,271 ---- ) + # clean up the /usr/local/bin/python references + find "$RPM_BUILD_ROOT" -type f | xargs grep -l /usr/local/bin/python | while read file + do + rm -f /tmp/pypathtmp + sed 's|/usr/local/bin/python|/usr/bin/python%{binsuffix}|g' <"$file" >/tmp/pypathtmp + cat </tmp/pypathtmp >"$file" + rm -f /tmp/pypathtmp + done + ######## # CLEAN ######## %clean ! #@@@ ! #rm -fr $RPM_BUILD_ROOT ! #rm -f mainpkg.files tools.files ######## *************** *** 275,279 **** %{__prefix}/lib/python%{libvers}/distutils %{__prefix}/lib/python%{libvers}/encodings - %dir %{__prefix}/lib/python%{libvers}/lib-old %{__prefix}/lib/python%{libvers}/plat-linux2 %{__prefix}/lib/python%{libvers}/site-packages --- 287,290 ---- From anthonybaxter at users.sourceforge.net Mon Sep 22 00:25:21 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Sep 22 00:25:24 2003 Subject: [Python-checkins] python/nondist/peps pep-0102.txt,1.11,1.12 Message-ID: <E1A1IGH-0005yr-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv22986 Modified Files: pep-0102.txt Log Message: updates from Sean. Index: pep-0102.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0102.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pep-0102.txt 13 Aug 2003 01:11:55 -0000 1.11 --- pep-0102.txt 22 Sep 2003 04:25:19 -0000 1.12 *************** *** 3,8 **** Version: $Revision$ Last-Modified: $Date$ ! Author: anthony@interlink.com.au (Anthony Baxter) ! barry@zope.com (Barry A. Warsaw) guido@python.org (Guido van Rossum) Status: Active --- 3,8 ---- Version: $Revision$ Last-Modified: $Date$ ! Author: anthony@interlink.com.au (Anthony Baxter), ! barry@zope.com (Barry A. Warsaw), guido@python.org (Guido van Rossum) Status: Active *************** *** 68,71 **** --- 68,76 ---- version subpart macros just above PY_VERSION, as appropriate. + ___ Change the "%define version" line of Misc/RPM/python-2.3.spec to the + same string as PY_VERSION was changed to above. E.g: + + %define version 2.3.1 + ___ If you're changing the version number for Python (e.g. from Python 2.1.1 to Python 2.1.2), you also need to update the *************** *** 119,123 **** ___ Once the release is underway, Fred Drake needs to create the HTML from the documentation. He does this and uploads the file to ! www.python.org. Then he tells Tim Peters where this file is. This may generate some last minute changes on the branch. Once Fred is done, there can be no further checkins on the branch in --- 124,129 ---- ___ Once the release is underway, Fred Drake needs to create the HTML from the documentation. He does this and uploads the file to ! www.python.org. Then he tells Tim Peters and Sean Reifschneider ! where this file is. This may generate some last minute changes on the branch. Once Fred is done, there can be no further checkins on the branch in *************** *** 132,141 **** ___ Tim Peters grabs the HTML and uses this to build the Windows ! installer. ___ Tim performs his Windows magic, generating an installer executable. He uploads this file to python.org. He then sends the RM a notice which includes the location and MD5 checksum of ! the Windows executable. Note that Tim's creation of the Windows executable may generate --- 138,148 ---- ___ Tim Peters grabs the HTML and uses this to build the Windows ! installer, Sean Reifschneider grabs the HTML and uses this to ! build the Linux RPMs. ___ Tim performs his Windows magic, generating an installer executable. He uploads this file to python.org. He then sends the RM a notice which includes the location and MD5 checksum of ! the Windows executable. Note that Tim's creation of the Windows executable may generate *************** *** 143,146 **** --- 150,157 ---- merging Windows-specific changes from trunk to branch, and from branch to trunk. + + ___ Sean performs his Red Hat magic, generating a set of RPMs. He + uploads these files to python.org. He then sends the RM a notice + which includes the location and MD5 checksum of the RPMs. ___ It's Build Time! From jhylton at users.sourceforge.net Mon Sep 22 00:26:47 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Mon Sep 22 00:26:50 2003 Subject: [Python-checkins] python/dist/src/Python compile.c,2.294,2.295 Message-ID: <E1A1IHf-000610-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv23118 Modified Files: compile.c Log Message: Fix SF bug [ 808594 ] leak on lambda with duplicate arguments error. Refactor code so that one helper routine sets error location and increments st_errors. Bug fix candidate. Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.294 retrieving revision 2.295 diff -C2 -d -r2.294 -r2.295 *** compile.c 16 Sep 2003 04:27:52 -0000 2.294 --- compile.c 22 Sep 2003 04:26:44 -0000 2.295 *************** *** 4779,4782 **** --- 4779,4792 ---- static int + symtable_error(struct symtable *st, int lineno) + { + if (lineno == 0) + lineno = st->st_cur->ste_lineno; + PyErr_SyntaxLocation(st->st_filename, lineno); + st->st_errors++; + return -1; + } + + static int symtable_load_symbols(struct compiling *c) { *************** *** 4836,4842 **** PyErr_Format(PyExc_SyntaxError, LOCAL_GLOBAL, PyString_AS_STRING(name)); ! PyErr_SyntaxLocation(st->st_filename, ! ste->ste_lineno); ! st->st_errors++; goto fail; } --- 4846,4850 ---- PyErr_Format(PyExc_SyntaxError, LOCAL_GLOBAL, PyString_AS_STRING(name)); ! symtable_error(st, 0); goto fail; } *************** *** 5191,5197 **** PyErr_Format(PyExc_SyntaxError, DUPLICATE_ARGUMENT, PyString_AsString(name)); ! PyErr_SyntaxLocation(st->st_filename, ! st->st_cur->ste_lineno); ! return -1; } val |= flag; --- 5199,5203 ---- PyErr_Format(PyExc_SyntaxError, DUPLICATE_ARGUMENT, PyString_AsString(name)); ! return symtable_error(st, 0); } val |= flag; *************** *** 5590,5596 **** "name '%.400s' is local and global", name); ! PyErr_SyntaxLocation(st->st_filename, ! st->st_cur->ste_lineno); ! st->st_errors++; return; } --- 5596,5600 ---- "name '%.400s' is local and global", name); ! symtable_error(st, 0); return; } *************** *** 5652,5658 **** PyErr_SetString(PyExc_SyntaxError, LATE_FUTURE); ! PyErr_SyntaxLocation(st->st_filename, ! n->n_lineno); ! st->st_errors++; return; } --- 5656,5660 ---- PyErr_SetString(PyExc_SyntaxError, LATE_FUTURE); ! symtable_error(st, n->n_lineno); return; } *************** *** 5748,5754 **** PyErr_SetString(PyExc_SyntaxError, ASSIGN_DEBUG); ! PyErr_SyntaxLocation(st->st_filename, ! n->n_lineno); ! st->st_errors++; } symtable_add_def(st, STR(tmp), DEF_LOCAL | def_flag); --- 5750,5755 ---- PyErr_SetString(PyExc_SyntaxError, ASSIGN_DEBUG); ! symtable_error(st, n->n_lineno); ! return; } symtable_add_def(st, STR(tmp), DEF_LOCAL | def_flag); From jhylton at users.sourceforge.net Mon Sep 22 00:41:24 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Mon Sep 22 00:41:26 2003 Subject: [Python-checkins] python/dist/src/Python compile.c, 2.291.6.1, 2.291.6.2 Message-ID: <E1A1IVo-0006Tx-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv24911/Python Modified Files: Tag: release23-maint compile.c Log Message: Backport fix for SF808594: leak on lambda with duplicate arguments. Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.291.6.1 retrieving revision 2.291.6.2 diff -C2 -d -r2.291.6.1 -r2.291.6.2 *** compile.c 16 Sep 2003 04:36:33 -0000 2.291.6.1 --- compile.c 22 Sep 2003 04:41:21 -0000 2.291.6.2 *************** *** 4771,4774 **** --- 4771,4784 ---- static int + symtable_error(struct symtable *st, int lineno) + { + if (lineno == 0) + lineno = st->st_cur->ste_lineno; + PyErr_SyntaxLocation(st->st_filename, lineno); + st->st_errors++; + return -1; + } + + static int symtable_load_symbols(struct compiling *c) { *************** *** 4828,4834 **** PyErr_Format(PyExc_SyntaxError, LOCAL_GLOBAL, PyString_AS_STRING(name)); ! PyErr_SyntaxLocation(st->st_filename, ! ste->ste_lineno); ! st->st_errors++; goto fail; } --- 4838,4842 ---- PyErr_Format(PyExc_SyntaxError, LOCAL_GLOBAL, PyString_AS_STRING(name)); ! symtable_error(st, 0); goto fail; } *************** *** 5183,5189 **** PyErr_Format(PyExc_SyntaxError, DUPLICATE_ARGUMENT, PyString_AsString(name)); ! PyErr_SyntaxLocation(st->st_filename, ! st->st_cur->ste_lineno); ! return -1; } val |= flag; --- 5191,5195 ---- PyErr_Format(PyExc_SyntaxError, DUPLICATE_ARGUMENT, PyString_AsString(name)); ! return symtable_error(st, 0); } val |= flag; *************** *** 5582,5588 **** "name '%.400s' is local and global", name); ! PyErr_SyntaxLocation(st->st_filename, ! st->st_cur->ste_lineno); ! st->st_errors++; return; } --- 5588,5592 ---- "name '%.400s' is local and global", name); ! symtable_error(st, 0); return; } *************** *** 5644,5650 **** PyErr_SetString(PyExc_SyntaxError, LATE_FUTURE); ! PyErr_SyntaxLocation(st->st_filename, ! n->n_lineno); ! st->st_errors++; return; } --- 5648,5652 ---- PyErr_SetString(PyExc_SyntaxError, LATE_FUTURE); ! symtable_error(st, n->n_lineno); return; } *************** *** 5740,5746 **** PyErr_SetString(PyExc_SyntaxError, ASSIGN_DEBUG); ! PyErr_SyntaxLocation(st->st_filename, ! n->n_lineno); ! st->st_errors++; } symtable_add_def(st, STR(tmp), DEF_LOCAL | def_flag); --- 5742,5747 ---- PyErr_SetString(PyExc_SyntaxError, ASSIGN_DEBUG); ! symtable_error(st, n->n_lineno); ! return; } symtable_add_def(st, STR(tmp), DEF_LOCAL | def_flag); From rhettinger at users.sourceforge.net Mon Sep 22 00:42:58 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 00:43:02 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.49,1.831.4.50 Message-ID: <E1A1IXK-0006YG-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv24750/Misc Modified Files: Tag: release23-maint NEWS Log Message: Removed the PendingDeprecation warning from sets.py because it adds little value while introducing incompatability with the version being bugfixed. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.49 retrieving revision 1.831.4.50 diff -C2 -d -r1.831.4.49 -r1.831.4.50 *** NEWS 20 Sep 2003 11:13:17 -0000 1.831.4.49 --- NEWS 22 Sep 2003 04:42:56 -0000 1.831.4.50 *************** *** 91,96 **** - sets.py now runs under Py2.2. In addition, the argument restrictions for most set methods (but not the operators) have been relaxed to ! allow any iterable. Also the Set.update() has been deprecated because ! it duplicates Set.union_update(). - Bug #801342: random.sample() now accepts a Set as a possible argument. --- 91,95 ---- - sets.py now runs under Py2.2. In addition, the argument restrictions for most set methods (but not the operators) have been relaxed to ! allow any iterable. - Bug #801342: random.sample() now accepts a Set as a possible argument. From rhettinger at users.sourceforge.net Mon Sep 22 00:42:58 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 00:43:05 2003 Subject: [Python-checkins] python/dist/src/Lib sets.py,1.44.8.3,1.44.8.4 Message-ID: <E1A1IXK-0006YK-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv24750/Lib Modified Files: Tag: release23-maint sets.py Log Message: Removed the PendingDeprecation warning from sets.py because it adds little value while introducing incompatability with the version being bugfixed. Index: sets.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sets.py,v retrieving revision 1.44.8.3 retrieving revision 1.44.8.4 diff -C2 -d -r1.44.8.3 -r1.44.8.4 *** sets.py 8 Sep 2003 19:15:43 -0000 1.44.8.3 --- sets.py 22 Sep 2003 04:42:56 -0000 1.44.8.4 *************** *** 501,508 **** def update(self, iterable): """Add all values from an iterable (such as a list or file).""" - import warnings - warnings.warn("The update() method is going to be deprecated; " - "Use union_update() instead.", - PendingDeprecationWarning, 2) self._update(iterable) --- 501,504 ---- From jhylton at users.sourceforge.net Mon Sep 22 00:42:20 2003 From: jhylton at users.sourceforge.net (jhylton@users.sourceforge.net) Date: Mon Sep 22 00:43:47 2003 Subject: [Python-checkins] python/dist/src/Python compile.c, 2.234.4.8, 2.234.4.9 Message-ID: <E1A1IWi-0006Vo-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv25029/Python Modified Files: Tag: release22-maint compile.c Log Message: Backport fix for SF808594: leak on lambda with duplicate arguments. Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.234.4.8 retrieving revision 2.234.4.9 diff -C2 -d -r2.234.4.8 -r2.234.4.9 *** compile.c 22 May 2003 16:43:03 -0000 2.234.4.8 --- compile.c 22 Sep 2003 04:42:17 -0000 2.234.4.9 *************** *** 4550,4553 **** --- 4550,4563 ---- static int + symtable_error(struct symtable *st, int lineno) + { + if (lineno == 0) + lineno = st->st_cur->ste_lineno; + PyErr_SyntaxLocation(st->st_filename, lineno); + st->st_errors++; + return -1; + } + + static int symtable_load_symbols(struct compiling *c) { *************** *** 4613,4619 **** PyErr_Format(PyExc_SyntaxError, LOCAL_GLOBAL, PyString_AS_STRING(name)); ! PyErr_SyntaxLocation(st->st_filename, ! ste->ste_lineno); ! st->st_errors++; goto fail; } --- 4623,4627 ---- PyErr_Format(PyExc_SyntaxError, LOCAL_GLOBAL, PyString_AS_STRING(name)); ! symtable_error(st, 0); goto fail; } *************** *** 4960,4966 **** PyErr_Format(PyExc_SyntaxError, DUPLICATE_ARGUMENT, PyString_AsString(name)); ! PyErr_SyntaxLocation(st->st_filename, ! st->st_cur->ste_lineno); ! return -1; } val |= flag; --- 4968,4972 ---- PyErr_Format(PyExc_SyntaxError, DUPLICATE_ARGUMENT, PyString_AsString(name)); ! return symtable_error(st, 0); } val |= flag; *************** *** 5359,5365 **** "name '%.400s' is local and global", name); ! PyErr_SyntaxLocation(st->st_filename, ! st->st_cur->ste_lineno); ! st->st_errors++; return; } --- 5365,5369 ---- "name '%.400s' is local and global", name); ! symtable_error(st, 0); return; } *************** *** 5421,5427 **** PyErr_SetString(PyExc_SyntaxError, LATE_FUTURE); ! PyErr_SyntaxLocation(st->st_filename, ! n->n_lineno); ! st->st_errors++; return; } --- 5425,5429 ---- PyErr_SetString(PyExc_SyntaxError, LATE_FUTURE); ! symtable_error(st, n->n_lineno); return; } *************** *** 5516,5522 **** PyErr_SetString(PyExc_SyntaxError, ASSIGN_DEBUG); ! PyErr_SyntaxLocation(st->st_filename, ! n->n_lineno); ! st->st_errors++; } symtable_add_def(st, STR(tmp), DEF_LOCAL | def_flag); --- 5518,5523 ---- PyErr_SetString(PyExc_SyntaxError, ASSIGN_DEBUG); ! symtable_error(st, n->n_lineno); ! return; } symtable_add_def(st, STR(tmp), DEF_LOCAL | def_flag); From bwarsaw at users.sourceforge.net Mon Sep 22 00:51:52 2003 From: bwarsaw at users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Mon Sep 22 00:51:56 2003 Subject: [Python-checkins] python/nondist/peps pep-0008.txt, 1.18, 1.19 pep-0009.txt, 1.9, 1.10 pep-0010.txt, 1.3, 1.4 pep-0012.txt, 1.3, 1.4 pep-0102.txt, 1.12, 1.13 pep-0201.txt, 1.20, 1.21 pep-0202.txt, 1.7, 1.8 pep-0214.txt, 1.12, 1.13 pep-0231.txt, 1.6, 1.7 pep-0232.txt, 1.12, 1.13 pep-0251.txt, 1.12, 1.13 pep-0274.txt, 1.4, 1.5 pep-0292.txt, 1.5, 1.6 Message-ID: <E1A1Ifw-0006vK-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv26607 Modified Files: pep-0008.txt pep-0009.txt pep-0010.txt pep-0012.txt pep-0102.txt pep-0201.txt pep-0202.txt pep-0214.txt pep-0231.txt pep-0232.txt pep-0251.txt pep-0274.txt pep-0292.txt Log Message: Setting my address back to barry@python.org for consistency and better spam fighting defenses. Index: pep-0008.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0008.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** pep-0008.txt 17 Oct 2002 15:32:18 -0000 1.18 --- pep-0008.txt 22 Sep 2003 04:51:49 -0000 1.19 *************** *** 3,7 **** Version: $Revision$ Author: guido@python.org (Guido van Rossum), ! barry@zope.com (Barry Warsaw) Status: Active Type: Informational --- 3,7 ---- Version: $Revision$ Author: guido@python.org (Guido van Rossum), ! barry@python.org (Barry Warsaw) Status: Active Type: Informational Index: pep-0009.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0009.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pep-0009.txt 26 Aug 2002 16:29:31 -0000 1.9 --- pep-0009.txt 22 Sep 2003 04:51:49 -0000 1.10 *************** *** 3,7 **** Version: $Revision$ Last-Modified: $Date$ ! Author: Barry A. Warsaw <barry@zope.com> Status: Active Type: Informational --- 3,7 ---- Version: $Revision$ Last-Modified: $Date$ ! Author: Barry A. Warsaw <barry@python.org> Status: Active Type: Informational Index: pep-0010.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0010.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pep-0010.txt 18 Apr 2002 20:08:17 -0000 1.3 --- pep-0010.txt 22 Sep 2003 04:51:50 -0000 1.4 *************** *** 3,7 **** Version: $Revision$ Last-Modified: $Date$ ! Author: barry@zope.com (Barry A. Warsaw) Status: Active Type: Informational --- 3,7 ---- Version: $Revision$ Last-Modified: $Date$ ! Author: barry@python.org (Barry A. Warsaw) Status: Active Type: Informational Index: pep-0012.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0012.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pep-0012.txt 30 Aug 2002 04:11:20 -0000 1.3 --- pep-0012.txt 22 Sep 2003 04:51:50 -0000 1.4 *************** *** 4,8 **** Last-Modified: $Date$ Author: David Goodger <goodger@users.sourceforge.net>, ! Barry A. Warsaw <barry@zope.com> Status: Active Type: Informational --- 4,8 ---- Last-Modified: $Date$ Author: David Goodger <goodger@users.sourceforge.net>, ! Barry A. Warsaw <barry@python.org> Status: Active Type: Informational Index: pep-0102.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0102.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pep-0102.txt 22 Sep 2003 04:25:19 -0000 1.12 --- pep-0102.txt 22 Sep 2003 04:51:50 -0000 1.13 *************** *** 4,8 **** Last-Modified: $Date$ Author: anthony@interlink.com.au (Anthony Baxter), ! barry@zope.com (Barry A. Warsaw), guido@python.org (Guido van Rossum) Status: Active --- 4,8 ---- Last-Modified: $Date$ Author: anthony@interlink.com.au (Anthony Baxter), ! barry@python.org (Barry A. Warsaw), guido@python.org (Guido van Rossum) Status: Active Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** pep-0201.txt 2 Aug 2003 06:32:12 -0000 1.20 --- pep-0201.txt 22 Sep 2003 04:51:50 -0000 1.21 *************** *** 2,6 **** Title: Lockstep Iteration Version: $Revision$ ! Author: barry@zope.com (Barry A. Warsaw) Status: Final Type: Standards Track --- 2,6 ---- Title: Lockstep Iteration Version: $Revision$ ! Author: barry@python.org (Barry A. Warsaw) Status: Final Type: Standards Track Index: pep-0202.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0202.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pep-0202.txt 14 Aug 2001 18:43:06 -0000 1.7 --- pep-0202.txt 22 Sep 2003 04:51:50 -0000 1.8 *************** *** 2,6 **** Title: List Comprehensions Version: $Revision$ ! Author: barry@zope.com (Barry Warsaw) Status: Final Type: Standards Track --- 2,6 ---- Title: List Comprehensions Version: $Revision$ ! Author: barry@python.org (Barry Warsaw) Status: Final Type: Standards Track Index: pep-0214.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0214.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pep-0214.txt 14 Aug 2001 15:45:26 -0000 1.12 --- pep-0214.txt 22 Sep 2003 04:51:50 -0000 1.13 *************** *** 2,6 **** Title: Extended Print Statement Version: $Revision$ ! Author: barry@zope.com (Barry A. Warsaw) Python-Version: 2.0 Status: Final --- 2,6 ---- Title: Extended Print Statement Version: $Revision$ ! Author: barry@python.org (Barry A. Warsaw) Python-Version: 2.0 Status: Final Index: pep-0231.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0231.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pep-0231.txt 14 Aug 2001 15:45:26 -0000 1.6 --- pep-0231.txt 22 Sep 2003 04:51:50 -0000 1.7 *************** *** 2,6 **** Title: __findattr__() Version: $Revision$ ! Author: barry@zope.com (Barry A. Warsaw) Python-Version: 2.1 Status: Draft --- 2,6 ---- Title: __findattr__() Version: $Revision$ ! Author: barry@python.org (Barry A. Warsaw) Python-Version: 2.1 Status: Draft Index: pep-0232.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0232.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pep-0232.txt 14 Aug 2001 17:52:06 -0000 1.12 --- pep-0232.txt 22 Sep 2003 04:51:50 -0000 1.13 *************** *** 2,6 **** Title: Function Attributes Version: $Revision$ ! Author: barry@zope.com (Barry A. Warsaw) Status: Final Type: Standards Track --- 2,6 ---- Title: Function Attributes Version: $Revision$ ! Author: barry@python.org (Barry A. Warsaw) Status: Final Type: Standards Track Index: pep-0251.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0251.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pep-0251.txt 14 Jun 2003 05:32:14 -0000 1.12 --- pep-0251.txt 22 Sep 2003 04:51:50 -0000 1.13 *************** *** 2,6 **** Title: Python 2.2 Release Schedule Version: $Revision$ ! Author: barry@zope.com (Barry A. Warsaw), guido@python.org (Guido van Rossum) Status: Final Type: Informational --- 2,6 ---- Title: Python 2.2 Release Schedule Version: $Revision$ ! Author: barry@python.org (Barry A. Warsaw), guido@python.org (Guido van Rossum) Status: Final Type: Informational Index: pep-0274.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0274.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pep-0274.txt 31 Oct 2001 15:50:36 -0000 1.4 --- pep-0274.txt 22 Sep 2003 04:51:50 -0000 1.5 *************** *** 3,7 **** Version: $Revision$ Last-Modified: $Date$ ! Author: barry@zope.com (Barry A. Warsaw) Status: Draft Type: Standards Track --- 3,7 ---- Version: $Revision$ Last-Modified: $Date$ ! Author: barry@python.org (Barry A. Warsaw) Status: Draft Type: Standards Track Index: pep-0292.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0292.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pep-0292.txt 12 Jul 2002 23:21:08 -0000 1.5 --- pep-0292.txt 22 Sep 2003 04:51:50 -0000 1.6 *************** *** 3,7 **** Version: $Revision$ Last-Modified: $Date$ ! Author: barry@zope.com (Barry A. Warsaw) Status: Draft Type: Standards Track --- 3,7 ---- Version: $Revision$ Last-Modified: $Date$ ! Author: barry@python.org (Barry A. Warsaw) Status: Draft Type: Standards Track From rhettinger at users.sourceforge.net Mon Sep 22 02:25:13 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 02:25:17 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libsmtplib.tex,1.24,1.25 Message-ID: <E1A1K8H-00020w-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv7731 Modified Files: libsmtplib.tex Log Message: Clean-up example code: remove string module and backticks. Index: libsmtplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsmtplib.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** libsmtplib.tex 15 Jun 2003 23:08:45 -0000 1.24 --- libsmtplib.tex 22 Sep 2003 06:25:10 -0000 1.25 *************** *** 265,269 **** \begin{verbatim} import smtplib - import string def prompt(prompt): --- 265,268 ---- *************** *** 276,280 **** # Add the From: and To: headers at the start! msg = ("From: %s\r\nTo: %s\r\n\r\n" ! % (fromaddr, string.join(toaddrs, ", "))) while 1: try: --- 275,279 ---- # Add the From: and To: headers at the start! msg = ("From: %s\r\nTo: %s\r\n\r\n" ! % (fromaddr, ", ".join(toaddrs))) while 1: try: *************** *** 286,290 **** msg = msg + line ! print "Message length is " + `len(msg)` server = smtplib.SMTP('localhost') --- 285,289 ---- msg = msg + line ! print "Message length is " + repr(len(msg)) server = smtplib.SMTP('localhost') From rhettinger at users.sourceforge.net Mon Sep 22 02:27:34 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 02:27:37 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libsmtplib.tex, 1.24, 1.24.10.1 Message-ID: <E1A1KAY-00027Q-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv8142 Modified Files: Tag: release23-maint libsmtplib.tex Log Message: Clean-up example code: remove string module and backticks. Index: libsmtplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsmtplib.tex,v retrieving revision 1.24 retrieving revision 1.24.10.1 diff -C2 -d -r1.24 -r1.24.10.1 *** libsmtplib.tex 15 Jun 2003 23:08:45 -0000 1.24 --- libsmtplib.tex 22 Sep 2003 06:27:32 -0000 1.24.10.1 *************** *** 265,269 **** \begin{verbatim} import smtplib - import string def prompt(prompt): --- 265,268 ---- *************** *** 276,280 **** # Add the From: and To: headers at the start! msg = ("From: %s\r\nTo: %s\r\n\r\n" ! % (fromaddr, string.join(toaddrs, ", "))) while 1: try: --- 275,279 ---- # Add the From: and To: headers at the start! msg = ("From: %s\r\nTo: %s\r\n\r\n" ! % (fromaddr, ", ".join(toaddrs))) while 1: try: *************** *** 286,290 **** msg = msg + line ! print "Message length is " + `len(msg)` server = smtplib.SMTP('localhost') --- 285,289 ---- msg = msg + line ! print "Message length is " + repr(len(msg)) server = smtplib.SMTP('localhost') From purcell at users.sourceforge.net Mon Sep 22 07:08:14 2003 From: purcell at users.sourceforge.net (purcell@users.sourceforge.net) Date: Mon Sep 22 07:08:18 2003 Subject: [Python-checkins] python/dist/src/Lib unittest.py,1.26,1.27 Message-ID: <E1A1OYA-0007dw-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv29369 Modified Files: unittest.py Log Message: - Fixed loading of tests by name when name refers to unbound method (PyUnit issue 563882, thanks to Alexandre Fayolle) - Ignore non-callable attributes of classes when searching for test method names (PyUnit issue 769338, thanks to Seth Falcon) - New assertTrue and assertFalse aliases for comfort of JUnit users - Automatically discover 'runTest()' test methods (PyUnit issue 469444, thanks to Roeland Rengelink) - Dropped Python 1.5.2 compatibility, merged appropriate shortcuts from Python CVS; should work with Python >= 2.1. - Removed all references to string module by using string methods instead Index: unittest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** unittest.py 15 Sep 2003 11:01:21 -0000 1.26 --- unittest.py 22 Sep 2003 11:08:12 -0000 1.27 *************** *** 28,32 **** http://pyunit.sourceforge.net/ ! Copyright (c) 1999, 2000, 2001 Steve Purcell This module is free software, and you may redistribute it and/or modify it under the same terms as Python itself, so long as this copyright message --- 28,32 ---- http://pyunit.sourceforge.net/ ! Copyright (c) 1999-2003 Steve Purcell This module is free software, and you may redistribute it and/or modify it under the same terms as Python itself, so long as this copyright message *************** *** 47,56 **** __author__ = "Steve Purcell" __email__ = "stephen_purcell at yahoo dot com" ! __version__ = "#Revision: 1.46 $"[11:-2] import time import sys import traceback - import string import os import types --- 47,55 ---- __author__ = "Steve Purcell" __email__ = "stephen_purcell at yahoo dot com" ! __version__ = "#Revision: 1.56 $"[11:-2] import time import sys import traceback import os import types *************** *** 62,70 **** 'TestLoader', 'FunctionTestCase', 'main', 'defaultTestLoader'] ! # Expose obsolete functions for backwards compatability __all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases']) ############################################################################## # Test framework core ############################################################################## --- 61,85 ---- 'TestLoader', 'FunctionTestCase', 'main', 'defaultTestLoader'] ! # Expose obsolete functions for backwards compatibility __all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases']) ############################################################################## + # Backward compatibility + ############################################################################## + if sys.version_info[:2] < (2, 2): + False, True = 0, 1 + def isinstance(obj, clsinfo): + import __builtin__ + if type(clsinfo) in (types.TupleType, types.ListType): + for cls in clsinfo: + if cls is type: cls = types.ClassType + if __builtin__.isinstance(obj, cls): + return 1 + return 0 + else: return __builtin__.isinstance(obj, clsinfo) + + + ############################################################################## # Test framework core ############################################################################## *************** *** 122,130 **** def stop(self): "Indicates that the tests should be aborted" ! self.shouldStop = 1 def _exc_info_to_string(self, err): """Converts a sys.exc_info()-style tuple of values into a string.""" ! return string.join(traceback.format_exception(*err), '') def __repr__(self): --- 137,145 ---- def stop(self): "Indicates that the tests should be aborted" ! self.shouldStop = True def _exc_info_to_string(self, err): """Converts a sys.exc_info()-style tuple of values into a string.""" ! return ''.join(traceback.format_exception(*err)) def __repr__(self): *************** *** 197,201 **** """ doc = self.__testMethodDoc ! return doc and string.strip(string.split(doc, "\n")[0]) or None def id(self): --- 212,216 ---- """ doc = self.__testMethodDoc ! return doc and doc.split("\n")[0].strip() or None def id(self): *************** *** 210,216 **** def run(self, result=None): - return self(result) - - def __call__(self, result=None): if result is None: result = self.defaultTestResult() result.startTest(self) --- 225,228 ---- *************** *** 225,232 **** return ! ok = 0 try: testMethod() ! ok = 1 except self.failureException: result.addFailure(self, self.__exc_info()) --- 237,244 ---- return ! ok = False try: testMethod() ! ok = True except self.failureException: result.addFailure(self, self.__exc_info()) *************** *** 242,250 **** except: result.addError(self, self.__exc_info()) ! ok = 0 if ok: result.addSuccess(self) finally: result.stopTest(self) def debug(self): """Run the test without collecting errors in a TestResult""" --- 254,264 ---- except: result.addError(self, self.__exc_info()) ! ok = False if ok: result.addSuccess(self) finally: result.stopTest(self) + __call__ = run + def debug(self): """Run the test without collecting errors in a TestResult""" *************** *** 293,297 **** if hasattr(excClass,'__name__'): excName = excClass.__name__ else: excName = str(excClass) ! raise self.failureException, excName def failUnlessEqual(self, first, second, msg=None): --- 307,311 ---- if hasattr(excClass,'__name__'): excName = excClass.__name__ else: excName = str(excClass) ! raise self.failureException, "%s not raised" % excName def failUnlessEqual(self, first, second, msg=None): *************** *** 335,338 **** --- 349,354 ---- (msg or '%s == %s within %s places' % (`first`, `second`, `places`)) + # Synonyms for assertion methods + assertEqual = assertEquals = failUnlessEqual *************** *** 345,349 **** assertRaises = failUnlessRaises ! assert_ = failUnless --- 361,367 ---- assertRaises = failUnlessRaises ! assert_ = assertTrue = failUnless ! ! assertFalse = failIf *************** *** 370,374 **** cases = 0 for test in self._tests: ! cases = cases + test.countTestCases() return cases --- 388,392 ---- cases = 0 for test in self._tests: ! cases += test.countTestCases() return cases *************** *** 435,439 **** if self.__description is not None: return self.__description doc = self.__testFunc.__doc__ ! return doc and string.strip(string.split(doc, "\n")[0]) or None --- 453,457 ---- if self.__description is not None: return self.__description doc = self.__testFunc.__doc__ ! return doc and doc.split("\n")[0].strip() or None *************** *** 453,458 **** def loadTestsFromTestCase(self, testCaseClass): """Return a suite of all tests cases contained in testCaseClass""" ! return self.suiteClass(map(testCaseClass, ! self.getTestCaseNames(testCaseClass))) def loadTestsFromModule(self, module): --- 471,478 ---- def loadTestsFromTestCase(self, testCaseClass): """Return a suite of all tests cases contained in testCaseClass""" ! testCaseNames = self.getTestCaseNames(testCaseClass) ! if not testCaseNames and hasattr(testCaseClass, 'runTest'): ! testCaseNames = ['runTest'] ! return self.suiteClass(map(testCaseClass, testCaseNames)) def loadTestsFromModule(self, module): *************** *** 475,495 **** The method optionally resolves the names relative to a given module. """ ! parts = string.split(name, '.') if module is None: ! if not parts: ! raise ValueError, "incomplete test name: %s" % name ! else: ! parts_copy = parts[:] ! while parts_copy: ! try: ! module = __import__(string.join(parts_copy,'.')) ! break ! except ImportError: ! del parts_copy[-1] ! if not parts_copy: raise parts = parts[1:] obj = module for part in parts: ! obj = getattr(obj, part) import unittest --- 495,512 ---- The method optionally resolves the names relative to a given module. """ ! parts = name.split('.') if module is None: ! parts_copy = parts[:] ! while parts_copy: ! try: ! module = __import__('.'.join(parts_copy)) ! break ! except ImportError: ! del parts_copy[-1] ! if not parts_copy: raise parts = parts[1:] obj = module for part in parts: ! parent, obj = obj, getattr(obj, part) import unittest *************** *** 500,508 **** return self.loadTestsFromTestCase(obj) elif type(obj) == types.UnboundMethodType: return obj.im_class(obj.__name__) elif callable(obj): test = obj() ! if not isinstance(test, unittest.TestCase) and \ ! not isinstance(test, unittest.TestSuite): raise ValueError, \ "calling %s returned %s, not a test" % (obj,test) --- 517,527 ---- return self.loadTestsFromTestCase(obj) elif type(obj) == types.UnboundMethodType: + return parent(obj.__name__) return obj.im_class(obj.__name__) + elif isinstance(obj, unittest.TestSuite): + return obj elif callable(obj): test = obj() ! if not isinstance(test, (unittest.TestCase, unittest.TestSuite)): raise ValueError, \ "calling %s returned %s, not a test" % (obj,test) *************** *** 515,521 **** of string specifiers. See 'loadTestsFromName()'. """ ! suites = [] ! for name in names: ! suites.append(self.loadTestsFromName(name, module)) return self.suiteClass(suites) --- 534,538 ---- of string specifiers. See 'loadTestsFromName()'. """ ! suites = [self.loadTestsFromName(name, module) for name in names] return self.suiteClass(suites) *************** *** 523,528 **** """Return a sorted sequence of method names found within testCaseClass """ ! testFnNames = filter(lambda n,p=self.testMethodPrefix: n[:len(p)] == p, ! dir(testCaseClass)) for baseclass in testCaseClass.__bases__: for testFnName in self.getTestCaseNames(baseclass): --- 540,546 ---- """Return a sorted sequence of method names found within testCaseClass """ ! def isTestMethod(attrname, testCaseClass=testCaseClass, prefix=self.testMethodPrefix): ! return attrname[:len(prefix)] == prefix and callable(getattr(testCaseClass, attrname)) ! testFnNames = filter(isTestMethod, dir(testCaseClass)) for baseclass in testCaseClass.__bases__: for testFnName in self.getTestCaseNames(baseclass): *************** *** 707,711 **** if type(module) == type(''): self.module = __import__(module) ! for part in string.split(module,'.')[1:]: self.module = getattr(self.module, part) else: --- 725,729 ---- if type(module) == type(''): self.module = __import__(module) ! for part in module.split('.')[1:]: self.module = getattr(self.module, part) else: From lemburg at users.sourceforge.net Mon Sep 22 07:14:42 2003 From: lemburg at users.sourceforge.net (lemburg@users.sourceforge.net) Date: Mon Sep 22 07:14:45 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.858,1.859 Message-ID: <E1A1OeQ-000858-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv31028/Misc Modified Files: NEWS Log Message: Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.858 retrieving revision 1.859 diff -C2 -d -r1.858 -r1.859 *** NEWS 20 Sep 2003 16:08:32 -0000 1.858 --- NEWS 22 Sep 2003 11:14:40 -0000 1.859 *************** *** 13,16 **** --- 13,20 ---- ----------------- + - Added test whether wchar_t is signed or not. A signed wchar_t is not + usable as internal unicode type base for Py_UNICODE since the + unicode implementation assumes an unsigned type. + - Fixed a bug in the cache of length-one Unicode strings that could lead to a seg fault. The specific problem occurred when an earlier, From lemburg at users.sourceforge.net Mon Sep 22 07:14:43 2003 From: lemburg at users.sourceforge.net (lemburg@users.sourceforge.net) Date: Mon Sep 22 07:14:49 2003 Subject: [Python-checkins] python/dist/src configure, 1.423, 1.424 configure.in, 1.434, 1.435 Message-ID: <E1A1OeR-000855-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv31028 Modified Files: configure configure.in Log Message: Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.423 retrieving revision 1.424 diff -C2 -d -r1.423 -r1.424 *** configure 20 Sep 2003 15:30:18 -0000 1.423 --- configure 22 Sep 2003 11:14:38 -0000 1.424 *************** *** 1,6 **** #! /bin/sh ! # From configure.in Revision: 1.433 . # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.57 for python 2.4. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 --- 1,6 ---- #! /bin/sh ! # From configure.in Revision: 1.434 . # Guess values for system-dependent variables and create Makefiles. [...13654 lines suppressed...] rm -f $ac_file *************** *** 19898,19906 **** if test "$no_create" != yes; then ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null ! $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which --- 19121,19126 ---- if test "$no_create" != yes; then ac_cs_success=: exec 5>/dev/null ! $SHELL $CONFIG_STATUS || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.434 retrieving revision 1.435 diff -C2 -d -r1.434 -r1.435 *** configure.in 20 Sep 2003 15:30:19 -0000 1.434 --- configure.in 22 Sep 2003 11:14:40 -0000 1.435 *************** *** 2690,2693 **** --- 2690,2712 ---- AC_MSG_RESULT($have_ucs4_tcl) + # check whether wchar_t is signed or not + if test "$wchar_h" = yes + then + # check whether wchar_t is signed or not + AC_MSG_CHECKING(whether wchar_t is signed) + AC_CACHE_VAL(ac_cv_wchar_t_signed, [ + AC_TRY_RUN([ + #include <wchar.h> + int main() + { + exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0); + } + ], + ac_cv_wchar_t_signed=yes, + ac_cv_wchar_t_signed=no, + ac_cv_wchar_t_signed=yes)]) + AC_MSG_RESULT($ac_cv_wchar_t_signed) + fi + AC_MSG_CHECKING(what type to use for unicode) dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output *************** *** 2731,2740 **** AC_DEFINE(Py_USING_UNICODE, 1, [Define if you want to have a Unicode type.]) ! if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" then PY_UNICODE_TYPE="wchar_t" AC_DEFINE(HAVE_USABLE_WCHAR_T, 1, [Define if you have a useable wchar_t type defined in wchar.h; useable ! means wchar_t must be 16-bit unsigned type. (see Include/unicodeobject.h).]) AC_DEFINE(PY_UNICODE_TYPE,wchar_t) --- 2750,2762 ---- AC_DEFINE(Py_USING_UNICODE, 1, [Define if you want to have a Unicode type.]) ! ! # wchar_t is only usable if it maps to an unsigned type ! if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \ ! -a "$ac_cv_wchar_t_signed" == "no" then PY_UNICODE_TYPE="wchar_t" AC_DEFINE(HAVE_USABLE_WCHAR_T, 1, [Define if you have a useable wchar_t type defined in wchar.h; useable ! means wchar_t must be an unsigned type with at least 16 bits. (see Include/unicodeobject.h).]) AC_DEFINE(PY_UNICODE_TYPE,wchar_t) From doerwalter at users.sourceforge.net Mon Sep 22 08:43:18 2003 From: doerwalter at users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Mon Sep 22 08:43:29 2003 Subject: [Python-checkins] python/dist/src/Lib gopherlib.py,1.12,1.13 Message-ID: <E1A1Q2A-0003gL-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv14126/Lib Modified Files: gopherlib.py Log Message: Avoid list as a variable name. Index: gopherlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/gopherlib.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** gopherlib.py 1 Jun 2002 14:18:45 -0000 1.12 --- gopherlib.py 22 Sep 2003 12:43:16 -0000 1.13 *************** *** 96,100 **** def get_directory(f): """Get a directory in the form of a list of entries.""" ! list = [] while 1: line = f.readline() --- 96,100 ---- def get_directory(f): """Get a directory in the form of a list of entries.""" ! entries = [] while 1: line = f.readline() *************** *** 123,134 **** parts.append('') parts.insert(0, gtype) ! list.append(parts) ! return list def get_textfile(f): """Get a text file as a list of lines, with trailing CRLF stripped.""" ! list = [] ! get_alt_textfile(f, list.append) ! return list def get_alt_textfile(f, func): --- 123,134 ---- parts.append('') parts.insert(0, gtype) ! entries.append(parts) ! return entries def get_textfile(f): """Get a text file as a list of lines, with trailing CRLF stripped.""" ! lines = [] ! get_alt_textfile(f, lines.append) ! return lines def get_alt_textfile(f, func): *************** *** 192,200 **** f = send_selector(selector, host) if type == A_TEXT: ! list = get_textfile(f) ! for item in list: print item elif type in (A_MENU, A_INDEX): ! list = get_directory(f) ! for item in list: print item else: data = get_binary(f) --- 192,200 ---- f = send_selector(selector, host) if type == A_TEXT: ! lines = get_textfile(f) ! for item in lines: print item elif type in (A_MENU, A_INDEX): ! entries = get_directory(f) ! for item in entries: print item else: data = get_binary(f) From doerwalter at users.sourceforge.net Mon Sep 22 08:44:49 2003 From: doerwalter at users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Mon Sep 22 08:44:52 2003 Subject: [Python-checkins] python/dist/src/Lib gopherlib.py,1.12,1.12.16.1 Message-ID: <E1A1Q3d-0003kg-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv14389/Lib Modified Files: Tag: release23-maint gopherlib.py Log Message: Backport checkin: Avoid list as a variable name. Index: gopherlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/gopherlib.py,v retrieving revision 1.12 retrieving revision 1.12.16.1 diff -C2 -d -r1.12 -r1.12.16.1 *** gopherlib.py 1 Jun 2002 14:18:45 -0000 1.12 --- gopherlib.py 22 Sep 2003 12:44:47 -0000 1.12.16.1 *************** *** 96,100 **** def get_directory(f): """Get a directory in the form of a list of entries.""" ! list = [] while 1: line = f.readline() --- 96,100 ---- def get_directory(f): """Get a directory in the form of a list of entries.""" ! entries = [] while 1: line = f.readline() *************** *** 123,134 **** parts.append('') parts.insert(0, gtype) ! list.append(parts) ! return list def get_textfile(f): """Get a text file as a list of lines, with trailing CRLF stripped.""" ! list = [] ! get_alt_textfile(f, list.append) ! return list def get_alt_textfile(f, func): --- 123,134 ---- parts.append('') parts.insert(0, gtype) ! entries.append(parts) ! return entries def get_textfile(f): """Get a text file as a list of lines, with trailing CRLF stripped.""" ! lines = [] ! get_alt_textfile(f, lines.append) ! return lines def get_alt_textfile(f, func): *************** *** 192,200 **** f = send_selector(selector, host) if type == A_TEXT: ! list = get_textfile(f) ! for item in list: print item elif type in (A_MENU, A_INDEX): ! list = get_directory(f) ! for item in list: print item else: data = get_binary(f) --- 192,200 ---- f = send_selector(selector, host) if type == A_TEXT: ! lines = get_textfile(f) ! for item in lines: print item elif type in (A_MENU, A_INDEX): ! entries = get_directory(f) ! for item in entries: print item else: data = get_binary(f) From theller at users.sourceforge.net Mon Sep 22 10:55:00 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Mon Sep 22 10:55:13 2003 Subject: [Python-checkins] python/dist/src/Doc/tools prechm.py, 1.15, 1.15.18.1 Message-ID: <E1A1S5c-0001pf-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv7041 Modified Files: Tag: release23-maint prechm.py Log Message: Support 2.3 docs in HTMLHelp format. Index: prechm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/prechm.py,v retrieving revision 1.15 retrieving revision 1.15.18.1 diff -C2 -d -r1.15 -r1.15.18.1 *** prechm.py 2 May 2002 21:59:08 -0000 1.15 --- prechm.py 22 Sep 2003 14:54:58 -0000 1.15.18.1 *************** *** 151,154 **** --- 151,170 ---- # each 'book' : (Dir, Title, First page, Content page, Index page) supported_libraries = { + '2.3': + [ + Book('.', 'Main page', 'index'), + Book('.', 'Global Module Index', 'modindex'), + Book('whatsnew', "What's New", 'index', 'contents'), + Book('tut','Tutorial','tut','node2'), + Book('lib','Library Reference','lib','contents','genindex'), + Book('ref','Language Reference','ref','contents','genindex'), + Book('mac','Macintosh Reference','mac','contents','genindex'), + Book('ext','Extending and Embedding','ext','contents'), + Book('api','Python/C API','api','contents','genindex'), + Book('doc','Documenting Python','doc','contents'), + Book('inst','Installing Python Modules', 'inst', 'index'), + Book('dist','Distributing Python Modules', 'dist', 'index'), + ], + '2.2': [ From theller at users.sourceforge.net Mon Sep 22 10:56:13 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Mon Sep 22 10:56:16 2003 Subject: [Python-checkins] python/dist/src/Lib/idlelib EditorWindow.py, 1.53, 1.53.6.1 Message-ID: <E1A1S6n-0001vD-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1:/tmp/cvs-serv7361 Modified Files: Tag: release23-maint EditorWindow.py Log Message: Let IDLE use the HTMLHelp docs, if found. Index: EditorWindow.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/EditorWindow.py,v retrieving revision 1.53 retrieving revision 1.53.6.1 diff -C2 -d -r1.53 -r1.53.6.1 *** EditorWindow.py 9 Jul 2003 18:48:24 -0000 1.53 --- EditorWindow.py 22 Sep 2003 14:56:11 -0000 1.53.6.1 *************** *** 51,54 **** --- 51,55 ---- def __init__(self, flist=None, filename=None, key=None, root=None): if EditorWindow.help_url is None: + dochome = os.path.join(sys.prefix, 'Doc', 'index.html') if sys.platform.count('linux'): # look for html docs in a couple of standard places *************** *** 60,65 **** dochome = os.path.join(basepath, pyver, 'Doc', 'index.html') ! else: ! dochome = os.path.join(sys.prefix, 'Doc', 'index.html') dochome = os.path.normpath(dochome) if os.path.isfile(dochome): --- 61,70 ---- dochome = os.path.join(basepath, pyver, 'Doc', 'index.html') ! elif sys.platform.count('win') or sys.platform.count('nt'): ! # Try the HTMLHelp file ! chmpath = os.path.join(sys.prefix, 'Doc', ! 'Python%d%d.chm' % sys.version_info[:2]) ! if os.path.isfile(chmpath): ! dochome = chmpath dochome = os.path.normpath(dochome) if os.path.isfile(dochome): From rhettinger at users.sourceforge.net Mon Sep 22 11:00:59 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 11:01:03 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libcodecs.tex, 1.24, 1.25 libfuncs.tex, 1.148, 1.149 libgopherlib.tex, 1.12, 1.13 libimgfile.tex, 1.11, 1.12 libitertools.tex, 1.16, 1.17 libmultifile.tex, 1.13, 1.14 libregex.tex, 1.33, 1.34 Message-ID: <E1A1SBP-0002Ac-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv8330 Modified Files: libcodecs.tex libfuncs.tex libgopherlib.tex libimgfile.tex libitertools.tex libmultifile.tex libregex.tex Log Message: SF 810242. Fix doubled word errors. Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** libcodecs.tex 1 Sep 2003 23:13:04 -0000 1.24 --- libcodecs.tex 22 Sep 2003 15:00:53 -0000 1.25 *************** *** 162,166 **** \var{encoding} specifies the encoding which is to be used for the ! the file. \var{errors} may be given to define the error handling. It defaults --- 162,166 ---- \var{encoding} specifies the encoding which is to be used for the ! file. \var{errors} may be given to define the error handling. It defaults Index: libfuncs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v retrieving revision 1.148 retrieving revision 1.149 diff -C2 -d -r1.148 -r1.149 *** libfuncs.tex 9 Sep 2003 01:12:18 -0000 1.148 --- libfuncs.tex 22 Sep 2003 15:00:54 -0000 1.149 *************** *** 976,980 **** If \var{sequence} is already a tuple, it is returned unchanged. For instance, \code{tuple('abc')} returns ! returns \code{('a', 'b', 'c')} and \code{tuple([1, 2, 3])} returns \code{(1, 2, 3)}. If no argument is given, returns a new empty tuple, \code{()}. --- 976,980 ---- If \var{sequence} is already a tuple, it is returned unchanged. For instance, \code{tuple('abc')} returns ! \code{('a', 'b', 'c')} and \code{tuple([1, 2, 3])} returns \code{(1, 2, 3)}. If no argument is given, returns a new empty tuple, \code{()}. Index: libgopherlib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgopherlib.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** libgopherlib.tex 22 Apr 1999 16:17:45 -0000 1.12 --- libgopherlib.tex 22 Sep 2003 15:00:54 -0000 1.13 *************** *** 8,12 **** This module provides a minimal implementation of client side of the ! the Gopher protocol. It is used by the module \refmodule{urllib} to handle URLs that use the Gopher protocol. --- 8,12 ---- This module provides a minimal implementation of client side of the ! Gopher protocol. It is used by the module \refmodule{urllib} to handle URLs that use the Gopher protocol. Index: libimgfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimgfile.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** libimgfile.tex 2 Mar 1999 16:37:11 -0000 1.11 --- libimgfile.tex 22 Sep 2003 15:00:55 -0000 1.12 *************** *** 10,14 **** files (also known as \file{.rgb} files). The module is far from complete, but is provided anyway since the functionality that there is ! is enough in some cases. Currently, colormap files are not supported. The module defines the following variables and functions: --- 10,14 ---- files (also known as \file{.rgb} files). The module is far from complete, but is provided anyway since the functionality that there is ! enough in some cases. Currently, colormap files are not supported. The module defines the following variables and functions: Index: libitertools.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libitertools.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** libitertools.tex 8 Sep 2003 23:58:40 -0000 1.16 --- libitertools.tex 22 Sep 2003 15:00:55 -0000 1.17 *************** *** 42,46 **** The performance advantage of iterators becomes more acute as the number of elements increases -- at some point, lists grow large enough to ! to severely impact memory cache performance and start running slowly. \begin{seealso} --- 42,46 ---- The performance advantage of iterators becomes more acute as the number of elements increases -- at some point, lists grow large enough to ! severely impact memory cache performance and start running slowly. \begin{seealso} Index: libmultifile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmultifile.tex,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** libmultifile.tex 25 Aug 2003 04:28:04 -0000 1.13 --- libmultifile.tex 22 Sep 2003 15:00:55 -0000 1.14 *************** *** 122,126 **** method prepends \code{'-}\code{-'} and appends \code{'-}\code{-'} (like a MIME-multipart end-of-message marker) but it is declared so it can be ! be overridden in derived classes. This method need not append LF or CR-LF, as comparison with the result ignores trailing whitespace. \end{methoddesc} --- 122,126 ---- method prepends \code{'-}\code{-'} and appends \code{'-}\code{-'} (like a MIME-multipart end-of-message marker) but it is declared so it can be ! overridden in derived classes. This method need not append LF or CR-LF, as comparison with the result ignores trailing whitespace. \end{methoddesc} Index: libregex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libregex.tex,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** libregex.tex 25 Sep 2000 17:23:04 -0000 1.33 --- libregex.tex 22 Sep 2003 15:00:55 -0000 1.34 *************** *** 316,320 **** zero, the corresponding return value is the entire matching string; if it is in the inclusive range [1..99], it is the string matching the ! the corresponding parenthesized group (using the default syntax, groups are parenthesized using \code{{\e}(} and \code{{\e})}). If no such group exists, the corresponding result is \code{None}. --- 316,320 ---- zero, the corresponding return value is the entire matching string; if it is in the inclusive range [1..99], it is the string matching the ! corresponding parenthesized group (using the default syntax, groups are parenthesized using \code{{\e}(} and \code{{\e})}). If no such group exists, the corresponding result is \code{None}. From gvanrossum at users.sourceforge.net Mon Sep 22 11:03:15 2003 From: gvanrossum at users.sourceforge.net (gvanrossum@users.sourceforge.net) Date: Mon Sep 22 11:03:18 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.859,1.860 Message-ID: <E1A1SDb-0002ID-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv8794 Modified Files: NEWS Log Message: New for unittest.py. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.859 retrieving revision 1.860 diff -C2 -d -r1.859 -r1.860 *** NEWS 22 Sep 2003 11:14:40 -0000 1.859 --- NEWS 22 Sep 2003 15:03:11 -0000 1.860 *************** *** 47,50 **** --- 47,52 ---- ------- + - Various improvements to unittest.py, realigned with PyUnit CVS. + - dircache now passes exceptions to the caller, instead of returning empty lists. From theller at users.sourceforge.net Mon Sep 22 11:06:31 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Mon Sep 22 11:06:38 2003 Subject: [Python-checkins] python/dist/src/PCbuild python20.wse, 1.133, 1.133.4.1 Message-ID: <E1A1SGl-0002Pr-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory sc8-pr-cvs1:/tmp/cvs-serv9282 Modified Files: Tag: release23-maint python20.wse Log Message: Changes for Python 2.3.1 release. - Install docs in one HTMLHelp file, no longer lots of html pages - Can optionally compile Python library modules to .pyc - Remove the thanks to Wise Solutions for InstallMaster 8.1, since it is no longer used to create the installer. Index: python20.wse =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.wse,v retrieving revision 1.133 retrieving revision 1.133.4.1 diff -C2 -d -r1.133 -r1.133.4.1 *** python20.wse 29 Jul 2003 17:22:57 -0000 1.133 --- python20.wse 22 Sep 2003 15:06:28 -0000 1.133.4.1 *************** *** 1,6 **** Document Type: WSE item: Global ! Version=8.14 ! Title=Python 2.3 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 --- 1,6 ---- Document Type: WSE item: Global ! Version=9.0 ! Title=Python 2.3.1 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 *************** *** 19,33 **** Patch Threshold=85 Patch Memory=4000 ! EXE Filename=Python-2.3.exe Dialogs Version=8 ! Version File=2.3 Version Description=Python Programming Language Version Copyright=©2001-2003 Python Software Foundation Version Company=PythonLabs at Zope Corporation Crystal Format=10111100101100000010001001001001 ! Step View=&All Variable Name1=_WISE_ Variable Description1=WISE root directory ! Variable Default1=C:\PROGRAM FILES\WISE INSTALLMASTER 8.1 Variable Flags1=00001000 Variable Name2=_TCLDIR_ --- 19,35 ---- Patch Threshold=85 Patch Memory=4000 ! MIF PDF Version=1.0 ! MIF SMS Version=2.0 ! EXE Filename=Python-2.3.1.exe Dialogs Version=8 ! Version File=2.3.1 Version Description=Python Programming Language Version Copyright=©2001-2003 Python Software Foundation Version Company=PythonLabs at Zope Corporation Crystal Format=10111100101100000010001001001001 ! Step View=&Properties Variable Name1=_WISE_ Variable Description1=WISE root directory ! Variable Default1=C:\Programme\Wise Installation System Variable Flags1=00001000 Variable Name2=_TCLDIR_ *************** *** 39,50 **** Variable Name3=_DOC_ Variable Description3=The unpacked HTML doc directory. ! Variable Default3=..\html Variable Flags3=00001001 Variable Name4=_SYS_ Variable Description4=System directory (where to find MSVCRT.DLL) ! Variable Default4=C:\Windows\System Variable Values4=C:\Windows\System Variable Values4=C:\WINNT\System32 Variable Values4=C:\Code\MSDLLs Variable Flags4=00000010 Variable Name5=_PYMAJOR_ --- 41,53 ---- Variable Name3=_DOC_ Variable Description3=The unpacked HTML doc directory. ! Variable Default3=..\chm Variable Flags3=00001001 Variable Name4=_SYS_ Variable Description4=System directory (where to find MSVCRT.DLL) ! Variable Default4=C:\Windows\System32 Variable Values4=C:\Windows\System Variable Values4=C:\WINNT\System32 Variable Values4=C:\Code\MSDLLs + Variable Values4=C:\Windows\System32 Variable Flags4=00000010 Variable Name5=_PYMAJOR_ *************** *** 65,72 **** Variable Values7=0 Variable Flags7=00001010 end item: Set Variable Variable=PYVER_STRING ! Value=2.3 end item: Remark --- 68,81 ---- Variable Values7=0 Variable Flags7=00001010 + Variable Name8=_ALIASNAME_ + Variable Flags8=00001000 + Variable Name9=_ALIASPATH_ + Variable Flags9=00001000 + Variable Name10=_ALIASTYPE_ + Variable Flags10=00001000 end item: Set Variable Variable=PYVER_STRING ! Value=2.3.1 end item: Remark *************** *** 311,314 **** --- 320,326 ---- Text=B: Create Start Menu shortcuts end + item: Remark + Text=C: Compile Python library files + end item: Set Variable Variable=TASKS *************** *** 507,510 **** --- 519,527 ---- item: Remark end + item: Set Variable + Variable=SUMMARY + Value=%CRLF%Start Menu group: %GROUP%%CRLF% + Flags=00000001 + end item: If/While Statement Variable=TASKS *************** *** 512,525 **** Flags=00000010 end item: Set Variable Variable=SUMMARY ! Value=%CRLF%Start Menu group: %GROUP%%CRLF% Flags=00000001 end ! item: Else Statement end item: Set Variable Variable=SUMMARY ! Value=%CRLF%No Start Menu shortcuts.%CRLF% Flags=00000001 end --- 529,549 ---- Flags=00000010 end + item: Else Statement + end item: Set Variable Variable=SUMMARY ! Value=%CRLF%No Start Menu shortcuts.%CRLF% Flags=00000001 end ! item: End Block ! end ! item: If/While Statement ! Variable=TASKS ! Value=C ! Flags=00000010 end item: Set Variable Variable=SUMMARY ! Value=%CRLF%Compile Python files%CRLF% Flags=00000001 end *************** *** 974,978 **** Text=Python interpreter and libraries Text=Tcl/Tk (Tkinter, IDLE, pydoc) ! Text=Python HTML docs Text=Python utility scripts (Tools/) Text=Python test suite (Lib/test/) --- 998,1002 ---- Text=Python interpreter and libraries Text=Tcl/Tk (Tkinter, IDLE, pydoc) ! Text=Python HTMLHelp file Text=Python utility scripts (Tools/) Text=Python test suite (Lib/test/) *************** *** 1164,1167 **** --- 1188,1192 ---- Text=Register file extensions (.py, .pyw, .pyc, .pyo) Text=Create Start Menu shortcuts + Text=Compile Python files to .pyc Text= end *************** *** 2196,2203 **** end item: Install File ! Source=%_DOC_%\*.* ! Destination=%MAINDIR%\Doc ! Description=Python Documentation (HTML) ! Flags=0000000100000010 end item: End Block --- 2221,2228 ---- end item: Install File ! Source=%_DOC_%\Python%_PYMAJOR_%%_PYMINOR_%.chm ! Destination=%MAINDIR%\Doc\Python%_PYMAJOR_%%_PYMINOR_%.chm ! Description=Python Documentation (HTMLHelp) ! Flags=0000000000000010 end item: End Block *************** *** 2795,2799 **** Total Keys=1 Key=Software\Python\PythonCore\%PY_VERSION%\Help\Main Python Documentation ! New Value=%MAINDIR%\Doc\index.html Root=2 end --- 2820,2825 ---- Total Keys=1 Key=Software\Python\PythonCore\%PY_VERSION%\Help\Main Python Documentation ! New Value=%MAINDIR%\Doc\Python%_PYMAJOR_%%_PYMINOR_%.chm ! New Value= Root=2 end *************** *** 2803,2807 **** Total Keys=1 Key=Software\Python\PythonCore\%PY_VERSION%\Help\Main Python Documentation ! New Value=%MAINDIR%\Doc\index.html Root=1 end --- 2829,2834 ---- Total Keys=1 Key=Software\Python\PythonCore\%PY_VERSION%\Help\Main Python Documentation ! New Value=%MAINDIR%\Doc\Python%_PYMAJOR_%%_PYMINOR_%.chm ! New Value= Root=1 end *************** *** 2975,2979 **** end item: Create Shortcut ! Source=%MAINDIR%\Doc\index.html Destination=%GROUP%\Python Manuals.lnk Working Directory=%MAINDIR% --- 3002,3006 ---- end item: Create Shortcut ! Source=%MAINDIR%\Doc\Python%_PYMAJOR_%%_PYMINOR_%.chm Destination=%GROUP%\Python Manuals.lnk Working Directory=%MAINDIR% *************** *** 2995,2998 **** --- 3022,3062 ---- item: Remark end + item: Remark + Text=Compile to .pyc + end + item: If/While Statement + Variable=TASKS + Value=C + Flags=00000010 + end + item: Custom Script Item + Filename=Display Progress Message.wse + Variable Name1=_CENTER_ + Variable Value1=AB + Variable Name2=_WIDTH_ + Variable Value2=320 + Variable Name3=_MSG_TITLE_ + Variable Value3=Compiling Python files + Variable Name4=HELPFILE + Variable Value4=C:\Programme\Wise for Windows Installer\HELP\Express.chm + Variable Name5=_OPTION_ + Variable Value5=B + Variable Name6=_Y_POS_ + Variable Name7=_MSG_TEXT_ + Variable Value7=Please wait while Python modules are compiled + Variable Name8=_HEIGHT_ + Variable Value8=80 + Variable Name9=_X_POS_ + end + item: Execute Program + Pathname=%MAINDIR%\Python.exe + Command Line=%MAINDIR%\Lib\compileall.py -f -x .*\\Lib\\test.* %MAINDIR%\Lib + Default Directory=%MAINDIR%\Lib + Flags=00000010 + end + item: End Block + end + item: Remark + end remarked item: Remark Text=Don't enable "Delete in-use files". Here's what happens: *************** *** 3095,3101 **** Create Flags=01010000000000000000000000000000 Text=Special Windows thanks to: - Text= - Text=Wise Solutions, for the use of InstallMaster 8.1. - Text= http://www.wisesolutions.com/ Text= Text= --- 3159,3162 ---- From rhettinger at users.sourceforge.net Mon Sep 22 11:25:53 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 11:25:56 2003 Subject: [Python-checkins] python/dist/src/Doc/api utilities.tex,1.10,1.11 Message-ID: <E1A1SZV-0003ef-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory sc8-pr-cvs1:/tmp/cvs-serv14038 Modified Files: utilities.tex Log Message: SF 810242. Fix doubled word errors. Index: utilities.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/utilities.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** utilities.tex 23 Apr 2003 19:27:35 -0000 1.10 --- utilities.tex 22 Sep 2003 15:25:50 -0000 1.11 *************** *** 148,152 **** \var{name} argument may be of the form \code{package.module}). First check the modules dictionary if there's one there, and if not, ! create a new one and insert in in the modules dictionary. Return \NULL{} with an exception set on failure. \note{This function does not load or import the module; if the --- 148,152 ---- \var{name} argument may be of the form \code{package.module}). First check the modules dictionary if there's one there, and if not, ! create a new one and insert it in the modules dictionary. Return \NULL{} with an exception set on failure. \note{This function does not load or import the module; if the From rhettinger at users.sourceforge.net Mon Sep 22 11:26:26 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 11:26:30 2003 Subject: [Python-checkins] python/dist/src/Doc/ref ref3.tex,1.115,1.116 Message-ID: <E1A1Sa2-0003gm-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1:/tmp/cvs-serv14161 Modified Files: ref3.tex Log Message: SF 810242. Fix doubled word errors. Index: ref3.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** ref3.tex 25 Aug 2003 04:39:55 -0000 1.115 --- ref3.tex 22 Sep 2003 15:26:20 -0000 1.116 *************** *** 1657,1661 **** objects. Immutable sequences methods should at most only define \method{__getslice__()}; mutable sequences might define all three ! three methods. \begin{methoddesc}[sequence object]{__getslice__}{self, i, j} --- 1657,1661 ---- objects. Immutable sequences methods should at most only define \method{__getslice__()}; mutable sequences might define all three ! methods. \begin{methoddesc}[sequence object]{__getslice__}{self, i, j} From rhettinger at users.sourceforge.net Mon Sep 22 11:27:18 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 11:27:23 2003 Subject: [Python-checkins] python/dist/src/Doc/mac libaetypes.tex, 1.2, 1.3 libframework.tex, 1.10, 1.11 Message-ID: <E1A1Sas-0003jh-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory sc8-pr-cvs1:/tmp/cvs-serv14334 Modified Files: libaetypes.tex libframework.tex Log Message: SF 810242. Fix doubled word errors. Index: libaetypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libaetypes.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** libaetypes.tex 11 Apr 2003 15:35:27 -0000 1.2 --- libaetypes.tex 22 Sep 2003 15:27:11 -0000 1.3 *************** *** 12,16 **** descriptors and Apple Event object specifiers. ! Apple Event data is is contained in descriptors, and these descriptors are typed. For many descriptors the Python representation is simply the corresponding Python type: \code{typeText} in OSA is a Python string, --- 12,16 ---- descriptors and Apple Event object specifiers. ! Apple Event data is contained in descriptors, and these descriptors are typed. For many descriptors the Python representation is simply the corresponding Python type: \code{typeText} in OSA is a Python string, Index: libframework.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libframework.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** libframework.tex 12 Aug 2003 00:01:17 -0000 1.10 --- libframework.tex 22 Sep 2003 15:27:11 -0000 1.11 *************** *** 57,61 **** \begin{funcdesc}{MenuItem}{menu, title\optional{, shortcut, callback}} Create a menu item object. The arguments are the menu to create, the ! item item title string and optionally the keyboard shortcut and a callback routine. The callback is called with the arguments menu-id, item number within menu (1-based), current front window and --- 57,61 ---- \begin{funcdesc}{MenuItem}{menu, title\optional{, shortcut, callback}} Create a menu item object. The arguments are the menu to create, the ! item title string and optionally the keyboard shortcut and a callback routine. The callback is called with the arguments menu-id, item number within menu (1-based), current front window and From rhettinger at users.sourceforge.net Mon Sep 22 11:35:30 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 11:35:33 2003 Subject: [Python-checkins] python/dist/src/Doc/mac libaetypes.tex, 1.2, 1.2.12.1 libframework.tex, 1.9.42.1, 1.9.42.2 Message-ID: <E1A1Sio-0004EM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory sc8-pr-cvs1:/tmp/cvs-serv16246 Modified Files: Tag: release23-maint libaetypes.tex libframework.tex Log Message: Fix doubled word errors. Index: libaetypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libaetypes.tex,v retrieving revision 1.2 retrieving revision 1.2.12.1 diff -C2 -d -r1.2 -r1.2.12.1 *** libaetypes.tex 11 Apr 2003 15:35:27 -0000 1.2 --- libaetypes.tex 22 Sep 2003 15:35:27 -0000 1.2.12.1 *************** *** 12,16 **** descriptors and Apple Event object specifiers. ! Apple Event data is is contained in descriptors, and these descriptors are typed. For many descriptors the Python representation is simply the corresponding Python type: \code{typeText} in OSA is a Python string, --- 12,16 ---- descriptors and Apple Event object specifiers. ! Apple Event data is contained in descriptors, and these descriptors are typed. For many descriptors the Python representation is simply the corresponding Python type: \code{typeText} in OSA is a Python string, Index: libframework.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libframework.tex,v retrieving revision 1.9.42.1 retrieving revision 1.9.42.2 diff -C2 -d -r1.9.42.1 -r1.9.42.2 *** libframework.tex 11 Aug 2003 23:43:04 -0000 1.9.42.1 --- libframework.tex 22 Sep 2003 15:35:28 -0000 1.9.42.2 *************** *** 57,61 **** \begin{funcdesc}{MenuItem}{menu, title\optional{, shortcut, callback}} Create a menu item object. The arguments are the menu to create, the ! item item title string and optionally the keyboard shortcut and a callback routine. The callback is called with the arguments menu-id, item number within menu (1-based), current front window and --- 57,61 ---- \begin{funcdesc}{MenuItem}{menu, title\optional{, shortcut, callback}} Create a menu item object. The arguments are the menu to create, the ! item title string and optionally the keyboard shortcut and a callback routine. The callback is called with the arguments menu-id, item number within menu (1-based), current front window and From rhettinger at users.sourceforge.net Mon Sep 22 11:36:02 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 11:36:06 2003 Subject: [Python-checkins] python/dist/src/Doc/ref ref3.tex, 1.114.4.1, 1.114.4.2 Message-ID: <E1A1SjK-0004HW-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1:/tmp/cvs-serv16426 Modified Files: Tag: release23-maint ref3.tex Log Message: Fix doubled word errors. Index: ref3.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v retrieving revision 1.114.4.1 retrieving revision 1.114.4.2 diff -C2 -d -r1.114.4.1 -r1.114.4.2 *** ref3.tex 25 Aug 2003 04:41:15 -0000 1.114.4.1 --- ref3.tex 22 Sep 2003 15:36:00 -0000 1.114.4.2 *************** *** 1657,1661 **** objects. Immutable sequences methods should at most only define \method{__getslice__()}; mutable sequences might define all three ! three methods. \begin{methoddesc}[sequence object]{__getslice__}{self, i, j} --- 1657,1661 ---- objects. Immutable sequences methods should at most only define \method{__getslice__()}; mutable sequences might define all three ! methods. \begin{methoddesc}[sequence object]{__getslice__}{self, i, j} From rhettinger at users.sourceforge.net Mon Sep 22 11:37:40 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 11:37:46 2003 Subject: [Python-checkins] python/dist/src/Doc/api utilities.tex, 1.10, 1.10.12.1 Message-ID: <E1A1Sku-0004Qt-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory sc8-pr-cvs1:/tmp/cvs-serv17018 Modified Files: Tag: release23-maint utilities.tex Log Message: Fix doubled word errors. Index: utilities.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/utilities.tex,v retrieving revision 1.10 retrieving revision 1.10.12.1 diff -C2 -d -r1.10 -r1.10.12.1 *** utilities.tex 23 Apr 2003 19:27:35 -0000 1.10 --- utilities.tex 22 Sep 2003 15:37:38 -0000 1.10.12.1 *************** *** 148,152 **** \var{name} argument may be of the form \code{package.module}). First check the modules dictionary if there's one there, and if not, ! create a new one and insert in in the modules dictionary. Return \NULL{} with an exception set on failure. \note{This function does not load or import the module; if the --- 148,152 ---- \var{name} argument may be of the form \code{package.module}). First check the modules dictionary if there's one there, and if not, ! create a new one and insert it in the modules dictionary. Return \NULL{} with an exception set on failure. \note{This function does not load or import the module; if the From rhettinger at users.sourceforge.net Mon Sep 22 11:50:54 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 11:50:58 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libcodecs.tex, 1.22.8.2, 1.22.8.3 libfuncs.tex, 1.143.8.4, 1.143.8.5 libgopherlib.tex, 1.12, 1.12.48.1 libimgfile.tex, 1.11, 1.11.48.1 libitertools.tex, 1.12.6.4, 1.12.6.5 libmultifile.tex, 1.12.16.1, 1.12.16.2 libregex.tex, 1.33, 1.33.42.1 Message-ID: <E1A1Sxi-0005Ex-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv20132 Modified Files: Tag: release23-maint libcodecs.tex libfuncs.tex libgopherlib.tex libimgfile.tex libitertools.tex libmultifile.tex libregex.tex Log Message: Fix doubled word errors. Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.22.8.2 retrieving revision 1.22.8.3 diff -C2 -d -r1.22.8.2 -r1.22.8.3 *** libcodecs.tex 1 Sep 2003 23:13:44 -0000 1.22.8.2 --- libcodecs.tex 22 Sep 2003 15:50:51 -0000 1.22.8.3 *************** *** 162,166 **** \var{encoding} specifies the encoding which is to be used for the ! the file. \var{errors} may be given to define the error handling. It defaults --- 162,166 ---- \var{encoding} specifies the encoding which is to be used for the ! file. \var{errors} may be given to define the error handling. It defaults Index: libfuncs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v retrieving revision 1.143.8.4 retrieving revision 1.143.8.5 diff -C2 -d -r1.143.8.4 -r1.143.8.5 *** libfuncs.tex 9 Sep 2003 01:13:59 -0000 1.143.8.4 --- libfuncs.tex 22 Sep 2003 15:50:51 -0000 1.143.8.5 *************** *** 976,980 **** If \var{sequence} is already a tuple, it is returned unchanged. For instance, \code{tuple('abc')} returns ! returns \code{('a', 'b', 'c')} and \code{tuple([1, 2, 3])} returns \code{(1, 2, 3)}. If no argument is given, returns a new empty tuple, \code{()}. --- 976,980 ---- If \var{sequence} is already a tuple, it is returned unchanged. For instance, \code{tuple('abc')} returns ! \code{('a', 'b', 'c')} and \code{tuple([1, 2, 3])} returns \code{(1, 2, 3)}. If no argument is given, returns a new empty tuple, \code{()}. Index: libgopherlib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgopherlib.tex,v retrieving revision 1.12 retrieving revision 1.12.48.1 diff -C2 -d -r1.12 -r1.12.48.1 *** libgopherlib.tex 22 Apr 1999 16:17:45 -0000 1.12 --- libgopherlib.tex 22 Sep 2003 15:50:51 -0000 1.12.48.1 *************** *** 8,12 **** This module provides a minimal implementation of client side of the ! the Gopher protocol. It is used by the module \refmodule{urllib} to handle URLs that use the Gopher protocol. --- 8,12 ---- This module provides a minimal implementation of client side of the ! Gopher protocol. It is used by the module \refmodule{urllib} to handle URLs that use the Gopher protocol. Index: libimgfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimgfile.tex,v retrieving revision 1.11 retrieving revision 1.11.48.1 diff -C2 -d -r1.11 -r1.11.48.1 *** libimgfile.tex 2 Mar 1999 16:37:11 -0000 1.11 --- libimgfile.tex 22 Sep 2003 15:50:51 -0000 1.11.48.1 *************** *** 10,14 **** files (also known as \file{.rgb} files). The module is far from complete, but is provided anyway since the functionality that there is ! is enough in some cases. Currently, colormap files are not supported. The module defines the following variables and functions: --- 10,14 ---- files (also known as \file{.rgb} files). The module is far from complete, but is provided anyway since the functionality that there is ! enough in some cases. Currently, colormap files are not supported. The module defines the following variables and functions: Index: libitertools.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libitertools.tex,v retrieving revision 1.12.6.4 retrieving revision 1.12.6.5 diff -C2 -d -r1.12.6.4 -r1.12.6.5 *** libitertools.tex 9 Sep 2003 00:07:44 -0000 1.12.6.4 --- libitertools.tex 22 Sep 2003 15:50:51 -0000 1.12.6.5 *************** *** 42,46 **** The performance advantage of iterators becomes more acute as the number of elements increases -- at some point, lists grow large enough to ! to severely impact memory cache performance and start running slowly. \begin{seealso} --- 42,46 ---- The performance advantage of iterators becomes more acute as the number of elements increases -- at some point, lists grow large enough to ! severely impact memory cache performance and start running slowly. \begin{seealso} Index: libmultifile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmultifile.tex,v retrieving revision 1.12.16.1 retrieving revision 1.12.16.2 diff -C2 -d -r1.12.16.1 -r1.12.16.2 *** libmultifile.tex 25 Aug 2003 04:34:46 -0000 1.12.16.1 --- libmultifile.tex 22 Sep 2003 15:50:51 -0000 1.12.16.2 *************** *** 122,126 **** method prepends \code{'-}\code{-'} and appends \code{'-}\code{-'} (like a MIME-multipart end-of-message marker) but it is declared so it can be ! be overridden in derived classes. This method need not append LF or CR-LF, as comparison with the result ignores trailing whitespace. \end{methoddesc} --- 122,126 ---- method prepends \code{'-}\code{-'} and appends \code{'-}\code{-'} (like a MIME-multipart end-of-message marker) but it is declared so it can be ! overridden in derived classes. This method need not append LF or CR-LF, as comparison with the result ignores trailing whitespace. \end{methoddesc} Index: libregex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libregex.tex,v retrieving revision 1.33 retrieving revision 1.33.42.1 diff -C2 -d -r1.33 -r1.33.42.1 *** libregex.tex 25 Sep 2000 17:23:04 -0000 1.33 --- libregex.tex 22 Sep 2003 15:50:51 -0000 1.33.42.1 *************** *** 316,320 **** zero, the corresponding return value is the entire matching string; if it is in the inclusive range [1..99], it is the string matching the ! the corresponding parenthesized group (using the default syntax, groups are parenthesized using \code{{\e}(} and \code{{\e})}). If no such group exists, the corresponding result is \code{None}. --- 316,320 ---- zero, the corresponding return value is the entire matching string; if it is in the inclusive range [1..99], it is the string matching the ! corresponding parenthesized group (using the default syntax, groups are parenthesized using \code{{\e}(} and \code{{\e})}). If no such group exists, the corresponding result is \code{None}. From tim_one at users.sourceforge.net Mon Sep 22 14:38:55 2003 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Sep 22 14:39:00 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_winsound.py, 1.6, 1.7 Message-ID: <E1A1VaJ-0006fV-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv24942/Lib/test Modified Files: test_winsound.py Log Message: PlaySoundTest.test_alias_fallback(): Disabled this test, and explained why in a new comment. My home Win98SE box is one of the "real systems" alluded to (my system "default sound" appears to have vanished sometime in the last month, that's certainly not a Python bug, and the MS PlaySound docs are correct in their explanation of what happens then). Bugfix candidate. If someone can still sneak it into 2.3.1, that would be good. Index: test_winsound.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_winsound.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_winsound.py 30 Jun 2003 11:57:52 -0000 1.6 --- test_winsound.py 22 Sep 2003 18:38:53 -0000 1.7 *************** *** 72,76 **** def test_alias_fallback(self): ! winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS) def test_alias_nofallback(self): --- 72,87 ---- def test_alias_fallback(self): ! # This test can't be expected to work on all systems. The MS ! # PlaySound() docs say: ! # ! # If it cannot find the specified sound, PlaySound uses the ! # default system event sound entry instead. If the function ! # can find neither the system default entry nor the default ! # sound, it makes no sound and returns FALSE. ! # ! # It's known to return FALSE on some real systems. ! ! # winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS) ! return def test_alias_nofallback(self): From tim_one at users.sourceforge.net Mon Sep 22 14:41:57 2003 From: tim_one at users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon Sep 22 14:42:01 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_winsound.py, 1.7, 1.8 Message-ID: <E1A1VdF-0006pD-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv26128/Lib/test Modified Files: test_winsound.py Log Message: PlaySoundTest.test_alias_nofallback(): Simplified the coding by using assertRaises. NOT a bugfix candidate. Index: test_winsound.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_winsound.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_winsound.py 22 Sep 2003 18:38:53 -0000 1.7 --- test_winsound.py 22 Sep 2003 18:41:53 -0000 1.8 *************** *** 86,96 **** def test_alias_nofallback(self): ! try: ! winsound.PlaySound( ! '!"$%&/(#+*', ! winsound.SND_ALIAS | winsound.SND_NODEFAULT ! ) ! except RuntimeError: ! pass def test_stopasync(self): --- 86,91 ---- def test_alias_nofallback(self): ! self.assertRaises(RuntimeError, winsound.PlaySound, '!"$%&/(#+*', ! winsound.SND_ALIAS | winsound.SND_NODEFAULT) def test_stopasync(self): From rhettinger at users.sourceforge.net Mon Sep 22 15:14:51 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon Sep 22 15:14:54 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_winsound.py, 1.6, 1.6.6.1 Message-ID: <E1A1W95-0000Mf-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv1297 Modified Files: Tag: release23-maint test_winsound.py Log Message: Backport Tim's fix to test_winsound.py PlaySoundTest.test_alias_fallback(): Disabled this test, and explained why in a new comment. My home Win98SE box is one of the "real systems" alluded to (my system "default sound" appears to have vanished sometime in the last month, that's certainly not a Python bug, and the MS PlaySound docs are correct in their explanation of what happens then). Index: test_winsound.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_winsound.py,v retrieving revision 1.6 retrieving revision 1.6.6.1 diff -C2 -d -r1.6 -r1.6.6.1 *** test_winsound.py 30 Jun 2003 11:57:52 -0000 1.6 --- test_winsound.py 22 Sep 2003 19:14:49 -0000 1.6.6.1 *************** *** 72,76 **** def test_alias_fallback(self): ! winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS) def test_alias_nofallback(self): --- 72,87 ---- def test_alias_fallback(self): ! # This test can't be expected to work on all systems. The MS ! # PlaySound() docs say: ! # ! # If it cannot find the specified sound, PlaySound uses the ! # default system event sound entry instead. If the function ! # can find neither the system default entry nor the default ! # sound, it makes no sound and returns FALSE. ! # ! # It's known to return FALSE on some real systems. ! ! # winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS) ! return def test_alias_nofallback(self): From anthonybaxter at users.sourceforge.net Mon Sep 22 22:36:19 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Sep 22 22:36:23 2003 Subject: [Python-checkins] python/dist/src/Include patchlevel.h, 2.74.4.1, 2.74.4.2 Message-ID: <E1A1d2J-0000Pa-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1:/tmp/cvs-serv1578 Modified Files: Tag: release23-maint patchlevel.h Log Message: bump version macros Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.74.4.1 retrieving revision 2.74.4.2 diff -C2 -d -r2.74.4.1 -r2.74.4.2 *** patchlevel.h 4 Aug 2003 22:52:27 -0000 2.74.4.1 --- patchlevel.h 23 Sep 2003 02:36:16 -0000 2.74.4.2 *************** *** 22,31 **** #define PY_MAJOR_VERSION 2 #define PY_MINOR_VERSION 3 ! #define PY_MICRO_VERSION 0 #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL #define PY_RELEASE_SERIAL 0 /* Version as a string */ ! #define PY_VERSION "2.3+" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. --- 22,31 ---- #define PY_MAJOR_VERSION 2 #define PY_MINOR_VERSION 3 ! #define PY_MICRO_VERSION 1 #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL #define PY_RELEASE_SERIAL 0 /* Version as a string */ ! #define PY_VERSION "2.3.1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. From anthonybaxter at users.sourceforge.net Mon Sep 22 22:41:06 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Sep 22 22:41:09 2003 Subject: [Python-checkins] python/dist/src README,1.177.4.1,1.177.4.2 Message-ID: <E1A1d6w-0000b4-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv2253 Modified Files: Tag: release23-maint README Log Message: bump version number Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.177.4.1 retrieving revision 1.177.4.2 diff -C2 -d -r1.177.4.1 -r1.177.4.2 *** README 4 Aug 2003 22:49:41 -0000 1.177.4.1 --- README 23 Sep 2003 02:41:03 -0000 1.177.4.2 *************** *** 1,4 **** ! This is Python version 2.3 (final) ! ================================== Copyright (c) 2001, 2002, 2003 Python Software Foundation. --- 1,4 ---- ! This is Python version 2.3.1 (final) ! ==================================== Copyright (c) 2001, 2002, 2003 Python Software Foundation. From anthonybaxter at users.sourceforge.net Mon Sep 22 22:41:53 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Sep 22 22:41:55 2003 Subject: [Python-checkins] python/dist/src LICENSE,1.26,1.26.8.1 Message-ID: <E1A1d7h-0000dQ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv2437 Modified Files: Tag: release23-maint LICENSE Log Message: bump version number Index: LICENSE =================================================================== RCS file: /cvsroot/python/python/dist/src/LICENSE,v retrieving revision 1.26 retrieving revision 1.26.8.1 diff -C2 -d -r1.26 -r1.26.8.1 *** LICENSE 22 May 2003 15:17:40 -0000 1.26 --- LICENSE 23 Sep 2003 02:41:50 -0000 1.26.8.1 *************** *** 44,47 **** --- 44,48 ---- 2.2.3 2.2.2 2003 PSF yes 2.3 2.2.2 2002-2003 PSF yes + 2.3.1 2.3 2002-2003 PSF yes Footnotes: From anthonybaxter at users.sourceforge.net Mon Sep 22 22:42:32 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Sep 22 22:42:36 2003 Subject: [Python-checkins] python/dist/src LICENSE,1.26,1.27 Message-ID: <E1A1d8K-0000g0-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv2590 Modified Files: LICENSE Log Message: include 2.3.1 Index: LICENSE =================================================================== RCS file: /cvsroot/python/python/dist/src/LICENSE,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** LICENSE 22 May 2003 15:17:40 -0000 1.26 --- LICENSE 23 Sep 2003 02:42:29 -0000 1.27 *************** *** 44,47 **** --- 44,48 ---- 2.2.3 2.2.2 2003 PSF yes 2.3 2.2.2 2002-2003 PSF yes + 2.3.1 2.3 2002-2003 PSF yes Footnotes: From anthonybaxter at users.sourceforge.net Mon Sep 22 23:25:50 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Mon Sep 22 23:25:54 2003 Subject: [Python-checkins] python/nondist/peps pep-0102.txt,1.13,1.14 Message-ID: <E1A1doE-0002We-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv9704 Modified Files: pep-0102.txt Log Message: wrap long line Index: pep-0102.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0102.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pep-0102.txt 22 Sep 2003 04:51:50 -0000 1.13 --- pep-0102.txt 23 Sep 2003 03:25:48 -0000 1.14 *************** *** 181,185 **** % cd ~ ! % cvs -d cvs.sf.net:/cvsroot/python export -rr212 -d Python-2.1.2 python/dist/src ___ Generate the tarball. Note that we're not using the `z' option --- 181,186 ---- % cd ~ ! % cvs -d cvs.sf.net:/cvsroot/python export -rr212 \ ! -d Python-2.1.2 python/dist/src ___ Generate the tarball. Note that we're not using the `z' option From fdrake at users.sourceforge.net Tue Sep 23 01:21:04 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 23 01:21:09 2003 Subject: [Python-checkins] python/dist/src/Doc/texinputs license.tex, 1.10, 1.10.10.1 Message-ID: <E1A1fbk-0007GF-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory sc8-pr-cvs1:/tmp/cvs-serv27892 Modified Files: Tag: release23-maint license.tex Log Message: add entry for 2.3.1 Index: license.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/license.tex,v retrieving revision 1.10 retrieving revision 1.10.10.1 diff -C2 -d -r1.10 -r1.10.10.1 *** license.tex 22 May 2003 14:58:02 -0000 1.10 --- license.tex 23 Sep 2003 05:21:02 -0000 1.10.10.1 *************** *** 42,45 **** --- 42,46 ---- \linev{2.2.3}{2.2.2}{2002-2003}{PSF}{yes} \linev{2.3}{2.2.2}{2002-2003}{PSF}{yes} + \linev{2.3.1}{2.3}{2002-2003}{PSF}{yes} \end{tablev} From fdrake at users.sourceforge.net Tue Sep 23 01:21:51 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 23 01:21:54 2003 Subject: [Python-checkins] python/dist/src/Doc/texinputs license.tex, 1.10, 1.11 Message-ID: <E1A1fcV-0007JE-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory sc8-pr-cvs1:/tmp/cvs-serv28094 Modified Files: license.tex Log Message: add entry for 2.3.1 Index: license.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/license.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** license.tex 22 May 2003 14:58:02 -0000 1.10 --- license.tex 23 Sep 2003 05:21:49 -0000 1.11 *************** *** 42,45 **** --- 42,46 ---- \linev{2.2.3}{2.2.2}{2002-2003}{PSF}{yes} \linev{2.3}{2.2.2}{2002-2003}{PSF}{yes} + \linev{2.3.1}{2.3}{2002-2003}{PSF}{yes} \end{tablev} From fdrake at users.sourceforge.net Tue Sep 23 01:23:27 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 23 01:23:30 2003 Subject: [Python-checkins] python/dist/src/Doc/texinputs boilerplate.tex, 1.84.4.1, 1.84.4.2 Message-ID: <E1A1fe3-0007MK-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory sc8-pr-cvs1:/tmp/cvs-serv28287 Modified Files: Tag: release23-maint boilerplate.tex Log Message: update release info Index: boilerplate.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v retrieving revision 1.84.4.1 retrieving revision 1.84.4.2 diff -C2 -d -r1.84.4.1 -r1.84.4.2 *** boilerplate.tex 4 Aug 2003 22:49:42 -0000 1.84.4.1 --- boilerplate.tex 23 Sep 2003 05:23:25 -0000 1.84.4.2 *************** *** 6,11 **** } ! \date{\today} % XXX update before final release! ! \release{2.3} % software release, not documentation \setreleaseinfo{} % empty for final release \setshortversion{2.3} % major.minor only for software --- 6,11 ---- } ! \date{September 23, 2003} % XXX update before final release! ! \release{2.3.1} % software release, not documentation \setreleaseinfo{} % empty for final release \setshortversion{2.3} % major.minor only for software From fdrake at users.sourceforge.net Tue Sep 23 01:25:12 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 23 01:25:16 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.261.4.1,1.261.4.2 Message-ID: <E1A1ffk-0007Qw-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv28571 Modified Files: Tag: release23-maint Makefile Log Message: bump version number Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.261.4.1 retrieving revision 1.261.4.2 diff -C2 -d -r1.261.4.1 -r1.261.4.2 *** Makefile 4 Aug 2003 22:49:41 -0000 1.261.4.1 --- Makefile 23 Sep 2003 05:25:09 -0000 1.261.4.2 *************** *** 67,71 **** # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.3+ PYTHON= python --- 67,71 ---- # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.3.1 PYTHON= python From theller at users.sourceforge.net Tue Sep 23 03:07:23 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Tue Sep 23 03:07:26 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.50,1.831.4.51 Message-ID: <E1A1hGd-0002qi-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv10949 Modified Files: Tag: release23-maint NEWS Log Message: Note from Anthony about Berkely DB 4.2 support. Mention which openssl version was used for the windows installer. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.50 retrieving revision 1.831.4.51 diff -C2 -d -r1.831.4.50 -r1.831.4.51 *** NEWS 22 Sep 2003 04:42:56 -0000 1.831.4.50 --- NEWS 23 Sep 2003 07:07:20 -0000 1.831.4.51 *************** *** 39,42 **** --- 39,44 ---- ----------------- + - The _bsddb module now supports Berkeley DB 4.2. + - Bug #698282: Add __file__ to dynamic modules in multiple interpreters. *************** *** 147,150 **** --- 149,157 ---- Windows ------- + + - The _ssl extension module was built using openssl-0.9.7b. + + - The Windows installer includes documentation in HTMLHelp format + instead of single HTML pages. Mac From theller at users.sourceforge.net Tue Sep 23 03:14:42 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Tue Sep 23 03:14:45 2003 Subject: [Python-checkins] python/dist/src/PCbuild readme.txt,1.43,1.43.8.1 Message-ID: <E1A1hNi-0003Cr-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory sc8-pr-cvs1:/tmp/cvs-serv12322 Modified Files: Tag: release23-maint readme.txt Log Message: Binaries are build using openssl-0.9.7b. Short note about how the htmlhelp docs are built. Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/readme.txt,v retrieving revision 1.43 retrieving revision 1.43.8.1 diff -C2 -d -r1.43 -r1.43.8.1 *** readme.txt 27 Jun 2003 15:49:35 -0000 1.43 --- readme.txt 23 Sep 2003 07:14:39 -0000 1.43.8.1 *************** *** 244,254 **** You (probably) don't want the "engine" code. For example, get ! openssl-0.9.6g.tar.gz not ! openssl-engine-0.9.6g.tar.gz Unpack into the "dist" directory, retaining the folder name from the archive - for example, the latest stable OpenSSL will install as ! dist/openssl-0.9.6g You can (theoretically) use any version of OpenSSL you like - the --- 244,254 ---- You (probably) don't want the "engine" code. For example, get ! openssl-0.9.7b.tar.gz not ! openssl-engine-0.9.7b.tar.gz Unpack into the "dist" directory, retaining the folder name from the archive - for example, the latest stable OpenSSL will install as ! dist/openssl-0.9.7b You can (theoretically) use any version of OpenSSL you like - the *************** *** 279,283 **** something like ! C:\Code\openssl-0.9.6g>set OPTS=no-asm Out of environment space --- 279,283 ---- something like ! C:\Code\openssl-0.9.7b>set OPTS=no-asm Out of environment space *************** *** 289,293 **** Stop. NMAKE : fatal error U1073: don't know how to make ! 'C:\Code\openssl-0.9.6g/out32/libeay32.lib' Stop. --- 289,293 ---- Stop. NMAKE : fatal error U1073: don't know how to make ! 'C:\Code\openssl-0.9.7b/out32/libeay32.lib' Stop. *************** *** 306,307 **** --- 306,314 ---- with easy-to-follow instructions in ../PC/example/; read the file readme.txt there first. + + HTML Help + --------- + + The compiled HTML help file is built from the HTML pages by the script + Doc/tools/prechm.py. This creates project files which must be compiled + with MS HTML Help Workshop. From anthonybaxter at users.sourceforge.net Tue Sep 23 04:00:48 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 23 04:00:53 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.51,1.831.4.52 Message-ID: <E1A1i6K-0005Ec-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv20081 Modified Files: Tag: release23-maint NEWS Log Message: actually set the date Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.51 retrieving revision 1.831.4.52 diff -C2 -d -r1.831.4.51 -r1.831.4.52 *** NEWS 23 Sep 2003 07:07:20 -0000 1.831.4.51 --- NEWS 23 Sep 2003 08:00:34 -0000 1.831.4.52 *************** *** 8,12 **** =========================== ! *Release date: XX-XXX-XXXX* Core and builtins --- 8,12 ---- =========================== ! *Release date: 23-Sep-2003* Core and builtins From anthonybaxter at users.sourceforge.net Tue Sep 23 04:12:15 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 23 04:12:21 2003 Subject: [Python-checkins] python/dist/src/Lib/idlelib NEWS.txt, 1.23.4.1, 1.23.4.2 Message-ID: <E1A1iHP-0005tX-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1:/tmp/cvs-serv22649 Modified Files: Tag: release23-maint NEWS.txt Log Message: and another date Index: NEWS.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v retrieving revision 1.23.4.1 retrieving revision 1.23.4.2 diff -C2 -d -r1.23.4.1 -r1.23.4.2 *** NEWS.txt 14 Aug 2003 15:15:02 -0000 1.23.4.1 --- NEWS.txt 23 Sep 2003 08:12:13 -0000 1.23.4.2 *************** *** 2,6 **** =================================== ! *Release date: XX-XXX-2003* - IDLE didn't start correctly when Python was installed in "Program Files" on --- 2,6 ---- =================================== ! *Release date: 23-Sep-2003* - IDLE didn't start correctly when Python was installed in "Program Files" on From purcell at users.sourceforge.net Tue Sep 23 04:41:55 2003 From: purcell at users.sourceforge.net (purcell@users.sourceforge.net) Date: Tue Sep 23 04:42:02 2003 Subject: [Python-checkins] python/dist/src/Lib unittest.py,1.27,1.28 Message-ID: <E1A1ik7-0007Kc-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv28165 Modified Files: unittest.py Log Message: Topical change: use 'startswith()' to identify test methods with a given prefix rather than comparing a slice. Index: unittest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** unittest.py 22 Sep 2003 11:08:12 -0000 1.27 --- unittest.py 23 Sep 2003 08:41:53 -0000 1.28 *************** *** 47,51 **** __author__ = "Steve Purcell" __email__ = "stephen_purcell at yahoo dot com" ! __version__ = "#Revision: 1.56 $"[11:-2] import time --- 47,51 ---- __author__ = "Steve Purcell" __email__ = "stephen_purcell at yahoo dot com" ! __version__ = "#Revision: 1.57 $"[11:-2] import time *************** *** 541,545 **** """ def isTestMethod(attrname, testCaseClass=testCaseClass, prefix=self.testMethodPrefix): ! return attrname[:len(prefix)] == prefix and callable(getattr(testCaseClass, attrname)) testFnNames = filter(isTestMethod, dir(testCaseClass)) for baseclass in testCaseClass.__bases__: --- 541,545 ---- """ def isTestMethod(attrname, testCaseClass=testCaseClass, prefix=self.testMethodPrefix): ! return attrname.startswith(prefix) and callable(getattr(testCaseClass, attrname)) testFnNames = filter(isTestMethod, dir(testCaseClass)) for baseclass in testCaseClass.__bases__: From akuchling at users.sourceforge.net Tue Sep 23 08:26:29 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue Sep 23 08:26:33 2003 Subject: [Python-checkins] python/nondist/sandbox/Lib bdist_dpkg.py,1.1,1.2 Message-ID: <E1A1mFR-0008UG-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv32091 Modified Files: bdist_dpkg.py Log Message: If py_modules are specified, add site-packages to dirlist Only generate postinst/prerm if .py files are being installed Write 'Architecture:' line in control file (but how do I determine the architecture?) Uncomment spawn() call; oops! Fix hard-wired version in rules template; oops again! Index: bdist_dpkg.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/Lib/bdist_dpkg.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bdist_dpkg.py 21 Sep 2003 19:56:14 -0000 1.1 --- bdist_dpkg.py 23 Sep 2003 12:26:25 -0000 1.2 *************** *** 52,56 **** # build package log.info("building DPKG") ! #self.spawn(["dpkg-buildpackage", "-rfakeroot"]) # run() --- 52,56 ---- # build package log.info("building DPKG") ! self.spawn(["dpkg-buildpackage", "-rfakeroot"]) # run() *************** *** 66,79 **** os.mkdir('debian') dirlist = "" ! for i in self.distribution.packages: dir = i dirlist += ' ' + dir ! dist = self.distribution ! package_name = dist.get_name().lower() d = {'name':dist.get_name(), 'package_name':package_name, ! 'pyversion': '%i.%i' % sys.version_info[0:2], 'dirlist':dirlist, 'marker':MARKER_STRING, --- 66,87 ---- os.mkdir('debian') + dist = self.distribution dirlist = "" ! if dist.has_pure_modules(): ! dirlist += '""' ! ! for i in dist.packages or []: dir = i dirlist += ' ' + dir ! pyversion = '%i.%i' % sys.version_info[0:2] ! # Temporary hack to build everything with 2.2 -- ! # I'm running out of the CVS trunk, but don't have it ! # installed as python2.4. ! ##pyversion = '2.2' ! package_name = 'python%s-%s' % (pyversion, dist.get_name().lower()) d = {'name':dist.get_name(), 'package_name':package_name, ! 'pyversion': pyversion, 'dirlist':dirlist, 'marker':MARKER_STRING, *************** *** 92,96 **** if not self._is_user_file('control') or True: - dist = self.distribution log.info('writing control file') output = self._write_file('control') --- 100,103 ---- *************** *** 105,112 **** --- 112,126 ---- """) output.write('\n') # Separator line + output.write("Package: %s\n" % package_name) output.write("""Section: libs Architecture: all\n""") output.write("Depends: python%(pyversion)s\n" % d) + if dist.has_ext_modules(): + # XXX how do I figure out the right architecture? + output.write('Architecture: i386\n') + else: + output.write('Architecture: all\n') + output.write("Description: %s\n" % dist.get_description()) s = dist.get_long_description() *************** *** 115,128 **** output.close() ! if not self._is_user_file('postinst'): log.info('writing postinst file') output = self._write_file('postinst') output.write(POSTINST_FILE % d) output.close() ! if not self._is_user_file('prerm'): log.info('writing prerm file') output = self._write_file('prerm') output.write(PRERM_FILE % d) output.close() if not self._is_user_file('rules'): log.info('writing rules file') --- 129,143 ---- output.close() ! if dist.has_pure_modules() and not self._is_user_file('postinst'): log.info('writing postinst file') output = self._write_file('postinst') output.write(POSTINST_FILE % d) output.close() ! if dist.has_pure_modules() and not self._is_user_file('prerm'): log.info('writing prerm file') output = self._write_file('prerm') output.write(PRERM_FILE % d) output.close() + if not self._is_user_file('rules'): log.info('writing rules file') *************** *** 240,244 **** build: build-stamp ! /usr/bin/python2.2 setup.py build build-stamp: touch build-stamp --- 255,259 ---- build: build-stamp ! /usr/bin/python%(pyversion)s setup.py build build-stamp: touch build-stamp From akuchling at users.sourceforge.net Tue Sep 23 09:56:59 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue Sep 23 10:00:00 2003 Subject: [Python-checkins] python/nondist/sandbox/Lib bdist_dpkg.py,1.2,1.3 Message-ID: <E1A1nf1-0004Oy-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv16918 Modified Files: bdist_dpkg.py Log Message: Use '.' instead of an empty string in the directory list Index: bdist_dpkg.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/Lib/bdist_dpkg.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bdist_dpkg.py 23 Sep 2003 12:26:25 -0000 1.2 --- bdist_dpkg.py 23 Sep 2003 13:56:57 -0000 1.3 *************** *** 69,73 **** dirlist = "" if dist.has_pure_modules(): ! dirlist += '""' for i in dist.packages or []: --- 69,73 ---- dirlist = "" if dist.has_pure_modules(): ! dirlist += '.' for i in dist.packages or []: *************** *** 95,99 **** -- %s <%s> Wed, 11 Jun 2003 14:44:11 -0400 ! """ % (package_name, dist.get_version(), 1, # XXX build version dist.get_maintainer(), dist.get_maintainer_email())) output.close() --- 95,99 ---- -- %s <%s> Wed, 11 Jun 2003 14:44:11 -0400 ! """ % (package_name, dist.get_version(), 1, # XXX build version? dist.get_maintainer(), dist.get_maintainer_email())) output.close() *************** *** 176,181 **** PACKAGE=%(name)s VERSION=%(pyversion)s ! LIB="/usr/lib/python$VERSION" ! DIRLIST="%(dirlist)s" case "$1" in --- 176,181 ---- PACKAGE=%(name)s VERSION=%(pyversion)s ! LIB=/usr/lib/python$VERSION ! DIRLIST=%(dirlist)s case "$1" in *************** *** 223,228 **** PACKAGE=%(name)s VERSION=%(pyversion)s ! LIB="/usr/lib/python$VERSION" ! DIRLIST="%(dirlist)s" case "$1" in --- 223,228 ---- PACKAGE=%(name)s VERSION=%(pyversion)s ! LIB=/usr/lib/python$VERSION ! DIRLIST=%(dirlist)s case "$1" in From anthonybaxter at users.sourceforge.net Tue Sep 23 11:01:53 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 23 11:01:57 2003 Subject: [Python-checkins] python/dist/src README,1.177,1.178 Message-ID: <E1A1ofp-00084T-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv31011 Modified Files: README Log Message: note about HP compiler. CC="cc -Ae" is least broken, but still broken Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.177 retrieving revision 1.178 diff -C2 -d -r1.177 -r1.178 *** README 25 Jul 2003 01:12:48 -0000 1.177 --- README 23 Sep 2003 15:01:49 -0000 1.178 *************** *** 367,371 **** OPT variable in the top-level Makefile; reported by Pat Knight, this seems to make a difference (at least for HP-UX 10.20) ! even though pyconfig.h defines it. HP PA-RISC 2.0: A recent bug report (http://www.python.org/sf/546117) --- 367,372 ---- OPT variable in the top-level Makefile; reported by Pat Knight, this seems to make a difference (at least for HP-UX 10.20) ! even though pyconfig.h defines it. Experience seems to show that ! building with HP's compiler works best if you set CC="cc -Ae". HP PA-RISC 2.0: A recent bug report (http://www.python.org/sf/546117) From rhettinger at users.sourceforge.net Tue Sep 23 16:21:03 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 23 16:21:06 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.860,1.861 Message-ID: <E1A1teh-0000EG-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv813/Misc Modified Files: NEWS Log Message: Added codec for bz2 compression. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.860 retrieving revision 1.861 diff -C2 -d -r1.860 -r1.861 *** NEWS 22 Sep 2003 15:03:11 -0000 1.860 --- NEWS 23 Sep 2003 20:21:00 -0000 1.861 *************** *** 47,50 **** --- 47,53 ---- ------- + - encodings.bz2_codec was added for access to bz2 compression + using "a long string".encode('bz2') + - Various improvements to unittest.py, realigned with PyUnit CVS. From rhettinger at users.sourceforge.net Tue Sep 23 16:21:03 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 23 16:21:12 2003 Subject: [Python-checkins] python/dist/src/Lib/encodings bz2_codec.py, NONE, 1.1 aliases.py, 1.19, 1.20 Message-ID: <E1A1teh-0000EI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/encodings In directory sc8-pr-cvs1:/tmp/cvs-serv813/Lib/encodings Modified Files: aliases.py Added Files: bz2_codec.py Log Message: Added codec for bz2 compression. --- NEW FILE: bz2_codec.py --- """ Python 'bz2_codec' Codec - bz2 compression encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Adapted by Raymond Hettinger from bz2_codec which was written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs import bz2 # this codec needs the optional bz2 module ! ### Codec APIs def bz2_encode(input,errors='strict'): """ Encodes the object input and returns a tuple (output object, length consumed). errors defines the error handling to apply. It defaults to 'strict' handling which is the only currently supported error handling for this codec. """ assert errors == 'strict' output = bz2.compress(input) return (output, len(input)) def bz2_decode(input,errors='strict'): """ Decodes the object input and returns a tuple (output object, length consumed). input must be an object which provides the bf_getreadbuf buffer slot. Python strings, buffer objects and memory mapped files are examples of objects providing this slot. errors defines the error handling to apply. It defaults to 'strict' handling which is the only currently supported error handling for this codec. """ assert errors == 'strict' output = bz2.decompress(input) return (output, len(input)) class Codec(codecs.Codec): def encode(self, input, errors='strict'): return bz2_encode(input, errors) def decode(self, input, errors='strict'): return bz2_decode(input, errors) class StreamWriter(Codec,codecs.StreamWriter): pass class StreamReader(Codec,codecs.StreamReader): pass ### encodings module API def getregentry(): return (bz2_encode,bz2_decode,StreamReader,StreamWriter) Index: aliases.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/encodings/aliases.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** aliases.py 4 Oct 2002 16:30:42 -0000 1.19 --- aliases.py 23 Sep 2003 20:21:01 -0000 1.20 *************** *** 42,45 **** --- 42,48 ---- 'base_64' : 'base64_codec', + # bz2_codec codec + 'bz2' : 'bz2_codec', + # cp037 codec 'csibm037' : 'cp037', From rhettinger at users.sourceforge.net Tue Sep 23 16:21:03 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 23 16:21:15 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libcodecs.tex,1.25,1.26 Message-ID: <E1A1teh-0000EK-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv813/Doc/lib Modified Files: libcodecs.tex Log Message: Added codec for bz2 compression. Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** libcodecs.tex 22 Sep 2003 15:00:53 -0000 1.25 --- libcodecs.tex 23 Sep 2003 20:21:01 -0000 1.26 *************** *** 805,808 **** --- 805,813 ---- {Convert operand to MIME base64} + \lineiv{bz2_codec} + {bz2} + {byte string} + {Compress the operand using bz2} + \lineiv{hex_codec} {hex} From theller at users.sourceforge.net Tue Sep 23 16:24:23 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Tue Sep 23 16:24:26 2003 Subject: [Python-checkins] python/dist/src/PCbuild pythoncore.dsp, 1.48, 1.48.4.1 BUILDno.txt, 1.51, 1.51.4.1 Message-ID: <E1A1thv-0000Vu-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory sc8-pr-cvs1:/tmp/cvs-serv1956 Modified Files: Tag: release23-maint pythoncore.dsp BUILDno.txt Log Message: Update the windows build number for 2.3.1 to 47. Index: pythoncore.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/pythoncore.dsp,v retrieving revision 1.48 retrieving revision 1.48.4.1 diff -C2 -d -r1.48 -r1.48.4.1 *** pythoncore.dsp 29 Jul 2003 00:18:44 -0000 1.48 --- pythoncore.dsp 23 Sep 2003 20:24:21 -0000 1.48.4.1 *************** *** 259,263 **** SOURCE=..\Modules\getbuildinfo.c ! # ADD CPP /D BUILD=46 # End Source File # Begin Source File --- 259,263 ---- SOURCE=..\Modules\getbuildinfo.c ! # ADD CPP /D BUILD=47 # End Source File # Begin Source File Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.51 retrieving revision 1.51.4.1 diff -C2 -d -r1.51 -r1.51.4.1 *** BUILDno.txt 29 Jul 2003 00:18:44 -0000 1.51 --- BUILDno.txt 23 Sep 2003 20:24:21 -0000 1.51.4.1 *************** *** 34,37 **** --- 34,39 ---- Windows Python BUILD numbers ---------------------------- + 47 2.3.1 (final) + 23-Sep-2003 46 2.3 (final) 29-Jul-2003 From theller at users.sourceforge.net Tue Sep 23 16:25:45 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Tue Sep 23 16:25:49 2003 Subject: [Python-checkins] python/dist/src/PC python_nt.rc,1.27,1.27.4.1 Message-ID: <E1A1tjF-0000bB-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory sc8-pr-cvs1:/tmp/cvs-serv2292 Modified Files: Tag: release23-maint python_nt.rc Log Message: Update the windows version resource for 2.3.1. Index: python_nt.rc =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/python_nt.rc,v retrieving revision 1.27 retrieving revision 1.27.4.1 diff -C2 -d -r1.27 -r1.27.4.1 *** python_nt.rc 29 Jul 2003 00:25:20 -0000 1.27 --- python_nt.rc 23 Sep 2003 20:25:43 -0000 1.27.4.1 *************** *** 34,45 **** * following comment and #define are output from PCbuild\field3.py: * ! * For 2.3, ! * PY_MICRO_VERSION = 0 * PY_RELEASE_LEVEL = 'final' = 0xf * PY_RELEASE_SERIAL = 0 * ! * and 0*1000 + 15*10 + 0 = 150 */ ! #define FIELD3 150 /* e.g., 2.1a2 --- 34,45 ---- * following comment and #define are output from PCbuild\field3.py: * ! * For 2.3.1, ! * PY_MICRO_VERSION = 1 * PY_RELEASE_LEVEL = 'final' = 0xf * PY_RELEASE_SERIAL = 0 * ! * and 1*1000 + 15*10 + 0 = 1150 */ ! #define FIELD3 1150 /* e.g., 2.1a2 From theller at users.sourceforge.net Tue Sep 23 16:34:42 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Tue Sep 23 16:34:45 2003 Subject: [Python-checkins] python/dist/src/Doc/tools prechm.py, 1.15.18.1, 1.15.18.2 Message-ID: <E1A1tru-00019f-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv4425 Modified Files: Tag: release23-maint prechm.py Log Message: Change the default window size to 1024x768. This shows at least the whole main page. Index: prechm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/prechm.py,v retrieving revision 1.15.18.1 retrieving revision 1.15.18.2 diff -C2 -d -r1.15.18.1 -r1.15.18.2 *** prechm.py 22 Sep 2003 14:54:58 -0000 1.15.18.1 --- prechm.py 23 Sep 2003 20:34:40 -0000 1.15.18.2 *************** *** 81,85 **** [WINDOWS] %(arch)s="Python %(version)s Documentation","%(arch)s.hhc","%(arch)s.hhk",\ ! "index.html","index.html",,,,,0x63520,220,0x10384e,[271,372,740,718],,,,,,,0 [FILES] --- 81,85 ---- [WINDOWS] %(arch)s="Python %(version)s Documentation","%(arch)s.hhc","%(arch)s.hhk",\ ! "index.html","index.html",,,,,0x63520,220,0x10384e,[0,0,1024,768],,,,,,,0 [FILES] From theller at users.sourceforge.net Tue Sep 23 16:50:50 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Tue Sep 23 16:50:53 2003 Subject: [Python-checkins] python/dist/src/Doc/tools prechm.py,1.15,1.16 Message-ID: <E1A1u7W-00023A-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv7875 Modified Files: prechm.py Log Message: Change the default window size to 1024x768. This shows at least the whole main page. Support 2.3 and 2.4 docs in HTMLHelp format. Already 'backported' to release-23maint. Index: prechm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/prechm.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** prechm.py 2 May 2002 21:59:08 -0000 1.15 --- prechm.py 23 Sep 2003 20:50:47 -0000 1.16 *************** *** 81,85 **** [WINDOWS] %(arch)s="Python %(version)s Documentation","%(arch)s.hhc","%(arch)s.hhk",\ ! "index.html","index.html",,,,,0x63520,220,0x10384e,[271,372,740,718],,,,,,,0 [FILES] --- 81,85 ---- [WINDOWS] %(arch)s="Python %(version)s Documentation","%(arch)s.hhc","%(arch)s.hhk",\ ! "index.html","index.html",,,,,0x63520,220,0x10384e,[0,0,1024,768],,,,,,,0 [FILES] *************** *** 151,154 **** --- 151,186 ---- # each 'book' : (Dir, Title, First page, Content page, Index page) supported_libraries = { + '2.4': + [ + Book('.', 'Main page', 'index'), + Book('.', 'Global Module Index', 'modindex'), + Book('whatsnew', "What's New", 'index', 'contents'), + Book('tut','Tutorial','tut','node2'), + Book('lib','Library Reference','lib','contents','genindex'), + Book('ref','Language Reference','ref','contents','genindex'), + Book('mac','Macintosh Reference','mac','contents','genindex'), + Book('ext','Extending and Embedding','ext','contents'), + Book('api','Python/C API','api','contents','genindex'), + Book('doc','Documenting Python','doc','contents'), + Book('inst','Installing Python Modules', 'inst', 'index'), + Book('dist','Distributing Python Modules', 'dist', 'index'), + ], + + '2.3': + [ + Book('.', 'Main page', 'index'), + Book('.', 'Global Module Index', 'modindex'), + Book('whatsnew', "What's New", 'index', 'contents'), + Book('tut','Tutorial','tut','node2'), + Book('lib','Library Reference','lib','contents','genindex'), + Book('ref','Language Reference','ref','contents','genindex'), + Book('mac','Macintosh Reference','mac','contents','genindex'), + Book('ext','Extending and Embedding','ext','contents'), + Book('api','Python/C API','api','contents','genindex'), + Book('doc','Documenting Python','doc','contents'), + Book('inst','Installing Python Modules', 'inst', 'index'), + Book('dist','Distributing Python Modules', 'dist', 'index'), + ], + '2.2': [ From theller at users.sourceforge.net Tue Sep 23 16:53:12 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Tue Sep 23 16:53:15 2003 Subject: [Python-checkins] python/dist/src/Lib/idlelib EditorWindow.py, 1.53, 1.54 Message-ID: <E1A1u9o-0002BI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1:/tmp/cvs-serv8371 Modified Files: EditorWindow.py Log Message: Let IDLE use the HTMLHelp docs on Windows, if found. Already 'backported' to release23-maint. Index: EditorWindow.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/EditorWindow.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** EditorWindow.py 9 Jul 2003 18:48:24 -0000 1.53 --- EditorWindow.py 23 Sep 2003 20:53:10 -0000 1.54 *************** *** 51,54 **** --- 51,55 ---- def __init__(self, flist=None, filename=None, key=None, root=None): if EditorWindow.help_url is None: + dochome = os.path.join(sys.prefix, 'Doc', 'index.html') if sys.platform.count('linux'): # look for html docs in a couple of standard places *************** *** 60,65 **** dochome = os.path.join(basepath, pyver, 'Doc', 'index.html') ! else: ! dochome = os.path.join(sys.prefix, 'Doc', 'index.html') dochome = os.path.normpath(dochome) if os.path.isfile(dochome): --- 61,69 ---- dochome = os.path.join(basepath, pyver, 'Doc', 'index.html') ! elif sys.platform.count('win') or sys.platform.count('nt'): ! chmfile = os.path.join(sys.prefix, "Python%d%d.chm" % sys.version_info[:2]) ! if os.path.isfile(chmfile): ! dochome = chmfile ! print "dochome =", dochome dochome = os.path.normpath(dochome) if os.path.isfile(dochome): From theller at users.sourceforge.net Tue Sep 23 16:54:50 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Tue Sep 23 16:54:58 2003 Subject: [Python-checkins] python/dist/src/PCbuild BUILDno.txt,1.51,1.52 Message-ID: <E1A1uBO-0002Hd-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory sc8-pr-cvs1:/tmp/cvs-serv8773 Modified Files: BUILDno.txt Log Message: Build number for Python 2.3.1. Forward ported from release23-maint. Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** BUILDno.txt 29 Jul 2003 00:18:44 -0000 1.51 --- BUILDno.txt 23 Sep 2003 20:54:48 -0000 1.52 *************** *** 34,37 **** --- 34,39 ---- Windows Python BUILD numbers ---------------------------- + 47 2.3.1 (final) + 23-Sep-2003 46 2.3 (final) 29-Jul-2003 From anthonybaxter at users.sourceforge.net Tue Sep 23 20:45:40 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 23 20:45:45 2003 Subject: [Python-checkins] python/dist/src README,1.177.4.2,1.177.4.3 Message-ID: <E1A1xmm-0004mv-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv18366 Modified Files: Tag: release23-maint README Log Message: note hp-ux borkage. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.177.4.2 retrieving revision 1.177.4.3 diff -C2 -d -r1.177.4.2 -r1.177.4.3 *** README 23 Sep 2003 02:41:03 -0000 1.177.4.2 --- README 24 Sep 2003 00:45:38 -0000 1.177.4.3 *************** *** 370,374 **** OPT variable in the top-level Makefile; reported by Pat Knight, this seems to make a difference (at least for HP-UX 10.20) ! even though pyconfig.h defines it. HP PA-RISC 2.0: A recent bug report (http://www.python.org/sf/546117) --- 370,377 ---- OPT variable in the top-level Makefile; reported by Pat Knight, this seems to make a difference (at least for HP-UX 10.20) ! even though pyconfig.h defines it. There appears to be a problem ! with HP-UX's interactions with autoconf that causes breakage. ! The workaround is to edit the generated pyconfig.h after running ! configure - see http://www.python.org/2.3.1/bugs.html for details. HP PA-RISC 2.0: A recent bug report (http://www.python.org/sf/546117) From anthonybaxter at users.sourceforge.net Tue Sep 23 20:51:12 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 23 20:51:15 2003 Subject: [Python-checkins] python/dist/src/Misc/RPM README, 1.2, 1.2.16.1 Python-2.1-expat.patch, 1.1, NONE Python-2.1-pythonpath.patch, 1.1, NONE Message-ID: <E1A1xs8-00050H-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM In directory sc8-pr-cvs1:/tmp/cvs-serv19229 Modified Files: Tag: release23-maint README Removed Files: Tag: release23-maint Python-2.1-expat.patch Python-2.1-pythonpath.patch Log Message: more updates from Sean Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/RPM/README,v retrieving revision 1.2 retrieving revision 1.2.16.1 diff -C2 -d -r1.2 -r1.2.16.1 *** README 6 Jan 2002 03:29:16 -0000 1.2 --- README 24 Sep 2003 00:51:10 -0000 1.2.16.1 *************** *** 3,6 **** <jafo@tummy.com>. ! Note that the patches say "2.1" in the name -- they didn't need to be ! updated for 2.2. --- 3,16 ---- <jafo@tummy.com>. ! It is recommended that RPM builders use the python*.src.rpm file ! downloaded from the "ftp.python.org:/pub/python/<version>/rpms". These ! may be more up to date than the files included in the base Python ! release tar-file. ! ! If you wish to build RPMs from the base Python release tar-file, note ! that you will have to download the ! "doc/<version>/html-<version>.tar.bz2" ! file from python.org and place it into your "SOURCES" directory for ! the build to complete. This is the same directory that you place the ! Python-2.3.1 release tar-file in. You can then use the ".spec" file in ! this directory to build RPMs. --- Python-2.1-expat.patch DELETED --- --- Python-2.1-pythonpath.patch DELETED --- From anthonybaxter at users.sourceforge.net Tue Sep 23 21:36:15 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 23 21:36:19 2003 Subject: [Python-checkins] python/dist/src/Misc/RPM README, 1.2, 1.3 Python-2.1-expat.patch, 1.1, NONE Python-2.1-pythonpath.patch, 1.1, NONE Message-ID: <E1A1yZj-0006i8-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM In directory sc8-pr-cvs1:/tmp/cvs-serv25793 Modified Files: README Removed Files: Python-2.1-expat.patch Python-2.1-pythonpath.patch Log Message: updates from sean Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/RPM/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 6 Jan 2002 03:29:16 -0000 1.2 --- README 24 Sep 2003 01:36:13 -0000 1.3 *************** *** 3,6 **** <jafo@tummy.com>. ! Note that the patches say "2.1" in the name -- they didn't need to be ! updated for 2.2. --- 3,16 ---- <jafo@tummy.com>. ! It is recommended that RPM builders use the python*.src.rpm file ! downloaded from the "ftp.python.org:/pub/python/<version>/rpms". These ! may be more up to date than the files included in the base Python ! release tar-file. ! ! If you wish to build RPMs from the base Python release tar-file, note ! that you will have to download the ! "doc/<version>/html-<version>.tar.bz2" ! file from python.org and place it into your "SOURCES" directory for ! the build to complete. This is the same directory that you place the ! Python-2.3.1 release tar-file in. You can then use the ".spec" file in ! this directory to build RPMs. --- Python-2.1-expat.patch DELETED --- --- Python-2.1-pythonpath.patch DELETED --- From rhettinger at users.sourceforge.net Tue Sep 23 23:56:10 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 23 23:56:15 2003 Subject: [Python-checkins] python/dist/src/Lib/test test_sets.py,1.28,1.29 Message-ID: <E1A20l8-0004NJ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv16807 Modified Files: test_sets.py Log Message: Add more identity tests. Index: test_sets.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sets.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** test_sets.py 21 Sep 2003 08:14:11 -0000 1.28 --- test_sets.py 24 Sep 2003 03:56:07 -0000 1.29 *************** *** 733,736 **** --- 733,746 ---- self.assertNotEqual(a-b, b-a) + def test_reflexsive_relations(self): + a, zero = self.a, Set() + self.assertEqual(a ^ a, zero) + self.assertEqual(a - a, zero) + self.assertEqual(a | a, a) + self.assertEqual(a & a, a) + self.assert_(a <= a) + self.assert_(a >= a) + self.assert_(a == a) + def test_summations(self): # check that sums of parts equal the whole *************** *** 757,760 **** --- 767,771 ---- self.assertEqual(len(a^b), len(a-b) + len(b-a)) self.assertEqual(len(a|b), len(a-b) + len(a&b) + len(b-a)) + self.assertEqual(len(a^b) + len(a&b), len(a|b)) #============================================================================== From rhettinger at users.sourceforge.net Tue Sep 23 23:57:38 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 23 23:57:42 2003 Subject: [Python-checkins] python/dist/src/Lib/encodings bz2_codec.py, 1.1, 1.2 Message-ID: <E1A20mY-0004RS-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/encodings In directory sc8-pr-cvs1:/tmp/cvs-serv17069 Modified Files: bz2_codec.py Log Message: Fix typo in the comments. Index: bz2_codec.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/encodings/bz2_codec.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bz2_codec.py 23 Sep 2003 20:21:01 -0000 1.1 --- bz2_codec.py 24 Sep 2003 03:57:36 -0000 1.2 *************** *** 4,8 **** will return Python string objects for both encode and decode. ! Adapted by Raymond Hettinger from bz2_codec which was written by Marc-Andre Lemburg (mal@lemburg.com). --- 4,8 ---- will return Python string objects for both encode and decode. ! Adapted by Raymond Hettinger from zlib_codec.py which was written by Marc-Andre Lemburg (mal@lemburg.com). From rhettinger at users.sourceforge.net Tue Sep 23 23:58:58 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue Sep 23 23:59:07 2003 Subject: [Python-checkins] python/dist/src/Doc/tut tut.tex,1.204,1.205 Message-ID: <E1A20nq-0004XC-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1:/tmp/cvs-serv17420 Modified Files: tut.tex Log Message: Fix whitespace in example Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.204 retrieving revision 1.205 diff -C2 -d -r1.204 -r1.205 *** tut.tex 11 Sep 2003 06:06:26 -0000 1.204 --- tut.tex 24 Sep 2003 03:58:56 -0000 1.205 *************** *** 4316,4324 **** \begin{verbatim} >>> def reverse(data): ! for index in range(len(data)-1, -1, -1): ! yield data[index] >>> for char in reverse('golf'): ! print char f --- 4316,4324 ---- \begin{verbatim} >>> def reverse(data): ! for index in range(len(data)-1, -1, -1): ! yield data[index] >>> for char in reverse('golf'): ! print char f From fdrake at users.sourceforge.net Wed Sep 24 00:11:49 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed Sep 24 00:11:52 2003 Subject: [Python-checkins] python/dist/src/Doc/ref ref7.tex,1.36,1.37 Message-ID: <E1A210H-00056w-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1:/tmp/cvs-serv19643 Modified Files: ref7.tex Log Message: - update to reflect that base classes can be class types as well as "classic" class objects [partially fixes SF bug #453684] - add note that new-style classes can use descriptors to implement instance variables in different ways Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** ref7.tex 12 Aug 2003 00:01:17 -0000 1.36 --- ref7.tex 24 Sep 2003 04:11:47 -0000 1.37 *************** *** 420,424 **** A class definition is an executable statement. It first evaluates the inheritance list, if present. Each item in the inheritance list ! should evaluate to a class object. The class's suite is then executed in a new execution frame (see section~\ref{naming}), using a newly created local namespace and the original global namespace. --- 420,425 ---- A class definition is an executable statement. It first evaluates the inheritance list, if present. Each item in the inheritance list ! should evaluate to a class object or class type which allows ! subclassing. The class's suite is then executed in a new execution frame (see section~\ref{naming}), using a newly created local namespace and the original global namespace. *************** *** 434,438 **** \indexii{execution}{frame} ! \strong{Programmer's note:} variables defined in the class definition are class variables; they are shared by all instances. To define instance variables, they must be given a value in the --- 435,439 ---- \indexii{execution}{frame} ! \strong{Programmer's note:} Variables defined in the class definition are class variables; they are shared by all instances. To define instance variables, they must be given a value in the *************** *** 442,443 **** --- 443,446 ---- with the same name when accessed in this way. Class variables with immutable values can be used as defaults for instance variables. + For new-style classes, descriptors can be used to create instance + variables with different implementation details. From rhettinger at users.sourceforge.net Wed Sep 24 06:30:10 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Wed Sep 24 06:30:14 2003 Subject: [Python-checkins] python/nondist/peps pep-0322.txt, NONE, 1.1 pep-0000.txt, 1.252, 1.253 Message-ID: <E1A26uQ-0004SB-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv17098 Modified Files: pep-0000.txt Added Files: pep-0322.txt Log Message: Add a new PEP for reverse iteration methods --- NEW FILE: pep-0322.txt --- PEP: 322 Title: Reverse Iteration Methods Version: $Revision: 1.1 $ Last-Modified: $Date: 2003/09/24 10:30:08 $ Author: Raymond Hettinger <python@rcn.com> Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 24-Sep-2003 Python-Version: 2.4 Post-History: 24-Sep-2003 Abstract ======== This proposal is to extend the API of several sequence types to include methods for iterating over the sequence in reverse. Motivation ========== For indexable objects, current approaches for reverse iteration are error prone, unnatural, and not especially readable:: for i in xrange(n-1, -1, -1): print seqn[i] One other current approach involves reversing a list before iterating over it. That technique wastes computer cycles, memory, and lines of code. Also, it only works with lists (strings, for example, do not define a reverse method):: rseqn = list(seqn) rseqn.reverse() for value in rseqn: print value Extending slicing minimizes the code overhead but does nothing for memory efficiency, beauty, or clarity. Reverse iteration is much less common than forward iteration, but it does arise regularly in practice. See `Real World Use Cases`_ below. Proposal ======== Add a method called *iter_backwards()* to sequence objects that can benefit from it. The above examples then simplify to:: for i in xrange(n).iter_backwards(): print seqn[i] :: for elem in seqn.iter_backwards(): print elem The new protocol would be applied to lists, strings, xrange objects, and possibly other sequence objects as well (depending on use cases and implementation issues). It would not apply to unordered collections like dicts and sets. No language syntax changes are needed. Alternative Method Names ======================== * *iterbackwards* -- like iteritems() but somewhat long * *backwards* -- more pithy, less explicit * *ireverse* -- reminiscent of imap(), izip(), and ifilter() Open Issues =========== * Should *tuple* objects be included? In the past, they have been denied some list like behaviors such as count() and index(). * Should *file* objects be included? Implementing reverse iteration may not be easy though it would be useful on occasion. * Should *enumerate* objects be included? They can provide reverse iteration only when the underlying sequences support *__len__* and reverse iteration. Real World Use Cases ==================== Here are some instances of reverse iteration taken from the standard library and comments on why reverse iteration was necessary: * atexit.exit_handlers() uses:: while _exithandlers: func, targs, kargs = _exithandlers.pop() . . . The application dictates the need to run exit handlers in the reverse order they were built. The ``while alist: alist.pop()`` form is readable and clean; however, it would be slightly faster and clearer with:: for func, target, kargs in _exithandlers.iter_backwards(): . . . del _exithandlers * difflib.get_close_matches() uses:: result.sort() # Retain only the best n. result = result[-n:] # Move best-scorer to head of list. result.reverse() # Strip scores. return [x for score, x in result] The need for reverse iteration arises from a requirement to return a portion of a sort in an order opposite of the sort criterion. The list comprehension is incidental (the third step of a Schwartzian transform). This particular use case can met with extended slicing, but the code is somewhat unattractive, hard to visually verify, and difficult for beginners to construct:: result.sort() return [x for score, x in result[:-n-1:-1]] The proposed form is much easier to construct and verify:: result.sort() return [x for score, x in result[-n:].iter_backwards()] * heapq.heapify() uses ``for i in xrange(n//2 - 1, -1, -1)`` because higher-level orderings are more easily formed from pairs of lower-level orderings. A forward version of this algorithm is possible; however, that would complicate the rest of the heap code which iterates over the underlying list in the opposite direction. * mhlib.test() uses:: testfolders.reverse(); for t in testfolders: do('mh.deletefolder(%s)' % `t`) The need for reverse iteration arises because the tail of the underlying list is altered during iteration. * platform._dist_try_harder() uses ``for n in range(len(verfiles)-1,-1,-1)`` because the loop deletes selected elements from *verfiles* but needs to leave the rest of the list intact for further iteration. This use case could be addressed with *itertools.ifilter()* but would require the selection predicate to be in a *lambda* expression. The net result is less clear and readable than the original. A better reformulation is to replace the first line with the proposed method. * random.shuffle() uses ``for i in xrange(len(x)-1, 0, -1)`` because the algorithm is most easily understood as randomly selecting elements from an ever diminishing pool. In fact, the algorithm can be run in a forward direction but is less intuitive and rarely presented that way in literature. * rfc822.Message.__delitem__() uses:: list.reverse() for i in list: del self.headers[i] The need for reverse iteration arises because the tail of the underlying list is altered during iteration. Rejected Alternative Ideas ========================== * Add a builtin function, *reverse()* which calls a magic method, __riter__. I see this as more overhead for no additional benefit. * Add a builtin function, *reverse()* which does the above, and if *__riter__* is not found, constructs its own using *__getitem__*, and if *__getitem__* is not found, builds a list from *__iter__* and returns a reverse iterator over the new list. The advantage is that one function takes care of almost everything that is potentially reversible. A disadvantage is that it can invisibility slip in to a low performance mode (in terms of time and memory) which would be more visible with an explicit ``list(obj).reverse()``. Another problem is that *__getitem__* is also used in mappings as well as sequences and that could lead to bizarre results. 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.252 retrieving revision 1.253 diff -C2 -d -r1.252 -r1.253 *** pep-0000.txt 16 Sep 2003 12:07:56 -0000 1.252 --- pep-0000.txt 24 Sep 2003 10:30:08 -0000 1.253 *************** *** 118,121 **** --- 118,122 ---- S 319 Python Synchronize/Asynchronize Block Pelletier S 321 Date/Time Parsing and Formatting Kuchling + S 322 Reverse Iteration Methods Hettinger S 754 IEEE 754 Floating Point Special Values Warnes *************** *** 336,339 **** --- 337,341 ---- I 320 Python 2.4 Release Schedule Warsaw S 321 Date/Time Parsing and Formatting Kuchling + S 322 Reverse Iteration Methods Hettinger SR 666 Reject Foolish Indentation Creighton S 754 IEEE 754 Floating Point Special Values Warnes From theller at users.sourceforge.net Wed Sep 24 06:55:45 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Wed Sep 24 06:55:49 2003 Subject: [Python-checkins] python/nondist/peps pep-0102.txt,1.14,1.15 Message-ID: <E1A27JB-0005Rs-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv20943 Modified Files: pep-0102.txt Log Message: Document some things to be done on windows, from the 2.3.1 release experience. Replace Tim with Thomas everywhere ;-). Index: pep-0102.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0102.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pep-0102.txt 23 Sep 2003 03:25:48 -0000 1.14 --- pep-0102.txt 24 Sep 2003 10:55:43 -0000 1.15 *************** *** 58,64 **** point, nobody except the RM should make any commits to the branch (or his duly assigned agents, i.e. Guido the BDFL, Fred Drake for ! documentation, or Tim Peters for Windows). If the RM screwed up and some desperate last minute change to the branch is ! necessary, it can mean extra work for Fred and Tim. So try to avoid this! --- 58,64 ---- point, nobody except the RM should make any commits to the branch (or his duly assigned agents, i.e. Guido the BDFL, Fred Drake for ! documentation, or Thomas Heller for Windows). If the RM screwed up and some desperate last minute change to the branch is ! necessary, it can mean extra work for Fred and Thomas. So try to avoid this! *************** *** 92,97 **** many places, including the README and LICENSE files. ___ After starting the process, the most important thing to do next ! is to update the Misc/NEWS file. Tim will need this in order to do the Windows release and he likes to stay up late. This step can be pretty tedious, so it's best to get to it immediately --- 92,113 ---- many places, including the README and LICENSE files. + ___ For the Windows build, additional files have to be updated. + + PC/python_nt.rc sets up the DLL version resource for Windows + (displayed when you right-click on the DLL and select + Properties). + + PCBuild/BUILDno.txt contains the Windows build number, see the + instructions in this file how to change it. Saving the project + file PCBuild/pythoncore.dsp results in a change to + PCBuild/pythoncore.dsp as well. + + PCbuild/python20.wse sets up the Windows installer version + resource (displayed when you right-click on the installer .exe + and select Properties), and also contains the Python version + number. + ___ After starting the process, the most important thing to do next ! is to update the Misc/NEWS file. Thomas will need this in order to do the Windows release and he likes to stay up late. This step can be pretty tedious, so it's best to get to it immediately *************** *** 108,112 **** trunk, they've updated the NEWS file accordingly. You can't be positive, so double check. If you're a Unix weenie, it helps to ! verify with Tim Peters about changes on Windows, and Jack Jansen about changes on the Mac. --- 124,128 ---- trunk, they've updated the NEWS file accordingly. You can't be positive, so double check. If you're a Unix weenie, it helps to ! verify with Thomas about changes on Windows, and Jack Jansen about changes on the Mac. *************** *** 123,129 **** ___ Once the release is underway, Fred Drake needs to create the ! HTML from the documentation. He does this and uploads the file to ! www.python.org. Then he tells Tim Peters and Sean Reifschneider where this file is. This may generate some last minute changes on the branch. Once Fred is done, there can be no further checkins on the branch in --- 139,146 ---- ___ Once the release is underway, Fred Drake needs to create the ! HTML from the documentation. He does this and uploads the file ! to www.python.org. Then he tells Thomas and Sean Reifschneider where this file is. + This may generate some last minute changes on the branch. Once Fred is done, there can be no further checkins on the branch in *************** *** 137,151 **** Basically, if it's in Doc/ Fred will take care of it. ! ___ Tim Peters grabs the HTML and uses this to build the Windows ! installer, Sean Reifschneider grabs the HTML and uses this to ! build the Linux RPMs. ! ___ Tim performs his Windows magic, generating an installer ! executable. He uploads this file to python.org. He then sends ! the RM a notice which includes the location and MD5 checksum of ! the Windows executable. ! Note that Tim's creation of the Windows executable may generate ! a few more commits on the branch. Tim will be responsible for merging Windows-specific changes from trunk to branch, and from branch to trunk. --- 154,177 ---- Basically, if it's in Doc/ Fred will take care of it. ! ___ Thomas grabs the HTML to build the Windows helpfile. ! The HTML files are unpacked into a new src/html directory, and ! runs this command to create the project files for MS HTML ! Workshop: ! % python ..\Doc\tools\prechm.py -v 2.3 python23 ! HTML Workshop is then fired up on the created python23.hhp file, ! finally resulting in an python23.chm file. ! ! ___ Thomas compiles everything with MSVC 6.0, and moves the ! python23.chm file into the src/chm directory. The installer ! executable is then generated with Wise Installation System. ! ! He uploads this file to the starship. He then sends the RM a ! notice which includes the location and MD5 checksum of the ! Windows executable. ! ! Note that Thomas's creation of the Windows executable may generate ! a few more commits on the branch. Thomas will be responsible for merging Windows-specific changes from trunk to branch, and from branch to trunk. *************** *** 166,170 **** and/or "U" files. I.e. you better not have any uncommitted changes in your working directory, but you may pick up some of ! Fred's or Tim's last minute changes. ___ Now tag the branch using a symbolic name like "rXYMaZ", --- 192,196 ---- and/or "U" files. I.e. you better not have any uncommitted changes in your working directory, but you may pick up some of ! Fred's or Thomas's last minute changes. ___ Now tag the branch using a symbolic name like "rXYMaZ", *************** *** 216,224 **** figure out what the problem is. ! ___ You need to upload the tgz file to creosote.python.org. Tim ! will have already uploaded the exe file to creosote, but if not, ! you'll need to do that too. These steps can take a long time ! depending on your network bandwidth. scp both files from your ! own machine to creosote. ___ While you're waiting, you can start twiddling the web pages to --- 242,248 ---- figure out what the problem is. ! ___ You need to upload the tgz and the exe file to creosote.python.org. ! This step can take a long time depending on your network ! bandwidth. scp both files from your own machine to creosote. ___ While you're waiting, you can start twiddling the web pages to *************** *** 407,412 **** testing is tiresome but very necessary. ! Concurrent with uploading the installer, Tim installs Python from ! it twice: once into the default directory suggested by the installer, and later into a directory with embedded spaces in its name. For each installation, he runs the full regression suite --- 431,436 ---- testing is tiresome but very necessary. ! Concurrent with uploading the installer, Thomas installs Python ! from it twice: once into the default directory suggested by the installer, and later into a directory with embedded spaces in its name. For each installation, he runs the full regression suite *************** *** 418,422 **** (the "Module Docs" Start menu entry), make sure the "Start Browser" button works, and make sure you can search for a random ! module (Tim uses "random" <wink>) and then that the "go to selected" button works. --- 442,446 ---- (the "Module Docs" Start menu entry), make sure the "Start Browser" button works, and make sure you can search for a random ! module (Thomas uses "random" <wink>) and then that the "go to selected" button works. *************** *** 428,436 **** Repeat all of the above on at least one flavor of Win9x, and one ! of NT/2000. On NT/2000, try both an Admin and a plain User (not ! Power User) account. WRT Step 5 above (verify the release media), since by the time ! release files are ready to download Tim has generally run many Windows tests on the installer he uploaded, he usually doesn't do anything for Step 5 except a full byte-comparison ("fc /b" if --- 452,460 ---- Repeat all of the above on at least one flavor of Win9x, and one ! of NT/2000/XP. On NT/2000/XP, try both an Admin and a plain User ! (not Power User) account. WRT Step 5 above (verify the release media), since by the time ! release files are ready to download Thomas has generally run many Windows tests on the installer he uploaded, he usually doesn't do anything for Step 5 except a full byte-comparison ("fc /b" if From montanaro at users.sourceforge.net Wed Sep 24 12:51:27 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Wed Sep 24 12:51:30 2003 Subject: [Python-checkins] python/dist/src/Doc/tut glossary.tex,NONE,1.1 Message-ID: <E1A2CrP-0008N1-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1:/tmp/cvs-serv32155 Added Files: glossary.tex Log Message: first cut at a glossary --- NEW FILE: glossary.tex --- \chapter{Glossary\label{glossary}} %%% keep the entries sorted and include at least one \index{} item for each \begin{description} \index{...} \item[...]{The typical Python prompt of the interactive shell when entering code for an indented code block.} \index{>>>} \item[>>>]{The typical Python prompt of the interactive shell. Often seen for code examples that can be tried right away in the interpreter.} \index{__slots__} \item[__slots__]{A declaration inside a new-style class that saves memory by pre-declaring space for instance attributes and eliminating instance dictionaries. Though popular, the technique is somewhat tricky to get right and is best reserved for rare cases where there are large numbers of instances in a memory critical application.} \index{BDFL} \item[BDFL]{Benevolent Dictator For Life, a.k.a. \ulink{Guido van Rossum}{http://www.python.org/~guido/}, Python's creator.} \index{byte code} \item[byte code]{The internal represenatation of a Python program in the interpreter. The byte code is also cached in the \code{.pyc} and {}\code{.pyo} files so that executing the same file is faster the second time (compilation from source to byte code can be saved). This "intermediate language" is said to run on a "virtual machine" that calls the subroutines corresponding to each bytecode.} \index{classic class} \item[classic class]{Any class which does not inherit from \class{object}. See new-style class.} \index{coercion} \item[coercion]{Converting data from one type to another. For example, int(3.15) coerces the floating point number to the integer, 3. Most mathematical operations have rules for coercing their arguments to a common type. For instance, adding 3 + 4.5, causes the integer 3 to be coerced to be a float (3.0) before adding to 4.5 resulting in the float 7.5.} \index{descriptor} \item[descriptor]{Any object that defines the methods __get__(), __set__(), or __delete__(). When a class attribute is a descriptor, its special binding behavior is triggered upon attribute lookup. Normally, writing {}\var{a.b} looks up the object \var{b} in the class dictionary for \var{a}, but if \var{b} is a descriptor, the defined method gets called. Understanding descriptors is a key to a deep understanding of Python because they are the basis for many features including functions, methods,properties, class methods, static methods, and reference to super classes.} \index{dictionary} \item[dictionary]{An associative array, where arbitrary keys are mapped to values. The use of `dict` much resembles that for `list`, but the keys can be any object with a `__hash__` function, not just integers starting from zero. Called a hash in Perl.} \index{EAFP} \item[EAFP]{Easier to ask for forgiveness than permission. This common Python coding style assumes the existance of valid keys or attributes and catches exceptions if the assumption proves false. This clean and fast style is characterized by the presence of many `try` and `except` statments. The technique contrasts with the '''LBYL''' style that is common in many other languages such as C.} \index{__future__} \item[__future__]{A pseudo module which programmers can use to enable new language features which are not compatible with the current interpreter. For example, the expression \code{11 / 4} currently evaluates to \code{2}. If the module in which it is executed had enabled ``true division`` by executing} \begin{verbatim} from __future__ import division \end{verbatim} the expression \code{11 / 4} would evaluate to \code{2.75}. By actually importing the __future__ module and evaluating its variables, you can see when a new feature was first added to the language and when it will becode the default: \begin{verbatim} >>> import __future__ >>> __future__.division _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192) \end{verbatim} \index{generator} \item[generator]{A function that returns an iterator. It looks like a normal function except that the \keyword{yield} keyword is used instead of {}\keyword{return}. Generator functions often contain one or more {}\keyword{for} or \keyword{while} loops that \keyword{yield} elements back to the caller. The function execution is stopped at the \keyword{yield} keyword (returning the result) and is resumed there when the next element is requested by calling the \function{next()} method of the returned iterator.} \index{GIL} \item[GIL]{See \em{global interpreter lock}.} \index{global interpreter lock} \item[global interpreter lock]{the lock used by Python threads to assure that only one thread can be run at a time. This simplifies Python by assuring that no two processes can access the same memory at the same time. Locking the entire interpreter makes it easier for the interpreter to be multi-threaded, at the expense of some parallelism on multi-processor machines. Efforts have been made in the past to create a "free-threaded" interpreter (one which locks shared data at a much finer granularity), but performance suffered in the common single-processor case.} \index{IDLE} \item[IDLE]{an Integrated Development Environment for Python. IDLE is a basic editor and intepreter environment that ships with the standard distribution of Python. Good for beginners and those on a budget, it also serves as clear example code for those wanting to implement a moderately sophisticated, multi-platform GUI application.} \index{immutable} \item[immutable]{A object with fixed value. Immutable objects are numbers, strings or tuples (and more). Such an object cannot be altered. A new object has to be created if a different value has to be stored. They play an important role in places where a constant hash value is needed. For example as a key in a dictionary.} \index{integer division} \item[integer division]{Mathematical division discarding any remainder. For example, the expression \code{11 / 4} currently evaluates to 2 in contrast to the 2.75 returned by float division. Also called "floor division". When dividing two integers the outcome will always be another integer (having the floor function applied to it). However, if one of the operands is another numeric type (such as a float), the result will be coerced (see coercion) to a common type. For example, a integer divided by a float will result in a float value, possibly with a decimal fraction. Integer division can be forced by using the \code{//} operator instead of the \code{/} operator. See also, __future__.} \index{interactive} \item[interactive]{Python has an interactive interpreter which means that you can try out things and directly see its result. Just launch {}\code{python} with no arguments (possibly by selecting it from your computer's main menu). It is a very powerful way to test out new ideas or inspect modules and packages (remember \code{help(x)}).} \index{interpreted} \item[interpreted]{Python is an interpreted language, opposed to a compiled one. This means that the source files can be run right away without first making an executable which is then run. Interpreted languages typicaly have a shorter development/debug cycle than compiled ones. See also {}\em{interactive}.} \index{iterable} \item[iterable]{A container object capable of returning its members one at a time. Examples of iterables include all sequence types (\class{list}, {}\class{str}, \class{tuple}, etc.) and some non-sequence types like {}\class{dict} and \class{file} and objects of any classes you define with an \function{__iter__} or \function{__getitem__} method. Iterables can be used in a \keyword{for} loop and in many other places where a sequence is needed (\function{zip}, \function{map}, ...). When an iterable object is passed as an argument to the builtin function \function{iter()}, it returns an iterator for the object. This iterator is good for one pass over the set of values. When using iterables, it is usually not necessary to call {}\function{iter()} or deal with iterator objects yourself - the \code{for} statement does that automatically for you, creating a temporary unnamed variable to hold the iterator for the duration of the loop. See also iterator, sequence and generator.} \index{iterator} \item[iterator]{An object representing a stream of data. Repeated calls to the iterator's \function{next()} method return successive items in the stream. When no more data is available a \exception{StopIteration} exception is raised instead. At this point the iterator object is exhausted and any further calls to its \function{next()} method just raise {}\exception{StopIteration} again. Iterators are required to have an {}\function{__iter__()} method that returns the iterator object itself so every iterator is also iterable and may be used in most places where other iterables are accepted. One notable exception is code that attempts multiple iteration passes. A container object (such as a list) produces a fresh new iterator each time you pass it to the \function{iter()} function or use it in a \function{for} loop. Attempting this with an iterator will just return the same exhausted iterator object from the second iteration pass and on, making it appear like an empty container.} \index{list comprehension} \item[list comprehension]{A compact way to process all or a subset of elements in a sequence and return a list with the results. \code{result = ["0x\%02x" \% x for x in range(256) if x \% 2 == 0]} generates a list of strings containing hex numbers (0x..) that are even and in the range from 0 to 255. The \keyword{if} clause is optional. If omitted, all elements in {}\code{range(256)} are processed in that case.} \index{mapping} \item[mapping]{A container object (such as \class{dict}) that supports arbitrary key lookups using the special method \function{__getitem__()}.} \index{metaclass} \item[metaclass]{The class of a class. Class definitions create a class name, a class dictionary, and a list of base classes. The metaclass is responsible for taking those three arguments and creating the class. Most object oriented programming languages provide a default implementation. What makes Python special is that it is possible to create custom metaclasses. Most users never need this tool, but when the need arises, metaclasses can provide powerful, elegant solutions. They have been used for logging attribute access, adding thread-safety, tracking object creation, implementing singletons, and many other tasks.} \index{LBYL} \item[LBYL]{Look before you leap. This coding style explicitly tests for pre-conditions before making calls or lookups. This style contrasts with the EAFP approach and is characterized the presence of many \keyword{if} statements.} \index{mutable} \item[mutable]{Mutable objects can change their value but keep their \function{id()}. See also immutable.} \index{namespace} \item[namespace]{The place where a variable is stored. Namespaces are implemented as dictionary. There is the local, global and builtins namespace and the nested namespaces in objects (in methods). Namespaces support modularity by preventing naming conflicts. For instance, the functions \function{__builtins__.open()} and \function{os.open()} are distinguished by their namespaces. Namespaces also aid readability and maintainabilty by making it clear which modules implement a function. For instance, writing \function{random.seed()} or \function{itertools.izip()} makes it clear that those functions are implemented by the \module{random} and \module{itertools} modules respectively.} \index{nested scope} \item[nested scope]{The ability to refer to a variable in an enclosing definition. For instance, a function defined inside another function can refer to variables in the outer function. Note that nested scopes work only for reference and not for assignment which will always write to the innermost scope. In contrast, local variables both read and write in the innermost scope. Likewise, global variables read and write to the global namespace.} \index{new-style class} \item[new-style class]{Any class that inherits from \class{object}. This includes all built-in types like \class{list} and \class{dict}. Only new style classes can use Python's newer, versatile features like {}\var{__slots__}, descriptors, properties, \var{__getattribute__}, class methods, and static methods.} \index{Python3000} \item[Python3000]{A mythical python release, allowed not to be backward compatible, with telepathic interface.} \index{sequence} \item[sequence]{An iterable which supports efficient element access using integer indices via the \function{__getitem__} and \function{__len()__} special methods. Some builtin sequence types are \class{list}, \class{str}, {}\class{tuple}, and \class{unicode}. Note that \class{dict} also supports {}\function{__getitem__} and \function{__len__}, but is considered a mapping rather than a sequence because the lookups use arbitrary immutable keys rather than integers.} \index{Zen of Python} \item[Zen of Python]{listing of Python design principles and philosophies that are helpful in understanding and using the language. The listing can be found by typing "import this" at the interactive prompt.} \end{description} From montanaro at users.sourceforge.net Wed Sep 24 12:53:04 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Wed Sep 24 12:53:08 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile.deps,1.111,1.112 Message-ID: <E1A2Csy-0008Tx-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv32445 Modified Files: Makefile.deps Log Message: Add a glossary to the tutorial. Also generate an index. At the moment this mostly only references glossary entries. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** Makefile.deps 6 Sep 2003 06:42:01 -0000 1.111 --- Makefile.deps 24 Sep 2003 16:53:02 -0000 1.112 *************** *** 69,73 **** texinputs/reportingbugs.tex ! TUTFILES= tut/tut.tex $(MANSTYLES) $(COMMONTEX) # LaTeX source files for the Python Reference Manual --- 69,73 ---- texinputs/reportingbugs.tex ! TUTFILES= tut/tut.tex tut/glossary.tex $(MANSTYLES) $(COMMONTEX) # LaTeX source files for the Python Reference Manual From montanaro at users.sourceforge.net Wed Sep 24 12:53:05 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Wed Sep 24 12:53:11 2003 Subject: [Python-checkins] python/dist/src/Doc/tut tut.tex,1.205,1.206 Message-ID: <E1A2Csz-0008U5-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1:/tmp/cvs-serv32445/tut Modified Files: tut.tex Log Message: Add a glossary to the tutorial. Also generate an index. At the moment this mostly only references glossary entries. Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.205 retrieving revision 1.206 diff -C2 -d -r1.205 -r1.206 *** tut.tex 24 Sep 2003 03:58:56 -0000 1.205 --- tut.tex 24 Sep 2003 16:53:02 -0000 1.206 *************** *** 12,15 **** --- 12,17 ---- \input{boilerplate} + \makeindex + \begin{document} *************** *** 4824,4827 **** --- 4826,4833 ---- \chapter{History and License} \input{license} + + \input{glossary} + + \input{tut.ind} \end{document} From theller at users.sourceforge.net Thu Sep 25 02:26:48 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Thu Sep 25 02:29:06 2003 Subject: [Python-checkins] python/dist/src/Doc/dist sysconfig.tex,1.1,1.2 Message-ID: <E1A2PaS-0000AD-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/dist In directory sc8-pr-cvs1:/tmp/cvs-serv626 Modified Files: sysconfig.tex Log Message: Typo: sys.prefex -> sys.prefix Closes SF# 812152 Baskport candidate for release23-main Index: sysconfig.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/dist/sysconfig.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sysconfig.tex 2 Aug 2001 15:12:07 -0000 1.1 --- sysconfig.tex 25 Sep 2003 06:26:46 -0000 1.2 *************** *** 25,33 **** \begin{datadesc}{PREFIX} ! The result of \code{os.path.normpath(sys.prefex)}. \end{datadesc} \begin{datadesc}{EXEC_PREFIX} ! The result of \code{os.path.normpath(sys.exec_prefex)}. \end{datadesc} --- 25,33 ---- \begin{datadesc}{PREFIX} ! The result of \code{os.path.normpath(sys.prefix)}. \end{datadesc} \begin{datadesc}{EXEC_PREFIX} ! The result of \code{os.path.normpath(sys.exec_prefix)}. \end{datadesc} From akuchling at users.sourceforge.net Thu Sep 25 08:34:33 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Thu Sep 25 08:34:43 2003 Subject: [Python-checkins] python/nondist/sandbox/Lib bdist_dpkg.py,1.3,1.4 Message-ID: <E1A2VKL-0006sQ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/sandbox/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv26426 Modified Files: bdist_dpkg.py Log Message: Patch from Mikhail Sobolev: Create debian/copyright file; add gain-root-command (should it default to fakeroot?) and do-not-build (odd name; is dry-run appropriate?) options Index: bdist_dpkg.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/Lib/bdist_dpkg.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bdist_dpkg.py 23 Sep 2003 13:56:57 -0000 1.3 --- bdist_dpkg.py 25 Sep 2003 12:34:30 -0000 1.4 *************** *** 1,5 **** """distutils.command.bdist_dpkg ! Implements the Distutils 'bdist_dpkg' command (create a Debian packaging). """ --- 1,5 ---- """distutils.command.bdist_dpkg ! Implements the Distutils 'bdist_dpkg' command (create a Debian package). """ *************** *** 18,21 **** --- 18,22 ---- from distutils import log + import time MARKER_STRING = "GENERATED BY BDIST_DPKG" *************** *** 26,35 **** user_options = [ ] ! boolean_options = [] def initialize_options (self): ! pass # initialize_options() --- 27,41 ---- user_options = [ + ('gain-root-command=', 'r', 'command that allows to gain root rights'), + # XXX this option name is a bit odd; what would be a better one? + ('do-not-build', None, 'do not build the package, just create the debian/ stuff') ] ! boolean_options = [ 'do-not-build' ] def initialize_options (self): ! self.gain_root_command = None ! self.do_not_build = None ! # initialize_options() *************** *** 50,56 **** self._create_dpkg_files() ! # build package ! log.info("building DPKG") ! self.spawn(["dpkg-buildpackage", "-rfakeroot"]) # run() --- 56,69 ---- self._create_dpkg_files() ! if not self.do_not_build: ! # build package ! log.info("building DPKG") ! ! build_command = [ "dpkg-buildpackage" ] ! ! if self.gain_root_command is not None: ! build_command.append ('-r%s' % self.gain_root_command) ! ! self.spawn(build_command) # run() *************** *** 79,83 **** # I'm running out of the CVS trunk, but don't have it # installed as python2.4. ! ##pyversion = '2.2' package_name = 'python%s-%s' % (pyversion, dist.get_name().lower()) d = {'name':dist.get_name(), --- 92,96 ---- # I'm running out of the CVS trunk, but don't have it # installed as python2.4. ! pyversion = '2.2' package_name = 'python%s-%s' % (pyversion, dist.get_name().lower()) d = {'name':dist.get_name(), *************** *** 85,89 **** --- 98,109 ---- 'pyversion': pyversion, 'dirlist':dirlist, + 'license':dist.get_license(), 'marker':MARKER_STRING, + 'maintainer':dist.get_maintainer(), + 'maintainer_email':dist.get_maintainer_email(), + 'now':time.strftime ("%a, %d %b %Y %H:%M:%S %z"), + 'author':dist.get_author(), + 'author_email':dist.get_author_email(), + 'url':dist.get_url() } if not self._is_user_file('changelog') or True: *************** *** 94,100 **** * Dummy changelog line ! -- %s <%s> Wed, 11 Jun 2003 14:44:11 -0400 """ % (package_name, dist.get_version(), 1, # XXX build version? ! dist.get_maintainer(), dist.get_maintainer_email())) output.close() --- 114,120 ---- * Dummy changelog line ! -- %s <%s> %s """ % (package_name, dist.get_version(), 1, # XXX build version? ! dist.get_maintainer(), dist.get_maintainer_email(), d['now'])) output.close() *************** *** 147,150 **** --- 167,176 ---- os.chmod('debian/rules', 0755) + if not self._is_user_file('copyright'): + log.info('writing copyright file') + output = self._write_file('copyright') + output.write(COPYRIGHT_FILE % d) + output.close() + def _write_file (self, filename): path = os.path.join('debian', filename) *************** *** 292,293 **** --- 318,333 ---- .PHONY: build clean binary-indep binary install """ + + COPYRIGHT_FILE = '''This package was debianized by + %(maintainer)s <%(maintainer_email)s> on %(now)s + + It was downloaded from + + %(url)s + + Upstream Author: %(author)s <%(author_email)s> + + Copyright: + + %(license)s + ''' From montanaro at users.sourceforge.net Thu Sep 25 10:49:17 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Thu Sep 25 10:49:20 2003 Subject: [Python-checkins] python/dist/src configure.in,1.435,1.436 Message-ID: <E1A2XQj-0005os-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv22369 Modified Files: configure.in Log Message: Typo: HAVE_SYNC -> HAVE_FSYNC Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.435 retrieving revision 1.436 diff -C2 -d -r1.435 -r1.436 *** configure.in 22 Sep 2003 11:14:40 -0000 1.435 --- configure.in 25 Sep 2003 14:49:15 -0000 1.436 *************** *** 2106,2110 **** AC_MSG_CHECKING(for fsync) AC_TRY_COMPILE([#include <unistd.h>], void *x=fsync, ! AC_DEFINE(HAVE_SYNC, 1, Define if you have the 'fsync' function.) AC_MSG_RESULT(yes), AC_MSG_RESULT(no) --- 2106,2110 ---- AC_MSG_CHECKING(for fsync) AC_TRY_COMPILE([#include <unistd.h>], void *x=fsync, ! AC_DEFINE(HAVE_FSYNC, 1, Define if you have the 'fsync' function.) AC_MSG_RESULT(yes), AC_MSG_RESULT(no) From montanaro at users.sourceforge.net Thu Sep 25 10:50:08 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Thu Sep 25 10:50:11 2003 Subject: [Python-checkins] python/dist/src configure,1.424,1.425 Message-ID: <E1A2XRY-0005se-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv22582 Modified Files: configure Log Message: Type. HAVE_SYNC -> HAVE_FSYNC Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.424 retrieving revision 1.425 diff -C2 -d -r1.424 -r1.425 *** configure 22 Sep 2003 11:14:38 -0000 1.424 --- configure 25 Sep 2003 14:50:04 -0000 1.425 *************** *** 1,6 **** #! /bin/sh ! # From configure.in Revision: 1.434 . # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.53 for python 2.4. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 --- 1,6 ---- #! /bin/sh ! # From configure.in Revision: 1.435 . # Guess values for system-dependent variables and create Makefiles. [...13641 lines suppressed...] rm -f $ac_file *************** *** 19121,19126 **** if test "$no_create" != yes; then ac_cs_success=: exec 5>/dev/null ! $SHELL $CONFIG_STATUS || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which --- 19957,19965 ---- if test "$no_create" != yes; then ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null ! $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which From montanaro at users.sourceforge.net Thu Sep 25 10:50:31 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Thu Sep 25 10:50:34 2003 Subject: [Python-checkins] python/dist/src pyconfig.h.in,1.85,1.86 Message-ID: <E1A2XRv-0005tz-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv22686 Modified Files: pyconfig.h.in Log Message: Typo. HAVE_SYNC -> HAVE_FSYNC Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** pyconfig.h.in 20 Sep 2003 15:30:20 -0000 1.85 --- pyconfig.h.in 25 Sep 2003 14:50:29 -0000 1.86 *************** *** 487,491 **** /* Define if you have the 'fsync' function. */ ! #undef HAVE_SYNC /* Define to 1 if you have the `sysconf' function. */ --- 487,491 ---- /* Define if you have the 'fsync' function. */ ! #undef HAVE_FSYNC /* Define to 1 if you have the `sysconf' function. */ From montanaro at users.sourceforge.net Thu Sep 25 11:21:06 2003 From: montanaro at users.sourceforge.net (montanaro@users.sourceforge.net) Date: Thu Sep 25 11:21:10 2003 Subject: [Python-checkins] python/dist/src configure, 1.416.4.5, 1.416.4.6 configure.in, 1.427.4.5, 1.427.4.6 pyconfig.h.in, 1.83.4.2, 1.83.4.3 Message-ID: <E1A2XvW-0007lI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv29772 Modified Files: Tag: release23-maint configure configure.in pyconfig.h.in Log Message: backport of HAVE_FSYNC fix Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.416.4.5 retrieving revision 1.416.4.6 diff -C2 -d -r1.416.4.5 -r1.416.4.6 *** configure 20 Sep 2003 15:29:40 -0000 1.416.4.5 --- configure 25 Sep 2003 15:20:55 -0000 1.416.4.6 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.427.4.4 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.427.4.5 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. *************** *** 13385,13389 **** cat >>confdefs.h <<\_ACEOF ! #define HAVE_SYNC 1 _ACEOF --- 13385,13389 ---- cat >>confdefs.h <<\_ACEOF ! #define HAVE_FSYNC 1 _ACEOF Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.427.4.5 retrieving revision 1.427.4.6 diff -C2 -d -r1.427.4.5 -r1.427.4.6 *** configure.in 20 Sep 2003 15:29:42 -0000 1.427.4.5 --- configure.in 25 Sep 2003 15:21:00 -0000 1.427.4.6 *************** *** 2094,2098 **** AC_MSG_CHECKING(for fsync) AC_TRY_COMPILE([#include <unistd.h>], void *x=fsync, ! AC_DEFINE(HAVE_SYNC, 1, Define if you have the 'fsync' function.) AC_MSG_RESULT(yes), AC_MSG_RESULT(no) --- 2094,2098 ---- AC_MSG_CHECKING(for fsync) AC_TRY_COMPILE([#include <unistd.h>], void *x=fsync, ! AC_DEFINE(HAVE_FSYNC, 1, Define if you have the 'fsync' function.) AC_MSG_RESULT(yes), AC_MSG_RESULT(no) Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.83.4.2 retrieving revision 1.83.4.3 diff -C2 -d -r1.83.4.2 -r1.83.4.3 *** pyconfig.h.in 20 Sep 2003 15:29:42 -0000 1.83.4.2 --- pyconfig.h.in 25 Sep 2003 15:21:00 -0000 1.83.4.3 *************** *** 487,491 **** /* Define if you have the 'fsync' function. */ ! #undef HAVE_SYNC /* Define to 1 if you have the `sysconf' function. */ --- 487,491 ---- /* Define if you have the 'fsync' function. */ ! #undef HAVE_FSYNC /* Define to 1 if you have the `sysconf' function. */ From fdrake at users.sourceforge.net Thu Sep 25 11:25:39 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu Sep 25 11:25:50 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.264,1.265 Message-ID: <E1A2Xzv-00081Q-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv30827 Modified Files: Makefile Log Message: define a variable to specify the mkhowto program itself, as for any other application Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.264 retrieving revision 1.265 diff -C2 -d -r1.264 -r1.265 *** Makefile 30 Jul 2003 19:14:54 -0000 1.264 --- Makefile 25 Sep 2003 15:25:37 -0000 1.265 *************** *** 72,88 **** DVIPS= dvips -N0 -t $(PAPER) ! MKDVI= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --dvi ! MKHTML= $(PYTHON) tools/mkhowto --html --about html/stdabout.dat \ --iconserver ../icons --favicon ../icons/pyfav.gif \ --address $(PYTHONDOCS) --up-link ../index.html \ --up-title "Python Documentation Index" \ --global-module-index "../modindex.html" --dvips-safe ! MKISILOHTML=$(PYTHON) tools/mkhowto --html --about html/stdabout.dat \ --iconserver ../icons \ --l2h-init perl/isilo.perl --numeric --split 1 \ --dvips-safe MKISILO= iSilo386 -U -y -rCR -d0 ! MKPDF= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --pdf ! MKPS= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --ps BUILDINDEX=$(TOOLSDIR)/buildindex.py --- 72,90 ---- DVIPS= dvips -N0 -t $(PAPER) ! MKHOWTO= $(PYTHON) ../tools/mkhowto ! ! MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi ! MKHTML= $(MKHOWTO) --html --about html/stdabout.dat \ --iconserver ../icons --favicon ../icons/pyfav.gif \ --address $(PYTHONDOCS) --up-link ../index.html \ --up-title "Python Documentation Index" \ --global-module-index "../modindex.html" --dvips-safe ! MKISILOHTML=$(MKHOWTO) --html --about html/stdabout.dat \ --iconserver ../icons \ --l2h-init perl/isilo.perl --numeric --split 1 \ --dvips-safe MKISILO= iSilo386 -U -y -rCR -d0 ! MKPDF= $(MKHOWTO) --paper=$(PAPER) --pdf ! MKPS= $(MKHOWTO) --paper=$(PAPER) --ps BUILDINDEX=$(TOOLSDIR)/buildindex.py From rhettinger at users.sourceforge.net Thu Sep 25 12:18:30 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Sep 25 12:18:38 2003 Subject: [Python-checkins] python/nondist/peps pep-0322.txt,1.1,1.2 Message-ID: <E1A2Yp4-0002vA-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv11222 Modified Files: pep-0322.txt Log Message: Updated to reflect comments on comp.lang.python. Index: pep-0322.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0322.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pep-0322.txt 24 Sep 2003 10:30:08 -0000 1.1 --- pep-0322.txt 25 Sep 2003 16:18:28 -0000 1.2 *************** *** 30,35 **** One other current approach involves reversing a list before iterating over it. That technique wastes computer cycles, memory, and lines of ! code. Also, it only works with lists (strings, for example, do not ! define a reverse method):: rseqn = list(seqn) --- 30,34 ---- One other current approach involves reversing a list before iterating over it. That technique wastes computer cycles, memory, and lines of ! code:: rseqn = list(seqn) *************** *** 38,43 **** print value ! Extending slicing minimizes the code overhead but does nothing for ! memory efficiency, beauty, or clarity. Reverse iteration is much less common than forward iteration, but it --- 37,42 ---- print value ! Extending slicing is a third approach that minimizes the code overhead ! but does nothing for memory efficiency, beauty, or clarity. Reverse iteration is much less common than forward iteration, but it *************** *** 110,113 **** --- 109,115 ---- del _exithandlers + Note, if the order of deletion is important, then the first form + is still needed. + * difflib.get_close_matches() uses:: *************** *** 150,159 **** ``for n in range(len(verfiles)-1,-1,-1)`` because the loop deletes selected elements from *verfiles* but needs to leave the rest of ! the list intact for further iteration. This use case could be ! addressed with *itertools.ifilter()* but would require the ! selection predicate to be in a *lambda* expression. The net ! result is less clear and readable than the original. A better ! reformulation is to replace the first line with the proposed ! method. * random.shuffle() uses ``for i in xrange(len(x)-1, 0, -1)`` because --- 152,156 ---- ``for n in range(len(verfiles)-1,-1,-1)`` because the loop deletes selected elements from *verfiles* but needs to leave the rest of ! the list intact for further iteration. * random.shuffle() uses ``for i in xrange(len(x)-1, 0, -1)`` because *************** *** 161,165 **** elements from an ever diminishing pool. In fact, the algorithm can be run in a forward direction but is less intuitive and rarely ! presented that way in literature. * rfc822.Message.__delitem__() uses:: --- 158,164 ---- elements from an ever diminishing pool. In fact, the algorithm can be run in a forward direction but is less intuitive and rarely ! presented that way in literature. The replacement code ! ``for i in xrange(1, len(x)).iter_backwards()`` is much easier ! to mentally verify. * rfc822.Message.__delitem__() uses:: *************** *** 173,193 **** ! Rejected Alternative Ideas ! ========================== ! * Add a builtin function, *reverse()* which calls a magic method, ! __riter__. I see this as more overhead for no additional benefit. ! * Add a builtin function, *reverse()* which does the above, and ! if *__riter__* is not found, constructs its own using ! *__getitem__*, and if *__getitem__* is not found, builds a list ! from *__iter__* and returns a reverse iterator over the new list. ! The advantage is that one function takes care of almost everything ! that is potentially reversible. A disadvantage is that it can ! invisibility slip in to a low performance mode (in terms of time ! and memory) which would be more visible with an explicit ! ``list(obj).reverse()``. Another problem is that *__getitem__* ! is also used in mappings as well as sequences and that could lead ! to bizarre results. --- 172,201 ---- ! Alternative Ideas ! ================= ! * Add a builtin function, *riter()* which calls a magic method, ! *__riter__*. I see this as more overhead for no additional benefit. ! * Several variants were submitted that provided fallback behavior ! when *__riter__* is not defined: ! ! - fallback to: ``for i in xrange(len(obj)-1,-1,-1): yield obj[i]`` ! - fallback to: ``for i in itertools.count(): yield[obj[-i]]`` ! - fallback to: ``tmp=list(obj); tmp.reverse(); return iter(tmp)`` ! ! All of these attempt to save implementing some object methods at the ! expense of adding a new builtin function and of creating a new magic ! method name. ! ! The approaches using *__getitem__()* are slower than using a custom ! method for each object. Also, the *__getitem__()* variants produce ! bizarre results when applied to mappings. ! ! All of the variants crash when applied to an infinite iterator. ! ! The last variant can invisibly slip into a low performance mode ! (in terms of time and memory) which could be made more visible with ! an explicit ``list(obj).reverse()``. From akuchling at users.sourceforge.net Thu Sep 25 14:26:12 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Thu Sep 25 14:26:22 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libasynchat.tex, NONE, 1.3.18.1 lib.tex, 1.200, 1.200.4.1 Message-ID: <E1A2aoe-0005tX-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv22585 Modified Files: Tag: release22-maint lib.tex Added Files: Tag: release22-maint libasynchat.tex Log Message: [Bug #811681] The asynchat documentation would also apply to the 2.2 version of the module, but the docs aren't included. This adds a copy of libasynchat.tex. --- NEW FILE: libasynchat.tex --- \section{\module{asynchat} --- Asynchronous socket command/response handler} \declaremodule{standard}{asynchat} \modulesynopsis{Support for asynchronous command/response protocols.} \moduleauthor{Sam Rushing}{rushing@nightmare.com} \sectionauthor{Steve Holden}{sholden@holdenweb.com} This module builds on the \refmodule{asyncore} infrastructure, simplifying asynchronous clients and servers and making it easier to handle protocols whose elements are terminated by arbitrary strings, or are of variable length. \refmodule{asynchat} defines the abstract class \class{async_chat} that you subclass, providing implementations of the \method{collect_incoming_data()} and \method{found_terminator()} methods. It uses the same asynchronous loop as \refmodule{asyncore}, and the two types of channel, \class{asyncore.dispatcher} and \class{asynchat.async_chat}, can freely be mixed in the channel map. Typically an \class{asyncore.dispatcher} server channel generates new \class{asynchat.async_chat} channel objects as it receives incoming connection requests. \begin{classdesc}{async_chat}{} This class is an abstract subclass of \class{asyncore.dispatcher}. To make practical use of the code you must subclass \class{async_chat}, providing meaningful \method{collect_incoming_data()} and \method{found_terminator()} methods. The \class{asyncore.dispatcher} methods can be used, although not all make sense in a message/response context. Like \class{asyncore.dispatcher}, \class{async_chat} defines a set of events that are generated by an analysis of socket conditions after a \cfunction{select()} call. Once the polling loop has been started the \class{async_chat} object's methods are called by the event-processing framework with no action on the part of the programmer. Unlike \class{asyncore.dispatcher}, \class{async_chat} allows you to define a first-in-first-out queue (fifo) of \emph{producers}. A producer need have only one method, \method{more()}, which should return data to be transmitted on the channel. The producer indicates exhaustion (\emph{i.e.} that it contains no more data) by having its \method{more()} method return the empty string. At this point the \class{async_chat} object removes the producer from the fifo and starts using the next producer, if any. When the producer fifo is empty the \method{handle_write()} method does nothing. You use the channel object's \method{set_terminator()} method to describe how to recognize the end of, or an important breakpoint in, an incoming transmission from the remote endpoint. To build a functioning \class{async_chat} subclass your input methods \method{collect_incoming_data()} and \method{found_terminator()} must handle the data that the channel receives asynchronously. The methods are described below. \end{classdesc} \begin{methoddesc}{close_when_done}{} Pushes a \code{None} on to the producer fifo. When this producer is popped off the fifo it causes the channel to be closed. \end{methoddesc} \begin{methoddesc}{collect_incoming_data}{data} Called with \var{data} holding an arbitrary amount of received data. The default method, which must be overridden, raises a \exception{NotImplementedError} exception. \end{methoddesc} \begin{methoddesc}{discard_buffers}{} In emergencies this method will discard any data held in the input and/or output buffers and the producer fifo. \end{methoddesc} \begin{methoddesc}{found_terminator}{} Called when the incoming data stream matches the termination condition set by \method{set_terminator}. The default method, which must be overridden, raises a \exception{NotImplementedError} exception. The buffered input data should be available via an instance attribute. \end{methoddesc} \begin{methoddesc}{get_terminator}{} Returns the current terminator for the channel. \end{methoddesc} \begin{methoddesc}{handle_close}{} Called when the channel is closed. The default method silently closes the channel's socket. \end{methoddesc} \begin{methoddesc}{handle_read}{} Called when a read event fires on the channel's socket in the asynchronous loop. The default method checks for the termination condition established by \method{set_terminator()}, which can be either the appearance of a particular string in the input stream or the receipt of a particular number of characters. When the terminator is found, \method{handle_read} calls the \method{found_terminator()} method after calling \method{collect_incoming_data()} with any data preceding the terminating condition. \end{methoddesc} \begin{methoddesc}{handle_write}{} Called when the application may write data to the channel. The default method calls the \method{initiate_send()} method, which in turn will call \method{refill_buffer()} to collect data from the producer fifo associated with the channel. \end{methoddesc} \begin{methoddesc}{push}{data} Creates a \class{simple_producer} object (\emph{see below}) containing the data and pushes it on to the channel's \code{producer_fifo} to ensure its transmission. This is all you need to do to have the channel write the data out to the network, although it is possible to use your own producers in more complex schemes to implement encryption and chunking, for example. \end{methoddesc} \begin{methoddesc}{push_with_producer}{producer} Takes a producer object and adds it to the producer fifo associated with the channel. When all currently-pushed producers have been exhausted the channel will consume this producer's data by calling its \method{more()} method and send the data to the remote endpoint. \end{methoddesc} \begin{methoddesc}{readable}{} Should return \code{True} for the channel to be included in the set of channels tested by the \cfunction{select()} loop for readability. \end{methoddesc} \begin{methoddesc}{refill_buffer}{} Refills the output buffer by calling the \method{more()} method of the producer at the head of the fifo. If it is exhausted then the producer is popped off the fifo and the next producer is activated. If the current producer is, or becomes, \code{None} then the channel is closed. \end{methoddesc} \begin{methoddesc}{set_terminator}{term} Sets the terminating condition to be recognised on the channel. \code{term} may be any of three types of value, corresponding to three different ways to handle incoming protocol data. \begin{tableii}{l|l}{}{term}{Description} \lineii{\emph{string}}{Will call \method{found_terminator()} when the string is found in the input stream} \lineii{\emph{integer}}{Will call \method{found_terminator()} when the indicated number of characters have been received} \lineii{\code{None}}{The channel continues to collect data forever} \end{tableii} Note that any data following the terminator will be available for reading by the channel after \method{found_terminator()} is called. \end{methoddesc} \begin{methoddesc}{writable}{} Should return \code{True} as long as items remain on the producer fifo, or the channel is connected and the channel's output buffer is non-empty. \end{methoddesc} \subsection{asynchat - Auxiliary Classes and Functions} \begin{classdesc}{simple_producer}{data\optional{, buffer_size=512}} A \class{simple_producer} takes a chunk of data and an optional buffer size. Repeated calls to its \method{more()} method yield successive chunks of the data no larger than \var{buffer_size}. \end{classdesc} \begin{methoddesc}{more}{} Produces the next chunk of information from the producer, or returns the empty string. \end{methoddesc} \begin{classdesc}{fifo}{\optional{list=None}} Each channel maintains a \class{fifo} holding data which has been pushed by the application but not yet popped for writing to the channel. A \class{fifo} is a list used to hold data and/or producers until they are required. If the \var{list} argument is provided then it should contain producers or data items to be written to the channel. \end{classdesc} \begin{methoddesc}{is_empty}{} Returns \code{True} iff the fifo is empty. \end{methoddesc} \begin{methoddesc}{first}{} Returns the least-recently \method{push()}ed item from the fifo. \end{methoddesc} \begin{methoddesc}{push}{data} Adds the given data (which may be a string or a producer object) to the producer fifo. \end{methoddesc} \begin{methoddesc}{pop}{} If the fifo is not empty, returns \code{True, first()}, deleting the popped item. Returns \code{False, None} for an empty fifo. \end{methoddesc} The \module{asynchat} module also defines one utility function, which may be of use in network and textual analysis operations. \begin{funcdesc}{find_prefix_at_end}{haystack, needle} Returns \code{True} if string \var{haystack} ends with any non-empty prefix of string \var{needle}. \end{funcdesc} \subsection{asynchat Example \label{asynchat-example}} The following partial example shows how HTTP requests can be read with \class{async_chat}. A web server might create an \class{http_request_handler} object for each incoming client connection. Notice that initially the channel terminator is set to match the blank line at the end of the HTTP headers, and a flag indicates that the headers are being read. Once the headers have been read, if the request is of type POST (indicating that further data are present in the input stream) then the \code{Content-Length:} header is used to set a numeric terminator to read the right amount of data from the channel. The \method{handle_request()} method is called once all relevant input has been marshalled, after setting the channel terminator to \code{None} to ensure that any extraneous data sent by the web client are ignored. \begin{verbatim} class http_request_handler(asynchat.async_chat): def __init__(self, conn, addr, sessions, log): asynchat.async_chat.__init__(self, conn=conn) self.addr = addr self.sessions = sessions self.ibuffer = [] self.obuffer = "" self.set_terminator("\r\n\r\n") self.reading_headers = True self.handling = False self.cgi_data = None self.log = log def collect_incoming_data(self, data): """Buffer the data""" self.ibuffer.append(data) def found_terminator(self): if self.reading_headers: self.reading_headers = False self.parse_headers("".join(self.ibuffer)) self.ibuffer = [] if self.op.upper() == "POST": clen = self.headers.getheader("content-length") self.set_terminator(int(clen)) else: self.handling = True self.set_terminator(None) self.handle_request() elif not self.handling: self.set_terminator(None) # browsers sometimes over-send self.cgi_data = parse(self.headers, "".join(self.ibuffer)) self.handling = True self.ibuffer = [] self.handle_request() \end{verbatim} Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.200 retrieving revision 1.200.4.1 diff -C2 -d -r1.200 -r1.200.4.1 *** lib.tex 18 Dec 2001 16:32:30 -0000 1.200 --- lib.tex 25 Sep 2003 18:25:51 -0000 1.200.4.1 *************** *** 217,220 **** --- 217,221 ---- \input{libsimplexmlrpc} \input{libasyncore} + \input{libasynchat} \input{netdata} % Internet Data Handling From rhettinger at users.sourceforge.net Thu Sep 25 23:07:59 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu Sep 25 23:08:02 2003 Subject: [Python-checkins] python/nondist/peps pep-0322.txt,1.2,1.3 Message-ID: <E1A2ixb-00007m-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv478 Modified Files: pep-0322.txt Log Message: Fix typos. Index: pep-0322.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0322.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pep-0322.txt 25 Sep 2003 16:18:28 -0000 1.2 --- pep-0322.txt 26 Sep 2003 03:07:56 -0000 1.3 *************** *** 16,20 **** This proposal is to extend the API of several sequence types ! to include methods for iterating over the sequence in reverse. --- 16,20 ---- This proposal is to extend the API of several sequence types ! to include a method for iterating over the sequence in reverse. *************** *** 182,186 **** - fallback to: ``for i in xrange(len(obj)-1,-1,-1): yield obj[i]`` ! - fallback to: ``for i in itertools.count(): yield[obj[-i]]`` - fallback to: ``tmp=list(obj); tmp.reverse(); return iter(tmp)`` --- 182,186 ---- - fallback to: ``for i in xrange(len(obj)-1,-1,-1): yield obj[i]`` ! - fallback to: ``for i in itertools.count(): yield obj[-i]`` - fallback to: ``tmp=list(obj); tmp.reverse(); return iter(tmp)`` From akuchling at users.sourceforge.net Fri Sep 26 09:45:20 2003 From: akuchling at users.sourceforge.net (akuchling@users.sourceforge.net) Date: Fri Sep 26 09:45:24 2003 Subject: [Python-checkins] python/dist/src/Doc/lib liblogging.tex,1.13,1.14 Message-ID: <E1A2suO-0003wT-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv15151 Modified Files: liblogging.tex Log Message: [Bug #812936] Correct the documentation for RotatingFileHandler. [2.3 bugfix candidate] Index: liblogging.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblogging.tex,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** liblogging.tex 1 Sep 2003 22:50:52 -0000 1.13 --- liblogging.tex 26 Sep 2003 13:45:18 -0000 1.14 *************** *** 500,516 **** specified file is opened and used as the stream for logging. If \var{mode} is not specified, \code{'a'} is used. By default, the ! file grows indefinitely. You can use the \var{maxBytes} and \var{backupCount} values to allow the file to \dfn{rollover} at a predetermined size. When the size is about to be exceeded, the file is ! closed and a new file opened for output, transparently to the ! caller. Rollover occurs whenever the current log file is nearly ! \var{maxBytes} in length. If \var{backupCount} is >= 1, the system ! will successively create new files with the same pathname as the base ! file, but with extensions ".1", ".2" etc. appended to it. For example, ! with a backupCount of 5 and a base file name of "app.log", you would ! get "app.log", "app.log.1", "app.log.2", ... through to ! "app.log.5". When the last file reaches its size limit, the logging ! reverts to "app.log" which is truncated to zero length. If ! \var{maxBytes} is zero, rollover never occurs. \end{classdesc} --- 500,520 ---- specified file is opened and used as the stream for logging. If \var{mode} is not specified, \code{'a'} is used. By default, the ! file grows indefinitely. ! ! You can use the \var{maxBytes} and \var{backupCount} values to allow the file to \dfn{rollover} at a predetermined size. When the size is about to be exceeded, the file is ! closed and a new file is silently opened for output. Rollover occurs ! whenever the current log file is nearly \var{maxBytes} in length; if ! \var{maxBytes} is zero, rollover never occurs. 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} From rhettinger at users.sourceforge.net Fri Sep 26 12:09:56 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 26 12:10:00 2003 Subject: [Python-checkins] python/nondist/peps pep-0322.txt,1.3,1.4 Message-ID: <E1A2vAK-0002vP-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv11227 Modified Files: pep-0322.txt Log Message: Rename the proposal to ireverse(). Index: pep-0322.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0322.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pep-0322.txt 26 Sep 2003 03:07:56 -0000 1.3 --- pep-0322.txt 26 Sep 2003 16:09:54 -0000 1.4 *************** *** 47,59 **** ======== ! Add a method called *iter_backwards()* to sequence objects that can benefit from it. The above examples then simplify to:: ! for i in xrange(n).iter_backwards(): print seqn[i] :: ! for elem in seqn.iter_backwards(): print elem --- 47,59 ---- ======== ! Add a method called *ireverse()* to sequence objects that can benefit from it. The above examples then simplify to:: ! for i in xrange(n).ireverse(): print seqn[i] :: ! for elem in seqn.ireverse(): print elem *************** *** 105,109 **** and clearer with:: ! for func, target, kargs in _exithandlers.iter_backwards(): . . . del _exithandlers --- 105,109 ---- and clearer with:: ! for func, target, kargs in _exithandlers.ireverse(): . . . del _exithandlers *************** *** 132,136 **** result.sort() ! return [x for score, x in result[-n:].iter_backwards()] * heapq.heapify() uses ``for i in xrange(n//2 - 1, -1, -1)`` because --- 132,136 ---- result.sort() ! return [x for score, x in result[-n:].ireverse()] * heapq.heapify() uses ``for i in xrange(n//2 - 1, -1, -1)`` because *************** *** 159,163 **** be run in a forward direction but is less intuitive and rarely presented that way in literature. The replacement code ! ``for i in xrange(1, len(x)).iter_backwards()`` is much easier to mentally verify. --- 159,163 ---- be run in a forward direction but is less intuitive and rarely presented that way in literature. The replacement code ! ``for i in xrange(1, len(x)).ireverse()`` is much easier to mentally verify. From anthonybaxter at users.sourceforge.net Fri Sep 26 12:47:18 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Fri Sep 26 12:47:21 2003 Subject: [Python-checkins] python/dist/src/Doc/dist sysconfig.tex, 1.1, 1.1.34.1 Message-ID: <E1A2vkU-0004oD-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/dist In directory sc8-pr-cvs1:/tmp/cvs-serv18468 Modified Files: Tag: release23-maint sysconfig.tex Log Message: backport Typo: sys.prefex -> sys.prefix Closes SF# 812152 Index: sysconfig.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/dist/sysconfig.tex,v retrieving revision 1.1 retrieving revision 1.1.34.1 diff -C2 -d -r1.1 -r1.1.34.1 *** sysconfig.tex 2 Aug 2001 15:12:07 -0000 1.1 --- sysconfig.tex 26 Sep 2003 16:47:16 -0000 1.1.34.1 *************** *** 25,33 **** \begin{datadesc}{PREFIX} ! The result of \code{os.path.normpath(sys.prefex)}. \end{datadesc} \begin{datadesc}{EXEC_PREFIX} ! The result of \code{os.path.normpath(sys.exec_prefex)}. \end{datadesc} --- 25,33 ---- \begin{datadesc}{PREFIX} ! The result of \code{os.path.normpath(sys.prefix)}. \end{datadesc} \begin{datadesc}{EXEC_PREFIX} ! The result of \code{os.path.normpath(sys.exec_prefix)}. \end{datadesc} From anthonybaxter at users.sourceforge.net Fri Sep 26 12:46:24 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Fri Sep 26 12:52:42 2003 Subject: [Python-checkins] python/dist/src/Doc/lib liblogging.tex, 1.12.8.1, 1.12.8.2 Message-ID: <E1A2vjc-0004l4-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv18265 Modified Files: Tag: release23-maint liblogging.tex Log Message: backport [Bug #812936] Correct the documentation for RotatingFileHandler. Index: liblogging.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblogging.tex,v retrieving revision 1.12.8.1 retrieving revision 1.12.8.2 diff -C2 -d -r1.12.8.1 -r1.12.8.2 *** liblogging.tex 1 Sep 2003 22:52:14 -0000 1.12.8.1 --- liblogging.tex 26 Sep 2003 16:46:22 -0000 1.12.8.2 *************** *** 500,516 **** specified file is opened and used as the stream for logging. If \var{mode} is not specified, \code{'a'} is used. By default, the ! file grows indefinitely. You can use the \var{maxBytes} and \var{backupCount} values to allow the file to \dfn{rollover} at a predetermined size. When the size is about to be exceeded, the file is ! closed and a new file opened for output, transparently to the ! caller. Rollover occurs whenever the current log file is nearly ! \var{maxBytes} in length. If \var{backupCount} is >= 1, the system ! will successively create new files with the same pathname as the base ! file, but with extensions ".1", ".2" etc. appended to it. For example, ! with a backupCount of 5 and a base file name of "app.log", you would ! get "app.log", "app.log.1", "app.log.2", ... through to ! "app.log.5". When the last file reaches its size limit, the logging ! reverts to "app.log" which is truncated to zero length. If ! \var{maxBytes} is zero, rollover never occurs. \end{classdesc} --- 500,520 ---- specified file is opened and used as the stream for logging. If \var{mode} is not specified, \code{'a'} is used. By default, the ! file grows indefinitely. ! ! You can use the \var{maxBytes} and \var{backupCount} values to allow the file to \dfn{rollover} at a predetermined size. When the size is about to be exceeded, the file is ! closed and a new file is silently opened for output. Rollover occurs ! whenever the current log file is nearly \var{maxBytes} in length; if ! \var{maxBytes} is zero, rollover never occurs. 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} From rhettinger at users.sourceforge.net Fri Sep 26 22:54:01 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri Sep 26 22:54:07 2003 Subject: [Python-checkins] python/nondist/peps pep-0008.txt, 1.19, 1.20 pep-0290.txt, 1.9, 1.10 Message-ID: <E1A35Dd-0001KZ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv4933 Modified Files: pep-0008.txt pep-0290.txt Log Message: * str.startwith() is less errorprone that slice comparisons but not as fast. * Fix minor typos. Index: pep-0008.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0008.txt,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** pep-0008.txt 22 Sep 2003 04:51:49 -0000 1.19 --- pep-0008.txt 27 Sep 2003 02:53:59 -0000 1.20 *************** *** 547,552 **** - Avoid slicing strings when checking for prefixes or suffixes. ! Use startswith() and endswith() instead, since they are faster, ! cleaner and less error prone. E.g.: No: if foo[:3] == 'bar': --- 547,552 ---- - Avoid slicing strings when checking for prefixes or suffixes. ! Use startswith() and endswith() instead, since they are ! cleaner and less error prone. For example: No: if foo[:3] == 'bar': Index: pep-0290.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0290.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pep-0290.txt 7 Mar 2003 00:21:42 -0000 1.9 --- pep-0290.txt 27 Sep 2003 02:53:59 -0000 1.10 *************** *** 121,125 **** In Python 2.3, apply() was marked for Pending Deprecation because it ! was made obsolete by the Python 1.6's introduction of * and ** in function calls. Using a direct function call was always a little faster than apply() because it saved the lookup for the builtin. --- 121,125 ---- In Python 2.3, apply() was marked for Pending Deprecation because it ! was made obsolete by Python 1.6's introduction of * and ** in function calls. Using a direct function call was always a little faster than apply() because it saved the lookup for the builtin. *************** *** 128,132 **** Pattern:: ! apply(f,args, kwds) --> f(*args, **kwds) --- 128,132 ---- Pattern:: ! apply(f, args, kwds) --> f(*args, **kwds) *************** *** 278,283 **** '''''''''''''''''''''''''''''''''''''''''''''' ! Use these string methods instead of slicing. They're faster because ! no slice has to be created, and there's no risk of miscounting. Pattern:: --- 278,283 ---- '''''''''''''''''''''''''''''''''''''''''''''' ! Use these string methods instead of slicing. No slice has to be ! created and there's no risk of miscounting. Pattern:: From anthonybaxter at users.sourceforge.net Sat Sep 27 01:05:49 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Sat Sep 27 01:05:54 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.52,1.831.4.53 Message-ID: <E1A37HB-0006MN-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv24386/Misc Modified Files: Tag: release23-maint NEWS Log Message: the release process, like a river, flows ever onwards Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.52 retrieving revision 1.831.4.53 diff -C2 -d -r1.831.4.52 -r1.831.4.53 *** NEWS 23 Sep 2003 08:00:34 -0000 1.831.4.52 --- NEWS 27 Sep 2003 05:05:47 -0000 1.831.4.53 *************** *** 5,8 **** --- 5,44 ---- (editors: check NEWS.help for information about editing NEWS using ReST.) + + What's New in Python 2.3.2? + =========================== + + *Release date: XX-XXX-XXXX* + + Core and builtins + ----------------- + + Extension modules + ----------------- + + Library + ------- + + IDLE + ---- + + Tools/Demos + ----------- + + Build + ----- + + - A bug in the autoconf machinery meant that os.fsync was never available. + + C API + ----- + + Windows + ------- + + Mac + --- + + What's New in Python 2.3.1? =========================== From fdrake at users.sourceforge.net Sat Sep 27 01:38:28 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 01:38:34 2003 Subject: [Python-checkins] python/dist/src/Doc/texinputs boilerplate.tex, 1.84.4.2, 1.84.4.3 Message-ID: <E1A37mm-0007j7-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory sc8-pr-cvs1:/tmp/cvs-serv29695 Modified Files: Tag: release23-maint boilerplate.tex Log Message: bump release info Index: boilerplate.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v retrieving revision 1.84.4.2 retrieving revision 1.84.4.3 diff -C2 -d -r1.84.4.2 -r1.84.4.3 *** boilerplate.tex 23 Sep 2003 05:23:25 -0000 1.84.4.2 --- boilerplate.tex 27 Sep 2003 05:38:26 -0000 1.84.4.3 *************** *** 6,11 **** } ! \date{September 23, 2003} % XXX update before final release! ! \release{2.3.1} % software release, not documentation ! \setreleaseinfo{} % empty for final release \setshortversion{2.3} % major.minor only for software --- 6,11 ---- } ! \date{\today} % XXX update before final release! ! \release{2.3.2} % software release, not documentation ! \setreleaseinfo{c1} % empty for final release \setshortversion{2.3} % major.minor only for software From rhettinger at users.sourceforge.net Sat Sep 27 01:42:16 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 27 01:42:20 2003 Subject: [Python-checkins] python/dist/src/Doc/tut glossary.tex,1.1,1.2 Message-ID: <E1A37qS-0007qC-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1:/tmp/cvs-serv30134 Modified Files: glossary.tex Log Message: Fix spelling and add markup. Index: glossary.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/glossary.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** glossary.tex 24 Sep 2003 16:51:23 -0000 1.1 --- glossary.tex 27 Sep 2003 05:42:14 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- %%% keep the entries sorted and include at least one \index{} item for each + %%% cross-references are marked with \emph{entry} \begin{description} *************** *** 14,18 **** \index{__slots__} ! \item[__slots__]{A declaration inside a new-style class that saves memory by pre-declaring space for instance attributes and eliminating instance dictionaries. Though popular, the technique is somewhat tricky to --- 15,19 ---- \index{__slots__} ! \item[__slots__]{A declaration inside a \emph{new-style class} that saves memory by pre-declaring space for instance attributes and eliminating instance dictionaries. Though popular, the technique is somewhat tricky to *************** *** 25,29 **** \index{byte code} ! \item[byte code]{The internal represenatation of a Python program in the interpreter. The byte code is also cached in the \code{.pyc} and {}\code{.pyo} files so that executing the same file is faster the second --- 26,30 ---- \index{byte code} ! \item[byte code]{The internal representation of a Python program in the interpreter. The byte code is also cached in the \code{.pyc} and {}\code{.pyo} files so that executing the same file is faster the second *************** *** 38,70 **** \index{coercion} \item[coercion]{Converting data from one type to another. For example, ! int(3.15) coerces the floating point number to the integer, 3. Most ! mathematical operations have rules for coercing their arguments to a common ! type. For instance, adding 3 + 4.5, causes the integer 3 to be coerced to ! be a float (3.0) before adding to 4.5 resulting in the float 7.5.} \index{descriptor} ! \item[descriptor]{Any object that defines the methods __get__(), __set__(), ! or __delete__(). When a class attribute is a descriptor, its special ! binding behavior is triggered upon attribute lookup. Normally, writing ! {}\var{a.b} looks up the object \var{b} in the class dictionary for \var{a}, ! but if \var{b} is a descriptor, the defined method gets called. ! Understanding descriptors is a key to a deep understanding of Python because ! they are the basis for many features including functions, ! methods,properties, class methods, static methods, and reference to super classes.} \index{dictionary} \item[dictionary]{An associative array, where arbitrary keys are mapped to ! values. The use of `dict` much resembles that for `list`, but the keys can ! be any object with a `__hash__` function, not just integers starting from ! zero. Called a hash in Perl.} \index{EAFP} \item[EAFP]{Easier to ask for forgiveness than permission. This common ! Python coding style assumes the existance of valid keys or attributes and catches exceptions if the assumption proves false. This clean and fast ! style is characterized by the presence of many `try` and `except` statments. ! The technique contrasts with the '''LBYL''' style that is common in many ! other languages such as C.} \index{__future__} --- 39,72 ---- \index{coercion} \item[coercion]{Converting data from one type to another. For example, ! {}\code{int(3.15)} coerces the floating point number to the integer, \code{3}. ! Most mathematical operations have rules for coercing their arguments to a common ! type. For instance, adding \code{3 + 4.5}, causes the integer \code{3} to be ! coerced to be a float \code{3.0} before adding to \code{4.5} resulting in the ! float \code{7.5}.} \index{descriptor} ! \item[descriptor]{Any object that defines the methods \method{__get__()}, ! \method{__set__()}, or \method{__delete__()}. When a class attribute is a ! descriptor, its special binding behavior is triggered upon attribute lookup. ! Normally, writing {}\var{a.b} looks up the object \var{b} in the class ! dictionary for \var{a}, but if \var{b} is a descriptor, the defined method ! gets called. Understanding descriptors is a key to a deep understanding of ! Python because they are the basis for many features including functions, ! methods, properties, class methods, static methods, and reference to super classes.} \index{dictionary} \item[dictionary]{An associative array, where arbitrary keys are mapped to ! values. The use of \class{dict} much resembles that for \class{list}, but ! the keys can be any object with a \function{__hash__} function, not just ! integers starting from zero. Called a hash in Perl.} \index{EAFP} \item[EAFP]{Easier to ask for forgiveness than permission. This common ! Python coding style assumes the existence of valid keys or attributes and catches exceptions if the assumption proves false. This clean and fast ! style is characterized by the presence of many \keyword{try} and ! {}\keyword{except} statements. The technique contrasts with the \emph{LBYL} ! style that is common in many other languages such as C.} \index{__future__} *************** *** 72,77 **** new language features which are not compatible with the current interpreter. For example, the expression \code{11 / 4} currently evaluates to \code{2}. ! If the module in which it is executed had enabled ``true division`` by ! executing} \begin{verbatim} --- 74,79 ---- new language features which are not compatible with the current interpreter. For example, the expression \code{11 / 4} currently evaluates to \code{2}. ! If the module in which it is executed had enabled emph{true division} by ! executing:} \begin{verbatim} *************** *** 80,86 **** the expression \code{11 / 4} would evaluate to \code{2.75}. By actually ! importing the __future__ module and evaluating its variables, you can see ! when a new feature was first added to the language and when it will becode ! the default: \begin{verbatim} --- 82,88 ---- the expression \code{11 / 4} would evaluate to \code{2.75}. By actually ! importing the \module{__future__} module and evaluating its variables, you ! can see when a new feature was first added to the language and when it will ! become the default: \begin{verbatim} *************** *** 100,104 **** \index{GIL} ! \item[GIL]{See \em{global interpreter lock}.} \index{global interpreter lock} --- 102,106 ---- \index{GIL} ! \item[GIL]{See \emph{global interpreter lock}.} \index{global interpreter lock} *************** *** 114,120 **** \index{IDLE} \item[IDLE]{an Integrated Development Environment for Python. IDLE is a ! basic editor and intepreter environment that ships with the standard ! distribution of Python. Good for beginners and those on a budget, it also ! serves as clear example code for those wanting to implement a moderately sophisticated, multi-platform GUI application.} --- 116,122 ---- \index{IDLE} \item[IDLE]{an Integrated Development Environment for Python. IDLE is a ! basic editor and interpreter environment that ships with the standard ! distribution of Python. Good for beginners, it also serves as clear ! example code for those wanting to implement a moderately sophisticated, multi-platform GUI application.} *************** *** 128,140 **** \index{integer division} \item[integer division]{Mathematical division discarding any remainder. For ! example, the expression \code{11 / 4} currently evaluates to 2 in contrast ! to the 2.75 returned by float division. Also called "floor division". When ! dividing two integers the outcome will always be another integer (having the ! floor function applied to it). However, if one of the operands is another ! numeric type (such as a float), the result will be coerced (see coercion) to ! a common type. For example, a integer divided by a float will result in a ! float value, possibly with a decimal fraction. Integer division can be ! forced by using the \code{//} operator instead of the \code{/} operator. ! See also, __future__.} \index{interactive} --- 130,143 ---- \index{integer division} \item[integer division]{Mathematical division discarding any remainder. For ! example, the expression \code{11 / 4} currently evaluates to \code{2} in ! contrast to the \code{2.75} returned by float division. Also called ! \emph{floor division}. When dividing two integers the outcome will always be ! another integer (having the floor function applied to it). However, if one ! of the operands is another numeric type (such as a \class{float}), the result ! will be coerced (see \emph{coercion}) to a common type. For example, a integer ! divided by a float will result in a float value, possibly with a decimal ! fraction. Integer division can be forced by using the \code{//} operator ! instead of the \code{/} operator. ! See also, \emph{__future__}.} \index{interactive} *************** *** 148,161 **** \item[interpreted]{Python is an interpreted language, opposed to a compiled one. This means that the source files can be run right away without first ! making an executable which is then run. Interpreted languages typicaly have a shorter development/debug cycle than compiled ones. See also ! {}\em{interactive}.} \index{iterable} \item[iterable]{A container object capable of returning its members one at a ! time. Examples of iterables include all sequence types (\class{list}, ! {}\class{str}, \class{tuple}, etc.) and some non-sequence types like {}\class{dict} and \class{file} and objects of any classes you define with ! an \function{__iter__} or \function{__getitem__} method. Iterables can be used in a \keyword{for} loop and in many other places where a sequence is needed (\function{zip}, \function{map}, ...). When an iterable object is --- 151,164 ---- \item[interpreted]{Python is an interpreted language, opposed to a compiled one. This means that the source files can be run right away without first ! making an executable which is then run. Interpreted languages typically have a shorter development/debug cycle than compiled ones. See also ! {}\emph{interactive}.} \index{iterable} \item[iterable]{A container object capable of returning its members one at a ! time. Examples of iterables include all sequence types (such as\class{list}, ! {}\class{str}, and \class{tuple}) and some non-sequence types like {}\class{dict} and \class{file} and objects of any classes you define with ! an \method{__iter__} or \function{__getitem__} method. Iterables can be used in a \keyword{for} loop and in many other places where a sequence is needed (\function{zip}, \function{map}, ...). When an iterable object is *************** *** 166,170 **** statement does that automatically for you, creating a temporary unnamed variable to hold the iterator for the duration of the loop. See also ! iterator, sequence and generator.} \index{iterator} --- 169,173 ---- statement does that automatically for you, creating a temporary unnamed variable to hold the iterator for the duration of the loop. See also ! \emph{iterator}, \emph{sequence} and \emph{generator}.} \index{iterator} *************** *** 172,176 **** the iterator's \function{next()} method return successive items in the stream. When no more data is available a \exception{StopIteration} ! exception is raised instead. At this point the iterator object is exhausted and any further calls to its \function{next()} method just raise {}\exception{StopIteration} again. Iterators are required to have an --- 175,179 ---- the iterator's \function{next()} method return successive items in the stream. When no more data is available a \exception{StopIteration} ! exception is raised instead. At this point, the iterator object is exhausted and any further calls to its \function{next()} method just raise {}\exception{StopIteration} again. Iterators are required to have an *************** *** 178,186 **** every iterator is also iterable and may be used in most places where other iterables are accepted. One notable exception is code that attempts ! multiple iteration passes. A container object (such as a list) produces a ! fresh new iterator each time you pass it to the \function{iter()} function ! or use it in a \function{for} loop. Attempting this with an iterator will ! just return the same exhausted iterator object from the second iteration ! pass and on, making it appear like an empty container.} \index{list comprehension} --- 181,189 ---- every iterator is also iterable and may be used in most places where other iterables are accepted. One notable exception is code that attempts ! multiple iteration passes. A container object (such as a \class{list}) ! produces a fresh new iterator each time you pass it to the \function{iter()} ! function or use it in a \function{for} loop. Attempting this with an iterator ! will just return the same exhausted iterator object from the second iteration ! pass, making it appear like an empty container.} \index{list comprehension} *************** *** 210,215 **** \item[LBYL]{Look before you leap. This coding style explicitly tests for pre-conditions before making calls or lookups. This style contrasts with ! the EAFP approach and is characterized the presence of many \keyword{if} ! statements.} \index{mutable} --- 213,218 ---- \item[LBYL]{Look before you leap. This coding style explicitly tests for pre-conditions before making calls or lookups. This style contrasts with ! the \emph{EAFP} approach and is characterized the presence of many ! {}\keyword{if} statements.} \index{mutable} *************** *** 224,228 **** functions \function{__builtins__.open()} and \function{os.open()} are distinguished by their namespaces. Namespaces also aid readability and ! maintainabilty by making it clear which modules implement a function. For instance, writing \function{random.seed()} or \function{itertools.izip()} makes it clear that those functions are implemented by the \module{random} --- 227,231 ---- functions \function{__builtins__.open()} and \function{os.open()} are distinguished by their namespaces. Namespaces also aid readability and ! maintainability by making it clear which modules implement a function. For instance, writing \function{random.seed()} or \function{itertools.izip()} makes it clear that those functions are implemented by the \module{random} *************** *** 240,245 **** \index{new-style class} \item[new-style class]{Any class that inherits from \class{object}. This ! includes all built-in types like \class{list} and \class{dict}. Only new ! style classes can use Python's newer, versatile features like {}\var{__slots__}, descriptors, properties, \var{__getattribute__}, class methods, and static methods.} --- 243,248 ---- \index{new-style class} \item[new-style class]{Any class that inherits from \class{object}. This ! includes all built-in types like \class{list} and \class{dict}. Only ! new-style classes can use Python's newer, versatile features like {}\var{__slots__}, descriptors, properties, \var{__getattribute__}, class methods, and static methods.} *************** *** 250,259 **** \index{sequence} ! \item[sequence]{An iterable which supports efficient element access using integer indices via the \function{__getitem__} and \function{__len()__} special methods. Some builtin sequence types are \class{list}, \class{str}, {}\class{tuple}, and \class{unicode}. Note that \class{dict} also supports {}\function{__getitem__} and \function{__len__}, but is considered a mapping ! rather than a sequence because the lookups use arbitrary immutable keys rather than integers.} --- 253,262 ---- \index{sequence} ! \item[sequence]{An \emph{iterable} which supports efficient element access using integer indices via the \function{__getitem__} and \function{__len()__} special methods. Some builtin sequence types are \class{list}, \class{str}, {}\class{tuple}, and \class{unicode}. Note that \class{dict} also supports {}\function{__getitem__} and \function{__len__}, but is considered a mapping ! rather than a sequence because the lookups use arbitrary \emph{immutable} keys rather than integers.} *************** *** 261,265 **** \item[Zen of Python]{listing of Python design principles and philosophies that are helpful in understanding and using the language. The listing can ! be found by typing "import this" at the interactive prompt.} \end{description} --- 264,268 ---- \item[Zen of Python]{listing of Python design principles and philosophies that are helpful in understanding and using the language. The listing can ! be found by typing \code{import this} at the interactive prompt.} \end{description} From fdrake at users.sourceforge.net Sat Sep 27 01:52:19 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 01:52:22 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.265,1.266 Message-ID: <E1A380B-00087V-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv31209 Modified Files: Makefile Log Message: Fix the most recent change to the invocation of the mkhowto script so that it works for all targets. The issue here is that there are two different levels in the directory tree at which we execute mkhowto, so we can't define it just once using a relative path (at least not with the current implementation and Makefile structure). We use the GNUish $(shell) function here to work around that restriction by identifying mkhowto using an absolute path. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.265 retrieving revision 1.266 diff -C2 -d -r1.265 -r1.266 *** Makefile 25 Sep 2003 15:25:37 -0000 1.265 --- Makefile 27 Sep 2003 05:52:16 -0000 1.266 *************** *** 72,76 **** DVIPS= dvips -N0 -t $(PAPER) ! MKHOWTO= $(PYTHON) ../tools/mkhowto MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi --- 72,83 ---- DVIPS= dvips -N0 -t $(PAPER) ! # This is ugly! The issue here is that there are two different levels ! # in the directory tree at which we execute mkhowto, so we can't ! # define it just once using a relative path (at least not with the ! # current implementation and Makefile structure). We use the GNUish ! # $(shell) function here to work around that restriction by ! # identifying mkhowto using an absolute path. ! # ! MKHOWTO= $(PYTHON) $(shell pwd)/tools/mkhowto MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi From fdrake at users.sourceforge.net Sat Sep 27 02:01:38 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 02:01:41 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.261.4.2,1.261.4.3 Message-ID: <E1A389C-0008PT-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv32322 Modified Files: Tag: release23-maint Makefile Log Message: - bump version info - backport changes from trunk revisions 1.265, 1.266 (separate definition of the mkhowto script location from the invocations of the script) Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.261.4.2 retrieving revision 1.261.4.3 diff -C2 -d -r1.261.4.2 -r1.261.4.3 *** Makefile 23 Sep 2003 05:25:09 -0000 1.261.4.2 --- Makefile 27 Sep 2003 06:01:35 -0000 1.261.4.3 *************** *** 67,88 **** # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.3.1 PYTHON= python DVIPS= dvips -N0 -t $(PAPER) ! MKDVI= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --dvi ! MKHTML= $(PYTHON) tools/mkhowto --html --about html/stdabout.dat \ --iconserver ../icons --favicon ../icons/pyfav.gif \ --address $(PYTHONDOCS) --up-link ../index.html \ --up-title "Python Documentation Index" \ --global-module-index "../modindex.html" --dvips-safe ! MKISILOHTML=$(PYTHON) tools/mkhowto --html --about html/stdabout.dat \ --iconserver ../icons \ --l2h-init perl/isilo.perl --numeric --split 1 \ --dvips-safe MKISILO= iSilo386 -U -y -rCR -d0 ! MKPDF= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --pdf ! MKPS= $(PYTHON) ../tools/mkhowto --paper=$(PAPER) --ps BUILDINDEX=$(TOOLSDIR)/buildindex.py --- 67,97 ---- # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.3.2c1 PYTHON= python DVIPS= dvips -N0 -t $(PAPER) ! # This is ugly! The issue here is that there are two different levels ! # in the directory tree at which we execute mkhowto, so we can't ! # define it just once using a relative path (at least not with the ! # current implementation and Makefile structure). We use the GNUish ! # $(shell) function here to work around that restriction by ! # identifying mkhowto using an absolute path. ! # ! MKHOWTO= $(PYTHON) $(shell pwd)/tools/mkhowto ! ! MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi ! MKHTML= $(MKHOWTO) --html --about html/stdabout.dat \ --iconserver ../icons --favicon ../icons/pyfav.gif \ --address $(PYTHONDOCS) --up-link ../index.html \ --up-title "Python Documentation Index" \ --global-module-index "../modindex.html" --dvips-safe ! MKISILOHTML=$(MKHOWTO) --html --about html/stdabout.dat \ --iconserver ../icons \ --l2h-init perl/isilo.perl --numeric --split 1 \ --dvips-safe MKISILO= iSilo386 -U -y -rCR -d0 ! MKPDF= $(MKHOWTO) --paper=$(PAPER) --pdf ! MKPS= $(MKHOWTO) --paper=$(PAPER) --ps BUILDINDEX=$(TOOLSDIR)/buildindex.py From fdrake at users.sourceforge.net Sat Sep 27 03:05:15 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:05:18 2003 Subject: [Python-checkins] python/dist/src/Doc/tools mkhowto,1.39,1.40 Message-ID: <E1A398l-00022s-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv7856 Modified Files: mkhowto Log Message: - use string methods - make TEXINPUTS work the way it's supposed to in TeX-ish tools Index: mkhowto =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** mkhowto 14 May 2003 04:16:14 -0000 1.39 --- mkhowto 27 Sep 2003 07:05:12 -0000 1.40 *************** *** 44,48 **** import re import shutil - import string import sys --- 44,47 ---- *************** *** 244,254 **** self.formats = self.DEFAULT_FORMATS # determine the base set of texinputs directories: ! texinputs = string.split(os.environ.get("TEXINPUTS", ""), os.pathsep) if not texinputs: texinputs = [''] ! self.base_texinputs = [ ! os.path.join(TOPDIR, "paper-" + self.paper), ! os.path.join(TOPDIR, "texinputs"), ! ] + texinputs if self.builddir: self.builddir = os.path.abspath(self.builddir) --- 243,258 ---- self.formats = self.DEFAULT_FORMATS # determine the base set of texinputs directories: ! texinputs = os.environ.get("TEXINPUTS", "").split(os.pathsep) if not texinputs: texinputs = [''] ! mydirs = [os.path.join(TOPDIR, "paper-" + self.paper), ! os.path.join(TOPDIR, "texinputs"), ! ] ! if '' in texinputs: ! i = texinputs.index('') ! texinputs[i:i] = mydirs ! else: ! texinputs += mydirs ! self.base_texinputs = texinputs if self.builddir: self.builddir = os.path.abspath(self.builddir) *************** *** 321,326 **** def setup_texinputs(self): ! texinputs = [self.filedir] + list(self.options.base_texinputs) ! os.environ["TEXINPUTS"] = string.join(texinputs, os.pathsep) self.message("TEXINPUTS=" + os.environ["TEXINPUTS"]) --- 325,330 ---- def setup_texinputs(self): ! texinputs = [self.filedir] + self.options.base_texinputs ! os.environ["TEXINPUTS"] = os.pathsep.join(texinputs) self.message("TEXINPUTS=" + os.environ["TEXINPUTS"]) *************** *** 392,396 **** max_split_depth = self.options.max_split_depth texfile = None ! for p in string.split(os.environ["TEXINPUTS"], os.pathsep): fn = os.path.join(p, self.doc + ".tex") if os.path.isfile(fn): --- 396,400 ---- max_split_depth = self.options.max_split_depth texfile = None ! for p in os.environ["TEXINPUTS"].split(os.pathsep): fn = os.path.join(p, self.doc + ".tex") if os.path.isfile(fn): *************** *** 414,418 **** texfile ] ! self.run(string.join(args)) # XXX need quoting! # ... postprocess shutil.copyfile(self.options.style_file, --- 418,422 ---- texfile ] ! self.run(" ".join(args)) # XXX need quoting! # ... postprocess shutil.copyfile(self.options.style_file, *************** *** 637,646 **** def string_to_perl(s): ! return string.join(map(_to_perl.get, s), '') def check_for_bibtex(filename): fp = open(filename) ! pos = string.find(fp.read(), r"\bibdata{") fp.close() return pos >= 0 --- 641,650 ---- def string_to_perl(s): ! return ''.join(map(_to_perl.get, s)) def check_for_bibtex(filename): fp = open(filename) ! pos = fp.read().find(r"\bibdata{") fp.close() return pos >= 0 From fdrake at users.sourceforge.net Sat Sep 27 03:05:46 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:05:49 2003 Subject: [Python-checkins] python/dist/src/Doc/tools mkhowto,1.39,1.39.10.1 Message-ID: <E1A399G-00023u-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv7924 Modified Files: Tag: release23-maint mkhowto Log Message: - use string methods - make TEXINPUTS work the way it's supposed to in TeX-ish tools Index: mkhowto =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v retrieving revision 1.39 retrieving revision 1.39.10.1 diff -C2 -d -r1.39 -r1.39.10.1 *** mkhowto 14 May 2003 04:16:14 -0000 1.39 --- mkhowto 27 Sep 2003 07:05:44 -0000 1.39.10.1 *************** *** 44,48 **** import re import shutil - import string import sys --- 44,47 ---- *************** *** 244,254 **** self.formats = self.DEFAULT_FORMATS # determine the base set of texinputs directories: ! texinputs = string.split(os.environ.get("TEXINPUTS", ""), os.pathsep) if not texinputs: texinputs = [''] ! self.base_texinputs = [ ! os.path.join(TOPDIR, "paper-" + self.paper), ! os.path.join(TOPDIR, "texinputs"), ! ] + texinputs if self.builddir: self.builddir = os.path.abspath(self.builddir) --- 243,258 ---- self.formats = self.DEFAULT_FORMATS # determine the base set of texinputs directories: ! texinputs = os.environ.get("TEXINPUTS", "").split(os.pathsep) if not texinputs: texinputs = [''] ! mydirs = [os.path.join(TOPDIR, "paper-" + self.paper), ! os.path.join(TOPDIR, "texinputs"), ! ] ! if '' in texinputs: ! i = texinputs.index('') ! texinputs[i:i] = mydirs ! else: ! texinputs += mydirs ! self.base_texinputs = texinputs if self.builddir: self.builddir = os.path.abspath(self.builddir) *************** *** 321,326 **** def setup_texinputs(self): ! texinputs = [self.filedir] + list(self.options.base_texinputs) ! os.environ["TEXINPUTS"] = string.join(texinputs, os.pathsep) self.message("TEXINPUTS=" + os.environ["TEXINPUTS"]) --- 325,331 ---- def setup_texinputs(self): ! texinputs = [self.filedir] + self.options.base_texinputs ! texinputs = os.pathsep.join(texinputs) ! os.environ["TEXINPUTS"] = texinputs self.message("TEXINPUTS=" + os.environ["TEXINPUTS"]) *************** *** 392,396 **** max_split_depth = self.options.max_split_depth texfile = None ! for p in string.split(os.environ["TEXINPUTS"], os.pathsep): fn = os.path.join(p, self.doc + ".tex") if os.path.isfile(fn): --- 397,401 ---- max_split_depth = self.options.max_split_depth texfile = None ! for p in os.environ["TEXINPUTS"].split(os.pathsep): fn = os.path.join(p, self.doc + ".tex") if os.path.isfile(fn): *************** *** 414,418 **** texfile ] ! self.run(string.join(args)) # XXX need quoting! # ... postprocess shutil.copyfile(self.options.style_file, --- 419,423 ---- texfile ] ! self.run(" ".join(args)) # XXX need quoting! # ... postprocess shutil.copyfile(self.options.style_file, *************** *** 637,646 **** def string_to_perl(s): ! return string.join(map(_to_perl.get, s), '') def check_for_bibtex(filename): fp = open(filename) ! pos = string.find(fp.read(), r"\bibdata{") fp.close() return pos >= 0 --- 642,651 ---- def string_to_perl(s): ! return "".join(map(_to_perl.get, s)) def check_for_bibtex(filename): fp = open(filename) ! pos = fp.read().find(r"\bibdata{") fp.close() return pos >= 0 From fdrake at users.sourceforge.net Sat Sep 27 03:06:20 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:06:23 2003 Subject: [Python-checkins] python/dist/src/Doc/commontex - New directory Message-ID: <E1A399o-00025F-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/commontex In directory sc8-pr-cvs1:/tmp/cvs-serv8003/commontex Log Message: Directory /cvsroot/python/python/dist/src/Doc/commontex added to the repository From fdrake at users.sourceforge.net Sat Sep 27 03:11:18 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:11:21 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile, 1.266, 1.267 Makefile.deps, 1.112, 1.113 Message-ID: <E1A39Ec-0002Fi-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv8642 Modified Files: Makefile Makefile.deps Log Message: Move content input files shared among the documents into a new directory (commontex/), leaving only style support files in texinputs/. This makes texinputs/ part of the formatting tools while commontex/ is strictly part of the actual documentation. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.266 retrieving revision 1.267 diff -C2 -d -r1.266 -r1.267 *** Makefile 27 Sep 2003 05:52:16 -0000 1.266 --- Makefile 27 Sep 2003 07:11:15 -0000 1.267 *************** *** 72,75 **** --- 72,82 ---- DVIPS= dvips -N0 -t $(PAPER) + PWD=$(shell pwd) + + # (The trailing colon in the value is needed; TeX places it's default + # set of paths at the location of the empty string in the path list.) + # + TEXINPUTS=$(PWD)/commontex: + # This is ugly! The issue here is that there are two different levels # in the directory tree at which we execute mkhowto, so we can't *************** *** 79,83 **** # identifying mkhowto using an absolute path. # ! MKHOWTO= $(PYTHON) $(shell pwd)/tools/mkhowto MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi --- 86,90 ---- # identifying mkhowto using an absolute path. # ! MKHOWTO= TEXINPUTS=$(TEXINPUTS) $(PYTHON) $(PWD)/tools/mkhowto MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** Makefile.deps 24 Sep 2003 16:53:02 -0000 1.112 --- Makefile.deps 27 Sep 2003 07:11:16 -0000 1.113 *************** *** 6,12 **** INDEXSTYLES=texinputs/python.ist ! COMMONTEX= texinputs/copyright.tex \ ! texinputs/license.tex \ ! texinputs/boilerplate.tex MANSTYLES= texinputs/fncychap.sty \ --- 6,12 ---- INDEXSTYLES=texinputs/python.ist ! COMMONTEX=commontex/copyright.tex \ ! commontex/license.tex \ ! commontex/boilerplate.tex MANSTYLES= texinputs/fncychap.sty \ *************** *** 30,35 **** api/utilities.tex \ api/veryhigh.tex \ ! texinputs/typestruct.h \ ! texinputs/reportingbugs.tex # These files are generated from those listed above, and are used to --- 30,35 ---- api/utilities.tex \ api/veryhigh.tex \ ! commontex/typestruct.h \ ! commontex/reportingbugs.tex # These files are generated from those listed above, and are used to *************** *** 48,55 **** paper-$(PAPER)/utilities.tex \ paper-$(PAPER)/veryhigh.tex \ ! texinputs/reportingbugs.tex DOCFILES= $(HOWTOSTYLES) \ ! texinputs/boilerplate.tex \ texinputs/ltxmarkup.sty \ doc/doc.tex --- 48,55 ---- paper-$(PAPER)/utilities.tex \ paper-$(PAPER)/veryhigh.tex \ ! commontex/reportingbugs.tex DOCFILES= $(HOWTOSTYLES) \ ! commontex/boilerplate.tex \ texinputs/ltxmarkup.sty \ doc/doc.tex *************** *** 66,71 **** ext/noddy4.c \ ext/run-func.c \ ! texinputs/typestruct.h \ ! texinputs/reportingbugs.tex TUTFILES= tut/tut.tex tut/glossary.tex $(MANSTYLES) $(COMMONTEX) --- 66,71 ---- ext/noddy4.c \ ext/run-func.c \ ! commontex/typestruct.h \ ! commontex/reportingbugs.tex TUTFILES= tut/tut.tex tut/glossary.tex $(MANSTYLES) $(COMMONTEX) *************** *** 85,89 **** # LaTeX source files for the Python Library Reference LIBFILES= $(MANSTYLES) $(INDEXSTYLES) $(COMMONTEX) \ ! texinputs/reportingbugs.tex \ lib/lib.tex \ lib/asttable.tex \ --- 85,89 ---- # LaTeX source files for the Python Library Reference LIBFILES= $(MANSTYLES) $(INDEXSTYLES) $(COMMONTEX) \ ! commontex/reportingbugs.tex \ lib/lib.tex \ lib/asttable.tex \ From fdrake at users.sourceforge.net Sat Sep 27 03:11:19 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:11:27 2003 Subject: [Python-checkins] python/dist/src/Doc/commontex boilerplate.tex, NONE, 1.1 copyright.tex, NONE, 1.1 license.tex, NONE, 1.1 reportingbugs.tex, NONE, 1.1 typestruct.h, NONE, 1.1 Message-ID: <E1A39Ed-0002Fp-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/commontex In directory sc8-pr-cvs1:/tmp/cvs-serv8642/commontex Added Files: boilerplate.tex copyright.tex license.tex reportingbugs.tex typestruct.h Log Message: Move content input files shared among the documents into a new directory (commontex/), leaving only style support files in texinputs/. This makes texinputs/ part of the formatting tools while commontex/ is strictly part of the actual documentation. --- NEW FILE: boilerplate.tex --- \author{Guido van Rossum\\ Fred L. Drake, Jr., editor} \authoraddress{ \strong{PythonLabs}\\ Email: \email{docs@python.org} } \date{\today} % XXX update before final release! \release{2.4} % software release, not documentation \setreleaseinfo{a0} % empty for final release \setshortversion{2.4} % major.minor only for software --- NEW FILE: copyright.tex --- Copyright \copyright{} 2001, 2002, 2003 Python Software Foundation. All rights reserved. Copyright \copyright{} 2000 BeOpen.com. All rights reserved. Copyright \copyright{} 1995-2000 Corporation for National Research Initiatives. All rights reserved. Copyright \copyright{} 1991-1995 Stichting Mathematisch Centrum. All rights reserved. See the end of this document for complete license and permissions information. --- NEW FILE: license.tex --- \section{History of the software} Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see \url{http://www.cwi.nl/}) in the Netherlands as a successor of a language called ABC. Guido remains Python's principal author, although it includes many contributions from others. In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see \url{http://www.cnri.reston.va.us/}) in Reston, Virginia where he released several versions of the software. In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation; see \url{http://www.zope.com/}). In 2001, the Python Software Foundation (PSF, see \url{http://www.python.org/psf/}) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF. All Python releases are Open Source (see \url{http://www.opensource.org/} for the Open Source Definition). Historically, most, but not all, Python releases have also been GPL-compatible; the table below summarizes the various releases. \begin{tablev}{c|c|c|c|c}{textrm}% {Release}{Derived from}{Year}{Owner}{GPL compatible?} \linev{0.9.0 thru 1.2}{n/a}{1991-1995}{CWI}{yes} \linev{1.3 thru 1.5.2}{1.2}{1995-1999}{CNRI}{yes} \linev{1.6}{1.5.2}{2000}{CNRI}{no} \linev{2.0}{1.6}{2000}{BeOpen.com}{no} \linev{1.6.1}{1.6}{2001}{CNRI}{no} \linev{2.1}{2.0+1.6.1}{2001}{PSF}{no} \linev{2.0.1}{2.0+1.6.1}{2001}{PSF}{yes} \linev{2.1.1}{2.1+2.0.1}{2001}{PSF}{yes} \linev{2.2}{2.1.1}{2001}{PSF}{yes} \linev{2.1.2}{2.1.1}{2002}{PSF}{yes} \linev{2.1.3}{2.1.2}{2002}{PSF}{yes} \linev{2.2.1}{2.2}{2002}{PSF}{yes} \linev{2.2.2}{2.2.1}{2002}{PSF}{yes} \linev{2.2.3}{2.2.2}{2002-2003}{PSF}{yes} \linev{2.3}{2.2.2}{2002-2003}{PSF}{yes} \linev{2.3.1}{2.3}{2002-2003}{PSF}{yes} \linev{2.3.2}{2.3.1}{2003}{PSF}{yes} \end{tablev} \note{GPL-compatible doesn't mean that we're distributing Python under the GPL. All Python licenses, unlike the GPL, let you distribute a modified version without making your changes open source. The GPL-compatible licenses make it possible to combine Python with other software that is released under the GPL; the others don't.} Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible. \section{Terms and conditions for accessing or otherwise using Python} \centerline{\strong{PSF LICENSE AGREEMENT FOR PYTHON \version}} \begin{enumerate} \item This LICENSE AGREEMENT is between the Python Software Foundation (``PSF''), and the Individual or Organization (``Licensee'') accessing and otherwise using Python \version{} software in source or binary form and its associated documentation. \item Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python \version{} alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., ``Copyright \copyright{} 2001-2003 Python Software Foundation; All Rights Reserved'' are retained in Python \version{} alone or in any derivative version prepared by Licensee. \item In the event Licensee prepares a derivative work that is based on or incorporates Python \version{} or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python \version. \item PSF is making Python \version{} available to Licensee on an ``AS IS'' basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON \version{} WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. \item PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON \version{} FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON \version, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. \item This License Agreement will automatically terminate upon a material breach of its terms and conditions. \item Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. \item By copying, installing or otherwise using Python \version, Licensee agrees to be bound by the terms and conditions of this License Agreement. \end{enumerate} \centerline{\strong{BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0}} \centerline{\strong{BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1}} \begin{enumerate} \item This LICENSE AGREEMENT is between BeOpen.com (``BeOpen''), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization (``Licensee'') accessing and otherwise using this software in source or binary form and its associated documentation (``the Software''). \item Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee. \item BeOpen is making the Software available to Licensee on an ``AS IS'' basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. \item BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. \item This License Agreement will automatically terminate upon a material breach of its terms and conditions. \item This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the ``BeOpen Python'' logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page. \item By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement. \end{enumerate} \centerline{\strong{CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1}} \begin{enumerate} \item This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 (``CNRI''), and the Individual or Organization (``Licensee'') accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation. \item Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., ``Copyright \copyright{} 1995-2001 Corporation for National Research Initiatives; All Rights Reserved'' are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): ``Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: \url{http://hdl.handle.net/1895.22/1013}.'' \item In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1. \item CNRI is making Python 1.6.1 available to Licensee on an ``AS IS'' basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. \item CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. \item This License Agreement will automatically terminate upon a material breach of its terms and conditions. \item This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. \item By clicking on the ``ACCEPT'' button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement. \end{enumerate} \centerline{ACCEPT} \centerline{\strong{CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2}} Copyright \copyright{} 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- NEW FILE: reportingbugs.tex --- \label{reporting-bugs} Python is a mature programming language which has established a reputation for stability. In order to maintain this reputation, the developers would like to know of any deficiencies you find in Python or its documentation. Before submitting a report, you will be required to log into SourceForge; this will make it possible for the developers to contact you for additional information if needed. It is not possible to submit a bug report anonymously. All bug reports should be submitted via the Python Bug Tracker on SourceForge (\url{http://sourceforge.net/bugs/?group_id=5470}). The bug tracker offers a Web form which allows pertinent information to be entered and submitted to the developers. The first step in filing a report is to determine whether the problem has already been reported. The advantage in doing so, aside from saving the developers time, is that you learn what has been done to fix it; it may be that the problem has already been fixed for the next release, or additional information is needed (in which case you are welcome to provide it if you can!). To do this, search the bug database using the search box near the bottom of the page. If the problem you're reporting is not already in the bug tracker, go back to the Python Bug Tracker (\url{http://sourceforge.net/bugs/?group_id=5470}). Select the ``Submit a Bug'' link at the top of the page to open the bug reporting form. The submission form has a number of fields. The only fields that are required are the ``Summary'' and ``Details'' fields. For the summary, enter a \emph{very} short description of the problem; less than ten words is good. In the Details field, describe the problem in detail, including what you expected to happen and what did happen. Be sure to include the version of Python you used, whether any extension modules were involved, and what hardware and software platform you were using (including version information as appropriate). The only other field that you may want to set is the ``Category'' field, which allows you to place the bug report into a broad category (such as ``Documentation'' or ``Library''). Each bug report will be assigned to a developer who will determine what needs to be done to correct the problem. You will receive an update each time action is taken on the bug. \begin{seealso} \seetitle[http://www-mice.cs.ucl.ac.uk/multimedia/software/documentation/ReportingBugs.html]{How to Report Bugs Effectively}{Article which goes into some detail about how to create a useful bug report. This describes what kind of information is useful and why it is useful.} \seetitle[http://www.mozilla.org/quality/bug-writing-guidelines.html]{Bug Writing Guidelines}{Information about writing a good bug report. Some of this is specific to the Mozilla project, but describes general good practices.} \end{seealso} --- NEW FILE: typestruct.h --- typedef struct _typeobject { PyObject_VAR_HEAD char *tp_name; /* For printing, in format "<module>.<name>" */ int tp_basicsize, tp_itemsize; /* For allocation */ /* Methods to implement standard operations */ destructor tp_dealloc; printfunc tp_print; getattrfunc tp_getattr; setattrfunc tp_setattr; cmpfunc tp_compare; reprfunc tp_repr; /* Method suites for standard classes */ PyNumberMethods *tp_as_number; PySequenceMethods *tp_as_sequence; PyMappingMethods *tp_as_mapping; /* More standard operations (here for binary compatibility) */ hashfunc tp_hash; ternaryfunc tp_call; reprfunc tp_str; getattrofunc tp_getattro; setattrofunc tp_setattro; /* Functions to access object as input/output buffer */ PyBufferProcs *tp_as_buffer; /* Flags to define presence of optional/expanded features */ long tp_flags; char *tp_doc; /* Documentation string */ /* Assigned meaning in release 2.0 */ /* call function for all accessible objects */ traverseproc tp_traverse; /* delete references to contained objects */ inquiry tp_clear; /* Assigned meaning in release 2.1 */ /* rich comparisons */ richcmpfunc tp_richcompare; /* weak reference enabler */ long tp_weaklistoffset; /* Added in release 2.2 */ /* Iterators */ getiterfunc tp_iter; iternextfunc tp_iternext; /* Attribute descriptor and subclassing stuff */ struct PyMethodDef *tp_methods; struct PyMemberDef *tp_members; struct PyGetSetDef *tp_getset; struct _typeobject *tp_base; PyObject *tp_dict; descrgetfunc tp_descr_get; descrsetfunc tp_descr_set; long tp_dictoffset; initproc tp_init; allocfunc tp_alloc; newfunc tp_new; freefunc tp_free; /* Low-level free-memory routine */ inquiry tp_is_gc; /* For PyObject_IS_GC */ PyObject *tp_bases; PyObject *tp_mro; /* method resolution order */ PyObject *tp_cache; PyObject *tp_subclasses; PyObject *tp_weaklist; } PyTypeObject; From fdrake at users.sourceforge.net Sat Sep 27 03:11:19 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:11:31 2003 Subject: [Python-checkins] python/dist/src/Doc/texinputs boilerplate.tex, 1.86, NONE copyright.tex, 1.13, NONE license.tex, 1.11, NONE reportingbugs.tex, 1.2, NONE typestruct.h, 1.1, NONE Message-ID: <E1A39Ed-0002Fu-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory sc8-pr-cvs1:/tmp/cvs-serv8642/texinputs Removed Files: boilerplate.tex copyright.tex license.tex reportingbugs.tex typestruct.h Log Message: Move content input files shared among the documents into a new directory (commontex/), leaving only style support files in texinputs/. This makes texinputs/ part of the formatting tools while commontex/ is strictly part of the actual documentation. --- boilerplate.tex DELETED --- --- copyright.tex DELETED --- --- license.tex DELETED --- --- reportingbugs.tex DELETED --- --- typestruct.h DELETED --- From fdrake at users.sourceforge.net Sat Sep 27 03:14:34 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:14:37 2003 Subject: [Python-checkins] python/dist/src/Doc/texinputs boilerplate.tex, 1.84.4.3, NONE copyright.tex, 1.13, NONE license.tex, 1.10.10.1, NONE reportingbugs.tex, 1.2, NONE typestruct.h, 1.1, NONE Message-ID: <E1A39Hm-0002OM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory sc8-pr-cvs1:/tmp/cvs-serv9134/texinputs Removed Files: Tag: release23-maint boilerplate.tex copyright.tex license.tex reportingbugs.tex typestruct.h Log Message: Move content input files shared among the documents into a new directory (commontex/), leaving only style support files in texinputs/. This makes texinputs/ part of the formatting tools while commontex/ is strictly part of the actual documentation. --- boilerplate.tex DELETED --- --- copyright.tex DELETED --- --- license.tex DELETED --- --- reportingbugs.tex DELETED --- --- typestruct.h DELETED --- From fdrake at users.sourceforge.net Sat Sep 27 03:14:34 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:14:41 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile, 1.261.4.3, 1.261.4.4 Makefile.deps, 1.110.8.1, 1.110.8.2 Message-ID: <E1A39Hm-0002Ny-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv9134 Modified Files: Tag: release23-maint Makefile Makefile.deps Log Message: Move content input files shared among the documents into a new directory (commontex/), leaving only style support files in texinputs/. This makes texinputs/ part of the formatting tools while commontex/ is strictly part of the actual documentation. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.261.4.3 retrieving revision 1.261.4.4 diff -C2 -d -r1.261.4.3 -r1.261.4.4 *** Makefile 27 Sep 2003 06:01:35 -0000 1.261.4.3 --- Makefile 27 Sep 2003 07:14:31 -0000 1.261.4.4 *************** *** 65,68 **** --- 65,70 ---- TOOLSDIR= tools + PWD=$(shell pwd) + # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. *************** *** 72,75 **** --- 74,82 ---- DVIPS= dvips -N0 -t $(PAPER) + # (The trailing colon in the value is needed; TeX places it's default + # set of paths at the location of the empty string in the path list.) + # + TEXINPUTS=$(PWD)/commontex: + # This is ugly! The issue here is that there are two different levels # in the directory tree at which we execute mkhowto, so we can't *************** *** 79,83 **** # identifying mkhowto using an absolute path. # ! MKHOWTO= $(PYTHON) $(shell pwd)/tools/mkhowto MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi --- 86,90 ---- # identifying mkhowto using an absolute path. # ! MKHOWTO= TEXINPUTS=$(TEXINPUTS) $(PYTHON) $(PWD)/tools/mkhowto MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.110.8.1 retrieving revision 1.110.8.2 diff -C2 -d -r1.110.8.1 -r1.110.8.2 *** Makefile.deps 6 Sep 2003 06:42:42 -0000 1.110.8.1 --- Makefile.deps 27 Sep 2003 07:14:31 -0000 1.110.8.2 *************** *** 6,12 **** INDEXSTYLES=texinputs/python.ist ! COMMONTEX= texinputs/copyright.tex \ ! texinputs/license.tex \ ! texinputs/boilerplate.tex MANSTYLES= texinputs/fncychap.sty \ --- 6,12 ---- INDEXSTYLES=texinputs/python.ist ! COMMONTEX=commontex/copyright.tex \ ! commontex/license.tex \ ! commontex/boilerplate.tex MANSTYLES= texinputs/fncychap.sty \ *************** *** 30,35 **** api/utilities.tex \ api/veryhigh.tex \ ! texinputs/typestruct.h \ ! texinputs/reportingbugs.tex # These files are generated from those listed above, and are used to --- 30,35 ---- api/utilities.tex \ api/veryhigh.tex \ ! commontex/typestruct.h \ ! commontex/reportingbugs.tex # These files are generated from those listed above, and are used to *************** *** 48,55 **** paper-$(PAPER)/utilities.tex \ paper-$(PAPER)/veryhigh.tex \ ! texinputs/reportingbugs.tex DOCFILES= $(HOWTOSTYLES) \ ! texinputs/boilerplate.tex \ texinputs/ltxmarkup.sty \ doc/doc.tex --- 48,55 ---- paper-$(PAPER)/utilities.tex \ paper-$(PAPER)/veryhigh.tex \ ! commontex/reportingbugs.tex DOCFILES= $(HOWTOSTYLES) \ ! commontex/boilerplate.tex \ texinputs/ltxmarkup.sty \ doc/doc.tex *************** *** 66,71 **** ext/noddy4.c \ ext/run-func.c \ ! texinputs/typestruct.h \ ! texinputs/reportingbugs.tex TUTFILES= tut/tut.tex $(MANSTYLES) $(COMMONTEX) --- 66,71 ---- ext/noddy4.c \ ext/run-func.c \ ! commontex/typestruct.h \ ! commontex/reportingbugs.tex TUTFILES= tut/tut.tex $(MANSTYLES) $(COMMONTEX) *************** *** 85,89 **** # LaTeX source files for the Python Library Reference LIBFILES= $(MANSTYLES) $(INDEXSTYLES) $(COMMONTEX) \ ! texinputs/reportingbugs.tex \ lib/lib.tex \ lib/asttable.tex \ --- 85,89 ---- # LaTeX source files for the Python Library Reference LIBFILES= $(MANSTYLES) $(INDEXSTYLES) $(COMMONTEX) \ ! commontex/reportingbugs.tex \ lib/lib.tex \ lib/asttable.tex \ From fdrake at users.sourceforge.net Sat Sep 27 03:14:34 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:14:46 2003 Subject: [Python-checkins] python/dist/src/Doc/commontex boilerplate.tex, NONE, 1.1.2.1 copyright.tex, NONE, 1.1.2.1 license.tex, NONE, 1.1.2.1 reportingbugs.tex, NONE, 1.1.2.1 typestruct.h, NONE, 1.1.2.1 Message-ID: <E1A39Hm-0002O5-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/commontex In directory sc8-pr-cvs1:/tmp/cvs-serv9134/commontex Added Files: Tag: release23-maint boilerplate.tex copyright.tex license.tex reportingbugs.tex typestruct.h Log Message: Move content input files shared among the documents into a new directory (commontex/), leaving only style support files in texinputs/. This makes texinputs/ part of the formatting tools while commontex/ is strictly part of the actual documentation. --- NEW FILE: boilerplate.tex --- \author{Guido van Rossum\\ Fred L. Drake, Jr., editor} \authoraddress{ \strong{PythonLabs}\\ Email: \email{docs@python.org} } \date{\today} % XXX update before final release! \release{2.3.2} % software release, not documentation \setreleaseinfo{c1} % empty for final release \setshortversion{2.3} % major.minor only for software --- NEW FILE: copyright.tex --- Copyright \copyright{} 2001, 2002, 2003 Python Software Foundation. All rights reserved. Copyright \copyright{} 2000 BeOpen.com. All rights reserved. Copyright \copyright{} 1995-2000 Corporation for National Research Initiatives. All rights reserved. Copyright \copyright{} 1991-1995 Stichting Mathematisch Centrum. All rights reserved. See the end of this document for complete license and permissions information. --- NEW FILE: license.tex --- \section{History of the software} Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see \url{http://www.cwi.nl/}) in the Netherlands as a successor of a language called ABC. Guido remains Python's principal author, although it includes many contributions from others. In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see \url{http://www.cnri.reston.va.us/}) in Reston, Virginia where he released several versions of the software. In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation; see \url{http://www.zope.com/}). In 2001, the Python Software Foundation (PSF, see \url{http://www.python.org/psf/}) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF. All Python releases are Open Source (see \url{http://www.opensource.org/} for the Open Source Definition). Historically, most, but not all, Python releases have also been GPL-compatible; the table below summarizes the various releases. \begin{tablev}{c|c|c|c|c}{textrm}% {Release}{Derived from}{Year}{Owner}{GPL compatible?} \linev{0.9.0 thru 1.2}{n/a}{1991-1995}{CWI}{yes} \linev{1.3 thru 1.5.2}{1.2}{1995-1999}{CNRI}{yes} \linev{1.6}{1.5.2}{2000}{CNRI}{no} \linev{2.0}{1.6}{2000}{BeOpen.com}{no} \linev{1.6.1}{1.6}{2001}{CNRI}{no} \linev{2.1}{2.0+1.6.1}{2001}{PSF}{no} \linev{2.0.1}{2.0+1.6.1}{2001}{PSF}{yes} \linev{2.1.1}{2.1+2.0.1}{2001}{PSF}{yes} \linev{2.2}{2.1.1}{2001}{PSF}{yes} \linev{2.1.2}{2.1.1}{2002}{PSF}{yes} \linev{2.1.3}{2.1.2}{2002}{PSF}{yes} \linev{2.2.1}{2.2}{2002}{PSF}{yes} \linev{2.2.2}{2.2.1}{2002}{PSF}{yes} \linev{2.2.3}{2.2.2}{2002-2003}{PSF}{yes} \linev{2.3}{2.2.2}{2002-2003}{PSF}{yes} \linev{2.3.1}{2.3}{2002-2003}{PSF}{yes} \linev{2.3.2}{2.3.1}{2003}{PSF}{yes} \end{tablev} \note{GPL-compatible doesn't mean that we're distributing Python under the GPL. All Python licenses, unlike the GPL, let you distribute a modified version without making your changes open source. The GPL-compatible licenses make it possible to combine Python with other software that is released under the GPL; the others don't.} Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible. \section{Terms and conditions for accessing or otherwise using Python} \centerline{\strong{PSF LICENSE AGREEMENT FOR PYTHON \version}} \begin{enumerate} \item This LICENSE AGREEMENT is between the Python Software Foundation (``PSF''), and the Individual or Organization (``Licensee'') accessing and otherwise using Python \version{} software in source or binary form and its associated documentation. \item Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python \version{} alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., ``Copyright \copyright{} 2001-2003 Python Software Foundation; All Rights Reserved'' are retained in Python \version{} alone or in any derivative version prepared by Licensee. \item In the event Licensee prepares a derivative work that is based on or incorporates Python \version{} or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python \version. \item PSF is making Python \version{} available to Licensee on an ``AS IS'' basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON \version{} WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. \item PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON \version{} FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON \version, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. \item This License Agreement will automatically terminate upon a material breach of its terms and conditions. \item Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. \item By copying, installing or otherwise using Python \version, Licensee agrees to be bound by the terms and conditions of this License Agreement. \end{enumerate} \centerline{\strong{BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0}} \centerline{\strong{BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1}} \begin{enumerate} \item This LICENSE AGREEMENT is between BeOpen.com (``BeOpen''), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization (``Licensee'') accessing and otherwise using this software in source or binary form and its associated documentation (``the Software''). \item Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee. \item BeOpen is making the Software available to Licensee on an ``AS IS'' basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. \item BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. \item This License Agreement will automatically terminate upon a material breach of its terms and conditions. \item This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the ``BeOpen Python'' logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page. \item By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement. \end{enumerate} \centerline{\strong{CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1}} \begin{enumerate} \item This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 (``CNRI''), and the Individual or Organization (``Licensee'') accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation. \item Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., ``Copyright \copyright{} 1995-2001 Corporation for National Research Initiatives; All Rights Reserved'' are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): ``Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: \url{http://hdl.handle.net/1895.22/1013}.'' \item In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1. \item CNRI is making Python 1.6.1 available to Licensee on an ``AS IS'' basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. \item CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. \item This License Agreement will automatically terminate upon a material breach of its terms and conditions. \item This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. \item By clicking on the ``ACCEPT'' button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement. \end{enumerate} \centerline{ACCEPT} \centerline{\strong{CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2}} Copyright \copyright{} 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- NEW FILE: reportingbugs.tex --- \label{reporting-bugs} Python is a mature programming language which has established a reputation for stability. In order to maintain this reputation, the developers would like to know of any deficiencies you find in Python or its documentation. Before submitting a report, you will be required to log into SourceForge; this will make it possible for the developers to contact you for additional information if needed. It is not possible to submit a bug report anonymously. All bug reports should be submitted via the Python Bug Tracker on SourceForge (\url{http://sourceforge.net/bugs/?group_id=5470}). The bug tracker offers a Web form which allows pertinent information to be entered and submitted to the developers. The first step in filing a report is to determine whether the problem has already been reported. The advantage in doing so, aside from saving the developers time, is that you learn what has been done to fix it; it may be that the problem has already been fixed for the next release, or additional information is needed (in which case you are welcome to provide it if you can!). To do this, search the bug database using the search box near the bottom of the page. If the problem you're reporting is not already in the bug tracker, go back to the Python Bug Tracker (\url{http://sourceforge.net/bugs/?group_id=5470}). Select the ``Submit a Bug'' link at the top of the page to open the bug reporting form. The submission form has a number of fields. The only fields that are required are the ``Summary'' and ``Details'' fields. For the summary, enter a \emph{very} short description of the problem; less than ten words is good. In the Details field, describe the problem in detail, including what you expected to happen and what did happen. Be sure to include the version of Python you used, whether any extension modules were involved, and what hardware and software platform you were using (including version information as appropriate). The only other field that you may want to set is the ``Category'' field, which allows you to place the bug report into a broad category (such as ``Documentation'' or ``Library''). Each bug report will be assigned to a developer who will determine what needs to be done to correct the problem. You will receive an update each time action is taken on the bug. \begin{seealso} \seetitle[http://www-mice.cs.ucl.ac.uk/multimedia/software/documentation/ReportingBugs.html]{How to Report Bugs Effectively}{Article which goes into some detail about how to create a useful bug report. This describes what kind of information is useful and why it is useful.} \seetitle[http://www.mozilla.org/quality/bug-writing-guidelines.html]{Bug Writing Guidelines}{Information about writing a good bug report. Some of this is specific to the Mozilla project, but describes general good practices.} \end{seealso} --- NEW FILE: typestruct.h --- typedef struct _typeobject { PyObject_VAR_HEAD char *tp_name; /* For printing, in format "<module>.<name>" */ int tp_basicsize, tp_itemsize; /* For allocation */ /* Methods to implement standard operations */ destructor tp_dealloc; printfunc tp_print; getattrfunc tp_getattr; setattrfunc tp_setattr; cmpfunc tp_compare; reprfunc tp_repr; /* Method suites for standard classes */ PyNumberMethods *tp_as_number; PySequenceMethods *tp_as_sequence; PyMappingMethods *tp_as_mapping; /* More standard operations (here for binary compatibility) */ hashfunc tp_hash; ternaryfunc tp_call; reprfunc tp_str; getattrofunc tp_getattro; setattrofunc tp_setattro; /* Functions to access object as input/output buffer */ PyBufferProcs *tp_as_buffer; /* Flags to define presence of optional/expanded features */ long tp_flags; char *tp_doc; /* Documentation string */ /* Assigned meaning in release 2.0 */ /* call function for all accessible objects */ traverseproc tp_traverse; /* delete references to contained objects */ inquiry tp_clear; /* Assigned meaning in release 2.1 */ /* rich comparisons */ richcmpfunc tp_richcompare; /* weak reference enabler */ long tp_weaklistoffset; /* Added in release 2.2 */ /* Iterators */ getiterfunc tp_iter; iternextfunc tp_iternext; /* Attribute descriptor and subclassing stuff */ struct PyMethodDef *tp_methods; struct PyMemberDef *tp_members; struct PyGetSetDef *tp_getset; struct _typeobject *tp_base; PyObject *tp_dict; descrgetfunc tp_descr_get; descrsetfunc tp_descr_set; long tp_dictoffset; initproc tp_init; allocfunc tp_alloc; newfunc tp_new; freefunc tp_free; /* Low-level free-memory routine */ inquiry tp_is_gc; /* For PyObject_IS_GC */ PyObject *tp_bases; PyObject *tp_mro; /* method resolution order */ PyObject *tp_cache; PyObject *tp_subclasses; PyObject *tp_weaklist; } PyTypeObject; From fdrake at users.sourceforge.net Sat Sep 27 03:16:12 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:16:14 2003 Subject: [Python-checkins] python/dist/src/Doc README,1.49.8.1,1.49.8.2 Message-ID: <E1A39JM-0002TF-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv9491 Modified Files: Tag: release23-maint README Log Message: point to the new location of the license information Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/README,v retrieving revision 1.49.8.1 retrieving revision 1.49.8.2 diff -C2 -d -r1.49.8.1 -r1.49.8.2 *** README 4 Aug 2003 22:49:41 -0000 1.49.8.1 --- README 27 Sep 2003 07:16:09 -0000 1.49.8.2 *************** *** 218,222 **** All rights reserved. ! See the file "texinputs/license.tex" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ---------------------------------------------------------------------- --- 218,222 ---- All rights reserved. ! See the file "commontex/license.tex" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ---------------------------------------------------------------------- From fdrake at users.sourceforge.net Sat Sep 27 03:16:34 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:16:37 2003 Subject: [Python-checkins] python/dist/src/Doc README,1.50,1.51 Message-ID: <E1A39Ji-0002U8-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv9551 Modified Files: README Log Message: point to the new location of the license information Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/README,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** README 30 Jul 2003 02:55:01 -0000 1.50 --- README 27 Sep 2003 07:16:32 -0000 1.51 *************** *** 218,222 **** All rights reserved. ! See the file "texinputs/license.tex" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ---------------------------------------------------------------------- --- 218,222 ---- All rights reserved. ! See the file "commontex/license.tex" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ---------------------------------------------------------------------- From fdrake at users.sourceforge.net Sat Sep 27 03:20:01 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:20:04 2003 Subject: [Python-checkins] python/dist/src/Doc/doc doc.tex, 1.75.8.1, 1.75.8.2 Message-ID: <E1A39N3-0002bc-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/doc In directory sc8-pr-cvs1:/tmp/cvs-serv9992 Modified Files: Tag: release23-maint doc.tex Log Message: add commontex/ to the list of directories described here Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.75.8.1 retrieving revision 1.75.8.2 diff -C2 -d -r1.75.8.1 -r1.75.8.2 *** doc.tex 4 Aug 2003 22:49:41 -0000 1.75.8.1 --- doc.tex 27 Sep 2003 07:19:59 -0000 1.75.8.2 *************** *** 149,156 **** \begin{tableii}{p{.75in}|p{3in}}{filenq}{Directory}{Contents} ! \lineii{perl/}{Support for \LaTeX2HTML processing} \lineii{templates/}{Example files for source documents} \lineii{texinputs/}{Style implementation for \LaTeX} ! \lineii{tools/}{Custom processing scripts} \end{tableii} --- 149,157 ---- \begin{tableii}{p{.75in}|p{3in}}{filenq}{Directory}{Contents} ! \lineii{commontex/}{Document content shared among documents} ! \lineii{perl/} {Support for \LaTeX2HTML processing} \lineii{templates/}{Example files for source documents} \lineii{texinputs/}{Style implementation for \LaTeX} ! \lineii{tools/} {Custom processing scripts} \end{tableii} From fdrake at users.sourceforge.net Sat Sep 27 03:18:54 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:21:29 2003 Subject: [Python-checkins] python/dist/src/Doc/doc doc.tex,1.76,1.77 Message-ID: <E1A39Ly-0002ZM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/doc In directory sc8-pr-cvs1:/tmp/cvs-serv9869 Modified Files: doc.tex Log Message: add commontex/ to the list of directories described here Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** doc.tex 30 Jul 2003 02:55:27 -0000 1.76 --- doc.tex 27 Sep 2003 07:18:52 -0000 1.77 *************** *** 149,156 **** \begin{tableii}{p{.75in}|p{3in}}{filenq}{Directory}{Contents} ! \lineii{perl/}{Support for \LaTeX2HTML processing} \lineii{templates/}{Example files for source documents} \lineii{texinputs/}{Style implementation for \LaTeX} ! \lineii{tools/}{Custom processing scripts} \end{tableii} --- 149,157 ---- \begin{tableii}{p{.75in}|p{3in}}{filenq}{Directory}{Contents} ! \lineii{commontex/}{Document content shared among documents} ! \lineii{perl/} {Support for \LaTeX2HTML processing} \lineii{templates/}{Example files for source documents} \lineii{texinputs/}{Style implementation for \LaTeX} ! \lineii{tools/} {Custom processing scripts} \end{tableii} From fdrake at users.sourceforge.net Sat Sep 27 03:24:25 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:24:28 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.261.4.4,1.261.4.5 Message-ID: <E1A39RJ-0002lj-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv10641 Modified Files: Tag: release23-maint Makefile Log Message: locate the definition of the PWD variable in the same way as the version on the trunk Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.261.4.4 retrieving revision 1.261.4.5 diff -C2 -d -r1.261.4.4 -r1.261.4.5 *** Makefile 27 Sep 2003 07:14:31 -0000 1.261.4.4 --- Makefile 27 Sep 2003 07:24:22 -0000 1.261.4.5 *************** *** 65,70 **** TOOLSDIR= tools - PWD=$(shell pwd) - # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. --- 65,68 ---- *************** *** 73,76 **** --- 71,76 ---- PYTHON= python DVIPS= dvips -N0 -t $(PAPER) + + PWD=$(shell pwd) # (The trailing colon in the value is needed; TeX places it's default From fdrake at users.sourceforge.net Sat Sep 27 03:36:20 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:36:25 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.261.4.5,1.261.4.6 Message-ID: <E1A39cq-0003Cf-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv12308 Modified Files: Tag: release23-maint Makefile Log Message: Adjust the organization a bit and update some of the comments to better explain what's happening. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.261.4.5 retrieving revision 1.261.4.6 diff -C2 -d -r1.261.4.5 -r1.261.4.6 *** Makefile 27 Sep 2003 07:24:22 -0000 1.261.4.5 --- Makefile 27 Sep 2003 07:36:18 -0000 1.261.4.6 *************** *** 72,82 **** DVIPS= dvips -N0 -t $(PAPER) - PWD=$(shell pwd) - - # (The trailing colon in the value is needed; TeX places it's default - # set of paths at the location of the empty string in the path list.) - # - TEXINPUTS=$(PWD)/commontex: - # This is ugly! The issue here is that there are two different levels # in the directory tree at which we execute mkhowto, so we can't --- 72,75 ---- *************** *** 84,90 **** # current implementation and Makefile structure). We use the GNUish # $(shell) function here to work around that restriction by ! # identifying mkhowto using an absolute path. # ! MKHOWTO= TEXINPUTS=$(TEXINPUTS) $(PYTHON) $(PWD)/tools/mkhowto MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi --- 77,95 ---- # current implementation and Makefile structure). We use the GNUish # $(shell) function here to work around that restriction by ! # identifying mkhowto and the commontex/ directory using absolute paths. # ! PWD=$(shell pwd) ! ! # (The trailing colon in the value is needed; TeX places it's default ! # set of paths at the location of the empty string in the path list.) ! TEXINPUTS=$(PWD)/commontex: ! ! # The mkhowto script can be run from the checkout using the first ! # version of this variable definition, or from a preferred version ! # using the second version. The standard documentation is typically ! # built using the second flavor, where the preferred version is from ! # the Python CVS trunk. ! #MKHOWTO= TEXINPUTS=$(TEXINPUTS) $(PYTHON) $(PWD)/tools/mkhowto ! MKHOWTO= TEXINPUTS=$(TEXINPUTS) mkhowto MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi From fdrake at users.sourceforge.net Sat Sep 27 03:37:11 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:37:15 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.267,1.268 Message-ID: <E1A39df-0003EI-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv12412 Modified Files: Makefile Log Message: Adjust the organization a bit and update some of the comments to better explain what's happening. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.267 retrieving revision 1.268 diff -C2 -d -r1.267 -r1.268 *** Makefile 27 Sep 2003 07:11:15 -0000 1.267 --- Makefile 27 Sep 2003 07:37:09 -0000 1.268 *************** *** 72,82 **** DVIPS= dvips -N0 -t $(PAPER) - PWD=$(shell pwd) - - # (The trailing colon in the value is needed; TeX places it's default - # set of paths at the location of the empty string in the path list.) - # - TEXINPUTS=$(PWD)/commontex: - # This is ugly! The issue here is that there are two different levels # in the directory tree at which we execute mkhowto, so we can't --- 72,75 ---- *************** *** 84,90 **** # current implementation and Makefile structure). We use the GNUish # $(shell) function here to work around that restriction by ! # identifying mkhowto using an absolute path. # ! MKHOWTO= TEXINPUTS=$(TEXINPUTS) $(PYTHON) $(PWD)/tools/mkhowto MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi --- 77,95 ---- # current implementation and Makefile structure). We use the GNUish # $(shell) function here to work around that restriction by ! # identifying mkhowto and the commontex/ directory using absolute paths. # ! PWD=$(shell pwd) ! ! # (The trailing colon in the value is needed; TeX places it's default ! # set of paths at the location of the empty string in the path list.) ! TEXINPUTS=$(PWD)/commontex: ! ! # The mkhowto script can be run from the checkout using the first ! # version of this variable definition, or from a preferred version ! # using the second version. The standard documentation is typically ! # built using the second flavor, where the preferred version is from ! # the Python CVS trunk. ! #MKHOWTO= TEXINPUTS=$(TEXINPUTS) $(PYTHON) $(PWD)/tools/mkhowto ! MKHOWTO= TEXINPUTS=$(TEXINPUTS) mkhowto MKDVI= $(MKHOWTO) --paper=$(PAPER) --dvi From fdrake at users.sourceforge.net Sat Sep 27 03:48:07 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:48:10 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.261.4.6,1.261.4.7 Message-ID: <E1A39oF-0003dc-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv13980 Modified Files: Tag: release23-maint Makefile Log Message: update one more reference to a file that moved from texinputs/ to commontex/ Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.261.4.6 retrieving revision 1.261.4.7 diff -C2 -d -r1.261.4.6 -r1.261.4.7 *** Makefile 27 Sep 2003 07:36:18 -0000 1.261.4.6 --- Makefile 27 Sep 2003 07:48:04 -0000 1.261.4.7 *************** *** 349,353 **** # files are not used to actually generate content. ! BOILERPLATE=texinputs/boilerplate.tex html/index.html: $(INDEXFILES) html/index.html: html/index.html.in $(BOILERPLATE) tools/rewrite.py --- 349,353 ---- # files are not used to actually generate content. ! BOILERPLATE=commontex/boilerplate.tex html/index.html: $(INDEXFILES) html/index.html: html/index.html.in $(BOILERPLATE) tools/rewrite.py From fdrake at users.sourceforge.net Sat Sep 27 03:48:27 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 03:48:29 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.268,1.269 Message-ID: <E1A39oZ-0003eF-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv14021 Modified Files: Makefile Log Message: update one more reference to a file that moved from texinputs/ to commontex/ Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.268 retrieving revision 1.269 diff -C2 -d -r1.268 -r1.269 *** Makefile 27 Sep 2003 07:37:09 -0000 1.268 --- Makefile 27 Sep 2003 07:48:25 -0000 1.269 *************** *** 349,353 **** # files are not used to actually generate content. ! BOILERPLATE=texinputs/boilerplate.tex html/index.html: $(INDEXFILES) html/index.html: html/index.html.in $(BOILERPLATE) tools/rewrite.py --- 349,353 ---- # files are not used to actually generate content. ! BOILERPLATE=commontex/boilerplate.tex html/index.html: $(INDEXFILES) html/index.html: html/index.html.in $(BOILERPLATE) tools/rewrite.py From anthonybaxter at users.sourceforge.net Sat Sep 27 04:59:03 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Sat Sep 27 04:59:07 2003 Subject: [Python-checkins] python/dist/src aclocal.m4, NONE, 1.1.2.1 configure, 1.416.4.6, 1.416.4.7 Message-ID: <E1A3Aut-00063M-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv23108 Modified Files: Tag: release23-maint configure Added Files: Tag: release23-maint aclocal.m4 Log Message: fix for bug #811160 - autoconf vs. hp/ux system header files. --- NEW FILE: aclocal.m4 --- # Code swiped wholesale from the GCC project, see # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12100 # This file can go away once autoconf 2.58 is out and being used - # it's reported that this is fixed in the autoconf cvs already. # AC_LANG_FUNC_LINK_TRY(C)(FUNCTION) # ---------------------------------- # Don't include <ctype.h> because on OSF/1 3.0 it includes # <sys/types.h> which includes <sys/select.h> which contains a # prototype for select. Similarly for bzero. # # A similar problem afflicts HP/UX, but it also hits <sys/time.h> # # This test used to merely assign f=$1 in main(), but that was # optimized away by HP unbundled cc A.05.36 for ia64 under +O3, # presumably on the basis that there's no need to do that store if the # program is about to exit. Conversely, the AIX linker optimizes an # unused external declaration that initializes f=$1. So this test # program has both an external initialization of f, and a use of f in # main that affects the exit status. # m4_define([AC_LANG_FUNC_LINK_TRY(C)], [AC_LANG_PROGRAM( [/* System header to define __stub macros and hopefully few prototypes, which can conflict with char $1 (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since <limits.h> exists even on freestanding compilers. Under hpux, including <limits.h> includes <sys/time.h> and causes problems checking for functions defined therein. */ #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else # include <assert.h> #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $1 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$1) || defined (__stub___$1) choke me #else char (*f) () = $1; #endif #ifdef __cplusplus } #endif ], [return f != $1;])]) Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.416.4.6 retrieving revision 1.416.4.7 diff -C2 -d -r1.416.4.6 -r1.416.4.7 *** configure 25 Sep 2003 15:20:55 -0000 1.416.4.6 --- configure 27 Sep 2003 08:58:55 -0000 1.416.4.7 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.427.4.5 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.427.4.6 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.3. *************** *** 11350,11355 **** which can conflict with char pthread_detach (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 11350,11357 ---- which can conflict with char pthread_detach (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 12301,12306 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 12303,12310 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 12886,12891 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 12890,12897 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 13101,13106 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 13107,13114 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 13999,14004 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14007,14014 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14145,14150 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14155,14162 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14298,14303 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14310,14317 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14387,14392 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14401,14408 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14474,14479 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14490,14497 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14598,14603 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14616,14623 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14722,14727 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14742,14749 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 15102,15107 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 15124,15131 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 16467,16472 **** which can conflict with char gethostbyname_r (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 16491,16498 ---- which can conflict with char gethostbyname_r (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 16742,16747 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 16768,16775 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 16835,16840 **** which can conflict with char __fpu_control (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 16863,16870 ---- which can conflict with char __fpu_control (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 17067,17072 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 17097,17104 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else From anthonybaxter at users.sourceforge.net Sat Sep 27 05:12:31 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Sat Sep 27 05:12:34 2003 Subject: [Python-checkins] python/dist/src aclocal.m4, 1.1, 1.2 configure, 1.425, 1.426 Message-ID: <E1A3B7v-0006Za-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv25123 Modified Files: configure Added Files: aclocal.m4 Log Message: fix for bug #811160 - autoconf vs. hp/ux system header files. also applied to release23-maint. Note that aclocal.m4 can go away when autoconf 2.58 is out. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.425 retrieving revision 1.426 diff -C2 -d -r1.425 -r1.426 *** configure 25 Sep 2003 14:50:04 -0000 1.425 --- configure 27 Sep 2003 09:12:27 -0000 1.426 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.435 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.436 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for python 2.4. *************** *** 11362,11367 **** which can conflict with char pthread_detach (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 11362,11369 ---- which can conflict with char pthread_detach (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 12313,12318 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 12315,12322 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 12898,12903 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 12902,12909 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 13113,13118 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 13119,13126 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14011,14016 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14019,14026 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14157,14162 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14167,14174 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14310,14315 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14322,14329 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14399,14404 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14413,14420 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14486,14491 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14502,14509 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14610,14615 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14628,14635 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 14734,14739 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 14754,14761 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 15114,15119 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 15136,15143 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 16479,16484 **** which can conflict with char gethostbyname_r (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 16503,16510 ---- which can conflict with char gethostbyname_r (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 16754,16759 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 16780,16787 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 16847,16852 **** which can conflict with char __fpu_control (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 16875,16882 ---- which can conflict with char __fpu_control (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else *************** *** 17079,17084 **** which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. */ ! #ifdef __STDC__ # include <limits.h> #else --- 17109,17116 ---- which can conflict with char $ac_func (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ! <limits.h> exists even on freestanding compilers. Under hpux, ! including <limits.h> includes <sys/time.h> and causes problems ! checking for functions defined therein. */ ! #if defined (__STDC__) && !defined (_HPUX_SOURCE) # include <limits.h> #else From fdrake at users.sourceforge.net Sat Sep 27 12:03:30 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 12:03:34 2003 Subject: [Python-checkins] python/dist/src/Doc/perl l2hinit.perl, 1.74, 1.74.10.1 Message-ID: <E1A3HXe-0000Lo-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1:/tmp/cvs-serv1340 Modified Files: Tag: release23-maint l2hinit.perl Log Message: Make sure LaTeX2HTML's $TEXINPUTS variable is initialized to include directories identified in the TEXINPUTS environment variable. I think this is the last part of the fix for the version number problems seen in the documentation for the 2.3.1 release. Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.74 retrieving revision 1.74.10.1 diff -C2 -d -r1.74 -r1.74.10.1 *** l2hinit.perl 27 Jun 2003 18:26:01 -0000 1.74 --- l2hinit.perl 27 Sep 2003 16:03:27 -0000 1.74.10.1 *************** *** 89,92 **** --- 89,96 ---- # processing. # + # XXX This still isn't quite right; we should actually be inserting + # $mytexinputs just before any empty entry in TEXINPUTS is one + # exists instead of just concatenating the pieces like we do here. + # my $file = $_[0]; my($jobname, $dir, $ext) = fileparse($file, '\..*'); *************** *** 94,98 **** $dir =~ s/$dd$//; $TEXINPUTS = "$dir$envkey$mytexinputs"; ! print "\nAdding $dir to \$TEXINPUTS\n"; } --- 98,110 ---- $dir =~ s/$dd$//; $TEXINPUTS = "$dir$envkey$mytexinputs"; ! # Push everything into $TEXINPUTS since LaTeX2HTML doesn't pick ! # this up on it's own; we clear $ENV{'TEXINPUTS'} so the value set ! # for this by the main LaTeX2HTML script doesn't contain duplicate ! # directories. ! if ($ENV{'TEXINPUTS'}) { ! $TEXINPUTS .= "$envkey$ENV{'TEXINPUTS'}"; ! $ENV{'TEXINPUTS'} = undef; ! } ! print "\nSetting \$TEXINPUTS to $TEXINPUTS\n"; } From fdrake at users.sourceforge.net Sat Sep 27 12:04:25 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 12:04:28 2003 Subject: [Python-checkins] python/dist/src/Doc/perl l2hinit.perl,1.79,1.80 Message-ID: <E1A3HYX-0000Ok-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory sc8-pr-cvs1:/tmp/cvs-serv1526 Modified Files: l2hinit.perl Log Message: Make sure LaTeX2HTML's $TEXINPUTS variable is initialized to include directories identified in the TEXINPUTS environment variable. I think this is the last part of the fix for the version number problems seen in the documentation for the 2.3.1 release. Index: l2hinit.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** l2hinit.perl 11 Sep 2003 04:14:20 -0000 1.79 --- l2hinit.perl 27 Sep 2003 16:04:23 -0000 1.80 *************** *** 89,92 **** --- 89,96 ---- # processing. # + # XXX This still isn't quite right; we should actually be inserting + # $mytexinputs just before any empty entry in TEXINPUTS is one + # exists instead of just concatenating the pieces like we do here. + # my $file = $_[0]; my($jobname, $dir, $ext) = fileparse($file, '\..*'); *************** *** 94,98 **** $dir =~ s/$dd$//; $TEXINPUTS = "$dir$envkey$mytexinputs"; ! print "\nAdding $dir to \$TEXINPUTS\n"; } --- 98,110 ---- $dir =~ s/$dd$//; $TEXINPUTS = "$dir$envkey$mytexinputs"; ! # Push everything into $TEXINPUTS since LaTeX2HTML doesn't pick ! # this up on it's own; we clear $ENV{'TEXINPUTS'} so the value set ! # for this by the main LaTeX2HTML script doesn't contain duplicate ! # directories. ! if ($ENV{'TEXINPUTS'}) { ! $TEXINPUTS .= "$envkey$ENV{'TEXINPUTS'}"; ! $ENV{'TEXINPUTS'} = undef; ! } ! print "\nSetting \$TEXINPUTS to $TEXINPUTS\n"; } From fdrake at users.sourceforge.net Sat Sep 27 14:10:44 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 14:10:46 2003 Subject: [Python-checkins] python/dist/src/Include patchlevel.h, 2.74.4.2, 2.74.4.3 Message-ID: <E1A3JWm-0005zg-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1:/tmp/cvs-serv23037 Modified Files: Tag: release23-maint patchlevel.h Log Message: bump the release info Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.74.4.2 retrieving revision 2.74.4.3 diff -C2 -d -r2.74.4.2 -r2.74.4.3 *** patchlevel.h 23 Sep 2003 02:36:16 -0000 2.74.4.2 --- patchlevel.h 27 Sep 2003 18:10:41 -0000 2.74.4.3 *************** *** 22,31 **** #define PY_MAJOR_VERSION 2 #define PY_MINOR_VERSION 3 ! #define PY_MICRO_VERSION 1 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL ! #define PY_RELEASE_SERIAL 0 /* Version as a string */ ! #define PY_VERSION "2.3.1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. --- 22,31 ---- #define PY_MAJOR_VERSION 2 #define PY_MINOR_VERSION 3 ! #define PY_MICRO_VERSION 2 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA ! #define PY_RELEASE_SERIAL 1 /* Version as a string */ ! #define PY_VERSION "2.3.2c1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. From fdrake at users.sourceforge.net Sat Sep 27 14:59:46 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 14:59:52 2003 Subject: [Python-checkins] python/dist/src/Doc/tut glossary.tex,1.2,1.3 Message-ID: <E1A3KID-00084P-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1:/tmp/cvs-serv31014 Modified Files: glossary.tex Log Message: Lots of markup corrections. Some are minor, but others are not: the contents of an \item should not be enclosed in a group! Index: glossary.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/glossary.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** glossary.tex 27 Sep 2003 05:42:14 -0000 1.2 --- glossary.tex 27 Sep 2003 18:59:43 -0000 1.3 *************** *** 7,79 **** \index{...} ! \item[...]{The typical Python prompt of the interactive shell when entering ! code for an indented code block.} \index{>>>} ! \item[>>>]{The typical Python prompt of the interactive shell. Often seen ! for code examples that can be tried right away in the interpreter.} \index{__slots__} ! \item[__slots__]{A declaration inside a \emph{new-style class} that saves ! memory by pre-declaring space for instance attributes and eliminating ! instance dictionaries. Though popular, the technique is somewhat tricky to ! get right and is best reserved for rare cases where there are large numbers ! of instances in a memory critical application.} \index{BDFL} ! \item[BDFL]{Benevolent Dictator For Life, a.k.a. \ulink{Guido van ! Rossum}{http://www.python.org/~guido/}, Python's creator.} \index{byte code} ! \item[byte code]{The internal representation of a Python program in the ! interpreter. The byte code is also cached in the \code{.pyc} and ! {}\code{.pyo} files so that executing the same file is faster the second ! time (compilation from source to byte code can be saved). This ! "intermediate language" is said to run on a "virtual machine" that calls the ! subroutines corresponding to each bytecode.} \index{classic class} ! \item[classic class]{Any class which does not inherit from \class{object}. ! See new-style class.} \index{coercion} ! \item[coercion]{Converting data from one type to another. For example, ! {}\code{int(3.15)} coerces the floating point number to the integer, \code{3}. ! Most mathematical operations have rules for coercing their arguments to a common ! type. For instance, adding \code{3 + 4.5}, causes the integer \code{3} to be ! coerced to be a float \code{3.0} before adding to \code{4.5} resulting in the ! float \code{7.5}.} \index{descriptor} ! \item[descriptor]{Any object that defines the methods \method{__get__()}, ! \method{__set__()}, or \method{__delete__()}. When a class attribute is a ! descriptor, its special binding behavior is triggered upon attribute lookup. ! Normally, writing {}\var{a.b} looks up the object \var{b} in the class ! dictionary for \var{a}, but if \var{b} is a descriptor, the defined method ! gets called. Understanding descriptors is a key to a deep understanding of ! Python because they are the basis for many features including functions, ! methods, properties, class methods, static methods, and reference to super ! classes.} \index{dictionary} ! \item[dictionary]{An associative array, where arbitrary keys are mapped to ! values. The use of \class{dict} much resembles that for \class{list}, but ! the keys can be any object with a \function{__hash__} function, not just ! integers starting from zero. Called a hash in Perl.} \index{EAFP} ! \item[EAFP]{Easier to ask for forgiveness than permission. This common ! Python coding style assumes the existence of valid keys or attributes and ! catches exceptions if the assumption proves false. This clean and fast ! style is characterized by the presence of many \keyword{try} and ! {}\keyword{except} statements. The technique contrasts with the \emph{LBYL} ! style that is common in many other languages such as C.} \index{__future__} ! \item[__future__]{A pseudo module which programmers can use to enable ! new language features which are not compatible with the current interpreter. ! For example, the expression \code{11 / 4} currently evaluates to \code{2}. ! If the module in which it is executed had enabled emph{true division} by ! executing:} \begin{verbatim} --- 7,92 ---- \index{...} ! \item[\code{.\code{.}.}] ! The typical Python prompt of the interactive shell when entering code ! for an indented code block. \index{>>>} ! \item[\code{>\code{>}>}] ! The typical Python prompt of the interactive shell. Often seen for ! code examples that can be tried right away in the interpreter. \index{__slots__} ! \item[__slots__] ! A declaration inside a \emph{new-style class} that saves memory by ! pre-declaring space for instance attributes and eliminating instance ! dictionaries. Though popular, the technique is somewhat tricky to get ! right and is best reserved for rare cases where there are large ! numbers of instances in a memory critical application. \index{BDFL} ! \item[BDFL] ! Benevolent Dictator For Life, a.k.a. \ulink{Guido van ! Rossum}{http://www.python.org/~guido/}, Python's creator. \index{byte code} ! \item[byte code] ! The internal representation of a Python program in the interpreter. ! The byte code is also cached in the \code{.pyc} and \code{.pyo} ! files so that executing the same file is faster the second time ! (compilation from source to byte code can be saved). This ! \emph{intermediate language} is said to run on a \emph{virtual ! machine} that calls the subroutines corresponding to each bytecode. \index{classic class} ! \item[classic class] ! Any class which does not inherit from \class{object}. See ! \emph{new-style class}. \index{coercion} ! \item[coercion] ! Converting data from one type to another. For example, ! {}\code{int(3.15)} coerces the floating point number to the integer, ! {}\code{3}. Most mathematical operations have rules for coercing ! their arguments to a common type. For instance, adding \code{3 + ! 4.5}, causes the integer \code{3} to be coerced to be a float ! {}\code{3.0} before adding to \code{4.5} resulting in the float ! {}\code{7.5}. \index{descriptor} ! \item[descriptor] ! Any \emph{new-style} object that defines the methods ! {}\method{__get__()}, \method{__set__()}, or \method{__delete__()}. ! When a class attribute is a descriptor, its special binding behavior ! is triggered upon attribute lookup. Normally, writing \var{a.b} looks ! up the object \var{b} in the class dictionary for \var{a}, but if ! {}\var{b} is a descriptor, the defined method gets called. ! Understanding descriptors is a key to a deep understanding of Python ! because they are the basis for many features including functions, ! methods, properties, class methods, static methods, and reference to ! super classes. \index{dictionary} ! \item[dictionary] ! An associative array, where arbitrary keys are mapped to values. The ! use of \class{dict} much resembles that for \class{list}, but the keys ! can be any object with a \method{__hash__()} function, not just ! integers starting from zero. Called a hash in Perl. \index{EAFP} ! \item[EAFP] ! Easier to ask for forgiveness than permission. This common Python ! coding style assumes the existence of valid keys or attributes and ! catches exceptions if the assumption proves false. This clean and ! fast style is characterized by the presence of many \keyword{try} and ! {}\keyword{except} statements. The technique contrasts with the ! {}\emph{LBYL} style that is common in many other languages such as C. \index{__future__} ! \item[__future__] ! A pseudo module which programmers can use to enable new language ! features which are not compatible with the current interpreter. For ! example, the expression \code{11 / 4} currently evaluates to \code{2}. ! If the module in which it is executed had enabled emph{true division} ! by executing: \begin{verbatim} *************** *** 81,88 **** \end{verbatim} ! the expression \code{11 / 4} would evaluate to \code{2.75}. By actually ! importing the \module{__future__} module and evaluating its variables, you ! can see when a new feature was first added to the language and when it will ! become the default: \begin{verbatim} --- 94,101 ---- \end{verbatim} ! the expression \code{11 / 4} would evaluate to \code{2.75}. By ! actually importing the \refmodule[future]{__future__} module and ! evaluating its variables, you can see when a new feature was first ! added to the language and when it will become the default: \begin{verbatim} *************** *** 93,268 **** \index{generator} ! \item[generator]{A function that returns an iterator. It looks like a ! normal function except that the \keyword{yield} keyword is used instead of {}\keyword{return}. Generator functions often contain one or more ! {}\keyword{for} or \keyword{while} loops that \keyword{yield} elements back to ! the caller. The function execution is stopped at the \keyword{yield} keyword ! (returning the result) and is resumed there when the next element is ! requested by calling the \function{next()} method of the returned iterator.} \index{GIL} ! \item[GIL]{See \emph{global interpreter lock}.} \index{global interpreter lock} ! \item[global interpreter lock]{the lock used by Python threads to assure ! that only one thread can be run at a time. This simplifies Python by ! assuring that no two processes can access the same memory at the same time. ! Locking the entire interpreter makes it easier for the interpreter to be multi-threaded, at the expense of some parallelism on multi-processor ! machines. Efforts have been made in the past to create a "free-threaded" ! interpreter (one which locks shared data at a much finer granularity), but ! performance suffered in the common single-processor case.} \index{IDLE} ! \item[IDLE]{an Integrated Development Environment for Python. IDLE is a basic editor and interpreter environment that ships with the standard distribution of Python. Good for beginners, it also serves as clear example code for those wanting to implement a moderately ! sophisticated, multi-platform GUI application.} \index{immutable} ! \item[immutable]{A object with fixed value. Immutable objects are numbers, ! strings or tuples (and more). Such an object cannot be altered. A new object has to be created if a different value has to be stored. They play an ! important role in places where a constant hash value is needed. For example ! as a key in a dictionary.} \index{integer division} ! \item[integer division]{Mathematical division discarding any remainder. For ! example, the expression \code{11 / 4} currently evaluates to \code{2} in ! contrast to the \code{2.75} returned by float division. Also called ! \emph{floor division}. When dividing two integers the outcome will always be ! another integer (having the floor function applied to it). However, if one ! of the operands is another numeric type (such as a \class{float}), the result ! will be coerced (see \emph{coercion}) to a common type. For example, a integer ! divided by a float will result in a float value, possibly with a decimal ! fraction. Integer division can be forced by using the \code{//} operator ! instead of the \code{/} operator. ! See also, \emph{__future__}.} \index{interactive} ! \item[interactive]{Python has an interactive interpreter which means that ! you can try out things and directly see its result. Just launch ! {}\code{python} with no arguments (possibly by selecting it from your ! computer's main menu). It is a very powerful way to test out new ideas or ! inspect modules and packages (remember \code{help(x)}).} \index{interpreted} ! \item[interpreted]{Python is an interpreted language, opposed to a compiled ! one. This means that the source files can be run right away without first ! making an executable which is then run. Interpreted languages typically have a shorter development/debug cycle than compiled ones. See also ! {}\emph{interactive}.} \index{iterable} ! \item[iterable]{A container object capable of returning its members one at a ! time. Examples of iterables include all sequence types (such as\class{list}, {}\class{str}, and \class{tuple}) and some non-sequence types like ! {}\class{dict} and \class{file} and objects of any classes you define with ! an \method{__iter__} or \function{__getitem__} method. Iterables can be ! used in a \keyword{for} loop and in many other places where a sequence is ! needed (\function{zip}, \function{map}, ...). When an iterable object is ! passed as an argument to the builtin function \function{iter()}, it returns ! an iterator for the object. This iterator is good for one pass over the set ! of values. When using iterables, it is usually not necessary to call ! {}\function{iter()} or deal with iterator objects yourself - the \code{for} ! statement does that automatically for you, creating a temporary unnamed ! variable to hold the iterator for the duration of the loop. See also ! \emph{iterator}, \emph{sequence} and \emph{generator}.} \index{iterator} ! \item[iterator]{An object representing a stream of data. Repeated calls to ! the iterator's \function{next()} method return successive items in the stream. When no more data is available a \exception{StopIteration} ! exception is raised instead. At this point, the iterator object is exhausted ! and any further calls to its \function{next()} method just raise ! {}\exception{StopIteration} again. Iterators are required to have an ! {}\function{__iter__()} method that returns the iterator object itself so ! every iterator is also iterable and may be used in most places where other ! iterables are accepted. One notable exception is code that attempts ! multiple iteration passes. A container object (such as a \class{list}) ! produces a fresh new iterator each time you pass it to the \function{iter()} ! function or use it in a \function{for} loop. Attempting this with an iterator ! will just return the same exhausted iterator object from the second iteration ! pass, making it appear like an empty container.} \index{list comprehension} ! \item[list comprehension]{A compact way to process all or a subset of elements ! in a sequence and return a list with the results. \code{result = ["0x\%02x" \% x for x in range(256) if x \% 2 == 0]} generates a list of strings containing hex numbers (0x..) that are even and in the range from 0 to 255. The \keyword{if} clause is optional. If omitted, all elements in ! {}\code{range(256)} are processed in that case.} \index{mapping} ! \item[mapping]{A container object (such as \class{dict}) that supports ! arbitrary key lookups using the special method \function{__getitem__()}.} \index{metaclass} ! \item[metaclass]{The class of a class. Class definitions create a class ! name, a class dictionary, and a list of base classes. The metaclass is ! responsible for taking those three arguments and creating the class. Most ! object oriented programming languages provide a default implementation. ! What makes Python special is that it is possible to create custom ! metaclasses. Most users never need this tool, but when the need arises, ! metaclasses can provide powerful, elegant solutions. They have been used ! for logging attribute access, adding thread-safety, tracking object ! creation, implementing singletons, and many other tasks.} \index{LBYL} ! \item[LBYL]{Look before you leap. This coding style explicitly tests for ! pre-conditions before making calls or lookups. This style contrasts with ! the \emph{EAFP} approach and is characterized the presence of many ! {}\keyword{if} statements.} \index{mutable} ! \item[mutable]{Mutable objects can change their value but keep their ! \function{id()}. See also immutable.} \index{namespace} ! \item[namespace]{The place where a variable is stored. Namespaces are ! implemented as dictionary. There is the local, global and builtins ! namespace and the nested namespaces in objects (in methods). Namespaces ! support modularity by preventing naming conflicts. For instance, the ! functions \function{__builtins__.open()} and \function{os.open()} are ! distinguished by their namespaces. Namespaces also aid readability and ! maintainability by making it clear which modules implement a function. For ! instance, writing \function{random.seed()} or \function{itertools.izip()} ! makes it clear that those functions are implemented by the \module{random} ! and \module{itertools} modules respectively.} \index{nested scope} ! \item[nested scope]{The ability to refer to a variable in an enclosing ! definition. For instance, a function defined inside another function can ! refer to variables in the outer function. Note that nested scopes work only for reference and not for assignment which will always write to the ! innermost scope. In contrast, local variables both read and write in the ! innermost scope. Likewise, global variables read and write to the global ! namespace.} \index{new-style class} ! \item[new-style class]{Any class that inherits from \class{object}. This ! includes all built-in types like \class{list} and \class{dict}. Only ! new-style classes can use Python's newer, versatile features like ! {}\var{__slots__}, descriptors, properties, \var{__getattribute__}, class ! methods, and static methods.} \index{Python3000} ! \item[Python3000]{A mythical python release, allowed not to be backward ! compatible, with telepathic interface.} \index{sequence} ! \item[sequence]{An \emph{iterable} which supports efficient element access using ! integer indices via the \function{__getitem__} and \function{__len()__} ! special methods. Some builtin sequence types are \class{list}, \class{str}, ! {}\class{tuple}, and \class{unicode}. Note that \class{dict} also supports ! {}\function{__getitem__} and \function{__len__}, but is considered a mapping ! rather than a sequence because the lookups use arbitrary \emph{immutable} keys ! rather than integers.} \index{Zen of Python} ! \item[Zen of Python]{listing of Python design principles and philosophies ! that are helpful in understanding and using the language. The listing can ! be found by typing \code{import this} at the interactive prompt.} \end{description} --- 106,309 ---- \index{generator} ! \item[generator] ! A function that returns an iterator. It looks like a normal function ! except that the \keyword{yield} keyword is used instead of {}\keyword{return}. Generator functions often contain one or more ! {}\keyword{for} or \keyword{while} loops that \keyword{yield} elements ! back to the caller. The function execution is stopped at the ! {}\keyword{yield} keyword (returning the result) and is resumed there ! when the next element is requested by calling the \method{next()} ! method of the returned iterator. \index{GIL} ! \item[GIL] ! See \emph{global interpreter lock}. \index{global interpreter lock} ! \item[global interpreter lock] ! The lock used by Python threads to assure that only one thread can be ! run at a time. This simplifies Python by assuring that no two ! processes can access the same memory at the same time. Locking the ! entire interpreter makes it easier for the interpreter to be multi-threaded, at the expense of some parallelism on multi-processor ! machines. Efforts have been made in the past to create a ! "free-threaded" interpreter (one which locks shared data at a much ! finer granularity), but performance suffered in the common ! single-processor case. \index{IDLE} ! \item[IDLE] ! An Integrated Development Environment for Python. IDLE is a basic editor and interpreter environment that ships with the standard distribution of Python. Good for beginners, it also serves as clear example code for those wanting to implement a moderately ! sophisticated, multi-platform GUI application. \index{immutable} ! \item[immutable] ! A object with fixed value. Immutable objects are numbers, strings or ! tuples (and more). Such an object cannot be altered. A new object has to be created if a different value has to be stored. They play an ! important role in places where a constant hash value is needed. For ! example as a key in a dictionary. \index{integer division} ! \item[integer division] ! Mathematical division discarding any remainder. For example, the ! expression \code{11 / 4} currently evaluates to \code{2} in contrast ! to the \code{2.75} returned by float division. Also called ! {}\emph{floor division}. When dividing two integers the outcome will ! always be another integer (having the floor function applied to it). ! However, if one of the operands is another numeric type (such as a ! {}\class{float}), the result will be coerced (see \emph{coercion}) to ! a common type. For example, a integer divided by a float will result ! in a float value, possibly with a decimal fraction. Integer division ! can be forced by using the \code{//} operator instead of the \code{/} ! operator. See also \emph{__future__}. \index{interactive} ! \item[interactive] ! Python has an interactive interpreter which means that you can try out ! things and directly see its result. Just launch \code{python} with no ! arguments (possibly by selecting it from your computer's main menu). ! It is a very powerful way to test out new ideas or inspect modules and ! packages (remember \code{help(x)}). \index{interpreted} ! \item[interpreted] ! Python is an interpreted language, opposed to a compiled one. This ! means that the source files can be run right away without first making ! an executable which is then run. Interpreted languages typically have a shorter development/debug cycle than compiled ones. See also ! {}\emph{interactive}. \index{iterable} ! \item[iterable] ! A container object capable of returning its members one at a time. ! Examples of iterables include all sequence types (such as\class{list}, {}\class{str}, and \class{tuple}) and some non-sequence types like ! {}\class{dict} and \class{file} and objects of any classes you define ! with an \method{__iter__()} or \method{__getitem__()} method. Iterables ! can be used in a \keyword{for} loop and in many other places where a ! sequence is needed (\function{zip()}, \function{map()}, ...). When an ! iterable object is passed as an argument to the builtin function ! {}\function{iter()}, it returns an iterator for the object. This ! iterator is good for one pass over the set of values. When using ! iterables, it is usually not necessary to call \function{iter()} or ! deal with iterator objects yourself---the \code{for} statement does ! that automatically for you, creating a temporary unnamed variable to ! hold the iterator for the duration of the loop. See also ! {}\emph{iterator}, \emph{sequence}, and \emph{generator}. \index{iterator} ! \item[iterator] ! An object representing a stream of data. Repeated calls to the ! iterator's \method{next()} method return successive items in the stream. When no more data is available a \exception{StopIteration} ! exception is raised instead. At this point, the iterator object is ! exhausted and any further calls to its \method{next()} method just ! raise \exception{StopIteration} again. Iterators are required to have ! an \method{__iter__()} method that returns the iterator object ! itself so every iterator is also iterable and may be used in most ! places where other iterables are accepted. One notable exception is ! code that attempts multiple iteration passes. A container object ! (such as a \class{list}) produces a fresh new iterator each time you ! pass it to the \function{iter()} function or use it in a ! {}\keyword{for} loop. Attempting this with an iterator will just ! return the same exhausted iterator object from the second iteration ! pass, making it appear like an empty container. \index{list comprehension} ! \item[list comprehension] ! A compact way to process all or a subset of elements in a sequence and ! return a list with the results. \code{result = ["0x\%02x" \% x for x in range(256) if x \% 2 == 0]} generates a list of strings containing hex numbers (0x..) that are even and in the range from 0 to 255. The \keyword{if} clause is optional. If omitted, all elements in ! {}\code{range(256)} are processed in that case. \index{mapping} ! \item[mapping] ! A container object (such as \class{dict}) that supports arbitrary key ! lookups using the special method \method{__getitem__()}. \index{metaclass} ! \item[metaclass] ! The class of a class. Class definitions create a class name, a class ! dictionary, and a list of base classes. The metaclass is responsible ! for taking those three arguments and creating the class. Most object ! oriented programming languages provide a default implementation. What ! makes Python special is that it is possible to create custom ! metaclasses. Most users never need this tool, but when the need ! arises, metaclasses can provide powerful, elegant solutions. They ! have been used for logging attribute access, adding thread-safety, ! tracking object creation, implementing singletons, and many other ! tasks. \index{LBYL} ! \item[LBYL] ! Look before you leap. This coding style explicitly tests for ! pre-conditions before making calls or lookups. This style contrasts ! with the \emph{EAFP} approach and is characterized the presence of ! many \keyword{if} statements. \index{mutable} ! \item[mutable] ! Mutable objects can change their value but keep their \function{id()}. ! See also \emph{immutable}. \index{namespace} ! \item[namespace] ! The place where a variable is stored. Namespaces are implemented as ! dictionary. There is the local, global and builtins namespace and the ! nested namespaces in objects (in methods). Namespaces support ! modularity by preventing naming conflicts. For instance, the ! functions \function{__builtin__.open()} and \function{os.open()} are ! distinguished by their namespaces. Namespaces also aid readability ! and maintainability by making it clear which modules implement a ! function. For instance, writing \function{random.seed()} or ! {}\function{itertools.izip()} makes it clear that those functions are ! implemented by the \refmodule{random} and \refmodule{itertools} ! modules respectively. \index{nested scope} ! \item[nested scope] ! The ability to refer to a variable in an enclosing definition. For ! instance, a function defined inside another function can refer to ! variables in the outer function. Note that nested scopes work only for reference and not for assignment which will always write to the ! innermost scope. In contrast, local variables both read and write in ! the innermost scope. Likewise, global variables read and write to the ! global namespace. \index{new-style class} ! \item[new-style class] ! Any class that inherits from \class{object}. This includes all ! built-in types like \class{list} and \class{dict}. Only new-style ! classes can use Python's newer, versatile features like ! {}\var{__slots__}, descriptors, properties, ! \method{__getattribute__()}, class methods, and static methods. \index{Python3000} ! \item[Python3000] ! A mythical python release, allowed not to be backward compatible, with ! telepathic interface. \index{sequence} ! \item[sequence] ! An \emph{iterable} which supports efficient element access using ! integer indices via the \method{__getitem__()} and ! {}\method{__len__()} special methods. Some built-in sequence types ! are \class{list}, \class{str}, \class{tuple}, and \class{unicode}. ! Note that \class{dict} also supports \method{__getitem__()} and ! {}\method{__len__()}, but is considered a mapping rather than a ! sequence because the lookups use arbitrary \emph{immutable} keys ! rather than integers. \index{Zen of Python} ! \item[Zen of Python] ! Listing of Python design principles and philosophies that are helpful ! in understanding and using the language. The listing can be found by ! typing \code{import this} at the interactive prompt. \end{description} From theller at users.sourceforge.net Sat Sep 27 15:32:06 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Sat Sep 27 15:32:09 2003 Subject: [Python-checkins] python/dist/src/Doc README,1.51,1.52 Message-ID: <E1A3KnW-0001OM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv5341 Modified Files: README Log Message: Typo: documnetation -> documentation Will backport to 2.3 Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/README,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** README 27 Sep 2003 07:16:32 -0000 1.51 --- README 27 Sep 2003 19:32:04 -0000 1.52 *************** *** 33,37 **** There's a Makefile to call LaTeX and the other utilities in the right order and the right number of times. By default, it will build the ! HTML version of the documnetation, but DVI, PDF, and PostScript can also be made. To view the generated HTML, point your favorite browser at the top-level index (html/index.html) after running "make". --- 33,37 ---- There's a Makefile to call LaTeX and the other utilities in the right order and the right number of times. By default, it will build the ! HTML version of the documentation, but DVI, PDF, and PostScript can also be made. To view the generated HTML, point your favorite browser at the top-level index (html/index.html) after running "make". From theller at users.sourceforge.net Sat Sep 27 15:35:40 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Sat Sep 27 15:35:43 2003 Subject: [Python-checkins] python/dist/src/Doc/tools mkhowto,1.40,1.41 Message-ID: <E1A3Kqy-0001WE-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv5830 Modified Files: mkhowto Log Message: re.sub expands escape sequences in it's second argument. Will backport to 2.3 myself. Index: mkhowto =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** mkhowto 27 Sep 2003 07:05:12 -0000 1.40 --- mkhowto 27 Sep 2003 19:35:37 -0000 1.41 *************** *** 209,213 **** elif opt == "--dir": if os.sep == "\\": ! arg = re.sub("/", "\\", arg) self.builddir = os.path.expanduser(arg) elif opt == "--paper": --- 209,213 ---- elif opt == "--dir": if os.sep == "\\": ! arg = re.sub("/", "\\\\", arg) self.builddir = os.path.expanduser(arg) elif opt == "--paper": From theller at users.sourceforge.net Sat Sep 27 15:36:28 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Sat Sep 27 15:36:31 2003 Subject: [Python-checkins] python/dist/src/Doc README,1.49.8.2,1.49.8.3 Message-ID: <E1A3Krk-0001YQ-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv5970 Modified Files: Tag: release23-maint README Log Message: Typo: documnetation -> documentation Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/README,v retrieving revision 1.49.8.2 retrieving revision 1.49.8.3 diff -C2 -d -r1.49.8.2 -r1.49.8.3 *** README 27 Sep 2003 07:16:09 -0000 1.49.8.2 --- README 27 Sep 2003 19:36:26 -0000 1.49.8.3 *************** *** 33,37 **** There's a Makefile to call LaTeX and the other utilities in the right order and the right number of times. By default, it will build the ! HTML version of the documnetation, but DVI, PDF, and PostScript can also be made. To view the generated HTML, point your favorite browser at the top-level index (html/index.html) after running "make". --- 33,37 ---- There's a Makefile to call LaTeX and the other utilities in the right order and the right number of times. By default, it will build the ! HTML version of the documentation, but DVI, PDF, and PostScript can also be made. To view the generated HTML, point your favorite browser at the top-level index (html/index.html) after running "make". From theller at users.sourceforge.net Sat Sep 27 15:38:27 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Sat Sep 27 15:38:30 2003 Subject: [Python-checkins] python/dist/src/Doc/tools mkhowto, 1.39.10.1, 1.39.10.2 Message-ID: <E1A3Ktf-0001eD-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv6317 Modified Files: Tag: release23-maint mkhowto Log Message: re.sub expands escape sequences in it's second argument. Index: mkhowto =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v retrieving revision 1.39.10.1 retrieving revision 1.39.10.2 diff -C2 -d -r1.39.10.1 -r1.39.10.2 *** mkhowto 27 Sep 2003 07:05:44 -0000 1.39.10.1 --- mkhowto 27 Sep 2003 19:38:25 -0000 1.39.10.2 *************** *** 209,213 **** elif opt == "--dir": if os.sep == "\\": ! arg = re.sub("/", "\\", arg) self.builddir = os.path.expanduser(arg) elif opt == "--paper": --- 209,213 ---- elif opt == "--dir": if os.sep == "\\": ! arg = re.sub("/", "\\\\", arg) self.builddir = os.path.expanduser(arg) elif opt == "--paper": From theller at users.sourceforge.net Sat Sep 27 16:01:36 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Sat Sep 27 16:01:43 2003 Subject: [Python-checkins] python/dist/src/PC python_nt.rc, 1.27.4.1, 1.27.4.2 Message-ID: <E1A3LG4-0002nh-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory sc8-pr-cvs1:/tmp/cvs-serv10757 Modified Files: Tag: release23-maint python_nt.rc Log Message: Version number 2.3.2c1 Index: python_nt.rc =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/python_nt.rc,v retrieving revision 1.27.4.1 retrieving revision 1.27.4.2 diff -C2 -d -r1.27.4.1 -r1.27.4.2 *** python_nt.rc 23 Sep 2003 20:25:43 -0000 1.27.4.1 --- python_nt.rc 27 Sep 2003 20:01:34 -0000 1.27.4.2 *************** *** 34,45 **** * following comment and #define are output from PCbuild\field3.py: * ! * For 2.3.1, ! * PY_MICRO_VERSION = 1 ! * PY_RELEASE_LEVEL = 'final' = 0xf ! * PY_RELEASE_SERIAL = 0 * ! * and 1*1000 + 15*10 + 0 = 1150 */ ! #define FIELD3 1150 /* e.g., 2.1a2 --- 34,45 ---- * following comment and #define are output from PCbuild\field3.py: * ! * For 2.3.2c1, ! * PY_MICRO_VERSION = 2 ! * PY_RELEASE_LEVEL = 'candidate' = 0xc ! * PY_RELEASE_SERIAL = 1 * ! * and 2*1000 + 12*10 + 1 = 2121 */ ! #define FIELD3 2121 /* e.g., 2.1a2 From theller at users.sourceforge.net Sat Sep 27 16:02:45 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Sat Sep 27 16:02:48 2003 Subject: [Python-checkins] python/dist/src/PCbuild pythoncore.dsp, 1.48.4.1, 1.48.4.2 BUILDno.txt, 1.51.4.1, 1.51.4.2 Message-ID: <E1A3LHB-0002qk-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory sc8-pr-cvs1:/tmp/cvs-serv10937 Modified Files: Tag: release23-maint pythoncore.dsp BUILDno.txt Log Message: The windows build number for 2.3.2c1 is 48. Index: pythoncore.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/pythoncore.dsp,v retrieving revision 1.48.4.1 retrieving revision 1.48.4.2 diff -C2 -d -r1.48.4.1 -r1.48.4.2 *** pythoncore.dsp 23 Sep 2003 20:24:21 -0000 1.48.4.1 --- pythoncore.dsp 27 Sep 2003 20:02:42 -0000 1.48.4.2 *************** *** 259,263 **** SOURCE=..\Modules\getbuildinfo.c ! # ADD CPP /D BUILD=47 # End Source File # Begin Source File --- 259,263 ---- SOURCE=..\Modules\getbuildinfo.c ! # ADD CPP /D BUILD=48 # End Source File # Begin Source File Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.51.4.1 retrieving revision 1.51.4.2 diff -C2 -d -r1.51.4.1 -r1.51.4.2 *** BUILDno.txt 23 Sep 2003 20:24:21 -0000 1.51.4.1 --- BUILDno.txt 27 Sep 2003 20:02:42 -0000 1.51.4.2 *************** *** 34,37 **** --- 34,39 ---- Windows Python BUILD numbers ---------------------------- + 48 2.3.2c1 + 30-Sep-2003 47 2.3.1 (final) 23-Sep-2003 From theller at users.sourceforge.net Sat Sep 27 16:04:01 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Sat Sep 27 16:04:04 2003 Subject: [Python-checkins] python/dist/src/PCbuild BUILDno.txt,1.52,1.53 Message-ID: <E1A3LIP-0002vA-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory sc8-pr-cvs1:/tmp/cvs-serv11217 Modified Files: BUILDno.txt Log Message: The windows build number for 2.3.2c1 is 48 Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** BUILDno.txt 23 Sep 2003 20:54:48 -0000 1.52 --- BUILDno.txt 27 Sep 2003 20:03:59 -0000 1.53 *************** *** 34,37 **** --- 34,39 ---- Windows Python BUILD numbers ---------------------------- + 48 2.3.2c1 + 30-Sep-2003 47 2.3.1 (final) 23-Sep-2003 From rhettinger at users.sourceforge.net Sat Sep 27 16:19:04 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 27 16:19:07 2003 Subject: [Python-checkins] python/dist/src/Doc/tut glossary.tex,1.3,1.4 Message-ID: <E1A3LWy-0003pY-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1:/tmp/cvs-serv13652 Modified Files: glossary.tex Log Message: * Fix markup. * Fix entry order: - >>> before ... - __slots__ in the S section (like __future__ is in the F section) Need to test the repaired(?) link to Guido's webpage. Still needs to have the module reference links made relative to the module directory instead of the tut directory. That will require Fred's magic touch. Index: glossary.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/glossary.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** glossary.tex 27 Sep 2003 18:59:43 -0000 1.3 --- glossary.tex 27 Sep 2003 20:19:02 -0000 1.4 *************** *** 6,13 **** \begin{description} - \index{...} - \item[\code{.\code{.}.}] - The typical Python prompt of the interactive shell when entering code - for an indented code block. \index{>>>} --- 6,9 ---- *************** *** 16,31 **** code examples that can be tried right away in the interpreter. ! \index{__slots__} ! \item[__slots__] ! A declaration inside a \emph{new-style class} that saves memory by ! pre-declaring space for instance attributes and eliminating instance ! dictionaries. Though popular, the technique is somewhat tricky to get ! right and is best reserved for rare cases where there are large ! numbers of instances in a memory critical application. \index{BDFL} \item[BDFL] Benevolent Dictator For Life, a.k.a. \ulink{Guido van ! Rossum}{http://www.python.org/~guido/}, Python's creator. \index{byte code} --- 12,24 ---- code examples that can be tried right away in the interpreter. ! \index{...} ! \item[\code{.\code{.}.}] ! The typical Python prompt of the interactive shell when entering code ! for an indented code block. \index{BDFL} \item[BDFL] Benevolent Dictator For Life, a.k.a. \ulink{Guido van ! Rossum}{http://www.python.org/\textasciitilde{}guido/}, Python's creator. \index{byte code} *************** *** 35,40 **** files so that executing the same file is faster the second time (compilation from source to byte code can be saved). This ! \emph{intermediate language} is said to run on a \emph{virtual ! machine} that calls the subroutines corresponding to each bytecode. \index{classic class} --- 28,33 ---- files so that executing the same file is faster the second time (compilation from source to byte code can be saved). This ! ``intermediate language'' is said to run on a ``virtual ! machine'' that calls the subroutines corresponding to each bytecode. \index{classic class} *************** *** 48,53 **** {}\code{int(3.15)} coerces the floating point number to the integer, {}\code{3}. Most mathematical operations have rules for coercing ! their arguments to a common type. For instance, adding \code{3 + ! 4.5}, causes the integer \code{3} to be coerced to be a float {}\code{3.0} before adding to \code{4.5} resulting in the float {}\code{7.5}. --- 41,46 ---- {}\code{int(3.15)} coerces the floating point number to the integer, {}\code{3}. Most mathematical operations have rules for coercing ! their arguments to a common type. For instance, adding \code{3+4.5}, ! causes the integer \code{3} to be coerced to be a float {}\code{3.0} before adding to \code{4.5} resulting in the float {}\code{7.5}. *************** *** 86,91 **** A pseudo module which programmers can use to enable new language features which are not compatible with the current interpreter. For ! example, the expression \code{11 / 4} currently evaluates to \code{2}. ! If the module in which it is executed had enabled emph{true division} by executing: --- 79,84 ---- A pseudo module which programmers can use to enable new language features which are not compatible with the current interpreter. For ! example, the expression \code{11/4} currently evaluates to \code{2}. ! If the module in which it is executed had enabled \emph{true division} by executing: *************** *** 94,98 **** \end{verbatim} ! the expression \code{11 / 4} would evaluate to \code{2.75}. By actually importing the \refmodule[future]{__future__} module and evaluating its variables, you can see when a new feature was first --- 87,91 ---- \end{verbatim} ! the expression \code{11/4} would evaluate to \code{2.75}. By actually importing the \refmodule[future]{__future__} module and evaluating its variables, you can see when a new feature was first *************** *** 128,132 **** multi-threaded, at the expense of some parallelism on multi-processor machines. Efforts have been made in the past to create a ! "free-threaded" interpreter (one which locks shared data at a much finer granularity), but performance suffered in the common single-processor case. --- 121,125 ---- multi-threaded, at the expense of some parallelism on multi-processor machines. Efforts have been made in the past to create a ! ``free-threaded'' interpreter (one which locks shared data at a much finer granularity), but performance suffered in the common single-processor case. *************** *** 151,155 **** \item[integer division] Mathematical division discarding any remainder. For example, the ! expression \code{11 / 4} currently evaluates to \code{2} in contrast to the \code{2.75} returned by float division. Also called {}\emph{floor division}. When dividing two integers the outcome will --- 144,148 ---- \item[integer division] Mathematical division discarding any remainder. For example, the ! expression \code{11/4} currently evaluates to \code{2} in contrast to the \code{2.75} returned by float division. Also called {}\emph{floor division}. When dividing two integers the outcome will *************** *** 181,185 **** \item[iterable] A container object capable of returning its members one at a time. ! Examples of iterables include all sequence types (such as\class{list}, {}\class{str}, and \class{tuple}) and some non-sequence types like {}\class{dict} and \class{file} and objects of any classes you define --- 174,178 ---- \item[iterable] A container object capable of returning its members one at a time. ! Examples of iterables include all sequence types (such as \class{list}, {}\class{str}, and \class{tuple}) and some non-sequence types like {}\class{dict} and \class{file} and objects of any classes you define *************** *** 191,195 **** iterator is good for one pass over the set of values. When using iterables, it is usually not necessary to call \function{iter()} or ! deal with iterator objects yourself---the \code{for} statement does that automatically for you, creating a temporary unnamed variable to hold the iterator for the duration of the loop. See also --- 184,188 ---- iterator is good for one pass over the set of values. When using iterables, it is usually not necessary to call \function{iter()} or ! deal with iterator objects yourself. The \code{for} statement does that automatically for you, creating a temporary unnamed variable to hold the iterator for the duration of the loop. See also *************** *** 282,286 **** built-in types like \class{list} and \class{dict}. Only new-style classes can use Python's newer, versatile features like ! {}\var{__slots__}, descriptors, properties, \method{__getattribute__()}, class methods, and static methods. --- 275,279 ---- built-in types like \class{list} and \class{dict}. Only new-style classes can use Python's newer, versatile features like ! {}\method{__slots__}, descriptors, properties, \method{__getattribute__()}, class methods, and static methods. *************** *** 290,293 **** --- 283,294 ---- telepathic interface. + \index{__slots__} + \item[__slots__] + A declaration inside a \emph{new-style class} that saves memory by + pre-declaring space for instance attributes and eliminating instance + dictionaries. Though popular, the technique is somewhat tricky to get + right and is best reserved for rare cases where there are large + numbers of instances in a memory critical application. + \index{sequence} \item[sequence] *************** *** 305,309 **** Listing of Python design principles and philosophies that are helpful in understanding and using the language. The listing can be found by ! typing \code{import this} at the interactive prompt. \end{description} --- 306,310 ---- Listing of Python design principles and philosophies that are helpful in understanding and using the language. The listing can be found by ! typing ``\code{import this}'' at the interactive prompt. \end{description} From fdrake at users.sourceforge.net Sat Sep 27 18:07:07 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 18:07:10 2003 Subject: [Python-checkins] python/dist/src/Doc/commontex .cvsignore, NONE, 1.1 boilerplate.tex, 1.1, 1.2 Message-ID: <E1A3NDX-0000gm-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/commontex In directory sc8-pr-cvs1:/tmp/cvs-serv2614/commontex Modified Files: boilerplate.tex Added Files: .cvsignore Log Message: Load the version information from ../Include/patchlevel.h, so there are fewer changes to make to version numbers after a release. --- NEW FILE: .cvsignore --- patchlevel.tex Index: boilerplate.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/commontex/boilerplate.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** boilerplate.tex 27 Sep 2003 07:11:17 -0000 1.1 --- boilerplate.tex 27 Sep 2003 22:07:05 -0000 1.2 *************** *** 7,11 **** \date{\today} % XXX update before final release! ! \release{2.4} % software release, not documentation ! \setreleaseinfo{a0} % empty for final release ! \setshortversion{2.4} % major.minor only for software --- 7,9 ---- \date{\today} % XXX update before final release! ! \input{patchlevel} % include Python version information From fdrake at users.sourceforge.net Sat Sep 27 18:07:06 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 18:07:15 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile, 1.269, 1.270 Makefile.deps, 1.113, 1.114 Message-ID: <E1A3NDW-0000gc-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv2614 Modified Files: Makefile Makefile.deps Log Message: Load the version information from ../Include/patchlevel.h, so there are fewer changes to make to version numbers after a release. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.269 retrieving revision 1.270 diff -C2 -d -r1.269 -r1.270 *** Makefile 27 Sep 2003 07:48:25 -0000 1.269 --- Makefile 27 Sep 2003 22:07:04 -0000 1.270 *************** *** 65,71 **** TOOLSDIR= tools ! # This is the *documentation* release, and is used to construct the file ! # names of the downloadable tarballs. ! RELEASE=2.4a0 PYTHON= python --- 65,76 ---- TOOLSDIR= tools ! # This is the *documentation* release, and is used to construct the ! # file names of the downloadable tarballs. It is initialized by the ! # getversioninfo script to ensure that the right version number is ! # used; the script will also write commontex/patchlevel.tex if that ! # doesn't exist or needs to be changed. Documents which depend on the ! # version number should use \input{patchlevel} and include ! # commontex/patchlevel.tex in their dependencies. ! RELEASE=$(shell $(PYTHON) tools/getversioninfo) PYTHON= python Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** Makefile.deps 27 Sep 2003 07:11:16 -0000 1.113 --- Makefile.deps 27 Sep 2003 22:07:04 -0000 1.114 *************** *** 8,11 **** --- 8,12 ---- COMMONTEX=commontex/copyright.tex \ commontex/license.tex \ + commontex/patchlevel.tex \ commontex/boilerplate.tex From fdrake at users.sourceforge.net Sat Sep 27 18:07:07 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 18:07:20 2003 Subject: [Python-checkins] python/dist/src/Doc/tools getversioninfo, NONE, 1.1 mksourcepkg, 1.6, 1.7 Message-ID: <E1A3NDX-0000gf-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv2614/tools Modified Files: mksourcepkg Added Files: getversioninfo Log Message: Load the version information from ../Include/patchlevel.h, so there are fewer changes to make to version numbers after a release. --- NEW FILE: getversioninfo --- #! /usr/bin/env python import os import re import sys try: __file__ except NameError: __file__ = sys.argv[0] tools = os.path.dirname(os.path.abspath(__file__)) Doc = os.path.dirname(tools) src = os.path.dirname(Doc) patchlevel_h = os.path.join(src, "Include", "patchlevel.h") # This won't pick out all #defines, but it will pick up the ones we # care about. rx = re.compile(r"\s*#define\s+([a-zA-Z][a-zA-Z_0-9]*)\s+([a-zA-Z_0-9]+)") d = {} f = open(patchlevel_h) for line in f: m = rx.match(line) if m is not None: name, value = m.group(1, 2) d[name] = value f.close() release = "%s.%s" % (d["PY_MAJOR_VERSION"], d["PY_MINOR_VERSION"]) micro = int(d["PY_MICRO_VERSION"]) shortversion = release if micro != 0: release += "." + str(micro) level = d["PY_RELEASE_LEVEL"] suffixes = { "PY_RELEASE_LEVEL_ALPHA": "a", "PY_RELEASE_LEVEL_BETA": "b", "PY_RELEASE_LEVEL_GAMMA": "c", } releaseinfo = "" if level != "PY_RELEASE_LEVEL_FINAL": releaseinfo = suffixes[level] + str(int(d["PY_RELEASE_SERIAL"])) def write_file(name, text): """Write text to a file if the file doesn't exist or if text differs from any existing content.""" if os.path.exists(name): f = open(name, "r") s = f.read() f.close() if s == text: return f = open(name, "w") f.write(text) f.close() patchlevel_tex = os.path.join(Doc, "commontex", "patchlevel.tex") Makefile_version = os.path.join(Doc, "Makefile.version") write_file(patchlevel_tex, "%% This file is generated by ../tools/getversioninfo;\n" "%% do not edit manually.\n" "\n" "\\release{%s}\n" "\\setreleaseinfo{%s}\n" "\\setshortversion{%s}\n" % (release, releaseinfo, shortversion)) print release + releaseinfo Index: mksourcepkg =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mksourcepkg,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mksourcepkg 9 Aug 2002 20:20:50 -0000 1.6 --- mksourcepkg 27 Sep 2003 22:07:04 -0000 1.7 *************** *** 27,30 **** --- 27,38 ---- import cvsinfo + try: + __file__ + except NameError: + __file__ = sys.argv[0] + + tools = os.path.dirname(os.path.abspath(__file__)) + Doc = os.path.dirname(tools) + patchlevel_tex = os.path.join(Doc, "commontex", "patchlevel.tex") quiet = 0 *************** *** 103,108 **** for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'): map(shutil.rmtree, glob.glob(p)) ! for f in ('.cvsignore', '*/.cvsignore'): ! map(os.unlink, glob.glob(f)) LICENSE = os.path.normpath( os.path.join(mydir, os.pardir, os.pardir, "LICENSE")) --- 111,127 ---- for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'): map(shutil.rmtree, glob.glob(p)) ! for f in ('.cvsignore', '*/.cvsignore'): ! map(os.unlink, glob.glob(f)) ! ! # Copy in the version informtation, if we're not just going to ! # rip it back out: ! if not tools: ! if not os.path.exists(patchlevel_tex): ! run(os.path.join(here, "getversioninfo")) ! dest = os.path.join("Python-Docs-" + release, "commontex", ! "patchlevel.tex") ! shutil.copyfile(patchlevel_tex, dest) ! ! # Copy in the license file: LICENSE = os.path.normpath( os.path.join(mydir, os.pardir, os.pardir, "LICENSE")) *************** *** 112,116 **** # we don't want the actual documents in this case: for d in ("api", "dist", "doc", "ext", "inst", ! "lib", "mac", "ref", "tut"): shutil.rmtree(os.path.join(pkgdir, d)) else: --- 131,135 ---- # we don't want the actual documents in this case: for d in ("api", "dist", "doc", "ext", "inst", ! "lib", "mac", "ref", "tut", "commontex"): shutil.rmtree(os.path.join(pkgdir, d)) else: From greg at users.sourceforge.net Sat Sep 27 19:00:25 2003 From: greg at users.sourceforge.net (greg@users.sourceforge.net) Date: Sat Sep 27 19:00:29 2003 Subject: [Python-checkins] python/dist/src/Lib/bsddb __init__.py,1.9,1.10 Message-ID: <E1A3O37-00036S-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/bsddb In directory sc8-pr-cvs1:/tmp/cvs-serv11621/bsddb Modified Files: __init__.py Log Message: Use a threadsafe private DBEnv for each bsddb compatibility interface db that is opened. DB_THREAD and DB_INIT_LOCK allow for multithreaded access. DB_PRIVATE prevents the DBEnv from using the filesystem (making it only usable by this process; and in this implementation using one DBEnv per bsddb database) Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/__init__.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** __init__.py 21 Sep 2003 00:08:14 -0000 1.9 --- __init__.py 27 Sep 2003 23:00:19 -0000 1.10 *************** *** 190,194 **** flags = _checkflag(flag) ! d = db.DB() d.set_flags(hflags) if cachesize is not None: d.set_cachesize(0, cachesize) --- 190,195 ---- flags = _checkflag(flag) ! e = _openDBEnv() ! d = db.DB(e) d.set_flags(hflags) if cachesize is not None: d.set_cachesize(0, cachesize) *************** *** 207,211 **** flags = _checkflag(flag) ! d = db.DB() if cachesize is not None: d.set_cachesize(0, cachesize) if pgsize is not None: d.set_pagesize(pgsize) --- 208,213 ---- flags = _checkflag(flag) ! e = _openDBEnv() ! d = db.DB(e) if cachesize is not None: d.set_cachesize(0, cachesize) if pgsize is not None: d.set_pagesize(pgsize) *************** *** 225,229 **** flags = _checkflag(flag) ! d = db.DB() if cachesize is not None: d.set_cachesize(0, cachesize) if pgsize is not None: d.set_pagesize(pgsize) --- 227,232 ---- flags = _checkflag(flag) ! e = _openDBEnv() ! d = db.DB(e) if cachesize is not None: d.set_cachesize(0, cachesize) if pgsize is not None: d.set_pagesize(pgsize) *************** *** 239,242 **** --- 242,249 ---- #---------------------------------------------------------------------- + def _openDBEnv(): + e = db.DBEnv() + e.open('.', db.DB_PRIVATE | db.DB_CREATE | db.DB_THREAD | db.DB_INIT_LOCK | db.DB_INIT_MPOOL) + return e def _checkflag(flag): From rhettinger at users.sourceforge.net Sat Sep 27 22:43:39 2003 From: rhettinger at users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Sat Sep 27 22:43:42 2003 Subject: [Python-checkins] python/nondist/peps pep-0322.txt,1.4,1.5 Message-ID: <E1A3RX9-00036j-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv11863 Modified Files: pep-0322.txt Log Message: * Rename the proposed method to "iterreverse" * Make recommendations on the open issues. * Minor wording changes. Index: pep-0322.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0322.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pep-0322.txt 26 Sep 2003 16:09:54 -0000 1.4 --- pep-0322.txt 28 Sep 2003 02:43:37 -0000 1.5 *************** *** 37,41 **** print value ! Extending slicing is a third approach that minimizes the code overhead but does nothing for memory efficiency, beauty, or clarity. --- 37,41 ---- print value ! Extended slicing is a third approach that minimizes the code overhead but does nothing for memory efficiency, beauty, or clarity. *************** *** 47,65 **** ======== ! Add a method called *ireverse()* to sequence objects that can benefit from it. The above examples then simplify to:: ! for i in xrange(n).ireverse(): print seqn[i] :: ! for elem in seqn.ireverse(): print elem ! The new protocol would be applied to lists, strings, xrange objects, ! and possibly other sequence objects as well (depending on use cases ! and implementation issues). It would not apply to unordered ! collections like dicts and sets. No language syntax changes are needed. --- 47,64 ---- ======== ! Add a method called *iterreverse()* to sequence objects that can benefit from it. The above examples then simplify to:: ! for i in xrange(n).iterreverse(): print seqn[i] :: ! for elem in seqn.iterreverse(): print elem ! The new protocol would be applied to lists, tuples, strings, and ! xrange objects. It would not apply to unordered collections like ! dicts and sets. No language syntax changes are needed. *************** *** 74,89 **** ! Open Issues ! =========== * Should *tuple* objects be included? In the past, they have been ! denied some list like behaviors such as count() and index(). * Should *file* objects be included? Implementing reverse iteration ! may not be easy though it would be useful on occasion. * Should *enumerate* objects be included? They can provide reverse iteration only when the underlying sequences support *__len__* ! and reverse iteration. --- 73,91 ---- ! Other Issues ! ============ * Should *tuple* objects be included? In the past, they have been ! denied some list like behaviors such as count() and index(). I ! prefer that it be included. * Should *file* objects be included? Implementing reverse iteration ! may not be easy though it would be useful on occasion. I think ! this one should be skipped. * Should *enumerate* objects be included? They can provide reverse iteration only when the underlying sequences support *__len__* ! and reverse iteration. I think this can be saved for another ! day if the need arises. *************** *** 105,109 **** and clearer with:: ! for func, target, kargs in _exithandlers.ireverse(): . . . del _exithandlers --- 107,111 ---- and clearer with:: ! for func, target, kargs in _exithandlers.iterreverse(): . . . del _exithandlers *************** *** 132,136 **** result.sort() ! return [x for score, x in result[-n:].ireverse()] * heapq.heapify() uses ``for i in xrange(n//2 - 1, -1, -1)`` because --- 134,138 ---- result.sort() ! return [x for score, x in result[-n:].iterreverse()] * heapq.heapify() uses ``for i in xrange(n//2 - 1, -1, -1)`` because *************** *** 159,163 **** be run in a forward direction but is less intuitive and rarely presented that way in literature. The replacement code ! ``for i in xrange(1, len(x)).ireverse()`` is much easier to mentally verify. --- 161,165 ---- be run in a forward direction but is less intuitive and rarely presented that way in literature. The replacement code ! ``for i in xrange(1, len(x)).iterreverse()`` is much easier to mentally verify. *************** *** 197,201 **** The last variant can invisibly slip into a low performance mode (in terms of time and memory) which could be made more visible with ! an explicit ``list(obj).reverse()``. --- 199,203 ---- The last variant can invisibly slip into a low performance mode (in terms of time and memory) which could be made more visible with ! an explicit ``ro=list(obj); ro.reverse()``. From fdrake at users.sourceforge.net Sat Sep 27 23:10:12 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 23:10:15 2003 Subject: [Python-checkins] python/dist/src/Doc/tools py2texi.el,1.8,1.9 Message-ID: <E1A3Rwq-000441-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv15603 Modified Files: py2texi.el Log Message: Make the "path math" more robust, and support both relative and absolute paths as input. Index: py2texi.el =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/py2texi.el,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** py2texi.el 16 Jul 2003 03:44:48 -0000 1.8 --- py2texi.el 28 Sep 2003 03:10:09 -0000 1.9 *************** *** 570,576 **** (setq dirs py2texi-dirs) (while (and (not includefile) dirs) ! (setq includefile (concat path (car dirs) filename)) (unless (file-exists-p includefile) ! (setq includefile nil) (setq dirs (cdr dirs)))) (if includefile --- 570,580 ---- (setq dirs py2texi-dirs) (while (and (not includefile) dirs) ! (setq includefile ! (concat (file-name-as-directory (car dirs)) filename)) ! (if (not (file-name-absolute-p includefile)) ! (setq includefile ! (concat (file-name-as-directory path) includefile))) (unless (file-exists-p includefile) ! (setq includefile nil) (setq dirs (cdr dirs)))) (if includefile From fdrake at users.sourceforge.net Sat Sep 27 23:11:11 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sat Sep 27 23:11:14 2003 Subject: [Python-checkins] python/dist/src/Doc/tools mkinfo,1.5,1.6 Message-ID: <E1A3Rxn-00046f-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv15779 Modified Files: mkinfo Log Message: Update the list of directories passed to py2texi.el. The ordering was wrong, and commontex/ needed to be added. Index: mkinfo =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkinfo,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mkinfo 13 Nov 2002 19:31:04 -0000 1.5 --- mkinfo 28 Sep 2003 03:11:09 -0000 1.6 *************** *** 50,54 **** run $EMACS -batch -q --no-site-file -l $TOOLSDIR/py2texi.el \ ! --eval "(setq py2texi-dirs '(\"./\" \"../texinputs/\" \"$DOCDIR\"))" \ --eval "(setq py2texi-texi-file-name \"$TEXINAME\")" \ --eval "(setq py2texi-info-file-name \"$INFONAME\")" \ --- 50,54 ---- run $EMACS -batch -q --no-site-file -l $TOOLSDIR/py2texi.el \ ! --eval "(setq py2texi-dirs '(\"$DOCDIR\" \"../commontex\" \"../texinputs\"))" \ --eval "(setq py2texi-texi-file-name \"$TEXINAME\")" \ --eval "(setq py2texi-info-file-name \"$INFONAME\")" \ From fdrake at users.sourceforge.net Sun Sep 28 12:25:11 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sun Sep 28 12:25:15 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.261.4.7,1.261.4.8 Message-ID: <E1A3eMB-0002Wc-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv9694 Modified Files: Tag: release23-maint Makefile Log Message: - update pkglist.html more frequently, and explain why that's helpful - add a comment explaining what pkglist.html is for Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.261.4.7 retrieving revision 1.261.4.8 diff -C2 -d -r1.261.4.7 -r1.261.4.8 *** Makefile 27 Sep 2003 07:48:04 -0000 1.261.4.7 --- Makefile 28 Sep 2003 16:25:09 -0000 1.261.4.8 *************** *** 673,679 **** distlatex: tarlatex bziplatex ziplatex ! paperdist: distpdf distps ! edist: disthtml distinfo zipisilo pkglist: $(TOOLSDIR)/mkpkglist >pkglist.html --- 673,691 ---- distlatex: tarlatex bziplatex ziplatex ! # We use the "pkglist" target at the end of these to ensure the ! # package list is updated after building either of these; this seems a ! # reasonable compromise between only building it for distfiles or ! # having to build it manually. Doing it here allows the packages for ! # distribution to be built using either of ! # make distfiles && make PAPER=a4 paperdist ! # make paperdist && make PAPER=a4 distfiles ! # The small amount of additional work is a small price to pay for not ! # having to remember which order to do it in. ;) ! paperdist: distpdf distps pkglist ! edist: disthtml distinfo zipisilo pkglist + # The pkglist.html file is used as part of the download.html page on + # python.org; it is not used as intermediate input here or as part of + # the packages created. pkglist: $(TOOLSDIR)/mkpkglist >pkglist.html From fdrake at users.sourceforge.net Sun Sep 28 12:25:45 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sun Sep 28 12:25:47 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.270,1.271 Message-ID: <E1A3eMj-0002Xv-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv9780 Modified Files: Makefile Log Message: - update pkglist.html more frequently, and explain why that's helpful - add a comment explaining what pkglist.html is for Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.270 retrieving revision 1.271 diff -C2 -d -r1.270 -r1.271 *** Makefile 27 Sep 2003 22:07:04 -0000 1.270 --- Makefile 28 Sep 2003 16:25:43 -0000 1.271 *************** *** 678,684 **** distlatex: tarlatex bziplatex ziplatex ! paperdist: distpdf distps ! edist: disthtml distinfo zipisilo pkglist: $(TOOLSDIR)/mkpkglist >pkglist.html --- 678,696 ---- distlatex: tarlatex bziplatex ziplatex ! # We use the "pkglist" target at the end of these to ensure the ! # package list is updated after building either of these; this seems a ! # reasonable compromise between only building it for distfiles or ! # having to build it manually. Doing it here allows the packages for ! # distribution to be built using either of ! # make distfiles && make PAPER=a4 paperdist ! # make paperdist && make PAPER=a4 distfiles ! # The small amount of additional work is a small price to pay for not ! # having to remember which order to do it in. ;) ! paperdist: distpdf distps pkglist ! edist: disthtml distinfo zipisilo pkglist + # The pkglist.html file is used as part of the download.html page on + # python.org; it is not used as intermediate input here or as part of + # the packages created. pkglist: $(TOOLSDIR)/mkpkglist >pkglist.html From fdrake at users.sourceforge.net Sun Sep 28 15:03:39 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sun Sep 28 15:03:42 2003 Subject: [Python-checkins] python/dist/src/Doc/tut glossary.tex,1.4,1.5 Message-ID: <E1A3gpX-0001ci-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory sc8-pr-cvs1:/tmp/cvs-serv6237 Modified Files: glossary.tex Log Message: Make the embedded hyperlinks work. Index: glossary.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/glossary.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** glossary.tex 27 Sep 2003 20:19:02 -0000 1.4 --- glossary.tex 28 Sep 2003 19:03:36 -0000 1.5 *************** *** 87,94 **** \end{verbatim} ! the expression \code{11/4} would evaluate to \code{2.75}. By ! actually importing the \refmodule[future]{__future__} module and ! evaluating its variables, you can see when a new feature was first ! added to the language and when it will become the default: \begin{verbatim} --- 87,94 ---- \end{verbatim} ! the expression \code{11/4} would evaluate to \code{2.75}. By actually ! importing the \ulink{\module{__future__}}{../lib/module-future.html} ! module and evaluating its variables, you can see when a new feature ! was first added to the language and when it will become the default: \begin{verbatim} *************** *** 257,262 **** function. For instance, writing \function{random.seed()} or {}\function{itertools.izip()} makes it clear that those functions are ! implemented by the \refmodule{random} and \refmodule{itertools} ! modules respectively. \index{nested scope} --- 257,263 ---- function. For instance, writing \function{random.seed()} or {}\function{itertools.izip()} makes it clear that those functions are ! implemented by the \ulink{\module{random}}{../lib/module-random.html} ! and \ulink{\module{itertools}}{../lib/module-itertools.html} modules ! respectively. \index{nested scope} From fdrake at users.sourceforge.net Sun Sep 28 18:14:32 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sun Sep 28 18:14:35 2003 Subject: [Python-checkins] python/dist/src/Doc/tools push-docs.sh,1.15,1.16 Message-ID: <E1A3joG-0003Ex-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv12445 Modified Files: push-docs.sh Log Message: - change computation of VERSION to use tools/getversioninfo; this is more reliable than using the $Revision$ expansion - $RELEASE is no longer needed; we can just use $VERSION now Index: push-docs.sh =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/push-docs.sh,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** push-docs.sh 4 Apr 2002 18:06:06 -0000 1.15 --- push-docs.sh 28 Sep 2003 22:14:29 -0000 1.16 *************** *** 11,17 **** ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' ! VERSION=`echo '$Revision$' | sed 's/[$]Revision: \(.*\) [$]/\1/'` EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'` ! if [ "$EXTRA" ] ; then DOCLABEL="maintenance" DOCTYPE="maint" --- 11,21 ---- ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' ! TOOLDIR="`dirname $0`" ! VERSION=`$TOOLDIR/getversioninfo` ! ! # Set $EXTRA to something non-empty if this is a non-trunk version: EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'` ! ! if echo "$EXTRA" | grep -q '[.]' ; then DOCLABEL="maintenance" DOCTYPE="maint" *************** *** 69,74 **** # now in .../Doc/ make --no-print-directory bziphtml || exit $? ! RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'` ! PACKAGE="html-$RELEASE.tar.bz2" scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $? ssh "$TARGETHOST" tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $? --- 73,77 ---- # now in .../Doc/ make --no-print-directory bziphtml || exit $? ! PACKAGE="html-$VERSION.tar.bz2" scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $? ssh "$TARGETHOST" tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $? From fdrake at users.sourceforge.net Sun Sep 28 18:24:08 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Sun Sep 28 18:24:10 2003 Subject: [Python-checkins] python/dist/src/Doc/tools push-docs.sh, 1.15.18.1, 1.15.18.2 Message-ID: <E1A3jxY-0003nc-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv14598 Modified Files: Tag: release23-maint push-docs.sh Log Message: Backported from trunk revision 1.16: - change computation of VERSION to use tools/getversioninfo; this is more reliable than using the $Revision$ expansion - $RELEASE is no longer needed; we can just use $VERSION now Index: push-docs.sh =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/push-docs.sh,v retrieving revision 1.15.18.1 retrieving revision 1.15.18.2 diff -C2 -d -r1.15.18.1 -r1.15.18.2 *** push-docs.sh 7 Aug 2003 16:05:08 -0000 1.15.18.1 --- push-docs.sh 28 Sep 2003 22:24:06 -0000 1.15.18.2 *************** *** 11,17 **** ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' ! VERSION=`echo '$Revision$' | sed 's/[$]Revision: \(.*\) [$]/\1/'` EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'` ! if [ "$EXTRA" ] ; then DOCLABEL="maintenance" DOCTYPE="maint" --- 11,20 ---- ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' ! TOOLDIR="`dirname $0`" ! VERSION=`$TOOLDIR/getversioninfo` ! ! # Set $EXTRA to something non-empty if this is a non-trunk version: EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'` ! if echo "$EXTRA" | grep -q '[.]' ; then DOCLABEL="maintenance" DOCTYPE="maint" *************** *** 74,79 **** # now in .../Doc/ make --no-print-directory bziphtml || exit $? ! RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'` ! PACKAGE="html-$RELEASE.tar.bz2" scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $? ssh "$TARGETHOST" tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $? --- 77,81 ---- # now in .../Doc/ make --no-print-directory bziphtml || exit $? ! PACKAGE="html-$VERSION.tar.bz2" scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $? ssh "$TARGETHOST" tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $? From theller at users.sourceforge.net Mon Sep 29 06:09:41 2003 From: theller at users.sourceforge.net (theller@users.sourceforge.net) Date: Mon Sep 29 06:09:49 2003 Subject: [Python-checkins] python/dist/src/PCbuild python20.wse, 1.133.4.1, 1.133.4.2 Message-ID: <E1A3uyL-0007zs-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory sc8-pr-cvs1:/tmp/cvs-serv30733 Modified Files: Tag: release23-maint python20.wse Log Message: Version numbers for 2.3.2c1 release. Index: python20.wse =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.wse,v retrieving revision 1.133.4.1 retrieving revision 1.133.4.2 diff -C2 -d -r1.133.4.1 -r1.133.4.2 *** python20.wse 22 Sep 2003 15:06:28 -0000 1.133.4.1 --- python20.wse 29 Sep 2003 10:09:38 -0000 1.133.4.2 *************** *** 2,6 **** item: Global Version=9.0 ! Title=Python 2.3.1 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 --- 2,6 ---- item: Global Version=9.0 ! Title=Python 2.3.2c1 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 *************** *** 21,32 **** MIF PDF Version=1.0 MIF SMS Version=2.0 ! EXE Filename=Python-2.3.1.exe Dialogs Version=8 ! Version File=2.3.1 Version Description=Python Programming Language Version Copyright=©2001-2003 Python Software Foundation Version Company=PythonLabs at Zope Corporation Crystal Format=10111100101100000010001001001001 ! Step View=&Properties Variable Name1=_WISE_ Variable Description1=WISE root directory --- 21,32 ---- MIF PDF Version=1.0 MIF SMS Version=2.0 ! EXE Filename=Python-2.3.2c1.exe Dialogs Version=8 ! Version File=2.3.2c1 Version Description=Python Programming Language Version Copyright=©2001-2003 Python Software Foundation Version Company=PythonLabs at Zope Corporation Crystal Format=10111100101100000010001001001001 ! Step View=&All Variable Name1=_WISE_ Variable Description1=WISE root directory *************** *** 77,81 **** item: Set Variable Variable=PYVER_STRING ! Value=2.3.1 end item: Remark --- 77,81 ---- item: Set Variable Variable=PYVER_STRING ! Value=2.3.2c1 end item: Remark *************** *** 3042,3050 **** Variable Name5=_OPTION_ Variable Value5=B ! Variable Name6=_Y_POS_ Variable Name7=_MSG_TEXT_ Variable Value7=Please wait while Python modules are compiled ! Variable Name8=_HEIGHT_ ! Variable Value8=80 Variable Name9=_X_POS_ end --- 3042,3050 ---- Variable Name5=_OPTION_ Variable Value5=B ! Variable Name6=_HEIGHT_ ! Variable Value6=80 Variable Name7=_MSG_TEXT_ Variable Value7=Please wait while Python modules are compiled ! Variable Name8=_Y_POS_ Variable Name9=_X_POS_ end From jackjansen at users.sourceforge.net Mon Sep 29 11:11:33 2003 From: jackjansen at users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Mon Sep 29 11:11:37 2003 Subject: [Python-checkins] python/dist/src/Mac/OSX/Dist build, 1.12.4.1, 1.12.4.2 Message-ID: <E1A3zgT-0006xY-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/OSX/Dist In directory sc8-pr-cvs1:/tmp/cvs-serv26696/OSX/Dist Modified Files: Tag: release23-maint build Log Message: Updated version numbers to 2.3.2. Index: build =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSX/Dist/build,v retrieving revision 1.12.4.1 retrieving revision 1.12.4.2 diff -C2 -d -r1.12.4.1 -r1.12.4.2 *** build 4 Aug 2003 22:49:43 -0000 1.12.4.1 --- build 29 Sep 2003 15:11:31 -0000 1.12.4.2 *************** *** 6,10 **** # Script configs ! PYVERSION=2.3 PYVER=2.3 BUILDNUM=1 --- 6,10 ---- # Script configs ! PYVERSION=2.3.2 PYVER=2.3 BUILDNUM=1 From jackjansen at users.sourceforge.net Mon Sep 29 11:11:34 2003 From: jackjansen at users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Mon Sep 29 11:11:44 2003 Subject: [Python-checkins] python/dist/src/Mac/OSX/Dist/resources ReadMe.txt, 1.1.4.1, 1.1.4.2 Message-ID: <E1A3zgU-0006xd-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/OSX/Dist/resources In directory sc8-pr-cvs1:/tmp/cvs-serv26696/OSX/Dist/resources Modified Files: Tag: release23-maint ReadMe.txt Log Message: Updated version numbers to 2.3.2. Index: ReadMe.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSX/Dist/resources/Attic/ReadMe.txt,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** ReadMe.txt 4 Aug 2003 22:49:45 -0000 1.1.4.1 --- ReadMe.txt 29 Sep 2003 15:11:31 -0000 1.1.4.2 *************** *** 1,3 **** ! This package will install MacPython 2.3 for Mac OS X 10.2. Installation on the Panther preview may work, on 10.1 or earlier will not work. --- 1,3 ---- ! This package will install MacPython 2.3.2 for Mac OS X 10.2. Installation on the Panther preview may work, on 10.1 or earlier will not work. From jackjansen at users.sourceforge.net Mon Sep 29 11:11:35 2003 From: jackjansen at users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Mon Sep 29 11:11:50 2003 Subject: [Python-checkins] python/dist/src/Mac/OSXResources/framework/English.lproj InfoPlist.strings, 1.2, 1.2.6.1 Message-ID: <E1A3zgV-0006y2-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/OSXResources/framework/English.lproj In directory sc8-pr-cvs1:/tmp/cvs-serv26696/OSXResources/framework/English.lproj Modified Files: Tag: release23-maint InfoPlist.strings Log Message: Updated version numbers to 2.3.2. Index: InfoPlist.strings =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSXResources/framework/English.lproj/InfoPlist.strings,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -C2 -d -r1.2 -r1.2.6.1 *** InfoPlist.strings 4 Jul 2003 13:06:14 -0000 1.2 --- InfoPlist.strings 29 Sep 2003 15:11:32 -0000 1.2.6.1 *************** *** 2,5 **** CFBundleName = "Python"; ! CFBundleShortVersionString = "2.3"; ! CFBundleGetInfoString = "2.3, (c) 2003 Python Software Foundation"; --- 2,5 ---- CFBundleName = "Python"; ! CFBundleShortVersionString = "2.3.2"; ! CFBundleGetInfoString = "2.3.2, (c) 2003 Python Software Foundation"; From jackjansen at users.sourceforge.net Mon Sep 29 11:11:34 2003 From: jackjansen at users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Mon Sep 29 11:11:57 2003 Subject: [Python-checkins] python/dist/src/Mac/OSXResources/framework version.plist, 1.3, 1.3.6.1 Message-ID: <E1A3zgU-0006xv-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/OSXResources/framework In directory sc8-pr-cvs1:/tmp/cvs-serv26696/OSXResources/framework Modified Files: Tag: release23-maint version.plist Log Message: Updated version numbers to 2.3.2. Index: version.plist =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSXResources/framework/version.plist,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** version.plist 4 Jul 2003 13:06:14 -0000 1.3 --- version.plist 29 Sep 2003 15:11:32 -0000 1.3.6.1 *************** *** 6,12 **** <string>1</string> <key>CFBundleShortVersionString</key> ! <string>2.3</string> <key>CFBundleVersion</key> ! <string>2.3</string> <key>ProjectName</key> <string>Python</string> --- 6,12 ---- <string>1</string> <key>CFBundleShortVersionString</key> ! <string>2.3.2</string> <key>CFBundleVersion</key> ! <string>2.3.2</string> <key>ProjectName</key> <string>Python</string> *************** *** 14,18 **** <string>final</string> <key>SourceVersion</key> ! <string>2.3</string> </dict> </plist> --- 14,18 ---- <string>final</string> <key>SourceVersion</key> ! <string>2.3.2</string> </dict> </plist> From jackjansen at users.sourceforge.net Mon Sep 29 11:11:33 2003 From: jackjansen at users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Mon Sep 29 11:12:01 2003 Subject: [Python-checkins] python/dist/src/Mac/Tools/IDE PythonIDE.plist, 1.2, 1.2.6.1 Message-ID: <E1A3zgT-0006xT-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory sc8-pr-cvs1:/tmp/cvs-serv26696/Tools/IDE Modified Files: Tag: release23-maint PythonIDE.plist Log Message: Updated version numbers to 2.3.2. Index: PythonIDE.plist =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PythonIDE.plist,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -C2 -d -r1.2 -r1.2.6.1 *** PythonIDE.plist 4 Jul 2003 13:06:14 -0000 1.2 --- PythonIDE.plist 29 Sep 2003 15:11:31 -0000 1.2.6.1 *************** *** 28,38 **** <key>CFBundleGetInfoString</key> ! <string>2.3, (c) 2003 Python Software Foundation.</string> <key>CFBundleLongVersionString</key> ! <string>2.3, (c) 2003 Python Software Foundation.</string> <key>NSHumanReadableCopyright</key> <string>Copyright 2003 Python Software Foundation.</string> <key>CFBundleShortVersionString</key> ! <string>2.3</string> <key>CFBundleIconFile</key> --- 28,38 ---- <key>CFBundleGetInfoString</key> ! <string>2.3.2, (c) 2003 Python Software Foundation.</string> <key>CFBundleLongVersionString</key> ! <string>2.3.2, (c) 2003 Python Software Foundation.</string> <key>NSHumanReadableCopyright</key> <string>Copyright 2003 Python Software Foundation.</string> <key>CFBundleShortVersionString</key> ! <string>2.3.2</string> <key>CFBundleIconFile</key> *************** *** 49,53 **** <string>Pide</string> <key>CFBundleVersion</key> ! <string>2.3</string> <key>LSRequiresCarbon</key> <true/> --- 49,53 ---- <string>Pide</string> <key>CFBundleVersion</key> ! <string>2.3.2</string> <key>LSRequiresCarbon</key> <true/> From jackjansen at users.sourceforge.net Mon Sep 29 11:11:34 2003 From: jackjansen at users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Mon Sep 29 11:12:08 2003 Subject: [Python-checkins] python/dist/src/Mac/OSXResources/app/Resources/English.lproj InfoPlist.strings, 1.5, 1.5.6.1 Message-ID: <E1A3zgU-0006xm-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj In directory sc8-pr-cvs1:/tmp/cvs-serv26696/OSXResources/app/Resources/English.lproj Modified Files: Tag: release23-maint InfoPlist.strings Log Message: Updated version numbers to 2.3.2. Index: InfoPlist.strings =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj/InfoPlist.strings,v retrieving revision 1.5 retrieving revision 1.5.6.1 diff -C2 -d -r1.5 -r1.5.6.1 *** InfoPlist.strings 4 Jul 2003 13:06:14 -0000 1.5 --- InfoPlist.strings 29 Sep 2003 15:11:32 -0000 1.5.6.1 *************** *** 2,7 **** CFBundleName = "Python"; ! CFBundleShortVersionString = "2.3"; ! CFBundleGetInfoString = "2.3, (c) 2003 Python Software Foundation."; ! CFBundleLongVersionString = "2.3, (c) 2003 Python Software Foundation."; NSHumanReadableCopyright = "Copyright 2003 Python Software Foundation."; --- 2,7 ---- CFBundleName = "Python"; ! CFBundleShortVersionString = "2.3.2"; ! CFBundleGetInfoString = "2.3.2, (c) 2003 Python Software Foundation."; ! CFBundleLongVersionString = "2.3.2, (c) 2003 Python Software Foundation."; NSHumanReadableCopyright = "Copyright 2003 Python Software Foundation."; From jackjansen at users.sourceforge.net Mon Sep 29 11:11:34 2003 From: jackjansen at users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Mon Sep 29 11:12:13 2003 Subject: [Python-checkins] python/dist/src/Mac/OSXResources/app Info.plist, 1.11, 1.11.6.1 Message-ID: <E1A3zgU-0006xi-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/OSXResources/app In directory sc8-pr-cvs1:/tmp/cvs-serv26696/OSXResources/app Modified Files: Tag: release23-maint Info.plist Log Message: Updated version numbers to 2.3.2. Index: Info.plist =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSXResources/app/Info.plist,v retrieving revision 1.11 retrieving revision 1.11.6.1 diff -C2 -d -r1.11 -r1.11.6.1 *** Info.plist 4 Jul 2003 13:06:14 -0000 1.11 --- Info.plist 29 Sep 2003 15:11:32 -0000 1.11.6.1 *************** *** 22,32 **** <key>CFBundleGetInfoString</key> ! <string>2.3, (c) 2003 Python Software Foundation.</string> <key>CFBundleLongVersionString</key> ! <string>2.3, (c) 2003 Python Software Foundation.</string> <key>NSHumanReadableCopyright</key> <string>Copyright 2003 Python Software Foundation.</string> <key>CFBundleShortVersionString</key> ! <string>2.3</string> <key>CFBundleHelpBookFolder</key> --- 22,32 ---- <key>CFBundleGetInfoString</key> ! <string>2.3.2, (c) 2003 Python Software Foundation.</string> <key>CFBundleLongVersionString</key> ! <string>2.3.2, (c) 2003 Python Software Foundation.</string> <key>NSHumanReadableCopyright</key> <string>Copyright 2003 Python Software Foundation.</string> <key>CFBundleShortVersionString</key> ! <string>2.3.2</string> <key>CFBundleHelpBookFolder</key> *************** *** 53,57 **** <string>PytX</string> <key>CFBundleVersion</key> ! <string>2.3</string> <key>LSRequiresCarbon</key> <true/> --- 53,57 ---- <string>PytX</string> <key>CFBundleVersion</key> ! <string>2.3.2</string> <key>LSRequiresCarbon</key> <true/> From fdrake at users.sourceforge.net Mon Sep 29 13:22:36 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Mon Sep 29 13:22:40 2003 Subject: [Python-checkins] python/dist/src/Doc/tools mkinfo, 1.5, 1.5.16.1 py2texi.el, 1.8, 1.8.8.1 Message-ID: <E1A41jI-0005gx-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv21877 Modified Files: Tag: release23-maint mkinfo py2texi.el Log Message: Backport changes from trunk needed to make the GNU info format build. Index: mkinfo =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkinfo,v retrieving revision 1.5 retrieving revision 1.5.16.1 diff -C2 -d -r1.5 -r1.5.16.1 *** mkinfo 13 Nov 2002 19:31:04 -0000 1.5 --- mkinfo 29 Sep 2003 17:22:33 -0000 1.5.16.1 *************** *** 39,42 **** --- 39,44 ---- cd $WORKDIR + COMMONDIR="`dirname $DOCDIR`/commontex" + run() { *************** *** 50,54 **** run $EMACS -batch -q --no-site-file -l $TOOLSDIR/py2texi.el \ ! --eval "(setq py2texi-dirs '(\"./\" \"../texinputs/\" \"$DOCDIR\"))" \ --eval "(setq py2texi-texi-file-name \"$TEXINAME\")" \ --eval "(setq py2texi-info-file-name \"$INFONAME\")" \ --- 52,56 ---- run $EMACS -batch -q --no-site-file -l $TOOLSDIR/py2texi.el \ ! --eval "(setq py2texi-dirs '(\"$DOCDIR\" \"$COMMONDIR\" \"../texinputs\"))" \ --eval "(setq py2texi-texi-file-name \"$TEXINAME\")" \ --eval "(setq py2texi-info-file-name \"$INFONAME\")" \ Index: py2texi.el =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/py2texi.el,v retrieving revision 1.8 retrieving revision 1.8.8.1 diff -C2 -d -r1.8 -r1.8.8.1 *** py2texi.el 16 Jul 2003 03:44:48 -0000 1.8 --- py2texi.el 29 Sep 2003 17:22:33 -0000 1.8.8.1 *************** *** 570,576 **** (setq dirs py2texi-dirs) (while (and (not includefile) dirs) ! (setq includefile (concat path (car dirs) filename)) (unless (file-exists-p includefile) ! (setq includefile nil) (setq dirs (cdr dirs)))) (if includefile --- 570,580 ---- (setq dirs py2texi-dirs) (while (and (not includefile) dirs) ! (setq includefile ! (concat (file-name-as-directory (car dirs)) filename)) ! (if (not (file-name-absolute-p includefile)) ! (setq includefile ! (concat (file-name-as-directory path) includefile))) (unless (file-exists-p includefile) ! (setq includefile nil) (setq dirs (cdr dirs)))) (if includefile From fdrake at users.sourceforge.net Mon Sep 29 13:26:11 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Mon Sep 29 13:26:13 2003 Subject: [Python-checkins] python/dist/src/Doc/tools mkinfo,1.6,1.7 Message-ID: <E1A41ml-0005sM-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv22579 Modified Files: mkinfo Log Message: Update to match the version used to build the 2.3.2c1 documentation. Index: mkinfo =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkinfo,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mkinfo 28 Sep 2003 03:11:09 -0000 1.6 --- mkinfo 29 Sep 2003 17:26:08 -0000 1.7 *************** *** 39,42 **** --- 39,44 ---- cd $WORKDIR + COMMONDIR="`dirname $DOCDIR`/commontex" + run() { *************** *** 50,54 **** run $EMACS -batch -q --no-site-file -l $TOOLSDIR/py2texi.el \ ! --eval "(setq py2texi-dirs '(\"$DOCDIR\" \"../commontex\" \"../texinputs\"))" \ --eval "(setq py2texi-texi-file-name \"$TEXINAME\")" \ --eval "(setq py2texi-info-file-name \"$INFONAME\")" \ --- 52,56 ---- run $EMACS -batch -q --no-site-file -l $TOOLSDIR/py2texi.el \ ! --eval "(setq py2texi-dirs '(\"$DOCDIR\" \"$COMMONDIR\" \"../texinputs\"))" \ --eval "(setq py2texi-texi-file-name \"$TEXINAME\")" \ --eval "(setq py2texi-info-file-name \"$INFONAME\")" \ From fdrake at users.sourceforge.net Mon Sep 29 23:46:55 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Mon Sep 29 23:46:59 2003 Subject: [Python-checkins] python/nondist/peps pep-0101.txt,1.39,1.40 Message-ID: <E1A4BTT-0005za-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv23028 Modified Files: pep-0101.txt Log Message: Update some of the information about documentation build procedures. Much of it was outdated. I still need to document *how* some of the steps are carried out. Index: pep-0101.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0101.txt,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** pep-0101.txt 22 Sep 2003 01:11:35 -0000 1.39 --- pep-0101.txt 30 Sep 2003 03:46:52 -0000 1.40 *************** *** 167,173 **** proclaiming its identity. - ___ There's also a mention of the version in - Doc/texinputs/boilerplate.tex; Fred usually takes care of that. - ___ If the major (first) or minor (middle) digit of the version number changes, also update the LICENSE file. --- 167,170 ---- *************** *** 206,226 **** that Andrew often takes care of this. ! ___ By now, Fred has created the HTML for the documentation and ! pushed the appropriate files out to www.python.org. Tim needs ! this to build the Windows installer, but the RM doesn't need ! this stuff to build the source distribution. ! Fred tells Tim Peters and Sean Reifschneider where the ! documentation file is. This may generate some last minute ! changes on the branch. Once Fred is done, there can be no ! further checkins on the branch in the Doc/ directory -- not even ! by the RM. For final releases, Fred also sends email to Milan ! Zamazal for conversion to the GNU Info format, and to Hernan ! M. Foffani for conversion to HTML Help. Basically, if it's in Doc/, Fred will take care of it. ! ___ Tim Peters grabs the HTML and uses this to build the Windows ! installer. ___ Tim performs his Windows magic, generating an installer --- 203,221 ---- that Andrew often takes care of this. ! ___ At this point, Fred will create the formatted versions of the ! documentation and push the appropriate files out to their FTP ! locations on www.python.org. The HTML format is used to build ! the HTML Help format for the Windows installer, but the RM ! doesn't need this to build the source distribution. The HTML ! Help format will typically be generated by whoever builds the ! Windows installer. ! Once Fred is done, there can be no further checkins on the ! branch in the Doc/ directory -- not even by the RM. Basically, if it's in Doc/, Fred will take care of it. ! ___ Tim Peters grabs the HTML Help format and uses this to build the ! Windows installer. ___ Tim performs his Windows magic, generating an installer *************** *** 255,262 **** working on the trunk. ! You should not see any "M" files, but you may see several "P" ! files. I.e. you better not have any uncommitted changes in your ! working directory, but you may pick up some of Fred's or Tim's ! last minute changes. ___ If you've seen updates to existing files, update the cvs tag: --- 250,257 ---- working on the trunk. ! You should not see any "M" files, but you may see several "P" or ! "U" files. I.e. you better not have any uncommitted changes in ! your working directory, but you may pick up some of Fred's or ! Tim's last minute changes. ___ If you've seen updates to existing files, update the cvs tag: From fdrake at users.sourceforge.net Tue Sep 30 00:35:03 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 00:35:06 2003 Subject: [Python-checkins] python/nondist/peps pep-0101.txt,1.40,1.41 Message-ID: <E1A4CE3-0007Wq-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv28907 Modified Files: pep-0101.txt Log Message: describe the commands needed to build the documetation and post it in the FTP area of python.org Index: pep-0101.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0101.txt,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** pep-0101.txt 30 Sep 2003 03:46:52 -0000 1.40 --- pep-0101.txt 30 Sep 2003 04:35:01 -0000 1.41 *************** *** 214,218 **** branch in the Doc/ directory -- not even by the RM. ! Basically, if it's in Doc/, Fred will take care of it. ___ Tim Peters grabs the HTML Help format and uses this to build the --- 214,244 ---- branch in the Doc/ directory -- not even by the RM. ! Building the documentation is done using the Makefile in the ! Doc/ directory. Once all the external tools are installed (see ! the "Documenting Python" manual for information on the required ! tools), use these commands to build the formatted documentation ! packages:: ! ! $ make clobber ! ... ! $ make PAPER=a4 paperdist ! ... ! $ make distfiles ! ... ! ! The packages can be installed on the FTP server using commands ! like these: ! ! $ VERSION=`tools/getversioninfo` ! $ TARGET=/ftp/ftp.python.org/pub/python/doc/$VERSION ! $ ssh creosote.python.org mkdir $TARGET ! $ scp *-$VERSION.* creosote.python.org:$TARGET ! ! XXX What's needed to describe posting the documentation on the ! website should be added here, or there should be a link to a ! document in the python.org site management documentation. ! ! XXX Someone who knows how to build the HTML Help format should ! add a description of that process. ___ Tim Peters grabs the HTML Help format and uses this to build the From fdrake at users.sourceforge.net Tue Sep 30 00:49:35 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 00:49:41 2003 Subject: [Python-checkins] python/nondist/peps pep-0101.txt, 1.41, 1.42 pep-0102.txt, 1.15, 1.16 Message-ID: <E1A4CS7-0007rG-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv30205 Modified Files: pep-0101.txt pep-0102.txt Log Message: Move instructions for building the HTML Help into PEP 101 from PEP 102; this locates all the instructions for building documentation in one of the PEPs; the other incorporates the instructions by reference. Index: pep-0101.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0101.txt,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** pep-0101.txt 30 Sep 2003 04:35:01 -0000 1.41 --- pep-0101.txt 30 Sep 2003 04:49:33 -0000 1.42 *************** *** 239,244 **** document in the python.org site management documentation. ! XXX Someone who knows how to build the HTML Help format should ! add a description of that process. ___ Tim Peters grabs the HTML Help format and uses this to build the --- 239,251 ---- document in the python.org site management documentation. ! ___ Thomas grabs the HTML to build the Windows helpfile. ! The HTML files are unpacked into a new src/html directory, and ! runs this command to create the project files for MS HTML ! Workshop: ! ! % python ..\Doc\tools\prechm.py -v 2.3 python23 ! ! HTML Workshop is then fired up on the created python23.hhp file, ! finally resulting in an python23.chm file. ___ Tim Peters grabs the HTML Help format and uses this to build the Index: pep-0102.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0102.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** pep-0102.txt 24 Sep 2003 10:55:43 -0000 1.15 --- pep-0102.txt 30 Sep 2003 04:49:33 -0000 1.16 *************** *** 138,151 **** to forget to update the release date in this file! ! ___ Once the release is underway, Fred Drake needs to create the ! HTML from the documentation. He does this and uploads the file ! to www.python.org. Then he tells Thomas and Sean Reifschneider ! where this file is. ! ! This may generate some last minute changes on the branch. Once ! Fred is done, there can be no further checkins on the branch in ! the Doc/ directory -- not even by the RM. For final releases, ! Fred also sends email to Milan Zamazal for conversion to the GNU ! Info format. Note that Fred is responsible both for merging doc changes from --- 138,144 ---- to forget to update the release date in this file! ! ___ Once the release process has started, the documentation needs to ! be built and posted on python.org according to the instructions ! in PEP 101. Note that Fred is responsible both for merging doc changes from From fdrake at users.sourceforge.net Tue Sep 30 00:51:16 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 00:51:18 2003 Subject: [Python-checkins] python/nondist/peps pep-0102.txt,1.16,1.17 Message-ID: <E1A4CTk-0007ue-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory sc8-pr-cvs1:/tmp/cvs-serv30415 Modified Files: pep-0102.txt Log Message: Remove instructions for building the HTML Help; they are now part of PEP 101. Index: pep-0102.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0102.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** pep-0102.txt 30 Sep 2003 04:49:33 -0000 1.16 --- pep-0102.txt 30 Sep 2003 04:51:14 -0000 1.17 *************** *** 147,160 **** Basically, if it's in Doc/ Fred will take care of it. - ___ Thomas grabs the HTML to build the Windows helpfile. - The HTML files are unpacked into a new src/html directory, and - runs this command to create the project files for MS HTML - Workshop: - - % python ..\Doc\tools\prechm.py -v 2.3 python23 - - HTML Workshop is then fired up on the created python23.hhp file, - finally resulting in an python23.chm file. - ___ Thomas compiles everything with MSVC 6.0, and moves the python23.chm file into the src/chm directory. The installer --- 147,150 ---- From anthonybaxter at users.sourceforge.net Tue Sep 30 03:07:10 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 30 03:07:55 2003 Subject: [Python-checkins] python/dist/src LICENSE,1.27,1.28 Message-ID: <E1A4EbG-00050n-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv19244 Modified Files: LICENSE Log Message: added 2.3.2 Index: LICENSE =================================================================== RCS file: /cvsroot/python/python/dist/src/LICENSE,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** LICENSE 23 Sep 2003 02:42:29 -0000 1.27 --- LICENSE 30 Sep 2003 07:07:08 -0000 1.28 *************** *** 45,48 **** --- 45,49 ---- 2.3 2.2.2 2002-2003 PSF yes 2.3.1 2.3 2002-2003 PSF yes + 2.3.2 2.3.1 2002-2003 PSF yes Footnotes: From anthonybaxter at users.sourceforge.net Tue Sep 30 03:10:01 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 30 03:10:03 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.53,1.831.4.54 Message-ID: <E1A4Ee1-00058y-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv19739/Misc Modified Files: Tag: release23-maint NEWS Log Message: news for 2.3.2c1 Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.53 retrieving revision 1.831.4.54 diff -C2 -d -r1.831.4.53 -r1.831.4.54 *** NEWS 27 Sep 2003 05:05:47 -0000 1.831.4.53 --- NEWS 30 Sep 2003 07:09:58 -0000 1.831.4.54 *************** *** 6,28 **** ! What's New in Python 2.3.2? ! =========================== ! ! *Release date: XX-XXX-XXXX* ! ! Core and builtins ! ----------------- ! ! Extension modules ! ----------------- ! ! Library ! ------- ! ! IDLE ! ---- ! Tools/Demos ! ----------- Build --- 6,13 ---- ! What's New in Python 2.3.2c1? ! ============================= ! *Release date: 30-Sep-2003* Build *************** *** 31,43 **** - A bug in the autoconf machinery meant that os.fsync was never available. ! C API ! ----- ! ! Windows ! ------- Mac --- What's New in Python 2.3.1? --- 16,25 ---- - A bug in the autoconf machinery meant that os.fsync was never available. ! - A bug in autoconf meant a bunch of symbols were undefined on HP/UX. Mac --- + - The Framework build now identifies itself as 2.3.2. What's New in Python 2.3.1? From anthonybaxter at users.sourceforge.net Tue Sep 30 03:10:28 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 30 03:10:31 2003 Subject: [Python-checkins] python/dist/src LICENSE, 1.26.8.1, 1.26.8.2 README, 1.177.4.3, 1.177.4.4 Message-ID: <E1A4EeS-0005Bo-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory sc8-pr-cvs1:/tmp/cvs-serv19858 Modified Files: Tag: release23-maint LICENSE README Log Message: updates for 2.3.2c1 Index: LICENSE =================================================================== RCS file: /cvsroot/python/python/dist/src/LICENSE,v retrieving revision 1.26.8.1 retrieving revision 1.26.8.2 diff -C2 -d -r1.26.8.1 -r1.26.8.2 *** LICENSE 23 Sep 2003 02:41:50 -0000 1.26.8.1 --- LICENSE 30 Sep 2003 07:10:25 -0000 1.26.8.2 *************** *** 45,48 **** --- 45,49 ---- 2.3 2.2.2 2002-2003 PSF yes 2.3.1 2.3 2002-2003 PSF yes + 2.3.2 2.3.1 2002-2003 PSF yes Footnotes: Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.177.4.3 retrieving revision 1.177.4.4 diff -C2 -d -r1.177.4.3 -r1.177.4.4 *** README 24 Sep 2003 00:45:38 -0000 1.177.4.3 --- README 30 Sep 2003 07:10:25 -0000 1.177.4.4 *************** *** 1,4 **** ! This is Python version 2.3.1 (final) ! ==================================== Copyright (c) 2001, 2002, 2003 Python Software Foundation. --- 1,4 ---- ! This is Python version 2.3.2c1 ! ============================== Copyright (c) 2001, 2002, 2003 Python Software Foundation. From anthonybaxter at users.sourceforge.net Tue Sep 30 03:10:28 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 30 03:10:36 2003 Subject: [Python-checkins] python/dist/src/Misc/RPM python-2.3.spec, 1.2.12.1, 1.2.12.2 Message-ID: <E1A4EeS-0005Bt-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM In directory sc8-pr-cvs1:/tmp/cvs-serv19858/Misc/RPM Modified Files: Tag: release23-maint python-2.3.spec Log Message: updates for 2.3.2c1 Index: python-2.3.spec =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/RPM/python-2.3.spec,v retrieving revision 1.2.12.1 retrieving revision 1.2.12.2 diff -C2 -d -r1.2.12.1 -r1.2.12.2 *** python-2.3.spec 22 Sep 2003 04:21:04 -0000 1.2.12.1 --- python-2.3.spec 30 Sep 2003 07:10:26 -0000 1.2.12.2 *************** *** 31,35 **** %define name python ! %define version 2.3.1 %define libvers 2.3 %define release 1pydotorg --- 31,35 ---- %define name python ! %define version 2.3.2c1 %define libvers 2.3 %define release 1pydotorg From anthonybaxter at users.sourceforge.net Tue Sep 30 05:15:58 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 30 05:16:02 2003 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.831.4.54,1.831.4.55 Message-ID: <E1A4Gbu-0002xN-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory sc8-pr-cvs1:/tmp/cvs-serv11353 Modified Files: Tag: release23-maint NEWS Log Message: rest doesnt like empty sections Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.831.4.54 retrieving revision 1.831.4.55 diff -C2 -d -r1.831.4.54 -r1.831.4.55 *** NEWS 30 Sep 2003 07:09:58 -0000 1.831.4.54 --- NEWS 30 Sep 2003 09:15:55 -0000 1.831.4.55 *************** *** 162,168 **** - Patch #798202: detect redhat9 Tcl/Tk in configure script. - C API - ----- - Windows ------- --- 162,165 ---- *************** *** 173,179 **** instead of single HTML pages. - Mac - --- - What's New in Python 2.3 final? --- 170,173 ---- *************** *** 248,254 **** - For MacOSX, added -mno-fused-madd to BASECFLAGS to fix test_coercion on Panther (OSX 10.3). - - C API - ----- Windows --- 242,245 ---- From purcell at users.sourceforge.net Tue Sep 30 05:25:35 2003 From: purcell at users.sourceforge.net (purcell@users.sourceforge.net) Date: Tue Sep 30 05:25:38 2003 Subject: [Python-checkins] python/dist/src/Lib unittest.py,1.28,1.29 Message-ID: <E1A4GlD-0003NS-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv12970 Modified Files: unittest.py Log Message: Removed redundant 'return' statement. (Issue 813159) Index: unittest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** unittest.py 23 Sep 2003 08:41:53 -0000 1.28 --- unittest.py 30 Sep 2003 09:25:32 -0000 1.29 *************** *** 47,51 **** __author__ = "Steve Purcell" __email__ = "stephen_purcell at yahoo dot com" ! __version__ = "#Revision: 1.57 $"[11:-2] import time --- 47,51 ---- __author__ = "Steve Purcell" __email__ = "stephen_purcell at yahoo dot com" ! __version__ = "#Revision: 1.58 $"[11:-2] import time *************** *** 518,522 **** elif type(obj) == types.UnboundMethodType: return parent(obj.__name__) - return obj.im_class(obj.__name__) elif isinstance(obj, unittest.TestSuite): return obj --- 518,521 ---- From anthonybaxter at users.sourceforge.net Tue Sep 30 05:32:57 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 30 05:33:01 2003 Subject: [Python-checkins] python/dist/src/Tools/scripts md5sum.py, 1.3, 1.3.8.1 Message-ID: <E1A4GsL-0003h9-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv14182 Modified Files: Tag: release23-maint md5sum.py Log Message: backport tim's patch making -rb the default. This will be in 2.3.2 final. Index: md5sum.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/scripts/md5sum.py,v retrieving revision 1.3 retrieving revision 1.3.8.1 diff -C2 -d -r1.3 -r1.3.8.1 *** md5sum.py 13 May 2003 17:39:26 -0000 1.3 --- md5sum.py 30 Sep 2003 09:32:55 -0000 1.3.8.1 *************** *** 7,16 **** bufsize = 8096 fnfilter = None ! rmode = 'r' usage = """ usage: sum5 [-b] [-t] [-l] [-s bufsize] [file ...] ! -b : read files in binary mode ! -t : read files in text mode (default) -l : print last pathname component only -s bufsize: read buffer size (default %d) --- 7,16 ---- bufsize = 8096 fnfilter = None ! rmode = 'rb' usage = """ usage: sum5 [-b] [-t] [-l] [-s bufsize] [file ...] ! -b : read files in binary mode (default) ! -t : read files in text mode (you almost certainly don't want this!) -l : print last pathname component only -s bufsize: read buffer size (default %d) *************** *** 41,45 **** return sts ! def printsum(filename, out = sys.stdout): try: fp = open(filename, rmode) --- 41,45 ---- return sts ! def printsum(filename, out=sys.stdout): try: fp = open(filename, rmode) *************** *** 53,62 **** return sts ! def printsumfp(fp, filename, out = sys.stdout): m = md5.new() try: while 1: data = fp.read(bufsize) ! if not data: break m.update(data) except IOError, msg: --- 53,63 ---- return sts ! def printsumfp(fp, filename, out=sys.stdout): m = md5.new() try: while 1: data = fp.read(bufsize) ! if not data: ! break m.update(data) except IOError, msg: *************** *** 66,70 **** return 0 ! def main(args = sys.argv[1:], out = sys.stdout): global fnfilter, rmode, bufsize try: --- 67,71 ---- return 0 ! def main(args = sys.argv[1:], out=sys.stdout): global fnfilter, rmode, bufsize try: *************** *** 76,84 **** if o == '-l': fnfilter = os.path.basename ! if o == '-b': rmode = 'rb' ! if o == '-t': rmode = 'r' ! if o == '-s': bufsize = int(a) if not args: --- 77,85 ---- if o == '-l': fnfilter = os.path.basename ! elif o == '-b': rmode = 'rb' ! elif o == '-t': rmode = 'r' ! elif o == '-s': bufsize = int(a) if not args: From skip at pobox.com Tue Sep 30 09:32:29 2003 From: skip at pobox.com (Skip Montanaro) Date: Tue Sep 30 09:32:38 2003 Subject: [Python-checkins] python/dist/src/Tools/scripts md5sum.py, 1.3, 1.3.8.1 In-Reply-To: <E1A4GsL-0003h9-00@sc8-pr-cvs1.sourceforge.net> References: <E1A4GsL-0003h9-00@sc8-pr-cvs1.sourceforge.net> Message-ID: <16249.34285.353517.140250@montanaro.dyndns.org> ! -b : read files in binary mode (default) ! -t : read files in text mode (you almost certainly don't want this!) When is -t useful? Skip From anthony at interlink.com.au Tue Sep 30 09:41:37 2003 From: anthony at interlink.com.au (Anthony Baxter) Date: Tue Sep 30 09:43:45 2003 Subject: [Python-checkins] python/dist/src/Tools/scripts md5sum.py, 1.3, 1.3.8.1 In-Reply-To: <16249.34285.353517.140250@montanaro.dyndns.org> Message-ID: <200309301341.h8UDfcXY008585@localhost.localdomain> >>> Skip Montanaro wrote > > ! -b : read files in binary mode (default) > ! -t : read files in text mode (you almost certainly don't want this!) > > When is -t useful? Beats me. Unless you've got a hankering to generate useless MD5 sums <wink> Anthony -- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood. From anthonybaxter at users.sourceforge.net Tue Sep 30 10:56:53 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 30 10:57:08 2003 Subject: [Python-checkins] python/dist/src/Include pyport.h,2.61,2.61.8.1 Message-ID: <E1A4Lvp-0002Tq-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1:/tmp/cvs-serv9470 Modified Files: Tag: release23-maint pyport.h Log Message: workaround for openbsd overflow bug. will also apply to the trunk. Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.61 retrieving revision 2.61.8.1 diff -C2 -d -r2.61 -r2.61.8.1 *** pyport.h 10 May 2003 07:36:54 -0000 2.61 --- pyport.h 30 Sep 2003 14:56:50 -0000 2.61.8.1 *************** *** 258,263 **** * X is evaluated more than once. * Some platforms have better way to spell this, so expect some #ifdef'ery. */ ! #ifdef __FreeBSD__ #define Py_OVERFLOWED(X) isinf(X) #else --- 258,272 ---- * X is evaluated more than once. * Some platforms have better way to spell this, so expect some #ifdef'ery. + * + * OpenBSD uses 'isinf()' because a compiler bug on that platform causes + * the longer macro version to be mis-compiled. This isn't optimal, and + * should be removed once a newer compiler is available on that platform. + * The system that had the failure was running OpenBSD 3.2 on Intel, with + * gcc 2.95.3. + * + * According to Tim's checkin, the FreeBSD systems use isinf() to work + * around a FPE bug on that platform. */ ! #if defined(__FreeBSD__) || defined(__OpenBSD__) #define Py_OVERFLOWED(X) isinf(X) #else From tim.one at comcast.net Tue Sep 30 11:11:24 2003 From: tim.one at comcast.net (Tim Peters) Date: Tue Sep 30 11:11:36 2003 Subject: [Python-checkins] python/dist/src/Include pyport.h,2.61,2.61.8.1 In-Reply-To: <E1A4Lvp-0002Tq-00@sc8-pr-cvs1.sourceforge.net> Message-ID: <LNBBLJKPBEHFEDALKOLCCEOIGDAB.tim.one@comcast.net> [Anthony Baxter] > Modified Files: > Tag: release23-maint > pyport.h > Log Message: > workaround for openbsd overflow bug. will also apply to the trunk. > > ... > + * OpenBSD uses 'isinf()' because a compiler bug on that platform > ... Excellent comment -- thank you! From anthonybaxter at users.sourceforge.net Tue Sep 30 10:59:01 2003 From: anthonybaxter at users.sourceforge.net (anthonybaxter@users.sourceforge.net) Date: Tue Sep 30 11:24:37 2003 Subject: [Python-checkins] python/dist/src/Include pyport.h,2.63,2.64 Message-ID: <E1A4Lxt-0002Zl-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory sc8-pr-cvs1:/tmp/cvs-serv9818 Modified Files: pyport.h Log Message: workaround for OpenBSD compiler bug w.r.t. handling of overflows. Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.63 retrieving revision 2.64 diff -C2 -d -r2.63 -r2.64 *** pyport.h 4 Sep 2003 11:59:50 -0000 2.63 --- pyport.h 30 Sep 2003 14:58:59 -0000 2.64 *************** *** 258,263 **** * X is evaluated more than once. * Some platforms have better way to spell this, so expect some #ifdef'ery. */ ! #ifdef __FreeBSD__ #define Py_OVERFLOWED(X) isinf(X) #else --- 258,272 ---- * X is evaluated more than once. * Some platforms have better way to spell this, so expect some #ifdef'ery. + * + * OpenBSD uses 'isinf()' because a compiler bug on that platform causes + * the longer macro version to be mis-compiled. This isn't optimal, and + * should be removed once a newer compiler is available on that platform. + * The system that had the failure was running OpenBSD 3.2 on Intel, with + * gcc 2.95.3. + * + * According to Tim's checkin, the FreeBSD systems use isinf() to work + * around a FPE bug on that platform. */ ! #if defined(__FreeBSD__) || defined(__OpenBSD__) #define Py_OVERFLOWED(X) isinf(X) #else From fdrake at users.sourceforge.net Tue Sep 30 11:40:37 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 11:40:42 2003 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.33,1.34 Message-ID: <E1A4Mc9-0006F5-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1:/tmp/cvs-serv23984 Modified Files: style.css Log Message: Fix stupid style bug. Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** style.css 11 Sep 2003 04:08:47 -0000 1.33 --- style.css 30 Sep 2003 15:40:33 -0000 1.34 *************** *** 73,77 **** div.warning { background-color: #fffaf0; border: thin solid black; ! padding: 1em 1em 0em 1em; margin-left: 2em; margin-right: 2em; } --- 73,77 ---- div.warning { background-color: #fffaf0; border: thin solid black; ! padding: 1em; margin-left: 2em; margin-right: 2em; } From fdrake at users.sourceforge.net Tue Sep 30 11:43:53 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 11:48:44 2003 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.27,1.27.8.1 Message-ID: <E1A4MfJ-0006QC-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1:/tmp/cvs-serv24672 Modified Files: Tag: release23-maint style.css Log Message: Update to CSS from trunk revision 1.35. Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.27 retrieving revision 1.27.8.1 diff -C2 -d -r1.27 -r1.27.8.1 *** style.css 16 Jul 2003 14:01:56 -0000 1.27 --- style.css 30 Sep 2003 15:43:49 -0000 1.27.8.1 *************** *** 50,54 **** h2 { font-size: 150%; } h3, h4 { font-size: 120%; } ! code, tt { font-family: lucida typewriter, lucidatypewriter, monospace; } var { font-family: times, serif; --- 50,62 ---- h2 { font-size: 150%; } h3, h4 { font-size: 120%; } ! ! /* LaTeX2HTML insists on inserting <br> 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. ! */ ! h1>br, h2>br, h3>br, ! h4>br, h5>br, h6>br { display: none; } ! ! code, tt { font-family: "lucida typewriter", lucidatypewriter, monospace; } var { font-family: times, serif; *************** *** 65,69 **** div.warning { background-color: #fffaf0; border: thin solid black; ! padding: 0.5em; margin-left: 2em; margin-right: 2em; } --- 73,77 ---- div.warning { background-color: #fffaf0; border: thin solid black; ! padding: 1em; margin-left: 2em; margin-right: 2em; } *************** *** 75,79 **** div.note { background-color: #fffaf0; border: thin solid black; ! padding: 0.5em; margin-left: 2em; margin-right: 2em; } --- 83,87 ---- div.note { background-color: #fffaf0; border: thin solid black; ! padding: 1em; margin-left: 2em; margin-right: 2em; } *************** *** 87,91 **** .verbatim pre { color: #00008b; ! font-family: lucida typewriter, lucidatypewriter, monospace; font-size: 90%; } --- 95,99 ---- .verbatim pre { color: #00008b; ! font-family: "lucida typewriter", lucidatypewriter, monospace; font-size: 90%; } *************** *** 132,136 **** .seealso { background-color: #fffaf0; border: thin solid black; ! padding: 4pt; } .seealso .heading { font-size: 110%; } --- 140,144 ---- .seealso { background-color: #fffaf0; border: thin solid black; ! padding: 0pt 1em 4pt 1em; } .seealso .heading { font-size: 110%; } *************** *** 141,142 **** --- 149,158 ---- */ .availability .platform { font-weight: bold; } + + + /* + * Some specialization for printed output. + */ + @media print { + .online-navigation { display: none; } + } From fdrake at users.sourceforge.net Tue Sep 30 11:43:22 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 11:48:57 2003 Subject: [Python-checkins] python/dist/src/Doc/html style.css,1.34,1.35 Message-ID: <E1A4Meo-0006Og-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory sc8-pr-cvs1:/tmp/cvs-serv24583 Modified Files: style.css Log Message: Fix stupid style bug in a second place. Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** style.css 30 Sep 2003 15:40:33 -0000 1.34 --- style.css 30 Sep 2003 15:43:20 -0000 1.35 *************** *** 83,87 **** div.note { background-color: #fffaf0; border: thin solid black; ! padding: 1em 1em 0em 1em; margin-left: 2em; margin-right: 2em; } --- 83,87 ---- div.note { background-color: #fffaf0; border: thin solid black; ! padding: 1em; margin-left: 2em; margin-right: 2em; } From fdrake at users.sourceforge.net Tue Sep 30 12:22:30 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 12:22:34 2003 Subject: [Python-checkins] python/dist/src/Doc Makefile,1.261.4.8,1.261.4.9 Message-ID: <E1A4NGg-00006H-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv379 Modified Files: Tag: release23-maint Makefile Log Message: Bump version numbers for the coming release. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.261.4.8 retrieving revision 1.261.4.9 diff -C2 -d -r1.261.4.8 -r1.261.4.9 *** Makefile 28 Sep 2003 16:25:09 -0000 1.261.4.8 --- Makefile 30 Sep 2003 16:22:28 -0000 1.261.4.9 *************** *** 67,71 **** # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.3.2c1 PYTHON= python --- 67,71 ---- # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.3.2 PYTHON= python From fdrake at users.sourceforge.net Tue Sep 30 12:22:30 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 12:22:38 2003 Subject: [Python-checkins] python/dist/src/Doc/commontex boilerplate.tex, 1.1.2.1, 1.1.2.2 Message-ID: <E1A4NGg-00006L-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/commontex In directory sc8-pr-cvs1:/tmp/cvs-serv379/commontex Modified Files: Tag: release23-maint boilerplate.tex Log Message: Bump version numbers for the coming release. Index: boilerplate.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/commontex/boilerplate.tex,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** boilerplate.tex 27 Sep 2003 07:14:32 -0000 1.1.2.1 --- boilerplate.tex 30 Sep 2003 16:22:28 -0000 1.1.2.2 *************** *** 6,11 **** } ! \date{\today} % XXX update before final release! \release{2.3.2} % software release, not documentation ! \setreleaseinfo{c1} % empty for final release \setshortversion{2.3} % major.minor only for software --- 6,11 ---- } ! \date{October 3, 2003} % XXX update before final release! \release{2.3.2} % software release, not documentation ! \setreleaseinfo{} % empty for final release \setshortversion{2.3} % major.minor only for software From fdrake at users.sourceforge.net Tue Sep 30 16:00:30 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 16:00:34 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libossaudiodev.tex, 1.10, 1.10.10.1 Message-ID: <E1A4Qfe-0003wx-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv15163 Modified Files: Tag: release23-maint libossaudiodev.tex Log Message: Work around minor markup issue: we don't want markup to escape into the module index. Index: libossaudiodev.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libossaudiodev.tex,v retrieving revision 1.10 retrieving revision 1.10.10.1 diff -C2 -d -r1.10 -r1.10.10.1 *** libossaudiodev.tex 29 May 2003 01:39:32 -0000 1.10 --- libossaudiodev.tex 30 Sep 2003 20:00:20 -0000 1.10.10.1 *************** *** 3,7 **** \declaremodule{builtin}{ossaudiodev} ! \platform{Linux, FreeBSD, possibly other \UNIX-like systems} \modulesynopsis{Access to OSS-compatible audio devices.} --- 3,7 ---- \declaremodule{builtin}{ossaudiodev} ! \platform{Linux, FreeBSD, maybe other Unix-like systems} \modulesynopsis{Access to OSS-compatible audio devices.} From fdrake at users.sourceforge.net Tue Sep 30 16:00:46 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 16:00:48 2003 Subject: [Python-checkins] python/dist/src/Doc/lib libossaudiodev.tex, 1.10, 1.11 Message-ID: <E1A4Qfu-0003z3-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv15273 Modified Files: libossaudiodev.tex Log Message: Work around minor markup issue: we don't want markup to escape into the module index. Index: libossaudiodev.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libossaudiodev.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** libossaudiodev.tex 29 May 2003 01:39:32 -0000 1.10 --- libossaudiodev.tex 30 Sep 2003 20:00:43 -0000 1.11 *************** *** 3,7 **** \declaremodule{builtin}{ossaudiodev} ! \platform{Linux, FreeBSD, possibly other \UNIX-like systems} \modulesynopsis{Access to OSS-compatible audio devices.} --- 3,7 ---- \declaremodule{builtin}{ossaudiodev} ! \platform{Linux, FreeBSD, maybe other Unix-like systems} \modulesynopsis{Access to OSS-compatible audio devices.} From fdrake at users.sourceforge.net Tue Sep 30 16:21:05 2003 From: fdrake at users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue Sep 30 16:21:09 2003 Subject: [Python-checkins] python/dist/src/Doc/tools push-docs.sh, 1.15.18.2, 1.15.18.3 Message-ID: <E1A4QzZ-00053O-00@sc8-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory sc8-pr-cvs1:/tmp/cvs-serv19406 Modified Files: Tag: release23-maint push-docs.sh Log Message: Revert the last change to this script on the 2.3.x maint branch; the rest of the patches needed for that to work are giong to be saved for post-2.3.2 to avoid introducing new risks in the documentation build process. Index: push-docs.sh =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/push-docs.sh,v retrieving revision 1.15.18.2 retrieving revision 1.15.18.3 diff -C2 -d -r1.15.18.2 -r1.15.18.3 *** push-docs.sh 28 Sep 2003 22:24:06 -0000 1.15.18.2 --- push-docs.sh 30 Sep 2003 20:21:03 -0000 1.15.18.3 *************** *** 11,20 **** ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' ! TOOLDIR="`dirname $0`" ! VERSION=`$TOOLDIR/getversioninfo` ! ! # Set $EXTRA to something non-empty if this is a non-trunk version: EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'` ! if echo "$EXTRA" | grep -q '[.]' ; then DOCLABEL="maintenance" DOCTYPE="maint" --- 11,17 ---- ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' ! VERSION=`echo '$Revision$' | sed 's/[$]Revision: \(.*\) [$]/\1/'` EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'` ! if [ "$EXTRA" ] ; then DOCLABEL="maintenance" DOCTYPE="maint" *************** *** 77,81 **** # now in .../Doc/ make --no-print-directory bziphtml || exit $? ! PACKAGE="html-$VERSION.tar.bz2" scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $? ssh "$TARGETHOST" tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $? --- 74,79 ---- # now in .../Doc/ make --no-print-directory bziphtml || exit $? ! RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'` ! PACKAGE="html-$RELEASE.tar.bz2" scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $? ssh "$TARGETHOST" tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $?