From bckfnn@users.sourceforge.net Fri Nov 1 11:33:03 2002 From: bckfnn@users.sourceforge.net (bckfnn@users.sourceforge.net) Date: Fri, 01 Nov 2002 03:33:03 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_frozen.py,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv19735/Lib/test Modified Files: test_frozen.py Log Message: [SF bug 631713] use the import exeption message in the TestFailed exception. Index: test_frozen.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_frozen.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_frozen.py 30 Jul 2002 23:26:01 -0000 1.2 --- test_frozen.py 1 Nov 2002 11:33:00 -0000 1.3 *************** *** 7,21 **** import __hello__ except ImportError, x: ! raise TestFailed, "import __hello__ failed:", x try: import __phello__ except ImportError, x: ! raise TestFailed, "import __phello__ failed:", x try: import __phello__.spam except ImportError, x: ! raise TestFailed, "import __phello__.spam failed:", x try: --- 7,21 ---- import __hello__ except ImportError, x: ! raise TestFailed, "import __hello__ failed:" + str(x) try: import __phello__ except ImportError, x: ! raise TestFailed, "import __phello__ failed:" + str(x) try: import __phello__.spam except ImportError, x: ! raise TestFailed, "import __phello__.spam failed:" + str(x) try: From effbot@users.sourceforge.net Fri Nov 1 17:14:19 2002 From: effbot@users.sourceforge.net (effbot@users.sourceforge.net) Date: Fri, 01 Nov 2002 09:14:19 -0800 Subject: [Python-checkins] python/dist/src/Lib xmlrpclib.py,1.21,1.22 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv15732/Lib Modified Files: xmlrpclib.py Log Message: patch #624180 (part 2 of 2): use unquote on authentication strings, to allow users to embed @ and : in user names and passwords (from Phillip Eby) Index: xmlrpclib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xmlrpclib.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** xmlrpclib.py 22 Oct 2002 18:23:00 -0000 1.21 --- xmlrpclib.py 1 Nov 2002 17:14:16 -0000 1.22 *************** *** 1066,1070 **** if auth: import base64 ! auth = base64.encodestring(auth) auth = string.join(string.split(auth), "") # get rid of whitespace extra_headers = [ --- 1066,1070 ---- if auth: import base64 ! auth = base64.encodestring(urllib.unquote(auth)) auth = string.join(string.split(auth), "") # get rid of whitespace extra_headers = [ From bckfnn@users.sourceforge.net Fri Nov 1 18:02:07 2002 From: bckfnn@users.sourceforge.net (bckfnn@users.sourceforge.net) Date: Fri, 01 Nov 2002 10:02:07 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_support.py,1.42,1.43 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv3851 Modified Files: test_support.py Log Message: Patch #631972: Adds an is_jython flag. Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** test_support.py 30 Jul 2002 23:26:01 -0000 1.42 --- test_support.py 1 Nov 2002 18:02:03 -0000 1.43 *************** *** 82,85 **** --- 82,87 ---- have_unicode = 0 + is_jython = sys.platform.startswith('java') + import os # Filename used for testing From bckfnn@users.sourceforge.net Fri Nov 1 19:12:57 2002 From: bckfnn@users.sourceforge.net (bckfnn@users.sourceforge.net) Date: Fri, 01 Nov 2002 11:12:57 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_support.py,1.40,1.40.8.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv30697 Modified Files: Tag: release22-maint test_support.py Log Message: Patch #631972: Adds an is_jython flag. Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.40 retrieving revision 1.40.8.1 diff -C2 -d -r1.40 -r1.40.8.1 *** test_support.py 30 Oct 2001 23:20:46 -0000 1.40 --- test_support.py 1 Nov 2002 19:12:55 -0000 1.40.8.1 *************** *** 79,82 **** --- 79,84 ---- have_unicode = 0 + is_jython = sys.platform.startswith('java') + import os # Filename used for testing From fdrake@users.sourceforge.net Fri Nov 1 21:33:49 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri, 01 Nov 2002 13:33:49 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.118,1.119 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv17429 Modified Files: libfuncs.tex Log Message: Update example for the type() function to use the currently accepted preference of using "is" instead of "==" to compare types, use built-in names where available, and point to the isinstance() function. Closes SF bug #632196. Index: libfuncs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -d -r1.118 -r1.119 *** libfuncs.tex 22 Oct 2002 20:31:22 -0000 1.118 --- libfuncs.tex 1 Nov 2002 21:33:44 -0000 1.119 *************** *** 837,847 **** type\obindex{type} object. The standard module \module{types}\refstmodindex{types} defines names for all built-in ! types. For instance: \begin{verbatim} >>> import types ! >>> if type(x) == types.StringType: print "It's a string" \end{verbatim} \end{funcdesc} --- 837,858 ---- type\obindex{type} object. The standard module \module{types}\refstmodindex{types} defines names for all built-in ! types that don't already have built-in names. For instance: \begin{verbatim} >>> import types ! >>> x = 'abc' ! >>> if type(x) is str: print "It's a string" ! ... ! It's a string ! >>> def f(): pass ! ... ! >>> if type(f) is types.FunctionType: print "It's a function" ! ... ! It's a function \end{verbatim} + + The \function{isinstance()} built-in function is recommended for + testing the type of an object. \end{funcdesc} From fdrake@users.sourceforge.net Fri Nov 1 21:34:41 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri, 01 Nov 2002 13:34:41 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.100.4.12,1.100.4.13 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv17933 Modified Files: Tag: release22-maint libfuncs.tex Log Message: Update example for the type() function to use the currently accepted preference of using "is" instead of "==" to compare types, use built-in names where available, and point to the isinstance() function. Closes SF bug #632196. Index: libfuncs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v retrieving revision 1.100.4.12 retrieving revision 1.100.4.13 diff -C2 -d -r1.100.4.12 -r1.100.4.13 *** libfuncs.tex 6 Oct 2002 02:16:52 -0000 1.100.4.12 --- libfuncs.tex 1 Nov 2002 21:34:39 -0000 1.100.4.13 *************** *** 800,810 **** type\obindex{type} object. The standard module \module{types}\refstmodindex{types} defines names for all built-in ! types. For instance: \begin{verbatim} >>> import types ! >>> if type(x) == types.StringType: print "It's a string" \end{verbatim} \end{funcdesc} --- 800,821 ---- type\obindex{type} object. The standard module \module{types}\refstmodindex{types} defines names for all built-in ! types that don't already have built-in names. For instance: \begin{verbatim} >>> import types ! >>> x = 'abc' ! >>> if type(x) is str: print "It's a string" ! ... ! It's a string ! >>> def f(): pass ! ... ! >>> if type(f) is types.FunctionType: print "It's a function" ! ... ! It's a function \end{verbatim} + + The \function{isinstance()} built-in function is recommended for + testing the type of an object. \end{funcdesc} From rhettinger@users.sourceforge.net Sat Nov 2 02:02:50 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Fri, 01 Nov 2002 18:02:50 -0800 Subject: [Python-checkins] python/dist/src/Lib pydoc.py,1.72,1.73 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv14738 Modified Files: pydoc.py Log Message: Correct erroneous parenthesis placement in the delta from 1.63 to 1.64. Index: pydoc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** pydoc.py 30 Oct 2002 05:21:00 -0000 1.72 --- pydoc.py 2 Nov 2002 02:02:46 -0000 1.73 *************** *** 824,829 **** def found(name, ispackage, modpkgs=modpkgs, shadowed=shadowed, seen=seen): ! if not name in seen: ! modpkgs.append((name, '', ispackage, name)) in shadowed seen[name] = 1 shadowed[name] = 1 --- 824,829 ---- def found(name, ispackage, modpkgs=modpkgs, shadowed=shadowed, seen=seen): ! if name not in seen: ! modpkgs.append((name, '', ispackage, name in shadowed)) seen[name] = 1 shadowed[name] = 1 From gvanrossum@users.sourceforge.net Sat Nov 2 06:25:53 2002 From: gvanrossum@users.sourceforge.net (gvanrossum@users.sourceforge.net) Date: Fri, 01 Nov 2002 22:25:53 -0800 Subject: [Python-checkins] python/dist/src/Demo/tkinter/guido ss1.py,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Demo/tkinter/guido In directory usw-pr-cvs1:/tmp/cvs-serv14901 Modified Files: ss1.py Log Message: Major breakthrough in selection -- drag-select multiple cells now works. Also row and column selection works (sort of). The DEL key deletes the selected rectangle. sys.argv[1] used by test_gui(). Index: ss1.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/tkinter/guido/ss1.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ss1.py 28 Oct 2002 01:06:37 -0000 1.1 --- ss1.py 2 Nov 2002 06:25:51 -0000 1.2 *************** *** 402,406 **** if self.value is None: try: ! self.value = rexec.r_eval(self.translated) except: exc = sys.exc_info()[0] --- 402,409 ---- if self.value is None: try: ! # A hack to evaluate expressions using true division ! rexec.r_exec("from __future__ import division\n" + ! "__value__ = eval(%s)" % repr(self.translated)) ! self.value = rexec.r_eval("__value__") except: exc = sys.exc_info()[0] *************** *** 491,495 **** TO DO: - clear multiple cells - - Select rows or columns - Insert, clear, remove rows or columns - Show new contents while typing --- 494,497 ---- *************** *** 536,539 **** --- 538,542 ---- self.entry.bind("", self.tab_event) self.entry.bind("", self.shift_tab_event) + self.entry.bind("", self.delete_event) # Now create the cell grid self.makegrid(rows, columns) *************** *** 545,548 **** --- 548,560 ---- self.sync() + def delete_event(self, event): + if self.cornerxy != self.currentxy and self.cornerxy is not None: + self.sheet.clearcells(*(self.currentxy + self.cornerxy)) + else: + self.sheet.clearcell(*self.currentxy) + self.sync() + self.entry.delete(0, 'end') + return "break" + def makegrid(self, rows, columns): """Helper to create the grid of GUI cells. *************** *** 550,553 **** --- 562,567 ---- The edge (x==0 or y==0) is filled with labels; the rest is real cells. """ + self.rows = rows + self.columns = columns self.gridcells = {} # Create the top row of labels *************** *** 557,560 **** --- 571,580 ---- cell.grid_configure(column=x, row=0, sticky='WE') self.gridcells[x, 0] = cell + cell.__x = x + cell.__y = 0 + cell.bind("", self.selectcolumn) + cell.bind("", self.extendcolumn) + cell.bind("", self.extendcolumn) + cell.bind("", self.extendcolumn) # Create the leftmost column of labels for y in range(1, rows+1): *************** *** 562,565 **** --- 582,591 ---- cell.grid_configure(column=0, row=y, sticky='WE') self.gridcells[0, y] = cell + cell.__x = 0 + cell.__y = y + cell.bind("", self.selectrow) + cell.bind("", self.extendrow) + cell.bind("", self.extendrow) + cell.bind("", self.extendrow) # Create the real cells for x in range(1, columns+1): *************** *** 569,578 **** cell.grid_configure(column=x, row=y, sticky='NWSE') self.gridcells[x, y] = cell ! def helper(event, self=self, x=x, y=y): ! self.setcurrent(x, y) ! cell.bind("", helper) ! def shelper(event, self=self, x=x, y=y): ! self.setcorner(x, y) ! cell.bind("", shelper) def save(self): --- 595,648 ---- cell.grid_configure(column=x, row=y, sticky='NWSE') self.gridcells[x, y] = cell ! cell.__x = x ! cell.__y = y ! # Bind mouse events ! cell.bind("", self.press) ! cell.bind("", self.motion) ! cell.bind("", self.release) ! cell.bind("", self.release) ! ! def selectcolumn(self, event): ! x, y = self.whichxy(event) ! self.setcurrent(x, 1) ! self.setcorner(x, self.rows) ! ! def extendcolumn(self, event): ! x, y = self.whichxy(event) ! if x > 0: ! self.setcurrent(self.currentxy[0], 1) ! self.setcorner(x, self.rows) ! ! def selectrow(self, event): ! x, y = self.whichxy(event) ! self.setcurrent(1, y) ! self.setcorner(self.columns, y) ! ! def extendrow(self, event): ! x, y = self.whichxy(event) ! if y > 0: ! self.setcurrent(1, self.currentxy[1]) ! self.setcorner(self.columns, y) ! ! def press(self, event): ! x, y = self.whichxy(event) ! if x > 0 and y > 0: ! self.setcurrent(x, y) ! ! def motion(self, event): ! x, y = self.whichxy(event) ! if x > 0 and y > 0: ! self.setcorner(x, y) ! ! release = motion ! ! def whichxy(self, event): ! w = self.cellgrid.winfo_containing(event.x_root, event.y_root) ! if w is not None and isinstance(w, Tk.Label): ! try: ! return w.__x, w.__y ! except AttributeError: ! pass ! return 0, 0 def save(self): *************** *** 601,605 **** gridcell = self.gridcells.get(self.currentxy) if gridcell is not None: ! gridcell['bg'] = 'lightBlue' def setcorner(self, x, y): --- 671,675 ---- gridcell = self.gridcells.get(self.currentxy) if gridcell is not None: ! gridcell['bg'] = 'yellow' def setcorner(self, x, y): *************** *** 620,623 **** --- 690,696 ---- if gridcell is not None: gridcell['bg'] = 'lightBlue' + gridcell = self.gridcells.get(self.currentxy) + if gridcell is not None: + gridcell['bg'] = 'yellow' name1 = cellname(*self.currentxy) name2 = cellname(*self.cornerxy) *************** *** 733,737 **** def test_gui(): "GUI test." ! g = SheetGUI() g.root.mainloop() --- 806,814 ---- def test_gui(): "GUI test." ! if sys.argv[1:]: ! filename = sys.argv[1] ! else: ! filename = "sheet1.xml" ! g = SheetGUI(filename) g.root.mainloop() From gvanrossum@users.sourceforge.net Sat Nov 2 06:50:08 2002 From: gvanrossum@users.sourceforge.net (gvanrossum@users.sourceforge.net) Date: Fri, 01 Nov 2002 22:50:08 -0800 Subject: [Python-checkins] python/dist/src/Demo/tkinter/guido ss1.py,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Demo/tkinter/guido In directory usw-pr-cvs1:/tmp/cvs-serv20561 Modified Files: ss1.py Log Message: Add ESC key binding -- undo current cell editing. Index: ss1.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/tkinter/guido/ss1.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ss1.py 2 Nov 2002 06:25:51 -0000 1.2 --- ss1.py 2 Nov 2002 06:50:05 -0000 1.3 *************** *** 539,542 **** --- 539,543 ---- self.entry.bind("", self.shift_tab_event) self.entry.bind("", self.delete_event) + self.entry.bind("", self.escape_event) # Now create the cell grid self.makegrid(rows, columns) *************** *** 557,560 **** --- 558,577 ---- return "break" + def escape_event(self, event): + x, y = self.currentxy + self.load_entry(x, y) + + def load_entry(self, x, y): + cell = self.sheet.getcell(x, y) + if cell is None: + text = "" + elif isinstance(cell, FormulaCell): + text = '=' + cell.formula + else: + text, alignment = cell.format() + self.entry.delete(0, 'end') + self.entry.insert(0, text) + self.entry.selection_range(0, 'end') + def makegrid(self, rows, columns): """Helper to create the grid of GUI cells. *************** *** 654,669 **** self.change_cell() self.clearfocus() ! name = cellname(x, y) ! cell = self.sheet.getcell(x, y) ! if cell is None: ! text = "" ! elif isinstance(cell, FormulaCell): ! text = '=' + cell.formula ! else: ! text, alignment = cell.format() ! self.beacon['text'] = name ! self.entry.delete(0, 'end') ! self.entry.insert(0, text) ! self.entry.selection_range(0, 'end') self.entry.focus_set() self.currentxy = x, y --- 671,676 ---- self.change_cell() self.clearfocus() ! self.beacon['text'] = cellname(x, y) ! self.load_entry(x, y) self.entry.focus_set() self.currentxy = x, y From doerwalter@users.sourceforge.net Sat Nov 2 13:32:09 2002 From: doerwalter@users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Sat, 02 Nov 2002 05:32:09 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libcodecs.tex,1.12,1.13 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv11454 Modified Files: libcodecs.tex Log Message: Move introductory sentence to where it belongs. Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** libcodecs.tex 8 Sep 2002 22:26:13 -0000 1.12 --- libcodecs.tex 2 Nov 2002 13:32:07 -0000 1.13 *************** *** 96,102 **** \end{funcdesc} - To simplify working with encoded files or stream, the module - also defines these utility functions: - \begin{funcdesc}{register_error}{name, error_handler} Register the error handling function \var{error_handler} under the --- 96,99 ---- *************** *** 135,138 **** --- 132,138 ---- Implements the \code{backslashreplace} error handling. \end{funcdesc} + + To simplify working with encoded files or stream, the module + also defines these utility functions: \begin{funcdesc}{open}{filename, mode\optional{, encoding\optional{, From nnorwitz@users.sourceforge.net Sat Nov 2 16:58:09 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 08:58:09 -0800 Subject: [Python-checkins] python/dist/src configure,1.350,1.351 configure.in,1.361,1.362 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv10867 Modified Files: configure configure.in Log Message: Need to quote test for posix_threads on HPUX11 Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.350 retrieving revision 1.351 diff -C2 -d -r1.350 -r1.351 *** configure 29 Oct 2002 10:07:39 -0000 1.350 --- configure 2 Nov 2002 16:58:03 -0000 1.351 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.360 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.361 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. *************** *** 11215,11219 **** ! if test $posix_threads != "yes"; then echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6 --- 11215,11219 ---- ! if test "$posix_threads" != "yes"; then echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6 Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.361 retrieving revision 1.362 diff -C2 -d -r1.361 -r1.362 *** configure.in 29 Oct 2002 10:07:43 -0000 1.361 --- configure.in 2 Nov 2002 16:58:05 -0000 1.362 *************** *** 1361,1365 **** USE_THREAD_MODULE=""]) ! if test $posix_threads != "yes"; then AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD) LIBS="$LIBS -lthread" --- 1361,1365 ---- USE_THREAD_MODULE=""]) ! if test "$posix_threads" != "yes"; then AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD) LIBS="$LIBS -lthread" From nnorwitz@users.sourceforge.net Sat Nov 2 18:25:10 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 10:25:10 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_dbm.py,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv14438/Lib/test Modified Files: test_dbm.py Log Message: Skip test_dbm if we can't write to the file Cleanup (remove) the file(s) after we are done with the test. (Fixes problem on snake farm) Index: test_dbm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_dbm.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_dbm.py 23 Jul 2002 19:03:47 -0000 1.8 --- test_dbm.py 2 Nov 2002 18:25:08 -0000 1.9 *************** *** 3,43 **** Roger E. Masse """ import dbm from dbm import error ! from test.test_support import verbose, verify ! filename = '/tmp/delete_me' ! d = dbm.open(filename, 'c') ! verify(d.keys() == []) ! d['a'] = 'b' ! d['12345678910'] = '019237410982340912840198242' ! d.keys() ! if d.has_key('a'): ! if verbose: ! print 'Test dbm keys: ', d.keys() ! d.close() ! d = dbm.open(filename, 'r') ! d.close() ! d = dbm.open(filename, 'rw') ! d.close() ! d = dbm.open(filename, 'w') ! d.close() ! d = dbm.open(filename, 'n') ! d.close() try: ! import os ! if dbm.library == "ndbm": ! # classic dbm ! os.unlink(filename + '.dir') ! os.unlink(filename + '.pag') ! elif dbm.library == "BSD db": ! # BSD DB's compatibility layer ! os.unlink(filename + '.db') ! else: ! # GNU gdbm compatibility layer ! os.unlink(filename) except: ! pass --- 3,55 ---- Roger E. Masse """ + import os + import random import dbm from dbm import error ! from test.test_support import verbose, verify, TestSkipped ! # make filename unique to allow multiple concurrent tests ! # and to minimize the likelihood of a problem from an old file ! filename = '/tmp/delete_me_' + str(random.random())[-6:] ! def cleanup(): ! for suffix in ['', '.pag', '.dir', '.db']: ! try: ! os.unlink(filename + suffix) ! except OSError, (errno, strerror): ! # if we can't delete the file because of permissions, ! # nothing will work, so skip the test ! if errno == 1: ! raise TestSkipped, 'unable to remove: ' + filename + suffix ! def test_keys(): ! d = dbm.open(filename, 'c') ! verify(d.keys() == []) ! d['a'] = 'b' ! d['12345678910'] = '019237410982340912840198242' ! d.keys() ! if d.has_key('a'): ! if verbose: ! print 'Test dbm keys: ', d.keys() ! ! d.close() + def test_modes(): + d = dbm.open(filename, 'r') + d.close() + d = dbm.open(filename, 'rw') + d.close() + d = dbm.open(filename, 'w') + d.close() + d = dbm.open(filename, 'n') + d.close() + + cleanup() try: ! test_keys() ! test_modes() except: ! cleanup() ! raise ! ! cleanup() From nnorwitz@users.sourceforge.net Sat Nov 2 17:46:26 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 09:46:26 -0800 Subject: [Python-checkins] python/dist/src/Modules resource.c,2.27,2.28 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv24457/Modules Modified Files: resource.c Log Message: Fix SF #632624, test_resource failure on alpha/64bit Return PyLongs instead ot PyInts. On alphas, 9223372036854775807 became -1. Index: resource.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/resource.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -d -r2.27 -r2.28 *** resource.c 2 Aug 2002 02:27:13 -0000 2.27 --- resource.c 2 Nov 2002 17:46:24 -0000 2.28 *************** *** 133,137 **** } #endif ! return Py_BuildValue("ii", (long) rl.rlim_cur, (long) rl.rlim_max); } --- 133,137 ---- } #endif ! return Py_BuildValue("ll", (long) rl.rlim_cur, (long) rl.rlim_max); } From nnorwitz@users.sourceforge.net Sat Nov 2 17:46:26 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 09:46:26 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.504,1.505 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv24457/Misc Modified Files: NEWS Log Message: Fix SF #632624, test_resource failure on alpha/64bit Return PyLongs instead ot PyInts. On alphas, 9223372036854775807 became -1. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.504 retrieving revision 1.505 diff -C2 -d -r1.504 -r1.505 *** NEWS 26 Oct 2002 14:50:45 -0000 1.504 --- NEWS 2 Nov 2002 17:46:24 -0000 1.505 *************** *** 293,296 **** --- 293,298 ---- ----------------- + - resource.getrlimit() now returns longs instead of ints. + - readline now dynamically adjusts its input/output stream if sys.stdin/stdout changes. From loewis@users.sourceforge.net Sat Nov 2 17:42:35 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat, 02 Nov 2002 09:42:35 -0800 Subject: [Python-checkins] python/dist/src/Modules posixmodule.c,2.269,2.270 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv21338/Modules Modified Files: posixmodule.c Log Message: Remove extra argument in mknod. Fixes #632628. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.269 retrieving revision 2.270 diff -C2 -d -r2.269 -r2.270 *** posixmodule.c 16 Oct 2002 20:28:24 -0000 2.269 --- posixmodule.c 2 Nov 2002 17:42:33 -0000 2.270 *************** *** 5170,5174 **** int device = 0; int res; ! if (!PyArg_ParseTuple(args, "s|iii:mknod", &filename, &mode, &device)) return NULL; Py_BEGIN_ALLOW_THREADS --- 5170,5174 ---- int device = 0; int res; ! if (!PyArg_ParseTuple(args, "s|ii:mknod", &filename, &mode, &device)) return NULL; Py_BEGIN_ALLOW_THREADS From nnorwitz@users.sourceforge.net Sat Nov 2 19:55:23 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 11:55:23 -0800 Subject: [Python-checkins] python/dist/src/Modules socketmodule.c,1.245,1.246 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv20418 Modified Files: socketmodule.c Log Message: Use O_NONBLOCK rather than O_NDELAY, so we get POSIX non-blocking I/O. On HPUX, Solaris, Tru64 (Dec UNIX), and IRIX (I think), O_NONBLOCK is the POSIX version of non-blocking I/O which is what we want. On Linux and FreeBSD (at least), O_NONBLOCK and O_NDELAY are the same. So this change should have no negative effect on those platforms. Tested on Linux, Solaris, HPUX. Thanks to Anders Qvist for diagnosing this problem. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.245 retrieving revision 1.246 diff -C2 -d -r1.245 -r1.246 *** socketmodule.c 19 Sep 2002 08:03:21 -0000 1.245 --- socketmodule.c 2 Nov 2002 19:55:21 -0000 1.246 *************** *** 212,217 **** #endif ! #ifndef O_NDELAY ! # define O_NDELAY O_NONBLOCK /* For QNX only? */ #endif --- 212,217 ---- #endif ! #ifndef O_NONBLOCK ! # define O_NONBLOCK O_NDELAY #endif *************** *** 489,495 **** delay_flag = fcntl(s->sock_fd, F_GETFL, 0); if (block) ! delay_flag &= (~O_NDELAY); else ! delay_flag |= O_NDELAY; fcntl(s->sock_fd, F_SETFL, delay_flag); #endif /* !PYOS_OS2 */ --- 489,495 ---- delay_flag = fcntl(s->sock_fd, F_GETFL, 0); if (block) ! delay_flag &= (~O_NONBLOCK); else ! delay_flag |= O_NONBLOCK; fcntl(s->sock_fd, F_SETFL, delay_flag); #endif /* !PYOS_OS2 */ From nnorwitz@users.sourceforge.net Sat Nov 2 20:43:28 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 12:43:28 -0800 Subject: [Python-checkins] python/dist/src/Parser tokenizer.c,2.68,2.69 Message-ID: Update of /cvsroot/python/python/dist/src/Parser In directory usw-pr-cvs1:/tmp/cvs-serv6822/Parser Modified Files: tokenizer.c Log Message: Fix compiler warning on HP-UX. Cast param to isalnum() to int. Index: tokenizer.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v retrieving revision 2.68 retrieving revision 2.69 diff -C2 -d -r2.68 -r2.69 *** tokenizer.c 26 Oct 2002 14:39:09 -0000 2.68 --- tokenizer.c 2 Nov 2002 20:43:25 -0000 2.69 *************** *** 229,234 **** begin = t; ! while (isalnum(t[0]) || t[0] == '-' || t[0] == '_' || ! t[0] == '.') t++; --- 229,234 ---- begin = t; ! while (isalnum((int)t[0]) || ! t[0] == '-' || t[0] == '_' || t[0] == '.') t++; From nnorwitz@users.sourceforge.net Sat Nov 2 20:58:08 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 12:58:08 -0800 Subject: [Python-checkins] python/dist/src/Python dynload_hpux.c,2.7,2.8 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv12089/Python Modified Files: dynload_hpux.c Log Message: Fix SF # 551504, python -v sometimes fails to find init (HPUX) Joseph Winston recommends removing DYNAMIC_PATH, since it can cause some dynamic libraries to not load on HP-UX 11. Index: dynload_hpux.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_hpux.c,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -d -r2.7 -r2.8 *** dynload_hpux.c 26 Jan 2002 20:03:48 -0000 2.7 --- dynload_hpux.c 2 Nov 2002 20:58:05 -0000 2.8 *************** *** 30,34 **** flags = BIND_FIRST | BIND_DEFERRED; if (Py_VerboseFlag) { ! flags = DYNAMIC_PATH | BIND_FIRST | BIND_IMMEDIATE | BIND_NONFATAL | BIND_VERBOSE; printf("shl_load %s\n",pathname); --- 30,34 ---- flags = BIND_FIRST | BIND_DEFERRED; if (Py_VerboseFlag) { ! flags = BIND_FIRST | BIND_IMMEDIATE | BIND_NONFATAL | BIND_VERBOSE; printf("shl_load %s\n",pathname); From gvanrossum@users.sourceforge.net Sat Nov 2 22:18:49 2002 From: gvanrossum@users.sourceforge.net (gvanrossum@users.sourceforge.net) Date: Sat, 02 Nov 2002 14:18:49 -0800 Subject: [Python-checkins] python/dist/src/Demo/tkinter/guido ss1.py,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Demo/tkinter/guido In directory usw-pr-cvs1:/tmp/cvs-serv11803 Modified Files: ss1.py Log Message: Add "select all" by clicking on (0,0) cell. Redo setting the selection and setting the beacon to deal better with rows or columns -- these are now expressed by range (1, sys.maxint). Index: ss1.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/tkinter/guido/ss1.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ss1.py 2 Nov 2002 06:50:05 -0000 1.3 --- ss1.py 2 Nov 2002 22:18:46 -0000 1.4 *************** *** 582,586 **** self.columns = columns self.gridcells = {} ! # Create the top row of labels for x in range(1, columns+1): self.cellgrid.grid_columnconfigure(x, minsize=64) --- 582,590 ---- self.columns = columns self.gridcells = {} ! # Create the top left corner cell (which selects all) ! cell = Tk.Label(self.cellgrid, relief='raised') ! cell.grid_configure(column=0, row=0, sticky='NSWE') ! cell.bind("", self.selectall) ! # Create the top row of labels, and confiure the grid columns for x in range(1, columns+1): self.cellgrid.grid_columnconfigure(x, minsize=64) *************** *** 610,614 **** cell = Tk.Label(self.cellgrid, relief='sunken', bg='white', fg='black') ! cell.grid_configure(column=x, row=y, sticky='NWSE') self.gridcells[x, y] = cell cell.__x = x --- 614,618 ---- cell = Tk.Label(self.cellgrid, relief='sunken', bg='white', fg='black') ! cell.grid_configure(column=x, row=y, sticky='NSWE') self.gridcells[x, y] = cell cell.__x = x *************** *** 620,627 **** cell.bind("", self.release) def selectcolumn(self, event): x, y = self.whichxy(event) self.setcurrent(x, 1) ! self.setcorner(x, self.rows) def extendcolumn(self, event): --- 624,635 ---- cell.bind("", self.release) + def selectall(self, event): + self.setcurrent(1, 1) + self.setcorner(sys.maxint, sys.maxint) + def selectcolumn(self, event): x, y = self.whichxy(event) self.setcurrent(x, 1) ! self.setcorner(x, sys.maxint) def extendcolumn(self, event): *************** *** 629,638 **** if x > 0: self.setcurrent(self.currentxy[0], 1) ! self.setcorner(x, self.rows) def selectrow(self, event): x, y = self.whichxy(event) self.setcurrent(1, y) ! self.setcorner(self.columns, y) def extendrow(self, event): --- 637,646 ---- if x > 0: self.setcurrent(self.currentxy[0], 1) ! self.setcorner(x, sys.maxint) def selectrow(self, event): x, y = self.whichxy(event) self.setcurrent(1, y) ! self.setcorner(sys.maxint, y) def extendrow(self, event): *************** *** 640,644 **** if y > 0: self.setcurrent(1, self.currentxy[1]) ! self.setcorner(self.columns, y) def press(self, event): --- 648,652 ---- if y > 0: self.setcurrent(1, self.currentxy[1]) ! self.setcorner(sys.maxint, y) def press(self, event): *************** *** 692,706 **** if y1 > y2: y1, y2 = y2, y1 ! for x in range(x1, x2+1): ! for y in range(y1, y2+1): ! gridcell = self.gridcells.get((x, y)) ! if gridcell is not None: ! gridcell['bg'] = 'lightBlue' gridcell = self.gridcells.get(self.currentxy) if gridcell is not None: gridcell['bg'] = 'yellow' ! name1 = cellname(*self.currentxy) ! name2 = cellname(*self.cornerxy) ! self.beacon['text'] = "%s:%s" % (name1, name2) --- 700,729 ---- if y1 > y2: y1, y2 = y2, y1 ! for (x, y), cell in self.gridcells.iteritems(): ! if x1 <= x <= x2 and y1 <= y <= y2: ! cell['bg'] = 'lightBlue' gridcell = self.gridcells.get(self.currentxy) if gridcell is not None: gridcell['bg'] = 'yellow' ! self.setbeacon(x1, y1, x2, y2) ! ! def setbeacon(self, x1, y1, x2, y2): ! if x1 == y1 == 1 and x2 == y2 == sys.maxint: ! name = ":" ! elif (x1, x2) == (1, sys.maxint): ! if y1 == y2: ! name = "%d" % y1 ! else: ! name = "%d:%d" % (y1, y2) ! elif (y1, y2) == (1, sys.maxint): ! if x1 == x2: ! name = "%s" % colnum2name(x1) ! else: ! name = "%s:%s" % (colnum2name(x1), colnum2name(x2)) ! else: ! name1 = cellname(*self.currentxy) ! name2 = cellname(*self.cornerxy) ! name = "%s:%s" % (name1, name2) ! self.beacon['text'] = name *************** *** 713,721 **** if y1 > y2: y1, y2 = y2, y1 ! for x in range(x1, x2+1): ! for y in range(y1, y2+1): ! gridcell = self.gridcells.get((x, y)) ! if gridcell is not None: ! gridcell['bg'] = 'white' def return_event(self, event): --- 736,742 ---- if y1 > y2: y1, y2 = y2, y1 ! for (x, y), cell in self.gridcells.iteritems(): ! if x1 <= x <= x2 and y1 <= y <= y2: ! cell['bg'] = 'white' def return_event(self, event): From nnorwitz@users.sourceforge.net Sun Nov 3 00:13:44 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 16:13:44 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libcalendar.tex,1.15,1.16 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv23819/Doc/lib Modified Files: libcalendar.tex Log Message: Fix SF #618146, overflow error in calendar module Will backport. Index: libcalendar.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcalendar.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** libcalendar.tex 13 Jun 2002 01:34:50 -0000 1.15 --- libcalendar.tex 3 Nov 2002 00:13:42 -0000 1.16 *************** *** 16,19 **** --- 16,24 ---- dates are given as integers. + Most of these functions rely on the platform provided \function{mktime()}. + Therefore, valid argument values may vary from system to system. + On Unix, valid years are typically between \code{1970} and \code{2037}, + but may be work between \code{1902} and \code{2037}. + \begin{funcdesc}{setfirstweekday}{weekday} Sets the weekday (\code{0} is Monday, \code{6} is Sunday) to start From nnorwitz@users.sourceforge.net Sun Nov 3 00:15:48 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 16:15:48 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libcalendar.tex,1.14.6.1,1.14.6.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv25047/Doc/lib Modified Files: Tag: release22-maint libcalendar.tex Log Message: Fix SF #618146, overflow error in calendar module Index: libcalendar.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcalendar.tex,v retrieving revision 1.14.6.1 retrieving revision 1.14.6.2 diff -C2 -d -r1.14.6.1 -r1.14.6.2 *** libcalendar.tex 13 Jun 2002 01:35:19 -0000 1.14.6.1 --- libcalendar.tex 3 Nov 2002 00:15:46 -0000 1.14.6.2 *************** *** 16,19 **** --- 16,24 ---- dates are given as integers. + Most of these functions rely on the platform provided \function{mktime()}. + Therefore, valid argument values may vary from system to system. + On Unix, valid years are typically between \code{1970} and \code{2037}, + but may be work between \code{1902} and \code{2037}. + \begin{funcdesc}{setfirstweekday}{weekday} Sets the weekday (\code{0} is Monday, \code{6} is Sunday) to start From nnorwitz@users.sourceforge.net Sun Nov 3 00:35:57 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 16:35:57 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_support.py,1.43,1.44 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv32337/Lib/test Modified Files: test_support.py Log Message: Fix SF # 631066, running regrtest in user mode fails Try to write to TESTFN, if that fails, try TESTFN in /tmp If that fails, print a warning and go on. Will backport. Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** test_support.py 1 Nov 2002 18:02:03 -0000 1.43 --- test_support.py 3 Nov 2002 00:35:53 -0000 1.44 *************** *** 98,102 **** else: TESTFN = 'test' ! del os from os import unlink --- 98,122 ---- else: TESTFN = 'test' ! ! # Make sure we can write to TESTFN, try in /tmp if we can't ! fp = None ! try: ! fp = open(TESTFN, 'w+') ! except IOError: ! TMP_TESTFN = os.path.join('/tmp', TESTFN) ! try: ! fp = open(TMP_TESTFN, 'w+') ! TESTFN = TMP_TESTFN ! del TMP_TESTFN ! except IOError: ! print ('WARNING: tests will fail, unable to write to: %s or %s' % ! (TESTFN, TMP_TESTFN)) ! if fp is not None: ! fp.close() ! try: ! os.unlink(TESTFN) ! except: ! pass ! del os, fp from os import unlink From nnorwitz@users.sourceforge.net Sun Nov 3 00:37:59 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 16:37:59 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_support.py,1.40.8.1,1.40.8.2 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv1148/Lib/test Modified Files: Tag: release22-maint test_support.py Log Message: Fix SF # 631066, running regrtest in user mode fails Try to write to TESTFN, if that fails, try TESTFN in /tmp If that fails, print a warning and go on. Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.40.8.1 retrieving revision 1.40.8.2 diff -C2 -d -r1.40.8.1 -r1.40.8.2 *** test_support.py 1 Nov 2002 19:12:55 -0000 1.40.8.1 --- test_support.py 3 Nov 2002 00:37:57 -0000 1.40.8.2 *************** *** 95,99 **** else: TESTFN = 'test' ! del os from os import unlink --- 95,119 ---- else: TESTFN = 'test' ! ! # Make sure we can write to TESTFN, try in /tmp if we can't ! fp = None ! try: ! fp = open(TESTFN, 'w+') ! except IOError: ! TMP_TESTFN = os.path.join('/tmp', TESTFN) ! try: ! fp = open(TMP_TESTFN, 'w+') ! TESTFN = TMP_TESTFN ! del TMP_TESTFN ! except IOError: ! print ('WARNING: tests will fail, unable to write to: %s or %s' % ! (TESTFN, TMP_TESTFN)) ! if fp is not None: ! fp.close() ! try: ! os.unlink(TESTFN) ! except: ! pass ! del os, fp from os import unlink From nnorwitz@users.sourceforge.net Sun Nov 3 02:56:29 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 18:56:29 -0800 Subject: [Python-checkins] python/dist/src/Doc/api newtypes.tex,1.16,1.17 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/api In directory usw-pr-cvs1:/tmp/cvs-serv11503/Doc/api Modified Files: newtypes.tex Log Message: Fix SF # 518775, buffer object API description truncated Index: newtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/newtypes.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** newtypes.tex 10 Sep 2002 13:48:01 -0000 1.16 --- newtypes.tex 3 Nov 2002 02:56:27 -0000 1.17 *************** *** 1503,1507 **** \begin{ctypedesc}[getcharbufferproc]{int (*getcharbufferproc) (PyObject *self, int segment, const char **ptrptr)} ! [Guido: the description is missing!] \end{ctypedesc} --- 1503,1508 ---- \begin{ctypedesc}[getcharbufferproc]{int (*getcharbufferproc) (PyObject *self, int segment, const char **ptrptr)} ! Return the size of the memory buffer in ptrptr at the segment index. ! \code{\var{ptrptr}} is set to the memory buffer. \end{ctypedesc} From nnorwitz@users.sourceforge.net Sun Nov 3 02:57:26 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sat, 02 Nov 2002 18:57:26 -0800 Subject: [Python-checkins] python/dist/src/Doc/api newtypes.tex,1.3,1.3.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/api In directory usw-pr-cvs1:/tmp/cvs-serv11690/Doc/api Modified Files: Tag: release22-maint newtypes.tex Log Message: Fix SF # 518775, buffer object API description truncated Index: newtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/newtypes.tex,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** newtypes.tex 3 Dec 2001 17:32:27 -0000 1.3 --- newtypes.tex 3 Nov 2002 02:57:24 -0000 1.3.6.1 *************** *** 344,347 **** --- 344,349 ---- \begin{ctypedesc}[getcharbufferproc]{int (*getcharbufferproc) (PyObject *self, int segment, const char **ptrptr)} + Return the size of the memory buffer in ptrptr at the segment index. + \code{\var{ptrptr}} is set to the memory buffer. \end{ctypedesc} From nnorwitz@users.sourceforge.net Sun Nov 3 13:13:22 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sun, 03 Nov 2002 05:13:22 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib tkinter.tex,1.15,1.16 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv8245/Doc/lib Modified Files: tkinter.tex Log Message: Fix SF #632864, Typo string instead of sting in LibDoc. Will backport. Index: tkinter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/tkinter.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tkinter.tex 12 Oct 2002 15:02:46 -0000 1.15 --- tkinter.tex 3 Nov 2002 13:13:20 -0000 1.16 *************** *** 693,697 **** \item[boolean] ! You can pass integers 0 or 1 or the stings \code{"yes"} or \code{"no"} . \item[callback] --- 693,697 ---- \item[boolean] ! You can pass integers 0 or 1 or the strings \code{"yes"} or \code{"no"} . \item[callback] From nnorwitz@users.sourceforge.net Sun Nov 3 13:13:56 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sun, 03 Nov 2002 05:13:56 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib tkinter.tex,1.10.6.5,1.10.6.6 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv8368/Doc/lib Modified Files: Tag: release22-maint tkinter.tex Log Message: Fix SF #632864, Typo string instead of sting in LibDoc. Index: tkinter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/tkinter.tex,v retrieving revision 1.10.6.5 retrieving revision 1.10.6.6 diff -C2 -d -r1.10.6.5 -r1.10.6.6 *** tkinter.tex 12 Oct 2002 15:03:24 -0000 1.10.6.5 --- tkinter.tex 3 Nov 2002 13:13:54 -0000 1.10.6.6 *************** *** 693,697 **** \item[boolean] ! You can pass integers 0 or 1 or the stings \code{"yes"} or \code{"no"} . \item[callback] --- 693,697 ---- \item[boolean] ! You can pass integers 0 or 1 or the strings \code{"yes"} or \code{"no"} . \item[callback] From loewis@users.sourceforge.net Sun Nov 3 17:20:14 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun, 03 Nov 2002 09:20:14 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.505,1.506 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv11450/Misc Modified Files: NEWS Log Message: Add getpreferredencoding. Support @euro modifiers. Fixes #554676. The @euro part is backported to 2.2.3. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.505 retrieving revision 1.506 diff -C2 -d -r1.505 -r1.506 *** NEWS 2 Nov 2002 17:46:24 -0000 1.505 --- NEWS 3 Nov 2002 17:20:09 -0000 1.506 *************** *** 326,330 **** added where available. ! - The locale module now exposes the C library's gettext interface. - A security hole ("double free") was found in zlib-1.1.3, a popular --- 326,331 ---- added where available. ! - The locale module now exposes the C library's gettext interface. It ! also has a new function getpreferredencoding. - A security hole ("double free") was found in zlib-1.1.3, a popular From loewis@users.sourceforge.net Sun Nov 3 17:20:14 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun, 03 Nov 2002 09:20:14 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib liblocale.tex,1.30,1.31 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv11450/Doc/lib Modified Files: liblocale.tex Log Message: Add getpreferredencoding. Support @euro modifiers. Fixes #554676. The @euro part is backported to 2.2.3. Index: liblocale.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblocale.tex,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** liblocale.tex 13 Jun 2002 17:54:06 -0000 1.30 --- liblocale.tex 3 Nov 2002 17:20:12 -0000 1.31 *************** *** 156,159 **** --- 156,173 ---- \end{funcdesc} + \begin{funcdesc}{getpreferredencoding}{\optional{do_setlocale}} + Return the encoding used for text data, according to user + preferences. User preferences are expressed differently on + different systems, and might not be available programmatically on + some systems, so this function only returns a guess. + + On some systems, it is necessary to invoke \function{setlocale} + to obtain the user preferences, so this function is not thread-safe. + If invoking setlocale is not necessary or desired, \var{do_setlocale} + should be set to \code{False}. + + \versionadded{2.3} + \end{funcdesc} + \begin{funcdesc}{normalize}{localename} Returns a normalized locale code for the given locale name. The From loewis@users.sourceforge.net Sun Nov 3 17:20:41 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun, 03 Nov 2002 09:20:41 -0800 Subject: [Python-checkins] python/dist/src/Lib locale.py,1.21,1.22 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv11450/Lib Modified Files: locale.py Log Message: Add getpreferredencoding. Support @euro modifiers. Fixes #554676. The @euro part is backported to 2.2.3. Index: locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** locale.py 19 Oct 2002 20:19:10 -0000 1.21 --- locale.py 3 Nov 2002 17:20:08 -0000 1.22 *************** *** 265,268 **** --- 265,277 ---- """ code = normalize(localename) + if '@' in localename: + # Deal with locale modifiers + code, modifier = code.split('@') + if modifier == 'euro' and '.' not in code: + # Assume Latin-9 for @euro locales. This is bogus, + # since some systems may use other encodings for these + # locales. Also, we ignore other modifiers. + return code, 'iso-8859-15' + if '.' in code: return code.split('.')[:2] *************** *** 381,384 **** --- 390,425 ---- """ _setlocale(category, _build_localename(getdefaultlocale())) + + if sys.platform in ('win32', 'darwin', 'mac'): + # On Win32, this will return the ANSI code page + # On the Mac, it should return the system encoding; + # it might return "ascii" instead + def getpreferredencoding(do_setlocale = True): + """Return the charset that the user is likely using.""" + import _locale + return _locale.getdefaultlocale()[1] + else: + # On Unix, if CODESET is available, use that. + try: + CODESET + except NameError: + # Fall back to parsing environment variables :-( + def getpreferredencoding(do_setlocale = True): + """Return the charset that the user is likely using, + by looking at environment variables.""" + return getdefaultlocale()[1] + else: + def getpreferredencoding(do_setlocale = True): + """Return the charset that the user is likely using, + according to the system configuration.""" + if do_setlocale: + oldloc = setlocale(LC_CTYPE) + setlocale(LC_CTYPE, "") + result = nl_langinfo(CODESET) + setlocale(LC_CTYPE, oldloc) + return result + else: + return nl_langinfo(CODESET) + ### Database From loewis@users.sourceforge.net Sun Nov 3 17:20:41 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun, 03 Nov 2002 09:20:41 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_locale.py,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv11450/Lib/test Modified Files: test_locale.py Log Message: Add getpreferredencoding. Support @euro modifiers. Fixes #554676. The @euro part is backported to 2.2.3. Index: test_locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_locale.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_locale.py 23 Jul 2002 19:03:56 -0000 1.4 --- test_locale.py 3 Nov 2002 17:20:09 -0000 1.5 *************** *** 39,42 **** --- 39,44 ---- testformat("%+10.f", -4200, grouping=1, output=' -4,200') testformat("%-10.f", 4200, grouping=1, output='4,200 ') + # Invoke getpreferredencoding to make sure it does not cause exceptions, + locale.getpreferredencoding() finally: locale.setlocale(locale.LC_NUMERIC, oldlocale) From loewis@users.sourceforge.net Sun Nov 3 17:23:16 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sun, 03 Nov 2002 09:23:16 -0800 Subject: [Python-checkins] python/dist/src/Lib locale.py,1.19,1.19.16.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv12649 Modified Files: Tag: release22-maint locale.py Log Message: Support @euro modifiers. Fixes #554676. Index: locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v retrieving revision 1.19 retrieving revision 1.19.16.1 diff -C2 -d -r1.19 -r1.19.16.1 *** locale.py 13 Aug 2001 14:50:44 -0000 1.19 --- locale.py 3 Nov 2002 17:23:14 -0000 1.19.16.1 *************** *** 265,268 **** --- 265,277 ---- """ code = normalize(localename) + if '@' in localename: + # Deal with locale modifiers + code, modifier = code.split('@') + if modifier == 'euro' and '.' not in code: + # Assume Latin-9 for @euro locales. This is bogus, + # since some systems may use other encodings for these + # locales. Also, we ignore other modifiers. + return code, 'iso-8859-15' + if '.' in code: return code.split('.')[:2] From loewis@users.sourceforge.net Mon Nov 4 09:56:02 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon, 04 Nov 2002 01:56:02 -0800 Subject: [Python-checkins] python/dist/src/Lib telnetlib.py,1.19,1.20 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv6075/Lib Modified Files: telnetlib.py Log Message: Patch #630829: Don't block on IAC, process suboptions. Index: telnetlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/telnetlib.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** telnetlib.py 2 Jun 2002 03:04:51 -0000 1.19 --- telnetlib.py 4 Nov 2002 09:56:00 -0000 1.20 *************** *** 26,32 **** when it is closed). - Bugs: - - may hang when connection is slow in the middle of an IAC sequence - To do: - option negotiation --- 26,29 ---- *************** *** 57,60 **** --- 54,59 ---- WILL = chr(251) theNULL = chr(0) + SB = chr(250) + SE = chr(240) # Telnet protocol options code (don't change) *************** *** 118,121 **** --- 117,121 ---- PRAGMA_HEARTBEAT = chr(140) # TELOPT PRAGMA HEARTBEAT EXOPL = chr(255) # Extended-Options-List + NOOPT = chr(0) class Telnet: *************** *** 162,169 **** I/O. set_option_negotiation_callback(callback) Each time a telnet option is read on the input flow, this callback (if set) is called with the following parameters : ! callback(telnet socket, command (DO/DONT/WILL/WONT), option) No other action is done afterwards by telnetlib. --- 162,173 ---- I/O. + read_sb_data() + Reads available data between SB ... SE sequence. Don't block. + set_option_negotiation_callback(callback) Each time a telnet option is read on the input flow, this callback (if set) is called with the following parameters : ! callback(telnet socket, command, option) ! option will be chr(0) when there is no option. No other action is done afterwards by telnetlib. *************** *** 186,189 **** --- 190,196 ---- self.cookedq = '' self.eof = 0 + self.iacseq = '' # Buffer for IAC sequence. + self.sb = 0 # flag for SB and SE sequence. + self.sbdataq = '' self.option_callback = None if host is not None: *************** *** 251,254 **** --- 258,263 ---- self.sock = 0 self.eof = 1 + self.iacseq = '' + self.sb = 0 def get_socket(self): *************** *** 380,383 **** --- 389,404 ---- raise EOFError, 'telnet connection closed' return buf + + def read_sb_data(self): + """Return any data available in the SB ... SE queue. + + Return '' if no SB ... SE available. Should only be called + after seeing a SB or SE command. When a new SB command is + found, old unread SB data will be discarded. Don't block. + + """ + buf = self.sbdataq + self.sbdataq = '' + return buf def set_option_negotiation_callback(self, callback): *************** *** 392,429 **** """ ! buf = '' try: while self.rawq: c = self.rawq_getchar() ! if c == theNULL: ! continue ! if c == "\021": ! continue ! if c != IAC: ! buf = buf + c ! continue ! c = self.rawq_getchar() ! if c == IAC: ! buf = buf + c ! elif c in (DO, DONT): ! opt = self.rawq_getchar() ! self.msg('IAC %s %d', c == DO and 'DO' or 'DONT', ord(opt)) ! if self.option_callback: ! self.option_callback(self.sock, c, opt) else: ! self.sock.sendall(IAC + WONT + opt) ! elif c in (WILL, WONT): ! opt = self.rawq_getchar() ! self.msg('IAC %s %d', ! c == WILL and 'WILL' or 'WONT', ord(opt)) ! if self.option_callback: ! self.option_callback(self.sock, c, opt) else: ! self.sock.sendall(IAC + DONT + opt) ! else: ! self.msg('IAC %d not recognized' % ord(c)) except EOFError: # raised by self.rawq_getchar() pass ! self.cookedq = self.cookedq + buf def rawq_getchar(self): --- 413,480 ---- """ ! buf = ['', ''] try: while self.rawq: c = self.rawq_getchar() ! if not self.iacseq: ! if c == theNULL: ! continue ! if c == "\021": ! continue ! if c != IAC: ! buf[self.sb] = buf[self.sb] + c ! continue else: ! self.iacseq += c ! elif len(self.iacseq) == 1: ! 'IAC: IAC CMD [OPTION only for WILL/WONT/DO/DONT]' ! if c in (DO, DONT, WILL, WONT): ! self.iacseq += c ! continue ! ! self.iacseq = '' ! if c == IAC: ! buf[self.sb] = buf[self.sb] + c else: ! if c == SB: # SB ... SE start. ! self.sb = 1 ! self.sbdataq = '' ! elif c == SE: ! self.sb = 0 ! self.sbdataq = self.sbdataq + buf[1] ! buf[1] = '' ! if self.option_callback: ! # Callback is supposed to look into ! # the sbdataq ! self.option_callback(self.sock, c, NOOPT) ! else: ! # We can't offer automatic processing of ! # suboptions. Alas, we should not get any ! # unless we did a WILL/DO before. ! self.msg('IAC %d not recognized' % ord(c)) ! elif len(self.iacseq) == 2: ! cmd = self.iacseq[1] ! self.iacseq = '' ! opt = c ! if cmd in (DO, DONT): ! self.msg('IAC %s %d', ! cmd == DO and 'DO' or 'DONT', ord(opt)) ! if self.option_callback: ! self.option_callback(self.sock, cmd, opt) ! else: ! self.sock.sendall(IAC + WONT + opt) ! elif cmd in (WILL, WONT): ! self.msg('IAC %s %d', ! cmd == WILL and 'WILL' or 'WONT', ord(opt)) ! if self.option_callback: ! self.option_callback(self.sock, cmd, opt) ! else: ! self.sock.sendall(IAC + DONT + opt) except EOFError: # raised by self.rawq_getchar() + self.iacseq = '' # Reset on EOF + self.sb = 0 pass ! self.cookedq = self.cookedq + buf[0] ! self.sbdataq = self.sbdataq + buf[1] def rawq_getchar(self): From loewis@users.sourceforge.net Mon Nov 4 09:56:03 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon, 04 Nov 2002 01:56:03 -0800 Subject: [Python-checkins] python/dist/src/Misc ACKS,1.213,1.214 NEWS,1.506,1.507 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv6075/Misc Modified Files: ACKS NEWS Log Message: Patch #630829: Don't block on IAC, process suboptions. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.213 retrieving revision 1.214 diff -C2 -d -r1.213 -r1.214 *** ACKS 26 Oct 2002 14:50:45 -0000 1.213 --- ACKS 4 Nov 2002 09:56:00 -0000 1.214 *************** *** 466,469 **** --- 466,470 ---- Fred Sells Denis Severson + Ha Shao Bruce Sherwood Pete Shinners Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.506 retrieving revision 1.507 diff -C2 -d -r1.506 -r1.507 *** NEWS 3 Nov 2002 17:20:09 -0000 1.506 --- NEWS 4 Nov 2002 09:56:00 -0000 1.507 *************** *** 1708,1712 **** - telnetlib includes symbolic names for the options, and support for ! setting an option negotiation callback. - The new C standard no longer requires that math libraries set errno to --- 1708,1713 ---- - telnetlib includes symbolic names for the options, and support for ! setting an option negotiation callback. It also supports processing ! of suboptions. - The new C standard no longer requires that math libraries set errno to From loewis@users.sourceforge.net Mon Nov 4 09:56:02 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon, 04 Nov 2002 01:56:02 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libtelnetlib.tex,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv6075/Doc/lib Modified Files: libtelnetlib.tex Log Message: Patch #630829: Don't block on IAC, process suboptions. Index: libtelnetlib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtelnetlib.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** libtelnetlib.tex 28 Nov 2001 07:26:15 -0000 1.9 --- libtelnetlib.tex 4 Nov 2002 09:55:59 -0000 1.10 *************** *** 97,100 **** --- 97,108 ---- \end{methoddesc} + \begin{methoddesc}{read_sb_data}{} + Return the data collected between a SB/SE pair (suboption begin/end). + The callback should access these data when it was invoked with a + \code{SE} command. This method never blocks. + + \versionadded{2.3} + \end{methoddesc} + \begin{methoddesc}{open}{host\optional{, port}} Connect to a host. From akuchling@users.sourceforge.net Mon Nov 4 13:33:09 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon, 04 Nov 2002 05:33:09 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils/command bdist_rpm.py,1.32,1.33 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory usw-pr-cvs1:/tmp/cvs-serv17243 Modified Files: bdist_rpm.py Log Message: [Bug #570655] Fix misleading option text Index: bdist_rpm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist_rpm.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** bdist_rpm.py 7 Oct 2002 05:57:21 -0000 1.32 --- bdist_rpm.py 4 Nov 2002 13:33:07 -0000 1.33 *************** *** 69,73 **** "list of documentation files (space or comma-separated)"), ('changelog=', None, ! "path to RPM changelog"), ('icon=', None, "name of icon file"), --- 69,73 ---- "list of documentation files (space or comma-separated)"), ('changelog=', None, ! "RPM changelog"), ('icon=', None, "name of icon file"), From akuchling@users.sourceforge.net Mon Nov 4 13:33:49 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon, 04 Nov 2002 05:33:49 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils/command bdist_rpm.py,1.27.6.2,1.27.6.3 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory usw-pr-cvs1:/tmp/cvs-serv17578 Modified Files: Tag: release22-maint bdist_rpm.py Log Message: Backport to 2.2: [Bug #570655] Fix misleading option text Index: bdist_rpm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist_rpm.py,v retrieving revision 1.27.6.2 retrieving revision 1.27.6.3 diff -C2 -d -r1.27.6.2 -r1.27.6.3 *** bdist_rpm.py 7 Oct 2002 05:56:42 -0000 1.27.6.2 --- bdist_rpm.py 4 Nov 2002 13:33:47 -0000 1.27.6.3 *************** *** 67,71 **** "list of documentation files (space or comma-separated)"), ('changelog=', None, ! "path to RPM changelog"), ('icon=', None, "name of icon file"), --- 67,71 ---- "list of documentation files (space or comma-separated)"), ('changelog=', None, ! "RPM changelog"), ('icon=', None, "name of icon file"), From akuchling@users.sourceforge.net Mon Nov 4 13:45:18 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon, 04 Nov 2002 05:45:18 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils core.py,1.51,1.52 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory usw-pr-cvs1:/tmp/cvs-serv20944 Modified Files: core.py Log Message: Add get_distutil_options(); future setup.py files can use this to check whether the Distutils being used supports a particularly capability. (This idea was originally suggested by Juergen Hermann as a method on the Distribution class. I think it makes more sense as a function in core.py, and that's what this patch implements.) Index: core.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/core.py,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** core.py 11 Sep 2002 16:31:52 -0000 1.51 --- core.py 4 Nov 2002 13:45:15 -0000 1.52 *************** *** 228,229 **** --- 228,238 ---- # run_setup () + + def get_distutil_options (): + """Returns a list of strings recording changes to the Distutils. + + setup.py files can then do: + if 'optional-thing' in get_distutil_options(): + ... + """ + return [] From akuchling@users.sourceforge.net Mon Nov 4 14:27:45 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon, 04 Nov 2002 06:27:45 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils log.py,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory usw-pr-cvs1:/tmp/cvs-serv5757 Modified Files: log.py Log Message: [Bug #620630] Flush stdout after logging every message. Without it, when output is redirected to a file, compiler error messages show up before Distutils prints the command being invoked. Index: log.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/log.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** log.py 4 Jun 2002 20:00:26 -0000 1.1 --- log.py 4 Nov 2002 14:27:43 -0000 1.2 *************** *** 10,13 **** --- 10,15 ---- FATAL = 5 + import sys + class Log: *************** *** 18,21 **** --- 20,24 ---- if level >= self.threshold: print msg % args + sys.stdout.flush() def log(self, level, msg, *args): From fdrake@users.sourceforge.net Mon Nov 4 16:29:34 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Mon, 04 Nov 2002 08:29:34 -0800 Subject: [Python-checkins] python/dist/src/Doc/texinputs python.sty,1.99,1.100 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory usw-pr-cvs1:/tmp/cvs-serv26189 Modified Files: python.sty Log Message: Thinking on comp.text.tex seems to be that it's better to override \@makefntext than \@footnotetext, so we'll do that instead. Index: python.sty =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/python.sty,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** python.sty 31 Oct 2002 21:04:34 -0000 1.99 --- python.sty 4 Nov 2002 16:29:31 -0000 1.100 *************** *** 138,146 **** % work even in footnote context. \newif\ifpy@infootnote \py@infootnotefalse ! \let\py@oldfootnotetext\@footnotetext ! \def\@footnotetext#1{% \bgroup% \py@infootnotetrue ! \py@oldfootnotetext{#1}% \egroup% } --- 138,146 ---- % work even in footnote context. \newif\ifpy@infootnote \py@infootnotefalse ! \let\py@oldmakefntext\@makefntext ! \def\@makefntext#1{% \bgroup% \py@infootnotetrue ! \py@oldmakefntext{#1}% \egroup% } From loewis@users.sourceforge.net Mon Nov 4 17:34:10 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon, 04 Nov 2002 09:34:10 -0800 Subject: [Python-checkins] python/dist/src/Lib telnetlib.py,1.20,1.21 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv19420 Modified Files: telnetlib.py Log Message: Patch #625823: Add symbolic constants for more commands. Index: telnetlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/telnetlib.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** telnetlib.py 4 Nov 2002 09:56:00 -0000 1.20 --- telnetlib.py 4 Nov 2002 17:34:07 -0000 1.21 *************** *** 54,59 **** WILL = chr(251) theNULL = chr(0) ! SB = chr(250) ! SE = chr(240) # Telnet protocol options code (don't change) --- 54,70 ---- WILL = chr(251) theNULL = chr(0) ! ! SE = chr(240) # Subnegotiation End ! NOP = chr(241) # No Operation ! DM = chr(242) # Data Mark ! BRK = chr(243) # Break ! IP = chr(244) # Interrupt process ! AO = chr(245) # Abort output ! AYT = chr(246) # Are You There ! EC = chr(247) # Erase Character ! EL = chr(248) # Erase Line ! GA = chr(249) # Go Ahead ! SB = chr(250) # Subnegotiation Begin ! # Telnet protocol options code (don't change) From loewis@users.sourceforge.net Mon Nov 4 17:41:20 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon, 04 Nov 2002 09:41:20 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libtelnetlib.tex,1.10,1.11 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv22767 Modified Files: libtelnetlib.tex Log Message: Document symbolic constants for commands. Index: libtelnetlib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtelnetlib.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** libtelnetlib.tex 4 Nov 2002 09:55:59 -0000 1.10 --- libtelnetlib.tex 4 Nov 2002 17:41:18 -0000 1.11 *************** *** 11,19 **** implements the Telnet protocol. See \rfc{854} for details about the protocol. In addition, it provides symbolic constants for the protocol ! characters (IAC/DONT/DO/WONT/WILL), and for the telnet options. The symbolic names of the telnet options follow the definitions in \code{arpa/telnet.h}, with the leading \code{TELOPT_} removed. For symbolic names of options which are traditionally not included in \code{arpa/telnet.h}, see the module source itself. --- 11,25 ---- implements the Telnet protocol. See \rfc{854} for details about the protocol. In addition, it provides symbolic constants for the protocol ! characters (see below), and for the telnet options. The symbolic names of the telnet options follow the definitions in \code{arpa/telnet.h}, with the leading \code{TELOPT_} removed. For symbolic names of options which are traditionally not included in \code{arpa/telnet.h}, see the module source itself. + + The symbolic constants for the telnet commands are: IAC, DONT, DO, + WONT, WILL, SE (Subnegotiation End), NOP (No Operation), DM (Data + Mark), BRK (Break), IP (Interrupt process), AO (Abort output), AYT + (Are You There), EC (Erase Character), EL (Erase Line), GA (Go Ahead), + SB (Subnegotiation Begin). From akuchling@users.sourceforge.net Mon Nov 4 19:50:05 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon, 04 Nov 2002 11:50:05 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils/command build_ext.py,1.86,1.87 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory usw-pr-cvs1:/tmp/cvs-serv10250 Modified Files: build_ext.py Log Message: [Patch #588809] Remove check of environment variables; sysconfig.py will do that now Index: build_ext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_ext.py,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** build_ext.py 31 Oct 2002 14:26:37 -0000 1.86 --- build_ext.py 4 Nov 2002 19:50:03 -0000 1.87 *************** *** 452,463 **** macros.append((undef,)) - # XXX and if we support CFLAGS, why not CC (compiler - # executable), CPPFLAGS (pre-processor options), and LDFLAGS - # (linker options) too? - # XXX should we use shlex to properly parse CFLAGS? - - if os.environ.has_key('CFLAGS'): - extra_args.extend(string.split(os.environ['CFLAGS'])) - objects = self.compiler.compile(sources, output_dir=self.build_temp, --- 452,455 ---- *************** *** 485,489 **** objects.extend(ext.extra_objects) extra_args = ext.extra_link_args or [] - self.compiler.link_shared_object( --- 477,480 ---- From tim_one@users.sourceforge.net Mon Nov 4 19:50:13 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon, 04 Nov 2002 11:50:13 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.507,1.508 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv8265/python/Misc Modified Files: NEWS Log Message: Related to SF patch 618135: gzip.py and files > 2G. Fixed the signed/unsigned confusions when dealing with files >= 2GB. 4GB is still a hard limitation of the gzip file format, though. Testing this was a bitch on Win98SE due to frequent system freezes. It didn't freeze while running gzip, it kept freezing while trying to *create* a > 2GB test file! This wasn't Python's doing. I don't know of a reasonable way to test this functionality in regrtest.py, so I'm not checking in a test case (a test case would necessarily require creating a 2GB+ file first, using gzip to zip it, using gzip to unzip it again, and then compare before-and-after; so >4GB free space would be required, and a loooong time; I did all this "by hand" once). Bugfix candidate, I guess. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.507 retrieving revision 1.508 diff -C2 -d -r1.507 -r1.508 *** NEWS 4 Nov 2002 09:56:00 -0000 1.507 --- NEWS 4 Nov 2002 19:50:11 -0000 1.508 *************** *** 356,359 **** --- 356,363 ---- ------- + - gzip.py now handles files exceeding 2GB. Note that 4GB is still a + fundamental limitation of the underlying gzip file format (it only + has 32 bits to record the file size). + - xml.sax.saxutils.unescape has been added, to replace entity references with their entity value. *************** *** 366,370 **** - Various configure methods of Tkinter have been stream-lined, so that tag_configure, image_configure, window_configure now return a ! dictionary when invoked with no argument. - Importing the readline module now no longer has the side effect of --- 370,374 ---- - Various configure methods of Tkinter have been stream-lined, so that tag_configure, image_configure, window_configure now return a ! dictionary when invoked with no argument. - Importing the readline module now no longer has the side effect of From tim_one@users.sourceforge.net Mon Nov 4 19:50:13 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon, 04 Nov 2002 11:50:13 -0800 Subject: [Python-checkins] python/dist/src/Lib gzip.py,1.35,1.36 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv8265/python/Lib Modified Files: gzip.py Log Message: Related to SF patch 618135: gzip.py and files > 2G. Fixed the signed/unsigned confusions when dealing with files >= 2GB. 4GB is still a hard limitation of the gzip file format, though. Testing this was a bitch on Win98SE due to frequent system freezes. It didn't freeze while running gzip, it kept freezing while trying to *create* a > 2GB test file! This wasn't Python's doing. I don't know of a reasonable way to test this functionality in regrtest.py, so I'm not checking in a test case (a test case would necessarily require creating a 2GB+ file first, using gzip to zip it, using gzip to unzip it again, and then compare before-and-after; so >4GB free space would be required, and a loooong time; I did all this "by hand" once). Bugfix candidate, I guess. Index: gzip.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/gzip.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** gzip.py 6 Aug 2002 17:03:25 -0000 1.35 --- gzip.py 4 Nov 2002 19:50:11 -0000 1.36 *************** *** 16,25 **** READ, WRITE = 1, 2 def write32(output, value): output.write(struct.pack("= 2GB when viewed as a 32-bit unsigned int, return a long. + """ + if i < 0: + i += 1L << 32 + return i + def write32(output, value): output.write(struct.pack(" 0: line = self.readline() ! if line == "": break L.append(line) sizehint = sizehint - len(line) --- 394,404 ---- def readlines(self, sizehint=0): # Negative numbers result in reading all the lines ! if sizehint <= 0: ! sizehint = sys.maxint L = [] while sizehint > 0: line = self.readline() ! if line == "": ! break L.append(line) sizehint = sizehint - len(line) From akuchling@users.sourceforge.net Mon Nov 4 19:53:26 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon, 04 Nov 2002 11:53:26 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils sysconfig.py,1.50,1.51 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory usw-pr-cvs1:/tmp/cvs-serv10816 Modified Files: sysconfig.py Log Message: [Patch #588809] LDFLAGS support for build_ext.py, from Robert Weber customize_compiler() now looks at various environment variables and uses their values to override the configured C compiler/preprocessor/linker binary and flags. Index: sysconfig.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/sysconfig.py,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** sysconfig.py 12 Jul 2002 09:16:44 -0000 1.50 --- sysconfig.py 4 Nov 2002 19:53:24 -0000 1.51 *************** *** 143,149 **** get_config_vars('CC', 'OPT', 'CCSHARED', 'LDSHARED', 'SO') cc_cmd = cc + ' ' + opt compiler.set_executables( ! preprocessor=cc + " -E", # not always! compiler=cc_cmd, compiler_so=cc_cmd + ' ' + ccshared, --- 143,165 ---- get_config_vars('CC', 'OPT', 'CCSHARED', 'LDSHARED', 'SO') + if os.environ.has_key('CC'): + cc = os.environ['CC'] + if os.environ.has_key('CPP'): + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if os.environ.has_key('LDFLAGS'): + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] + if os.environ.has_key('CFLAGS'): + opt = opt + ' ' + os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] + if os.environ.has_key('CPPFLAGS'): + cpp = cpp + ' ' + os.environ['CPPFLAGS'] + opt = opt + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] + cc_cmd = cc + ' ' + opt compiler.set_executables( ! preprocessor=cpp, compiler=cc_cmd, compiler_so=cc_cmd + ' ' + ccshared, From akuchling@users.sourceforge.net Mon Nov 4 20:05:14 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon, 04 Nov 2002 12:05:14 -0800 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew23.tex,1.60,1.61 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory usw-pr-cvs1:/tmp/cvs-serv16294 Modified Files: whatsnew23.tex Log Message: Mention distutil changes Index: whatsnew23.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew23.tex,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** whatsnew23.tex 16 Oct 2002 18:27:38 -0000 1.60 --- whatsnew23.tex 4 Nov 2002 20:05:10 -0000 1.61 *************** *** 903,906 **** --- 903,913 ---- (Contributed by Jeremy Hylton.) + \item Other minor changes to Distutils: + it now checks for the \envvar{CC}, \envvar{CFLAGS}, \envvar{CPP}, + \envvar{LDFLAGS}, and \envvar{CPPFLAGS} environment variables, using + them to override the settings in Python's configuration (contributed + by Robert Weber); the \function{get_distutils_option()} method lists + recently-added extensions to Distutils. + \item The \module{getopt} module gained a new function, \function{gnu_getopt()}, that supports the same arguments as the existing From akuchling@users.sourceforge.net Mon Nov 4 20:17:26 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon, 04 Nov 2002 12:17:26 -0800 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew23.tex,1.61,1.62 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory usw-pr-cvs1:/tmp/cvs-serv20916 Modified Files: whatsnew23.tex Log Message: Bring back the patch/bug count paragraph. Correct source of *strip() changes Small rewrites. Index: whatsnew23.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew23.tex,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** whatsnew23.tex 4 Nov 2002 20:05:10 -0000 1.61 --- whatsnew23.tex 4 Nov 2002 20:17:24 -0000 1.62 *************** *** 15,20 **** % MacOS framework-related changes (section of its own, probably) % - % New sorting code - % % xreadlines obsolete; files are their own iterator --- 15,18 ---- *************** *** 701,705 **** (Patch contributed by Raymond Hettinger.) ! \item The \keyword{assert} statement no longer checks the \code{__debug__} flag, so you can no longer disable assertions by assigning to \code{__debug__}. Running Python with the \programopt{-O} switch will still generate --- 699,703 ---- (Patch contributed by Raymond Hettinger.) ! \item The \keyword{assert} statement no longer checks the \code{__debug__} flag, so you can no longer disable assertions by assigning to \code{__debug__}. Running Python with the \programopt{-O} switch will still generate *************** *** 805,809 **** \end{verbatim} ! (Contributed by Simon Brunning.) \item The \method{startswith()} and \method{endswith()} --- 803,807 ---- \end{verbatim} ! (Suggested by Simon Brunning, and implemented by Walter D\"orwald.) \item The \method{startswith()} and \method{endswith()} *************** *** 1302,1306 **** \section{Other Changes and Fixes} ! Finally, there are various miscellaneous fixes: \begin{itemize} --- 1300,1309 ---- \section{Other Changes and Fixes} ! As usual, there were a bunch of other improvements and bugfixes ! scattered throughout the source tree. A search through the CVS change ! logs finds there were 289 patches applied and 323 bugs fixed between ! Python 2.2 and 2.3. Both figures are likely to be underestimates. ! ! Some of the more notable changes are: \begin{itemize} *************** *** 1318,1323 **** entirely. ! Python code will be hard pushed to notice a difference from this ! change, apart from a slight speed up when python is run without \programopt{-O}. --- 1321,1326 ---- entirely. ! It would be difficult to detect any resulting difference from Python ! code, apart from a slight speed up when Python is run without \programopt{-O}. *************** *** 1341,1345 **** The author would like to thank the following people for offering suggestions, corrections and assistance with various drafts of this ! article: Michael Chermside, Scott David Daniels, Fred~L. Drake, Jr., Michael Hudson, Detlef Lannert, Martin von L\"owis, Andrew MacIntyre, Lalo Martins, Gustavo Niemeyer, Neal Norwitz, Jason Tishler. --- 1344,1348 ---- The author would like to thank the following people for offering suggestions, corrections and assistance with various drafts of this ! article: Simon Brunning, Michael Chermside, Scott David Daniels, Fred~L. Drake, Jr., Michael Hudson, Detlef Lannert, Martin von L\"owis, Andrew MacIntyre, Lalo Martins, Gustavo Niemeyer, Neal Norwitz, Jason Tishler. From fdrake@users.sourceforge.net Mon Nov 4 20:49:49 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Mon, 04 Nov 2002 12:49:49 -0800 Subject: [Python-checkins] python/dist/src README,1.155,1.156 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv1664 Modified Files: README Log Message: Update config.h to pyconfig.h. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.155 retrieving revision 1.156 diff -C2 -d -r1.155 -r1.156 *** README 14 Oct 2002 18:15:35 -0000 1.155 --- README 4 Nov 2002 20:49:45 -0000 1.156 *************** *** 306,310 **** 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 config.h defines it. HP PA-RISC 2.0: A recent bug report (http://www.python.org/sf/546117) --- 306,310 ---- 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) From fdrake@users.sourceforge.net Mon Nov 4 20:50:43 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Mon, 04 Nov 2002 12:50:43 -0800 Subject: [Python-checkins] python/dist/src README,1.136.4.11,1.136.4.12 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv2159 Modified Files: Tag: release22-maint README Log Message: Update config.h to pyconfig.h and config.h.in to pyconfig.h.in. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.136.4.11 retrieving revision 1.136.4.12 diff -C2 -d -r1.136.4.11 -r1.136.4.12 *** README 14 Oct 2002 18:13:24 -0000 1.136.4.11 --- README 4 Nov 2002 20:50:39 -0000 1.136.4.12 *************** *** 305,309 **** 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 config.h defines it. Minix: When using ack, use "CC=cc AR=aal RANLIB=: ./configure"! --- 305,309 ---- 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. Minix: When using ack, use "CC=cc AR=aal RANLIB=: ./configure"! *************** *** 906,910 **** effect of running the configure script manually (for Mac and PC, this has already been done for you). A good start is to copy the file ! config.h.in to config.h and edit the latter to reflect the actual configuration of your system. Most symbols must simply be defined as 1 only if the corresponding feature is present and can be left alone --- 906,910 ---- effect of running the configure script manually (for Mac and PC, this has already been done for you). A good start is to copy the file ! pyconfig.h.in to pyconfig.h and edit the latter to reflect the actual configuration of your system. Most symbols must simply be defined as 1 only if the corresponding feature is present and can be left alone *************** *** 988,992 **** Tools/ Some useful programs written in Python acconfig.h Additional input for the GNU autoheader program ! config.h.in Source from which config.h is created (GNU autoheader output) configure Configuration shell script (GNU autoconf output) configure.in Configuration specification (input for GNU autoconf) --- 988,992 ---- Tools/ Some useful programs written in Python acconfig.h Additional input for the GNU autoheader program ! pyconfig.h.in Source from which pyconfig.h is created (GNU autoheader output) configure Configuration shell script (GNU autoconf output) configure.in Configuration specification (input for GNU autoconf) *************** *** 1000,1004 **** buildno Keeps track of the build number config.cache Cache of configuration variables ! config.h Configuration header config.log Log from last configure run config.status Status from last run of the configure script --- 1000,1004 ---- buildno Keeps track of the build number config.cache Cache of configuration variables ! pyconfig.h Configuration header config.log Log from last configure run config.status Status from last run of the configure script From nnorwitz@users.sourceforge.net Mon Nov 4 23:21:12 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Mon, 04 Nov 2002 15:21:12 -0800 Subject: [Python-checkins] python/dist/src/Modules nismodule.c,2.23,2.24 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv11311/Modules Modified Files: nismodule.c Log Message: SF #633013, Fix NIS causing interpreter core dump Prevent the lengths passed to PyString_FromStringAndSize() from being negative in some cases. Index: nismodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -d -r2.23 -r2.24 *** nismodule.c 31 Mar 2002 15:27:00 -0000 2.23 --- nismodule.c 4 Nov 2002 23:21:09 -0000 2.24 *************** *** 86,91 **** if (indata->fix) { ! inkeylen--; ! invallen--; } key = PyString_FromStringAndSize(inkey, inkeylen); --- 86,93 ---- if (indata->fix) { ! if (inkeylen > 0 && inkey[inkeylen-1] == '\0') ! inkeylen--; ! if (invallen > 0 && inval[invallen-1] == '\0') ! invallen--; } key = PyString_FromStringAndSize(inkey, inkeylen); From nnorwitz@users.sourceforge.net Mon Nov 4 23:40:49 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Mon, 04 Nov 2002 15:40:49 -0800 Subject: [Python-checkins] python/dist/src/Modules nismodule.c,2.21,2.21.24.1 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv24338/Modules Modified Files: Tag: release22-maint nismodule.c Log Message: Backport last checkin: SF #633013, Fix NIS causing interpreter core dump Prevent the lengths passed to PyString_FromStringAndSize() from being negative in some cases. Index: nismodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v retrieving revision 2.21 retrieving revision 2.21.24.1 diff -C2 -d -r2.21 -r2.21.24.1 *** nismodule.c 21 Jan 2001 23:34:12 -0000 2.21 --- nismodule.c 4 Nov 2002 23:40:47 -0000 2.21.24.1 *************** *** 86,91 **** if (indata->fix) { ! inkeylen--; ! invallen--; } key = PyString_FromStringAndSize(inkey, inkeylen); --- 86,93 ---- if (indata->fix) { ! if (inkeylen > 0 && inkey[inkeylen-1] == '\0') ! inkeylen--; ! if (invallen > 0 && inval[invallen-1] == '\0') ! invallen--; } key = PyString_FromStringAndSize(inkey, inkeylen); From akuchling@users.sourceforge.net Tue Nov 5 00:26:35 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Mon, 04 Nov 2002 16:26:35 -0800 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew23.tex,1.62,1.63 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory usw-pr-cvs1:/tmp/cvs-serv15725 Modified Files: whatsnew23.tex Log Message: Use personal e-mail address; update date; various small edits; add a name to acks Index: whatsnew23.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew23.tex,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** whatsnew23.tex 4 Nov 2002 20:17:24 -0000 1.62 --- whatsnew23.tex 5 Nov 2002 00:26:33 -0000 1.63 *************** *** 5,9 **** \release{0.03} \author{A.M. Kuchling} ! \authoraddress{\email{akuchlin@mems-exchange.org}} \begin{document} --- 5,9 ---- \release{0.03} \author{A.M. Kuchling} ! \authoraddress{\email{amk@amk.ca}} \begin{document} *************** *** 20,24 **** {\large This article is a draft, and is currently up to date for some ! random version of the CVS tree around mid-July 2002. Please send any additions, comments or errata to the author.} --- 20,24 ---- {\large This article is a draft, and is currently up to date for some ! random version of the CVS tree from early November 2002. Please send any additions, comments or errata to the author.} *************** *** 1073,1088 **** the \method{toxml()} and \method{toprettyxml()} methods of DOM nodes. ! \item The \function{stat} family of functions can now report fractions ! of a second in a time stamp. Similar to \function{time.time}, such ! time stamps are represented as floats. ! During testing, it was found that some applications break if time ! stamps are floats. For compatibility, when using the tuple interface of the \class{stat_result}, time stamps are represented as integers. ! When using named fields (first introduced in Python 2.2), time stamps ! are still represented as ints, unless \function{os.stat_float_times} ! is invoked: \begin{verbatim} >>> os.stat_float_times(True) >>> os.stat("/tmp").st_mtime --- 1073,1091 ---- the \method{toxml()} and \method{toprettyxml()} methods of DOM nodes. ! \item The \function{*stat()} family of functions can now report ! fractions of a second in a timestamp. Such time stamps are ! represented as floats, similar to \function{time.time()}. ! During testing, it was found that some applications will break if time ! stamps are floats. For compatibility, when using the tuple interface of the \class{stat_result}, time stamps are represented as integers. ! When using named fields (a feature first introduced in Python 2.2), ! time stamps are still represented as ints, unless ! \function{os.stat_float_times()} is invoked to enable float return ! values: \begin{verbatim} + >>> os.stat("/tmp").st_mtime + 1034791200 >>> os.stat_float_times(True) >>> os.stat("/tmp").st_mtime *************** *** 1090,1099 **** \end{verbatim} ! In Python 2.4, the default will change to return floats. Application developers should use this feature only if all their libraries work properly when confronted with floating point time ! stamps (or use the tuple API). If used, the feature should be ! activated on application level, instead of trying to activate it on a per-use basis. --- 1093,1102 ---- \end{verbatim} ! In Python 2.4, the default will change to always returning floats. Application developers should use this feature only if all their libraries work properly when confronted with floating point time ! stamps, or if they use the tuple API. If used, the feature should be ! activated on an application level instead of trying to enable it on a per-use basis. *************** *** 1346,1350 **** article: Simon Brunning, Michael Chermside, Scott David Daniels, Fred~L. Drake, Jr., Michael Hudson, Detlef Lannert, Martin von L\"owis, Andrew MacIntyre, ! Lalo Martins, Gustavo Niemeyer, Neal Norwitz, Jason Tishler. \end{document} --- 1349,1354 ---- article: Simon Brunning, Michael Chermside, Scott David Daniels, Fred~L. Drake, Jr., Michael Hudson, Detlef Lannert, Martin von L\"owis, Andrew MacIntyre, ! Lalo Martins, Gustavo Niemeyer, Neal Norwitz, Neil Schemenauer, Jason ! Tishler. \end{document} From tim_one@users.sourceforge.net Tue Nov 5 03:49:11 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon, 04 Nov 2002 19:49:11 -0800 Subject: [Python-checkins] python/dist/src/Lib locale.py,1.22,1.23 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv28962/python/Lib Modified Files: locale.py Log Message: This stopped working on Windows, due to a reference to the non-existent _locale.getdefaultlocale. Guessing a leading underscore was intended, but don't really understood this stuff (locale looks like Spanish for the opposite of global to me ). Index: locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** locale.py 3 Nov 2002 17:20:08 -0000 1.22 --- locale.py 5 Nov 2002 03:49:09 -0000 1.23 *************** *** 398,402 **** """Return the charset that the user is likely using.""" import _locale ! return _locale.getdefaultlocale()[1] else: # On Unix, if CODESET is available, use that. --- 398,402 ---- """Return the charset that the user is likely using.""" import _locale ! return _locale._getdefaultlocale()[1] else: # On Unix, if CODESET is available, use that. From rhettinger@users.sourceforge.net Tue Nov 5 06:06:05 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon, 04 Nov 2002 22:06:05 -0800 Subject: [Python-checkins] python/dist/src/Lib tokenize.py,1.33,1.34 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv28248 Modified Files: tokenize.py Log Message: SF 633560: tokenize.__all__ needs "generate_tokens" Index: tokenize.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/tokenize.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** tokenize.py 24 Aug 2002 06:54:19 -0000 1.33 --- tokenize.py 5 Nov 2002 06:06:02 -0000 1.34 *************** *** 31,35 **** import token ! __all__ = [x for x in dir(token) if x[0] != '_'] + ["COMMENT", "tokenize", "NL"] del x del token --- 31,36 ---- import token ! __all__ = [x for x in dir(token) if x[0] != '_'] + ["COMMENT", "tokenize", ! "generate_tokens", "NL"] del x del token From rhettinger@users.sourceforge.net Tue Nov 5 06:08:14 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Mon, 04 Nov 2002 22:08:14 -0800 Subject: [Python-checkins] python/dist/src/Lib tokenize.py,1.28.14.2,1.28.14.3 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv28885 Modified Files: Tag: release22-maint tokenize.py Log Message: SF 633560: tokenize.__all__ needs "generate_tokens" Index: tokenize.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/tokenize.py,v retrieving revision 1.28.14.2 retrieving revision 1.28.14.3 diff -C2 -d -r1.28.14.2 -r1.28.14.3 *** tokenize.py 7 Oct 2002 01:18:17 -0000 1.28.14.2 --- tokenize.py 5 Nov 2002 06:08:11 -0000 1.28.14.3 *************** *** 33,37 **** import token ! __all__ = [x for x in dir(token) if x[0] != '_'] + ["COMMENT", "tokenize", "NL"] del token --- 33,38 ---- import token ! __all__ = [x for x in dir(token) if x[0] != '_'] + ["COMMENT", "tokenize", ! "generate_tokens", "NL"] del token From theller@users.sourceforge.net Tue Nov 5 10:02:08 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Tue, 05 Nov 2002 02:02:08 -0800 Subject: [Python-checkins] distutils/misc install.c,1.20,1.21 Message-ID: Update of /cvsroot/python/distutils/misc In directory usw-pr-cvs1:/tmp/cvs-serv10691a/misc Modified Files: install.c Log Message: Fixed the error handling of the run_installscript function. Index: install.c =================================================================== RCS file: /cvsroot/python/distutils/misc/install.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** install.c 16 Oct 2002 17:48:58 -0000 1.20 --- install.c 5 Nov 2002 10:02:03 -0000 1.21 *************** *** 328,345 **** --- 328,359 ---- char *name; } csidl_names[] = { + /* Startup menu for all users. + NT only */ DEF_CSIDL(CSIDL_COMMON_STARTMENU), + /* Startup menu. */ DEF_CSIDL(CSIDL_STARTMENU), /* DEF_CSIDL(CSIDL_COMMON_APPDATA), */ /* DEF_CSIDL(CSIDL_LOCAL_APPDATA), */ + /* Repository for application-specific data. + Needs Internet Explorer 4.0 */ DEF_CSIDL(CSIDL_APPDATA), + /* The desktop for all users. + NT only */ DEF_CSIDL(CSIDL_COMMON_DESKTOPDIRECTORY), + /* The desktop. */ DEF_CSIDL(CSIDL_DESKTOPDIRECTORY), + /* Startup folder for all users. + NT only */ DEF_CSIDL(CSIDL_COMMON_STARTUP), + /* Startup folder. */ DEF_CSIDL(CSIDL_STARTUP), + /* Programs item in the start menu for all users. + NT only */ DEF_CSIDL(CSIDL_COMMON_PROGRAMS), + /* Program item in the user's start menu. */ DEF_CSIDL(CSIDL_PROGRAMS), *************** *** 347,350 **** --- 361,365 ---- /* DEF_CSIDL(CSIDL_PROGRAM_FILES), */ + /* Virtual folder containing fonts. */ DEF_CSIDL(CSIDL_FONTS), }; *************** *** 523,526 **** --- 538,551 ---- }; + /* + * This function returns one of the following error codes: + * 1 if the Python-dll does not export the functions we need + * 2 if no install-script is specified in pathname + * 3 if the install-script file could not be opened + * the return value of PyRun_SimpleFile() otherwise, + * which is 0 if everything is ok, -1 if an exception had occurred + * in the install-script. + */ + static int run_installscript(HINSTANCE hPython, char *pathname, int argc, char **argv) { *************** *** 543,557 **** if (!Py_Initialize || !PySys_SetArgv || !PyRun_SimpleFile || !Py_Finalize) ! return 0x80000000; if (!PyImport_ImportModule || !PyObject_SetAttrString || !Py_BuildValue) ! return 0x80000000; if (!PyCFunction_New || !PyArg_ParseTuple || !PyErr_Format) ! return 0x80000000; if (!PyObject_GetAttrString) ! return 0x80000000; ! g_Py_BuildValue = Py_BuildValue; --- 568,581 ---- if (!Py_Initialize || !PySys_SetArgv || !PyRun_SimpleFile || !Py_Finalize) ! return 1; if (!PyImport_ImportModule || !PyObject_SetAttrString || !Py_BuildValue) ! return 1; if (!PyCFunction_New || !PyArg_ParseTuple || !PyErr_Format) ! return 1; if (!PyObject_GetAttrString) ! return 1; g_Py_BuildValue = Py_BuildValue; *************** *** 560,568 **** if (pathname == NULL || pathname[0] == '\0') ! return 0x80000000; fp = fopen(pathname, "r"); if (!fp) { ! return 0x80000000; } --- 584,593 ---- if (pathname == NULL || pathname[0] == '\0') ! return 2; fp = fopen(pathname, "r"); if (!fp) { ! fprintf(stderr, "Could not open postinstall-script %s\n", pathname); ! return 3; } *************** *** 1648,1654 **** hPython = LoadLibrary(pythondll); if (hPython) { ! if (0x80000000 == run_installscript(hPython, fname, 2, argv)) ! fprintf(stderr, "*** Could not load Python ***"); FreeLibrary(hPython); } fflush(stderr); --- 1673,1684 ---- hPython = LoadLibrary(pythondll); if (hPython) { ! int result; ! result = run_installscript(hPython, fname, 2, argv); ! if (result) { ! fprintf(stderr, "*** run_installscript: internal error 0x%X ***\n", result); ! } FreeLibrary(hPython); + } else { + fprintf(stderr, "*** Could not load Python ***"); } fflush(stderr); From theller@users.sourceforge.net Tue Nov 5 10:03:30 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Tue, 05 Nov 2002 02:03:30 -0800 Subject: [Python-checkins] distutils/misc wininst.exe,1.16,1.17 Message-ID: Update of /cvsroot/python/distutils/misc In directory usw-pr-cvs1:/tmp/cvs-serv11231/misc Modified Files: wininst.exe Log Message: Recompiled after source changes: Fixed the error handling of the run_installscript function. Index: wininst.exe =================================================================== RCS file: /cvsroot/python/distutils/misc/wininst.exe,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 Binary files /tmp/cvsh5JI4J and /tmp/cvsAATfTj differ From theller@users.sourceforge.net Tue Nov 5 10:06:22 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Tue, 05 Nov 2002 02:06:22 -0800 Subject: [Python-checkins] distutils/distutils/command bdist_wininst.py,1.38,1.39 Message-ID: Update of /cvsroot/python/distutils/distutils/command In directory usw-pr-cvs1:/tmp/cvs-serv12864/distutils/command Modified Files: bdist_wininst.py Log Message: Must now give the basename - not including directories - of the install-script on the command line. Recreated after recompilation of wininst.exe. Index: bdist_wininst.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_wininst.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** bdist_wininst.py 16 Oct 2002 17:51:38 -0000 1.38 --- bdist_wininst.py 5 Nov 2002 10:06:19 -0000 1.39 *************** *** 42,47 **** "skip rebuilding everything (for testing/debugging)"), ('install-script=', None, ! "installation script to be run after installation" ! " or before deinstallation"), ] --- 42,47 ---- "skip rebuilding everything (for testing/debugging)"), ('install-script=', None, ! "basename of installation script to be run after" ! "installation or before deinstallation"), ] *************** *** 79,87 **** self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) ! if self.install_script and \ ! self.install_script not in self.distribution.scripts: ! raise DistutilsOptionError, \ ! "install_script '%s' not found in scripts" % self.install_script ! # finalize_options() --- 79,90 ---- self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) ! if self.install_script: ! for script in self.distribution.scripts: ! if self.install_script == os.path.basename(script): ! break ! else: ! raise DistutilsOptionError, \ ! "install_script '%s' not found in scripts" % \ ! self.install_script # finalize_options() *************** *** 265,275 **** ZGUuDQ0KJAAAAAAAAAAtOHsRaVkVQmlZFUJpWRVCEkUZQmpZFUIGRh9CYlkVQupFG0JrWRVCBkYR QmtZFUJpWRVCZlkVQmlZFELjWRVCC0YGQmRZFUJveh9Ca1kVQq5fE0JoWRVCUmljaGlZFUIAAAAA ! AAAAAAAAAAAAAAAAUEUAAEwBAwCepq09AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAALAAAIAGAQAA wAAAABABAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAEAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAwEQEA5AEAAAAQAQAwAQAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ! AAAAAAAAAAAAAAAAAAAAAA== """ From mwh@users.sourceforge.net Tue Nov 5 15:28:53 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Tue, 05 Nov 2002 07:28:53 -0800 Subject: [Python-checkins] python/dist/src/Objects sliceobject.c,2.18,2.19 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv7435/Objects Modified Files: sliceobject.c Log Message: Some days, I think my comment of /* this is harder to get right than you might think */ angered some God somewhere. After noticing >>> range(5000000)[slice(96360, None, 439)] [] I found that my cute test for the slice being empty failed due to overflow. Fixed, and added simple test (not the above!). Index: sliceobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -d -r2.18 -r2.19 *** sliceobject.c 12 Sep 2002 09:31:30 -0000 2.18 --- sliceobject.c 5 Nov 2002 15:28:51 -0000 2.19 *************** *** 115,123 **** { /* this is harder to get right than you might think */ int defstart, defstop; if (r->step == Py_None) { *step = 1; ! } else { *step = PyInt_AsLong(r->step); if (*step == -1 && PyErr_Occurred()) { --- 115,125 ---- { /* this is harder to get right than you might think */ + int defstart, defstop; if (r->step == Py_None) { *step = 1; ! } ! else { *step = PyInt_AsLong(r->step); if (*step == -1 && PyErr_Occurred()) { *************** *** 136,140 **** if (r->start == Py_None) { *start = defstart; ! } else { if (!_PyEval_SliceIndex(r->start, start)) return -1; if (*start < 0) *start += length; --- 138,143 ---- if (r->start == Py_None) { *start = defstart; ! } ! else { if (!_PyEval_SliceIndex(r->start, start)) return -1; if (*start < 0) *start += length; *************** *** 146,150 **** if (r->stop == Py_None) { *stop = defstop; ! } else { if (!_PyEval_SliceIndex(r->stop, stop)) return -1; if (*stop < 0) *stop += length; --- 149,154 ---- if (r->stop == Py_None) { *stop = defstop; ! } ! else { if (!_PyEval_SliceIndex(r->stop, stop)) return -1; if (*stop < 0) *stop += length; *************** *** 152,162 **** if (*stop > length) *stop = length; } ! ! if ((*stop - *start)*(*step) <= 0) { *slicelength = 0; } else if (*step < 0) { *slicelength = (*stop-*start+1)/(*step)+1; ! } else { *slicelength = (*stop-*start-1)/(*step)+1; } --- 156,168 ---- if (*stop > length) *stop = length; } ! ! if ((*step < 0 && *stop >= *start) ! || (*step > 0 && *start >= *stop)) { *slicelength = 0; } else if (*step < 0) { *slicelength = (*stop-*start+1)/(*step)+1; ! } ! else { *slicelength = (*stop-*start-1)/(*step)+1; } From mwh@users.sourceforge.net Tue Nov 5 15:28:53 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Tue, 05 Nov 2002 07:28:53 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_slice.py,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv7435/Lib/test Modified Files: test_slice.py Log Message: Some days, I think my comment of /* this is harder to get right than you might think */ angered some God somewhere. After noticing >>> range(5000000)[slice(96360, None, 439)] [] I found that my cute test for the slice being empty failed due to overflow. Fixed, and added simple test (not the above!). Index: test_slice.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_slice.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_slice.py 8 Aug 2002 20:19:19 -0000 1.3 --- test_slice.py 5 Nov 2002 15:28:50 -0000 1.4 *************** *** 2,5 **** --- 2,6 ---- from test.test_support import vereq + import sys vereq(slice(None ).indices(10), (0, 10, 1)) *************** *** 12,13 **** --- 13,16 ---- 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]) From niemeyer@users.sourceforge.net Tue Nov 5 16:12:07 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Tue, 05 Nov 2002 08:12:07 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils/command build_ext.py,1.87,1.88 config.py,1.12,1.13 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory usw-pr-cvs1:/tmp/cvs-serv27486/command Modified Files: build_ext.py config.py Log Message: This patch fixes the following bugs: [#413582] g++ must be called for c++ extensions [#454030] distutils cannot link C++ code with GCC topdir = "Lib/distutils" * bcppcompiler.py (BCPPCompiler.create_static_lib): Fixed prototype, removing extra_preargs and extra_postargs parameters. Included target_lang parameter. (BCPPCompiler.link): Included target_lang parameter. * msvccompiler.py (MSVCCompiler.create_static_lib): Fixed prototype, removing extra_preargs and extra_postargs parameters. Included target_lang parameter. (MSVCCompiler.link): Included target_lang parameter. * ccompiler.py (CCompiler): New language_map and language_order attributes, used by CCompiler.detect_language(). (CCompiler.detect_language): New method, will return the language of a given source, or list of sources. Individual source language is detected using the language_map dict. When mixed sources are used, language_order will stablish the language precedence. (CCompiler.create_static_lib, CCompiler.link, CCompiler.link_executable, CCompiler.link_shared_object, CCompiler.link_shared_lib): Inlcuded target_lang parameter. * cygwinccompiler.py (CygwinCCompiler.link): Included target_lang parameter. * emxccompiler.py (EMXCCompiler.link): Included target_lang parameter. * mwerkscompiler.py (MWerksCompiler.link): Included target_lang parameter. * extension.py (Extension.__init__): New 'language' parameter/attribute, initialized to None by default. If provided will overlap the automatic detection made by CCompiler.detect_language(), in build_ext command. * sysconfig.py (customize_compiler): Check Makefile for CXX option, and also the environment variable CXX. Use the resulting value in the 'compiler_cxx' parameter of compiler.set_executables(). * unixccompiler.py (UnixCCompiler): Included 'compiler_cxx' in executables dict, defaulting to 'cc'. (UnixCCompiler.create_static_lib): Included target_lang parameter. (UnixCCompiler.link): Included target_lang parameter, and made linker command use compiler_cxx, if target_lang is 'c++'. * command/build_ext.py (build_ext.build_extension): Pass new ext.language attribute to compiler.link_shared_object()'s target_lang parameter. If ext.language is not provided, detect language using compiler.detect_language(sources) instead. * command/config.py (config._link): Pass already available lang parameter as target_lang parameter of compiler.link_executable(). Index: build_ext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_ext.py,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** build_ext.py 4 Nov 2002 19:50:03 -0000 1.87 --- build_ext.py 5 Nov 2002 16:12:01 -0000 1.88 *************** *** 478,481 **** --- 478,484 ---- extra_args = ext.extra_link_args or [] + # Detect target language, if not provided + language = ext.language or self.compiler.detect_language(sources) + self.compiler.link_shared_object( objects, ext_filename, *************** *** 486,490 **** export_symbols=self.get_export_symbols(ext), debug=self.debug, ! build_temp=self.build_temp) --- 489,494 ---- export_symbols=self.get_export_symbols(ext), debug=self.debug, ! build_temp=self.build_temp, ! target_lang=language) Index: config.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/config.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** config.py 9 Sep 2002 12:10:00 -0000 1.12 --- config.py 5 Nov 2002 16:12:02 -0000 1.13 *************** *** 149,153 **** self.compiler.link_executable([obj], prog, libraries=libraries, ! library_dirs=library_dirs) prog = prog + self.compiler.exe_extension --- 149,154 ---- self.compiler.link_executable([obj], prog, libraries=libraries, ! library_dirs=library_dirs, ! target_lang=lang) prog = prog + self.compiler.exe_extension From niemeyer@users.sourceforge.net Tue Nov 5 16:12:37 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Tue, 05 Nov 2002 08:12:37 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils bcppcompiler.py,1.13,1.14 ccompiler.py,1.49,1.50 cygwinccompiler.py,1.18,1.19 emxccompiler.py,1.8,1.9 extension.py,1.12,1.13 msvccompiler.py,1.49,1.50 mwerkscompiler.py,1.10,1.11 sysconfig.py,1.51,1.52 unixccompiler.py,1.48,1.49 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory usw-pr-cvs1:/tmp/cvs-serv27486 Modified Files: bcppcompiler.py ccompiler.py cygwinccompiler.py emxccompiler.py extension.py msvccompiler.py mwerkscompiler.py sysconfig.py unixccompiler.py Log Message: This patch fixes the following bugs: [#413582] g++ must be called for c++ extensions [#454030] distutils cannot link C++ code with GCC topdir = "Lib/distutils" * bcppcompiler.py (BCPPCompiler.create_static_lib): Fixed prototype, removing extra_preargs and extra_postargs parameters. Included target_lang parameter. (BCPPCompiler.link): Included target_lang parameter. * msvccompiler.py (MSVCCompiler.create_static_lib): Fixed prototype, removing extra_preargs and extra_postargs parameters. Included target_lang parameter. (MSVCCompiler.link): Included target_lang parameter. * ccompiler.py (CCompiler): New language_map and language_order attributes, used by CCompiler.detect_language(). (CCompiler.detect_language): New method, will return the language of a given source, or list of sources. Individual source language is detected using the language_map dict. When mixed sources are used, language_order will stablish the language precedence. (CCompiler.create_static_lib, CCompiler.link, CCompiler.link_executable, CCompiler.link_shared_object, CCompiler.link_shared_lib): Inlcuded target_lang parameter. * cygwinccompiler.py (CygwinCCompiler.link): Included target_lang parameter. * emxccompiler.py (EMXCCompiler.link): Included target_lang parameter. * mwerkscompiler.py (MWerksCompiler.link): Included target_lang parameter. * extension.py (Extension.__init__): New 'language' parameter/attribute, initialized to None by default. If provided will overlap the automatic detection made by CCompiler.detect_language(), in build_ext command. * sysconfig.py (customize_compiler): Check Makefile for CXX option, and also the environment variable CXX. Use the resulting value in the 'compiler_cxx' parameter of compiler.set_executables(). * unixccompiler.py (UnixCCompiler): Included 'compiler_cxx' in executables dict, defaulting to 'cc'. (UnixCCompiler.create_static_lib): Included target_lang parameter. (UnixCCompiler.link): Included target_lang parameter, and made linker command use compiler_cxx, if target_lang is 'c++'. * command/build_ext.py (build_ext.build_extension): Pass new ext.language attribute to compiler.link_shared_object()'s target_lang parameter. If ext.language is not provided, detect language using compiler.detect_language(sources) instead. * command/config.py (config._link): Pass already available lang parameter as target_lang parameter of compiler.link_executable(). Index: bcppcompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/bcppcompiler.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** bcppcompiler.py 13 Jun 2002 17:28:18 -0000 1.13 --- bcppcompiler.py 5 Nov 2002 16:11:52 -0000 1.14 *************** *** 147,152 **** output_dir=None, debug=0, ! extra_preargs=None, ! extra_postargs=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) --- 147,151 ---- output_dir=None, debug=0, ! target_lang=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) *************** *** 158,165 **** if debug: pass # XXX what goes here? - if extra_preargs: - lib_args[:0] = extra_preargs - if extra_postargs: - lib_args.extend (extra_postargs) try: self.spawn ([self.lib] + lib_args) --- 157,160 ---- *************** *** 184,188 **** extra_preargs=None, extra_postargs=None, ! build_temp=None): # XXX this ignores 'build_temp'! should follow the lead of --- 179,184 ---- extra_preargs=None, extra_postargs=None, ! build_temp=None, ! target_lang=None): # XXX this ignores 'build_temp'! should follow the lead of Index: ccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ccompiler.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** ccompiler.py 1 Oct 2002 17:39:59 -0000 1.49 --- ccompiler.py 5 Nov 2002 16:11:53 -0000 1.50 *************** *** 75,78 **** --- 75,91 ---- exe_extension = None # string + # Default language settings. language_map is used to detect a source + # file or Extension target language, checking source filenames. + # language_order is used to detect the language precedence, when deciding + # what language to use when mixing source types. For example, if some + # extension has two files with ".c" extension, and one with ".cpp", it + # is still linked as c++. + language_map = {".c" : "c", + ".cc" : "c++", + ".cpp" : "c++", + ".cxx" : "c++", + ".m" : "objc", + } + language_order = ["c++", "objc", "c"] def __init__ (self, *************** *** 573,576 **** --- 586,610 ---- # _need_link () + def detect_language (self, sources): + """Detect the language of a given file, or list of files. Uses + language_map, and language_order to do the job. + """ + if type(sources) is not ListType: + sources = [sources] + lang = None + index = len(self.language_order) + for source in sources: + base, ext = os.path.splitext(source) + extlang = self.language_map.get(ext) + try: + extindex = self.language_order.index(extlang) + if extindex < index: + lang = extlang + index = extindex + except ValueError: + pass + return lang + + # detect_language () # -- Worker methods ------------------------------------------------ *************** *** 672,676 **** output_libname, output_dir=None, ! debug=0): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied --- 706,711 ---- output_libname, output_dir=None, ! debug=0, ! target_lang=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied *************** *** 689,692 **** --- 724,731 ---- just for consistency). + 'target_lang' is the target language for which the given objects + are being compiled. This allows specific linkage time treatment of + certain languages. + Raises LibError on failure. """ *************** *** 711,715 **** extra_preargs=None, extra_postargs=None, ! build_temp=None): """Link a bunch of stuff together to create an executable or shared library file. --- 750,755 ---- extra_preargs=None, extra_postargs=None, ! build_temp=None, ! target_lang=None): """Link a bunch of stuff together to create an executable or shared library file. *************** *** 749,752 **** --- 789,796 ---- particular linker being used). + 'target_lang' is the target language for which the given objects + are being compiled. This allows specific linkage time treatment of + certain languages. + Raises LinkError on failure. """ *************** *** 767,771 **** extra_preargs=None, extra_postargs=None, ! build_temp=None): self.link(CCompiler.SHARED_LIBRARY, objects, self.library_filename(output_libname, lib_type='shared'), --- 811,816 ---- extra_preargs=None, extra_postargs=None, ! build_temp=None, ! target_lang=None): self.link(CCompiler.SHARED_LIBRARY, objects, self.library_filename(output_libname, lib_type='shared'), *************** *** 773,777 **** libraries, library_dirs, runtime_library_dirs, export_symbols, debug, ! extra_preargs, extra_postargs, build_temp) --- 818,822 ---- libraries, library_dirs, runtime_library_dirs, export_symbols, debug, ! extra_preargs, extra_postargs, build_temp, target_lang) *************** *** 787,796 **** extra_preargs=None, extra_postargs=None, ! build_temp=None): self.link(CCompiler.SHARED_OBJECT, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, ! extra_preargs, extra_postargs, build_temp) --- 832,842 ---- extra_preargs=None, extra_postargs=None, ! build_temp=None, ! target_lang=None): self.link(CCompiler.SHARED_OBJECT, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, ! extra_preargs, extra_postargs, build_temp, target_lang) *************** *** 804,812 **** debug=0, extra_preargs=None, ! extra_postargs=None): self.link(CCompiler.EXECUTABLE, objects, self.executable_filename(output_progname), output_dir, libraries, library_dirs, runtime_library_dirs, None, ! debug, extra_preargs, extra_postargs, None) --- 850,859 ---- debug=0, extra_preargs=None, ! extra_postargs=None, ! target_lang=None): self.link(CCompiler.EXECUTABLE, objects, self.executable_filename(output_progname), output_dir, libraries, library_dirs, runtime_library_dirs, None, ! debug, extra_preargs, extra_postargs, None, target_lang) Index: cygwinccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/cygwinccompiler.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** cygwinccompiler.py 18 Jun 2002 18:48:55 -0000 1.18 --- cygwinccompiler.py 5 Nov 2002 16:11:54 -0000 1.19 *************** *** 141,145 **** extra_preargs=None, extra_postargs=None, ! build_temp=None): # use separate copies, so we can modify the lists --- 141,146 ---- extra_preargs=None, extra_postargs=None, ! build_temp=None, ! target_lang=None): # use separate copies, so we can modify the lists *************** *** 219,223 **** extra_preargs, extra_postargs, ! build_temp) # link () --- 220,225 ---- extra_preargs, extra_postargs, ! build_temp, ! target_lang) # link () Index: emxccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/emxccompiler.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** emxccompiler.py 29 Sep 2002 00:25:51 -0000 1.8 --- emxccompiler.py 5 Nov 2002 16:11:54 -0000 1.9 *************** *** 103,107 **** extra_preargs=None, extra_postargs=None, ! build_temp=None): # use separate copies, so we can modify the lists --- 103,108 ---- extra_preargs=None, extra_postargs=None, ! build_temp=None, ! target_lang=None): # use separate copies, so we can modify the lists *************** *** 172,176 **** extra_preargs, extra_postargs, ! build_temp) # link () --- 173,178 ---- extra_preargs, extra_postargs, ! build_temp, ! target_lang) # link () Index: extension.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/extension.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** extension.py 12 Jun 2002 20:08:56 -0000 1.12 --- extension.py 5 Nov 2002 16:11:56 -0000 1.13 *************** *** 76,79 **** --- 76,82 ---- depends : [string] list of files that the extension depends on + language : string + extension language (i.e. "c", "c++", "objc"). Will be detected + from the source extensions if not provided. """ *************** *** 90,93 **** --- 93,97 ---- export_symbols=None, depends=None, + language=None, ): *************** *** 110,113 **** --- 114,118 ---- self.export_symbols = export_symbols or [] self.depends = depends or [] + self.language = language # class Extension Index: msvccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/msvccompiler.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** msvccompiler.py 18 Jun 2002 19:08:40 -0000 1.49 --- msvccompiler.py 5 Nov 2002 16:11:56 -0000 1.50 *************** *** 368,373 **** output_dir=None, debug=0, ! extra_preargs=None, ! extra_postargs=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) --- 368,372 ---- output_dir=None, debug=0, ! target_lang=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) *************** *** 379,386 **** if debug: pass # XXX what goes here? - if extra_preargs: - lib_args[:0] = extra_preargs - if extra_postargs: - lib_args.extend (extra_postargs) try: self.spawn ([self.lib] + lib_args) --- 378,381 ---- *************** *** 405,409 **** extra_preargs=None, extra_postargs=None, ! build_temp=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) --- 400,405 ---- extra_preargs=None, extra_postargs=None, ! build_temp=None, ! target_lang=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) Index: mwerkscompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/mwerkscompiler.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mwerkscompiler.py 27 Jun 2002 22:10:19 -0000 1.10 --- mwerkscompiler.py 5 Nov 2002 16:11:57 -0000 1.11 *************** *** 85,89 **** extra_preargs=None, extra_postargs=None, ! build_temp=None): # First fixup. (objects, output_dir) = self._fix_object_args (objects, output_dir) --- 85,90 ---- extra_preargs=None, extra_postargs=None, ! build_temp=None, ! target_lang=None): # First fixup. (objects, output_dir) = self._fix_object_args (objects, output_dir) Index: sysconfig.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/sysconfig.py,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** sysconfig.py 4 Nov 2002 19:53:24 -0000 1.51 --- sysconfig.py 5 Nov 2002 16:11:59 -0000 1.52 *************** *** 140,148 **** """ if compiler.compiler_type == "unix": ! (cc, opt, ccshared, ldshared, so_ext) = \ ! get_config_vars('CC', 'OPT', 'CCSHARED', 'LDSHARED', 'SO') if os.environ.has_key('CC'): cc = os.environ['CC'] if os.environ.has_key('CPP'): cpp = os.environ['CPP'] --- 140,150 ---- """ if compiler.compiler_type == "unix": ! (cc, cxx, opt, ccshared, ldshared, so_ext) = \ ! get_config_vars('CC', 'CXX', 'OPT', 'CCSHARED', 'LDSHARED', 'SO') if os.environ.has_key('CC'): cc = os.environ['CC'] + if os.environ.has_key('CXX'): + cxx = os.environ['CXX'] if os.environ.has_key('CPP'): cpp = os.environ['CPP'] *************** *** 164,167 **** --- 166,170 ---- compiler=cc_cmd, compiler_so=cc_cmd + ' ' + ccshared, + compiler_cxx=cxx, linker_so=ldshared, linker_exe=cc) Index: unixccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/unixccompiler.py,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** unixccompiler.py 9 Oct 2002 21:37:18 -0000 1.48 --- unixccompiler.py 5 Nov 2002 16:11:59 -0000 1.49 *************** *** 58,61 **** --- 58,62 ---- 'compiler' : ["cc"], 'compiler_so' : ["cc"], + 'compiler_cxx' : ["cc"], 'linker_so' : ["cc", "-shared"], 'linker_exe' : ["cc"], *************** *** 115,119 **** def create_static_lib(self, objects, output_libname, ! output_dir=None, debug=0): objects, output_dir = self._fix_object_args(objects, output_dir) --- 116,120 ---- def create_static_lib(self, objects, output_libname, ! output_dir=None, debug=0, target_lang=None): objects, output_dir = self._fix_object_args(objects, output_dir) *************** *** 144,148 **** library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, ! extra_postargs=None, build_temp=None): objects, output_dir = self._fix_object_args(objects, output_dir) libraries, library_dirs, runtime_library_dirs = \ --- 145,149 ---- library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, ! extra_postargs=None, build_temp=None, target_lang=None): objects, output_dir = self._fix_object_args(objects, output_dir) libraries, library_dirs, runtime_library_dirs = \ *************** *** 168,174 **** try: if target_desc == CCompiler.EXECUTABLE: ! self.spawn(self.linker_exe + ld_args) else: ! self.spawn(self.linker_so + ld_args) except DistutilsExecError, msg: raise LinkError, msg --- 169,178 ---- try: if target_desc == CCompiler.EXECUTABLE: ! linker = self.linker_exe[:] else: ! linker = self.linker_so[:] ! if target_lang == "c++" and self.compiler_cxx: ! linker[0] = self.compiler_cxx[0] ! self.spawn(linker + ld_args) except DistutilsExecError, msg: raise LinkError, msg From niemeyer@users.sourceforge.net Tue Nov 5 16:50:06 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Tue, 05 Nov 2002 08:50:06 -0800 Subject: [Python-checkins] python/dist/src setup.py,1.112,1.113 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv13902 Modified Files: setup.py Log Message: Patch implementing bz2 module. * setup.py (PyBuildExt.detect_modules): Included bz2 module detection. * Modules/bz2module.c * Lib/test/test_bz2.py * Doc/lib/libbz2.tex Included files implementing, testing, and documenting bz2 module. * Doc/Makefile.deps * Doc/lib/lib.tex Include references to libbz2.tex. * Misc/NEWS (Library): Mention distutils' c++ linkage patch, and new bz2 module. Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** setup.py 14 Oct 2002 20:48:09 -0000 1.112 --- setup.py 5 Nov 2002 16:50:04 -0000 1.113 *************** *** 703,706 **** --- 703,711 ---- libraries = ['z']) ) + # Gustavo Niemeyer's bz2 module. + if (self.compiler.find_library_file(lib_dirs, 'bz2')): + exts.append( Extension('bz2', ['bz2module.c'], + libraries = ['bz2']) ) + # Interface to the Expat XML parser # From niemeyer@users.sourceforge.net Tue Nov 5 16:50:06 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Tue, 05 Nov 2002 08:50:06 -0800 Subject: [Python-checkins] python/dist/src/Doc Makefile.deps,1.89,1.90 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv13902/Doc Modified Files: Makefile.deps Log Message: Patch implementing bz2 module. * setup.py (PyBuildExt.detect_modules): Included bz2 module detection. * Modules/bz2module.c * Lib/test/test_bz2.py * Doc/lib/libbz2.tex Included files implementing, testing, and documenting bz2 module. * Doc/Makefile.deps * Doc/lib/lib.tex Include references to libbz2.tex. * Misc/NEWS (Library): Mention distutils' c++ linkage patch, and new bz2 module. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** Makefile.deps 23 Aug 2002 15:38:02 -0000 1.89 --- Makefile.deps 5 Nov 2002 16:50:04 -0000 1.90 *************** *** 228,231 **** --- 228,232 ---- lib/libcmath.tex \ lib/libgzip.tex \ + lib/libbz2.tex \ lib/libzipfile.tex \ lib/libpprint.tex \ From niemeyer@users.sourceforge.net Tue Nov 5 16:50:07 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Tue, 05 Nov 2002 08:50:07 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libbz2.tex,NONE,1.1 lib.tex,1.204,1.205 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv13902/Doc/lib Modified Files: lib.tex Added Files: libbz2.tex Log Message: Patch implementing bz2 module. * setup.py (PyBuildExt.detect_modules): Included bz2 module detection. * Modules/bz2module.c * Lib/test/test_bz2.py * Doc/lib/libbz2.tex Included files implementing, testing, and documenting bz2 module. * Doc/Makefile.deps * Doc/lib/lib.tex Include references to libbz2.tex. * Misc/NEWS (Library): Mention distutils' c++ linkage patch, and new bz2 module. --- NEW FILE: libbz2.tex --- \section{\module{bz2} --- Compression compatible with \program{bzip2}} \declaremodule{builtin}{bz2} \modulesynopsis{Interface to compression and decompression routines compatible with \program{bzip2}.} \moduleauthor{Gustavo Niemeyer}{niemeyer@conectiva.com} \sectionauthor{Gustavo Niemeyer}{niemeyer@conectiva.com} \versionadded{2.3} This module provides a comprehensive interface for the bz2 compression library. It implements a complete file interface, one-shot (de)compression functions, and types for sequential (de)compression. Here is a resume of the features offered by the bz2 module: \begin{itemize} \item \class{BZ2File} class implements a complete file interface, including \method{readline()}, \method{readlines()}, \method{xreadlines()}, \method{writelines()}, \method{seek()}, etc; \item \class{BZ2File} class implements emulated \method{seek()} support; \item \class{BZ2File} class implements universal newline support; \item \class{BZ2File} class offers an optimized line iteration using the readahead algorithm borrowed from file objects; \item \class{BZ2File} class developed inheriting builtin file type (\code{isinstance(BZ2File(), file) == 1}); \item Sequential (de)compression supported by \class{BZ2Compressor} and \class{BZ2Decompressor} classes; \item One-shot (de)compression supported by \function{compress()} and \function{decompress()} functions; \item Thread safety uses individual locking mechanism; \item Complete inline documentation; \end{itemize} \subsection{(De)compression of files} Handling of compressed files is offered by the \class{BZ2File} class. \begin{classdesc}{BZ2File}{filename \optional{, mode='r'\optional{, buffering=0\optional{, compresslevel=9}}}} Open a bz2 file. Mode can be either \code{'r'} or \code{'w'}, for reading (default) or writing. When opened for writing, the file will be created if it doesn't exist, and truncated otherwise. If the buffering argument is given, \code{0} means unbuffered, and larger numbers specify the buffer size. If compresslevel is given, must be a number between \code{1} and \code{9}. Add a \code{'U'} to mode to open the file for input with universal newline support. Any line ending in the input file will be seen as a \code{'\textbackslash n'} in Python. Also, a file so opened gains the attribute \member{newlines}; the value for this attribute is one of \code{None} (no newline read yet), \code{'\textbackslash r'}, \code{'\textbackslash n'}, \code{'\textbackslash r\textbackslash n'} or a tuple containing all the newline types seen. Universal newlines are available only when reading. \end{classdesc} \begin{methoddesc}[BZ2File]{close}{} Close the file. Sets data attribute \member{closed} to true. A closed file cannot be used for further I/O operations. \method{close()} may be called more than once without error. \end{methoddesc} \begin{methoddesc}[BZ2File]{read}{\optional{size}} Read at most \var{size} uncompressed bytes, returned as a string. If the \var{size} argument is negative or omitted, read until EOF is reached. \end{methoddesc} \begin{methoddesc}[BZ2File]{readline}{\optional{size}} Return the next line from the file, as a string, retaining newline. A non-negative \var{size} argument limits the maximum number of bytes to return (an incomplete line may be returned then). Return an empty string at EOF. \end{methoddesc} \begin{methoddesc}[BZ2File]{readlines}{\optional{size}} Return a list of lines read. The optional \var{size} argument, if given, is an approximate bound on the total number of bytes in the lines returned. \end{methoddesc} \begin{methoddesc}[BZ2File]{xreadlines}{} For backward compatibility. \class{BZ2File} objects now include the performance optimizations previously implemented in the \module{xreadlines} module. \end{methoddesc} \begin{methoddesc}[BZ2File]{\_\_iter\_\_}{} Iterate trough the file lines. Iteration optimization is implemented using the same readahead algorithm available in \class{file} objects. \end{methoddesc} \begin{methoddesc}[BZ2File]{seek}{offset \optional{, whence}} Move to new file position. Argument \var{offset} is a byte count. Optional argument \var{whence} defaults to \code{0} (offset from start of file, offset should be \code{>= 0}); other values are \code{1} (move relative to current position, positive or negative), and \code{2} (move relative to end of file, usually negative, although many platforms allow seeking beyond the end of a file). Note that seeking of bz2 files is emulated, and depending on the parameters the operation may be extremely slow. \end{methoddesc} \begin{methoddesc}[BZ2File]{tell}{} Return the current file position, an integer (may be a long integer). \end{methoddesc} \begin{methoddesc}[BZ2File]{write}{data} Write string \var{data} to file. Note that due to buffering, \method{close()} may be needed before the file on disk reflects the data written. \end{methoddesc} \begin{methoddesc}[BZ2File]{writelines}{sequence_of_strings} Write the sequence of strings to the file. Note that newlines are not added. The sequence can be any iterable object producing strings. This is equivalent to calling write() for each string. \end{methoddesc} \subsection{Sequential (de)compression} Sequential compression and decompression is done using the classes \class{BZ2Compressor} and \class{BZ2Decompressor}. \begin{classdesc}{BZ2Compressor}{\optional{compresslevel=9}} Create a new compressor object. This object may be used to compress data sequentially. If you want to compress data in one shot, use the \function{compress()} function instead. The \var{compresslevel} parameter, if given, must be a number between \code{1} and \code{9}. \end{classdesc} \begin{methoddesc}[BZ2Compressor]{compress}{data} Provide more data to the compressor object. It will return chunks of compressed data whenever possible. When you've finished providing data to compress, call the \method{flush()} method to finish the compression process, and return what is left in internal buffers. \end{methoddesc} \begin{methoddesc}[BZ2Compressor]{flush}{} Finish the compression process and return what is left in internal buffers. You must not use the compressor object after calling this method. \end{methoddesc} \begin{classdesc}{BZ2Decompressor}{} Create a new decompressor object. This object may be used to decompress data sequentially. If you want to decompress data in one shot, use the \function{decompress()} function instead. \end{classdesc} \begin{methoddesc}[BZ2Decompressor]{decompress}{data} Provide more data to the decompressor object. It will return chunks of decompressed data whenever possible. If you try to decompress data after the end of stream is found, \exception{EOFError} will be raised. If any data was found after the end of stream, it'll be ignored and saved in \member{unused\_data} attribute. \end{methoddesc} \subsection{One-shot (de)compression} One-shot compression and decompression is provided trough the \function{compress()} and \function{decompress()} functions. \begin{funcdesc}{compress}{data\optional{, compresslevel=9}} Compress \var{data} in one shot. If you want to compress data sequentially, use an instance of \class{BZ2Compressor} instead. The \var{compresslevel} parameter, if given, must be a number between \code{1} and \code{9}. \end{funcdesc} \begin{funcdesc}{decompress}{} Decompress \var{data} in one shot. If you want to decompress data sequentially, use an instance of \class{BZ2Decompressor} instead. \end{funcdesc} Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.204 retrieving revision 1.205 diff -C2 -d -r1.204 -r1.205 *** lib.tex 23 Aug 2002 15:18:37 -0000 1.204 --- lib.tex 5 Nov 2002 16:50:04 -0000 1.205 *************** *** 170,173 **** --- 170,174 ---- \input{libzlib} \input{libgzip} + \input{libbz2} \input{libzipfile} \input{libreadline} From niemeyer@users.sourceforge.net Tue Nov 5 16:50:07 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Tue, 05 Nov 2002 08:50:07 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.508,1.509 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv13902/Misc Modified Files: NEWS Log Message: Patch implementing bz2 module. * setup.py (PyBuildExt.detect_modules): Included bz2 module detection. * Modules/bz2module.c * Lib/test/test_bz2.py * Doc/lib/libbz2.tex Included files implementing, testing, and documenting bz2 module. * Doc/Makefile.deps * Doc/lib/lib.tex Include references to libbz2.tex. * Misc/NEWS (Library): Mention distutils' c++ linkage patch, and new bz2 module. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.508 retrieving revision 1.509 diff -C2 -d -r1.508 -r1.509 *** NEWS 4 Nov 2002 19:50:11 -0000 1.508 --- NEWS 5 Nov 2002 16:50:05 -0000 1.509 *************** *** 535,538 **** --- 535,546 ---- honored. + - distutils' build_ext command now links c++ extensions with the c++ + compiler available in the Makefile or CXX environment variable, if + running under *nix. + + - New module bz2: provides a comprehensive interface for the bz2 compression + library. It implements a complete file interface, one-shot (de)compression + functions, and types for sequential (de)compression. + Tools/Demos ----------- From niemeyer@users.sourceforge.net Tue Nov 5 16:50:07 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Tue, 05 Nov 2002 08:50:07 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_bz2.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv13902/Lib/test Added Files: test_bz2.py Log Message: Patch implementing bz2 module. * setup.py (PyBuildExt.detect_modules): Included bz2 module detection. * Modules/bz2module.c * Lib/test/test_bz2.py * Doc/lib/libbz2.tex Included files implementing, testing, and documenting bz2 module. * Doc/Makefile.deps * Doc/lib/lib.tex Include references to libbz2.tex. * Misc/NEWS (Library): Mention distutils' c++ linkage patch, and new bz2 module. --- NEW FILE: test_bz2.py --- #!/usr/bin/python import unittest from cStringIO import StringIO import os import popen2 import tempfile from bz2 import * from test import test_support class BaseTest(unittest.TestCase): "Base for other testcases." TEXT = 'root:x:0:0:root:/root:/bin/bash\nbin:x:1:1:bin:/bin:\ndaemon:x:2:2:daemon:/sbin:\nadm:x:3:4:adm:/var/adm:\nlp:x:4:7:lp:/var/spool/lpd:\nsync:x:5:0:sync:/sbin:/bin/sync\nshutdown:x:6:0:shutdown:/sbin:/sbin/shutdown\nhalt:x:7:0:halt:/sbin:/sbin/halt\nmail:x:8:12:mail:/var/spool/mail:\nnews:x:9:13:news:/var/spool/news:\nuucp:x:10:14:uucp:/var/spool/uucp:\noperator:x:11:0:operator:/root:\ngames:x:12:100:games:/usr/games:\ngopher:x:13:30:gopher:/usr/lib/gopher-data:\nftp:x:14:50:FTP User:/var/ftp:/bin/bash\nnobody:x:65534:65534:Nobody:/home:\npostfix:x:100:101:postfix:/var/spool/postfix:\nniemeyer:x:500:500::/home/niemeyer:/bin/bash\npostgres:x:101:102:PostgreSQL Server:/var/lib/pgsql:/bin/bash\nmysql:x:102:103:MySQL server:/var/lib/mysql:/bin/bash\nwww:x:103:104::/var/www:/bin/false\n' DATA = 'BZh91AY&SY.\xc8N\x18\x00\x01>_\x80\x00\x10@\x02\xff\xf0\x01\x07n\x00?\xe7\xff\xe00\x01\x99\xaa\x00\xc0\x03F\x86\x8c#&\x83F\x9a\x03\x06\xa6\xd0\xa6\x93M\x0fQ\xa7\xa8\x06\x804hh\x12$\x11\xa4i4\xf14S\xd2\x88\xe5\xcd9gd6\x0b\n\xe9\x9b\xd5\x8a\x99\xf7\x08.K\x8ev\xfb\xf7xw\xbb\xdf\xa1\x92\xf1\xdd|/";\xa2\xba\x9f\xd5\xb1#A\xb6\xf6\xb3o\xc9\xc5y\\\xebO\xe7\x85\x9a\xbc\xb6f8\x952\xd5\xd7"%\x89>V,\xf7\xa6z\xe2\x9f\xa3\xdf\x11\x11"\xd6E)I\xa9\x13^\xca\xf3r\xd0\x03U\x922\xf26\xec\xb6\xed\x8b\xc3U\x13\x9d\xc5\x170\xa4\xfa^\x92\xacDF\x8a\x97\xd6\x19\xfe\xdd\xb8\xbd\x1a\x9a\x19\xa3\x80ankR\x8b\xe5\xd83]\xa9\xc6\x08\x82f\xf6\xb9"6l$\xb8j@\xc0\x8a\xb0l1..\xbak\x83ls\x15\xbc\xf4\xc1\x13\xbe\xf8E\xb8\x9d\r\xa8\x9dk\x84\xd3n\xfa\xacQ\x07\xb1%y\xaav\xb4\x08\xe0z\x1b\x16\xf5\x04\xe9\xcc\xb9\x08z\x1en7.G\xfc]\xc9\x14\xe1B@\xbb!8`' DATA_CRLF = 'BZh91AY&SY\xaez\xbbN\x00\x01H\xdf\x80\x00\x12@\x02\xff\xf0\x01\x07n\x00?\xe7\xff\xe0@\x01\xbc\xc6`\x86*\x8d=M\xa9\x9a\x86\xd0L@\x0fI\xa6!\xa1\x13\xc8\x88jdi\x8d@\x03@\x1a\x1a\x0c\x0c\x83 \x00\xc4h2\x19\x01\x82D\x84e\t\xe8\x99\x89\x19\x1ah\x00\r\x1a\x11\xaf\x9b\x0fG\xf5(\x1b\x1f?\t\x12\xcf\xb5\xfc\x95E\x00ps\x89\x12^\xa4\xdd\xa2&\x05(\x87\x04\x98\x89u\xe40%\xb6\x19\'\x8c\xc4\x89\xca\x07\x0e\x1b!\x91UIFU%C\x994!DI\xd2\xfa\xf0\xf1N8W\xde\x13A\xf5\x9cr%?\x9f3;I45A\xd1\x8bT\xb1\xa4\xc7\x8d\x1a\\"\xad\xa1\xabyBg\x15\xb9l\x88\x88\x91k"\x94\xa4\xd4\x89\xae*\xa6\x0b\x10\x0c\xd6\xd4m\xe86\xec\xb5j\x8a\x86j\';\xca.\x01I\xf2\xaaJ\xe8\x88\x8cU+t3\xfb\x0c\n\xa33\x13r2\r\x16\xe0\xb3(\xbf\x1d\x83r\xe7M\xf0D\x1365\xd8\x88\xd3\xa4\x92\xcb2\x06\x04\\\xc1\xb0\xea//\xbek&\xd8\xe6+t\xe5\xa1\x13\xada\x16\xder5"w]\xa2i\xb7[\x97R \xe2IT\xcd;Z\x04dk4\xad\x8a\t\xd3\x81z\x10\xf1:^`\xab\x1f\xc5\xdc\x91N\x14$+\x9e\xae\xd3\x80' def decompress(self, data): pop = popen2.Popen3("bunzip2", capturestderr=1) pop.tochild.write(data) pop.tochild.close() ret = pop.fromchild.read() pop.fromchild.close() if pop.wait() != 0: ret = decompress(data) return ret class BZ2FileTest(BaseTest): "Test MCRYPT type miscelaneous methods." def setUp(self): self.filename = tempfile.mktemp("bz2") def tearDown(self): if os.path.isfile(self.filename): os.unlink(self.filename) def createTempFile(self, crlf=0): f = open(self.filename, "w") if crlf: data = self.DATA_CRLF else: data = self.DATA f.write(data) f.close() def testRead(self): "Test BZ2File.read()" self.createTempFile() bz2f = BZ2File(self.filename) self.assertEqual(bz2f.read(), self.TEXT) bz2f.close() def testReadChunk10(self): "Test BZ2File.read() in chunks of 10 bytes" self.createTempFile() bz2f = BZ2File(self.filename) text = '' while 1: str = bz2f.read(10) if not str: break text += str self.assertEqual(text, text) bz2f.close() def testRead100(self): "Test BZ2File.read(100)" self.createTempFile() bz2f = BZ2File(self.filename) self.assertEqual(bz2f.read(100), self.TEXT[:100]) bz2f.close() def testReadLine(self): "Test BZ2File.readline()" self.createTempFile() bz2f = BZ2File(self.filename) sio = StringIO(self.TEXT) for line in sio.readlines(): self.assertEqual(bz2f.readline(), line) bz2f.close() def testReadLines(self): "Test BZ2File.readlines()" self.createTempFile() bz2f = BZ2File(self.filename) sio = StringIO(self.TEXT) self.assertEqual(bz2f.readlines(), sio.readlines()) bz2f.close() def testIterator(self): "Test iter(BZ2File)" self.createTempFile() bz2f = BZ2File(self.filename) sio = StringIO(self.TEXT) self.assertEqual(list(iter(bz2f)), sio.readlines()) bz2f.close() def testXReadLines(self): "Test BZ2File.xreadlines()" self.createTempFile() bz2f = BZ2File(self.filename) sio = StringIO(self.TEXT) self.assertEqual(list(bz2f.xreadlines()), sio.readlines()) bz2f.close() def testUniversalNewlinesLF(self): "Test BZ2File.read() with universal newlines (\\n)" self.createTempFile() bz2f = BZ2File(self.filename, "rU") self.assertEqual(bz2f.read(), self.TEXT) self.assertEqual(bz2f.newlines, "\n") bz2f.close() def testUniversalNewlinesCRLF(self): "Test BZ2File.read() with universal newlines (\\r\\n)" self.createTempFile(crlf=1) bz2f = BZ2File(self.filename, "rU") self.assertEqual(bz2f.read(), self.TEXT) self.assertEqual(bz2f.newlines, "\r\n") bz2f.close() def testWrite(self): "Test BZ2File.write()" bz2f = BZ2File(self.filename, "w") bz2f.write(self.TEXT) bz2f.close() f = open(self.filename) self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() def testWriteChunks10(self): "Test BZ2File.write() with chunks of 10 bytes" bz2f = BZ2File(self.filename, "w") n = 0 while 1: str = self.TEXT[n*10:(n+1)*10] if not str: break bz2f.write(str) n += 1 bz2f.close() f = open(self.filename) self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() def testWriteLines(self): "Test BZ2File.writelines()" bz2f = BZ2File(self.filename, "w") sio = StringIO(self.TEXT) bz2f.writelines(sio.readlines()) bz2f.close() f = open(self.filename) self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() def testSeekForward(self): "Test BZ2File.seek(150, 0)" self.createTempFile() bz2f = BZ2File(self.filename) bz2f.seek(150) self.assertEqual(bz2f.read(), self.TEXT[150:]) def testSeekBackwards(self): "Test BZ2File.seek(-150, 1)" self.createTempFile() bz2f = BZ2File(self.filename) bz2f.read(500) bz2f.seek(-150, 1) self.assertEqual(bz2f.read(), self.TEXT[500-150:]) def testSeekBackwardsFromEnd(self): "Test BZ2File.seek(-150, 2)" self.createTempFile() bz2f = BZ2File(self.filename) bz2f.seek(-150, 2) self.assertEqual(bz2f.read(), self.TEXT[len(self.TEXT)-150:]) def testSeekPostEnd(self): "Test BZ2File.seek(150000)" self.createTempFile() bz2f = BZ2File(self.filename) bz2f.seek(150000) self.assertEqual(bz2f.tell(), len(self.TEXT)) self.assertEqual(bz2f.read(), "") def testSeekPostEndTwice(self): "Test BZ2File.seek(150000) twice" self.createTempFile() bz2f = BZ2File(self.filename) bz2f.seek(150000) bz2f.seek(150000) self.assertEqual(bz2f.tell(), len(self.TEXT)) self.assertEqual(bz2f.read(), "") def testSeekPreStart(self): "Test BZ2File.seek(-150, 0)" self.createTempFile() bz2f = BZ2File(self.filename) bz2f.seek(-150) self.assertEqual(bz2f.tell(), 0) self.assertEqual(bz2f.read(), self.TEXT) class BZ2CompressorTest(BaseTest): def testCompress(self): "Test BZ2Compressor.compress()/flush()" bz2c = BZ2Compressor() data = bz2c.compress(self.TEXT) data += bz2c.flush() self.assertEqual(self.decompress(data), self.TEXT) def testCompressChunks10(self): "Test BZ2Compressor.compress()/flush() with chunks of 10 bytes" bz2c = BZ2Compressor() n = 0 data = '' while 1: str = self.TEXT[n*10:(n+1)*10] if not str: break data += bz2c.compress(str) n += 1 data += bz2c.flush() self.assertEqual(self.decompress(data), self.TEXT) class BZ2DecompressorTest(BaseTest): def testDecompress(self): "Test BZ2Decompressor.decompress()" bz2d = BZ2Decompressor() text = bz2d.decompress(self.DATA) self.assertEqual(text, self.TEXT) def testDecompressChunks10(self): "Test BZ2Decompressor.decompress() with chunks of 10 bytes" bz2d = BZ2Decompressor() text = '' n = 0 while 1: str = self.DATA[n*10:(n+1)*10] if not str: break text += bz2d.decompress(str) n += 1 self.assertEqual(text, self.TEXT) def testDecompressUnusedData(self): "Test BZ2Decompressor.decompress() with unused data" bz2d = BZ2Decompressor() unused_data = "this is unused data" text = bz2d.decompress(self.DATA+unused_data) self.assertEqual(text, self.TEXT) self.assertEqual(bz2d.unused_data, unused_data) def testEOFError(self): "Calling BZ2Decompressor.decompress() after EOS must raise EOFError" bz2d = BZ2Decompressor() text = bz2d.decompress(self.DATA) self.assertRaises(EOFError, bz2d.decompress, "anything") class FuncTest(BaseTest): "Test module functions" def testCompress(self): "Test compress() function" data = compress(self.TEXT) self.assertEqual(self.decompress(data), self.TEXT) def testDecompress(self): "Test decompress() function" text = decompress(self.DATA) self.assertEqual(text, self.TEXT) def testDecompressEmpty(self): "Test decompress() function with empty string" text = decompress("") self.assertEqual(text, "") def testDecompressIncomplete(self): "Test decompress() function with incomplete data" self.assertRaises(ValueError, decompress, self.DATA[:-10]) def test_main(): test_support.run_unittest(BZ2FileTest) test_support.run_unittest(BZ2CompressorTest) test_support.run_unittest(BZ2DecompressorTest) test_support.run_unittest(FuncTest) if __name__ == '__main__': test_main() # vim:ts=4:sw=4 From niemeyer@users.sourceforge.net Tue Nov 5 16:50:08 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Tue, 05 Nov 2002 08:50:08 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv13902/Modules Added Files: bz2module.c Log Message: Patch implementing bz2 module. * setup.py (PyBuildExt.detect_modules): Included bz2 module detection. * Modules/bz2module.c * Lib/test/test_bz2.py * Doc/lib/libbz2.tex Included files implementing, testing, and documenting bz2 module. * Doc/Makefile.deps * Doc/lib/lib.tex Include references to libbz2.tex. * Misc/NEWS (Library): Mention distutils' c++ linkage patch, and new bz2 module. --- NEW FILE: bz2module.c --- /* python-bz2 - python bz2 library interface Copyright (c) 2002 Gustavo Niemeyer Copyright (c) 2002 Python Software Foundation; All Rights Reserved */ #include #include #include "Python.h" #include "structmember.h" #ifdef WITH_THREAD #include "pythread.h" #endif static char __author__[] = [...2060 lines suppressed...] BZ2File_Type.ob_type = &PyType_Type; BZ2File_Type.tp_base = &PyFile_Type; BZ2File_Type.tp_new = PyFile_Type.tp_new; BZ2Comp_Type.ob_type = &PyType_Type; BZ2Decomp_Type.ob_type = &PyType_Type; m = Py_InitModule3("bz2", bz2_methods, bz2__doc__); PyModule_AddObject(m, "__author__", PyString_FromString(__author__)); Py_INCREF(&BZ2File_Type); PyModule_AddObject(m, "BZ2File", (PyObject *)&BZ2File_Type); Py_INCREF(&BZ2Comp_Type); PyModule_AddObject(m, "BZ2Compressor", (PyObject *)&BZ2Comp_Type); Py_INCREF(&BZ2Decomp_Type); PyModule_AddObject(m, "BZ2Decompressor", (PyObject *)&BZ2Decomp_Type); } From fdrake@users.sourceforge.net Tue Nov 5 16:52:53 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 05 Nov 2002 08:52:53 -0800 Subject: [Python-checkins] python/dist/src/Doc/ext windows.tex,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ext In directory usw-pr-cvs1:/tmp/cvs-serv16483 Modified Files: windows.tex Log Message: Fix minor markup nits. Index: windows.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/windows.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** windows.tex 4 Jul 2002 08:36:53 -0000 1.7 --- windows.tex 5 Nov 2002 16:52:50 -0000 1.8 *************** *** 193,197 **** library:'' dropdown list. ! You should now create the file spam.def as instructed in the previous section. Then chose the \menuselection{Insert \sub Files into Project} dialog. Set the pattern to \code{*.*} and select --- 193,197 ---- library:'' dropdown list. ! You should now create the file \file{spam.def} as instructed in the previous section. Then chose the \menuselection{Insert \sub Files into Project} dialog. Set the pattern to \code{*.*} and select *************** *** 219,223 **** \end{verbatim} ! Refer to section 3 of the \citetitle[http://www.python.org/doc/FAQ.html]{Python FAQ} for details on why you must do this. --- 219,223 ---- \end{verbatim} ! Refer to section~3 of the \citetitle[http://www.python.org/doc/FAQ.html]{Python FAQ} for details on why you must do this. From fdrake@users.sourceforge.net Tue Nov 5 16:53:17 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 05 Nov 2002 08:53:17 -0800 Subject: [Python-checkins] python/dist/src/Doc/ext windows.tex,1.3.6.3,1.3.6.4 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ext In directory usw-pr-cvs1:/tmp/cvs-serv16718 Modified Files: Tag: release22-maint windows.tex Log Message: Fix minor markup nits. Index: windows.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/windows.tex,v retrieving revision 1.3.6.3 retrieving revision 1.3.6.4 diff -C2 -d -r1.3.6.3 -r1.3.6.4 *** windows.tex 5 Oct 2002 15:52:38 -0000 1.3.6.3 --- windows.tex 5 Nov 2002 16:53:15 -0000 1.3.6.4 *************** *** 193,197 **** library:'' dropdown list. ! You should now create the file spam.def as instructed in the previous section. Then chose the \menuselection{Insert \sub Files into Project} dialog. Set the pattern to \code{*.*} and select --- 193,197 ---- library:'' dropdown list. ! You should now create the file \file{spam.def} as instructed in the previous section. Then chose the \menuselection{Insert \sub Files into Project} dialog. Set the pattern to \code{*.*} and select *************** *** 219,223 **** \end{verbatim} ! Refer to section 3 of the \citetitle[http://www.python.org/doc/FAQ.html]{Python FAQ} for details on why you must do this. --- 219,223 ---- \end{verbatim} ! Refer to section~3 of the \citetitle[http://www.python.org/doc/FAQ.html]{Python FAQ} for details on why you must do this. From mwh@users.sourceforge.net Tue Nov 5 17:38:07 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Tue, 05 Nov 2002 09:38:07 -0800 Subject: [Python-checkins] python/dist/src/Objects listobject.c,2.138,2.139 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv3659/Objects Modified Files: listobject.c Log Message: This is Alex Martelli's patch [ 633870 ] allow any seq assignment to a list slice plus a very silly little test case of my own. Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.138 retrieving revision 2.139 diff -C2 -d -r2.138 -r2.139 *** listobject.c 11 Oct 2002 23:39:35 -0000 2.138 --- listobject.c 5 Nov 2002 17:38:05 -0000 2.139 *************** *** 449,452 **** --- 449,453 ---- PyObject **recycle, **p; PyObject **item; + PyObject *v_as_SF = NULL; /* PySequence_Fast(v) */ int n; /* Size of replacement list */ int d; /* Change in size */ *************** *** 455,460 **** if (v == NULL) n = 0; ! else if (PyList_Check(v)) { ! n = b->ob_size; if (a == b) { /* Special case "a[i:j] = a" -- copy b first */ --- 456,468 ---- if (v == NULL) n = 0; ! else { ! char msg[256]; ! sprintf(msg, "must assign sequence (not \"%.200s\") to slice", ! v->ob_type->tp_name); ! v_as_SF = PySequence_Fast(v, msg); ! if(v_as_SF == NULL) ! return -1; ! n = PySequence_Fast_GET_SIZE(v_as_SF); ! if (a == b) { /* Special case "a[i:j] = a" -- copy b first */ *************** *** 466,475 **** } } - else { - PyErr_Format(PyExc_TypeError, - "must assign list (not \"%.200s\") to slice", - v->ob_type->tp_name); - return -1; - } if (ilow < 0) ilow = 0; --- 474,477 ---- *************** *** 513,517 **** } for (k = 0; k < n; k++, ilow++) { ! PyObject *w = b->ob_item[k]; Py_XINCREF(w); item[ilow] = w; --- 515,519 ---- } for (k = 0; k < n; k++, ilow++) { ! PyObject *w = PySequence_Fast_GET_ITEM(v_as_SF, k); Py_XINCREF(w); item[ilow] = w; *************** *** 526,529 **** --- 528,532 ---- a->ob_item = NULL; } + Py_XDECREF(v_as_SF); return 0; #undef b From mwh@users.sourceforge.net Tue Nov 5 17:38:07 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Tue, 05 Nov 2002 09:38:07 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_types.py,1.37,1.38 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv3659/Lib/test Modified Files: test_types.py Log Message: This is Alex Martelli's patch [ 633870 ] allow any seq assignment to a list slice plus a very silly little test case of my own. Index: test_types.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_types.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** test_types.py 29 Jul 2002 14:35:03 -0000 1.37 --- test_types.py 5 Nov 2002 17:38:05 -0000 1.38 *************** *** 298,301 **** --- 298,305 ---- raise TestFailed, "list inplace repeat" + a = [] + a[:] = tuple(range(10)) + if a != range(10): + raise TestFailed, "assigning tuple to slice" print '6.5.3a Additional list operations' From fdrake@users.sourceforge.net Tue Nov 5 17:54:04 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 05 Nov 2002 09:54:04 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libbz2.tex,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv9751 Modified Files: libbz2.tex Log Message: Fix a few minor nits. Still need to actually proofread this. Index: libbz2.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbz2.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** libbz2.tex 5 Nov 2002 16:50:05 -0000 1.1 --- libbz2.tex 5 Nov 2002 17:54:02 -0000 1.2 *************** *** 25,29 **** the readahead algorithm borrowed from file objects; \item \class{BZ2File} class developed inheriting builtin file type ! (\code{isinstance(BZ2File(), file) == 1}); \item Sequential (de)compression supported by \class{BZ2Compressor} and \class{BZ2Decompressor} classes; --- 25,29 ---- the readahead algorithm borrowed from file objects; \item \class{BZ2File} class developed inheriting builtin file type ! (\code{issubclass(BZ2File, file)} is \code{True}); \item Sequential (de)compression supported by \class{BZ2Compressor} and \class{BZ2Decompressor} classes; *************** *** 39,52 **** Handling of compressed files is offered by the \class{BZ2File} class. ! \begin{classdesc}{BZ2File}{filename \optional{, mode='r'\optional{, ! buffering=0\optional{, compresslevel=9}}}} ! Open a bz2 file. Mode can be either \code{'r'} or \code{'w'}, for reading (default) or writing. When opened for writing, the file will be created if ! it doesn't exist, and truncated otherwise. If the buffering argument is given, ! \code{0} means unbuffered, and larger numbers specify the buffer size. If ! compresslevel is given, must be a number between \code{1} and \code{9}. Add a \code{'U'} to mode to open the file for input with universal newline support. Any line ending in the input file will be seen as a ! \code{'\textbackslash n'} in Python. Also, a file so opened gains the attribute \member{newlines}; the value for this attribute is one of \code{None} (no newline read yet), --- 39,54 ---- Handling of compressed files is offered by the \class{BZ2File} class. ! \begin{classdesc}{BZ2File}{filename\optional{, mode\optional{, ! buffering\optional{, compresslevel}}}} ! Open a bz2 file. Mode can be either \code{'r'} or \code{'w'}, for reading (default) or writing. When opened for writing, the file will be created if ! it doesn't exist, and truncated otherwise. If \var{buffering} is given, ! \code{0} means unbuffered, and larger numbers specify the buffer size; ! the default is \code{0}. If ! \var{compresslevel} is given, must be a number between \code{1} and ! \code{9}; the default is \code{9}. Add a \code{'U'} to mode to open the file for input with universal newline support. Any line ending in the input file will be seen as a ! \character{\textbackslash n} in Python. Also, a file so opened gains the attribute \member{newlines}; the value for this attribute is one of \code{None} (no newline read yet), *************** *** 90,94 **** \end{methoddesc} ! \begin{methoddesc}[BZ2File]{seek}{offset \optional{, whence}} Move to new file position. Argument \var{offset} is a byte count. Optional argument \var{whence} defaults to \code{0} (offset from start of file, --- 92,96 ---- \end{methoddesc} ! \begin{methoddesc}[BZ2File]{seek}{offset\optional{, whence}} Move to new file position. Argument \var{offset} is a byte count. Optional argument \var{whence} defaults to \code{0} (offset from start of file, *************** *** 123,131 **** \class{BZ2Compressor} and \class{BZ2Decompressor}. ! \begin{classdesc}{BZ2Compressor}{\optional{compresslevel=9}} Create a new compressor object. This object may be used to compress data sequentially. If you want to compress data in one shot, use the \function{compress()} function instead. The \var{compresslevel} parameter, ! if given, must be a number between \code{1} and \code{9}. \end{classdesc} --- 125,134 ---- \class{BZ2Compressor} and \class{BZ2Decompressor}. ! \begin{classdesc}{BZ2Compressor}{\optional{compresslevel}} Create a new compressor object. This object may be used to compress data sequentially. If you want to compress data in one shot, use the \function{compress()} function instead. The \var{compresslevel} parameter, ! if given, must be a number between \code{1} and \code{9}; the default ! is \code{9}. \end{classdesc} *************** *** 162,174 **** \function{compress()} and \function{decompress()} functions. ! \begin{funcdesc}{compress}{data\optional{, compresslevel=9}} Compress \var{data} in one shot. If you want to compress data sequentially, use an instance of \class{BZ2Compressor} instead. The \var{compresslevel} ! parameter, if given, must be a number between \code{1} and \code{9}. \end{funcdesc} ! \begin{funcdesc}{decompress}{} Decompress \var{data} in one shot. If you want to decompress data sequentially, use an instance of \class{BZ2Decompressor} instead. \end{funcdesc} - --- 165,177 ---- \function{compress()} and \function{decompress()} functions. ! \begin{funcdesc}{compress}{data\optional{, compresslevel}} Compress \var{data} in one shot. If you want to compress data sequentially, use an instance of \class{BZ2Compressor} instead. The \var{compresslevel} ! parameter, if given, must be a number between \code{1} and \code{9}; ! the default is \code{9}. \end{funcdesc} ! \begin{funcdesc}{decompress}{data} Decompress \var{data} in one shot. If you want to decompress data sequentially, use an instance of \class{BZ2Decompressor} instead. \end{funcdesc} From mwh@users.sourceforge.net Tue Nov 5 18:05:54 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Tue, 05 Nov 2002 10:05:54 -0800 Subject: [Python-checkins] python/dist/src/Objects abstract.c,2.105,2.106 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv14221 Modified Files: abstract.c Log Message: Use PyList_CheckExact and PyTuple_CheckExact for checking whether PySequence_Fast needs to do anything siginificant. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.105 retrieving revision 2.106 diff -C2 -d -r2.105 -r2.106 *** abstract.c 16 Aug 2002 17:01:08 -0000 2.105 --- abstract.c 5 Nov 2002 18:05:49 -0000 2.106 *************** *** 1437,1441 **** return null_error(); ! if (PyList_Check(v) || PyTuple_Check(v)) { Py_INCREF(v); return v; --- 1437,1441 ---- return null_error(); ! if (PyList_CheckExact(v) || PyTuple_CheckExact(v)) { Py_INCREF(v); return v; From nnorwitz@users.sourceforge.net Tue Nov 5 18:17:36 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Tue, 05 Nov 2002 10:17:36 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv18699/Modules Modified Files: bz2module.c Log Message: Fix SF #633935, test_bz2 fails Needed to init ret since it was Py_XDECREF()d on error. All regressions pass in debug build for me. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bz2module.c 5 Nov 2002 16:50:05 -0000 1.1 --- bz2module.c 5 Nov 2002 18:17:32 -0000 1.2 *************** *** 1702,1706 **** int bufsize = SMALLCHUNK; long totalout; ! PyObject *ret; bz_stream *bzs = &self->bzs; int bzerror; --- 1702,1706 ---- int bufsize = SMALLCHUNK; long totalout; ! PyObject *ret = NULL; bz_stream *bzs = &self->bzs; int bzerror; From gvanrossum@users.sourceforge.net Tue Nov 5 18:41:23 2002 From: gvanrossum@users.sourceforge.net (gvanrossum@users.sourceforge.net) Date: Tue, 05 Nov 2002 10:41:23 -0800 Subject: [Python-checkins] python/dist/src/Lib asyncore.py,1.37,1.38 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv30449 Modified Files: asyncore.py Log Message: Fix an old bug in poll(). When a signal is handled while we're blocked in select(), this will raise select.error with errno set to EINTR. The except clauses correctly ignores this error, but the rest of the logic will then call read() for all objects in select's *input* list of read file descriptors. Then when an object's read_handler() is naive, it will call recv() on its socket, which will raise an IOError, and then asyncore decides to close the socket. To fix this, we simply return in this case. Backport candidate. Index: asyncore.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** asyncore.py 26 Sep 2002 13:19:48 -0000 1.37 --- asyncore.py 5 Nov 2002 18:41:20 -0000 1.38 *************** *** 110,113 **** --- 110,115 ---- if err[0] != EINTR: raise + else: + return for fd in r: From niemeyer@users.sourceforge.net Tue Nov 5 18:41:55 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Tue, 05 Nov 2002 10:41:55 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv29909 Modified Files: bz2module.c Log Message: * bzmodule.c More fixes of XDECREF'd values not initialized. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bz2module.c 5 Nov 2002 18:17:32 -0000 1.2 --- bz2module.c 5 Nov 2002 18:41:53 -0000 1.3 *************** *** 1427,1431 **** int bufsize = SMALLCHUNK; long totalout; ! PyObject *ret; bz_stream *bzs = &self->bzs; int bzerror; --- 1427,1431 ---- int bufsize = SMALLCHUNK; long totalout; ! PyObject *ret = NULL; bz_stream *bzs = &self->bzs; int bzerror; *************** *** 1496,1500 **** { int bufsize = SMALLCHUNK; ! PyObject *ret; bz_stream *bzs = &self->bzs; int totalout; --- 1496,1500 ---- { int bufsize = SMALLCHUNK; ! PyObject *ret = NULL; bz_stream *bzs = &self->bzs; int totalout; *************** *** 1906,1910 **** int datasize; int bufsize; ! PyObject *ret; bz_stream _bzs; bz_stream *bzs = &_bzs; --- 1906,1910 ---- int datasize; int bufsize; ! PyObject *ret = NULL; bz_stream _bzs; bz_stream *bzs = &_bzs; From bwarsaw@users.sourceforge.net Tue Nov 5 19:54:23 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 11:54:23 -0800 Subject: [Python-checkins] python/dist/src/Lib/email Utils.py,1.20,1.21 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email In directory usw-pr-cvs1:/tmp/cvs-serv29137 Modified Files: Utils.py Log Message: Jason Mastaler's patch to break the dependence on rfc822.py for the address parsing routines. Closes SF patch #613434. Index: Utils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/Utils.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Utils.py 1 Oct 2002 00:44:13 -0000 1.20 --- Utils.py 5 Nov 2002 19:54:21 -0000 1.21 *************** *** 14,24 **** from types import ListType ! from rfc822 import quote ! from rfc822 import AddressList as _AddressList ! from rfc822 import mktime_tz # We need wormarounds for bugs in these methods in older Pythons (see below) ! from rfc822 import parsedate as _parsedate ! from rfc822 import parsedate_tz as _parsedate_tz try: --- 14,24 ---- from types import ListType ! from email._parseaddr import quote ! from email._parseaddr import AddressList as _AddressList ! from email._parseaddr import mktime_tz # We need wormarounds for bugs in these methods in older Pythons (see below) ! from email._parseaddr import parsedate as _parsedate ! from email._parseaddr import parsedate_tz as _parsedate_tz try: From bwarsaw@users.sourceforge.net Tue Nov 5 19:54:55 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 11:54:55 -0800 Subject: [Python-checkins] python/dist/src/Lib/email _parseaddr.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email In directory usw-pr-cvs1:/tmp/cvs-serv29454 Added Files: _parseaddr.py Log Message: Jason Mastaler's patch to break the dependence on rfc822.py for the address parsing routines. Closes SF patch #613434. --- NEW FILE: _parseaddr.py --- # Copyright (C) 2002 Python Software Foundation """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ import time # Parse a date field _monthnames = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec', 'january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'] _daynames = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] # The timezone table does not include the military time zones defined # in RFC822, other than Z. According to RFC1123, the description in # RFC822 gets the signs wrong, so we can't rely on any such time # zones. RFC1123 recommends that numeric timezone indicators be used # instead of timezone names. _timezones = {'UT':0, 'UTC':0, 'GMT':0, 'Z':0, 'AST': -400, 'ADT': -300, # Atlantic (used in Canada) 'EST': -500, 'EDT': -400, # Eastern 'CST': -600, 'CDT': -500, # Central 'MST': -700, 'MDT': -600, # Mountain 'PST': -800, 'PDT': -700 # Pacific } def parsedate_tz(data): """Convert a date string to a time tuple. Accounts for military timezones. """ data = data.split() if data[0][-1] in (',', '.') or data[0].lower() in _daynames: # There's a dayname here. Skip it del data[0] if len(data) == 3: # RFC 850 date, deprecated stuff = data[0].split('-') if len(stuff) == 3: data = stuff + data[1:] if len(data) == 4: s = data[3] i = s.find('+') if i > 0: data[3:] = [s[:i], s[i+1:]] else: data.append('') # Dummy tz if len(data) < 5: return None data = data[:5] [dd, mm, yy, tm, tz] = data mm = mm.lower() if not mm in _monthnames: dd, mm = mm, dd.lower() if not mm in _monthnames: return None mm = _monthnames.index(mm)+1 if mm > 12: mm = mm - 12 if dd[-1] == ',': dd = dd[:-1] i = yy.find(':') if i > 0: yy, tm = tm, yy if yy[-1] == ',': yy = yy[:-1] if not yy[0].isdigit(): yy, tz = tz, yy if tm[-1] == ',': tm = tm[:-1] tm = tm.split(':') if len(tm) == 2: [thh, tmm] = tm tss = '0' elif len(tm) == 3: [thh, tmm, tss] = tm else: return None try: yy = int(yy) dd = int(dd) thh = int(thh) tmm = int(tmm) tss = int(tss) except ValueError: return None tzoffset = None tz = tz.upper() if _timezones.has_key(tz): tzoffset = _timezones[tz] else: try: tzoffset = int(tz) except ValueError: pass # Convert a timezone offset into seconds ; -0500 -> -18000 if tzoffset: if tzoffset < 0: tzsign = -1 tzoffset = -tzoffset else: tzsign = 1 tzoffset = tzsign * ( (tzoffset/100)*3600 + (tzoffset % 100)*60) tuple = (yy, mm, dd, thh, tmm, tss, 0, 0, 0, tzoffset) return tuple def parsedate(data): """Convert a time string to a time tuple.""" t = parsedate_tz(data) if type(t) == type( () ): return t[:9] else: return t def mktime_tz(data): """Turn a 10-tuple as returned by parsedate_tz() into a UTC timestamp.""" if data[9] is None: # No zone info, so localtime is better assumption than GMT return time.mktime(data[:8] + (-1,)) else: t = time.mktime(data[:8] + (0,)) return t - data[9] - time.timezone def quote(str): """Add quotes around a string.""" return str.replace('\\', '\\\\').replace('"', '\\"') class AddrlistClass: """Address parser class by Ben Escoto. To understand what this class does, it helps to have a copy of RFC-822 in front of you. Note: this class interface is deprecated and may be removed in the future. Use rfc822.AddressList instead. """ def __init__(self, field): """Initialize a new instance. `field' is an unparsed address header field, containing one or more addresses. """ self.specials = '()<>@,:;.\"[]' self.pos = 0 self.LWS = ' \t' self.CR = '\r\n' self.atomends = self.specials + self.LWS + self.CR self.field = field self.commentlist = [] def gotonext(self): """Parse up to the start of the next address.""" while self.pos < len(self.field): if self.field[self.pos] in self.LWS + '\n\r': self.pos = self.pos + 1 elif self.field[self.pos] == '(': self.commentlist.append(self.getcomment()) else: break def getaddrlist(self): """Parse all addresses. Returns a list containing all of the addresses. """ ad = self.getaddress() if ad: return ad + self.getaddrlist() else: return [] def getaddress(self): """Parse the next address.""" self.commentlist = [] self.gotonext() oldpos = self.pos oldcl = self.commentlist plist = self.getphraselist() self.gotonext() returnlist = [] if self.pos >= len(self.field): # Bad email address technically, no domain. if plist: returnlist = [(' '.join(self.commentlist), plist[0])] elif self.field[self.pos] in '.@': # email address is just an addrspec # this isn't very efficient since we start over self.pos = oldpos self.commentlist = oldcl addrspec = self.getaddrspec() returnlist = [(' '.join(self.commentlist), addrspec)] elif self.field[self.pos] == ':': # address is a group returnlist = [] fieldlen = len(self.field) self.pos = self.pos + 1 while self.pos < len(self.field): self.gotonext() if self.pos < fieldlen and self.field[self.pos] == ';': self.pos = self.pos + 1 break returnlist = returnlist + self.getaddress() elif self.field[self.pos] == '<': # Address is a phrase then a route addr routeaddr = self.getrouteaddr() if self.commentlist: returnlist = [(' '.join(plist) + ' (' + \ ' '.join(self.commentlist) + ')', routeaddr)] else: returnlist = [(' '.join(plist), routeaddr)] else: if plist: returnlist = [(' '.join(self.commentlist), plist[0])] elif self.field[self.pos] in self.specials: self.pos = self.pos + 1 self.gotonext() if self.pos < len(self.field) and self.field[self.pos] == ',': self.pos = self.pos + 1 return returnlist def getrouteaddr(self): """Parse a route address (Return-path value). This method just skips all the route stuff and returns the addrspec. """ if self.field[self.pos] != '<': return expectroute = 0 self.pos = self.pos + 1 self.gotonext() adlist = "" while self.pos < len(self.field): if expectroute: self.getdomain() expectroute = 0 elif self.field[self.pos] == '>': self.pos = self.pos + 1 break elif self.field[self.pos] == '@': self.pos = self.pos + 1 expectroute = 1 elif self.field[self.pos] == ':': self.pos = self.pos + 1 expectaddrspec = 1 else: adlist = self.getaddrspec() self.pos = self.pos + 1 break self.gotonext() return adlist def getaddrspec(self): """Parse an RFC-822 addr-spec.""" aslist = [] self.gotonext() while self.pos < len(self.field): if self.field[self.pos] == '.': aslist.append('.') self.pos = self.pos + 1 elif self.field[self.pos] == '"': aslist.append('"%s"' % self.getquote()) elif self.field[self.pos] in self.atomends: break else: aslist.append(self.getatom()) self.gotonext() if self.pos >= len(self.field) or self.field[self.pos] != '@': return ''.join(aslist) aslist.append('@') self.pos = self.pos + 1 self.gotonext() return ''.join(aslist) + self.getdomain() def getdomain(self): """Get the complete domain name from an address.""" sdlist = [] while self.pos < len(self.field): if self.field[self.pos] in self.LWS: self.pos = self.pos + 1 elif self.field[self.pos] == '(': self.commentlist.append(self.getcomment()) elif self.field[self.pos] == '[': sdlist.append(self.getdomainliteral()) elif self.field[self.pos] == '.': self.pos = self.pos + 1 sdlist.append('.') elif self.field[self.pos] in self.atomends: break else: sdlist.append(self.getatom()) return ''.join(sdlist) def getdelimited(self, beginchar, endchars, allowcomments = 1): """Parse a header fragment delimited by special characters. `beginchar' is the start character for the fragment. If self is not looking at an instance of `beginchar' then getdelimited returns the empty string. `endchars' is a sequence of allowable end-delimiting characters. Parsing stops when one of these is encountered. If `allowcomments' is non-zero, embedded RFC-822 comments are allowed within the parsed fragment. """ if self.field[self.pos] != beginchar: return '' slist = [''] quote = 0 self.pos = self.pos + 1 while self.pos < len(self.field): if quote == 1: slist.append(self.field[self.pos]) quote = 0 elif self.field[self.pos] in endchars: self.pos = self.pos + 1 break elif allowcomments and self.field[self.pos] == '(': slist.append(self.getcomment()) elif self.field[self.pos] == '\\': quote = 1 else: slist.append(self.field[self.pos]) self.pos = self.pos + 1 return ''.join(slist) def getquote(self): """Get a quote-delimited fragment from self's field.""" return self.getdelimited('"', '"\r', 0) def getcomment(self): """Get a parenthesis-delimited fragment from self's field.""" return self.getdelimited('(', ')\r', 1) def getdomainliteral(self): """Parse an RFC-822 domain-literal.""" return '[%s]' % self.getdelimited('[', ']\r', 0) def getatom(self): """Parse an RFC-822 atom.""" atomlist = [''] while self.pos < len(self.field): if self.field[self.pos] in self.atomends: break else: atomlist.append(self.field[self.pos]) self.pos = self.pos + 1 return ''.join(atomlist) def getphraselist(self): """Parse a sequence of RFC-822 phrases. A phrase is a sequence of words, which are in turn either RFC-822 atoms or quoted-strings. Phrases are canonicalized by squeezing all runs of continuous whitespace into one space. """ plist = [] while self.pos < len(self.field): if self.field[self.pos] in self.LWS: self.pos = self.pos + 1 elif self.field[self.pos] == '"': plist.append(self.getquote()) elif self.field[self.pos] == '(': self.commentlist.append(self.getcomment()) elif self.field[self.pos] in self.atomends: break else: plist.append(self.getatom()) return plist class AddressList(AddrlistClass): """An AddressList encapsulates a list of parsed RFC822 addresses.""" def __init__(self, field): AddrlistClass.__init__(self, field) if field: self.addresslist = self.getaddrlist() else: self.addresslist = [] def __len__(self): return len(self.addresslist) def __str__(self): return ", ".join(map(dump_address_pair, self.addresslist)) def __add__(self, other): # Set union newaddr = AddressList(None) newaddr.addresslist = self.addresslist[:] for x in other.addresslist: if not x in self.addresslist: newaddr.addresslist.append(x) return newaddr def __iadd__(self, other): # Set union, in-place for x in other.addresslist: if not x in self.addresslist: self.addresslist.append(x) return self def __sub__(self, other): # Set difference newaddr = AddressList(None) for x in self.addresslist: if not x in other.addresslist: newaddr.addresslist.append(x) return newaddr def __isub__(self, other): # Set difference, in-place for x in other.addresslist: if x in self.addresslist: self.addresslist.remove(x) return self def __getitem__(self, index): # Make indexing, slices, and 'in' work return self.addresslist[index] From bwarsaw@users.sourceforge.net Tue Nov 5 19:56:49 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 11:56:49 -0800 Subject: [Python-checkins] python/dist/src/Lib/email __init__.py,1.20,1.21 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email In directory usw-pr-cvs1:/tmp/cvs-serv30543 Modified Files: __init__.py Log Message: Bump __version__ (yes, to 2.5 "minus") Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/__init__.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** __init__.py 14 Oct 2002 15:24:18 -0000 1.20 --- __init__.py 5 Nov 2002 19:56:47 -0000 1.21 *************** *** 5,9 **** """ ! __version__ = '2.4.3' __all__ = [ --- 5,9 ---- """ ! __version__ = '2.5-' __all__ = [ From jhylton@users.sourceforge.net Tue Nov 5 20:11:11 2002 From: jhylton@users.sourceforge.net (jhylton@users.sourceforge.net) Date: Tue, 05 Nov 2002 12:11:11 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils sysconfig.py,1.52,1.53 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory usw-pr-cvs1:/tmp/cvs-serv4183 Modified Files: sysconfig.py Log Message: Remove use of string module and reflow a couple of long lines. Index: sysconfig.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/sysconfig.py,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** sysconfig.py 5 Nov 2002 16:11:59 -0000 1.52 --- sysconfig.py 5 Nov 2002 20:11:08 -0000 1.53 *************** *** 15,19 **** import os import re - import string import sys --- 15,18 ---- *************** *** 214,218 **** if m: n, v = m.group(1, 2) ! try: v = string.atoi(v) except ValueError: pass g[n] = v --- 213,217 ---- if m: n, v = m.group(1, 2) ! try: v = int(v) except ValueError: pass g[n] = v *************** *** 252,260 **** if m: n, v = m.group(1, 2) ! v = string.strip(v) if "$" in v: notdone[n] = v else: ! try: v = string.atoi(v) except ValueError: pass done[n] = v --- 251,259 ---- if m: n, v = m.group(1, 2) ! v = v.strip() if "$" in v: notdone[n] = v else: ! try: v = int(v) except ValueError: pass done[n] = v *************** *** 273,279 **** notdone[name] = value else: ! try: value = string.atoi(value) except ValueError: ! done[name] = string.strip(value) else: done[name] = value --- 272,278 ---- notdone[name] = value else: ! try: value = int(value) except ValueError: ! done[name] = value.strip() else: done[name] = value *************** *** 289,295 **** notdone[name] = value else: ! try: value = string.atoi(value) except ValueError: ! done[name] = string.strip(value) else: done[name] = value --- 288,294 ---- notdone[name] = value else: ! try: value = int(value) except ValueError: ! done[name] = value.strip() else: done[name] = value *************** *** 370,375 **** # sense. python_lib = get_python_lib(standard_lib=1) ! linkerscript_name = os.path.basename(string.split(g['LDSHARED'])[0]) ! linkerscript = os.path.join(python_lib, 'config', linkerscript_name) # XXX this isn't the right place to do this: adding the Python --- 369,375 ---- # sense. python_lib = get_python_lib(standard_lib=1) ! linkerscript_name = os.path.basename(g['LDSHARED'].split()[0]) ! linkerscript = os.path.join(python_lib, 'config', ! linkerscript_name) # XXX this isn't the right place to do this: adding the Python From jhylton@users.sourceforge.net Tue Nov 5 20:27:21 2002 From: jhylton@users.sourceforge.net (jhylton@users.sourceforge.net) Date: Tue, 05 Nov 2002 12:27:21 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils ccompiler.py,1.50,1.51 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory usw-pr-cvs1:/tmp/cvs-serv9713 Modified Files: ccompiler.py Log Message: Repair inconsistent use of tabs and spaces. Index: ccompiler.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ccompiler.py,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** ccompiler.py 5 Nov 2002 16:11:53 -0000 1.50 --- ccompiler.py 5 Nov 2002 20:27:17 -0000 1.51 *************** *** 590,594 **** language_map, and language_order to do the job. """ ! if type(sources) is not ListType: sources = [sources] lang = None --- 590,594 ---- language_map, and language_order to do the job. """ ! if type(sources) is not ListType: sources = [sources] lang = None From tim_one@users.sourceforge.net Tue Nov 5 20:38:58 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Tue, 05 Nov 2002 12:38:58 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.509,1.510 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv13195/python/Misc Modified Files: NEWS Log Message: Another round on SF patch 618135: gzip.py and files > 2G The last round boosted "the limit" from 2GB to 4GB. This round gets rid of the 4GB limit. For files > 4GB, gzip stores just the last 32 bits of the file size, and now we play along with that too. Tested by hand (on a 6+GB file) on Win2K. Boosting from 2GB to 4GB was arguably enough "a bugfix". Going beyond that smells more like "new feature" to me. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.509 retrieving revision 1.510 diff -C2 -d -r1.509 -r1.510 *** NEWS 5 Nov 2002 16:50:05 -0000 1.509 --- NEWS 5 Nov 2002 20:38:55 -0000 1.510 *************** *** 356,362 **** ------- ! - gzip.py now handles files exceeding 2GB. Note that 4GB is still a ! fundamental limitation of the underlying gzip file format (it only ! has 32 bits to record the file size). - xml.sax.saxutils.unescape has been added, to replace entity references --- 356,365 ---- ------- ! - gzip.py now handles files exceeding 2GB. Files over 4GB also work ! now (provided the OS supports it, and Python is configured with large ! file support), but in that case the underlying gzip file format can ! record only the least-significant 32 bits of the file size, so that ! some tools working with gzipped files may report an incorrect file ! size. - xml.sax.saxutils.unescape has been added, to replace entity references From tim_one@users.sourceforge.net Tue Nov 5 20:38:57 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Tue, 05 Nov 2002 12:38:57 -0800 Subject: [Python-checkins] python/dist/src/Lib gzip.py,1.36,1.37 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv13195/python/Lib Modified Files: gzip.py Log Message: Another round on SF patch 618135: gzip.py and files > 2G The last round boosted "the limit" from 2GB to 4GB. This round gets rid of the 4GB limit. For files > 4GB, gzip stores just the last 32 bits of the file size, and now we play along with that too. Tested by hand (on a 6+GB file) on Win2K. Boosting from 2GB to 4GB was arguably enough "a bugfix". Going beyond that smells more like "new feature" to me. Index: gzip.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/gzip.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** gzip.py 4 Nov 2002 19:50:11 -0000 1.36 --- gzip.py 5 Nov 2002 20:38:54 -0000 1.37 *************** *** 25,28 **** --- 25,32 ---- return i + def LOWU32(i): + """Return the low-order 32 bits of an int, as a non-negative int.""" + return i & 0xFFFFFFFFL + def write32(output, value): output.write(struct.pack(" References: Message-ID: <20021105205040.GA25678@ute.mems-exchange.org> On Tue, Nov 05, 2002 at 12:11:11PM -0800, jhylton@users.sourceforge.net wrote: >Remove use of string module and reflow a couple of long lines. Note that the use of string methods means the end of 1.5.2 compatibility. If we're doing that, then there are many more modernizations that can be done to the Distutils code. --amk From bwarsaw@users.sourceforge.net Tue Nov 5 20:53:20 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 12:53:20 -0800 Subject: [Python-checkins] python/dist/src/Lib/email/test/data msg_34.txt,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email/test/data In directory usw-pr-cvs1:/tmp/cvs-serv19837 Added Files: msg_34.txt Log Message: Test case, distilled from SF bug #631350, where a subobject in a multipart/digest isn't a message/rfc822. This is legal, but counter to recommended practice in RFC 2046, $5.1.5. --- NEW FILE: msg_34.txt --- From: aperson@dom.ain To: bperson@dom.ain Content-Type: multipart/digest; boundary=XYZ --XYZ Content-Type: text/plain This is a text plain part that is counter to recommended practice in RFC 2046, $5.1.5, but is not illegal --XYZ From: cperson@dom.ain To: dperson@dom.ain A submessage --XYZ-- From fdrake@acm.org Tue Nov 5 20:53:56 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Tue, 5 Nov 2002 15:53:56 -0500 Subject: [Python-checkins] python/dist/src/Lib/distutils sysconfig.py,1.52,1.53 In-Reply-To: <20021105205040.GA25678@ute.mems-exchange.org> References: <20021105205040.GA25678@ute.mems-exchange.org> Message-ID: <15816.12260.81426.176165@grendel.zope.com> Andrew Kuchling writes: > Note that the use of string methods means the end of 1.5.2 > compatibility. If we're doing that, then there are many more > modernizations that can be done to the Distutils code. I think dropping 1.5. support is fine, and that's what I told Jeremy before he made that change. ;-) -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From bwarsaw@users.sourceforge.net Tue Nov 5 20:54:39 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 12:54:39 -0800 Subject: [Python-checkins] python/dist/src/Lib/email Parser.py,1.17,1.18 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email In directory usw-pr-cvs1:/tmp/cvs-serv20317 Modified Files: Parser.py Log Message: _parsebody(): A fix for SF bug #631350, where a subobject in a multipart/digest isn't a message/rfc822. This is legal, but counter to recommended practice in RFC 2046, $5.1.5. The fix is to look at the content type after setting the default content type. If the maintype is then message or multipart, attach the parsed subobject, otherwise use set_payload() to set the data of the other object. Index: Parser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/Parser.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Parser.py 7 Oct 2002 17:27:35 -0000 1.17 --- Parser.py 5 Nov 2002 20:54:37 -0000 1.18 *************** *** 222,228 **** msgobj = self.parsestr(parthdrs, headersonly=1) # while submsgobj is the message itself - submsgobj = self.parsestr(part) - msgobj.attach(submsgobj) msgobj.set_default_type('message/rfc822') else: msgobj = self.parsestr(part) --- 222,232 ---- msgobj = self.parsestr(parthdrs, headersonly=1) # while submsgobj is the message itself msgobj.set_default_type('message/rfc822') + maintype = msgobj.get_content_maintype() + if maintype in ('message', 'multipart'): + submsgobj = self.parsestr(part) + msgobj.attach(submsgobj) + else: + msgobj.set_payload(part) else: msgobj = self.parsestr(part) From bwarsaw@users.sourceforge.net Tue Nov 5 21:04:54 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 13:04:54 -0800 Subject: [Python-checkins] python/dist/src/Lib/email/test test_email.py,1.22,1.23 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email/test In directory usw-pr-cvs1:/tmp/cvs-serv24473 Modified Files: test_email.py Log Message: test_text_plain_in_a_multipart_digest(): A test of the fix for SF bug #631350, where a subobject in a multipart/digest isn't a message/rfc822. Index: test_email.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** test_email.py 21 Oct 2002 05:43:58 -0000 1.22 --- test_email.py 5 Nov 2002 21:04:52 -0000 1.23 *************** *** 1495,1498 **** --- 1495,1502 ---- self._idempotent(msg, text) + def test_text_plain_in_a_multipart_digest(self): + msg, text = self._msgobj('msg_34.txt') + self._idempotent(msg, text) + def test_content_type(self): eq = self.assertEquals From guido@python.org Tue Nov 5 21:06:24 2002 From: guido@python.org (Guido van Rossum) Date: Tue, 05 Nov 2002 16:06:24 -0500 Subject: [Python-checkins] python/dist/src/Lib/distutils sysconfig.py,1.52,1.53 In-Reply-To: Your message of "Tue, 05 Nov 2002 15:50:40 EST." <20021105205040.GA25678@ute.mems-exchange.org> References: <20021105205040.GA25678@ute.mems-exchange.org> Message-ID: <200211052106.gA5L6Px24258@odiug.zope.com> > >Remove use of string module and reflow a couple of long lines. > > Note that the use of string methods means the end of 1.5.2 > compatibility. Do we still care about that? I thought that was given up long ago? > If we're doing that, then there are many more > modernizations that can be done to the Distutils code. Agreed -- though I suppose that's all low priority. --Guido van Rossum (home page: http://www.python.org/~guido/) From bwarsaw@users.sourceforge.net Tue Nov 5 21:29:49 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 13:29:49 -0800 Subject: [Python-checkins] python/dist/src/Lib/email/test/data msg_35.txt,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email/test/data In directory usw-pr-cvs1:/tmp/cvs-serv1716 Added Files: msg_35.txt Log Message: A message with no separating blank line between the headers and the body. A test message for SF bug #633527. --- NEW FILE: msg_35.txt --- From: aperson@dom.ain To: bperson@dom.ain Subject: here's something interesting counter to RFC 2822, there's no separating newline here From bwarsaw@users.sourceforge.net Tue Nov 5 21:36:23 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 13:36:23 -0800 Subject: [Python-checkins] python/dist/src/Lib/email/test test_email.py,1.23,1.24 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email/test In directory usw-pr-cvs1:/tmp/cvs-serv4388 Modified Files: test_email.py Log Message: test_no_separating_blank_line(): A test for SF bug #633527, no separating blank line between a header block and body text. Tests both lax and strict parsing. Index: test_email.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** test_email.py 5 Nov 2002 21:04:52 -0000 1.23 --- test_email.py 5 Nov 2002 21:36:17 -0000 1.24 *************** *** 43,46 **** --- 43,52 ---- warnings.filterwarnings('ignore', '', DeprecationWarning, __name__) + try: + True, False + except NameError: + True = 1 + False = 0 + *************** *** 68,75 **** ndiffAssertEqual = unittest.TestCase.assertEqual ! def _msgobj(self, filename): fp = openfile(findfile(filename)) try: ! msg = email.message_from_file(fp) finally: fp.close() --- 74,81 ---- ndiffAssertEqual = unittest.TestCase.assertEqual ! def _msgobj(self, filename, strict=False): fp = openfile(findfile(filename)) try: ! msg = email.message_from_file(fp, strict=strict) finally: fp.close() *************** *** 185,200 **** msg = self._msgobj('msg_10.txt') # The outer message is a multipart ! eq(msg.get_payload(decode=1), None) # Subpart 1 is 7bit encoded ! eq(msg.get_payload(0).get_payload(decode=1), 'This is a 7bit encoded message.\n') # Subpart 2 is quopri ! eq(msg.get_payload(1).get_payload(decode=1), '\xa1This is a Quoted Printable encoded message!\n') # Subpart 3 is base64 ! eq(msg.get_payload(2).get_payload(decode=1), 'This is a Base64 encoded message.') # Subpart 4 has no Content-Transfer-Encoding: header. ! eq(msg.get_payload(3).get_payload(decode=1), 'This has no Content-Transfer-Encoding: header.\n') --- 191,206 ---- msg = self._msgobj('msg_10.txt') # The outer message is a multipart ! eq(msg.get_payload(decode=True), None) # Subpart 1 is 7bit encoded ! eq(msg.get_payload(0).get_payload(decode=True), 'This is a 7bit encoded message.\n') # Subpart 2 is quopri ! eq(msg.get_payload(1).get_payload(decode=True), '\xa1This is a Quoted Printable encoded message!\n') # Subpart 3 is base64 ! eq(msg.get_payload(2).get_payload(decode=True), 'This is a Base64 encoded message.') # Subpart 4 has no Content-Transfer-Encoding: header. ! eq(msg.get_payload(3).get_payload(decode=True), 'This has no Content-Transfer-Encoding: header.\n') *************** *** 311,319 **** msg.set_param('importance', 'high value') eq(msg.get_param('importance'), 'high value') ! eq(msg.get_param('importance', unquote=0), '"high value"') eq(msg.get_params(), [('text/plain', ''), ('charset', 'iso-2022-jp'), ('importance', 'high value')]) ! eq(msg.get_params(unquote=0), [('text/plain', ''), ('charset', '"iso-2022-jp"'), ('importance', '"high value"')]) --- 317,325 ---- msg.set_param('importance', 'high value') eq(msg.get_param('importance'), 'high value') ! eq(msg.get_param('importance', unquote=False), '"high value"') eq(msg.get_params(), [('text/plain', ''), ('charset', 'iso-2022-jp'), ('importance', 'high value')]) ! eq(msg.get_params(unquote=False), [('text/plain', ''), ('charset', '"iso-2022-jp"'), ('importance', '"high value"')]) *************** *** 739,743 **** def test_mangled_from(self): s = StringIO() ! g = Generator(s, mangle_from_=1) g.flatten(self.msg) self.assertEqual(s.getvalue(), """\ --- 745,749 ---- def test_mangled_from(self): s = StringIO() ! g = Generator(s, mangle_from_=True) g.flatten(self.msg) self.assertEqual(s.getvalue(), """\ *************** *** 750,754 **** def test_dont_mangle_from(self): s = StringIO() ! g = Generator(s, mangle_from_=0) g.flatten(self.msg) self.assertEqual(s.getvalue(), """\ --- 756,760 ---- def test_dont_mangle_from(self): s = StringIO() ! g = Generator(s, mangle_from_=False) g.flatten(self.msg) self.assertEqual(s.getvalue(), """\ *************** *** 1049,1053 **** finally: fp.close() ! p = Parser(strict=1) # Note, under a future non-strict parsing mode, this would parse the # message into the intended message tree. --- 1055,1059 ---- finally: fp.close() ! p = Parser(strict=True) # Note, under a future non-strict parsing mode, this would parse the # message into the intended message tree. *************** *** 1100,1103 **** --- 1106,1123 ---- """) + def test_no_separating_blank_line(self): + eq = self.ndiffAssertEqual + msg = self._msgobj('msg_35.txt') + eq(msg.as_string(), """\ + From: aperson@dom.ain + To: bperson@dom.ain + Subject: here's something interesting + + counter to RFC 2822, there's no separating newline here + """) + # strict=True should raise an exception + self.assertRaises(Errors.HeaderParseError, + self._msgobj, 'msg_35.txt', True) + *************** *** 1645,1649 **** now = time.time() self.assertEqual( ! Utils.parsedate(Utils.formatdate(now, localtime=1))[:6], time.localtime(now)[:6]) --- 1665,1669 ---- now = time.time() self.assertEqual( ! Utils.parsedate(Utils.formatdate(now, localtime=True))[:6], time.localtime(now)[:6]) *************** *** 1952,1956 **** eq(he('hello', charset='iso-8859-2'), '=?iso-8859-2?b?aGVsbG8=?=') # Test the keep_eols flag ! eq(he('hello\nworld', keep_eols=1), '=?iso-8859-1?b?aGVsbG8Kd29ybGQ=?=') # Test the maxlinelen argument --- 1972,1976 ---- eq(he('hello', charset='iso-8859-2'), '=?iso-8859-2?b?aGVsbG8=?=') # Test the keep_eols flag ! eq(he('hello\nworld', keep_eols=True), '=?iso-8859-1?b?aGVsbG8Kd29ybGQ=?=') # Test the maxlinelen argument *************** *** 2031,2035 **** eq(he('hello', charset='iso-8859-2'), '=?iso-8859-2?q?hello?=') # Test the keep_eols flag ! eq(he('hello\nworld', keep_eols=1), '=?iso-8859-1?q?hello=0Aworld?=') # Test a non-ASCII character eq(he('hello\xc7there'), '=?iso-8859-1?q?hello=C7there?=') --- 2051,2055 ---- eq(he('hello', charset='iso-8859-2'), '=?iso-8859-2?q?hello?=') # Test the keep_eols flag ! eq(he('hello\nworld', keep_eols=True), '=?iso-8859-1?q?hello=0Aworld?=') # Test a non-ASCII character eq(he('hello\xc7there'), '=?iso-8859-1?q?hello=C7there?=') *************** *** 2278,2282 **** eq(msg.get_param('title'), ('us-ascii', 'en', 'This is even more ***fun*** isn\'t it!')) ! eq(msg.get_param('title', unquote=0), ('us-ascii', 'en', '"This is even more ***fun*** isn\'t it!"')) --- 2298,2302 ---- eq(msg.get_param('title'), ('us-ascii', 'en', 'This is even more ***fun*** isn\'t it!')) ! eq(msg.get_param('title', unquote=False), ('us-ascii', 'en', '"This is even more ***fun*** isn\'t it!"')) From bwarsaw@users.sourceforge.net Tue Nov 5 21:44:08 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 13:44:08 -0800 Subject: [Python-checkins] python/dist/src/Lib/email Parser.py,1.18,1.19 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/email In directory usw-pr-cvs1:/tmp/cvs-serv7523 Modified Files: Parser.py Log Message: parse(), _parseheaders(), _parsebody(): A fix for SF bug #633527, where in lax parsing, the first non-header line after a header block (e.g. the first line not containing a colon, and not a continuation), can be treated as the first body line, even without the RFC mandated blank line separator. rfc822 had this behavior, and I vaguely remember problems with this, but can't remember details. In any event, all the tests still pass, so I guess we'll find out. ;/ This patch works by returning the non-header, non-continuation line from _parseheader() and using that as the first header line prepended to fp.read() if given. It's usually None. We use this approach instead of trying to seek/tell the file-like object. Index: Parser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/Parser.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Parser.py 5 Nov 2002 20:54:37 -0000 1.18 --- Parser.py 5 Nov 2002 21:44:06 -0000 1.19 *************** *** 60,66 **** """ root = self._class() ! self._parseheaders(root, fp) if not headersonly: ! self._parsebody(root, fp) return root --- 60,66 ---- """ root = self._class() ! firstbodyline = self._parseheaders(root, fp) if not headersonly: ! self._parsebody(root, fp, firstbodyline) return root *************** *** 81,84 **** --- 81,85 ---- lastvalue = [] lineno = 0 + firstbodyline = None while True: # Don't strip the line before we test for the end condition, *************** *** 121,131 **** if self._strict: raise Errors.HeaderParseError( ! "Not a header, not a continuation: ``%s''"%line) elif lineno == 1 and line.startswith('--'): # allow through duplicate boundary tags. continue else: ! raise Errors.HeaderParseError( ! "Not a header, not a continuation: ``%s''"%line) if lastheader: container[lastheader] = NL.join(lastvalue) --- 122,135 ---- if self._strict: raise Errors.HeaderParseError( ! "Not a header, not a continuation: ``%s''" % line) elif lineno == 1 and line.startswith('--'): # allow through duplicate boundary tags. continue else: ! # There was no separating blank line as mandated by RFC ! # 2822, but we're in non-strict mode. So just offer up ! # this current line as the first body line. ! firstbodyline = line ! break if lastheader: container[lastheader] = NL.join(lastvalue) *************** *** 135,140 **** if lastheader: container[lastheader] = NL.join(lastvalue) ! def _parsebody(self, container, fp): # Parse the body, but first split the payload on the content-type # boundary if present. --- 139,145 ---- if lastheader: container[lastheader] = NL.join(lastvalue) + return firstbodyline ! def _parsebody(self, container, fp, firstbodyline=None): # Parse the body, but first split the payload on the content-type # boundary if present. *************** *** 153,156 **** --- 158,163 ---- separator = '--' + boundary payload = fp.read() + if firstbodyline is not None: + payload = firstbodyline + '\n' + payload # We use an RE here because boundaries can have trailing # whitespace. *************** *** 261,265 **** container.attach(msg) else: ! container.set_payload(fp.read()) --- 268,275 ---- container.attach(msg) else: ! text = fp.read() ! if firstbodyline is not None: ! text = firstbodyline + '\n' + text ! container.set_payload(text) *************** *** 275,279 **** interested in is the message headers. """ ! def _parsebody(self, container, fp): # Consume but do not parse, the body ! container.set_payload(fp.read()) --- 285,292 ---- interested in is the message headers. """ ! def _parsebody(self, container, fp, firstbodyline=None): # Consume but do not parse, the body ! text = fp.read() ! if firstbodyline is not None: ! text = firstbodyline + '\n' + text ! container.set_payload(text) From loewis@users.sourceforge.net Tue Nov 5 22:11:52 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Tue, 05 Nov 2002 14:11:52 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib tkinter.tex,1.16,1.17 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv19596 Modified Files: tkinter.tex Log Message: Document that images go away when they go away. Fixes #632323. Index: tkinter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/tkinter.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tkinter.tex 3 Nov 2002 13:13:20 -0000 1.16 --- tkinter.tex 5 Nov 2002 22:11:50 -0000 1.17 *************** *** 882,885 **** --- 882,903 ---- \end{description} + \subsubsection{Images} + + Bitmap/Pixelmap images can be created through the subclasses of + \class{Tkinter.Image}: + + \begin{itemize} + \item \class{BitmapImage} can be used for X11 bitmap data. + \item \class{PhotoImage} can be used for GIF and PPM/PGM color bitmaps. + \end{itemize} + + Either type of image is created through either the \code{file} or the + \code{data} option (other options are available as well). + + The image object can then be used whereever an \code{image} option is + supported by some widget (e.g. labels, buttons, menus). In these + cases, Tk will not keep a reference to the image. When the last Python + reference to the image object is deleted, the image data is deleted as + well, and Tk will display an empty box wheerever the image was used. \section{\module{Tix} --- From fdrake@users.sourceforge.net Tue Nov 5 22:19:29 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 05 Nov 2002 14:19:29 -0800 Subject: [Python-checkins] python/dist/src/Doc/api newtypes.tex,1.3.6.1,1.3.6.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/api In directory usw-pr-cvs1:/tmp/cvs-serv23640 Modified Files: Tag: release22-maint newtypes.tex Log Message: Minor cleanups, markup. Index: newtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/newtypes.tex,v retrieving revision 1.3.6.1 retrieving revision 1.3.6.2 diff -C2 -d -r1.3.6.1 -r1.3.6.2 *** newtypes.tex 3 Nov 2002 02:57:24 -0000 1.3.6.1 --- newtypes.tex 5 Nov 2002 22:19:27 -0000 1.3.6.2 *************** *** 344,349 **** \begin{ctypedesc}[getcharbufferproc]{int (*getcharbufferproc) (PyObject *self, int segment, const char **ptrptr)} ! Return the size of the memory buffer in ptrptr at the segment index. ! \code{\var{ptrptr}} is set to the memory buffer. \end{ctypedesc} --- 344,349 ---- \begin{ctypedesc}[getcharbufferproc]{int (*getcharbufferproc) (PyObject *self, int segment, const char **ptrptr)} ! Return the size of the memory buffer in \var{ptrptr} for segment ! \var{segment}. \code{*\var{ptrptr}} is set to the memory buffer. \end{ctypedesc} From fdrake@users.sourceforge.net Tue Nov 5 22:19:47 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 05 Nov 2002 14:19:47 -0800 Subject: [Python-checkins] python/dist/src/Doc/api newtypes.tex,1.17,1.18 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/api In directory usw-pr-cvs1:/tmp/cvs-serv23762 Modified Files: newtypes.tex Log Message: Minor cleanups, markup. Index: newtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/newtypes.tex,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** newtypes.tex 3 Nov 2002 02:56:27 -0000 1.17 --- newtypes.tex 5 Nov 2002 22:19:45 -0000 1.18 *************** *** 1503,1508 **** \begin{ctypedesc}[getcharbufferproc]{int (*getcharbufferproc) (PyObject *self, int segment, const char **ptrptr)} ! Return the size of the memory buffer in ptrptr at the segment index. ! \code{\var{ptrptr}} is set to the memory buffer. \end{ctypedesc} --- 1503,1508 ---- \begin{ctypedesc}[getcharbufferproc]{int (*getcharbufferproc) (PyObject *self, int segment, const char **ptrptr)} ! Return the size of the memory buffer in \var{ptrptr} for segment ! \var{segment}. \code{*\var{ptrptr}} is set to the memory buffer. \end{ctypedesc} From nnorwitz@users.sourceforge.net Tue Nov 5 22:38:00 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Tue, 05 Nov 2002 14:38:00 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib tkinter.tex,1.17,1.18 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv30773/Doc/lib Modified Files: tkinter.tex Log Message: Fix minor typos Index: tkinter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/tkinter.tex,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tkinter.tex 5 Nov 2002 22:11:50 -0000 1.17 --- tkinter.tex 5 Nov 2002 22:37:58 -0000 1.18 *************** *** 895,903 **** \code{data} option (other options are available as well). ! The image object can then be used whereever an \code{image} option is supported by some widget (e.g. labels, buttons, menus). In these cases, Tk will not keep a reference to the image. When the last Python reference to the image object is deleted, the image data is deleted as ! well, and Tk will display an empty box wheerever the image was used. \section{\module{Tix} --- --- 895,903 ---- \code{data} option (other options are available as well). ! The image object can then be used where ever an \code{image} option is supported by some widget (e.g. labels, buttons, menus). In these cases, Tk will not keep a reference to the image. When the last Python reference to the image object is deleted, the image data is deleted as ! well, and Tk will display an empty box where ever the image was used. \section{\module{Tix} --- From bwarsaw@users.sourceforge.net Tue Nov 5 22:40:23 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 14:40:23 -0800 Subject: [Python-checkins] python/dist/src/Lib pdb.py,1.57,1.58 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv31684 Modified Files: pdb.py Log Message: Implement a `pp' command, which is like `p' except that it pretty-prints the value of its expression argument. Index: pdb.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pdb.py,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** pdb.py 10 Sep 2002 21:57:14 -0000 1.57 --- pdb.py 5 Nov 2002 22:40:20 -0000 1.58 *************** *** 12,15 **** --- 12,16 ---- import os import re + import pprint # Create a custom safe Repr instance and increase its maxstring. *************** *** 533,549 **** do_rv = do_retval ! def do_p(self, arg): try: ! value = eval(arg, self.curframe.f_globals, ! self.curframe.f_locals) except: t, v = sys.exc_info()[:2] ! if type(t) == type(''): exc_type_name = t else: exc_type_name = t.__name__ print '***', exc_type_name + ':', `v` ! return ! print `value` def do_list(self, arg): --- 534,560 ---- do_rv = do_retval ! def _getval(self, arg): try: ! return eval(arg, self.curframe.f_globals, ! self.curframe.f_locals) except: t, v = sys.exc_info()[:2] ! if isinstance(t, str): exc_type_name = t else: exc_type_name = t.__name__ print '***', exc_type_name + ':', `v` ! raise ! def do_p(self, arg): ! try: ! print repr(self._getval(arg)) ! except: ! pass ! ! def do_pp(self, arg): ! try: ! pprint.pprint(self._getval(arg)) ! except: ! pass def do_list(self, arg): *************** *** 817,820 **** --- 828,835 ---- print """p expression Print the value of the expression.""" + + def help_pp(self): + print """pp expression + Pretty-print the value of the expression.""" def help_exec(self): From bwarsaw@users.sourceforge.net Tue Nov 5 22:41:18 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 14:41:18 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libpdb.tex,1.32,1.33 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv32123 Modified Files: libpdb.tex Log Message: Document the new `pp' command. Index: libpdb.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpdb.tex,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** libpdb.tex 13 Sep 2001 16:56:43 -0000 1.32 --- libpdb.tex 5 Nov 2002 22:41:16 -0000 1.33 *************** *** 274,277 **** --- 274,282 ---- command --- this executes the Python \keyword{print} statement.) + \item[pp \var{expression}] + + Like the \samp{p} command, except the value of the exception is + pretty-printed using the \module{pprint} module. + \item[alias \optional{\var{name} \optional{command}}] From bwarsaw@users.sourceforge.net Tue Nov 5 22:41:36 2002 From: bwarsaw@users.sourceforge.net (bwarsaw@users.sourceforge.net) Date: Tue, 05 Nov 2002 14:41:36 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.510,1.511 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv32234 Modified Files: NEWS Log Message: Add an entry for pdb's new `pp' command. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.510 retrieving revision 1.511 diff -C2 -d -r1.510 -r1.511 *** NEWS 5 Nov 2002 20:38:55 -0000 1.510 --- NEWS 5 Nov 2002 22:41:33 -0000 1.511 *************** *** 546,549 **** --- 546,552 ---- functions, and types for sequential (de)compression. + - New pdb command `pp' which is like `p' except that it pretty-prints + the value of its expression argument. + Tools/Demos ----------- From nnorwitz@users.sourceforge.net Tue Nov 5 22:41:40 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Tue, 05 Nov 2002 14:41:40 -0800 Subject: [Python-checkins] python/dist/src/Objects listobject.c,2.139,2.140 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv32254/Objects Modified Files: listobject.c Log Message: Use PyOS_snprintf() instead of sprintf and wrap the long line Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.139 retrieving revision 2.140 diff -C2 -d -r2.139 -r2.140 *** listobject.c 5 Nov 2002 17:38:05 -0000 2.139 --- listobject.c 5 Nov 2002 22:41:37 -0000 2.140 *************** *** 458,463 **** else { char msg[256]; ! sprintf(msg, "must assign sequence (not \"%.200s\") to slice", ! v->ob_type->tp_name); v_as_SF = PySequence_Fast(v, msg); if(v_as_SF == NULL) --- 458,465 ---- else { char msg[256]; ! PyOS_snprintf(msg, sizeof(msg), ! "must assign sequence" ! " (not \"%.200s\") to slice", ! v->ob_type->tp_name); v_as_SF = PySequence_Fast(v, msg); if(v_as_SF == NULL) From nnorwitz@users.sourceforge.net Tue Nov 5 22:46:42 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Tue, 05 Nov 2002 14:46:42 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib tkinter.tex,1.18,1.19 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv1889/Doc/lib Modified Files: tkinter.tex Log Message: Whoops, fix the typo correctly this time Index: tkinter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/tkinter.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tkinter.tex 5 Nov 2002 22:37:58 -0000 1.18 --- tkinter.tex 5 Nov 2002 22:46:39 -0000 1.19 *************** *** 895,903 **** \code{data} option (other options are available as well). ! The image object can then be used where ever an \code{image} option is supported by some widget (e.g. labels, buttons, menus). In these cases, Tk will not keep a reference to the image. When the last Python reference to the image object is deleted, the image data is deleted as ! well, and Tk will display an empty box where ever the image was used. \section{\module{Tix} --- --- 895,903 ---- \code{data} option (other options are available as well). ! The image object can then be used wherever an \code{image} option is supported by some widget (e.g. labels, buttons, menus). In these cases, Tk will not keep a reference to the image. When the last Python reference to the image object is deleted, the image data is deleted as ! well, and Tk will display an empty box wherever the image was used. \section{\module{Tix} --- From loewis@users.sourceforge.net Tue Nov 5 23:01:53 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Tue, 05 Nov 2002 15:01:53 -0800 Subject: [Python-checkins] python/dist/src/Tools/idle MANIFEST.in,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/idle In directory usw-pr-cvs1:/tmp/cvs-serv11423 Added Files: MANIFEST.in Log Message: Support sdist. --- NEW FILE: MANIFEST.in --- include *.txt include idle include MANIFEST.in include MANIFEST From nnorwitz@users.sourceforge.net Tue Nov 5 23:55:30 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Tue, 05 Nov 2002 15:55:30 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libbz2.tex,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv3259/lib Modified Files: libbz2.tex Log Message: Fix minor wording and 2 typos Index: libbz2.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbz2.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** libbz2.tex 5 Nov 2002 17:54:02 -0000 1.2 --- libbz2.tex 5 Nov 2002 23:55:27 -0000 1.3 *************** *** 24,28 **** \item \class{BZ2File} class offers an optimized line iteration using the readahead algorithm borrowed from file objects; ! \item \class{BZ2File} class developed inheriting builtin file type (\code{issubclass(BZ2File, file)} is \code{True}); \item Sequential (de)compression supported by \class{BZ2Compressor} and --- 24,28 ---- \item \class{BZ2File} class offers an optimized line iteration using the readahead algorithm borrowed from file objects; ! \item \class{BZ2File} class inherits from the builtin file type (\code{issubclass(BZ2File, file)} is \code{True}); \item Sequential (de)compression supported by \class{BZ2Compressor} and *************** *** 88,92 **** \begin{methoddesc}[BZ2File]{\_\_iter\_\_}{} ! Iterate trough the file lines. Iteration optimization is implemented using the same readahead algorithm available in \class{file} objects. \end{methoddesc} --- 88,92 ---- \begin{methoddesc}[BZ2File]{\_\_iter\_\_}{} ! Iterate through the file lines. Iteration optimization is implemented using the same readahead algorithm available in \class{file} objects. \end{methoddesc} *************** *** 162,166 **** \subsection{One-shot (de)compression} ! One-shot compression and decompression is provided trough the \function{compress()} and \function{decompress()} functions. --- 162,166 ---- \subsection{One-shot (de)compression} ! One-shot compression and decompression is provided through the \function{compress()} and \function{decompress()} functions. From goodger@users.sourceforge.net Wed Nov 6 05:38:58 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Tue, 05 Nov 2002 21:38:58 -0800 Subject: [Python-checkins] python/nondist/peps pep-0001.txt,1.38,1.39 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv5253 Modified Files: pep-0001.txt Log Message: updated Index: pep-0001.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0001.txt,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** pep-0001.txt 26 Aug 2002 16:19:25 -0000 1.38 --- pep-0001.txt 6 Nov 2002 05:38:56 -0000 1.39 *************** *** 43,48 **** PEP Work Flow ! The PEP editor, Barry Warsaw , assigns numbers ! for each PEP and changes its status. The PEP process begins with a new idea for Python. It is highly --- 43,49 ---- PEP Work Flow ! The PEP editors assign PEP numbers and change their status. The ! current PEP editors are David Goodger and Barry Warsaw. Please ! send all PEP-related email to . The PEP process begins with a new idea for Python. It is highly *************** *** 232,236 **** Author: * Discussions-To: ! Status: Type: * Content-Type: --- 233,238 ---- Author: * Discussions-To: ! Status: Type: * Content-Type: From goodger@users.sourceforge.net Wed Nov 6 05:40:41 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Tue, 05 Nov 2002 21:40:41 -0800 Subject: [Python-checkins] python/nondist/peps pep-0000.txt,1.217,1.218 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv5748 Modified Files: pep-0000.txt Log Message: Officially take office. Reject PEP 270. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.217 retrieving revision 1.218 diff -C2 -d -r1.217 -r1.218 *** pep-0000.txt 31 Oct 2002 01:35:08 -0000 1.217 --- pep-0000.txt 6 Nov 2002 05:40:39 -0000 1.218 *************** *** 3,7 **** Version: $Revision$ Last-Modified: $Date$ ! Author: Barry A. Warsaw Status: Active Type: Informational --- 3,8 ---- Version: $Revision$ Last-Modified: $Date$ ! Author: David Goodger , ! Barry A. Warsaw Status: Active Type: Informational *************** *** 29,33 **** Meta-PEPs (PEPs about PEPs or Process) ! I 0 Index of Python Enhancement Proposals Warsaw I 1 PEP Guidelines Warsaw, Hylton I 2 Procedure for Adding New Modules Faassen --- 30,34 ---- Meta-PEPs (PEPs about PEPs or Process) ! I 0 Index of Python Enhancement Proposals Goodger, Warsaw I 1 PEP Guidelines Warsaw, Hylton I 2 Procedure for Adding New Modules Faassen *************** *** 82,86 **** S 268 Extended HTTP functionality and WebDAV Stein S 269 Pgen Module for Python Riehl - S 270 uniq method for list objects Petrone S 273 Import Modules from Zip Archives Ahlstrom S 274 Dict Comprehensions Warsaw --- 83,86 ---- *************** *** 161,164 **** --- 161,165 ---- SR 259 Omit printing newline after newline van Rossum SD 262 Database of Installed Python Packages Kuchling + SR 270 uniq method for list objects Petrone SR 271 Prefixing sys.path by command line option Giacometti SD 288 Generators Attributes and Exceptions Hettinger *************** *** 262,266 **** S 268 Extended HTTP functionality and WebDAV Stein S 269 Pgen Module for Python Riehl ! S 270 uniq method for list objects Petrone SR 271 Prefixing sys.path by command line option Giacometti IF 272 API for Block Encryption Algorithms v1.0 Kuchling --- 263,267 ---- S 268 Extended HTTP functionality and WebDAV Stein S 269 Pgen Module for Python Riehl ! SR 270 uniq method for list objects Petrone SR 271 Prefixing sys.path by command line option Giacometti IF 272 API for Block Encryption Algorithms v1.0 Kuchling From goodger@users.sourceforge.net Wed Nov 6 05:41:34 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Tue, 05 Nov 2002 21:41:34 -0800 Subject: [Python-checkins] python/nondist/peps pep-0270.txt,1.1,1.2 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv5974 Modified Files: pep-0270.txt Log Message: Withdrawn by author; marked rejected. Index: pep-0270.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0270.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pep-0270.txt 7 Sep 2001 22:40:38 -0000 1.1 --- pep-0270.txt 6 Nov 2002 05:41:32 -0000 1.2 *************** *** 4,12 **** Last-Modified: $Date$ Author: jp@demonseed.net (Jason Petrone) ! Status: Draft Type: Standards Track Created: 21-Aug-2001 Python-Version: 2.2 Post-History: --- 4,29 ---- Last-Modified: $Date$ Author: jp@demonseed.net (Jason Petrone) ! Status: Rejected Type: Standards Track Created: 21-Aug-2001 Python-Version: 2.2 Post-History: + + + Notice + + This PEP is withdrawn by the author. He writes: + + Removing duplicate elements from a list is a common task, but + there are only two reasons I can see for making it a built-in. + The first is if it could be done much faster, which isn't the + case. The second is if it makes it significantly easier to + write code. The introduction of sets.py eliminates this + situation since creating a sequence without duplicates is just + a matter of choosing a different data structure: a set instead + of a list. + + As described in PEP 218, sets are being added to the standard + library for Python 2.3. From bckfnn@users.sourceforge.net Wed Nov 6 11:37:59 2002 From: bckfnn@users.sourceforge.net (bckfnn@users.sourceforge.net) Date: Wed, 06 Nov 2002 03:37:59 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_atexit.py,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv12033 Modified Files: test_atexit.py Log Message: Make the test pass for jython where there are no sys.executable. Index: test_atexit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_atexit.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_atexit.py 30 Jul 2002 23:26:01 -0000 1.8 --- test_atexit.py 6 Nov 2002 11:37:57 -0000 1.9 *************** *** 1,8 **** # Test the atexit module. ! from test.test_support import TESTFN, vereq import atexit from os import popen, unlink import sys input = """\ import atexit --- 1,12 ---- # Test the atexit module. ! from test.test_support import TESTFN, vereq, is_jython import atexit from os import popen, unlink import sys + executable = sys.executable + if is_jython: + executable = "jython" + input = """\ import atexit *************** *** 24,28 **** f.close() ! p = popen("%s %s" % (sys.executable, fname)) output = p.read() p.close() --- 28,32 ---- f.close() ! p = popen("%s %s" % (executable, fname)) output = p.read() p.close() *************** *** 52,56 **** f.close() ! p = popen("%s %s" % (sys.executable, fname)) output = p.read() p.close() --- 56,60 ---- f.close() ! p = popen("%s %s" % (executable, fname)) output = p.read() p.close() From bckfnn@users.sourceforge.net Wed Nov 6 11:41:51 2002 From: bckfnn@users.sourceforge.net (bckfnn@users.sourceforge.net) Date: Wed, 06 Nov 2002 03:41:51 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_atexit.py,1.3.24.3,1.3.24.4 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv14524 Modified Files: Tag: release22-maint test_atexit.py Log Message: Backport 1.8->1.9: Make the test pass for jython where there are no sys.executable. Index: test_atexit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_atexit.py,v retrieving revision 1.3.24.3 retrieving revision 1.3.24.4 diff -C2 -d -r1.3.24.3 -r1.3.24.4 *** test_atexit.py 10 Oct 2002 20:46:33 -0000 1.3.24.3 --- test_atexit.py 6 Nov 2002 11:41:48 -0000 1.3.24.4 *************** *** 1,8 **** # Test the atexit module. ! from test_support import TESTFN, vereq import atexit from os import popen, unlink import sys input = """\ import atexit --- 1,12 ---- # Test the atexit module. ! from test_support import TESTFN, vereq, is_jython import atexit from os import popen, unlink import sys + executable = sys.executable + if is_jython: + executable = "jython" + input = """\ import atexit *************** *** 24,28 **** f.close() ! p = popen("%s %s" % (sys.executable, fname)) output = p.read() p.close() --- 28,32 ---- f.close() ! p = popen("%s %s" % (executable, fname)) output = p.read() p.close() *************** *** 52,56 **** f.close() ! p = popen("%s %s" % (sys.executable, fname)) output = p.read() p.close() --- 56,60 ---- f.close() ! p = popen("%s %s" % (executable, fname)) output = p.read() p.close() From bckfnn@users.sourceforge.net Wed Nov 6 11:45:17 2002 From: bckfnn@users.sourceforge.net (bckfnn@users.sourceforge.net) Date: Wed, 06 Nov 2002 03:45:17 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_traceback.py,1.6,1.7 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv16162 Modified Files: test_traceback.py Log Message: Skip the test_nocaret test when running as jython. Jython happens to add a caret in this case too. Index: test_traceback.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_traceback.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_traceback.py 30 Jul 2002 23:27:12 -0000 1.6 --- test_traceback.py 6 Nov 2002 11:45:15 -0000 1.7 *************** *** 2,6 **** import unittest ! from test.test_support import run_unittest import traceback --- 2,6 ---- import unittest ! from test.test_support import run_unittest, is_jython import traceback *************** *** 33,36 **** --- 33,39 ---- def test_nocaret(self): + if is_jython: + # jython adds a caret in this case (why shouldn't it?) + return err = self.get_exception_format(self.syntax_error_without_caret, SyntaxError) From bckfnn@users.sourceforge.net Wed Nov 6 11:45:54 2002 From: bckfnn@users.sourceforge.net (bckfnn@users.sourceforge.net) Date: Wed, 06 Nov 2002 03:45:54 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_traceback.py,1.4,1.4.12.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv16836 Modified Files: Tag: release22-maint test_traceback.py Log Message: Backport 1.6->1.7: Skip the test_nocaret test when running as jython. Jython happens to add a caret in this case too. Index: test_traceback.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_traceback.py,v retrieving revision 1.4 retrieving revision 1.4.12.1 diff -C2 -d -r1.4 -r1.4.12.1 *** test_traceback.py 20 Sep 2001 21:33:42 -0000 1.4 --- test_traceback.py 6 Nov 2002 11:45:51 -0000 1.4.12.1 *************** *** 2,6 **** import unittest ! from test_support import run_unittest import traceback --- 2,6 ---- import unittest ! from test_support import run_unittest, is_jython import traceback *************** *** 33,36 **** --- 33,39 ---- def test_nocaret(self): + if is_jython: + # jython adds a caret in this case (why shouldn't it?) + return err = self.get_exception_format(self.syntax_error_without_caret, SyntaxError) From jackjansen@users.sourceforge.net Wed Nov 6 13:33:35 2002 From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Wed, 06 Nov 2002 05:33:35 -0800 Subject: [Python-checkins] python/dist/src configure,1.351,1.352 configure.in,1.362,1.363 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv28490 Modified Files: configure configure.in Log Message: Fix for bug 631247: configure should test the build directory for being on a case-insensitive filesystem, not the source directory. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.351 retrieving revision 1.352 diff -C2 -d -r1.351 -r1.352 *** configure 2 Nov 2002 16:58:03 -0000 1.351 --- configure 6 Nov 2002 13:33:30 -0000 1.352 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.361 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.362 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. *************** *** 3000,3004 **** echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6 ! if test -d "${srcdir}/python" then echo "$as_me:$LINENO: result: yes" >&5 --- 3000,3008 ---- echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6 ! if test ! -d CaseSensitiveTestDir; then ! mkdir CaseSensitiveTestDir ! fi ! ! if test -d casesensitivetestdir then echo "$as_me:$LINENO: result: yes" >&5 *************** *** 3010,3013 **** --- 3014,3018 ---- BUILDEXEEXT=$EXEEXT fi + rmdir CaseSensitiveTestDir case $MACHDEP in Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.362 retrieving revision 1.363 diff -C2 -d -r1.362 -r1.363 *** configure.in 2 Nov 2002 16:58:05 -0000 1.362 --- configure.in 6 Nov 2002 13:33:32 -0000 1.363 *************** *** 254,258 **** AC_SUBST(BUILDEXEEXT) AC_MSG_CHECKING(for case-insensitive build directory) ! if test -d "${srcdir}/python" then AC_MSG_RESULT(yes) --- 254,262 ---- AC_SUBST(BUILDEXEEXT) AC_MSG_CHECKING(for case-insensitive build directory) ! if test ! -d CaseSensitiveTestDir; then ! mkdir CaseSensitiveTestDir ! fi ! ! if test -d casesensitivetestdir then AC_MSG_RESULT(yes) *************** *** 262,265 **** --- 266,270 ---- BUILDEXEEXT=$EXEEXT fi + rmdir CaseSensitiveTestDir case $MACHDEP in From niemeyer@users.sourceforge.net Wed Nov 6 14:06:55 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Wed, 06 Nov 2002 06:06:55 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.511,1.512 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv9767/Misc Modified Files: NEWS Log Message: Fixed bug #470582, using a modified version of patch #527371, from Greg Chapman. * Modules/_sre.c (lastmark_restore): New function, implementing algorithm to restore a state to a given lastmark. In addition to the similar algorithm used in a few places of SRE_MATCH, restore lastindex when restoring lastmark. (SRE_MATCH): Replace lastmark inline restoring by lastmark_restore(), function. Also include it where missing. In SRE_OP_MARK, set lastindex only if i > lastmark. * Lib/test/re_tests.py * Lib/test/test_sre.py Included regression tests for the fixed bugs. * Misc/NEWS Mention fixes. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.511 retrieving revision 1.512 diff -C2 -d -r1.511 -r1.512 *** NEWS 5 Nov 2002 22:41:33 -0000 1.511 --- NEWS 6 Nov 2002 14:06:53 -0000 1.512 *************** *** 353,356 **** --- 353,363 ---- interpreter was compiled. + - Fixed bug #470582: sre module would return a tuple (None, 'a', 'ab') + when applying the regular expression '^((a)c)?(ab)$' on 'ab'. It now + returns (None, None, 'ab'), as expected. Also fixed handling of + lastindex/lastgroup match attributes in a similar cases. For example, + when running the expression r'(a)(b)?b' over 'ab', lastindex must be + 1, not 2. + Library ------- From niemeyer@users.sourceforge.net Wed Nov 6 14:06:55 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Wed, 06 Nov 2002 06:06:55 -0800 Subject: [Python-checkins] python/dist/src/Lib/test re_tests.py,1.30,1.31 test_sre.py,1.37,1.38 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv9767/Lib/test Modified Files: re_tests.py test_sre.py Log Message: Fixed bug #470582, using a modified version of patch #527371, from Greg Chapman. * Modules/_sre.c (lastmark_restore): New function, implementing algorithm to restore a state to a given lastmark. In addition to the similar algorithm used in a few places of SRE_MATCH, restore lastindex when restoring lastmark. (SRE_MATCH): Replace lastmark inline restoring by lastmark_restore(), function. Also include it where missing. In SRE_OP_MARK, set lastindex only if i > lastmark. * Lib/test/re_tests.py * Lib/test/test_sre.py Included regression tests for the fixed bugs. * Misc/NEWS Mention fixes. Index: re_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** re_tests.py 9 Dec 2001 16:13:15 -0000 1.30 --- re_tests.py 6 Nov 2002 14:06:52 -0000 1.31 *************** *** 647,650 **** --- 647,652 ---- # bug 490573: minimizing repeat problem (r'^a*?$', 'foo', FAIL), + # bug 470582: nested groups problem + (r'^((a)c)?(ab)$', 'ab', SUCCEED, 'g1+"-"+g2+"-"+g3', 'None-None-ab'), ] Index: test_sre.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sre.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** test_sre.py 30 Jul 2002 23:27:12 -0000 1.37 --- test_sre.py 6 Nov 2002 14:06:52 -0000 1.38 *************** *** 79,82 **** --- 79,87 ---- test(r"""sre.match(r'(a)|(b)', 'b').span(1)""", (-1, -1)) + # bug described in patch 527371 + test(r"""sre.match(r'(a)?a','a').lastindex""", None) + test(r"""sre.match(r'(a)(b)?b','ab').lastindex""", 1) + test(r"""sre.match(r'(?Pa)(?Pb)?b','ab').lastgroup""", 'a') + if verbose: print 'Running tests on sre.sub' From niemeyer@users.sourceforge.net Wed Nov 6 14:06:55 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Wed, 06 Nov 2002 06:06:55 -0800 Subject: [Python-checkins] python/dist/src/Modules _sre.c,2.83,2.84 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv9767/Modules Modified Files: _sre.c Log Message: Fixed bug #470582, using a modified version of patch #527371, from Greg Chapman. * Modules/_sre.c (lastmark_restore): New function, implementing algorithm to restore a state to a given lastmark. In addition to the similar algorithm used in a few places of SRE_MATCH, restore lastindex when restoring lastmark. (SRE_MATCH): Replace lastmark inline restoring by lastmark_restore(), function. Also include it where missing. In SRE_OP_MARK, set lastindex only if i > lastmark. * Lib/test/re_tests.py * Lib/test/test_sre.py Included regression tests for the fixed bugs. * Misc/NEWS Mention fixes. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.83 retrieving revision 2.84 diff -C2 -d -r2.83 -r2.84 *** _sre.c 31 Jul 2002 09:54:24 -0000 2.83 --- _sre.c 6 Nov 2002 14:06:53 -0000 2.84 *************** *** 354,357 **** --- 354,369 ---- } + void lastmark_restore(SRE_STATE *state, int lastmark) + { + if (state->lastmark > lastmark) { + memset( + state->mark + lastmark + 1, 0, + (state->lastmark - lastmark) * sizeof(void*) + ); + state->lastmark = lastmark; + state->lastindex = (lastmark == 0) ? -1 : (lastmark-1)/2+1; + } + } + /* generate 8-bit version */ *************** *** 861,868 **** TRACE(("|%p|%p|MARK %d\n", pattern, ptr, pattern[0])); i = pattern[0]; ! if (i & 1) ! state->lastindex = i/2 + 1; ! if (i > state->lastmark) state->lastmark = i; state->mark[i] = ptr; pattern++; --- 873,881 ---- TRACE(("|%p|%p|MARK %d\n", pattern, ptr, pattern[0])); i = pattern[0]; ! if (i > state->lastmark) { state->lastmark = i; + if (i & 1) + state->lastindex = i/2 + 1; + } state->mark[i] = ptr; pattern++; *************** *** 921,931 **** if (i) return i; ! if (state->lastmark > lastmark) { ! memset( ! state->mark + lastmark + 1, 0, ! (state->lastmark - lastmark) * sizeof(void*) ! ); ! state->lastmark = lastmark; ! } } return 0; --- 934,938 ---- if (i) return i; ! lastmark_restore(state, lastmark); } return 0; *************** *** 998,1008 **** ptr--; count--; ! if (state->lastmark > lastmark) { ! memset( ! state->mark + lastmark + 1, 0, ! (state->lastmark - lastmark) * sizeof(void*) ! ); ! state->lastmark = lastmark; ! } } } --- 1005,1009 ---- ptr--; count--; ! lastmark_restore(state, lastmark); } } *************** *** 1072,1078 **** return i; i = mark_restore(state, 0, lastmark); - state->lastmark = lastmark; if (i < 0) return i; rp->count = count - 1; state->ptr = ptr; --- 1073,1079 ---- return i; i = mark_restore(state, 0, lastmark); if (i < 0) return i; + lastmark_restore(state, lastmark); rp->count = count - 1; state->ptr = ptr; From akuchling@users.sourceforge.net Wed Nov 6 14:15:39 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Wed, 06 Nov 2002 06:15:39 -0800 Subject: [Python-checkins] python/dist/src/Modules _cursesmodule.c,2.69,2.70 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv13699 Modified Files: _cursesmodule.c Log Message: [Patch #633635 from David M. Cooke] Make keyname raise ValueError if passed -1, avoiding a segfault Make getkey() match the docs and raise an exception in nodelay mode The return type of getch() is int, not chtype Index: _cursesmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v retrieving revision 2.69 retrieving revision 2.70 diff -C2 -d -r2.69 -r2.70 *** _cursesmodule.c 30 Oct 2002 21:08:34 -0000 2.69 --- _cursesmodule.c 6 Nov 2002 14:15:36 -0000 2.70 *************** *** 733,737 **** { int x, y; ! chtype rtn; switch (PyTuple_Size(args)) { --- 733,737 ---- { int x, y; ! int rtn; switch (PyTuple_Size(args)) { *************** *** 759,763 **** { int x, y; ! chtype rtn; switch (PyTuple_Size(args)) { --- 759,763 ---- { int x, y; ! int rtn; switch (PyTuple_Size(args)) { *************** *** 778,782 **** return NULL; } ! if (rtn<=255) return Py_BuildValue("c", rtn); else --- 778,786 ---- return NULL; } ! if (rtn == ERR) { ! /* getch() returns ERR in nodelay mode */ ! PyErr_SetString(PyCursesError, "no input"); ! return NULL; ! } else if (rtn<=255) return Py_BuildValue("c", rtn); else *************** *** 1954,1957 **** --- 1958,1965 ---- if (!PyArg_ParseTuple(args,"i",&ch)) return NULL; + if (ch < 0) { + PyErr_SetString(PyExc_ValueError, "invalid key number"); + return NULL; + } knp = keyname(ch); *************** *** 2348,2352 **** { PyObject *temp; ! chtype ch; PyCursesInitialised --- 2356,2360 ---- { PyObject *temp; ! int ch; PyCursesInitialised *************** *** 2355,2361 **** if (PyInt_Check(temp)) ! ch = (chtype) PyInt_AsLong(temp); else if (PyString_Check(temp)) ! ch = (chtype) *PyString_AsString(temp); else { PyErr_SetString(PyExc_TypeError, "argument must be a ch or an int"); --- 2363,2369 ---- if (PyInt_Check(temp)) ! ch = (int) PyInt_AsLong(temp); else if (PyString_Check(temp)) ! ch = (int) *PyString_AsString(temp); else { PyErr_SetString(PyExc_TypeError, "argument must be a ch or an int"); From akuchling@users.sourceforge.net Wed Nov 6 14:17:24 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Wed, 06 Nov 2002 06:17:24 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libcurses.tex,1.39,1.40 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv14725 Modified Files: libcurses.tex Log Message: [Patch #633635 from David M. Cooke] Make docs accurate; getch() in nodelay mode returns -1 Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** libcurses.tex 27 Jun 2002 18:30:34 -0000 1.39 --- libcurses.tex 6 Nov 2002 14:17:21 -0000 1.40 *************** *** 702,706 **** Get a character. Note that the integer returned does \emph{not} have to be in \ASCII{} range: function keys, keypad keys and so on return numbers ! higher than 256. In no-delay mode, an exception is raised if there is no input. \end{methoddesc} --- 702,706 ---- Get a character. Note that the integer returned does \emph{not} have to be in \ASCII{} range: function keys, keypad keys and so on return numbers ! higher than 256. In no-delay mode, -1 is returned if there is no input. \end{methoddesc} From akuchling@users.sourceforge.net Wed Nov 6 14:34:53 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Wed, 06 Nov 2002 06:34:53 -0800 Subject: [Python-checkins] python/dist/src/Doc/inst inst.tex,1.42,1.43 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/inst In directory usw-pr-cvs1:/tmp/cvs-serv23969 Modified Files: inst.tex Log Message: Old change (probably suggested by Jason Tishler) The GNU/Windows compiler is now called MinGW Index: inst.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/inst/inst.tex,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** inst.tex 31 Oct 2002 20:46:20 -0000 1.42 --- inst.tex 6 Nov 2002 14:34:50 -0000 1.43 *************** *** 990,1005 **** ! \subsubsection{GNU C / Cygwin / MinGW32} This section describes the necessary steps to use Distutils with the ! GNU C/\Cpp{} compilers in their Cygwin and MinGW32 distributions.\footnote{Check \url{http://sources.redhat.com/cygwin/} and \url{http://www.mingw.org/} for more information} ! \XXX{For a Python which was built with Cygwin, all should work without ! any of these following steps.} ! ! These compilers also require some special libraries. This task is more complex than for Borland's \Cpp, because there is no program to convert the library. --- 990,1004 ---- ! \subsubsection{GNU C / Cygwin / MinGW} This section describes the necessary steps to use Distutils with the ! GNU C/\Cpp{} compilers in their Cygwin and MinGW distributions.\footnote{Check \url{http://sources.redhat.com/cygwin/} and \url{http://www.mingw.org/} for more information} + For a Python interpreter that was built with Cygwin, everything should + work without any of these following steps. ! These compilers require some special libraries. This task is more complex than for Borland's \Cpp, because there is no program to convert the library. *************** *** 1039,1043 **** and for Cygwin in no-cygwin mode\footnote{Then you have no \POSIX{} emulation available, but you also don't need ! \file{cygwin1.dll}.} or for MinGW32 type: \begin{verbatim} --- 1038,1042 ---- and for Cygwin in no-cygwin mode\footnote{Then you have no \POSIX{} emulation available, but you also don't need ! \file{cygwin1.dll}.} or for MinGW type: \begin{verbatim} *************** *** 1051,1060 **** \begin{seealso} \seetitle[http://www.zope.org/Members/als/tips/win32_mingw_modules] ! {Building Python modules on MS Windows platform with MinGW32} ! {Information about building the required libraries for the MinGW32 environment.} \seeurl{http://pyopengl.sourceforge.net/ftp/win32-stuff/} ! {Converted import libraries in Cygwin/MinGW32 and Borland format, and a script to create the registry entries needed for Distutils to locate the built Python.} --- 1050,1059 ---- \begin{seealso} \seetitle[http://www.zope.org/Members/als/tips/win32_mingw_modules] ! {Building Python modules on MS Windows platform with MinGW} ! {Information about building the required libraries for the MinGW environment.} \seeurl{http://pyopengl.sourceforge.net/ftp/win32-stuff/} ! {Converted import libraries in Cygwin/MinGW and Borland format, and a script to create the registry entries needed for Distutils to locate the built Python.} From akuchling@users.sourceforge.net Wed Nov 6 14:51:22 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Wed, 06 Nov 2002 06:51:22 -0800 Subject: [Python-checkins] python/dist/src/Lib ConfigParser.py,1.50,1.51 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv31881 Modified Files: ConfigParser.py Log Message: Fix docstring typos Index: ConfigParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** ConfigParser.py 25 Oct 2002 21:52:00 -0000 1.50 --- ConfigParser.py 6 Nov 2002 14:51:20 -0000 1.51 *************** *** 386,392 **** indicated by a name in square brackets (`[]'), plus key/value options lines, indicated by `name: value' format lines. ! Continuation are represented by an embedded newline then leading whitespace. Blank lines, lines beginning with a '#', ! and just about everything else is ignored. """ cursect = None # None, or a dictionary --- 386,392 ---- indicated by a name in square brackets (`[]'), plus key/value options lines, indicated by `name: value' format lines. ! Continuations are represented by an embedded newline then leading whitespace. Blank lines, lines beginning with a '#', ! and just about everything else are ignored. """ cursect = None # None, or a dictionary From mwh@users.sourceforge.net Wed Nov 6 15:17:34 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Wed, 06 Nov 2002 07:17:34 -0800 Subject: [Python-checkins] python/dist/src/Objects sliceobject.c,2.19,2.20 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv11986/Objects Modified Files: sliceobject.c Log Message: Handle really big steps in extended slices. Fixes a test failure on 64 bit platforms (I hope). Index: sliceobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -d -r2.19 -r2.20 *** sliceobject.c 5 Nov 2002 15:28:51 -0000 2.19 --- sliceobject.c 6 Nov 2002 15:17:31 -0000 2.20 *************** *** 122,130 **** } else { ! *step = PyInt_AsLong(r->step); ! if (*step == -1 && PyErr_Occurred()) { ! return -1; ! } ! else if (*step == 0) { PyErr_SetString(PyExc_ValueError, "slice step cannot be zero"); --- 122,127 ---- } else { ! if (!_PyEval_SliceIndex(r->step, step)) return -1; ! if (*step == 0) { PyErr_SetString(PyExc_ValueError, "slice step cannot be zero"); From mwh@users.sourceforge.net Wed Nov 6 15:17:34 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Wed, 06 Nov 2002 07:17:34 -0800 Subject: [Python-checkins] python/dist/src/Python ceval.c,2.338,2.339 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv11986/Python Modified Files: ceval.c Log Message: Handle really big steps in extended slices. Fixes a test failure on 64 bit platforms (I hope). Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.338 retrieving revision 2.339 diff -C2 -d -r2.338 -r2.339 *** ceval.c 3 Oct 2002 09:53:11 -0000 2.338 --- ceval.c 6 Nov 2002 15:17:32 -0000 2.339 *************** *** 3508,3512 **** x = INT_MAX; else if (x < -INT_MAX) ! x = 0; *pi = x; } --- 3508,3512 ---- x = INT_MAX; else if (x < -INT_MAX) ! x = -INT_MAX; *pi = x; } From akuchling@users.sourceforge.net Wed Nov 6 15:40:08 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Wed, 06 Nov 2002 07:40:08 -0800 Subject: [Python-checkins] python/dist/src/Lib urllib2.py,1.37,1.38 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv23650 Modified Files: urllib2.py Log Message: Fix NameError exception ('name' undefined) Index: urllib2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib2.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** urllib2.py 11 Oct 2002 17:27:55 -0000 1.37 --- urllib2.py 6 Nov 2002 15:40:05 -0000 1.38 *************** *** 772,775 **** --- 772,776 ---- h.putheader('Host', sel_host or host) for args in self.parent.addheaders: + name, value = args if name not in req.headers: h.putheader(*args) From doerwalter@users.sourceforge.net Wed Nov 6 16:15:18 2002 From: doerwalter@users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Wed, 06 Nov 2002 08:15:18 -0800 Subject: [Python-checkins] python/dist/src/Objects intobject.c,2.93,2.94 longobject.c,1.143,1.144 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv9395/Objects Modified Files: intobject.c longobject.c Log Message: Make int("...") return a long if an int would overflow. Also remove the 512 character limitation for int(u"...") and long(u"..."). This closes SF bug #629989. Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.93 retrieving revision 2.94 diff -C2 -d -r2.93 -r2.94 *** intobject.c 11 Sep 2002 19:00:52 -0000 2.93 --- intobject.c 6 Nov 2002 16:15:12 -0000 2.94 *************** *** 209,216 **** } else if (errno != 0) { ! PyOS_snprintf(buffer, sizeof(buffer), ! "int() literal too large: %.200s", s); ! PyErr_SetString(PyExc_ValueError, buffer); ! return NULL; } if (pend) --- 209,215 ---- } else if (errno != 0) { ! if (err_ovf("string/unicode conversion")) ! return NULL; ! return PyLong_FromString(s, pend, base); } if (pend) *************** *** 223,236 **** PyInt_FromUnicode(Py_UNICODE *s, int length, int base) { ! char buffer[256]; ! if (length >= sizeof(buffer)) { ! PyErr_SetString(PyExc_ValueError, ! "int() literal too large to convert"); return NULL; ! } ! if (PyUnicode_EncodeDecimal(s, length, buffer, NULL)) return NULL; ! return PyInt_FromString(buffer, NULL, base); } #endif --- 222,238 ---- PyInt_FromUnicode(Py_UNICODE *s, int length, int base) { ! PyObject *result; ! char *buffer = PyMem_MALLOC(length+1); ! if (buffer == NULL) return NULL; ! ! if (PyUnicode_EncodeDecimal(s, length, buffer, NULL)) { ! PyMem_FREE(buffer); return NULL; ! } ! result = PyInt_FromString(buffer, NULL, base); ! PyMem_FREE(buffer); ! return result; } #endif Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.143 retrieving revision 1.144 diff -C2 -d -r1.143 -r1.144 *** longobject.c 3 Sep 2002 20:10:45 -0000 1.143 --- longobject.c 6 Nov 2002 16:15:14 -0000 1.144 *************** *** 1124,1138 **** PyLong_FromUnicode(Py_UNICODE *u, int length, int base) { ! char buffer[256]; ! if (length >= sizeof(buffer)) { ! PyErr_SetString(PyExc_ValueError, ! "long() literal too large to convert"); ! return NULL; ! } ! if (PyUnicode_EncodeDecimal(u, length, buffer, NULL)) return NULL; ! return PyLong_FromString(buffer, NULL, base); } #endif --- 1124,1140 ---- PyLong_FromUnicode(Py_UNICODE *u, int length, int base) { ! PyObject *result; ! char *buffer = PyMem_MALLOC(length+1); ! if (buffer == NULL) return NULL; ! if (PyUnicode_EncodeDecimal(u, length, buffer, NULL)) { ! PyMem_FREE(buffer); ! return NULL; ! } ! result = PyLong_FromString(buffer, NULL, base); ! PyMem_FREE(buffer); ! return result; } #endif From doerwalter@users.sourceforge.net Wed Nov 6 16:15:44 2002 From: doerwalter@users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Wed, 06 Nov 2002 08:15:44 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_b1.py,1.55,1.56 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv9395/Lib/test Modified Files: test_b1.py Log Message: Make int("...") return a long if an int would overflow. Also remove the 512 character limitation for int(u"...") and long(u"..."). This closes SF bug #629989. Index: test_b1.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b1.py,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** test_b1.py 8 Oct 2002 21:01:07 -0000 1.55 --- test_b1.py 6 Nov 2002 16:15:10 -0000 1.56 *************** *** 436,443 **** try: int(s[1:]) ! except ValueError: ! pass ! else: ! raise TestFailed, "int(%s)" % `s[1:]` + " should raise ValueError" try: int(1e100) --- 436,441 ---- try: int(s[1:]) ! except: ! raise TestFailed, "int(%s)" % `s[1:]` + " should return long" try: int(1e100) *************** *** 469,475 **** else: raise TestFailed("int('53', 40) didn't raise ValueError") ! try: int('1' * 512) ! except ValueError: pass ! else: raise TestFailed("int('1' * 512) didn't raise ValueError") try: int(1, 12) --- 467,476 ---- else: raise TestFailed("int('53', 40) didn't raise ValueError") ! try: int('1' * 600) ! except: raise TestFailed("int('1' * 600) didn't return long") ! ! if have_unicode: ! try: int(unichr(0x661) * 600) ! except: raise TestFailed("int('\\u0661' * 600) didn't return long") try: int(1, 12) From doerwalter@users.sourceforge.net Wed Nov 6 16:53:46 2002 From: doerwalter@users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Wed, 06 Nov 2002 08:53:46 -0800 Subject: [Python-checkins] python/dist/src/Lib codecs.py,1.27,1.28 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv32434/Lib Modified Files: codecs.py Log Message: Add next() and __iter__() methods to StreamReader, StreamReaderWriter and StreamRecoder. This closes SF bug #634246. Index: codecs.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/codecs.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** codecs.py 2 Sep 2002 13:14:30 -0000 1.27 --- codecs.py 6 Nov 2002 16:53:44 -0000 1.28 *************** *** 300,303 **** --- 300,314 ---- pass + def next(self): + + """ Return the next decoded line from the input stream.""" + line = self.readline() + if line: + return line + raise StopIteration + + def __iter__(self): + return self + def __getattr__(self, name, getattr=getattr): *************** *** 352,355 **** --- 363,374 ---- return self.reader.readlines(sizehint) + def next(self): + + """ Return the next decoded line from the input stream.""" + return self.reader.next() + + def __iter__(self): + return self + def write(self, data): *************** *** 451,454 **** --- 470,481 ---- data, bytesencoded = self.encode(data, self.errors) return data.splitlines(1) + + def next(self): + + """ Return the next decoded line from the input stream.""" + return self.reader.next() + + def __iter__(self): + return self def write(self, data): From doerwalter@users.sourceforge.net Wed Nov 6 16:53:46 2002 From: doerwalter@users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Wed, 06 Nov 2002 08:53:46 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.512,1.513 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv32434/Misc Modified Files: NEWS Log Message: Add next() and __iter__() methods to StreamReader, StreamReaderWriter and StreamRecoder. This closes SF bug #634246. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.512 retrieving revision 1.513 diff -C2 -d -r1.512 -r1.513 *** NEWS 6 Nov 2002 14:06:53 -0000 1.512 --- NEWS 6 Nov 2002 16:53:44 -0000 1.513 *************** *** 363,366 **** --- 363,369 ---- ------- + - StreamReader, StreamReaderWriter and StreamRecoder in the codecs + modules are iterators now. + - gzip.py now handles files exceeding 2GB. Files over 4GB also work now (provided the OS supports it, and Python is configured with large From niemeyer@users.sourceforge.net Wed Nov 6 18:44:28 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Wed, 06 Nov 2002 10:44:28 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils/command bdist_rpm.py,1.33,1.34 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory usw-pr-cvs1:/tmp/cvs-serv20788/Lib/distutils/command Modified Files: bdist_rpm.py Log Message: Fixed bug "[#466200] ability to specify a 'verify' script". * Lib/distutils/command/bdist_rpm.py (bdist_rpm.initialize_options): Included verify_script attribute. (bdist_rpm.finalize_package_data): Ensure that verify_script is a filename. (bdist_rpm._make_spec_file): Included verify_script in script_options tuple. * Misc/NEWS Mention change. Index: bdist_rpm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist_rpm.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** bdist_rpm.py 4 Nov 2002 13:33:07 -0000 1.33 --- bdist_rpm.py 6 Nov 2002 18:44:26 -0000 1.34 *************** *** 130,133 **** --- 130,134 ---- self.install_script = None self.clean_script = None + self.verify_script = None self.pre_install = None self.post_install = None *************** *** 209,212 **** --- 210,214 ---- self.ensure_filename('install_script') self.ensure_filename('clean_script') + self.ensure_filename('verify_script') self.ensure_filename('pre_install') self.ensure_filename('post_install') *************** *** 425,428 **** --- 427,431 ---- "--record=INSTALLED_FILES") % self.python), ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"), + ('verifyscript', 'verify_script', None), ('pre', 'pre_install', None), ('post', 'post_install', None), From niemeyer@users.sourceforge.net Wed Nov 6 18:44:29 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Wed, 06 Nov 2002 10:44:29 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.513,1.514 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv20788/Misc Modified Files: NEWS Log Message: Fixed bug "[#466200] ability to specify a 'verify' script". * Lib/distutils/command/bdist_rpm.py (bdist_rpm.initialize_options): Included verify_script attribute. (bdist_rpm.finalize_package_data): Ensure that verify_script is a filename. (bdist_rpm._make_spec_file): Included verify_script in script_options tuple. * Misc/NEWS Mention change. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.513 retrieving revision 1.514 diff -C2 -d -r1.513 -r1.514 *** NEWS 6 Nov 2002 16:53:44 -0000 1.513 --- NEWS 6 Nov 2002 18:44:26 -0000 1.514 *************** *** 356,360 **** when applying the regular expression '^((a)c)?(ab)$' on 'ab'. It now returns (None, None, 'ab'), as expected. Also fixed handling of ! lastindex/lastgroup match attributes in a similar cases. For example, when running the expression r'(a)(b)?b' over 'ab', lastindex must be 1, not 2. --- 356,360 ---- when applying the regular expression '^((a)c)?(ab)$' on 'ab'. It now returns (None, None, 'ab'), as expected. Also fixed handling of ! lastindex/lastgroup match attributes in similar cases. For example, when running the expression r'(a)(b)?b' over 'ab', lastindex must be 1, not 2. *************** *** 558,561 **** --- 558,565 ---- - New pdb command `pp' which is like `p' except that it pretty-prints the value of its expression argument. + + - Now bdist_rpm distutils command understands a verify_script option in + the config file, including the contents of the referred filename in + the "%verifyscript" section of the rpm spec file. Tools/Demos From gvanrossum@users.sourceforge.net Wed Nov 6 19:00:34 2002 From: gvanrossum@users.sourceforge.net (gvanrossum@users.sourceforge.net) Date: Wed, 06 Nov 2002 11:00:34 -0800 Subject: [Python-checkins] python/dist/src/Tools/idle SearchDialogBase.py,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/idle In directory usw-pr-cvs1:/tmp/cvs-serv30676 Modified Files: SearchDialogBase.py Log Message: Use column= rather than col=; with Tk 8.4 col= no longer works. [SF patch 634250 -- that was an IDLEFORK patch.] Index: SearchDialogBase.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/idle/SearchDialogBase.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SearchDialogBase.py 11 Sep 2002 20:36:01 -0000 1.2 --- SearchDialogBase.py 6 Nov 2002 19:00:30 -0000 1.3 *************** *** 49,55 **** def make_entry(self, label, var): l = Label(self.top, text=label) ! l.grid(row=self.row, col=0, sticky="w") e = Entry(self.top, textvariable=var, exportselection=0) ! e.grid(row=self.row, col=1, sticky="we") self.row = self.row + 1 return e --- 49,55 ---- def make_entry(self, label, var): l = Label(self.top, text=label) ! l.grid(row=self.row, column=0, sticky="w") e = Entry(self.top, textvariable=var, exportselection=0) ! e.grid(row=self.row, column=1, sticky="we") self.row = self.row + 1 return e *************** *** 57,61 **** def make_frame(self): f = Frame(self.top) ! f.grid(row=self.row, col=0, columnspan=2, sticky="we") self.row = self.row + 1 return f --- 57,61 ---- def make_frame(self): f = Frame(self.top) ! f.grid(row=self.row, column=0, columnspan=2, sticky="we") self.row = self.row + 1 return f From loewis@users.sourceforge.net Wed Nov 6 21:59:35 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Wed, 06 Nov 2002 13:59:35 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.514,1.515 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv5208/Misc Modified Files: NEWS Log Message: Add --check-tkinter to setup.py. Install IDLE. Fixes #634078. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.514 retrieving revision 1.515 diff -C2 -d -r1.514 -r1.515 *** NEWS 6 Nov 2002 18:44:26 -0000 1.514 --- NEWS 6 Nov 2002 21:59:31 -0000 1.515 *************** *** 583,586 **** --- 583,588 ---- ----- + - On Unix, IDLE is now installed automatically. + - The fpectl module is not built by default; it's dangerous or useless except in the hands of experts. From loewis@users.sourceforge.net Wed Nov 6 21:59:35 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Wed, 06 Nov 2002 13:59:35 -0800 Subject: [Python-checkins] python/dist/src/Tools/idle setup.py,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/idle In directory usw-pr-cvs1:/tmp/cvs-serv5208/Tools/idle Modified Files: setup.py Log Message: Add --check-tkinter to setup.py. Install IDLE. Fixes #634078. Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/idle/setup.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** setup.py 8 Aug 2001 20:26:14 -0000 1.3 --- setup.py 6 Nov 2002 21:59:33 -0000 1.4 *************** *** 1,3 **** ! import os,glob from distutils.core import setup from distutils.command.build_py import build_py --- 1,3 ---- ! import os, glob, sys from distutils.core import setup from distutils.command.build_py import build_py *************** *** 5,8 **** --- 5,25 ---- import idlever + try: + pos = sys.argv.index("--check-tkinter") + except ValueError: + pass + else: + del sys.argv[pos] + try: + import _tkinter + except ImportError: + print >>sys.stderr, "Cannot install IDLE without _tkinter" + raise SystemExit + + try: + package_dir = os.path.join(os.environ["SRCDIR"], "Tools", "idle") + except KeyError: + package_dir = "." + # name of idle package idlelib = "idlelib" *************** *** 25,29 **** dir = os.path.dirname(outfile) self.mkpath(dir) ! self.copy_file(name, outfile, preserve_mode = 0) for name in Icons: outfile = self.get_plain_outfile(self.build_lib, --- 42,47 ---- dir = os.path.dirname(outfile) self.mkpath(dir) ! self.copy_file(os.path.join(package_dir, name), outfile, ! preserve_mode = 0) for name in Icons: outfile = self.get_plain_outfile(self.build_lib, *************** *** 36,40 **** def get_source_files(self): # returns the .py files, the .txt files, and the icons ! icons = [os.path.join("Icons",name) for name in Icons] return build_py.get_source_files(self)+txt_files+icons --- 54,59 ---- def get_source_files(self): # returns the .py files, the .txt files, and the icons ! icons = [os.path.join(package_dir, "Icons",name) for name in Icons] ! txts = [os.path.join(package_dir, name) for name in txt_files] return build_py.get_source_files(self)+txt_files+icons *************** *** 76,81 **** cmdclass = {'build_py':idle_build_py, 'install_lib':idle_install_lib}, ! package_dir = {idlelib:'.'}, packages = [idlelib], ! scripts = ['idle'] ) --- 95,100 ---- cmdclass = {'build_py':idle_build_py, 'install_lib':idle_install_lib}, ! package_dir = {idlelib: package_dir}, packages = [idlelib], ! scripts = [os.path.join(package_dir, 'idle')] ) From loewis@users.sourceforge.net Wed Nov 6 22:00:03 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Wed, 06 Nov 2002 14:00:03 -0800 Subject: [Python-checkins] python/dist/src Makefile.pre.in,1.100,1.101 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv5208 Modified Files: Makefile.pre.in Log Message: Add --check-tkinter to setup.py. Install IDLE. Fixes #634078. Index: Makefile.pre.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.pre.in,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** Makefile.pre.in 10 Oct 2002 15:04:04 -0000 1.100 --- Makefile.pre.in 6 Nov 2002 21:59:30 -0000 1.101 *************** *** 531,535 **** # Install everything ! install: altinstall bininstall maninstall # Install almost everything without disturbing previous versions --- 531,535 ---- # Install everything ! install: altinstall bininstall maninstall idleinstall # Install almost everything without disturbing previous versions *************** *** 826,829 **** --- 826,833 ---- $(MAKE) -f $(srcdir)/Mac/OSX/Makefile installunixtools \ srcdir=$(srcdir) builddir=. dstroot=$(PYTHONFRAMEWORKPREFIX)/../.. + + # This installs IDLE + idleinstall: + SRCDIR=$(srcdir) ./$(BUILDPYTHON) $(srcdir)/Tools/idle/setup.py install --check-tkinter # Build the toplevel Makefile From jackjansen@users.sourceforge.net Wed Nov 6 23:15:54 2002 From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Wed, 06 Nov 2002 15:15:54 -0800 Subject: [Python-checkins] python/dist/src/Mac/scripts buildappbundle.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/scripts In directory usw-pr-cvs1:/tmp/cvs-serv30371 Added Files: buildappbundle.py Log Message: Script to create .app bundles. Largely untested. --- NEW FILE: buildappbundle.py --- import sys import os import shutil import getopt def buildappbundle(executable, output=None, copyfunc=None, creator=None, plist=None, nib=None, resources=None): if not output: output = os.path.split(executable)[1] + '.app' if not copyfunc: copyfunc = shutil.copy2 if not creator: creator='????' if not resources: resources = [] if nib: resources = resources + [nib] # # Create the main directory structure # if not os.path.isdir(output): os.mkdir(output) contents = os.path.join(output, 'Contents') if not os.path.isdir(contents): os.mkdir(contents) macos = os.path.join(contents, 'MacOS') if not os.path.isdir(macos): os.mkdir(macos) # # Create the executable # shortname = os.path.split(executable)[1] execname = os.path.join(macos, shortname) try: os.remove(execname) except OSError: pass copyfunc(executable, execname) # # Create the PkgInfo file # pkginfo = os.path.join(contents, 'PkgInfo') open(pkginfo, 'wb').write('APPL'+creator) if plist: # A plist file is specified. Read it. plistdata = open(plist).read() else: # # If we have a main NIB we create the extra Cocoa specific info for the plist file # if not nib: nibname = "" else: nibname, ext = os.path.splitext(os.path.split(nib)[1]) if ext == '.lproj': # Special case: if the main nib is a .lproj we assum a directory # and use the first nib from there files = os.listdir(nib) for f in files: if f[-4:] == '.nib': nibname = os.path.split(f)[1][:-4] break else: nibname = "" if nibname: cocoainfo = """ NSMainNibFile %s NSPrincipalClass NSApplication""" % nibname else: cocoainfo = "" plistdata = \ """ CFBundleDevelopmentRegion English CFBundleExecutable %s CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType APPL CFBundleSignature %s CFBundleVersion 0.1 %s """ % (shortname, creator, cocoainfo) # # Next, we create the plist file # infoplist = os.path.join(contents, 'Info.plist') open(infoplist, 'w').write(plistdata) # # Finally, if there are nibs or other resources to copy we do so. # if resources: resdir = os.path.join(contents, 'Resources') for src in resources: dst = os.path.join(resdir, os.path.split(src)[1]) if os.path.isdir(src): shutil.copytree(src, dst) else: shutil.copy2(src, dst) def usage(): print "buildappbundle creates an application bundle" print "Usage:" print " buildappbundle [options] executable" print "Options:" print " --output o Output file; default executable with .app appended, short -o" print " --link Symlink the executable (default: copy), short -l" print " --plist file Plist file (default: generate one), short -p" print " --nib file Main nib file or lproj folder for Cocoa program, short -n" print " --resource r Extra resource file to be copied to Resources, short -r" print " --creator c 4-char creator code (default: ????), short -c" print " --help This message, short -?" sys.exit(1) def main(): output=None copyfunc=None creator=None plist=None nib=None resources=[] SHORTOPTS = "o:ln:r:p:c:?" LONGOPTS=("output=", "link", "nib=", "resource=", "plist=", "creator=", "help") try: options, args = getopt.getopt(sys.argv[1:], SHORTOPTS, LONGOPTS) except getopt.error: usage() if len(args) != 1: usage() for opt, arg in options: if opt in ('-o', '--output'): output = arg elif opt in ('-l', '--link'): copyfunc = os.symlink elif opt in ('-n', '--nib'): nib = arg elif opt in ('-r', '--resource'): resources.append(arg) elif opt in ('-c', '--creator'): creator = arg elif opt in ('-p', '--plist'): plist = arg elif opt in ('-?', '--help'): usage() buildappbundle(args[0], output=output, copyfunc=copyfunc, creator=creator, plist=plist, resources=resources) if __name__ == '__main__': main() From nnorwitz@users.sourceforge.net Thu Nov 7 00:22:56 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Wed, 06 Nov 2002 16:22:56 -0800 Subject: [Python-checkins] python/dist/src/Objects unicodeobject.c,2.124.6.17,2.124.6.18 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv14659/Objects Modified Files: Tag: release22-maint unicodeobject.c Log Message: Backport 2.173: Fix for bug #626172: crash using unicode latin1 single char Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.124.6.17 retrieving revision 2.124.6.18 diff -C2 -d -r2.124.6.17 -r2.124.6.18 *** unicodeobject.c 11 Oct 2002 00:47:20 -0000 2.124.6.17 --- unicodeobject.c 7 Nov 2002 00:22:53 -0000 2.124.6.18 *************** *** 3821,3828 **** } u = (PyUnicodeObject *)PyUnicode_FromObject(container); ! if (u == NULL) { ! Py_DECREF(v); goto onError; - } /* Check v in u */ --- 3821,3826 ---- } u = (PyUnicodeObject *)PyUnicode_FromObject(container); ! if (u == NULL) goto onError; /* Check v in u */ From nnorwitz@users.sourceforge.net Thu Nov 7 00:23:40 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Wed, 06 Nov 2002 16:23:40 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_unicode.py,1.47.6.7,1.47.6.8 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv15389/Lib/test Modified Files: Tag: release22-maint test_unicode.py Log Message: Backport 1.72: Fix for bug #626172: crash using unicode latin1 single char Index: test_unicode.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v retrieving revision 1.47.6.7 retrieving revision 1.47.6.8 diff -C2 -d -r1.47.6.7 -r1.47.6.8 *** test_unicode.py 7 Oct 2002 12:32:56 -0000 1.47.6.7 --- test_unicode.py 7 Nov 2002 00:23:38 -0000 1.47.6.8 *************** *** 416,419 **** --- 416,425 ---- verify(('a' in ('x',1,u'y')) == 0) verify(('a' in ('x',1,None)) == 0) + try: + u'\xe2' in 'g\xe2teau' + except UnicodeError: + pass + else: + print '*** contains operator does not propagate UnicodeErrors' print 'done.' From nnorwitz@users.sourceforge.net Thu Nov 7 00:28:57 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Wed, 06 Nov 2002 16:28:57 -0800 Subject: [Python-checkins] python/dist/src/Lib pydoc.py,1.56.8.6,1.56.8.7 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv19319/Lib Modified Files: Tag: release22-maint pydoc.py Log Message: Backport 1.72: SF bug 630824: pydoc Helper keywords missing 'yield' Wow, what a brittle subsystem! Fixed, maybe, provided Fred doesn't shuffle the docs around. Index: pydoc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v retrieving revision 1.56.8.6 retrieving revision 1.56.8.7 diff -C2 -d -r1.56.8.6 -r1.56.8.7 *** pydoc.py 7 Oct 2002 17:09:25 -0000 1.56.8.6 --- pydoc.py 7 Nov 2002 00:28:54 -0000 1.56.8.7 *************** *** 1405,1408 **** --- 1405,1409 ---- 'try': ('ref/try', 'EXCEPTIONS'), 'while': ('ref/while', 'break continue if TRUTHVALUE'), + 'yield': ('ref/yield', ''), } From niemeyer@users.sourceforge.net Thu Nov 7 03:28:58 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Wed, 06 Nov 2002 19:28:58 -0800 Subject: [Python-checkins] python/dist/src/Modules _sre.c,2.84,2.85 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv8064/Modules Modified Files: _sre.c Log Message: Fixed sre bug "[#581080] Provoking infinite scanner loops". This bug happened because: 1) the scanner_search and scanner_match methods were not checking the buffer limits before increasing the current pointer; and 2) SRE_SEARCH was using "if (ptr == end)" as a loop break, instead of "if (ptr >= end)". * Modules/_sre.c (SRE_SEARCH): Check for "ptr >= end" to break loops, so that we don't hang forever if a pointer passing the buffer limit is used. (scanner_search,scanner_match): Don't increment the current pointer if we're going to pass the buffer limit. * Misc/NEWS Mention the fix. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.84 retrieving revision 2.85 diff -C2 -d -r2.84 -r2.85 *** _sre.c 6 Nov 2002 14:06:53 -0000 2.84 --- _sre.c 7 Nov 2002 03:28:56 -0000 2.85 *************** *** 1238,1242 **** while (ptr < end && (SRE_CODE) ptr[0] != chr) ptr++; ! if (ptr == end) return 0; TRACE(("|%p|%p|SEARCH LITERAL\n", pattern, ptr)); --- 1238,1242 ---- while (ptr < end && (SRE_CODE) ptr[0] != chr) ptr++; ! if (ptr >= end) return 0; TRACE(("|%p|%p|SEARCH LITERAL\n", pattern, ptr)); *************** *** 1255,1259 **** while (ptr < end && !SRE_CHARSET(charset, ptr[0])) ptr++; ! if (ptr == end) return 0; TRACE(("|%p|%p|SEARCH CHARSET\n", pattern, ptr)); --- 1255,1259 ---- while (ptr < end && !SRE_CHARSET(charset, ptr[0])) ptr++; ! if (ptr >= end) return 0; TRACE(("|%p|%p|SEARCH CHARSET\n", pattern, ptr)); *************** *** 2897,2901 **** state, status); ! if (status == 0 || state->ptr == state->start) state->start = (void*) ((char*) state->ptr + state->charsize); else --- 2897,2902 ---- state, status); ! if ((status == 0 || state->ptr == state->start) && ! state->ptr < state->end) state->start = (void*) ((char*) state->ptr + state->charsize); else *************** *** 2928,2932 **** state, status); ! if (status == 0 || state->ptr == state->start) state->start = (void*) ((char*) state->ptr + state->charsize); else --- 2929,2934 ---- state, status); ! if ((status == 0 || state->ptr == state->start) && ! state->ptr < state->end) state->start = (void*) ((char*) state->ptr + state->charsize); else From niemeyer@users.sourceforge.net Thu Nov 7 03:28:58 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Wed, 06 Nov 2002 19:28:58 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.515,1.516 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv8064/Misc Modified Files: NEWS Log Message: Fixed sre bug "[#581080] Provoking infinite scanner loops". This bug happened because: 1) the scanner_search and scanner_match methods were not checking the buffer limits before increasing the current pointer; and 2) SRE_SEARCH was using "if (ptr == end)" as a loop break, instead of "if (ptr >= end)". * Modules/_sre.c (SRE_SEARCH): Check for "ptr >= end" to break loops, so that we don't hang forever if a pointer passing the buffer limit is used. (scanner_search,scanner_match): Don't increment the current pointer if we're going to pass the buffer limit. * Misc/NEWS Mention the fix. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.515 retrieving revision 1.516 diff -C2 -d -r1.515 -r1.516 *** NEWS 6 Nov 2002 21:59:31 -0000 1.515 --- NEWS 7 Nov 2002 03:28:55 -0000 1.516 *************** *** 360,363 **** --- 360,368 ---- 1, not 2. + - Fixed bug #581080: sre scanner was not checking the buffer limit + before increasing the current pointer. This was creating an infinite + loop in the search function, once the pointer exceeded the buffer + limit. + Library ------- From loewis@users.sourceforge.net Thu Nov 7 07:42:32 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Wed, 06 Nov 2002 23:42:32 -0800 Subject: [Python-checkins] python/dist/src configure,1.352,1.353 configure.in,1.363,1.364 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv4103 Modified Files: configure configure.in Log Message: Try linking the major/minor test program. Fixes #634444. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.352 retrieving revision 1.353 diff -C2 -d -r1.352 -r1.353 *** configure 6 Nov 2002 13:33:30 -0000 1.352 --- configure 7 Nov 2002 07:42:28 -0000 1.353 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.362 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.363 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. *************** *** 909,913 **** # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ! ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` --- 909,913 ---- # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ! ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` *************** *** 12833,12843 **** } _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 --- 12833,12843 ---- } _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 *************** *** 12862,12866 **** fi ! rm -f conftest.$ac_objext conftest.$ac_ext # On OSF/1 V5.1, getaddrinfo is available, but a define --- 12862,12866 ---- fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext # On OSF/1 V5.1, getaddrinfo is available, but a define *************** *** 17196,17200 **** # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ! ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` --- 17196,17200 ---- # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ! ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.363 retrieving revision 1.364 diff -C2 -d -r1.363 -r1.364 *** configure.in 6 Nov 2002 13:33:32 -0000 1.363 --- configure.in 7 Nov 2002 07:42:30 -0000 1.364 *************** *** 1754,1758 **** AC_MSG_CHECKING(for major, minor, and makedev) ! AC_TRY_COMPILE([ #if defined(MAJOR_IN_MKDEV) #include --- 1754,1758 ---- AC_MSG_CHECKING(for major, minor, and makedev) ! AC_TRY_LINK([ #if defined(MAJOR_IN_MKDEV) #include From gvanrossum@users.sourceforge.net Thu Nov 7 15:41:21 2002 From: gvanrossum@users.sourceforge.net (gvanrossum@users.sourceforge.net) Date: Thu, 07 Nov 2002 07:41:21 -0800 Subject: [Python-checkins] python/nondist/peps pep-0237.txt,1.15,1.16 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv7536 Modified Files: pep-0237.txt Log Message: Delete stage 2 (turn on warnings for long literals). This seems to have caused some concern on c.l.py. These weill be illegal in Python 3.0, but there's no need to warn about them earlier. Index: pep-0237.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0237.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** pep-0237.txt 12 Aug 2002 00:55:43 -0000 1.15 --- pep-0237.txt 7 Nov 2002 15:41:19 -0000 1.16 *************** *** 213,217 **** option, but it is off by default. ! B2. The warning for long literals is turned on by default. B3. The warnings about operations that give different results than --- 213,217 ---- option, but it is off by default. ! B2. (This stage is deleted.) B3. The warnings about operations that give different results than *************** *** 227,231 **** B1. Python 2.4. ! B2. Python 2.5. B3. The rest of the Python 2.x line. --- 227,231 ---- B1. Python 2.4. ! B2. (Not applicable.) B3. The rest of the Python 2.x line. From theller@users.sourceforge.net Thu Nov 7 16:01:06 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:01:06 -0800 Subject: [Python-checkins] python/dist/src/Modules posixmodule.c,2.270,2.271 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv19146 Modified Files: posixmodule.c Log Message: Enforce valid filemode. Fixes SF Bug #623464. Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.270 retrieving revision 2.271 diff -C2 -d -r2.270 -r2.271 *** posixmodule.c 2 Nov 2002 17:42:33 -0000 2.270 --- posixmodule.c 7 Nov 2002 16:00:59 -0000 2.271 *************** *** 5049,5052 **** --- 5049,5058 ---- return NULL; + if (mode[0] != 'r' && mode[0] != 'w' && mode[0] != 'a') { + PyErr_Format(PyExc_ValueError, + "invalid file mode '%s'", mode); + return NULL; + } + Py_BEGIN_ALLOW_THREADS fp = fdopen(fd, mode); From theller@python.net Thu Nov 7 16:08:53 2002 From: theller@python.net (Thomas Heller) Date: 07 Nov 2002 17:08:53 +0100 Subject: [Python-checkins] python/dist/src/Modules posixmodule.c,2.270,2.271 In-Reply-To: References: Message-ID: Forgot to say: bugfix candidate. > Update of /cvsroot/python/python/dist/src/Modules > In directory usw-pr-cvs1:/tmp/cvs-serv19146 > > Modified Files: > posixmodule.c > Log Message: > Enforce valid filemode. Fixes SF Bug #623464. > > > Index: posixmodule.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v > retrieving revision 2.270 > retrieving revision 2.271 > diff -C2 -d -r2.270 -r2.271 > *** posixmodule.c 2 Nov 2002 17:42:33 -0000 2.270 > --- posixmodule.c 7 Nov 2002 16:00:59 -0000 2.271 > *************** > *** 5049,5052 **** > --- 5049,5058 ---- > return NULL; > > + if (mode[0] != 'r' && mode[0] != 'w' && mode[0] != 'a') { > + PyErr_Format(PyExc_ValueError, > + "invalid file mode '%s'", mode); > + return NULL; > + } > + > Py_BEGIN_ALLOW_THREADS > fp = fdopen(fd, mode); > > > > _______________________________________________ > Python-checkins mailing list > Python-checkins@python.org > http://mail.python.org/mailman/listinfo/python-checkins From gvanrossum@users.sourceforge.net Thu Nov 7 16:20:40 2002 From: gvanrossum@users.sourceforge.net (gvanrossum@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:20:40 -0800 Subject: [Python-checkins] python/nondist/sandbox/datetime datetime.py,1.60,1.61 Message-ID: Update of /cvsroot/python/python/nondist/sandbox/datetime In directory usw-pr-cvs1:/tmp/cvs-serv30855 Modified Files: datetime.py Log Message: Get rid of __slots__; it doesn't help. Index: datetime.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/datetime/datetime.py,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** datetime.py 12 Sep 2002 22:15:25 -0000 1.60 --- datetime.py 7 Nov 2002 16:20:36 -0000 1.61 *************** *** 256,261 **** """ - __slots__ = [] - def timetuple(self): raise NotImplementedError --- 256,259 ---- From theller@users.sourceforge.net Thu Nov 7 16:24:00 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:24:00 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.516,1.517 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv939 Modified Files: NEWS Log Message: NEWS entry for the changed fdopen function. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.516 retrieving revision 1.517 diff -C2 -d -r1.516 -r1.517 *** NEWS 7 Nov 2002 03:28:55 -0000 1.516 --- NEWS 7 Nov 2002 16:23:55 -0000 1.517 *************** *** 365,368 **** --- 365,372 ---- limit. + - The os.fdopen function now enforces a file mode starting with the + letter 'r', 'w' or 'a', otherwise a ValueError is raised. This fixes + bug #623464. + Library ------- From theller@users.sourceforge.net Thu Nov 7 16:33:46 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:33:46 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex,1.100,1.101 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv6391 Modified Files: libos.tex Log Message: Document the changed fdopen behaviour. (Hope the markup is ok). Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** libos.tex 16 Oct 2002 18:27:38 -0000 1.100 --- libos.tex 7 Nov 2002 16:33:44 -0000 1.101 *************** *** 299,302 **** --- 299,306 ---- function. Availability: Macintosh, \UNIX, Windows. + + \versionchanged[When specified, the \var{mode} argument must now start + with one of the letters \code{'r'}, \code{'w'}, or \code{'a'}, + otherwise a \exception{ValueError} is raised. ]{2.3} \end{funcdesc} From theller@python.net Thu Nov 7 16:35:36 2002 From: theller@python.net (Thomas Heller) Date: 07 Nov 2002 17:35:36 +0100 Subject: [Python-checkins] python/dist/src/Modules posixmodule.c,2.270,2.271 In-Reply-To: References: Message-ID: <65v91go7.fsf@python.net> No, *not* a bugfix candidate, because it changes the behaviour. > Forgot to say: > > bugfix candidate. > > > Update of /cvsroot/python/python/dist/src/Modules > > In directory usw-pr-cvs1:/tmp/cvs-serv19146 > > > > Modified Files: > > posixmodule.c > > Log Message: > > Enforce valid filemode. Fixes SF Bug #623464. > > > > > > Index: posixmodule.c > > =================================================================== > > RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v > > retrieving revision 2.270 > > retrieving revision 2.271 > > diff -C2 -d -r2.270 -r2.271 > > *** posixmodule.c 2 Nov 2002 17:42:33 -0000 2.270 > > --- posixmodule.c 7 Nov 2002 16:00:59 -0000 2.271 > > *************** > > *** 5049,5052 **** > > --- 5049,5058 ---- > > return NULL; > > > > + if (mode[0] != 'r' && mode[0] != 'w' && mode[0] != 'a') { > > + PyErr_Format(PyExc_ValueError, > > + "invalid file mode '%s'", mode); > > + return NULL; > > + } > > + > > Py_BEGIN_ALLOW_THREADS > > fp = fdopen(fd, mode); > > > > > > > > _______________________________________________ > > Python-checkins mailing list > > Python-checkins@python.org > > http://mail.python.org/mailman/listinfo/python-checkins From theller@users.sourceforge.net Thu Nov 7 16:41:41 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:41:41 -0800 Subject: [Python-checkins] distutils/distutils core.py,1.52,1.53 Message-ID: Update of /cvsroot/python/distutils/distutils In directory usw-pr-cvs1:/tmp/cvs-serv11038 Modified Files: core.py Log Message: Fix a small bug when sys.argv[0] has an absolute path. See http://mail.python.org/pipermail/distutils-sig/2002-November/003039.html Index: core.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/core.py,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** core.py 4 Nov 2002 13:45:15 -0000 1.52 --- core.py 7 Nov 2002 16:41:38 -0000 1.53 *************** *** 88,92 **** if not attrs.has_key('script_name'): ! attrs['script_name'] = sys.argv[0] if not attrs.has_key('script_args'): attrs['script_args'] = sys.argv[1:] --- 88,92 ---- if not attrs.has_key('script_name'): ! attrs['script_name'] = os.path.basename(sys.argv[0]) if not attrs.has_key('script_args'): attrs['script_args'] = sys.argv[1:] From theller@users.sourceforge.net Thu Nov 7 16:46:23 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:46:23 -0800 Subject: [Python-checkins] distutils/misc install.c,1.21,1.22 wininst.exe,1.17,1.18 Message-ID: Update of /cvsroot/python/distutils/misc In directory usw-pr-cvs1:/tmp/cvs-serv13413/misc Modified Files: install.c wininst.exe Log Message: Use dynamic linking for the SHGetSpecialFolderPath function, it is not always available on Windows NT. When the function cannot be loaded, get_special_folder_path raises OSError, "function not available". Compiled the exe, and rebuilt bdist_wininst.py. Index: install.c =================================================================== RCS file: /cvsroot/python/distutils/misc/install.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** install.c 5 Nov 2002 10:02:03 -0000 1.21 --- install.c 7 Nov 2002 16:46:20 -0000 1.22 *************** *** 390,403 **** char lpszPath[MAX_PATH]; int i; if (!g_PyArg_ParseTuple(args, "s", &name)) return NULL; for (i = 0; i < DIM(csidl_names); ++i) { if (0 == strcmpi(csidl_names[i].name, name)) { int nFolder; nFolder = csidl_names[i].nFolder; ! if (SHGetSpecialFolderPath(NULL, lpszPath, nFolder, 0)) ! return g_Py_BuildValue("s", lpszPath); else { g_PyErr_Format(g_PyExc_OSError, "no such folder (%s)", name); --- 390,423 ---- char lpszPath[MAX_PATH]; int i; + static HRESULT (WINAPI *My_SHGetSpecialFolderPath)(HWND hwnd, + LPTSTR lpszPath, + int nFolder, + BOOL fCreate); + + if (!My_SHGetSpecialFolderPath) { + HINSTANCE hLib = LoadLibrary("shell32.dll"); + if (!hLib) { + g_PyErr_Format(g_PyExc_OSError, "function not available"); + return NULL; + } + My_SHGetSpecialFolderPath = (BOOL (WINAPI *)(HWND, LPTSTR, int, BOOL)) + GetProcAddress(hLib, + "SHGetSpecialFolderPathA"); + } if (!g_PyArg_ParseTuple(args, "s", &name)) return NULL; + if (!My_SHGetSpecialFolderPath) { + g_PyErr_Format(g_PyExc_OSError, "function not available"); + return NULL; + } + for (i = 0; i < DIM(csidl_names); ++i) { if (0 == strcmpi(csidl_names[i].name, name)) { int nFolder; nFolder = csidl_names[i].nFolder; ! if (My_SHGetSpecialFolderPath(NULL, lpszPath, nFolder, 0)) ! return g_Py_BuildValue("s", lpszPath); else { g_PyErr_Format(g_PyExc_OSError, "no such folder (%s)", name); *************** *** 1675,1679 **** int result; result = run_installscript(hPython, fname, 2, argv); ! if (result) { fprintf(stderr, "*** run_installscript: internal error 0x%X ***\n", result); } --- 1695,1699 ---- int result; result = run_installscript(hPython, fname, 2, argv); ! if (-1 == result) { fprintf(stderr, "*** run_installscript: internal error 0x%X ***\n", result); } Index: wininst.exe =================================================================== RCS file: /cvsroot/python/distutils/misc/wininst.exe,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 Binary files /tmp/cvsbJ0yLZ and /tmp/cvsihHZxR differ From theller@users.sourceforge.net Thu Nov 7 16:46:22 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:46:22 -0800 Subject: [Python-checkins] distutils/distutils/command bdist_wininst.py,1.39,1.40 Message-ID: Update of /cvsroot/python/distutils/distutils/command In directory usw-pr-cvs1:/tmp/cvs-serv13413/distutils/command Modified Files: bdist_wininst.py Log Message: Use dynamic linking for the SHGetSpecialFolderPath function, it is not always available on Windows NT. When the function cannot be loaded, get_special_folder_path raises OSError, "function not available". Compiled the exe, and rebuilt bdist_wininst.py. Index: bdist_wininst.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_wininst.py,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** bdist_wininst.py 5 Nov 2002 10:06:19 -0000 1.39 --- bdist_wininst.py 7 Nov 2002 16:46:19 -0000 1.40 *************** *** 266,274 **** TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ! ZGUuDQ0KJAAAAAAAAAAtOHsRaVkVQmlZFUJpWRVCEkUZQmpZFUIGRh9CYlkVQupFG0JrWRVCBkYR ! QmtZFUJpWRVCZlkVQmlZFELjWRVCC0YGQmRZFUJveh9Ca1kVQq5fE0JoWRVCUmljaGlZFUIAAAAA ! AAAAAAAAAAAAAAAAUEUAAEwBAwAvl8c9AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAALAAAMAGAQAA wAAAABABAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAEAAAQAAAAAAAACAAAAAAAQAAAQ ! AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAwEQEA5AEAAAAQAQAwAQAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVUFgwAAAAAACwAAAAEAAAAAAAAAAEAAAA --- 266,274 ---- TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCB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AAAA ! AAAAAAAAAAAAAAABAAkEAAAgAQAAQOEAABQBAAAAAAAAAAAAAAAAAAAAAAAAAAAAABASAQDQEQEA ! AAAAAAAAAAAAAAAAHRIBAOARAQAAAAAAAAAAAAAAAAAqEgEA6BEBAAAAAAAAAAAAAAAAADcSAQDw ! EQEAAAAAAAAAAAAAAAAAQRIBAPgRAQAAAAAAAAAAAAAAAABMEgEAABIBAAAAAAAAAAAAAAAAAFYS ! AQAIEgEAAAAAAAAAAAAAAAAAAAAAAAAAAABgEgEAbhIBAH4SAQAAAAAAjBIBAAAAAACaEgEAAAAA ! AKoSAQAAAAAAtBIBAAAAAAC6EgEAAAAAAMgSAQAAAAAAS0VSTkVMMzIuRExMAEFEVkFQSTMyLmRs ! bABDT01DVEwzMi5kbGwAR0RJMzIuZGxsAE1TVkNSVC5kbGwAb2xlMzIuZGxsAFVTRVIzMi5kbGwA ! AExvYWRMaWJyYXJ5QQAAR2V0UHJvY0FkZHJlc3MAAEV4aXRQcm9jZXNzAAAAUmVnQ2xvc2VLZXkA ! AABQcm9wZXJ0eVNoZWV0QQAAVGV4dE91dEEAAGZyZWUAAENvSW5pdGlhbGl6ZQAAR2V0REMAAAAA ! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA From theller@users.sourceforge.net Thu Nov 7 16:46:49 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:46:49 -0800 Subject: [Python-checkins] distutils/build - New directory Message-ID: Update of /cvsroot/python/distutils/build In directory usw-pr-cvs1:/tmp/cvs-serv13627/build Log Message: Directory /cvsroot/python/distutils/build added to the repository From theller@users.sourceforge.net Thu Nov 7 16:49:30 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:49:30 -0800 Subject: [Python-checkins] distutils .cvsignore,1.1,1.2 Message-ID: Update of /cvsroot/python/distutils In directory usw-pr-cvs1:/tmp/cvs-serv14953 Modified Files: .cvsignore Log Message: Ignore the dist and build directories. Index: .cvsignore =================================================================== RCS file: /cvsroot/python/distutils/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 13 May 2000 03:37:27 -0000 1.1 --- .cvsignore 7 Nov 2002 16:49:27 -0000 1.2 *************** *** 1,5 **** ! MANIFEST *.tar.gz *.zip ! *.rpm ! *.deb --- 1,7 ---- ! *.deb ! *.rpm *.tar.gz *.zip ! MANIFEST ! build ! dist From theller@users.sourceforge.net Thu Nov 7 16:51:39 2002 From: theller@users.sourceforge.net (theller@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:51:39 -0800 Subject: [Python-checkins] distutils/misc .cvsignore,1.1,1.2 Message-ID: Update of /cvsroot/python/distutils/misc In directory usw-pr-cvs1:/tmp/cvs-serv16093/misc Modified Files: .cvsignore Log Message: Ignore MSVC build by-products. Index: .cvsignore =================================================================== RCS file: /cvsroot/python/distutils/misc/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 15 Oct 2002 15:02:00 -0000 1.1 --- .cvsignore 7 Nov 2002 16:51:36 -0000 1.2 *************** *** 2,4 **** --- 2,5 ---- temp-release wininst.ncb + wininst.opt wininst.plg From rhettinger@users.sourceforge.net Thu Nov 7 16:55:56 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu, 07 Nov 2002 08:55:56 -0800 Subject: [Python-checkins] python/dist/src/Objects rangeobject.c,2.44,2.45 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv16919 Modified Files: rangeobject.c Log Message: Restore attribute access so that the following work again: dir(xrange(10)) xrange(10).__getitem__(4) Index: rangeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -d -r2.44 -r2.45 *** rangeobject.c 11 Sep 2002 15:55:48 -0000 2.44 --- rangeobject.c 7 Nov 2002 16:55:54 -0000 2.45 *************** *** 191,195 **** 0, /* tp_call */ 0, /* tp_str */ ! 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ --- 191,195 ---- 0, /* tp_call */ 0, /* tp_str */ ! PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ From fdrake@users.sourceforge.net Thu Nov 7 17:13:07 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu, 07 Nov 2002 09:13:07 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex,1.101,1.102 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv24815 Modified Files: libos.tex Log Message: Minor markup adjustments. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** libos.tex 7 Nov 2002 16:33:44 -0000 1.101 --- libos.tex 7 Nov 2002 17:13:03 -0000 1.102 *************** *** 301,306 **** \versionchanged[When specified, the \var{mode} argument must now start ! with one of the letters \code{'r'}, \code{'w'}, or \code{'a'}, ! otherwise a \exception{ValueError} is raised. ]{2.3} \end{funcdesc} --- 301,306 ---- \versionchanged[When specified, the \var{mode} argument must now start ! with one of the letters \character{r}, \character{w}, or \character{a}, ! otherwise a \exception{ValueError} is raised]{2.3} \end{funcdesc} From doerwalter@users.sourceforge.net Thu Nov 7 22:33:19 2002 From: doerwalter@users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Thu, 07 Nov 2002 14:33:19 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libcodecs.tex,1.13,1.14 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv26602/Doc/lib Modified Files: libcodecs.tex Log Message: Add documentation for the PEP 293 functionality: The errors attribute can be changed after the reader/writer is created. For encoding there are two additional errors values: "xmlcharrefreplace" and "backslashreplace". These values can be extended via register_error(). Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** libcodecs.tex 2 Nov 2002 13:32:07 -0000 1.13 --- libcodecs.tex 7 Nov 2002 22:33:17 -0000 1.14 *************** *** 228,239 **** \begin{tableii}{l|l}{code}{Value}{Meaning} ! \lineii{'strict'}{Raise \exception{ValueError} (or a subclass); this is the default.} \lineii{'ignore'}{Ignore the character and continue with the next.} \lineii{'replace'}{Replace with a suitable replacement character; Python will use the official U+FFFD REPLACEMENT ! CHARACTER for the built-in Unicode codecs.} \end{tableii} \subsubsection{Codec Objects \label{codec-objects}} --- 228,246 ---- \begin{tableii}{l|l}{code}{Value}{Meaning} ! \lineii{'strict'}{Raise \exception{UnicodeError} (or a subclass); this is the default.} \lineii{'ignore'}{Ignore the character and continue with the next.} \lineii{'replace'}{Replace with a suitable replacement character; Python will use the official U+FFFD REPLACEMENT ! CHARACTER for the built-in Unicode codecs on ! decoding and '?' on encoding.} ! \lineii{'xmlcharrefreplace'}{Replace with the appropriate XML ! character reference (only for encoding).} ! \lineii{'backslashreplace'}{Replace with backslashed escape sequences ! (only for encoding).} \end{tableii} + The set of allowed values can be extended via \method{register_error}. + \subsubsection{Codec Objects \label{codec-objects}} *************** *** 304,308 **** The \class{StreamWriter} may implement different error handling schemes by providing the \var{errors} keyword argument. These ! parameters are defined: \begin{itemize} --- 311,315 ---- The \class{StreamWriter} may implement different error handling schemes by providing the \var{errors} keyword argument. These ! parameters are predefined: \begin{itemize} *************** *** 311,315 **** --- 318,333 ---- \item \code{'ignore'} Ignore the character and continue with the next. \item \code{'replace'} Replace with a suitable replacement character + \item \code{'xmlcharrefreplace'} Replace with the appropriate XML + character reference + \item \code{'backslashreplace'} Replace with backslashed escape sequences. \end{itemize} + + The \var{errors} argument will be assigned to an attribute of the + same name. Assigning to this attribute makes it possible to switch + between different error handling strategies during the lifetime + of the \class{StreamWriter} object. + + The set of allowed values for the \var{errors} argument can + be extended with \function{register_error()}. \end{classdesc} *************** *** 361,364 **** --- 379,390 ---- \item \code{'replace'} Replace with a suitable replacement character. \end{itemize} + + The \var{errors} argument will be assigned to an attribute of the + same name. Assigning to this attribute makes it possible to switch + between different error handling strategies during the lifetime + of the \class{StreamReader} object. + + The set of allowed values for the \var{errors} argument can + be extended with \function{register_error()}. \end{classdesc} From jackjansen@users.sourceforge.net Thu Nov 7 23:07:06 2002 From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Thu, 07 Nov 2002 15:07:06 -0800 Subject: [Python-checkins] python/dist/src/Mac/OSX Makefile,1.27,1.28 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/OSX In directory usw-pr-cvs1:/tmp/cvs-serv8033/Mac/OSX Modified Files: Makefile Log Message: Got rid of the python.rsrc resource file. The error message strings and dialogs are now stored in Mac/Lib, and loaded on demand through macresource. Not only does this simplify a MacPython based on Apple's Python, but it also makes Mac error codes come out symbolically when running command line python (if you have Mac/Lib in your path). The resource files are copied from Mac/Resources. The old ones will disappear after the OS9 build procedure has been adjusted. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSX/Makefile,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Makefile 12 Sep 2002 22:19:23 -0000 1.27 --- Makefile 7 Nov 2002 23:07:04 -0000 1.28 *************** *** 38,43 **** CC=cc LD=cc - REZ=/Developer/Tools/Rez - DEREZ=/Developer/Tools/DeRez CPMAC=/Developer/Tools/CpMac --- 38,41 ---- *************** *** 45,51 **** APPTEMPLATE=$(srcdir)/Mac/OSXResources/app APPSUBDIRS=MacOS Resources Resources/English.lproj - RESOURCEDIR=$(srcdir)/Mac/Resources - RESOURCEFILE=python.rsrc - RFCONVERTER=$(srcdir)/Mac/Lib/applesingle.py CACHERSRC=$(srcdir)/Mac/scripts/cachersrc.py --- 43,46 ---- *************** *** 95,121 **** done $(INSTALL_PROGRAM) $(STRIPFLAG) $(PYTHON) $(APPINSTALLDIR)/Contents/MacOS/python - # Create a temporary version of the resources here - # Note that the resource files can either be real 2-fork resource files - # or AppleSingle encoded files. - @if test -s $(RESOURCEDIR)/dialogs.rsrc; then \ - echo $(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/dialogs.rsrc dialogs.rsrc ;\ - $(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/dialogs.rsrc dialogs.rsrc ; \ - echo $(DEREZ) -useDF -skip ckid dialogs.rsrc > dialogs.r ; \ - $(DEREZ) -useDF -skip ckid dialogs.rsrc > dialogs.r ; \ - else \ - echo $(DEREZ) -skip ckid $(RESOURCEDIR)/dialogs.rsrc > dialogs.r ; \ - $(DEREZ) -skip ckid $(RESOURCEDIR)/dialogs.rsrc > dialogs.r ; \ - fi - @if test -s $(RESOURCEDIR)/errors.rsrc; then \ - echo $(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/errors.rsrc errors.rsrc ;\ - $(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/errors.rsrc errors.rsrc ; \ - echo $(DEREZ) -useDF -skip ckid errors.rsrc > errors.r ; \ - $(DEREZ) -useDF -skip ckid errors.rsrc > errors.r ; \ - else \ - echo $(DEREZ) -skip ckid $(RESOURCEDIR)/errors.rsrc > errors.r ; \ - $(DEREZ) -skip ckid $(RESOURCEDIR)/errors.rsrc > errors.r ; \ - fi - $(REZ) -useDF -o $(RESOURCEFILE) dialogs.r errors.r - $(INSTALL_DATA) $(RESOURCEFILE) $(APPINSTALLDIR)/Contents/Resources/$(RESOURCEFILE) # Finally create the documentation symlink $(LN) -fsn ../../../../English.lproj/Documentation $(APPINSTALLDIR)/Contents/Resources/English.lproj/Documentation --- 90,93 ---- *************** *** 206,214 **** fi; \ done ! ## @for i in $(MACLIBSRC)/*.rsrc; \ ! ## do \ ! ## echo $(CPMAC) $$i $$b ; \ ! ## $(CPMAC) $$i $$b ; \ ! ## done @for d in $(MACLIBSUBDIRS); \ do \ --- 178,186 ---- fi; \ done ! @for i in $(MACLIBSRC)/*.rsrc; \ ! do \ ! echo $(CPMAC) $$i $(MACLIBDEST) ; \ ! $(CPMAC) $$i $(MACLIBDEST) ; \ ! done @for d in $(MACLIBSUBDIRS); \ do \ From jackjansen@users.sourceforge.net Thu Nov 7 23:07:08 2002 From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Thu, 07 Nov 2002 15:07:08 -0800 Subject: [Python-checkins] python/dist/src/Mac/Lib dialogs.rsrc,NONE,1.1 errors.rsrc,NONE,1.1 EasyDialogs.py,1.38,1.39 buildtools.py,1.18,1.19 macresource.py,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Lib In directory usw-pr-cvs1:/tmp/cvs-serv8033/Mac/Lib Modified Files: EasyDialogs.py buildtools.py macresource.py Added Files: dialogs.rsrc errors.rsrc Log Message: Got rid of the python.rsrc resource file. The error message strings and dialogs are now stored in Mac/Lib, and loaded on demand through macresource. Not only does this simplify a MacPython based on Apple's Python, but it also makes Mac error codes come out symbolically when running command line python (if you have Mac/Lib in your path). The resource files are copied from Mac/Resources. The old ones will disappear after the OS9 build procedure has been adjusted. --- NEW FILE: dialogs.rsrc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: errors.rsrc --- (This appears to be a binary file; contents omitted.) Index: EasyDialogs.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/EasyDialogs.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** EasyDialogs.py 2 Aug 2002 11:03:19 -0000 1.38 --- EasyDialogs.py 7 Nov 2002 23:07:04 -0000 1.39 *************** *** 28,31 **** --- 28,40 ---- from Carbon.ControlAccessor import * # Also import Controls constants import macfs + import macresource + + _initialized = 0 + + def _initialize(): + global _initialized + if _initialized: return + macresource.need("DLOG", 260, "dialogs.rsrc", __name__) + def cr2lf(text): *************** *** 48,52 **** The MESSAGE string can be at most 255 characters long. """ ! d = GetNewDialog(id, -1) if not d: --- 57,61 ---- The MESSAGE string can be at most 255 characters long. """ ! _initialize() d = GetNewDialog(id, -1) if not d: *************** *** 80,83 **** --- 89,93 ---- """ + _initialize() d = GetNewDialog(id, -1) if not d: *************** *** 120,123 **** --- 130,134 ---- can be at most 255 characters long. """ + _initialize() d = GetNewDialog(id, -1) if not d: *************** *** 162,165 **** --- 173,177 ---- """ + _initialize() d = GetNewDialog(id, -1) if not d: *************** *** 222,225 **** --- 234,238 ---- self.w = None self.d = None + _initialize() self.d = GetNewDialog(id, -1) self.w = self.d.GetDialogWindow() *************** *** 392,395 **** --- 405,409 ---- def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfolder=1, id=ARGV_ID): + _initialize() d = GetNewDialog(id, -1) if not d: Index: buildtools.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/buildtools.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** buildtools.py 29 Aug 2002 20:20:24 -0000 1.18 --- buildtools.py 7 Nov 2002 23:07:04 -0000 1.19 *************** *** 354,371 **** - if progress: - progress.label("Copy resources...") - progress.set(20) - resfilename = 'python.rsrc' # XXXX later: '%s.rsrc' % shortname - try: - output = Res.FSOpenResourceFile( - os.path.join(destname, 'Contents', 'Resources', resfilename), - u'', WRITE) - except MacOS.Error: - fsr, dummy = Res.FSCreateResourceFile( - os.path.join(destname, 'Contents', 'Resources'), - unicode(resfilename), '') - output = Res.FSOpenResourceFile(fsr, u'', WRITE) - # Copy the resources from the target specific resource template, if any typesfound, ownertype = [], None --- 354,357 ---- *************** *** 373,409 **** input = macresource.open_pathname(rsrcname) except (MacOS.Error, ValueError): - pass if progress: progress.inc(50) else: typesfound, ownertype = copyres(input, output, [], 0, progress) Res.CloseResFile(input) ! ! # Check which resource-types we should not copy from the template ! skiptypes = [] ! ## if 'vers' in typesfound: skiptypes.append('vers') ! ## if 'SIZE' in typesfound: skiptypes.append('SIZE') ! ## if 'BNDL' in typesfound: skiptypes = skiptypes + ['BNDL', 'FREF', 'icl4', ! ## 'icl8', 'ics4', 'ics8', 'ICN#', 'ics#'] ! ## if not copy_codefragment: ! ## skiptypes.append('cfrg') ! ## skipowner = (ownertype <> None) ! ! # Copy the resources from the template ! ! input = Res.FSOpenResourceFile( ! os.path.join(template, 'Contents', 'Resources', 'python.rsrc'), u'', READ) ! if progress: ! progress.label("Copy standard resources...") ! progress.inc(0) ! ## dummy, tmplowner = copyres(input, output, skiptypes, 1, progress) ! dummy, tmplowner = copyres(input, output, skiptypes, 1, None) ! ! Res.CloseResFile(input) ! ## if ownertype == None: ! ## raise BuildError, "No owner resource found in either resource file or template" ! # Make sure we're manipulating the output resource file now ! ! Res.CloseResFile(output) if code: --- 359,382 ---- input = macresource.open_pathname(rsrcname) except (MacOS.Error, ValueError): if progress: progress.inc(50) else: + if progress: + progress.label("Copy resources...") + progress.set(20) + resfilename = 'python.rsrc' # XXXX later: '%s.rsrc' % shortname + try: + output = Res.FSOpenResourceFile( + os.path.join(destname, 'Contents', 'Resources', resfilename), + u'', WRITE) + except MacOS.Error: + fsr, dummy = Res.FSCreateResourceFile( + os.path.join(destname, 'Contents', 'Resources'), + unicode(resfilename), '') + output = Res.FSOpenResourceFile(fsr, u'', WRITE) + typesfound, ownertype = copyres(input, output, [], 0, progress) Res.CloseResFile(input) ! Res.CloseResFile(output) if code: Index: macresource.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/macresource.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** macresource.py 9 Aug 2002 13:44:03 -0000 1.8 --- macresource.py 7 Nov 2002 23:07:05 -0000 1.9 *************** *** 96,99 **** --- 96,104 ---- return refno + def open_error_resource(): + """Open the resource file containing the error code to error message + mapping.""" + need('Estr', 1, filename="errors.rsrc", modname=__name__) + def _decode(pathname, verbose=0): # Decode an AppleSingle resource file, return the new pathname. From jackjansen@users.sourceforge.net Thu Nov 7 23:07:36 2002 From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Thu, 07 Nov 2002 15:07:36 -0800 Subject: [Python-checkins] python/dist/src/Python mactoolboxglue.c,1.11,1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv8033/Python Modified Files: mactoolboxglue.c Log Message: Got rid of the python.rsrc resource file. The error message strings and dialogs are now stored in Mac/Lib, and loaded on demand through macresource. Not only does this simplify a MacPython based on Apple's Python, but it also makes Mac error codes come out symbolically when running command line python (if you have Mac/Lib in your path). The resource files are copied from Mac/Resources. The old ones will disappear after the OS9 build procedure has been adjusted. Index: mactoolboxglue.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mactoolboxglue.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mactoolboxglue.c 19 Oct 2002 22:02:21 -0000 1.11 --- mactoolboxglue.c 7 Nov 2002 23:07:03 -0000 1.12 *************** *** 82,87 **** --- 82,121 ---- Handle h; char *str; + static int errors_loaded; h = GetResource('Estr', err); + if (!h && !errors_loaded) { + /* + ** Attempt to open the resource file containing the + ** Estr resources. We ignore all errors. We also try + ** this only once. + */ + errors_loaded = 1; + PyObject *m, *rv; + + m = PyImport_ImportModule("macresource"); + if (!m) { + if (Py_VerboseFlag) + PyErr_Print(); + PyErr_Clear(); + } else { + rv = PyObject_CallMethod(m, "open_error_resource", ""); + if (!rv) { + if (Py_VerboseFlag) + PyErr_Print(); + PyErr_Clear(); + } else { + Py_DECREF(rv); + /* And try again... */ + h = GetResource('Estr', err); + } + } + } + /* + ** Whether the code above succeeded or not, we won't try + ** again. + */ + errors_loaded = 1; + if ( h ) { HLock(h); From goodger@users.sourceforge.net Fri Nov 8 02:59:20 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Thu, 07 Nov 2002 18:59:20 -0800 Subject: [Python-checkins] python/nondist/peps pep-0301.txt,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv20259 Added Files: pep-0301.txt Log Message: Package Index and Metadata for Distutils, by Richard Jones --- NEW FILE: pep-0301.txt --- PEP: 301 Title: Package Index and Metadata for Distutils Version: $Revision: 1.1 $ Last-Modified: $Date: 2002/11/08 02:59:18 $ Author: Richard Jones Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 24-Oct-2002 Python-Version: 2.3 Post-History: Abstract ======== This PEP proposes several extensions to the Distutils packaging system [1]_. These enhancements include a central package index server, tools for submitting package information to the index and extensions to the package metadata to include Trove [2]_ information. This PEP does not address issues of package dependency. It also does not address storage and download of packages as described in PEP 243 [6]_. Nor is it proposing a local database of packages as described in PEP 262 [7]_. Existing package repositories such as the Vaults of Parnassus [3]_, CPAN [4]_ and PAUSE [5]_ will be investigated as prior art in this field. Rationale ========= Python programmers have long needed a simple method of discovering existing modules and systems available for their use. It is arguable that the existence of these systems for other languages have been a significant contribution to their popularity. The existence of the Catalog-SIG, and the many discussions there indicate that there is a large population of users who recognise this need. The introduction of the Distutils packaging system to Python simplified the process of distributing shareable code, and included mechanisms for the capture of package metadata, but did little with the metadata save ship it with the package. An interface to the index should be hosted in the python.org domain, giving it an air of legitimacy that existing catalog efforts do not have. The interface for submitting information to the catalog should be as simple as possible - hopefully just a one-line command for most users. Issues of package dependency are not addressed due to the complexity of such a system. The original proposal for such a system, PEP 262, was dropped as the author realised that platform packaging systems (RPM, apt, etc) already handle dependencies, installation and removal. Issues of package dissemination (storage on a central server) are not addressed because they require assumptions about availability of storage and bandwidth that I am not in a position to make. PEP 243, which is still being developed, is tackling these issues and many more. This proposal is considered compatible with, and adjunct to the proposal in PEP 243. Specification ============= The specification takes three parts, the `web interface`_, the `Distutils register command`_ and the `Distutils Trove categorisation`_. Web Interface ------------- A web interface is implemented over a simple store. The interface is available through the python.org domain, either directly or as packages.python.org. The store has columns for all metadata fields. The (name, version) double is used as a uniqueness key. Additional submissions for an existing (name, version) will result in an *update* operation. The web interface implements the following commands/interfaces: **index** Lists known packages, optionally filtered. An additional HTML page, **search**, presents a form to the user which is used to customise the index view. The index will include a browsing interface like that presented in the Trove interface design section 4.3. The results will be paginated, sorted alphabetically and only showing the most recent version. The most recent version information will be determined using the Distutils LooseVersion class. **display** Displays information about the package. All fields are displayed as plain text. The "url" (or "home_page") field is hyperlinked. **submit** Accepts a POST form submission of metadata about a package. The "name" and "version" fields are mandatory, as they uniquely identify an entry in the index. **Submit** will automatically determine whether to create a new entry or updating an existing entry. The metadata is checked for correctness where appropriate - specifically the Trove discriminators are compared with the allowed set. An update will update all information about the package based on the new submitted information. There will also be a submit/edit form that will allow manual submission and updating for those who do not use Distutils. **user** Registers a new user with the index. Requires username, password and email address. Passwords will be stored in the index database as SHA hashes. If the username already exists in the database: 1. If valid HTTP Basic authentication is provided, the password and email address are updated with the submission information, or 2. If no valid authentication is provided, the user is informed that the login is already taken. Registration will be a three-step process, involving: 1. User submission of details via the Distutils *register* command, 2. Index server sending email to the user's email address with a URL to visit to confirm registration with a random one-time key, and 3. User visits URL with the key and confirms registration. Several user Roles will exist: Admin Can assign Owner Role - they decide who may submit for a given package name. Owner Owns a package name, may assign Maintainer Role for that name Maintainer Can submit and update info for a particular package name Manual (through-the-web) user registration is also available through an HTML form. **roles** An interface for changing user Role assignments. **password_reset** Using a supplied email address as the key, this resets a user's password and sends an email with the new password to the user. The **submit** command will require HTTP Basic authentication, preferably over an HTTPS connection. Distutils *register* Command ---------------------------- An additional Distutils command, ``register``, is implemented which posts the package metadata to the central index. The *register* command automatically handles user registration; the user is presented with three options: 1. login and submit package information 2. register as a new packager 3. send password reminder email On systems where the ``$HOME`` environment variable is set, the user will be prompted at exit to save their username/password to a file in their ``$HOME`` directory in the file ``.pythonpackagerc``. Notification of changes to a package entry will be sent to all users who have submitted information about the package. That is, the original submitter and any subsequent updaters. The *register* command will include a ``--verify`` option which performs a test submission to the index without actually committing the data. The index will perform its submission verification checks as usual and report any errors it would have reported during a normal submission. This is useful for verifying correctness of Trove discriminators. The index server will return custom headers (inspired by PEP 243) which the *register* command will use to give feedback to the user: **X-Pypi-Status** Either "success" or "fail". **X-Pypi-Reason** A description of the reason for failure, or additional information in the case of a success. Distutils Trove Categorisation ------------------------------ The Trove concept of *discrimination* will be added to the metadata set available to package authors through the new attribute "classifiers". The list of classifiers will be available through the web, and added to the package like so:: setup( name = "roundup", version = __version__, classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Console (Text Based)', 'Environment :: Web Environment', 'Intended Audience :: End Users/Desktop', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Python License', 'Operating System :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'Programming Language :: Python', 'Topic :: Communications :: Email', 'Topic :: Office/Business', 'Topic :: Software Development :: Bug Tracking', ], url = 'http://sourceforge.net/projects/roundup/', ... ) It was decided that strings would be used for the classification entries due to the deep nesting that would be involved in a more formal Python structure. The original Trove specification that classification namespaces be separated by slashes ("/") unfortunately collides with many of the names having slashes in them (e.g. "OS/2"). The double-colon solution (" :: ") implemented by SourceForge and FreshMeat gets around this limitation. The list of classification values on the module index has been merged from FreshMeat and SourceForge (with their permission). This list will be made available through the web interface as a text list which may then be copied to the ``setup.py`` file. The *register* command's ``--verify`` option will also check classifiers values. Unfortunately, the addition of the "classifiers" property is not backwards-compatible. A setup.py file using it will not work under Python 2.1.3. It is hoped that a bugfix release of Python 2.2 will relax the argument checking of the setup() command to allow new keywords, even if they're not actually used. It is preferable that a warning be produced, rather than a show-stopping error. Reference Implementation ======================== Reference code is available from the SourceForge project: http://sourceforge.net/projects/pypi/ A demonstration will be available at: http://www.amk.ca/cgi-bin/pypi.cgi ===== =================================================== Done Feature ===== =================================================== Y Submission Y Index Y Display Y Search Y User registration Y User verification Y Password reset Y Admin interfaces for user/package maintenance N Trove ===== =================================================== In the two days of the 22nd and 23rd October 2002, after the first announcement to the Catalog-SIG (22nd) and Distutils-SIG (23rd), the initial prototype had 45 visitors (not including myself), two of whom used the *register* command to submit package information. References ========== .. [1] Distutils packaging system (http://www.python.org/doc/current/lib/module-distutils.html) .. [2] Trove (http://tuxedo.org/~esr/trove/) .. [3] Vaults of Parnassus (http://www.vex.net/parnassus/) .. [4] CPAN (http://www.cpan.org/) .. [5] PAUSE (http://pause.cpan.org/) .. [6] PEP 243, Module Repository Upload Mechanism (http://www.python.org/peps/pep-0243.html) .. [7] PEP 262, A Database of Installed Python Packages (http://www.python.org/peps/pep-0262.html) Copyright ========= This document has been placed in the public domain. Acknowledgements ================ Anthony Baxter and Martin v. Loewis for encouragement and feedback during initial drafting. A.M. Kuchling for support including hosting the second prototype. The many participants of the Distutils and Catalog SIGs for their ideas over the years. .. Local Variables: mode: indented-text indent-tabs-mode: nil sentence-end-double-space: t fill-column: 70 End: From goodger@users.sourceforge.net Fri Nov 8 03:02:28 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Thu, 07 Nov 2002 19:02:28 -0800 Subject: [Python-checkins] python/nondist/peps pep-0000.txt,1.218,1.219 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv21367 Modified Files: pep-0000.txt Log Message: Added PEP 301. Updated my email address. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.218 retrieving revision 1.219 diff -C2 -d -r1.218 -r1.219 *** pep-0000.txt 6 Nov 2002 05:40:39 -0000 1.218 --- pep-0000.txt 8 Nov 2002 03:02:26 -0000 1.219 *************** *** 102,105 **** --- 102,106 ---- S 298 The Locked Buffer Interface Heller S 299 Special __main__() function in modules Epler + S 301 Package Index and Metadata for Distutils Jones Finished PEPs (done, implemented in CVS) *************** *** 293,296 **** --- 294,298 ---- S 298 The Locked Buffer Interface Heller S 299 Special __main__() function in modules Epler + S 301 Package Index and Metadata for Distutils Jones SR 666 Reject Foolish Indentation Creighton *************** *** 328,332 **** Giacometti, Frédéric B. fred@arakne.com Gilbert, Scott xscottg at yahoo.com ! Goodger, David goodger@users.sourceforge.net Griffin, Grant g2@iowegian.com Heller, Thomas theller@python.net --- 330,334 ---- Giacometti, Frédéric B. fred@arakne.com Gilbert, Scott xscottg at yahoo.com ! Goodger, David goodger@python.org Griffin, Grant g2@iowegian.com Heller, Thomas theller@python.net *************** *** 337,340 **** --- 339,343 ---- Hylton, Jeremy jeremy@zope.com Jansen, Jack jack@cwi.nl + Jones, Richard rjones@ekit-inc.com Koltsov, Stepan yozh@mx1.ru Kuchling, A.M. amk@amk.ca From goodger@users.sourceforge.net Fri Nov 8 03:43:50 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Thu, 07 Nov 2002 19:43:50 -0800 Subject: [Python-checkins] python/nondist/peps pep-html-template,1.2,1.3 pep2html.py,1.46,1.47 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv26830 Modified Files: pep-html-template pep2html.py Log Message: Added "DO NOT EDIT" comment. Updated from Docutils. Index: pep-html-template =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-html-template,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pep-html-template 12 Sep 2002 02:30:51 -0000 1.2 --- pep-html-template 8 Nov 2002 03:43:48 -0000 1.3 *************** *** 1,8 **** ! ! PEP %(pep)s -- %(title)s %(stylesheet)s --- 1,13 ---- ! ! ! PEP %(pep)s -- %(title)s %(stylesheet)s Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** pep2html.py 19 Oct 2002 01:33:12 -0000 1.46 --- pep2html.py 8 Nov 2002 03:43:48 -0000 1.47 *************** *** 55,58 **** --- 55,64 ---- LOCALVARS = "Local Variables:" + COMMENT = """""" + # The generated HTML doesn't validate -- you cannot use
and

inside #
 tags.  But if I change that, the result doesn't look very nice...
***************
*** 133,136 ****
--- 139,143 ----
      infile = iter(input_lines)
      # convert plaintext pep to minimal XHTML markup
+     print >> outfile, COMMENT
      print >> outfile, DTD
      print >> outfile, ''
***************
*** 237,242 ****
              break
          if line[0].strip():
-             if line.strip() == LOCALVARS:
-                 break
              if not need_pre:
                  print >> outfile, '
' --- 244,247 ---- *************** *** 286,290 **** def fix_rst_pep(inpath, input_lines, outfile): ! from docutils import core, io output = core.publish_string( source=''.join(input_lines), --- 291,295 ---- def fix_rst_pep(inpath, input_lines, outfile): ! from docutils import core output = core.publish_string( source=''.join(input_lines), From goodger@users.sourceforge.net Fri Nov 8 03:44:22 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Thu, 07 Nov 2002 19:44:22 -0800 Subject: [Python-checkins] python/nondist/peps pep.css,1.3,1.4 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv26979 Modified Files: pep.css Log Message: Updated from Docutils. Index: pep.css =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep.css,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pep.css 18 Oct 2002 05:19:39 -0000 1.3 --- pep.css 8 Nov 2002 03:44:20 -0000 1.4 *************** *** 43,47 **** text-align: left } ! .rfc2822 th { text-align: right ; font-family: sans-serif ; --- 43,47 ---- text-align: left } ! .rfc2822 th.field-name { text-align: right ; font-family: sans-serif ; *************** *** 49,55 **** font-weight: bold ; margin-bottom: 0em } - - a.target { - color: blue } a.toc-backref { --- 49,52 ---- From goodger@users.sourceforge.net Fri Nov 8 04:26:59 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Thu, 07 Nov 2002 20:26:59 -0800 Subject: [Python-checkins] python/nondist/peps pep-0256.txt,1.4,1.5 pep-0258.txt,1.4,1.5 pep-0287.txt,1.4,1.5 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv4279 Modified Files: pep-0256.txt pep-0258.txt pep-0287.txt Log Message: Updated Index: pep-0256.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0256.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pep-0256.txt 30 Aug 2002 03:10:51 -0000 1.4 --- pep-0256.txt 8 Nov 2002 04:26:56 -0000 1.5 *************** *** 35,40 **** ! Roadmap to the Doctring PEPs ! ============================ There are many aspects to docstring processing. The "Docstring PEPs" --- 35,40 ---- ! Road Map to the Doctring PEPs ! ============================= There are many aspects to docstring processing. The "Docstring PEPs" *************** *** 185,189 **** - Docstring extraction rules. ! - Readers, which encapsulate the input context . - Parsers. --- 185,189 ---- - Docstring extraction rules. ! - Readers, which encapsulate the input context. - Parsers. Index: pep-0258.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0258.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pep-0258.txt 30 Aug 2002 03:10:51 -0000 1.4 --- pep-0258.txt 8 Nov 2002 04:26:56 -0000 1.5 *************** *** 21,25 **** and high-level concepts of a DPS are documented in PEP 256, "Docstring Processing System Framework" [#PEP-256]_. Also see PEP 256 for a ! "Roadmap to the Doctring PEPs". Docutils is being designed modularly so that any of its components can --- 21,25 ---- and high-level concepts of a DPS are documented in PEP 256, "Docstring Processing System Framework" [#PEP-256]_. Also see PEP 256 for a ! "Road Map to the Docstring PEPs". [...1130 lines suppressed...] ! Stylist transforms are specialized transforms specific to a Reader. ! The PySource Reader doesn't have to make any decisions as to style; it ! just produces a logically constructed document tree, parsed and ! linked, including custom node types. Stylist transforms understand ! the custom nodes created by the Reader and convert them into standard ! Docutils nodes. Multiple Stylist transforms may be implemented and one can be chosen --- 889,898 ---- ------------------ ! Stylist transforms are specialized transforms specific to the PySource ! Reader. The PySource Reader doesn't have to make any decisions as to ! style; it just produces a logically constructed document tree, parsed ! and linked, including custom node types. Stylist transforms ! understand the custom nodes created by the Reader and convert them ! into standard Docutils nodes. Multiple Stylist transforms may be implemented and one can be chosen Index: pep-0287.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0287.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pep-0287.txt 30 Aug 2002 03:10:51 -0000 1.4 --- pep-0287.txt 8 Nov 2002 04:26:56 -0000 1.5 *************** *** 26,30 **** Only the low-level syntax of docstrings is addressed here. This PEP is not concerned with docstring semantics or processing at all (see ! PEP 256 for a "Roadmap to the Doctring PEPs"). Nor is it an attempt to deprecate pure plaintext docstrings, which are always going to be legitimate. The reStructuredText markup is an alternative for those --- 26,30 ---- Only the low-level syntax of docstrings is addressed here. This PEP is not concerned with docstring semantics or processing at all (see ! PEP 256 for a "Road Map to the Doctring PEPs"). Nor is it an attempt to deprecate pure plaintext docstrings, which are always going to be legitimate. The reStructuredText markup is an alternative for those From goodger@users.sourceforge.net Fri Nov 8 04:48:18 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Thu, 07 Nov 2002 20:48:18 -0800 Subject: [Python-checkins] python/nondist/peps pep-0001.txt,1.39,1.40 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv8988 Modified Files: pep-0001.txt Log Message: corrected URL Index: pep-0001.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0001.txt,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** pep-0001.txt 6 Nov 2002 05:38:56 -0000 1.39 --- pep-0001.txt 8 Nov 2002 04:48:16 -0000 1.40 *************** *** 380,384 **** [8] PEP 12, Sample reStructuredText PEP Template, Goodger, Warsaw ! http://www.python.org/peps/pep-0009.html [9] http://docutils.sourceforge.net/ --- 380,384 ---- [8] PEP 12, Sample reStructuredText PEP Template, Goodger, Warsaw ! http://www.python.org/peps/pep-0012.html [9] http://docutils.sourceforge.net/ From rhettinger@users.sourceforge.net Fri Nov 8 05:03:23 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu, 07 Nov 2002 21:03:23 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_sets.py,1.13,1.14 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv11467/test Modified Files: test_sets.py Log Message: Closes SF bug #628246. The _update method detected mutable elements by trapping TypeErrors. Unfortunately, this masked useful TypeErrors raised by the iterable itself. For cases where it is possible for an iterable to raise a TypeError, the iterable is pre-converted to a list outside the try/except so that any TypeErrors propagate through. Index: test_sets.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sets.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** test_sets.py 25 Aug 2002 18:43:10 -0000 1.13 --- test_sets.py 8 Nov 2002 05:03:21 -0000 1.14 *************** *** 133,136 **** --- 133,160 ---- #============================================================================== + def baditer(): + raise TypeError + yield True + + def gooditer(): + yield True + + class TestExceptionPropagation(unittest.TestCase): + """SF 628246: Set constructor should not trap iterator TypeErrors""" + + def test_instanceWithException(self): + self.assertRaises(TypeError, Set, baditer()) + + def test_instancesWithoutException(self): + """All of these iterables should load without exception.""" + Set([1,2,3]) + Set((1,2,3)) + Set({'one':1, 'two':2, 'three':3}) + Set(xrange(3)) + Set('abc') + Set(gooditer()) + + #============================================================================== + class TestSetOfSets(unittest.TestCase): def test_constructor(self): *************** *** 605,608 **** --- 629,633 ---- suite = unittest.TestSuite() for klass in (TestSetOfSets, + TestExceptionPropagation, TestBasicOpsEmpty, TestBasicOpsSingleton, From rhettinger@users.sourceforge.net Fri Nov 8 05:03:23 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu, 07 Nov 2002 21:03:23 -0800 Subject: [Python-checkins] python/dist/src/Lib sets.py,1.31,1.32 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv11467 Modified Files: sets.py Log Message: Closes SF bug #628246. The _update method detected mutable elements by trapping TypeErrors. Unfortunately, this masked useful TypeErrors raised by the iterable itself. For cases where it is possible for an iterable to raise a TypeError, the iterable is pre-converted to a list outside the try/except so that any TypeErrors propagate through. Index: sets.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sets.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** sets.py 4 Oct 2002 20:01:48 -0000 1.31 --- sets.py 8 Nov 2002 05:03:21 -0000 1.32 *************** *** 321,324 **** --- 321,326 ---- value = True + if type(iterable) not in (list, tuple, dict, file, xrange, str): + iterable = list(iterable) it = iter(iterable) while True: From tim_one@users.sourceforge.net Fri Nov 8 05:26:54 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Thu, 07 Nov 2002 21:26:54 -0800 Subject: [Python-checkins] python/dist/src/Lib sets.py,1.32,1.33 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv17545/Lib Modified Files: sets.py Log Message: _update(): Commented the new obscurity. Materialized into a tuple instead of into a list for a bit of speed/space savings. Reopened the bug report too (628246), as I'm unclear on why we don't sort out the cause of the TypeError instead. Index: sets.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sets.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** sets.py 8 Nov 2002 05:03:21 -0000 1.32 --- sets.py 8 Nov 2002 05:26:52 -0000 1.33 *************** *** 320,327 **** return ! value = True if type(iterable) not in (list, tuple, dict, file, xrange, str): ! iterable = list(iterable) it = iter(iterable) while True: try: --- 320,333 ---- return ! # If the mere process of iterating may raise TypeError, materialize ! # the iterable into a tuple first. Then the TypeError will get ! # raised here and propagated back to the caller. Once we get into ! # the loop following, TypeError is assumed to mean that element ! # can't be used as a dict key. if type(iterable) not in (list, tuple, dict, file, xrange, str): ! iterable = tuple(iterable) ! it = iter(iterable) + value = True while True: try: From rhettinger@users.sourceforge.net Fri Nov 8 05:30:25 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu, 07 Nov 2002 21:30:25 -0800 Subject: [Python-checkins] python/dist/src/Doc/ref ref5.tex,1.66,1.67 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv18317 Modified Files: ref5.tex Log Message: Closes SF bug #634069 reporting the docs on the ** operator were out of date and did not reflect the current CPython implementation. Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** ref5.tex 11 Oct 2002 21:08:02 -0000 1.66 --- ref5.tex 8 Nov 2002 05:30:23 -0000 1.67 *************** *** 600,607 **** its left argument raised to the power of its right argument. The numeric arguments are first converted to a common type. The result ! type is that of the arguments after coercion; if the result is not ! expressible in that type (as in raising an integer to a negative ! power, or a negative floating point number to a broken power), a ! \exception{TypeError} exception is raised. --- 600,617 ---- its left argument raised to the power of its right argument. The numeric arguments are first converted to a common type. The result ! type is that of the arguments after coercion. ! ! With mixed operand types, the coercion rules for binary arithmetic ! operators apply. For int and long int operands, the result has the ! same type as the operands (after coercion) unless the second argument ! is negative; in that case, all arguments are converted to float and a ! float result is delivered. For example, \code{10**2} returns \code{100}, ! but \code{10**-2} returns \code{0.01}. (This last feature was added in ! Python 2.2. In Python 2.1 and before, if both arguments were of integer ! types and the second argument was negative, an exception was raised). ! ! Raising \code{0.0} to a negative power results in a ! \exception{ZeroDivisionError}. Raising a negative number to a ! fractional power results in a \exception{ValueError}. From rhettinger@users.sourceforge.net Fri Nov 8 05:48:13 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu, 07 Nov 2002 21:48:13 -0800 Subject: [Python-checkins] python/dist/src/Tools/idle README.txt,1.8,1.8.26.1 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/idle In directory usw-pr-cvs1:/tmp/cvs-serv22630 Modified Files: Tag: release22-maint README.txt Log Message: Clarify what it means to require Python 1.5.2. Index: README.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/idle/README.txt,v retrieving revision 1.8 retrieving revision 1.8.26.1 diff -C2 -d -r1.8 -r1.8.26.1 *** README.txt 15 Feb 2000 19:11:26 -0000 1.8 --- README.txt 8 Nov 2002 05:48:11 -0000 1.8.26.1 *************** *** 36,42 **** Try "./idle.py -h" to see other command line options. ! IDLE requires Python 1.5.2, so it is currently only usable with a ! Python 1.5.2 distribution. (An older version of IDLE is distributed ! with Python 1.5.2; you can drop this version on top of it.) COPYRIGHT --- 36,42 ---- Try "./idle.py -h" to see other command line options. ! IDLE requires Python 1.5.2 or late, so it is currently only usable with ! a Python 1.5.2 distribution or later. (An older version of IDLE is ! distributed with Python 1.5.2; you can drop this version on top of it.) COPYRIGHT From rhettinger@users.sourceforge.net Fri Nov 8 05:49:49 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Thu, 07 Nov 2002 21:49:49 -0800 Subject: [Python-checkins] python/dist/src/Tools/idle README.txt,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/idle In directory usw-pr-cvs1:/tmp/cvs-serv23020 Modified Files: README.txt Log Message: Clarify the meaning of "requires Python 1.5.2". Index: README.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/idle/README.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** README.txt 15 Feb 2000 19:11:26 -0000 1.8 --- README.txt 8 Nov 2002 05:49:47 -0000 1.9 *************** *** 36,42 **** Try "./idle.py -h" to see other command line options. ! IDLE requires Python 1.5.2, so it is currently only usable with a ! Python 1.5.2 distribution. (An older version of IDLE is distributed ! with Python 1.5.2; you can drop this version on top of it.) COPYRIGHT --- 36,43 ---- Try "./idle.py -h" to see other command line options. ! IDLE requires Python 1.5.2 or later, so it is currently only usable ! with a Python 1.5.2 (or later) distribution. (An older version of ! IDLE is distributed with Python 1.5.2; you can drop this version on ! top of it.) COPYRIGHT From fdrake@users.sourceforge.net Fri Nov 8 07:43:00 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu, 07 Nov 2002 23:43:00 -0800 Subject: [Python-checkins] python/dist/src/Tools/idle README.txt,1.8.26.1,1.8.26.2 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/idle In directory usw-pr-cvs1:/tmp/cvs-serv18453 Modified Files: Tag: release22-maint README.txt Log Message: Fix typo only present in the r22-maint branch. Index: README.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/idle/README.txt,v retrieving revision 1.8.26.1 retrieving revision 1.8.26.2 diff -C2 -d -r1.8.26.1 -r1.8.26.2 *** README.txt 8 Nov 2002 05:48:11 -0000 1.8.26.1 --- README.txt 8 Nov 2002 07:42:58 -0000 1.8.26.2 *************** *** 36,40 **** Try "./idle.py -h" to see other command line options. ! IDLE requires Python 1.5.2 or late, so it is currently only usable with a Python 1.5.2 distribution or later. (An older version of IDLE is distributed with Python 1.5.2; you can drop this version on top of it.) --- 36,40 ---- Try "./idle.py -h" to see other command line options. ! IDLE requires Python 1.5.2 or later, so it is currently only usable with a Python 1.5.2 distribution or later. (An older version of IDLE is distributed with Python 1.5.2; you can drop this version on top of it.) From walter@livinglogic.de Fri Nov 8 10:40:58 2002 From: walter@livinglogic.de (=?ISO-8859-15?Q?Walter_D=F6rwald?=) Date: Fri, 08 Nov 2002 11:40:58 +0100 Subject: [Python-checkins] python/nondist/peps pep-html-template,1.2,1.3 pep2html.py,1.46,1.47 In-Reply-To: References: Message-ID: <3DCB94BA.40904@livinglogic.de> goodger@users.sourceforge.net wrote: > [...] > Index: pep-html-template > =================================================================== > RCS file: /cvsroot/python/python/nondist/peps/pep-html-template,v > [...] > > ! > ! > > > > ! > PEP %(pep)s -- %(title)s > %(stylesheet)s If this file claims to be XML shouldn't it include proper empty tags? I.e. all empty tags should include a / at the end like this: Bye, Walter Dörwald From loewis@users.sourceforge.net Fri Nov 8 12:10:02 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Fri, 08 Nov 2002 04:10:02 -0800 Subject: [Python-checkins] python/dist/src/Lib string.py,1.65,1.66 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv13180/Lib Modified Files: string.py Log Message: Make strip behave as documented. Will backport to 2.2.3. Index: string.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/string.py,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** string.py 14 Oct 2002 20:03:40 -0000 1.65 --- string.py 8 Nov 2002 12:09:59 -0000 1.66 *************** *** 75,79 **** # Strip leading and trailing tabs and spaces ! def strip(s): """strip(s) -> string --- 75,79 ---- # Strip leading and trailing tabs and spaces ! def strip(s, chars=None): """strip(s) -> string *************** *** 82,86 **** """ ! return s.strip() # Strip leading tabs and spaces --- 82,86 ---- """ ! return s.strip(chars) # Strip leading tabs and spaces From loewis@users.sourceforge.net Fri Nov 8 12:11:05 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Fri, 08 Nov 2002 04:11:05 -0800 Subject: [Python-checkins] python/dist/src/Lib string.py,1.60.16.2,1.60.16.3 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv13570 Modified Files: Tag: release22-maint string.py Log Message: Make strip work as documented. Index: string.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/string.py,v retrieving revision 1.60.16.2 retrieving revision 1.60.16.3 diff -C2 -d -r1.60.16.2 -r1.60.16.3 *** string.py 22 Apr 2002 11:57:05 -0000 1.60.16.2 --- string.py 8 Nov 2002 12:11:03 -0000 1.60.16.3 *************** *** 74,78 **** # Strip leading and trailing tabs and spaces ! def strip(s): """strip(s) -> string --- 74,78 ---- # Strip leading and trailing tabs and spaces ! def strip(s, chars=None): """strip(s) -> string *************** *** 81,85 **** """ ! return s.strip() # Strip leading tabs and spaces --- 81,85 ---- """ ! return s.strip(chars) # Strip leading tabs and spaces From gvanrossum@users.sourceforge.net Fri Nov 8 12:15:46 2002 From: gvanrossum@users.sourceforge.net (gvanrossum@users.sourceforge.net) Date: Fri, 08 Nov 2002 04:15:46 -0800 Subject: [Python-checkins] python/nondist/peps pep-0256.txt,1.5,1.6 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv15841 Modified Files: pep-0256.txt Log Message: Typo. Index: pep-0256.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0256.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pep-0256.txt 8 Nov 2002 04:26:56 -0000 1.5 --- pep-0256.txt 8 Nov 2002 12:15:44 -0000 1.6 *************** *** 35,40 **** ! Road Map to the Doctring PEPs ! ============================= There are many aspects to docstring processing. The "Docstring PEPs" --- 35,40 ---- ! Road Map to the Docstring PEPs ! ============================== There are many aspects to docstring processing. The "Docstring PEPs" From mwh@users.sourceforge.net Fri Nov 8 12:53:12 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Fri, 08 Nov 2002 04:53:12 -0800 Subject: [Python-checkins] python/dist/src/Modules pyexpat.c,2.75,2.76 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv5667/Modules Modified Files: pyexpat.c Log Message: Assorted patches from Armin Rigo: [ 617309 ] getframe hook (Psyco #1) [ 617311 ] Tiny profiling info (Psyco #2) [ 617312 ] debugger-controlled jumps (Psyco #3) These are forward ports from 2.2.2. Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.75 retrieving revision 2.76 diff -C2 -d -r2.75 -r2.76 *** pyexpat.c 24 Sep 2002 16:24:54 -0000 2.75 --- pyexpat.c 8 Nov 2002 12:53:10 -0000 2.76 *************** *** 305,309 **** tstate, /*back*/ c, /*code*/ ! tstate->frame->f_globals, /*globals*/ NULL /*locals*/ ); --- 305,309 ---- tstate, /*back*/ c, /*code*/ ! PyEval_GetGlobals(), /*globals*/ NULL /*locals*/ ); From mwh@users.sourceforge.net Fri Nov 8 12:53:12 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Fri, 08 Nov 2002 04:53:12 -0800 Subject: [Python-checkins] python/dist/src/Include pystate.h,2.20,2.21 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory usw-pr-cvs1:/tmp/cvs-serv5667/Include Modified Files: pystate.h Log Message: Assorted patches from Armin Rigo: [ 617309 ] getframe hook (Psyco #1) [ 617311 ] Tiny profiling info (Psyco #2) [ 617312 ] debugger-controlled jumps (Psyco #3) These are forward ports from 2.2.2. Index: pystate.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pystate.h,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -d -r2.20 -r2.21 *** pystate.h 3 Sep 2002 20:10:44 -0000 2.20 --- pystate.h 8 Nov 2002 12:53:10 -0000 2.21 *************** *** 68,71 **** --- 68,73 ---- PyObject *dict; + int tick_counter; + /* XXX signal handlers should also be here */ *************** *** 105,108 **** --- 107,113 ---- PyAPI_FUNC(PyThreadState *) PyInterpreterState_ThreadHead(PyInterpreterState *); PyAPI_FUNC(PyThreadState *) PyThreadState_Next(PyThreadState *); + + /* hook for PyEval_GetFrame(), requested for Psyco */ + PyAPI_DATA(unaryfunc) _PyThreadState_GetFrame; #ifdef __cplusplus From mwh@users.sourceforge.net Fri Nov 8 12:53:13 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Fri, 08 Nov 2002 04:53:13 -0800 Subject: [Python-checkins] python/dist/src/Python ceval.c,2.339,2.340 pystate.c,2.21,2.22 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv5667/Python Modified Files: ceval.c pystate.c Log Message: Assorted patches from Armin Rigo: [ 617309 ] getframe hook (Psyco #1) [ 617311 ] Tiny profiling info (Psyco #2) [ 617312 ] debugger-controlled jumps (Psyco #3) These are forward ports from 2.2.2. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.339 retrieving revision 2.340 diff -C2 -d -r2.339 -r2.340 *** ceval.c 6 Nov 2002 15:17:32 -0000 2.339 --- ceval.c 8 Nov 2002 12:53:10 -0000 2.340 *************** *** 52,56 **** PyFrameObject *, int); static void call_exc_trace(Py_tracefunc, PyObject *, PyFrameObject *); ! static void maybe_call_line_trace(int, Py_tracefunc, PyObject *, PyFrameObject *, int *, int *); --- 52,56 ---- PyFrameObject *, int); static void call_exc_trace(Py_tracefunc, PyObject *, PyFrameObject *); ! static void maybe_call_line_trace(Py_tracefunc, PyObject *, PyFrameObject *, int *, int *); *************** *** 600,621 **** tstate->frame = f; - co = f->f_code; - names = co->co_names; - consts = co->co_consts; - fastlocals = f->f_localsplus; - freevars = f->f_localsplus + f->f_nlocals; - _PyCode_GETCODEPTR(co, &first_instr); - /* An explanation is in order for the next line. - - f->f_lasti now refers to the index of the last instruction - executed. You might think this was obvious from the name, but - this wasn't always true before 2.3! PyFrame_New now sets - f->f_lasti to -1 (i.e. the index *before* the first instruction) - and YIELD_VALUE doesn't fiddle with f_lasti any more. So this - does work. Promise. */ - next_instr = first_instr + f->f_lasti + 1; - stack_pointer = f->f_stacktop; - assert(stack_pointer != NULL); - f->f_stacktop = NULL; /* remains NULL unless yield suspends frame */ if (tstate->use_tracing) { --- 600,603 ---- *************** *** 656,659 **** --- 638,660 ---- } + co = f->f_code; + names = co->co_names; + consts = co->co_consts; + fastlocals = f->f_localsplus; + freevars = f->f_localsplus + f->f_nlocals; + _PyCode_GETCODEPTR(co, &first_instr); + /* An explanation is in order for the next line. + + f->f_lasti now refers to the index of the last instruction + executed. You might think this was obvious from the name, but + this wasn't always true before 2.3! PyFrame_New now sets + f->f_lasti to -1 (i.e. the index *before* the first instruction) + and YIELD_VALUE doesn't fiddle with f_lasti any more. So this + does work. Promise. */ + next_instr = first_instr + f->f_lasti + 1; + stack_pointer = f->f_stacktop; + assert(stack_pointer != NULL); + f->f_stacktop = NULL; /* remains NULL unless yield suspends frame */ + #ifdef LLTRACE lltrace = PyDict_GetItemString(f->f_globals,"__lltrace__") != NULL; *************** *** 682,685 **** --- 683,687 ---- if (--_Py_Ticker < 0) { _Py_Ticker = _Py_CheckInterval; + tstate->tick_counter++; if (things_to_do) { if (Py_MakePendingCalls() < 0) { *************** *** 717,724 **** fast_next_opcode: - /* Extract opcode and argument */ - f->f_lasti = INSTR_OFFSET(); opcode = NEXTOP(); if (HAS_ARG(opcode)) --- 719,742 ---- fast_next_opcode: f->f_lasti = INSTR_OFFSET(); + /* line-by-line tracing support */ + + if (tstate->c_tracefunc != NULL && !tstate->tracing) { + /* see maybe_call_line_trace + for expository comments */ + f->f_stacktop = stack_pointer; + maybe_call_line_trace(tstate->c_tracefunc, + tstate->c_traceobj, + f, &instr_lb, &instr_ub); + /* Reload possibly changed frame fields */ + JUMPTO(f->f_lasti); + stack_pointer = f->f_stacktop; + assert(stack_pointer != NULL); + f->f_stacktop = NULL; + } + + /* Extract opcode and argument */ + opcode = NEXTOP(); if (HAS_ARG(opcode)) *************** *** 748,762 **** #endif - /* line-by-line tracing support */ - - if (tstate->c_tracefunc != NULL && !tstate->tracing) { - /* see maybe_call_line_trace - for expository comments */ - maybe_call_line_trace(opcode, - tstate->c_tracefunc, - tstate->c_traceobj, - f, &instr_lb, &instr_ub); - } - /* Main switch on opcode */ --- 766,769 ---- *************** *** 2867,2871 **** static void ! maybe_call_line_trace(int opcode, Py_tracefunc func, PyObject *obj, PyFrameObject *frame, int *instr_lb, int *instr_ub) { --- 2874,2878 ---- static void ! maybe_call_line_trace(Py_tracefunc func, PyObject *obj, PyFrameObject *frame, int *instr_lb, int *instr_ub) { *************** *** 3026,3033 **** PyEval_GetBuiltins(void) { ! PyThreadState *tstate = PyThreadState_Get(); ! PyFrameObject *current_frame = tstate->frame; if (current_frame == NULL) ! return tstate->interp->builtins; else return current_frame->f_builtins; --- 3033,3039 ---- PyEval_GetBuiltins(void) { ! PyFrameObject *current_frame = (PyFrameObject *)PyEval_GetFrame(); if (current_frame == NULL) ! return PyThreadState_Get()->interp->builtins; else return current_frame->f_builtins; *************** *** 3037,3041 **** PyEval_GetLocals(void) { ! PyFrameObject *current_frame = PyThreadState_Get()->frame; if (current_frame == NULL) return NULL; --- 3043,3047 ---- PyEval_GetLocals(void) { ! PyFrameObject *current_frame = (PyFrameObject *)PyEval_GetFrame(); if (current_frame == NULL) return NULL; *************** *** 3047,3051 **** PyEval_GetGlobals(void) { ! PyFrameObject *current_frame = PyThreadState_Get()->frame; if (current_frame == NULL) return NULL; --- 3053,3057 ---- PyEval_GetGlobals(void) { ! PyFrameObject *current_frame = (PyFrameObject *)PyEval_GetFrame(); if (current_frame == NULL) return NULL; *************** *** 3057,3062 **** PyEval_GetFrame(void) { ! PyFrameObject *current_frame = PyThreadState_Get()->frame; ! return (PyObject *)current_frame; } --- 3063,3068 ---- PyEval_GetFrame(void) { ! PyThreadState *tstate = PyThreadState_Get(); ! return _PyThreadState_GetFrame((PyObject *)tstate); } *************** *** 3064,3068 **** PyEval_GetRestricted(void) { ! PyFrameObject *current_frame = PyThreadState_Get()->frame; return current_frame == NULL ? 0 : current_frame->f_restricted; } --- 3070,3074 ---- PyEval_GetRestricted(void) { ! PyFrameObject *current_frame = (PyFrameObject *)PyEval_GetFrame(); return current_frame == NULL ? 0 : current_frame->f_restricted; } *************** *** 3071,3075 **** PyEval_MergeCompilerFlags(PyCompilerFlags *cf) { ! PyFrameObject *current_frame = PyThreadState_Get()->frame; int result = 0; --- 3077,3081 ---- PyEval_MergeCompilerFlags(PyCompilerFlags *cf) { ! PyFrameObject *current_frame = (PyFrameObject *)PyEval_GetFrame(); int result = 0; Index: pystate.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pystate.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -d -r2.21 -r2.22 *** pystate.c 3 Sep 2002 20:24:31 -0000 2.21 --- pystate.c 8 Nov 2002 12:53:11 -0000 2.22 *************** *** 36,39 **** --- 36,40 ---- PyThreadState *_PyThreadState_Current = NULL; + unaryfunc _PyThreadState_GetFrame = NULL; *************** *** 114,121 **** --- 115,131 ---- + /* Default implementation for _PyThreadState_GetFrame */ + static struct _frame * + threadstate_getframe(PyThreadState *self) + { + return self->frame; + } + PyThreadState * PyThreadState_New(PyInterpreterState *interp) { PyThreadState *tstate = PyMem_NEW(PyThreadState, 1); + if (_PyThreadState_GetFrame == NULL) + _PyThreadState_GetFrame = (unaryfunc)threadstate_getframe; if (tstate != NULL) { *************** *** 126,129 **** --- 136,140 ---- tstate->tracing = 0; tstate->use_tracing = 0; + tstate->tick_counter = 0; tstate->dict = NULL; From mwh@users.sourceforge.net Fri Nov 8 13:08:48 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Fri, 08 Nov 2002 05:08:48 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_trace.py,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv14898/Lib/test Modified Files: test_trace.py Log Message: This is Richie Hindle's patch: [ 631276 ] Exceptions raised by line trace function It conflicted with the patches from Armin I just checked it, so I had to so some bits by hand. Index: test_trace.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_trace.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_trace.py 2 Oct 2002 13:13:46 -0000 1.4 --- test_trace.py 8 Nov 2002 13:08:45 -0000 1.5 *************** *** 179,192 **** class RaisingTraceFuncTestCase(unittest.TestCase): ! def test_it(self): ! def tr(frame, event, arg): raise ValueError # just something that isn't RuntimeError ! def f(): return 1 try: for i in xrange(sys.getrecursionlimit() + 1): ! sys.settrace(tr) try: ! f() except ValueError: pass --- 179,208 ---- class RaisingTraceFuncTestCase(unittest.TestCase): ! def trace(self, frame, event, arg): ! """A trace function that raises an exception in response to a ! specific trace event.""" ! if event == self.raiseOnEvent: raise ValueError # just something that isn't RuntimeError ! else: ! return self.trace ! ! def f(self): ! """The function to trace; raises an exception if that's the case ! we're testing, so that the 'exception' trace event fires.""" ! if self.raiseOnEvent == 'exception': ! x = 0 ! y = 1/x ! else: return 1 + + def run_test_for_event(self, event): + """Tests that an exception raised in response to the given event is + handled OK.""" + self.raiseOnEvent = event try: for i in xrange(sys.getrecursionlimit() + 1): ! sys.settrace(self.trace) try: ! self.f() except ValueError: pass *************** *** 195,199 **** except RuntimeError: self.fail("recursion counter not reset") ! def test_main(): --- 211,224 ---- except RuntimeError: self.fail("recursion counter not reset") ! ! # Test the handling of exceptions raised by each kind of trace event. ! def test_call(self): ! self.run_test_for_event('call') ! def test_line(self): ! self.run_test_for_event('line') ! def test_return(self): ! self.run_test_for_event('return') ! def test_exception(self): ! self.run_test_for_event('exception') def test_main(): From mwh@users.sourceforge.net Fri Nov 8 13:08:50 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Fri, 08 Nov 2002 05:08:50 -0800 Subject: [Python-checkins] python/dist/src/Python ceval.c,2.340,2.341 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv14898/Python Modified Files: ceval.c Log Message: This is Richie Hindle's patch: [ 631276 ] Exceptions raised by line trace function It conflicted with the patches from Armin I just checked it, so I had to so some bits by hand. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.340 retrieving revision 2.341 diff -C2 -d -r2.340 -r2.341 *** ceval.c 8 Nov 2002 12:53:10 -0000 2.340 --- ceval.c 8 Nov 2002 13:08:46 -0000 2.341 *************** *** 52,56 **** PyFrameObject *, int); static void call_exc_trace(Py_tracefunc, PyObject *, PyFrameObject *); ! static void maybe_call_line_trace(Py_tracefunc, PyObject *, PyFrameObject *, int *, int *); --- 52,56 ---- PyFrameObject *, int); static void call_exc_trace(Py_tracefunc, PyObject *, PyFrameObject *); ! static int maybe_call_line_trace(Py_tracefunc, PyObject *, PyFrameObject *, int *, int *); *************** *** 727,733 **** for expository comments */ f->f_stacktop = stack_pointer; ! maybe_call_line_trace(tstate->c_tracefunc, ! tstate->c_traceobj, ! f, &instr_lb, &instr_ub); /* Reload possibly changed frame fields */ JUMPTO(f->f_lasti); --- 727,738 ---- for expository comments */ f->f_stacktop = stack_pointer; ! ! if (maybe_call_line_trace(tstate->c_tracefunc, ! tstate->c_traceobj, ! f, &instr_lb, &instr_ub)) { ! /* trace function raised an exception */ ! why = WHY_EXCEPTION; ! goto on_error; ! } /* Reload possibly changed frame fields */ JUMPTO(f->f_lasti); *************** *** 2873,2877 **** } ! static void maybe_call_line_trace(Py_tracefunc func, PyObject *obj, PyFrameObject *frame, int *instr_lb, int *instr_ub) --- 2878,2882 ---- } ! static int maybe_call_line_trace(Py_tracefunc func, PyObject *obj, PyFrameObject *frame, int *instr_lb, int *instr_ub) *************** *** 2948,2951 **** --- 2953,2958 ---- */ + int result = 0; + if ((frame->f_lasti < *instr_lb || frame->f_lasti >= *instr_ub)) { PyCodeObject* co = frame->f_code; *************** *** 2981,2986 **** if (addr == frame->f_lasti) { frame->f_lineno = line; ! call_trace(func, obj, frame, ! PyTrace_LINE, Py_None); } --- 2988,2993 ---- if (addr == frame->f_lasti) { frame->f_lineno = line; ! result = call_trace(func, obj, frame, ! PyTrace_LINE, Py_None); } *************** *** 2997,3000 **** --- 3004,3009 ---- } } + + return result; } From mwh@users.sourceforge.net Fri Nov 8 13:09:41 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Fri, 08 Nov 2002 05:09:41 -0800 Subject: [Python-checkins] python/dist/src/Misc ACKS,1.214,1.215 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv15910/Misc Modified Files: ACKS Log Message: Richie Hindle Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.214 retrieving revision 1.215 diff -C2 -d -r1.214 -r1.215 *** ACKS 4 Nov 2002 09:56:00 -0000 1.214 --- ACKS 8 Nov 2002 13:09:39 -0000 1.215 *************** *** 227,230 **** --- 227,231 ---- Kevan Heydon Jason Hildebrand + Richie Hindle Konrad Hinsen David Hobley From akuchling@users.sourceforge.net Fri Nov 8 13:11:53 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Fri, 08 Nov 2002 05:11:53 -0800 Subject: [Python-checkins] python/dist/src setup.py,1.113,1.114 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv17113 Modified Files: setup.py Log Message: Simply delete the fpectl module, instead of leaving it commented out; if people want to compile it, they should edit Modules/Setup, not setup.py Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** setup.py 5 Nov 2002 16:50:04 -0000 1.113 --- setup.py 8 Nov 2002 13:11:50 -0000 1.114 *************** *** 651,676 **** - - # Lee Busby's SIGFPE modules. - # The library to link fpectl with is platform specific. - # Choose *one* of the options below for fpectl: - - # Disabled; it's dangerous or useless except in the hands of experts. - ## if platform == 'irix5': - ## # For SGI IRIX (tested on 5.3): - ## exts.append( Extension('fpectl', ['fpectlmodule.c'], - ## libraries=['fpe']) ) - ## elif 0: # XXX how to detect SunPro? - ## # For Solaris with SunPro compiler (tested on Solaris 2.5 - ## # with SunPro C 4.2): (Without the compiler you don't have - ## # -lsunmath.) - ## #fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm - ## pass - ## else: - ## # For other systems: see instructions in fpectlmodule.c. - ## #fpectl fpectlmodule.c ... - ## exts.append( Extension('fpectl', ['fpectlmodule.c']) ) - - # Andrew Kuchling's zlib module. Note that some versions of zlib # 1.1.3 have security problems. See CERT Advisory CA-2002-07: --- 651,654 ---- From niemeyer@users.sourceforge.net Fri Nov 8 14:31:51 2002 From: niemeyer@users.sourceforge.net (niemeyer@users.sourceforge.net) Date: Fri, 08 Nov 2002 06:31:51 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv634/Modules Modified Files: bz2module.c Log Message: * Modules/bz2module.c (BZ2File_dealloc): Call Util_DropReadAhead(). (*): Included aesthetic changes by Neal Norwitz. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bz2module.c 5 Nov 2002 18:41:53 -0000 1.3 --- bz2module.c 8 Nov 2002 14:31:49 -0000 1.4 *************** *** 212,216 **** if (bzerror != BZ_OK || buf == end) break; ! if (skipnextlf ) { skipnextlf = 0; if (c == '\n') { --- 212,216 ---- if (bzerror != BZ_OK || buf == end) break; ! if (skipnextlf) { skipnextlf = 0; if (c == '\n') { *************** *** 499,503 **** if (buffersize > INT_MAX) { PyErr_SetString(PyExc_OverflowError, ! "requested number of bytes is more than a Python string can hold"); goto cleanup; } --- 499,504 ---- if (buffersize > INT_MAX) { PyErr_SetString(PyExc_OverflowError, ! "requested number of bytes is " ! "more than a Python string can hold"); goto cleanup; } *************** *** 1224,1234 **** default: error = 1; } if (error) { ! PyErr_SetString(PyExc_ValueError, "invalid mode"); return -1; } mode++; ! if (*mode == 0) break; } --- 1225,1237 ---- default: error = 1; + break; } if (error) { ! PyErr_Format(PyExc_ValueError, ! "invalid mode char %c", *mode); return -1; } mode++; ! if (*mode == '\0') break; } *************** *** 1241,1245 **** file_args = Py_BuildValue("(ssi)", name, mode, buffering); if (!file_args) ! goto error; if (PyFile_Type.tp_init((PyObject *)self, file_args, NULL) < 0) --- 1244,1251 ---- file_args = Py_BuildValue("(ssi)", name, mode, buffering); if (!file_args) ! return -1; ! ! /* From now on, we have stuff to dealloc, so jump to error label ! * instead of returning */ if (PyFile_Type.tp_init((PyObject *)self, file_args, NULL) < 0) *************** *** 1300,1303 **** --- 1306,1310 ---- break; } + Util_DropReadAhead(self); ((PyObject*)self)->ob_type->tp_free((PyObject *)self); } *************** *** 1363,1367 **** ; ! statichere PyTypeObject BZ2File_Type = { PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ --- 1370,1374 ---- ; ! static PyTypeObject BZ2File_Type = { PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ *************** *** 1436,1441 **** ACQUIRE_LOCK(self); if (!self->running) { ! PyErr_SetString(PyExc_ValueError, "this object was already " ! "flushed"); goto error; } --- 1443,1448 ---- ACQUIRE_LOCK(self); if (!self->running) { ! PyErr_SetString(PyExc_ValueError, ! "this object was already flushed"); goto error; } *************** *** 1552,1557 **** static PyMethodDef BZ2Comp_methods[] = { ! {"compress", (PyCFunction)BZ2Comp_compress, METH_VARARGS, BZ2Comp_compress__doc__}, ! {"flush", (PyCFunction)BZ2Comp_flush, METH_NOARGS, BZ2Comp_flush__doc__}, {NULL, NULL} /* sentinel */ }; --- 1559,1566 ---- static PyMethodDef BZ2Comp_methods[] = { ! {"compress", (PyCFunction)BZ2Comp_compress, METH_VARARGS, ! BZ2Comp_compress__doc__}, ! {"flush", (PyCFunction)BZ2Comp_flush, METH_NOARGS, ! BZ2Comp_flush__doc__}, {NULL, NULL} /* sentinel */ }; *************** *** 1626,1630 **** "); ! statichere PyTypeObject BZ2Comp_Type = { PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ --- 1635,1639 ---- "); ! static PyTypeObject BZ2Comp_Type = { PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ *************** *** 1843,1847 **** "); ! statichere PyTypeObject BZ2Decomp_Type = { PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ --- 1852,1856 ---- "); ! static PyTypeObject BZ2Decomp_Type = { PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ From akuchling@users.sourceforge.net Fri Nov 8 15:11:45 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Fri, 08 Nov 2002 07:11:45 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils/command bdist_rpm.py,1.34,1.35 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory usw-pr-cvs1:/tmp/cvs-serv27494 Modified Files: bdist_rpm.py Log Message: Fix comment typo Index: bdist_rpm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist_rpm.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** bdist_rpm.py 6 Nov 2002 18:44:26 -0000 1.34 --- bdist_rpm.py 8 Nov 2002 15:11:42 -0000 1.35 *************** *** 435,439 **** for (rpm_opt, attr, default) in script_options: ! # Insert contents of file referred to, if no file is refered to # use 'default' as contents of script val = getattr(self, attr) --- 435,439 ---- for (rpm_opt, attr, default) in script_options: ! # Insert contents of file referred to, if no file is referred to # use 'default' as contents of script val = getattr(self, attr) From akuchling@users.sourceforge.net Fri Nov 8 16:18:26 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Fri, 08 Nov 2002 08:18:26 -0800 Subject: [Python-checkins] python/dist/src/Lib/distutils core.py,1.53,1.54 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory usw-pr-cvs1:/tmp/cvs-serv6391 Modified Files: core.py Log Message: [Bug #233259] Ugly traceback for DistutilsPlatformError Fixed by catching all exceptions that are subclasses of DistutilsError, so only the error message will be printed. You can still get the whole traceback by enabling the Distutils debugging mode. Index: core.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/core.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** core.py 7 Nov 2002 16:41:38 -0000 1.53 --- core.py 8 Nov 2002 16:18:24 -0000 1.54 *************** *** 146,152 **** raise SystemExit, error ! except (DistutilsExecError, ! DistutilsFileError, ! DistutilsOptionError, CCompilerError), msg: if DEBUG: --- 146,150 ---- raise SystemExit, error ! except (DistutilsError, CCompilerError), msg: if DEBUG: From gvanrossum@users.sourceforge.net Fri Nov 8 17:03:38 2002 From: gvanrossum@users.sourceforge.net (gvanrossum@users.sourceforge.net) Date: Fri, 08 Nov 2002 09:03:38 -0800 Subject: [Python-checkins] python/dist/src/Lib sets.py,1.33,1.34 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv3971 Modified Files: sets.py Log Message: Another attempt at making the set constructor both safe and fast. [SF bug 628246] Index: sets.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sets.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** sets.py 8 Nov 2002 05:26:52 -0000 1.33 --- sets.py 8 Nov 2002 17:03:36 -0000 1.34 *************** *** 320,343 **** return - # If the mere process of iterating may raise TypeError, materialize - # the iterable into a tuple first. Then the TypeError will get - # raised here and propagated back to the caller. Once we get into - # the loop following, TypeError is assumed to mean that element - # can't be used as a dict key. - if type(iterable) not in (list, tuple, dict, file, xrange, str): - iterable = tuple(iterable) - - it = iter(iterable) value = True ! while True: ! try: ! for element in it: data[element] = value ! return ! except TypeError: ! transform = getattr(element, "_as_immutable", None) ! if transform is None: ! raise # re-raise the TypeError exception we caught ! data[transform()] = value --- 320,349 ---- return value = True ! ! if type(iterable) in (list, tuple, xrange): ! # Optimized: we know that __iter__() and next() can't ! # raise TypeError, so we can move 'try:' out of the loop. ! it = iter(iterable) ! while True: ! try: ! for element in it: ! data[element] = value ! return ! except TypeError: ! transform = getattr(element, "_as_immutable", None) ! if transform is None: ! raise # re-raise the TypeError exception we caught ! data[transform()] = value ! else: ! # Safe: only catch TypeError where intended ! for element in iterable: ! try: data[element] = value ! except TypeError: ! transform = getattr(element, "_as_immutable", None) ! if transform is None: ! raise # re-raise the TypeError exception we caught ! data[transform()] = value From goodger@users.sourceforge.net Fri Nov 8 22:12:33 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 14:12:33 -0800 Subject: [Python-checkins] python/nondist/peps pep-html-template,1.3,1.4 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv9440 Modified Files: pep-html-template Log Message: fixed meta tags Index: pep-html-template =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-html-template,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pep-html-template 8 Nov 2002 03:43:48 -0000 1.3 --- pep-html-template 8 Nov 2002 22:12:30 -0000 1.4 *************** *** 8,13 **** ! ! PEP %(pep)s -- %(title)s %(stylesheet)s --- 8,13 ---- ! ! PEP %(pep)s -- %(title)s %(stylesheet)s From goodger@users.sourceforge.net Fri Nov 8 22:22:57 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 14:22:57 -0800 Subject: [Python-checkins] python/nondist/peps pep-0301.txt,1.1,1.2 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv13425 Modified Files: pep-0301.txt Log Message: update from Richard Jones Index: pep-0301.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0301.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pep-0301.txt 8 Nov 2002 02:59:18 -0000 1.1 --- pep-0301.txt 8 Nov 2002 22:22:55 -0000 1.2 *************** *** 9,13 **** Created: 24-Oct-2002 Python-Version: 2.3 ! Post-History: --- 9,13 ---- Created: 24-Oct-2002 Python-Version: 2.3 ! Post-History: 8-Nov-2002 *************** *** 136,140 **** Owner ! Owns a package name, may assign Maintainer Role for that name Maintainer --- 136,142 ---- Owner ! Owns a package name, may assign Maintainer Role for that name. The ! first user to register information about a package is deemed owner ! of the package name. The Admin user may change this if necessary. Maintainer *************** *** 313,318 **** ================ ! Anthony Baxter and Martin v. Loewis for encouragement and feedback ! during initial drafting. A.M. Kuchling for support including hosting the second prototype. --- 315,320 ---- ================ ! Anthony Baxter, Martin v. Loewis and David Goodger for encouragement ! and feedback during initial drafting. A.M. Kuchling for support including hosting the second prototype. From goodger@users.sourceforge.net Fri Nov 8 23:42:22 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:42:22 -0800 Subject: [Python-checkins] python/nondist/peps/docutils - New directory Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils In directory usw-pr-cvs1:/tmp/cvs-serv6920/docutils Log Message: Directory /cvsroot/python/python/nondist/peps/docutils added to the repository From goodger@users.sourceforge.net Fri Nov 8 23:44:36 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:44:36 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/languages - New directory Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/languages In directory usw-pr-cvs1:/tmp/cvs-serv7454/languages Log Message: Directory /cvsroot/python/python/nondist/peps/docutils/languages added to the repository From goodger@users.sourceforge.net Fri Nov 8 23:44:36 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:44:36 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/writers - New directory Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/writers In directory usw-pr-cvs1:/tmp/cvs-serv7454/writers Log Message: Directory /cvsroot/python/python/nondist/peps/docutils/writers added to the repository From goodger@users.sourceforge.net Fri Nov 8 23:44:36 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:44:36 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/transforms - New directory Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/transforms In directory usw-pr-cvs1:/tmp/cvs-serv7454/transforms Log Message: Directory /cvsroot/python/python/nondist/peps/docutils/transforms added to the repository From goodger@users.sourceforge.net Fri Nov 8 23:44:36 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:44:36 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/parsers - New directory Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/parsers In directory usw-pr-cvs1:/tmp/cvs-serv7454/parsers Log Message: Directory /cvsroot/python/python/nondist/peps/docutils/parsers added to the repository From goodger@users.sourceforge.net Fri Nov 8 23:44:36 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:44:36 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/readers - New directory Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/readers In directory usw-pr-cvs1:/tmp/cvs-serv7454/readers Log Message: Directory /cvsroot/python/python/nondist/peps/docutils/readers added to the repository From goodger@users.sourceforge.net Fri Nov 8 23:45:23 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:45:23 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/parsers/rst - New directory Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/parsers/rst In directory usw-pr-cvs1:/tmp/cvs-serv7705/rst Log Message: Directory /cvsroot/python/python/nondist/peps/docutils/parsers/rst added to the repository From goodger@users.sourceforge.net Fri Nov 8 23:45:33 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:45:33 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/parsers/rst/directives - New directory Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/parsers/rst/directives In directory usw-pr-cvs1:/tmp/cvs-serv7746/directives Log Message: Directory /cvsroot/python/python/nondist/peps/docutils/parsers/rst/directives added to the repository From goodger@users.sourceforge.net Fri Nov 8 23:45:33 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:45:33 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/parsers/rst/languages - New directory Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/parsers/rst/languages In directory usw-pr-cvs1:/tmp/cvs-serv7746/languages Log Message: Directory /cvsroot/python/python/nondist/peps/docutils/parsers/rst/languages added to the repository From goodger@users.sourceforge.net Fri Nov 8 23:47:54 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:47:54 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/parsers .cvsignore,NONE,1.1 __init__.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/parsers In directory usw-pr-cvs1:/tmp/cvs-serv8387/docutils/parsers Added Files: .cvsignore __init__.py Log Message: local copy of Docutils for PEP processing --- NEW FILE: .cvsignore --- *.pyc --- NEW FILE: __init__.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ This package contains Docutils parser modules. """ __docformat__ = 'reStructuredText' from docutils import Component class Parser(Component): component_type = 'parser' def parse(self, inputstring, document): """Override to parse `inputstring` into document tree `document`.""" raise NotImplementedError('subclass must override this method') def setup_parse(self, inputstring, document): """Initial parse setup. Call at start of `self.parse()`.""" self.inputstring = inputstring self.document = document document.reporter.attach_observer(document.note_parse_message) def finish_parse(self): """Finalize parse details. Call at end of `self.parse()`.""" self.document.reporter.detach_observer( self.document.note_parse_message) _parser_aliases = { 'restructuredtext': 'rst', 'rest': 'rst', 'restx': 'rst', 'rtxt': 'rst',} def get_parser_class(parser_name): """Return the Parser class from the `parser_name` module.""" parser_name = parser_name.lower() if _parser_aliases.has_key(parser_name): parser_name = _parser_aliases[parser_name] module = __import__(parser_name, globals(), locals()) return module.Parser From goodger@users.sourceforge.net Fri Nov 8 23:47:54 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:47:54 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/languages .cvsignore,NONE,1.1 __init__.py,NONE,1.1 de.py,NONE,1.1 en.py,NONE,1.1 fr.py,NONE,1.1 sk.py,NONE,1.1 sv.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/languages In directory usw-pr-cvs1:/tmp/cvs-serv8387/docutils/languages Added Files: .cvsignore __init__.py de.py en.py fr.py sk.py sv.py Log Message: local copy of Docutils for PEP processing --- NEW FILE: .cvsignore --- *.pyc --- NEW FILE: __init__.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ This package contains modules for language-dependent features of Docutils. """ __docformat__ = 'reStructuredText' _languages = {} def get_language(language_code): if _languages.has_key(language_code): return _languages[language_code] module = __import__(language_code, globals(), locals()) _languages[language_code] = module return module --- NEW FILE: de.py --- # Authors: David Goodger; Gunnar Schwant # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ German language mappings for language-dependent features of Docutils. """ __docformat__ = 'reStructuredText' from docutils import nodes labels = { 'author': 'Autor', 'authors': 'Autoren', 'organization': 'Organisation', 'address': 'Adresse', 'contact': 'Kontakt', 'version': 'Version', 'revision': 'Revision', 'status': 'Status', 'date': 'Datum', 'dedication': 'Widmung', 'copyright': 'Copyright', 'abstract': 'Zusammenfassung', 'attention': 'Achtung!', 'caution': 'Vorsicht!', 'danger': '!GEFAHR!', 'error': 'Fehler', 'hint': 'Hinweis', 'important': 'Wichtig', 'note': 'Bemerkung', 'tip': 'Tipp', 'warning': 'Warnung', 'contents': 'Inhalt'} """Mapping of node class name to label text.""" bibliographic_fields = { 'autor': nodes.author, 'autoren': nodes.authors, 'organisation': nodes.organization, 'adresse': nodes.address, 'kontakt': nodes.contact, 'version': nodes.version, 'revision': nodes.revision, 'status': nodes.status, 'datum': nodes.date, 'copyright': nodes.copyright, 'widmung': nodes.topic, 'zusammenfassung': nodes.topic} """Field name (lowcased) to node class name mapping for bibliographic fields (field_list).""" author_separators = [';', ','] """List of separator strings for the 'Authors' bibliographic field. Tried in order.""" --- NEW FILE: en.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ English-language mappings for language-dependent features of Docutils. """ __docformat__ = 'reStructuredText' from docutils import nodes labels = { 'author': 'Author', 'authors': 'Authors', 'organization': 'Organization', 'address': 'Address', 'contact': 'Contact', 'version': 'Version', 'revision': 'Revision', 'status': 'Status', 'date': 'Date', 'copyright': 'Copyright', 'dedication': 'Dedication', 'abstract': 'Abstract', 'attention': 'Attention!', 'caution': 'Caution!', 'danger': '!DANGER!', 'error': 'Error', 'hint': 'Hint', 'important': 'Important', 'note': 'Note', 'tip': 'Tip', 'warning': 'Warning', 'contents': 'Contents'} """Mapping of node class name to label text.""" bibliographic_fields = { 'author': nodes.author, 'authors': nodes.authors, 'organization': nodes.organization, 'address': nodes.address, 'contact': nodes.contact, 'version': nodes.version, 'revision': nodes.revision, 'status': nodes.status, 'date': nodes.date, 'copyright': nodes.copyright, 'dedication': nodes.topic, 'abstract': nodes.topic} """Field name (lowcased) to node class name mapping for bibliographic fields (field_list).""" author_separators = [';', ','] """List of separator strings for the 'Authors' bibliographic field. Tried in order.""" --- NEW FILE: fr.py --- # Author: Stefane Fermigier # Contact: sf@fermigier.com # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ French-language mappings for language-dependent features of Docutils. """ __docformat__ = 'reStructuredText' from docutils import nodes labels = { 'author': 'Auteur', 'authors': 'Auteurs', 'organization': 'Organisation', 'address': 'Adresse', 'contact': 'Contact', 'version': 'Version', 'revision': 'R\u00e9vision', 'status': 'Statut', 'date': 'Date', 'copyright': 'Copyright', 'dedication': 'D\u00e9dicace', 'abstract': 'R\u00e9sum\u00e9', 'attention': 'Attention!', 'caution': 'Avertissement!', 'danger': '!DANGER!', 'error': 'Erreur', 'hint': 'Indication', 'important': 'Important', 'note': 'Note', 'tip': 'Astuce', 'warning': 'Avertissement', 'contents': 'Contenu'} """Mapping of node class name to label text.""" bibliographic_fields = { 'auteur': nodes.author, 'auteurs': nodes.authors, 'organisation': nodes.organization, 'adresse': nodes.address, 'contact': nodes.contact, 'version': nodes.version, 'r\u00e9vision': nodes.revision, 'status': nodes.status, 'date': nodes.date, 'copyright': nodes.copyright, 'd\u00e9dicace': nodes.topic, 'r\u00e9sum\u00e9': nodes.topic} """Field name (lowcased) to node class name mapping for bibliographic fields (field_list).""" author_separators = [';', ','] """List of separator strings for the 'Authors' bibliographic field. Tried in order.""" --- NEW FILE: sk.py --- # :Author: Miroslav Vasko # :Contact: zemiak@zoznam.sk # :Revision: $Revision: 1.1 $ # :Date: $Date: 2002/11/08 23:47:51 $ # :Copyright: This module has been placed in the public domain. """ Slovak-language mappings for language-dependent features of Docutils. """ __docformat__ = 'reStructuredText' from docutils import nodes labels = { 'author': u'Autor', 'authors': u'Autori', 'organization': u'Organiz\u00E1cia', 'address': u'Adresa', 'contact': u'Kontakt', 'version': u'Verzia', 'revision': u'Rev\u00EDzia', 'status': u'Stav', 'date': u'D\u00E1tum', 'copyright': u'Copyright', 'dedication': u'Venovanie', 'abstract': u'Abstraktne', 'attention': u'Pozor!', 'caution': u'Opatrne!', 'danger': u'!NEBEZPE\u010cENSTVO!', 'error': u'Chyba', 'hint': u'Rada', 'important': u'D\u00F4le\u017Eit\u00E9', 'note': u'Pozn\u00E1mka', 'tip': u'Tip', 'warning': u'Varovanie', 'contents': u'Obsah'} """Mapping of node class name to label text.""" bibliographic_fields = { u'autor': nodes.author, u'autori': nodes.authors, u'organiz\u00E1cia': nodes.organization, u'adresa': nodes.address, u'kontakt': nodes.contact, u'verzia': nodes.version, u'rev\u00EDzia': nodes.revision, u'stav': nodes.status, u'D\u00E1tum': nodes.date, u'copyright': nodes.copyright, u'venovanie': nodes.topic, u'abstraktne': nodes.topic} """Field name (lowcased) to node class name mapping for bibliographic fields (field_list).""" author_separators = [';', ','] """List of separator strings for the 'Authors' bibliographic field. Tried in order.""" --- NEW FILE: sv.py --- # Author: Adam Chodorowski # Contact: chodorowski@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ Swedish language mappings for language-dependent features of Docutils. """ __docformat__ = 'reStructuredText' from docutils import nodes labels = { 'author': u'F\u00f6rfattare', 'authors': u'F\u00f6rfattare', 'organization': u'Organisation', 'address': u'Adress', 'contact': u'Kontakt', 'version': u'Version', 'revision': u'Revision', 'status': u'Status', 'date': u'Datum', 'copyright': u'Copyright', 'dedication': u'Dedikation', 'abstract': u'Sammanfattning', 'attention': u'Observera!', 'caution': u'Varning!', 'danger': u'FARA!', 'error': u'Fel', 'hint': u'V\u00e4gledning', 'important': u'Viktigt', 'note': u'Notera', 'tip': u'Tips', 'warning': u'Varning', 'contents': u'Inneh\u00e5ll' } """Mapping of node class name to label text.""" bibliographic_fields = { # 'Author' and 'Authors' identical in Swedish; assume the plural: u'f\u00f6rfattare': nodes.authors, u'organisation': nodes.organization, u'adress': nodes.address, u'kontakt': nodes.contact, u'version': nodes.version, u'revision': nodes.revision, u'status': nodes.status, u'datum': nodes.date, u'copyright': nodes.copyright, u'dedikation': nodes.topic, u'sammanfattning': nodes.topic } """Field name (lowcased) to node class name mapping for bibliographic fields (field_list).""" author_separators = [';', ','] """List of separator strings for the 'Authors' bibliographic field. Tried in order.""" From goodger@users.sourceforge.net Fri Nov 8 23:47:54 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:47:54 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/readers .cvsignore,NONE,1.1 __init__.py,NONE,1.1 pep.py,NONE,1.1 standalone.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/readers In directory usw-pr-cvs1:/tmp/cvs-serv8387/docutils/readers Added Files: .cvsignore __init__.py pep.py standalone.py Log Message: local copy of Docutils for PEP processing --- NEW FILE: .cvsignore --- *.pyc --- NEW FILE: __init__.py --- # Authors: David Goodger; Ueli Schlaepfer # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ This package contains Docutils Reader modules. """ __docformat__ = 'reStructuredText' import sys from docutils import utils, parsers, Component from docutils.transforms import universal class Reader(Component): """ Abstract base class for docutils Readers. Each reader module or package must export a subclass also called 'Reader'. The three steps of a Reader's responsibility are defined: `scan()`, `parse()`, and `transform()`. Call `read()` to process a document. """ component_type = 'reader' def __init__(self, parser=None, parser_name='restructuredtext'): """ Initialize the Reader instance. Several instance attributes are defined with dummy initial values. Subclasses may use these attributes as they wish. """ self.parser = parser """A `parsers.Parser` instance shared by all doctrees. May be left unspecified if the document source determines the parser.""" if parser is None and parser_name: self.set_parser(parser_name) self.source = None """`docutils.io` IO object, source of input data.""" self.input = None """Raw text input; either a single string or, for more complex cases, a collection of strings.""" def set_parser(self, parser_name): """Set `self.parser` by name.""" parser_class = parsers.get_parser_class(parser_name) self.parser = parser_class() def read(self, source, parser, settings): self.source = source if not self.parser: self.parser = parser self.settings = settings # May modify self.parser, depending on input: self.input = self.source.read(self) self.parse() return self.document def parse(self): """Parse `self.input` into a document tree.""" self.document = document = self.new_document() self.parser.parse(self.input, document) document.current_source = document.current_line = None def new_document(self): """Create and return a new empty document tree (root node).""" document = utils.new_document(self.source.source_path, self.settings) return document _reader_aliases = {} def get_reader_class(reader_name): """Return the Reader class from the `reader_name` module.""" reader_name = reader_name.lower() if _reader_aliases.has_key(reader_name): reader_name = _reader_aliases[reader_name] module = __import__(reader_name, globals(), locals()) return module.Reader --- NEW FILE: pep.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ Python Enhancement Proposal (PEP) Reader. """ __docformat__ = 'reStructuredText' import sys import os import re from docutils import nodes from docutils.readers import standalone from docutils.transforms import peps, references from docutils.parsers import rst class Reader(standalone.Reader): supported = ('pep',) """Contexts this reader supports.""" settings_spec = ( 'PEP Reader Option Defaults', 'The --pep-references and --rfc-references options (for the ' 'reStructuredText parser) are on by default.', ()) default_transforms = (references.Substitutions, peps.Headers, peps.Contents, references.ChainedTargets, references.AnonymousHyperlinks, references.IndirectHyperlinks, peps.TargetNotes, references.Footnotes, references.ExternalTargets, references.InternalTargets,) settings_default_overrides = {'pep_references': 1, 'rfc_references': 1} def __init__(self, parser=None, parser_name=None): """`parser` should be ``None``.""" if parser is None: parser = rst.Parser(rfc2822=1, inliner=Inliner()) standalone.Reader.__init__(self, parser, '') class Inliner(rst.states.Inliner): """ Extend `rst.Inliner` to for local PEP references. """ pep_url = rst.states.Inliner.pep_url_local --- NEW FILE: standalone.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ Standalone file Reader for the reStructuredText markup syntax. """ __docformat__ = 'reStructuredText' import sys from docutils import readers from docutils.transforms import frontmatter, references from docutils.parsers.rst import Parser class Reader(readers.Reader): supported = ('standalone',) """Contexts this reader supports.""" document = None """A single document tree.""" default_transforms = (references.Substitutions, frontmatter.DocTitle, frontmatter.DocInfo, references.ChainedTargets, references.AnonymousHyperlinks, references.IndirectHyperlinks, references.Footnotes, references.ExternalTargets, references.InternalTargets,) From goodger@users.sourceforge.net Fri Nov 8 23:47:54 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:47:54 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/parsers/rst/languages .cvsignore,NONE,1.1 __init__.py,NONE,1.1 de.py,NONE,1.1 en.py,NONE,1.1 sv.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/parsers/rst/languages In directory usw-pr-cvs1:/tmp/cvs-serv8387/docutils/parsers/rst/languages Added Files: .cvsignore __init__.py de.py en.py sv.py Log Message: local copy of Docutils for PEP processing --- NEW FILE: .cvsignore --- *.pyc --- NEW FILE: __init__.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ This package contains modules for language-dependent features of reStructuredText. """ __docformat__ = 'reStructuredText' _languages = {} def get_language(language_code): if _languages.has_key(language_code): return _languages[language_code] module = __import__(language_code, globals(), locals()) _languages[language_code] = module return module --- NEW FILE: de.py --- # Author: Engelbert Gruber # Contact: grubert@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ German-language mappings for language-dependent features of reStructuredText. """ __docformat__ = 'reStructuredText' directives = { 'achtung': 'attention', 'vorsicht': 'caution', 'gefahr': 'danger', 'fehler': 'error', 'hinweis': 'hint', 'wichtig': 'important', 'notiz': 'note', 'tip': 'tip', 'warnung': 'warning', 'topic': 'topic', # Überbegriff 'line-block': 'line-block', 'parsed-literal': 'parsed-literal', #'questions': 'questions', #'qa': 'questions', #'faq': 'questions', 'meta': 'meta', #'imagemap': 'imagemap', 'bild': 'image', 'abbildung': 'figure', 'raw': 'raw', # unbearbeitet 'include': 'include', # einfügen, "füge ein" would be more like a command. # einfügung would be the noun. 'replace': 'replace', # ersetzen, ersetze 'inhalt': 'contents', 'sectnum': 'sectnum', 'section-numbering': 'sectnum', 'target-notes': 'target-notes', #'footnotes': 'footnotes', #'citations': 'citations', 'restructuredtext-test-directive': 'restructuredtext-test-directive'} """English name to registered (in directives/__init__.py) directive name mapping.""" --- NEW FILE: en.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ English-language mappings for language-dependent features of reStructuredText. """ __docformat__ = 'reStructuredText' directives = { 'attention': 'attention', 'caution': 'caution', 'danger': 'danger', 'error': 'error', 'hint': 'hint', 'important': 'important', 'note': 'note', 'tip': 'tip', 'warning': 'warning', 'topic': 'topic', 'line-block': 'line-block', 'parsed-literal': 'parsed-literal', #'questions': 'questions', #'qa': 'questions', #'faq': 'questions', 'meta': 'meta', #'imagemap': 'imagemap', 'image': 'image', 'figure': 'figure', 'include': 'include', 'raw': 'raw', 'replace': 'replace', 'contents': 'contents', 'sectnum': 'sectnum', 'section-numbering': 'sectnum', 'target-notes': 'target-notes', #'footnotes': 'footnotes', #'citations': 'citations', 'restructuredtext-test-directive': 'restructuredtext-test-directive'} """English name to registered (in directives/__init__.py) directive name mapping.""" --- NEW FILE: sv.py --- # Author: Adam Chodorowski # Contact: chodorowski@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ Swedish language mappings for language-dependent features of reStructuredText. """ __docformat__ = 'reStructuredText' directives = { u'observera': 'attention', u'varning': 'caution', u'fara': 'danger', u'fel': 'error', u'v\u00e4gledning': 'hint', u'viktigt': 'important', u'notera': 'note', u'tips': 'tip', u'varning': 'warning', u'fr\u00e5gor': 'questions', # NOTE: A bit long, but recommended by http://www.nada.kth.se/dataterm/: u'fr\u00e5gor-och-svar': 'questions', u'vanliga-fr\u00e5gor': 'questions', u'meta': 'meta', # u'bildkarta': 'imagemap', # FIXME: Translation might be too literal. u'bild': 'image', u'figur': 'figure', # u'r\u00e5': 'raw', # FIXME: Translation might be too literal. u'inneh\u00e5ll': 'contents', # u'fotnoter': 'footnotes', # u'citeringar': 'citations', # u'\u00e4mne': 'topic', u'restructuredtext-test-directive': 'restructuredtext-test-directive' } """Swedish name to registered (in directives/__init__.py) directive name mapping.""" From goodger@users.sourceforge.net Fri Nov 8 23:47:55 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:47:55 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/writers .cvsignore,NONE,1.1 __init__.py,NONE,1.1 docutils_xml.py,NONE,1.1 html4css1.py,NONE,1.1 pep_html.py,NONE,1.1 pseudoxml.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/writers In directory usw-pr-cvs1:/tmp/cvs-serv8387/docutils/writers Added Files: .cvsignore __init__.py docutils_xml.py html4css1.py pep_html.py pseudoxml.py Log Message: local copy of Docutils for PEP processing --- NEW FILE: .cvsignore --- *.pyc --- NEW FILE: __init__.py --- # Authors: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ This package contains Docutils Writer modules. """ __docformat__ = 'reStructuredText' import sys import docutils from docutils import languages, Component from docutils.transforms import universal class Writer(Component): """ Abstract base class for docutils Writers. Each writer module or package must export a subclass also called 'Writer'. Each writer must support all standard node types listed in `docutils.nodes.node_class_names`. Call `write()` to process a document. """ component_type = 'writer' document = None """The document to write.""" language = None """Language module for the document.""" destination = None """`docutils.io` IO object; where to write the document.""" def __init__(self): """Initialize the Writer instance.""" def write(self, document, destination): self.document = document self.language = languages.get_language( document.settings.language_code) self.destination = destination self.translate() output = self.destination.write(self.output) return output def translate(self): """ Override to do final document tree translation. This is usually done with a `docutils.nodes.NodeVisitor` subclass, in combination with a call to `docutils.nodes.Node.walk()` or `docutils.nodes.Node.walkabout()`. The ``NodeVisitor`` subclass must support all standard elements (listed in `docutils.nodes.node_class_names`) and possibly non-standard elements used by the current Reader as well. """ raise NotImplementedError('subclass must override this method') _writer_aliases = { 'html': 'html4css1', 'pprint': 'pseudoxml', 'pformat': 'pseudoxml', 'pdf': 'rlpdf', 'xml': 'docutils_xml',} def get_writer_class(writer_name): """Return the Writer class from the `writer_name` module.""" writer_name = writer_name.lower() if _writer_aliases.has_key(writer_name): writer_name = _writer_aliases[writer_name] module = __import__(writer_name, globals(), locals()) return module.Writer --- NEW FILE: docutils_xml.py --- # Authors: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ Simple internal document tree Writer, writes Docutils XML. """ __docformat__ = 'reStructuredText' import docutils from docutils import writers class Writer(writers.Writer): supported = ('xml',) """Formats this writer supports.""" settings_spec = ( '"Docutils XML" Writer Options', 'Warning: these options may adversely affect whitespace; use them ' 'only for reading convenience.', (('Generate XML with newlines before and after tags.', ['--newlines'], {'action': 'store_true'}), ('Generate XML with indents and newlines.', ['--indents'], {'action': 'store_true'}),),) output = None """Final translated form of `document`.""" xml_declaration = '\n' #xml_stylesheet = '\n' doctype = ( '\n') generator = '\n' def translate(self): settings = self.document.settings indent = newline = '' if settings.newlines: newline = '\n' if settings.indents: newline = '\n' indent = ' ' output_prefix = [self.xml_declaration % settings.output_encoding, self.doctype, self.generator % docutils.__version__] docnode = self.document.asdom().childNodes[0] self.output = (''.join(output_prefix) + docnode.toprettyxml(indent, newline)) --- NEW FILE: html4css1.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ Simple HyperText Markup Language document tree Writer. The output conforms to the HTML 4.01 Transitional DTD and to the Extensible HTML version 1.0 Transitional DTD (*almost* strict). The output contains a minimum of formatting information. A cascading style sheet ("default.css" by default) is required for proper viewing with a modern graphical browser. """ __docformat__ = 'reStructuredText' import sys [...1106 lines suppressed...] if (children and isinstance(children[0], nodes.paragraph) and (isinstance(children[-1], nodes.bullet_list) or isinstance(children[-1], nodes.enumerated_list))): children.pop() if len(children) <= 1: return else: raise nodes.NodeFound def visit_paragraph(self, node): raise nodes.SkipNode def invisible_visit(self, node): """Invisible nodes should be ignored.""" pass visit_comment = invisible_visit visit_substitution_definition = invisible_visit visit_target = invisible_visit visit_pending = invisible_visit --- NEW FILE: pep_html.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ PEP HTML Writer. """ __docformat__ = 'reStructuredText' import sys import docutils from docutils import nodes, optik, utils from docutils.writers import html4css1 class Writer(html4css1.Writer): settings_spec = html4css1.Writer.settings_spec + ( 'PEP/HTML-Specific Options', 'The HTML --footnote-references option is set to "brackets" by ' 'default.', (('Specify a PEP stylesheet URL, used verbatim. Default is ' '--stylesheet\'s value. If given, --pep-stylesheet overrides ' '--stylesheet.', ['--pep-stylesheet'], {'metavar': ''}), ('Specify a PEP stylesheet file, relative to the current working ' 'directory. The path is adjusted relative to the output HTML ' 'file. Overrides --pep-stylesheet and --stylesheet-path.', ['--pep-stylesheet-path'], {'metavar': ''}), ('Specify a template file. Default is "pep-html-template".', ['--pep-template'], {'default': 'pep-html-template', 'metavar': ''}), ('Python\'s home URL. Default is ".." (parent directory).', ['--python-home'], {'default': '..', 'metavar': ''}), ('Home URL prefix for PEPs. Default is "." (current directory).', ['--pep-home'], {'default': '.', 'metavar': ''}), # Workaround for SourceForge's broken Python # (``import random`` causes a segfault). (optik.SUPPRESS_HELP, ['--no-random'], {'action': 'store_true'}),)) settings_default_overrides = {'footnote_references': 'brackets'} relative_path_settings = ('pep_stylesheet_path', 'pep_template') def __init__(self): html4css1.Writer.__init__(self) self.translator_class = HTMLTranslator def translate(self): html4css1.Writer.translate(self) settings = self.document.settings template = open(settings.pep_template).read() # Substitutions dict for template: subs = {} subs['encoding'] = settings.output_encoding subs['version'] = docutils.__version__ subs['stylesheet'] = ''.join(self.stylesheet) pyhome = settings.python_home subs['pyhome'] = pyhome subs['pephome'] = settings.pep_home if pyhome == '..': subs['pepindex'] = '.' else: subs['pepindex'] = pyhome + '/peps/' index = self.document.first_child_matching_class(nodes.field_list) header = self.document[index] pepnum = header[0][1].astext() subs['pep'] = pepnum if settings.no_random: subs['banner'] = 0 else: import random subs['banner'] = random.randrange(64) try: subs['pepnum'] = '%04i' % int(pepnum) except: subs['pepnum'] = pepnum subs['title'] = header[1][1].astext() subs['body'] = ''.join( self.body_pre_docinfo + self.docinfo + self.body) subs['body_suffix'] = ''.join(self.body_suffix) self.output = template % subs class HTMLTranslator(html4css1.HTMLTranslator): def get_stylesheet_reference(self, relative_to=None): settings = self.settings if relative_to == None: relative_to = settings._destination if settings.pep_stylesheet_path: return utils.relative_path(relative_to, settings.pep_stylesheet_path) elif settings.pep_stylesheet: return settings.pep_stylesheet elif settings._stylesheet_path: return utils.relative_path(relative_to, settings.stylesheet_path) else: return settings.stylesheet def depart_field_list(self, node): html4css1.HTMLTranslator.depart_field_list(self, node) if node.get('class') == 'rfc2822': self.body.append('
\n') --- NEW FILE: pseudoxml.py --- # Authors: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ Simple internal document tree Writer, writes indented pseudo-XML. """ __docformat__ = 'reStructuredText' from docutils import writers class Writer(writers.Writer): supported = ('pprint', 'pformat', 'pseudoxml') """Formats this writer supports.""" output = None """Final translated form of `document`.""" def translate(self): self.output = self.document.pformat() def supports(self, format): """This writer supports all format-specific elements.""" return 1 From goodger@users.sourceforge.net Fri Nov 8 23:47:54 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:47:54 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/parsers/rst .cvsignore,NONE,1.1 __init__.py,NONE,1.1 states.py,NONE,1.1 tableparser.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/parsers/rst In directory usw-pr-cvs1:/tmp/cvs-serv8387/docutils/parsers/rst Added Files: .cvsignore __init__.py states.py tableparser.py Log Message: local copy of Docutils for PEP processing --- NEW FILE: .cvsignore --- *.pyc --- NEW FILE: __init__.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ This is ``docutils.parsers.rst`` package. It exports a single class, `Parser`, the reStructuredText parser. Usage ===== 1. Create a parser:: parser = docutils.parsers.restructuredtext.Parser() Several optional arguments may be passed to modify the parser's behavior. Please see `docutils.parsers.Parser` for details. 2. Gather input (a multi-line string), by reading a file or the standard input:: input = sys.stdin.read() 3. Create a new empty `docutils.nodes.document` tree:: document = docutils.utils.new_document(source) See `docutils.utils.new_document()` for parameter details. 4. Run the parser, populating the document tree:: parser.parse(input, document) Parser Overview =============== The reStructuredText parser is implemented as a state machine, examining its input one line at a time. To understand how the parser works, please first become familiar with the `docutils.statemachine` module, then see the `states` module. """ __docformat__ = 'reStructuredText' import docutils.parsers import docutils.statemachine from docutils.parsers.rst import states class Parser(docutils.parsers.Parser): """The reStructuredText parser.""" supported = ('restructuredtext', 'rst', 'rest', 'restx', 'rtxt', 'rstx') """Aliases this parser supports.""" settings_spec = ( 'reStructuredText Parser Options', None, (('Recognize and link to PEP references (like "PEP 258").', ['--pep-references'], {'action': 'store_true'}), ('Recognize and link to RFC references (like "RFC 822").', ['--rfc-references'], {'action': 'store_true'}), ('Set number of spaces for tab expansion (default 8).', ['--tab-width'], {'metavar': '', 'type': 'int', 'default': 8}),)) def __init__(self, rfc2822=None, inliner=None): if rfc2822: self.initial_state = 'RFC2822Body' else: self.initial_state = 'Body' self.state_classes = states.state_classes self.inliner = inliner def parse(self, inputstring, document): """Parse `inputstring` and populate `document`, a document tree.""" self.setup_parse(inputstring, document) debug = document.reporter[''].debug self.statemachine = states.RSTStateMachine( state_classes=self.state_classes, initial_state=self.initial_state, debug=debug) inputlines = docutils.statemachine.string2lines( inputstring, tab_width=document.settings.tab_width, convert_whitespace=1) self.statemachine.run(inputlines, document, inliner=self.inliner) self.finish_parse() --- NEW FILE: states.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ This is the ``docutils.parsers.restructuredtext.states`` module, the core of the reStructuredText parser. It defines the following: :Classes: - `RSTStateMachine`: reStructuredText parser's entry point. - `NestedStateMachine`: recursive StateMachine. - `RSTState`: reStructuredText State superclass. - `Inliner`: For parsing inline markup. - `Body`: Generic classifier of the first line of a block. - `SpecializedBody`: Superclass for compound element members. - `BulletList`: Second and subsequent bullet_list list_items - `DefinitionList`: Second+ definition_list_items. [...2602 lines suppressed...] def escape2null(text): """Return a string with escape-backslashes converted to nulls.""" parts = [] start = 0 while 1: found = text.find('\\', start) if found == -1: parts.append(text[start:]) return ''.join(parts) parts.append(text[start:found]) parts.append('\x00' + text[found+1:found+2]) start = found + 2 # skip character after escape def unescape(text, restore_backslashes=0): """Return a string with nulls removed or restored to backslashes.""" if restore_backslashes: return text.replace('\x00', '\\') else: return ''.join(text.split('\x00')) --- NEW FILE: tableparser.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ This module defines table parser classes,which parse plaintext-graphic tables and produce a well-formed data structure suitable for building a CALS table. :Classes: - `GridTableParser`: Parse fully-formed tables represented with a grid. - `SimpleTableParser`: Parse simple tables, delimited by top & bottom borders. :Exception class: `TableMarkupError` :Function: `update_dict_of_lists()`: Merge two dictionaries containing list values. """ __docformat__ = 'reStructuredText' import re import sys from docutils import DataError class TableMarkupError(DataError): pass class TableParser: """ Abstract superclass for the common parts of the syntax-specific parsers. """ head_body_separator_pat = None """Matches the row separator between head rows and body rows.""" def parse(self, block): """ Analyze the text `block` and return a table data structure. Given a plaintext-graphic table in `block` (list of lines of text; no whitespace padding), parse the table, construct and return the data necessary to construct a CALS table or equivalent. Raise `TableMarkupError` if there is any problem with the markup. """ self.setup(block) self.find_head_body_sep() self.parse_table() structure = self.structure_from_cells() return structure def find_head_body_sep(self): """Look for a head/body row separator line; store the line index.""" for i in range(len(self.block)): line = self.block[i] if self.head_body_separator_pat.match(line): if self.head_body_sep: raise TableMarkupError( 'Multiple head/body row separators in table (at line ' 'offset %s and %s); only one allowed.' % (self.head_body_sep, i)) else: self.head_body_sep = i self.block[i] = line.replace('=', '-') if self.head_body_sep == 0 or self.head_body_sep == (len(self.block) - 1): raise TableMarkupError('The head/body row separator may not be ' 'the first or last line of the table.') class GridTableParser(TableParser): """ Parse a grid table using `parse()`. Here's an example of a grid table:: +------------------------+------------+----------+----------+ | Header row, column 1 | Header 2 | Header 3 | Header 4 | +========================+============+==========+==========+ | body row 1, column 1 | column 2 | column 3 | column 4 | +------------------------+------------+----------+----------+ | body row 2 | Cells may span columns. | +------------------------+------------+---------------------+ | body row 3 | Cells may | - Table cells | +------------------------+ span rows. | - contain | | body row 4 | | - body elements. | +------------------------+------------+---------------------+ Intersections use '+', row separators use '-' (except for one optional head/body row separator, which uses '='), and column separators use '|'. Passing the above table to the `parse()` method will result in the following data structure:: ([24, 12, 10, 10], [[(0, 0, 1, ['Header row, column 1']), (0, 0, 1, ['Header 2']), (0, 0, 1, ['Header 3']), (0, 0, 1, ['Header 4'])]], [[(0, 0, 3, ['body row 1, column 1']), (0, 0, 3, ['column 2']), (0, 0, 3, ['column 3']), (0, 0, 3, ['column 4'])], [(0, 0, 5, ['body row 2']), (0, 2, 5, ['Cells may span columns.']), None, None], [(0, 0, 7, ['body row 3']), (1, 0, 7, ['Cells may', 'span rows.', '']), (1, 1, 7, ['- Table cells', '- contain', '- body elements.']), None], [(0, 0, 9, ['body row 4']), None, None, None]]) The first item is a list containing column widths (colspecs). The second item is a list of head rows, and the third is a list of body rows. Each row contains a list of cells. Each cell is either None (for a cell unused because of another cell's span), or a tuple. A cell tuple contains four items: the number of extra rows used by the cell in a vertical span (morerows); the number of extra columns used by the cell in a horizontal span (morecols); the line offset of the first line of the cell contents; and the cell contents, a list of lines of text. """ head_body_separator_pat = re.compile(r'\+=[=+]+=\+ *$') def setup(self, block): self.block = list(block) # make a copy; it may be modified self.bottom = len(block) - 1 self.right = len(block[0]) - 1 self.head_body_sep = None self.done = [-1] * len(block[0]) self.cells = [] self.rowseps = {0: [0]} self.colseps = {0: [0]} def parse_table(self): """ Start with a queue of upper-left corners, containing the upper-left corner of the table itself. Trace out one rectangular cell, remember it, and add its upper-right and lower-left corners to the queue of potential upper-left corners of further cells. Process the queue in top-to-bottom order, keeping track of how much of each text column has been seen. We'll end up knowing all the row and column boundaries, cell positions and their dimensions. """ corners = [(0, 0)] while corners: top, left = corners.pop(0) if top == self.bottom or left == self.right \ or top <= self.done[left]: continue result = self.scan_cell(top, left) if not result: continue bottom, right, rowseps, colseps = result update_dict_of_lists(self.rowseps, rowseps) update_dict_of_lists(self.colseps, colseps) self.mark_done(top, left, bottom, right) cellblock = self.get_cell_block(top, left, bottom, right) self.cells.append((top, left, bottom, right, cellblock)) corners.extend([(top, right), (bottom, left)]) corners.sort() if not self.check_parse_complete(): raise TableMarkupError('Malformed table; parse incomplete.') def mark_done(self, top, left, bottom, right): """For keeping track of how much of each text column has been seen.""" before = top - 1 after = bottom - 1 for col in range(left, right): assert self.done[col] == before self.done[col] = after def check_parse_complete(self): """Each text column should have been completely seen.""" last = self.bottom - 1 for col in range(self.right): if self.done[col] != last: return None return 1 def get_cell_block(self, top, left, bottom, right): """Given the corners, extract the text of a cell.""" cellblock = [] margin = right for lineno in range(top + 1, bottom): line = self.block[lineno][left + 1 : right].rstrip() cellblock.append(line) if line: margin = min(margin, len(line) - len(line.lstrip())) if 0 < margin < right: cellblock = [line[margin:] for line in cellblock] return cellblock def scan_cell(self, top, left): """Starting at the top-left corner, start tracing out a cell.""" assert self.block[top][left] == '+' result = self.scan_right(top, left) return result def scan_right(self, top, left): """ Look for the top-right corner of the cell, and make note of all column boundaries ('+'). """ colseps = {} line = self.block[top] for i in range(left + 1, self.right + 1): if line[i] == '+': colseps[i] = [top] result = self.scan_down(top, left, i) if result: bottom, rowseps, newcolseps = result update_dict_of_lists(colseps, newcolseps) return bottom, i, rowseps, colseps elif line[i] != '-': return None return None def scan_down(self, top, left, right): """ Look for the bottom-right corner of the cell, making note of all row boundaries. """ rowseps = {} for i in range(top + 1, self.bottom + 1): if self.block[i][right] == '+': rowseps[i] = [right] result = self.scan_left(top, left, i, right) if result: newrowseps, colseps = result update_dict_of_lists(rowseps, newrowseps) return i, rowseps, colseps elif self.block[i][right] != '|': return None return None def scan_left(self, top, left, bottom, right): """ Noting column boundaries, look for the bottom-left corner of the cell. It must line up with the starting point. """ colseps = {} line = self.block[bottom] for i in range(right - 1, left, -1): if line[i] == '+': colseps[i] = [bottom] elif line[i] != '-': return None if line[left] != '+': return None result = self.scan_up(top, left, bottom, right) if result is not None: rowseps = result return rowseps, colseps return None def scan_up(self, top, left, bottom, right): """ Noting row boundaries, see if we can return to the starting point. """ rowseps = {} for i in range(bottom - 1, top, -1): if self.block[i][left] == '+': rowseps[i] = [left] elif self.block[i][left] != '|': return None return rowseps def structure_from_cells(self): """ From the data colledted by `scan_cell()`, convert to the final data structure. """ rowseps = self.rowseps.keys() # list of row boundaries rowseps.sort() rowindex = {} for i in range(len(rowseps)): rowindex[rowseps[i]] = i # row boundary -> row number mapping colseps = self.colseps.keys() # list of column boundaries colseps.sort() colindex = {} for i in range(len(colseps)): colindex[colseps[i]] = i # column boundary -> col number map colspecs = [(colseps[i] - colseps[i - 1] - 1) for i in range(1, len(colseps))] # list of column widths # prepare an empty table with the correct number of rows & columns onerow = [None for i in range(len(colseps) - 1)] rows = [onerow[:] for i in range(len(rowseps) - 1)] # keep track of # of cells remaining; should reduce to zero remaining = (len(rowseps) - 1) * (len(colseps) - 1) for top, left, bottom, right, block in self.cells: rownum = rowindex[top] colnum = colindex[left] assert rows[rownum][colnum] is None, ( 'Cell (row %s, column %s) already used.' % (rownum + 1, colnum + 1)) morerows = rowindex[bottom] - rownum - 1 morecols = colindex[right] - colnum - 1 remaining -= (morerows + 1) * (morecols + 1) # write the cell into the table rows[rownum][colnum] = (morerows, morecols, top + 1, block) assert remaining == 0, 'Unused cells remaining.' if self.head_body_sep: # separate head rows from body rows numheadrows = rowindex[self.head_body_sep] headrows = rows[:numheadrows] bodyrows = rows[numheadrows:] else: headrows = [] bodyrows = rows return (colspecs, headrows, bodyrows) class SimpleTableParser(TableParser): """ Parse a simple table using `parse()`. Here's an example of a simple table:: ===== ===== col 1 col 2 ===== ===== 1 Second column of row 1. 2 Second column of row 2. Second line of paragraph. 3 - Second column of row 3. - Second item in bullet list (row 3, column 2). 4 is a span ------------ 5 ===== ===== Top and bottom borders use '=', column span underlines use '-', column separation is indicated with spaces. Passing the above table to the `parse()` method will result in the following data structure, whose interpretation is the same as for `GridTableParser`:: ([5, 25], [[(0, 0, 1, ['col 1']), (0, 0, 1, ['col 2'])]], [[(0, 0, 3, ['1']), (0, 0, 3, ['Second column of row 1.'])], [(0, 0, 4, ['2']), (0, 0, 4, ['Second column of row 2.', 'Second line of paragraph.'])], [(0, 0, 6, ['3']), (0, 0, 6, ['- Second column of row 3.', '', '- Second item in bullet', ' list (row 3, column 2).'])], [(0, 1, 10, ['4 is a span'])], [(0, 0, 12, ['5']), (0, 0, 12, [''])]]) """ head_body_separator_pat = re.compile('=[ =]*$') span_pat = re.compile('-[ -]*$') def setup(self, block): self.block = list(block) # make a copy; it will be modified # Convert top & bottom borders to column span underlines: self.block[0] = self.block[0].replace('=', '-') self.block[-1] = self.block[-1].replace('=', '-') self.head_body_sep = None self.columns = [] self.border_end = None self.table = [] self.done = [-1] * len(block[0]) self.rowseps = {0: [0]} self.colseps = {0: [0]} def parse_table(self): """ First determine the column boundaries from the top border, then process rows. Each row may consist of multiple lines; accumulate lines until a row is complete. Call `self.parse_row` to finish the job. """ # Top border must fully describe all table columns. self.columns = self.parse_columns(self.block[0], 0) self.border_end = self.columns[-1][1] firststart, firstend = self.columns[0] block = self.block[1:] offset = 0 # Container for accumulating text lines until a row is complete: rowlines = [] while block: line = block.pop(0) offset += 1 if self.span_pat.match(line): # Column span underline or border; row is complete. self.parse_row(rowlines, (line.rstrip(), offset)) rowlines = [] elif line[firststart:firstend].strip(): # First column not blank, therefore it's a new row. if rowlines: self.parse_row(rowlines) rowlines = [(line.rstrip(), offset)] else: # Accumulate lines of incomplete row. rowlines.append((line.rstrip(), offset)) def parse_columns(self, line, offset): """ Given a column span underline, return a list of (begin, end) pairs. """ cols = [] end = 0 while 1: begin = line.find('-', end) end = line.find(' ', begin) if begin < 0: break if end < 0: end = len(line) cols.append((begin, end)) if self.columns: if cols[-1][1] != self.border_end: raise TableMarkupError('Column span incomplete at line ' 'offset %s.' % offset) # Allow for an unbounded rightmost column: cols[-1] = (cols[-1][0], self.columns[-1][1]) return cols def init_row(self, colspec, offset): i = 0 cells = [] for start, end in colspec: morecols = 0 try: assert start == self.columns[i][0] while end != self.columns[i][1]: i += 1 morecols += 1 except (AssertionError, IndexError): raise TableMarkupError('Column span alignment problem at ' 'line offset %s.' % offset) cells.append((0, morecols, offset, [])) i += 1 return cells def parse_row(self, lines, spanline=None): """ Given the text `lines` of a row, parse it and append to `self.table`. The row is parsed according to the current column spec (either `spanline` if provided or `self.columns`). For each column, extract text from each line, and check for text in column margins. Finally, adjust for insigificant whitespace. """ while lines and not lines[-1][0]: lines.pop() # Remove blank trailing lines. if lines: offset = lines[0][1] elif spanline: offset = spanline[1] else: # No new row, just blank lines. return if spanline: columns = self.parse_columns(*spanline) else: columns = self.columns[:] row = self.init_row(columns, offset) # "Infinite" value for a dummy last column's beginning, used to # check for text overflow: columns.append((sys.maxint, None)) lastcol = len(columns) - 2 for i in range(len(columns) - 1): start, end = columns[i] nextstart = columns[i+1][0] block = [] margin = sys.maxint for line, offset in lines: if i == lastcol and line[end:].strip(): text = line[start:].rstrip() columns[lastcol] = (start, start + len(text)) self.adjust_last_column(start + len(text)) elif line[end:nextstart].strip(): raise TableMarkupError('Text in column margin at line ' 'offset %s.' % offset) else: text = line[start:end].rstrip() block.append(text) if text: margin = min(margin, len(text) - len(text.lstrip())) if 0 < margin < sys.maxint: block = [line[margin:] for line in block] row[i][3].extend(block) self.table.append(row) def adjust_last_column(self, new_end): start, end = self.columns[-1] if new_end > end: self.columns[-1] = (start, new_end) def structure_from_cells(self): colspecs = [end - start for start, end in self.columns] first_body_row = 0 if self.head_body_sep: for i in range(len(self.table)): if self.table[i][0][2] > self.head_body_sep: first_body_row = i break return (colspecs, self.table[:first_body_row], self.table[first_body_row:]) def update_dict_of_lists(master, newdata): """ Extend the list values of `master` with those from `newdata`. Both parameters must be dictionaries containing list values. """ for key, values in newdata.items(): master.setdefault(key, []).extend(values) From goodger@users.sourceforge.net Fri Nov 8 23:47:54 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:47:54 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/parsers/rst/directives .cvsignore,NONE,1.1 __init__.py,NONE,1.1 admonitions.py,NONE,1.1 body.py,NONE,1.1 html.py,NONE,1.1 images.py,NONE,1.1 misc.py,NONE,1.1 parts.py,NONE,1.1 references.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/parsers/rst/directives In directory usw-pr-cvs1:/tmp/cvs-serv8387/docutils/parsers/rst/directives Added Files: .cvsignore __init__.py admonitions.py body.py html.py images.py misc.py parts.py references.py Log Message: local copy of Docutils for PEP processing --- NEW FILE: .cvsignore --- *.pyc --- NEW FILE: __init__.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ This package contains directive implementation modules. The interface for directive functions is as follows:: def directive_fn(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): code... # Set function attributes: directive_fn.arguments = ... directive_fn.options = ... direcitve_fn.content = ... Parameters: - ``name`` is the directive type or name. - ``arguments`` is a list of positional arguments. - ``options`` is a dictionary mapping option names to values. - ``content`` is a list of strings, the directive content. - ``lineno`` is the line number of the first line of the directive. - ``content_offset`` is the line offset of the first line of the content from the beginning of the current input. Used when initiating a nested parse. - ``block_text`` is a string containing the entire directive. Include it as the content of a literal block in a system message if there is a problem. - ``state`` is the state which called the directive function. - ``state_machine`` is the state machine which controls the state which called the directive function. Function attributes, interpreted by the directive parser (which calls the directive function): - ``arguments``: A 3-tuple specifying the expected positional arguments, or ``None`` if the directive has no arguments. The 3 items in the tuple are ``(required, optional, whitespace OK in last argument)``: 1. The number of required arguments. 2. The number of optional arguments. 3. A boolean, indicating if the final argument may contain whitespace. Arguments are normally single whitespace-separated words. The final argument may contain whitespace if the third item in the argument spec tuple is 1/True. If the form of the arguments is more complex, specify only one argument (either required or optional) and indicate that final whitespace is OK; the client code must do any context-sensitive parsing. - ``options``: A dictionary, mapping known option names to conversion functions such as `int` or `float`. ``None`` or an empty dict implies no options to parse. - ``content``: A boolean; true if content is allowed. Client code must handle the case where content is required but not supplied (an empty content list will be supplied). Directive functions return a list of nodes which will be inserted into the document tree at the point where the directive was encountered (can be an empty list). See `Creating reStructuredText Directives`_ for more information. .. _Creating reStructuredText Directives: http://docutils.sourceforge.net/spec/howto/rst-directives.html """ __docformat__ = 'reStructuredText' from docutils import nodes from docutils.parsers.rst.languages import en as _fallback_language_module _directive_registry = { 'attention': ('admonitions', 'attention'), 'caution': ('admonitions', 'caution'), 'danger': ('admonitions', 'danger'), 'error': ('admonitions', 'error'), 'important': ('admonitions', 'important'), 'note': ('admonitions', 'note'), 'tip': ('admonitions', 'tip'), 'hint': ('admonitions', 'hint'), 'warning': ('admonitions', 'warning'), 'topic': ('body', 'topic'), 'line-block': ('body', 'line_block'), 'parsed-literal': ('body', 'parsed_literal'), #'questions': ('body', 'question_list'), 'image': ('images', 'image'), 'figure': ('images', 'figure'), 'contents': ('parts', 'contents'), 'sectnum': ('parts', 'sectnum'), #'footnotes': ('parts', 'footnotes'), #'citations': ('parts', 'citations'), 'target-notes': ('references', 'target_notes'), 'meta': ('html', 'meta'), #'imagemap': ('html', 'imagemap'), 'raw': ('misc', 'raw'), 'include': ('misc', 'include'), 'replace': ('misc', 'replace'), 'restructuredtext-test-directive': ('misc', 'directive_test_function'),} """Mapping of directive name to (module name, function name). The directive name is canonical & must be lowercase. Language-dependent names are defined in the ``language`` subpackage.""" _modules = {} """Cache of imported directive modules.""" _directives = {} """Cache of imported directive functions.""" def directive(directive_name, language_module, document): """ Locate and return a directive function from its language-dependent name. If not found in the current language, check English. """ normname = directive_name.lower() messages = [] if _directives.has_key(normname): return _directives[normname], messages try: canonicalname = language_module.directives[normname] except (KeyError, AttributeError): msg_text = ('No directive entry for "%s" in module "%s".' % (directive_name, language_module.__name__)) try: canonicalname = _fallback_language_module.directives[normname] msg_text += ('\nUsing English fallback for directive "%s".' % directive_name) except KeyError: msg_text += ('\nTrying "%s" as canonical directive name.' % directive_name) # The canonical name should be an English name, but just in case: canonicalname = normname warning = document.reporter.warning( msg_text, line=document.current_line) messages.append(warning) try: modulename, functionname = _directive_registry[canonicalname] except KeyError: return None, messages if _modules.has_key(modulename): module = _modules[modulename] else: try: module = __import__(modulename, globals(), locals()) except ImportError: return None, messages try: function = getattr(module, functionname) _directives[normname] = function except AttributeError: return None, messages return function, messages def flag(argument): """ Check for a valid flag option (no argument) and return ``None``. Raise ``ValueError`` if an argument is found. """ if argument and argument.strip(): raise ValueError('no argument is allowed; "%s" supplied' % argument) else: return None def unchanged(argument): """ Return the argument, unchanged. Raise ``ValueError`` if no argument is found. """ if argument is None: raise ValueError('argument required but none supplied') else: return argument # unchanged! def path(argument): """ Return the path argument unwrapped (with newlines removed). Raise ``ValueError`` if no argument is found or if the path contains internal whitespace. """ if argument is None: raise ValueError('argument required but none supplied') else: path = ''.join([s.strip() for s in argument.splitlines()]) if path.find(' ') == -1: return path else: raise ValueError('path contains whitespace') def nonnegative_int(argument): """ Check for a nonnegative integer argument; raise ``ValueError`` if not. """ value = int(argument) if value < 0: raise ValueError('negative value; must be positive or zero') return value def format_values(values): return '%s, or "%s"' % (', '.join(['"%s"' % s for s in values[:-1]]), values[-1]) def choice(argument, values): try: value = argument.lower().strip() except AttributeError: raise ValueError('must supply an argument; choose from %s' % format_values(values)) if value in values: return value else: raise ValueError('"%s" unknown; choose from %s' % (argument, format_values(values))) --- NEW FILE: admonitions.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ Admonition directives. """ __docformat__ = 'reStructuredText' from docutils.parsers.rst import states from docutils import nodes def admonition(node_class, name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): text = '\n'.join(content) admonition_node = node_class(text) if text: state.nested_parse(content, content_offset, admonition_node) return [admonition_node] else: error = state_machine.reporter.error( 'The "%s" admonition is empty; content required.' % (name), nodes.literal_block(block_text, block_text), line=lineno) return [error] def attention(*args): return admonition(nodes.attention, *args) attention.content = 1 def caution(*args): return admonition(nodes.caution, *args) caution.content = 1 def danger(*args): return admonition(nodes.danger, *args) danger.content = 1 def error(*args): return admonition(nodes.error, *args) error.content = 1 def important(*args): return admonition(nodes.important, *args) important.content = 1 def note(*args): return admonition(nodes.note, *args) note.content = 1 def tip(*args): return admonition(nodes.tip, *args) tip.content = 1 def hint(*args): return admonition(nodes.hint, *args) hint.content = 1 def warning(*args): return admonition(nodes.warning, *args) warning.content = 1 --- NEW FILE: body.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ Directives for additional body elements. """ __docformat__ = 'reStructuredText' import sys from docutils import nodes def topic(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): if not state_machine.match_titles: error = state_machine.reporter.error( 'Topics may not be nested within topics or body elements.', nodes.literal_block(block_text, block_text), line=lineno) return [error] if not content: warning = state_machine.reporter.warning( 'Content block expected for the "%s" directive; none found.' % name, nodes.literal_block(block_text, block_text), line=lineno) return [warning] title_text = arguments[0] textnodes, messages = state.inline_text(title_text, lineno) title = nodes.title(title_text, '', *textnodes) text = '\n'.join(content) topic_node = nodes.topic(text, title, *messages) if text: state.nested_parse(content, content_offset, topic_node) return [topic_node] topic.arguments = (1, 0, 1) topic.content = 1 def line_block(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine, node_class=nodes.line_block): if not content: warning = state_machine.reporter.warning( 'Content block expected for the "%s" directive; none found.' % name, nodes.literal_block(block_text, block_text), line=lineno) return [warning] text = '\n'.join(content) text_nodes, messages = state.inline_text(text, lineno) node = node_class(text, '', *text_nodes) return [node] + messages line_block.content = 1 def parsed_literal(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): return line_block(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine, node_class=nodes.literal_block) parsed_literal.content = 1 --- NEW FILE: html.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ Directives for typically HTML-specific constructs. """ __docformat__ = 'reStructuredText' import sys from docutils import nodes, utils from docutils.parsers.rst import states from docutils.transforms import components def meta(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): node = nodes.Element() if content: new_line_offset, blank_finish = state.nested_list_parse( content, content_offset, node, initial_state='MetaBody', blank_finish=1, state_machine_kwargs=metaSMkwargs) if (new_line_offset - content_offset) != len(content): # incomplete parse of block? error = state_machine.reporter.error( 'Invalid meta directive.', nodes.literal_block(block_text, block_text), line=lineno) node += error else: error = state_machine.reporter.error( 'Empty meta directive.', nodes.literal_block(block_text, block_text), line=lineno) node += error return node.get_children() meta.content = 1 def imagemap(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): return [] class MetaBody(states.SpecializedBody): class meta(nodes.Special, nodes.PreBibliographic, nodes.Element): """HTML-specific "meta" element.""" pass def field_marker(self, match, context, next_state): """Meta element.""" node, blank_finish = self.parsemeta(match) self.parent += node return [], next_state, [] def parsemeta(self, match): name = self.parse_field_marker(match) indented, indent, line_offset, blank_finish = \ self.state_machine.get_first_known_indented(match.end()) node = self.meta() pending = nodes.pending(components.Filter, {'component': 'writer', 'format': 'html', 'nodes': [node]}) node['content'] = ' '.join(indented) if not indented: line = self.state_machine.line msg = self.reporter.info( 'No content for meta tag "%s".' % name, nodes.literal_block(line, line), line=self.state_machine.abs_line_number()) return msg, blank_finish tokens = name.split() try: attname, val = utils.extract_name_value(tokens[0])[0] node[attname.lower()] = val except utils.NameValueError: node['name'] = tokens[0] for token in tokens[1:]: try: attname, val = utils.extract_name_value(token)[0] node[attname.lower()] = val except utils.NameValueError, detail: line = self.state_machine.line msg = self.reporter.error( 'Error parsing meta tag attribute "%s": %s.' % (token, detail), nodes.literal_block(line, line), line=self.state_machine.abs_line_number()) return msg, blank_finish self.document.note_pending(pending) return pending, blank_finish metaSMkwargs = {'state_classes': (MetaBody,)} --- NEW FILE: images.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ Directives for figures and simple images. """ __docformat__ = 'reStructuredText' import sys from docutils import nodes, utils from docutils.parsers.rst import directives align_values = ('top', 'middle', 'bottom', 'left', 'center', 'right') def align(argument): return directives.choice(argument, align_values) def image(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): reference = ''.join(arguments[0].split('\n')) if reference.find(' ') != -1: error = state_machine.reporter.error( 'Image URI contains whitespace.', nodes.literal_block(block_text, block_text), line=lineno) return [error] options['uri'] = reference image_node = nodes.image(block_text, **options) return [image_node] image.arguments = (1, 0, 1) image.options = {'alt': directives.unchanged, 'height': directives.nonnegative_int, 'width': directives.nonnegative_int, 'scale': directives.nonnegative_int, 'align': align} def figure(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): (image_node,) = image(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine) if isinstance(image_node, nodes.system_message): return [image_node] figure_node = nodes.figure('', image_node) if content: node = nodes.Element() # anonymous container for parsing state.nested_parse(content, content_offset, node) first_node = node[0] if isinstance(first_node, nodes.paragraph): caption = nodes.caption(first_node.rawsource, '', *first_node.children) figure_node += caption elif not (isinstance(first_node, nodes.comment) and len(first_node) == 0): error = state_machine.reporter.error( 'Figure caption must be a paragraph or empty comment.', nodes.literal_block(block_text, block_text), line=lineno) return [figure_node, error] if len(node) > 1: figure_node += nodes.legend('', *node[1:]) return [figure_node] figure.arguments = (1, 0, 1) figure.options = image.options figure.content = 1 --- NEW FILE: misc.py --- # Authors: David Goodger, Dethe Elza # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """Miscellaneous directives.""" __docformat__ = 'reStructuredText' import sys import os.path from urllib2 import urlopen, URLError from docutils import nodes, statemachine, utils from docutils.parsers.rst import directives, states def include(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """Include a reST file as part of the content of this reST file.""" source_dir = os.path.dirname( os.path.abspath(state.document.current_source)) path = ''.join(arguments[0].splitlines()) if path.find(' ') != -1: error = state_machine.reporter.error( '"%s" directive path contains whitespace.' % name, nodes.literal_block(block_text, block_text), line=lineno) return [error] path = os.path.normpath(os.path.join(source_dir, path)) path = utils.relative_path(None, path) try: include_file = open(path) except IOError, error: severe = state_machine.reporter.severe( 'Problems with "%s" directive path:\n%s.' % (name, error), nodes.literal_block(block_text, block_text), line=lineno) return [severe] include_text = include_file.read() include_file.close() if options.has_key('literal'): literal_block = nodes.literal_block(include_text, include_text, source=path) literal_block.line = 1 return literal_block else: include_lines = statemachine.string2lines(include_text, convert_whitespace=1) state_machine.insert_input(include_lines, path) return [] include.arguments = (1, 0, 1) include.options = {'literal': directives.flag} def raw(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """ Pass through content unchanged Content is included in output based on type argument Content may be included inline (content section of directive) or imported from a file or url. """ attributes = {'format': arguments[0]} if content: if options.has_key('file') or options.has_key('url'): error = state_machine.reporter.error( '"%s" directive may not both specify an external file and ' 'have content.' % name, nodes.literal_block(block_text, block_text), line=lineno) return [error] text = '\n'.join(content) elif options.has_key('file'): if options.has_key('url'): error = state_machine.reporter.error( 'The "file" and "url" options may not be simultaneously ' 'specified for the "%s" directive.' % name, nodes.literal_block(block_text, block_text), line=lineno) return [error] source_dir = os.path.dirname( os.path.abspath(state.document.current_source)) path = os.path.normpath(os.path.join(source_dir, options['file'])) path = utils.relative_path(None, path) try: raw_file = open(path) except IOError, error: severe = state_machine.reporter.severe( 'Problems with "%s" directive path:\n%s.' % (name, error), nodes.literal_block(block_text, block_text), line=lineno) return [severe] text = raw_file.read() raw_file.close() attributes['source'] = path elif options.has_key('url'): try: raw_file = urlopen(options['url']) except (URLError, IOError, OSError), error: severe = state_machine.reporter.severe( 'Problems with "%s" directive URL "%s":\n%s.' % (name, options['url'], error), nodes.literal_block(block_text, block_text), line=lineno) return [severe] text = raw_file.read() raw_file.close() attributes['source'] = options['file'] else: error = state_machine.reporter.warning( 'The "%s" directive requires content; none supplied.' % (name), nodes.literal_block(block_text, block_text), line=lineno) return [error] raw_node = nodes.raw('', text, **attributes) return [raw_node] raw.arguments = (1, 0, 1) raw.options = {'file': directives.path, 'url': directives.path} raw.content = 1 def replace(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): if not isinstance(state, states.SubstitutionDef): error = state_machine.reporter.error( 'Invalid context: the "%s" directive can only be used within a ' 'substitution definition.' % (name), nodes.literal_block(block_text, block_text), line=lineno) return [error] text = '\n'.join(content) element = nodes.Element(text) if text: state.nested_parse(content, content_offset, element) if len(element) != 1 or not isinstance(element[0], nodes.paragraph): messages = [] for node in element: if isinstance(node, nodes.system_message): if node.has_key('backrefs'): del node['backrefs'] messages.append(node) error = state_machine.reporter.error( 'Error in "%s" directive: may contain a single paragraph ' 'only.' % (name), line=lineno) messages.append(error) return messages else: return element[0].children else: error = state_machine.reporter.error( 'The "%s" directive is empty; content required.' % (name), line=lineno) return [error] replace.content = 1 def directive_test_function(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): if content: text = '\n'.join(content) info = state_machine.reporter.info( 'Directive processed. Type="%s", arguments=%r, options=%r, ' 'content:' % (name, arguments, options), nodes.literal_block(text, text), line=lineno) else: info = state_machine.reporter.info( 'Directive processed. Type="%s", arguments=%r, options=%r, ' 'content: None' % (name, arguments, options), line=lineno) return [info] directive_test_function.arguments = (0, 1, 1) directive_test_function.options = {'option': directives.unchanged} directive_test_function.content = 1 --- NEW FILE: parts.py --- # Author: David Goodger, Dmitry Jemerov # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ Directives for document parts. """ __docformat__ = 'reStructuredText' from docutils import nodes from docutils.transforms import parts from docutils.parsers.rst import directives backlinks_values = ('top', 'entry', 'none') def backlinks(arg): value = directives.choice(arg, backlinks_values) if value == 'none': return None else: return value def contents(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """Table of contents.""" if arguments: title_text = arguments[0] text_nodes, messages = state.inline_text(title_text, lineno) title = nodes.title(title_text, '', *text_nodes) else: messages = [] title = None pending = nodes.pending(parts.Contents, {'title': title}, block_text) pending.details.update(options) state_machine.document.note_pending(pending) return [pending] + messages contents.arguments = (0, 1, 1) contents.options = {'depth': directives.nonnegative_int, 'local': directives.flag, 'backlinks': backlinks} def sectnum(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """Automatic section numbering.""" pending = nodes.pending(parts.SectNum) pending.details.update(options) state_machine.document.note_pending(pending) return [pending] sectnum.options = {'depth': int} --- NEW FILE: references.py --- # Author: David Goodger, Dmitry Jemerov # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:52 $ # Copyright: This module has been placed in the public domain. """ Directives for references and targets. """ __docformat__ = 'reStructuredText' from docutils import nodes from docutils.transforms import references def target_notes(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """Target footnote generation.""" pending = nodes.pending(references.TargetNotes) state_machine.document.note_pending(pending) nodelist = [pending] return nodelist From goodger@users.sourceforge.net Fri Nov 8 23:47:53 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:47:53 -0800 Subject: [Python-checkins] python/nondist/peps/docutils .cvsignore,NONE,1.1 __init__.py,NONE,1.1 core.py,NONE,1.1 frontend.py,NONE,1.1 io.py,NONE,1.1 nodes.py,NONE,1.1 optik.py,NONE,1.1 roman.py,NONE,1.1 statemachine.py,NONE,1.1 urischemes.py,NONE,1.1 utils.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils In directory usw-pr-cvs1:/tmp/cvs-serv8387/docutils Added Files: .cvsignore __init__.py core.py frontend.py io.py nodes.py optik.py roman.py statemachine.py urischemes.py utils.py Log Message: local copy of Docutils for PEP processing --- NEW FILE: .cvsignore --- *.pyc --- NEW FILE: __init__.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ This is the Docutils (Python Documentation Utilities) package. Package Structure ================= Modules: - __init__.py: Contains the package docstring only (this text). - core.py: Contains the ``Publisher`` class and ``publish()`` convenience function. - frontend.py: Command-line and common processing for Docutils front-ends. - io.py: Provides a uniform API for low-level input and output. - nodes.py: Docutils document tree (doctree) node class library. - optik.py: Option parsing and command-line help; from Greg Ward's http://optik.sf.net/ project, included for convenience. - roman.py: Conversion to and from Roman numerals. Courtesy of Mark Pilgrim (http://diveintopython.org/). - statemachine.py: A finite state machine specialized for regular-expression-based text filters. - urischemes.py: Contains a complete mapping of known URI addressing scheme names to descriptions. - utils.py: Contains the ``Reporter`` system warning class and miscellaneous utilities. Subpackages: - languages: Language-specific mappings of terms. - parsers: Syntax-specific input parser modules or packages. - readers: Context-specific input handlers which understand the data source and manage a parser. - transforms: Modules used by readers and writers to modify DPS doctrees. - writers: Format-specific output translators. """ __docformat__ = 'reStructuredText' __version__ = '0.2.8' """``major.minor.micro`` version number. The micro number is bumped any time there's a change in the API incompatible with one of the front ends. The minor number is bumped whenever there is a project release. The major number will be bumped when the project is complete, and perhaps if there is a major change in the design.""" class ApplicationError(StandardError): pass class DataError(ApplicationError): pass class SettingsSpec: """ Runtime setting specification base class. SettingsSpec subclass objects used by `docutils.frontend.OptionParser`. """ settings_spec = () """Runtime settings specification. Override in subclasses. Specifies runtime settings and associated command-line options, as used by `docutils.frontend.OptionParser`. This tuple contains one or more sets of option group title, description, and a list/tuple of tuples: ``('help text', [list of option strings], {keyword arguments})``. Group title and/or description may be `None`; no group title implies no group, just a list of single options. Runtime settings names are derived implicitly from long option names ("--a-setting" becomes ``settings.a_setting``) or explicitly from the "destination" keyword argument.""" settings_default_overrides = None """A dictionary of auxiliary defaults, to override defaults for settings defined in other components. Override in subclasses.""" relative_path_settings = () """Settings containing filesystem paths. Override in subclasses. Settings listed here are to be interpreted relative to the current working directory.""" class TransformSpec: """ Runtime transform specification base class. TransformSpec subclass objects used by `docutils.transforms.Transformer`. """ default_transforms = () """Transforms required by this class. Override in subclasses.""" class Component(SettingsSpec, TransformSpec): """Base class for Docutils components.""" component_type = None """Override in subclasses.""" supported = () """Names for this component. Override in subclasses.""" def supports(self, format): """ Is `format` supported by this component? To be used by transforms to ask the dependent component if it supports a certain input context or output format. """ return format in self.supported --- NEW FILE: core.py --- # Authors: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ Calling the ``publish_*`` convenience functions (or instantiating a `Publisher` object) with component names will result in default behavior. For custom behavior (setting component options), create custom component objects first, and pass *them* to ``publish_*``/`Publisher`. """ __docformat__ = 'reStructuredText' import sys from docutils import Component from docutils import frontend, io, readers, parsers, writers from docutils.frontend import OptionParser, ConfigParser class Publisher: """ A facade encapsulating the high-level logic of a Docutils system. """ def __init__(self, reader=None, parser=None, writer=None, source=None, source_class=io.FileInput, destination=None, destination_class=io.FileOutput, settings=None): """ Initial setup. If any of `reader`, `parser`, or `writer` are not specified, the corresponding ``set_...`` method should be called with a component name (`set_reader` sets the parser as well). """ self.reader = reader """A `readers.Reader` instance.""" self.parser = parser """A `parsers.Parser` instance.""" self.writer = writer """A `writers.Writer` instance.""" self.source = source """The source of input data, an `io.Input` instance.""" self.source_class = source_class """The class for dynamically created source objects.""" self.destination = destination """The destination for docutils output, an `io.Output` instance.""" self.destination_class = destination_class """The class for dynamically created destination objects.""" self.settings = settings """An object containing Docutils settings as instance attributes. Set by `self.process_command_line()` or `self.get_settings()`.""" def set_reader(self, reader_name, parser, parser_name): """Set `self.reader` by name.""" reader_class = readers.get_reader_class(reader_name) self.reader = reader_class(parser, parser_name) self.parser = self.reader.parser def set_writer(self, writer_name): """Set `self.writer` by name.""" writer_class = writers.get_writer_class(writer_name) self.writer = writer_class() def set_components(self, reader_name, parser_name, writer_name): if self.reader is None: self.set_reader(reader_name, self.parser, parser_name) if self.parser is None: if self.reader.parser is None: self.reader.set_parser(parser_name) self.parser = self.reader.parser if self.writer is None: self.set_writer(writer_name) def setup_option_parser(self, usage=None, description=None, settings_spec=None, **defaults): #@@@ Add self.source & self.destination to components in future? option_parser = OptionParser( components=(settings_spec, self.parser, self.reader, self.writer), usage=usage, description=description) config = ConfigParser() config.read_standard_files() config_settings = config.get_section('options') frontend.make_paths_absolute(config_settings, option_parser.relative_path_settings) defaults.update(config_settings) option_parser.set_defaults(**defaults) return option_parser def get_settings(self, usage=None, description=None, settings_spec=None, **defaults): """ Set and return default settings (overrides in `defaults` keyword argument). Set components first (`self.set_reader` & `self.set_writer`). Explicitly setting `self.settings` disables command line option processing from `self.publish()`. """ option_parser = self.setup_option_parser(usage, description, settings_spec, **defaults) self.settings = option_parser.get_default_values() return self.settings def process_command_line(self, argv=None, usage=None, description=None, settings_spec=None, **defaults): """ Pass an empty list to `argv` to avoid reading `sys.argv` (the default). Set components first (`self.set_reader` & `self.set_writer`). """ option_parser = self.setup_option_parser(usage, description, settings_spec, **defaults) if argv is None: argv = sys.argv[1:] self.settings = option_parser.parse_args(argv) def set_io(self, source_path=None, destination_path=None): if self.source is None: self.set_source(source_path=source_path) if self.destination is None: self.set_destination(destination_path=destination_path) def set_source(self, source=None, source_path=None): if source_path is None: source_path = self.settings._source else: self.settings._source = source_path self.source = self.source_class(self.settings, source=source, source_path=source_path) def set_destination(self, destination=None, destination_path=None): if destination_path is None: destination_path = self.settings._destination else: self.settings._destination = destination_path self.destination = self.destination_class( self.settings, destination=destination, destination_path=destination_path) def apply_transforms(self, document): document.transformer.populate_from_components( (self.source, self.reader, self.reader.parser, self.writer, self.destination)) document.transformer.apply_transforms() def publish(self, argv=None, usage=None, description=None, settings_spec=None, settings_overrides=None): """ Process command line options and arguments (if `self.settings` not already set), run `self.reader` and then `self.writer`. Return `self.writer`'s output. """ if self.settings is None: self.process_command_line(argv, usage, description, settings_spec, **(settings_overrides or {})) elif settings_overrides: self.settings._update(settings_overrides, 'loose') self.set_io() document = self.reader.read(self.source, self.parser, self.settings) self.apply_transforms(document) output = self.writer.write(document, self.destination) if self.settings.dump_settings: from pprint import pformat print >>sys.stderr, '\n::: Runtime settings:' print >>sys.stderr, pformat(self.settings.__dict__) if self.settings.dump_internals: from pprint import pformat print >>sys.stderr, '\n::: Document internals:' print >>sys.stderr, pformat(document.__dict__) if self.settings.dump_transforms: from pprint import pformat print >>sys.stderr, '\n::: Transforms applied:' print >>sys.stderr, pformat(document.transformer.applied) if self.settings.dump_pseudo_xml: print >>sys.stderr, '\n::: Pseudo-XML:' print >>sys.stderr, document.pformat().encode( 'raw_unicode_escape') return output default_usage = '%prog [options] [ []]' default_description = ('Reads from (default is stdin) and writes to ' ' (default is stdout).') def publish_cmdline(reader=None, reader_name='standalone', parser=None, parser_name='restructuredtext', writer=None, writer_name='pseudoxml', settings=None, settings_spec=None, settings_overrides=None, argv=None, usage=default_usage, description=default_description): """ Set up & run a `Publisher`. For command-line front ends. Parameters: - `reader`: A `docutils.readers.Reader` object. - `reader_name`: Name or alias of the Reader class to be instantiated if no `reader` supplied. - `parser`: A `docutils.parsers.Parser` object. - `parser_name`: Name or alias of the Parser class to be instantiated if no `parser` supplied. - `writer`: A `docutils.writers.Writer` object. - `writer_name`: Name or alias of the Writer class to be instantiated if no `writer` supplied. - `settings`: Runtime settings object. - `settings_spec`: Extra settings specification; a `docutils.SettingsSpec` subclass. Used only if no `settings` specified. - `settings_overrides`: A dictionary containing program-specific overrides of component settings. - `argv`: Command-line argument list to use instead of ``sys.argv[1:]``. - `usage`: Usage string, output if there's a problem parsing the command line. - `description`: Program description, output for the "--help" option (along with command-line option descriptions). """ pub = Publisher(reader, parser, writer, settings=settings) pub.set_components(reader_name, parser_name, writer_name) pub.publish(argv, usage, description, settings_spec, settings_overrides) def publish_file(source=None, source_path=None, destination=None, destination_path=None, reader=None, reader_name='standalone', parser=None, parser_name='restructuredtext', writer=None, writer_name='pseudoxml', settings=None, settings_spec=None, settings_overrides=None): """ Set up & run a `Publisher`. For programmatic use with file-like I/O. Parameters: - `source`: A file-like object (must have "read" and "close" methods). - `source_path`: Path to the input file. Opened if no `source` supplied. If neither `source` nor `source_path` are supplied, `sys.stdin` is used. - `destination`: A file-like object (must have "write" and "close" methods). - `destination_path`: Path to the input file. Opened if no `destination` supplied. If neither `destination` nor `destination_path` are supplied, `sys.stdout` is used. - `reader`: A `docutils.readers.Reader` object. - `reader_name`: Name or alias of the Reader class to be instantiated if no `reader` supplied. - `parser`: A `docutils.parsers.Parser` object. - `parser_name`: Name or alias of the Parser class to be instantiated if no `parser` supplied. - `writer`: A `docutils.writers.Writer` object. - `writer_name`: Name or alias of the Writer class to be instantiated if no `writer` supplied. - `settings`: Runtime settings object. - `settings_spec`: Extra settings specification; a `docutils.SettingsSpec` subclass. Used only if no `settings` specified. - `settings_overrides`: A dictionary containing program-specific overrides of component settings. """ pub = Publisher(reader, parser, writer, settings=settings) pub.set_components(reader_name, parser_name, writer_name) if settings is None: settings = pub.get_settings(settings_spec=settings_spec) if settings_overrides: settings._update(settings_overrides, 'loose') pub.set_source(source, source_path) pub.set_destination(destination, destination_path) pub.publish() def publish_string(source, source_path=None, destination_path=None, reader=None, reader_name='standalone', parser=None, parser_name='restructuredtext', writer=None, writer_name='pseudoxml', settings=None, settings_spec=None, settings_overrides=None): """ Set up & run a `Publisher`, and return the string output. For programmatic use with string I/O. For encoded string output, be sure to set the "output_encoding" setting to the desired encoding. Set it to "unicode" for unencoded Unicode string output. Parameters: - `source`: An input string; required. This can be an encoded 8-bit string (set the "input_encoding" setting to the correct encoding) or a Unicode string (set the "input_encoding" setting to "unicode"). - `source_path`: Path to the file or object that produced `source`; optional. Only used for diagnostic output. - `destination_path`: Path to the file or object which will receive the output; optional. Used for determining relative paths (stylesheets, source links, etc.). - `reader`: A `docutils.readers.Reader` object. - `reader_name`: Name or alias of the Reader class to be instantiated if no `reader` supplied. - `parser`: A `docutils.parsers.Parser` object. - `parser_name`: Name or alias of the Parser class to be instantiated if no `parser` supplied. - `writer`: A `docutils.writers.Writer` object. - `writer_name`: Name or alias of the Writer class to be instantiated if no `writer` supplied. - `settings`: Runtime settings object. - `settings_spec`: Extra settings specification; a `docutils.SettingsSpec` subclass. Used only if no `settings` specified. - `settings_overrides`: A dictionary containing program-specific overrides of component settings. """ pub = Publisher(reader, parser, writer, settings=settings, source_class=io.StringInput, destination_class=io.StringOutput) pub.set_components(reader_name, parser_name, writer_name) if settings is None: settings = pub.get_settings(settings_spec=settings_spec) if settings_overrides: settings._update(settings_overrides, 'loose') pub.set_source(source, source_path) pub.set_destination(destination_path=destination_path) return pub.publish() --- NEW FILE: frontend.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ Command-line and common processing for Docutils front-end tools. Exports the following classes: - `OptionParser`: Standard Docutils command-line processing. - `Values`: Runtime settings; objects are simple structs (``object.attribute``). - `ConfigParser`: Standard Docutils config file processing. """ __docformat__ = 'reStructuredText' import os import os.path import ConfigParser as CP import docutils from docutils import optik from docutils.optik import Values def store_multiple(option, opt, value, parser, *args, **kwargs): """ Store multiple values in `parser.values`. (Option callback.) Store `None` for each attribute named in `args`, and store the value for each key (attribute name) in `kwargs`. """ for attribute in args: setattr(parser.values, attribute, None) for key, value in kwargs.items(): setattr(parser.values, key, value) def read_config_file(option, opt, value, parser): """ Read a configuration file during option processing. (Option callback.) """ config_parser = ConfigParser() config_parser.read(value) settings = config_parser.get_section('options') make_paths_absolute(settings, parser.relative_path_settings, os.path.dirname(value)) parser.values.__dict__.update(settings) def make_paths_absolute(pathdict, keys, base_path=None): """ Interpret filesystem path settings relative to the `base_path` given. Paths are values in `pathdict` whose keys are in `keys`. Get `keys` from `OptionParser.relative_path_settings`. """ if base_path is None: base_path = os.getcwd() for key in keys: if pathdict.has_key(key) and pathdict[key]: pathdict[key] = os.path.normpath( os.path.abspath(os.path.join(base_path, pathdict[key]))) class OptionParser(optik.OptionParser, docutils.SettingsSpec): """ Parser for command-line and library use. The `settings_spec` specification here and in other Docutils components are merged to build the set of command-line options and runtime settings for this process. Common settings (defined below) and component-specific settings must not conflict. Short options are reserved for common settings, and components are restrict to using long options. """ threshold_choices = 'info 1 warning 2 error 3 severe 4 none 5'.split() """Possible inputs for for --report and --halt threshold values.""" thresholds = {'info': 1, 'warning': 2, 'error': 3, 'severe': 4, 'none': 5} """Lookup table for --report and --halt threshold values.""" settings_spec = ( 'General Docutils Options', None, (('Include a "Generated by Docutils" credit and link at the end ' 'of the document.', ['--generator', '-g'], {'action': 'store_true'}), ('Do not include a generator credit.', ['--no-generator'], {'action': 'store_false', 'dest': 'generator'}), ('Include the date at the end of the document (UTC).', ['--date', '-d'], {'action': 'store_const', 'const': '%Y-%m-%d', 'dest': 'datestamp'}), ('Include the time & date at the end of the document (UTC).', ['--time', '-t'], {'action': 'store_const', 'const': '%Y-%m-%d %H:%M UTC', 'dest': 'datestamp'}), ('Do not include a datestamp of any kind.', ['--no-datestamp'], {'action': 'store_const', 'const': None, 'dest': 'datestamp'}), ('Include a "View document source" link (relative to destination).', ['--source-link', '-s'], {'action': 'store_true'}), ('Use the supplied verbatim for a "View document source" ' 'link; implies --source-link.', ['--source-url'], {'metavar': ''}), ('Do not include a "View document source" link.', ['--no-source-link'], {'action': 'callback', 'callback': store_multiple, 'callback_args': ('source_link', 'source_url')}), ('Enable backlinks from section headers to table of contents ' 'entries. This is the default.', ['--toc-entry-backlinks'], {'dest': 'toc_backlinks', 'action': 'store_const', 'const': 'entry', 'default': 'entry'}), ('Enable backlinks from section headers to the top of the table of ' 'contents.', ['--toc-top-backlinks'], {'dest': 'toc_backlinks', 'action': 'store_const', 'const': 'top'}), ('Disable backlinks to the table of contents.', ['--no-toc-backlinks'], {'dest': 'toc_backlinks', 'action': 'store_false'}), ('Enable backlinks from footnotes and citations to their ' 'references. This is the default.', ['--footnote-backlinks'], {'action': 'store_true', 'default': 1}), ('Disable backlinks from footnotes and citations.', ['--no-footnote-backlinks'], {'dest': 'footnote_backlinks', 'action': 'store_false'}), ('Set verbosity threshold; report system messages at or higher than ' ' (by name or number: "info" or "1", warning/2, error/3, ' 'severe/4; also, "none" or "5"). Default is 2 (warning).', ['--report', '-r'], {'choices': threshold_choices, 'default': 2, 'dest': 'report_level', 'metavar': ''}), ('Report all system messages, info-level and higher. (Same as ' '"--report=info".)', ['--verbose', '-v'], {'action': 'store_const', 'const': 'info', 'dest': 'report_level'}), ('Do not report any system messages. (Same as "--report=none".)', ['--quiet', '-q'], {'action': 'store_const', 'const': 'none', 'dest': 'report_level'}), ('Set the threshold () at or above which system messages are ' 'converted to exceptions, halting execution immediately. Levels ' 'as in --report. Default is 4 (severe).', ['--halt'], {'choices': threshold_choices, 'dest': 'halt_level', 'default': 4, 'metavar': ''}), ('Same as "--halt=info": halt processing at the slightest problem.', ['--strict'], {'action': 'store_const', 'const': 'info', 'dest': 'halt_level'}), ('Report debug-level system messages.', ['--debug'], {'action': 'store_true'}), ('Do not report debug-level system messages.', ['--no-debug'], {'action': 'store_false', 'dest': 'debug'}), ('Send the output of system messages (warnings) to .', ['--warnings'], {'dest': 'warning_stream', 'metavar': ''}), ('Specify the encoding of input text. Default is locale-dependent.', ['--input-encoding', '-i'], {'metavar': ''}), ('Specify the encoding for output. Default is UTF-8.', ['--output-encoding', '-o'], {'metavar': '', 'default': 'utf-8'}), ('Specify the language of input text (ISO 639 2-letter identifier).' ' Default is "en" (English).', ['--language', '-l'], {'dest': 'language_code', 'default': 'en', 'metavar': ''}), ('Read configuration settings from , if it exists.', ['--config'], {'metavar': '', 'type': 'string', 'action': 'callback', 'callback': read_config_file}), ("Show this program's version number and exit.", ['--version', '-V'], {'action': 'version'}), ('Show this help message and exit.', ['--help', '-h'], {'action': 'help'}), # Hidden options, for development use only: (optik.SUPPRESS_HELP, ['--dump-settings'], {'action': 'store_true'}), (optik.SUPPRESS_HELP, ['--dump-internals'], {'action': 'store_true'}), (optik.SUPPRESS_HELP, ['--dump-transforms'], {'action': 'store_true'}), (optik.SUPPRESS_HELP, ['--dump-pseudo-xml'], {'action': 'store_true'}), (optik.SUPPRESS_HELP, ['--expose-internal-attribute'], {'action': 'append', 'dest': 'expose_internals'}),)) """Runtime settings and command-line options common to all Docutils front ends. Setting specs specific to individual Docutils components are also used (see `populate_from_components()`).""" relative_path_settings = ('warning_stream',) version_template = '%%prog (Docutils %s)' % docutils.__version__ """Default version message.""" def __init__(self, components=(), *args, **kwargs): """ `components` is a list of Docutils components each containing a ``.settings_spec`` attribute. `defaults` is a mapping of setting default overrides. """ optik.OptionParser.__init__( self, help=None, format=optik.Titled(), # Needed when Optik is updated (replaces above 2 lines): #self, add_help=None, #formatter=optik.TitledHelpFormatter(width=78), *args, **kwargs) if not self.version: self.version = self.version_template # Internal settings with no defaults from settings specifications; # initialize manually: self.set_defaults(_source=None, _destination=None) # Make an instance copy (it will be modified): self.relative_path_settings = list(self.relative_path_settings) self.populate_from_components(tuple(components) + (self,)) def populate_from_components(self, components): for component in components: if component is None: continue i = 0 settings_spec = component.settings_spec self.relative_path_settings.extend( component.relative_path_settings) while i < len(settings_spec): title, description, option_spec = settings_spec[i:i+3] if title: group = optik.OptionGroup(self, title, description) self.add_option_group(group) else: group = self # single options for (help_text, option_strings, kwargs) in option_spec: group.add_option(help=help_text, *option_strings, **kwargs) i += 3 for component in components: if component and component.settings_default_overrides: self.defaults.update(component.settings_default_overrides) def check_values(self, values, args): if hasattr(values, 'report_level'): values.report_level = self.check_threshold(values.report_level) if hasattr(values, 'halt_level'): values.halt_level = self.check_threshold(values.halt_level) values._source, values._destination = self.check_args(args) make_paths_absolute(values.__dict__, self.relative_path_settings, os.getcwd()) return values def check_threshold(self, level): try: return int(level) except ValueError: try: return self.thresholds[level.lower()] except (KeyError, AttributeError): self.error('Unknown threshold: %r.' % level) def check_args(self, args): source = destination = None if args: source = args.pop(0) if args: destination = args.pop(0) if args: self.error('Maximum 2 arguments allowed.') if source and source == destination: self.error('Do not specify the same file for both source and ' 'destination. It will clobber the source file.') return source, destination class ConfigParser(CP.ConfigParser): standard_config_files = ( '/etc/docutils.conf', # system-wide './docutils.conf', # project-specific os.path.expanduser('~/.docutils')) # user-specific """Docutils configuration files, using ConfigParser syntax (section 'options'). Later files override earlier ones.""" def read_standard_files(self): self.read(self.standard_config_files) def optionxform(self, optionstr): """ Transform '-' to '_' so the cmdline form of option names can be used. """ return optionstr.lower().replace('-', '_') def get_section(self, section, raw=0, vars=None): """ Return a given section as a dictionary (empty if the section doesn't exist). All % interpolations are expanded in the return values, based on the defaults passed into the constructor, unless the optional argument `raw` is true. Additional substitutions may be provided using the `vars` argument, which must be a dictionary whose contents overrides any pre-existing defaults. The section DEFAULT is special. """ try: sectdict = self._ConfigParser__sections[section].copy() except KeyError: sectdict = {} d = self._ConfigParser__defaults.copy() d.update(sectdict) # Update with the entry specific variables if vars: d.update(vars) if raw: return sectdict # do the string interpolation for option in sectdict.keys(): rawval = sectdict[option] value = rawval # Make it a pretty variable name depth = 0 while depth < 10: # Loop through this until it's done depth += 1 if value.find("%(") >= 0: try: value = value % d except KeyError, key: raise CP.InterpolationError(key, option, section, rawval) else: break if value.find("%(") >= 0: raise CP.InterpolationDepthError(option, section, rawval) sectdict[option] = value return sectdict --- NEW FILE: io.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ I/O classes provide a uniform API for low-level input and output. Subclasses will exist for a variety of input/output mechanisms. """ __docformat__ = 'reStructuredText' import sys import locale from docutils import TransformSpec class Input(TransformSpec): """ Abstract base class for input wrappers. """ component_type = 'input' default_source_path = None def __init__(self, settings, source=None, source_path=None): self.settings = settings """A settings object with "input_encoding" and "output_encoding" attributes (typically a `docutils.optik.Values` object).""" self.source = source """The source of input data.""" self.source_path = source_path """A text reference to the source.""" if not source_path: self.source_path = self.default_source_path def __repr__(self): return '%s: source=%r, source_path=%r' % (self.__class__, self.source, self.source_path) def read(self, reader): raise NotImplementedError def decode(self, data): """ Decode a string, `data`, heuristically. Raise UnicodeError if unsuccessful. The client application should call ``locale.setlocale`` at the beginning of processing:: locale.setlocale(locale.LC_ALL, '') """ if self.settings.input_encoding \ and self.settings.input_encoding.lower() == 'unicode': return unicode(data) encodings = [self.settings.input_encoding, 'utf-8'] try: encodings.append(locale.nl_langinfo(locale.CODESET)) except: pass try: encodings.append(locale.getlocale()[1]) except: pass try: encodings.append(locale.getdefaultlocale()[1]) except: pass encodings.append('latin-1') for enc in encodings: if not enc: continue try: decoded = unicode(data, enc) return decoded except (UnicodeError, LookupError): pass raise UnicodeError( 'Unable to decode input data. Tried the following encodings: %s.' % ', '.join([repr(enc) for enc in encodings if enc])) class Output(TransformSpec): """ Abstract base class for output wrappers. """ component_type = 'output' default_destination_path = None def __init__(self, settings, destination=None, destination_path=None): self.settings = settings """A settings object with "input_encoding" and "output_encoding" attributes (typically a `docutils.optik.Values` object).""" self.destination = destination """The destination for output data.""" self.destination_path = destination_path """A text reference to the destination.""" if not destination_path: self.destination_path = self.default_destination_path def __repr__(self): return ('%s: destination=%r, destination_path=%r' % (self.__class__, self.destination, self.destination_path)) def write(self, data): raise NotImplementedError def encode(self, data): if self.settings.output_encoding \ and self.settings.output_encoding.lower() == 'unicode': return data else: return data.encode(self.settings.output_encoding or '') class FileInput(Input): """ Input for single, simple file-like objects. """ def __init__(self, settings, source=None, source_path=None, autoclose=1): """ :Parameters: - `source`: either a file-like object (which is read directly), or `None` (which implies `sys.stdin` if no `source_path` given). - `source_path`: a path to a file, which is opened and then read. - `autoclose`: close automatically after read (boolean); always false if `sys.stdin` is the source. """ Input.__init__(self, settings, source, source_path) self.autoclose = autoclose if source is None: if source_path: self.source = open(source_path) else: self.source = sys.stdin self.autoclose = None if not source_path: try: self.source_path = self.source.name except AttributeError: pass def read(self, reader): """Read and decode a single file and return the data.""" data = self.source.read() if self.autoclose: self.close() return self.decode(data) def close(self): self.source.close() class FileOutput(Output): """ Output for single, simple file-like objects. """ def __init__(self, settings, destination=None, destination_path=None, autoclose=1): """ :Parameters: - `destination`: either a file-like object (which is written directly) or `None` (which implies `sys.stdout` if no `destination_path` given). - `destination_path`: a path to a file, which is opened and then written. - `autoclose`: close automatically after write (boolean); always false if `sys.stdout` is the destination. """ Output.__init__(self, settings, destination, destination_path) self.opened = 1 self.autoclose = autoclose if destination is None: if destination_path: self.opened = None else: self.destination = sys.stdout self.autoclose = None if not destination_path: try: self.destination_path = self.destination.name except AttributeError: pass def open(self): self.destination = open(self.destination_path, 'w') self.opened = 1 def write(self, data): """Encode `data`, write it to a single file, and return it.""" output = self.encode(data) if not self.opened: self.open() self.destination.write(output) if self.autoclose: self.close() return output def close(self): self.destination.close() self.opened = None class StringInput(Input): """ Direct string input. """ default_source_path = '' def read(self, reader): """Decode and return the source string.""" return self.decode(self.source) class StringOutput(Output): """ Direct string output. """ default_destination_path = '' def write(self, data): """Encode `data`, store it in `self.destination`, and return it.""" self.destination = self.encode(data) return self.destination class NullInput(Input): """ Degenerate input: read nothing. """ default_source_path = 'null input' def read(self, reader): """Return a null string.""" return u'' class NullOutput(Output): """ Degenerate output: write nothing. """ default_destination_path = 'null output' def write(self, data): """Do nothing ([don't even] send data to the bit bucket).""" pass --- NEW FILE: nodes.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ Docutils document tree element class library. Classes in CamelCase are abstract base classes or auxiliary classes. The one exception is `Text`, for a text (PCDATA) node; uppercase is used to differentiate from element classes. Classes in lower_case_with_underscores are element classes, matching the XML element generic identifiers in the DTD_. The position of each node (the level at which it can occur) is significant and is represented by abstract base classes (`Root`, `Structural`, `Body`, `Inline`, etc.). Certain transformations will be easier because we can use ``isinstance(node, base_class)`` to determine the position of the node in the hierarchy. [...1394 lines suppressed...] The CSS1 "nmchar" rule does not include underscores ("_"), colons (":"), or periods ("."), therefore "class" and "id" attributes should not contain these characters. They should be replaced with hyphens ("-"). Combined with HTML's requirements (the first character must be a letter; no "unicode", "latin1", or "escape" characters), this results in the ``[a-z][-a-z0-9]*`` pattern. .. _HTML 4.01 spec: http://www.w3.org/TR/html401 .. _CSS1 spec: http://www.w3.org/TR/REC-CSS1 """ id = _non_id_chars.sub('-', ' '.join(string.lower().split())) id = _non_id_at_ends.sub('', id) return str(id) _non_id_chars = re.compile('[^a-z0-9]+') _non_id_at_ends = re.compile('^[-0-9]+|-+$') def dupname(node): node['dupname'] = node['name'] del node['name'] --- NEW FILE: optik.py --- # This is *not* the official distribution of Optik. See # http://optik.sourceforge.net/ for the official distro. # # This combined module was converted from the "optik" package for Docutils use # by David Goodger (2002-06-12). Optik is slated for inclusion in the Python # standard library as OptionParser.py. Once Optik itself becomes a single # module, Docutils will include the official module and kill off this # temporary fork. """optik A powerful, extensible, and easy-to-use command-line parser for Python. By Greg Ward See http://optik.sourceforge.net/ """ # Copyright (c) 2001 Gregory P. Ward. All rights reserved. [...1315 lines suppressed...] """ # Is there an exact match? if wordmap.has_key(s): return s else: # Isolate all words with s as a prefix. possibilities = [word for word in wordmap.keys() if word.startswith(s)] # No exact match, so there had better be just one possibility. if len(possibilities) == 1: return possibilities[0] elif not possibilities: raise BadOptionError("no such option: %s" % s) else: # More than one possible completion: ambiguous prefix. raise BadOptionError("ambiguous option: %s (%s?)" % (s, ", ".join(possibilities))) def get_prog_name (): return os.path.basename(sys.argv[0]) --- NEW FILE: roman.py --- """Convert to and from Roman numerals""" __author__ = "Mark Pilgrim (f8dy@diveintopython.org)" __version__ = "1.4" __date__ = "8 August 2001" __copyright__ = """Copyright (c) 2001 Mark Pilgrim This program is part of "Dive Into Python", a free Python tutorial for experienced programmers. Visit http://diveintopython.org/ for the latest version. This program is free software; you can redistribute it and/or modify it under the terms of the Python 2.1.1 license, available at http://www.python.org/2.1.1/license.html """ import re #Define exceptions class RomanError(Exception): pass class OutOfRangeError(RomanError): pass class NotIntegerError(RomanError): pass class InvalidRomanNumeralError(RomanError): pass #Define digit mapping romanNumeralMap = (('M', 1000), ('CM', 900), ('D', 500), ('CD', 400), ('C', 100), ('XC', 90), ('L', 50), ('XL', 40), ('X', 10), ('IX', 9), ('V', 5), ('IV', 4), ('I', 1)) def toRoman(n): """convert integer to Roman numeral""" if not (0 < n < 5000): raise OutOfRangeError, "number out of range (must be 1..4999)" if int(n) <> n: raise NotIntegerError, "decimals can not be converted" result = "" for numeral, integer in romanNumeralMap: while n >= integer: result += numeral n -= integer return result #Define pattern to detect valid Roman numerals romanNumeralPattern = re.compile(''' ^ # beginning of string M{0,4} # thousands - 0 to 4 M's (CM|CD|D?C{0,3}) # hundreds - 900 (CM), 400 (CD), 0-300 (0 to 3 C's), # or 500-800 (D, followed by 0 to 3 C's) (XC|XL|L?X{0,3}) # tens - 90 (XC), 40 (XL), 0-30 (0 to 3 X's), # or 50-80 (L, followed by 0 to 3 X's) (IX|IV|V?I{0,3}) # ones - 9 (IX), 4 (IV), 0-3 (0 to 3 I's), # or 5-8 (V, followed by 0 to 3 I's) $ # end of string ''' ,re.VERBOSE) def fromRoman(s): """convert Roman numeral to integer""" if not s: raise InvalidRomanNumeralError, 'Input can not be blank' if not romanNumeralPattern.search(s): raise InvalidRomanNumeralError, 'Invalid Roman numeral: %s' % s result = 0 index = 0 for numeral, integer in romanNumeralMap: while s[index:index+len(numeral)] == numeral: result += integer index += len(numeral) return result --- NEW FILE: statemachine.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ A finite state machine specialized for regular-expression-based text filters, this module defines the following classes: - `StateMachine`, a state machine - `State`, a state superclass - `StateMachineWS`, a whitespace-sensitive version of `StateMachine` - `StateWS`, a state superclass for use with `StateMachineWS` - `SearchStateMachine`, uses `re.search()` instead of `re.match()` - `SearchStateMachineWS`, uses `re.search()` instead of `re.match()` - `ViewList`, extends standard Python lists. - `StringList`, string-specific ViewList. [...1405 lines suppressed...] if convert_whitespace: astring = whitespace.sub(' ', astring) return [s.expandtabs(tab_width) for s in astring.splitlines()] def _exception_data(): """ Return exception information: - the exception's class name; - the exception object; - the name of the file containing the offending code; - the line number of the offending code; - the function name of the offending code. """ type, value, traceback = sys.exc_info() while traceback.tb_next: traceback = traceback.tb_next code = traceback.tb_frame.f_code return (type.__name__, value, code.co_filename, traceback.tb_lineno, code.co_name) --- NEW FILE: urischemes.py --- """ `schemes` is a dictionary with lowercase URI addressing schemes as keys and descriptions as values. It was compiled from the index at http://www.w3.org/Addressing/schemes.html (revised 2001-08-20). """ # Many values are blank and should be filled in with useful descriptions. schemes = { 'about': 'provides information on Navigator', 'acap': 'Application Configuration Access Protocol', 'addbook': "To add vCard entries to Communicator's Address Book", 'afp': 'Apple Filing Protocol', 'afs': 'Andrew File System global file names', 'aim': 'AOL Instant Messenger', 'callto': 'for NetMeeting links', 'castanet': 'Castanet Tuner URLs for Netcaster', 'chttp': 'cached HTTP supported by RealPlayer', 'cid': 'content identifier', 'data': ('allows inclusion of small data items as "immediate" data; ' 'RFC 2397'), 'dav': 'Distributed Authoring and Versioning Protocol; RFC 2518', 'dns': 'Domain Name System resources', 'eid': ('External ID; non-URL data; general escape mechanism to allow ' 'access to information for applications that are too ' 'specialized to justify their own schemes'), 'fax': ('a connection to a terminal that can handle telefaxes ' '(facsimiles); RFC 2806'), 'file': 'Host-specific file names', 'finger': '', 'freenet': '', 'ftp': 'File Transfer Protocol', 'gopher': 'The Gopher Protocol', 'gsm-sms': ('Global System for Mobile Communications Short Message ' 'Service'), 'h323': 'video (audiovisual) communication on local area networks', 'h324': ('video and audio communications over low bitrate connections ' 'such as POTS modem connections'), 'hdl': 'CNRI handle system', 'hnews': 'an HTTP-tunneling variant of the NNTP news protocol', 'http': 'Hypertext Transfer Protocol', 'https': 'HTTP over SSL', 'iioploc': 'Internet Inter-ORB Protocol Location?', 'ilu': 'Inter-Language Unification', 'imap': 'Internet Message Access Protocol', 'ior': 'CORBA interoperable object reference', 'ipp': 'Internet Printing Protocol', 'irc': 'Internet Relay Chat', 'jar': 'Java archive', 'javascript': ('JavaScript code; evaluates the expression after the ' 'colon'), 'jdbc': '', 'ldap': 'Lightweight Directory Access Protocol', 'lifn': '', 'livescript': '', 'lrq': '', 'mailbox': 'Mail folder access', 'mailserver': 'Access to data available from mail servers', 'mailto': 'Electronic mail address', 'md5': '', 'mid': 'message identifier', 'mocha': '', 'modem': ('a connection to a terminal that can handle incoming data ' 'calls; RFC 2806'), 'news': 'USENET news', 'nfs': 'Network File System protocol', 'nntp': 'USENET news using NNTP access', 'opaquelocktoken': '', 'phone': '', 'pop': 'Post Office Protocol', 'pop3': 'Post Office Protocol v3', 'printer': '', 'prospero': 'Prospero Directory Service', 'res': '', 'rtsp': 'real time streaming protocol', 'rvp': '', 'rwhois': '', 'rx': 'Remote Execution', 'sdp': '', 'service': 'service location', 'shttp': 'secure hypertext transfer protocol', 'sip': 'Session Initiation Protocol', 'smb': '', 'snews': 'For NNTP postings via SSL', 't120': 'real time data conferencing (audiographics)', 'tcp': '', 'tel': ('a connection to a terminal that handles normal voice ' 'telephone calls, a voice mailbox or another voice messaging ' 'system or a service that can be operated using DTMF tones; ' 'RFC 2806.'), 'telephone': 'telephone', 'telnet': 'Reference to interactive sessions', 'tip': 'Transaction Internet Protocol', 'tn3270': 'Interactive 3270 emulation sessions', 'tv': '', 'urn': 'Uniform Resource Name', 'uuid': '', 'vemmi': 'versatile multimedia interface', 'videotex': '', 'view-source': 'displays HTML code that was generated with JavaScript', 'wais': 'Wide Area Information Servers', 'whodp': '', 'whois++': 'Distributed directory service.', 'z39.50r': 'Z39.50 Retrieval', 'z39.50s': 'Z39.50 Session',} --- NEW FILE: utils.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:51 $ # Copyright: This module has been placed in the public domain. """ Miscellaneous utilities for the documentation utilities. """ __docformat__ = 'reStructuredText' import sys import os import os.path from types import StringType, UnicodeType from docutils import ApplicationError, DataError from docutils import frontend, nodes class SystemMessage(ApplicationError): def __init__(self, system_message): Exception.__init__(self, system_message.astext()) class Reporter: """ Info/warning/error reporter and ``system_message`` element generator. Five levels of system messages are defined, along with corresponding methods: `debug()`, `info()`, `warning()`, `error()`, and `severe()`. There is typically one Reporter object per process. A Reporter object is instantiated with thresholds for reporting (generating warnings) and halting processing (raising exceptions), a switch to turn debug output on or off, and an I/O stream for warnings. These are stored in the default reporting category, '' (zero-length string). Multiple reporting categories [#]_ may be set, each with its own reporting and halting thresholds, debugging switch, and warning stream (collectively a `ConditionSet`). Categories are hierarchical dotted-name strings that look like attribute references: 'spam', 'spam.eggs', 'neeeow.wum.ping'. The 'spam' category is the ancestor of 'spam.bacon.eggs'. Unset categories inherit stored conditions from their closest ancestor category that has been set. When a system message is generated, the stored conditions from its category (or ancestor if unset) are retrieved. The system message level is compared to the thresholds stored in the category, and a warning or error is generated as appropriate. Debug messages are produced iff the stored debug switch is on. Message output is sent to the stored warning stream. The default category is '' (empty string). By convention, Writers should retrieve reporting conditions from the 'writer' category (which, unless explicitly set, defaults to the conditions of the default category). The Reporter class also employs a modified form of the "Observer" pattern [GoF95]_ to track system messages generated. The `attach_observer` method should be called before parsing, with a bound method or function which accepts system messages. The observer can be removed with `detach_observer`, and another added in its place. .. [#] The concept of "categories" was inspired by the log4j project: http://jakarta.apache.org/log4j/. .. [GoF95] Gamma, Helm, Johnson, Vlissides. *Design Patterns: Elements of Reusable Object-Oriented Software*. Addison-Wesley, Reading, MA, USA, 1995. """ levels = 'DEBUG INFO WARNING ERROR SEVERE'.split() """List of names for system message levels, indexed by level.""" def __init__(self, source, report_level, halt_level, stream=None, debug=0): """ Initialize the `ConditionSet` forthe `Reporter`'s default category. :Parameters: - `source`: The path to or description of the source data. - `report_level`: The level at or above which warning output will be sent to `stream`. - `halt_level`: The level at or above which `SystemMessage` exceptions will be raised, halting execution. - `debug`: Show debug (level=0) system messages? - `stream`: Where warning output is sent. Can be file-like (has a ``.write`` method), a string (file name, opened for writing), or `None` (implies `sys.stderr`; default). """ self.source = source """The path to or description of the source data.""" if stream is None: stream = sys.stderr elif type(stream) in (StringType, UnicodeType): raise NotImplementedError('This should open a file for writing.') self.categories = {'': ConditionSet(debug, report_level, halt_level, stream)} """Mapping of category names to conditions. Default category is ''.""" self.observers = [] """List of bound methods or functions to call with each system_message created.""" def set_conditions(self, category, report_level, halt_level, stream=None, debug=0): if stream is None: stream = sys.stderr self.categories[category] = ConditionSet(debug, report_level, halt_level, stream) def unset_conditions(self, category): if category and self.categories.has_key(category): del self.categories[category] __delitem__ = unset_conditions def get_conditions(self, category): while not self.categories.has_key(category): category = category[:category.rfind('.') + 1][:-1] return self.categories[category] __getitem__ = get_conditions def attach_observer(self, observer): """ The `observer` parameter is a function or bound method which takes one argument, a `nodes.system_message` instance. """ self.observers.append(observer) def detach_observer(self, observer): self.observers.remove(observer) def notify_observers(self, message): for observer in self.observers: observer(message) def system_message(self, level, message, *children, **kwargs): """ Return a system_message object. Raise an exception or generate a warning if appropriate. """ attributes = kwargs.copy() category = kwargs.get('category', '') if kwargs.has_key('category'): del attributes['category'] if kwargs.has_key('base_node'): source, line = get_source_line(kwargs['base_node']) del attributes['base_node'] if source is not None: attributes.setdefault('source', source) if line is not None: attributes.setdefault('line', line) attributes.setdefault('source', self.source) msg = nodes.system_message(message, level=level, type=self.levels[level], *children, **attributes) debug, report_level, halt_level, stream = self[category].astuple() if level >= report_level or debug and level == 0: if category: print >>stream, msg.astext(), '[%s]' % category else: print >>stream, msg.astext() if level >= halt_level: raise SystemMessage(msg) if level > 0 or debug: self.notify_observers(msg) return msg def debug(self, *args, **kwargs): """ Level-0, "DEBUG": an internal reporting issue. Typically, there is no effect on the processing. Level-0 system messages are handled separately from the others. """ return self.system_message(0, *args, **kwargs) def info(self, *args, **kwargs): """ Level-1, "INFO": a minor issue that can be ignored. Typically there is no effect on processing, and level-1 system messages are not reported. """ return self.system_message(1, *args, **kwargs) def warning(self, *args, **kwargs): """ Level-2, "WARNING": an issue that should be addressed. If ignored, there may be unpredictable problems with the output. """ return self.system_message(2, *args, **kwargs) def error(self, *args, **kwargs): """ Level-3, "ERROR": an error that should be addressed. If ignored, the output will contain errors. """ return self.system_message(3, *args, **kwargs) def severe(self, *args, **kwargs): """ Level-4, "SEVERE": a severe error that must be addressed. If ignored, the output will contain severe errors. Typically level-4 system messages are turned into exceptions which halt processing. """ return self.system_message(4, *args, **kwargs) class ConditionSet: """ A set of two thresholds (`report_level` & `halt_level`), a switch (`debug`), and an I/O stream (`stream`), corresponding to one `Reporter` category. """ def __init__(self, debug, report_level, halt_level, stream): self.debug = debug self.report_level = report_level self.halt_level = halt_level self.stream = stream def astuple(self): return (self.debug, self.report_level, self.halt_level, self.stream) class ExtensionOptionError(DataError): pass class BadOptionError(ExtensionOptionError): pass class BadOptionDataError(ExtensionOptionError): pass class DuplicateOptionError(ExtensionOptionError): pass def extract_extension_options(field_list, options_spec): """ Return a dictionary mapping extension option names to converted values. :Parameters: - `field_list`: A flat field list without field arguments, where each field body consists of a single paragraph only. - `options_spec`: Dictionary mapping known option names to a conversion function such as `int` or `float`. :Exceptions: - `KeyError` for unknown option names. - `ValueError` for invalid option values (raised by the conversion function). - `DuplicateOptionError` for duplicate options. - `BadOptionError` for invalid fields. - `BadOptionDataError` for invalid option data (missing name, missing data, bad quotes, etc.). """ option_list = extract_options(field_list) option_dict = assemble_option_dict(option_list, options_spec) return option_dict def extract_options(field_list): """ Return a list of option (name, value) pairs from field names & bodies. :Parameter: `field_list`: A flat field list, where each field name is a single word and each field body consists of a single paragraph only. :Exceptions: - `BadOptionError` for invalid fields. - `BadOptionDataError` for invalid option data (missing name, missing data, bad quotes, etc.). """ option_list = [] for field in field_list: if len(field[0].astext().split()) != 1: raise BadOptionError( 'extension option field name may not contain multiple words') name = str(field[0].astext().lower()) body = field[1] if len(body) == 0: data = None elif len(body) > 1 or not isinstance(body[0], nodes.paragraph) \ or len(body[0]) != 1 or not isinstance(body[0][0], nodes.Text): raise BadOptionDataError( 'extension option field body may contain\n' 'a single paragraph only (option "%s")' % name) else: data = body[0][0].astext() option_list.append((name, data)) return option_list def assemble_option_dict(option_list, options_spec): """ Return a mapping of option names to values. :Parameters: - `option_list`: A list of (name, value) pairs (the output of `extract_options()`). - `options_spec`: Dictionary mapping known option names to a conversion function such as `int` or `float`. :Exceptions: - `KeyError` for unknown option names. - `DuplicateOptionError` for duplicate options. - `ValueError` for invalid option values (raised by conversion function). """ options = {} for name, value in option_list: convertor = options_spec[name] # raises KeyError if unknown if options.has_key(name): raise DuplicateOptionError('duplicate option "%s"' % name) try: options[name] = convertor(value) except (ValueError, TypeError), detail: raise detail.__class__('(option: "%s"; value: %r)\n%s' % (name, value, detail)) return options class NameValueError(DataError): pass def extract_name_value(line): """ Return a list of (name, value) from a line of the form "name=value ...". :Exception: `NameValueError` for invalid input (missing name, missing data, bad quotes, etc.). """ attlist = [] while line: equals = line.find('=') if equals == -1: raise NameValueError('missing "="') attname = line[:equals].strip() if equals == 0 or not attname: raise NameValueError( 'missing attribute name before "="') line = line[equals+1:].lstrip() if not line: raise NameValueError( 'missing value after "%s="' % attname) if line[0] in '\'"': endquote = line.find(line[0], 1) if endquote == -1: raise NameValueError( 'attribute "%s" missing end quote (%s)' % (attname, line[0])) if len(line) > endquote + 1 and line[endquote + 1].strip(): raise NameValueError( 'attribute "%s" end quote (%s) not followed by ' 'whitespace' % (attname, line[0])) data = line[1:endquote] line = line[endquote+1:].lstrip() else: space = line.find(' ') if space == -1: data = line line = '' else: data = line[:space] line = line[space+1:].lstrip() attlist.append((attname.lower(), data)) return attlist def normalize_name(name): """Return a case- and whitespace-normalized name.""" return ' '.join(name.lower().split()) def new_document(source, settings=None): if settings is None: settings = frontend.OptionParser().get_default_values() reporter = Reporter(source, settings.report_level, settings.halt_level, settings.warning_stream, settings.debug) document = nodes.document(settings, reporter, source=source) document.note_source(source, -1) return document def clean_rcs_keywords(paragraph, keyword_substitutions): if len(paragraph) == 1 and isinstance(paragraph[0], nodes.Text): textnode = paragraph[0] for pattern, substitution in keyword_substitutions: match = pattern.match(textnode.data) if match: textnode.data = pattern.sub(substitution, textnode.data) return def relative_path(source, target): """ Build and return a path to `target`, relative to `source`. If there is no common prefix, return the absolute path to `target`. """ source_parts = os.path.abspath(source or '').split(os.sep) target_parts = os.path.abspath(target).split(os.sep) # Check first 2 parts because '/dir'.split('/') == ['', 'dir']: if source_parts[:2] != target_parts[:2]: # Nothing in common between paths. # Return absolute path, using '/' for URLs: return '/'.join(target_parts) source_parts.reverse() target_parts.reverse() while (source_parts and target_parts and source_parts[-1] == target_parts[-1]): # Remove path components in common: source_parts.pop() target_parts.pop() target_parts.reverse() parts = ['..'] * (len(source_parts) - 1) + target_parts return '/'.join(parts) def get_source_line(node): """ Return the "source" and "line" attributes from the `node` given or from it's closest ancestor. """ while node: if node.source or node.line: return node.source, node.line node = node.parent return None, None From goodger@users.sourceforge.net Fri Nov 8 23:47:55 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Fri, 08 Nov 2002 15:47:55 -0800 Subject: [Python-checkins] python/nondist/peps/docutils/transforms .cvsignore,NONE,1.1 __init__.py,NONE,1.1 components.py,NONE,1.1 frontmatter.py,NONE,1.1 parts.py,NONE,1.1 peps.py,NONE,1.1 references.py,NONE,1.1 universal.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps/docutils/transforms In directory usw-pr-cvs1:/tmp/cvs-serv8387/docutils/transforms Added Files: .cvsignore __init__.py components.py frontmatter.py parts.py peps.py references.py universal.py Log Message: local copy of Docutils for PEP processing --- NEW FILE: .cvsignore --- *.pyc --- NEW FILE: __init__.py --- # Authors: David Goodger, Ueli Schlaepfer # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ This package contains modules for standard tree transforms available to Docutils components. Tree transforms serve a variety of purposes: - To tie up certain syntax-specific "loose ends" that remain after the initial parsing of the input plaintext. These transforms are used to supplement a limited syntax. - To automate the internal linking of the document tree (hyperlink references, footnote references, etc.). - To extract useful information from the document tree. These transforms may be used to construct (for example) indexes and tables of contents. Each transform is an optional step that a Docutils Reader may choose to perform on the parsed document, depending on the input context. A Docutils Reader may also perform Reader-specific transforms before or after performing these standard transforms. """ __docformat__ = 'reStructuredText' from docutils import languages, ApplicationError, TransformSpec class TransformError(ApplicationError): pass class Transform: """ Docutils transform component abstract base class. """ default_priority = None """Numerical priority of this transform, 0 through 999 (override).""" def __init__(self, document, startnode=None): """ Initial setup for in-place document transforms. """ self.document = document """The document tree to transform.""" self.startnode = startnode """Node from which to begin the transform. For many transforms which apply to the document as a whole, `startnode` is not set (i.e. its value is `None`).""" self.language = languages.get_language( document.settings.language_code) """Language module local to this document.""" def apply(self): """Override to apply the transform to the document tree.""" raise NotImplementedError('subclass must override this method') class Transformer(TransformSpec): """ Stores transforms (`Transform` classes) and applies them to document trees. Also keeps track of components by component type name. """ from docutils.transforms import universal default_transforms = (universal.Decorations, universal.FinalChecks, universal.Messages) """These transforms are applied to all document trees.""" def __init__(self, document): self.transforms = [] """List of transforms to apply. Each item is a 3-tuple: ``(priority string, transform class, pending node or None)``.""" self.document = document """The `nodes.document` object this Transformer is attached to.""" self.applied = [] """Transforms already applied, in order.""" self.sorted = 0 """Boolean: is `self.tranforms` sorted?""" self.components = {} """Mapping of component type name to component object. Set by `self.populate_from_components()`.""" self.serialno = 0 """Internal serial number to keep track of the add order of transforms.""" def add_transform(self, transform_class, priority=None): """ Store a single transform. Use `priority` to override the default. """ if priority is None: priority = transform_class.default_priority priority_string = self.get_priority_string(priority) self.transforms.append((priority_string, transform_class, None)) self.sorted = 0 def add_transforms(self, transform_list): """Store multiple transforms, with default priorities.""" for transform_class in transform_list: priority_string = self.get_priority_string( transform_class.default_priority) self.transforms.append((priority_string, transform_class, None)) self.sorted = 0 def add_pending(self, pending, priority=None): """Store a transform with an associated `pending` node.""" transform_class = pending.transform if priority is None: priority = transform_class.default_priority priority_string = self.get_priority_string(priority) self.transforms.append((priority_string, transform_class, pending)) self.sorted = 0 def get_priority_string(self, priority): """ Return a string, `priority` combined with `self.serialno`. This ensures FIFO order on transforms with identical priority. """ self.serialno += 1 return '%03d-%03d' % (priority, self.serialno) def populate_from_components(self, components): """ Store each component's default transforms, with default priorities. Also, store components by type name in a mapping for later lookup. """ self.add_transforms(self.default_transforms) for component in components: if component is None: continue self.add_transforms(component.default_transforms) self.components[component.component_type] = component self.sorted = 0 def apply_transforms(self): """Apply all of the stored transforms, in priority order.""" self.document.reporter.attach_observer( self.document.note_transform_message) while self.transforms: if not self.sorted: # Unsorted initially, and whenever a transform is added. self.transforms.sort() self.transforms.reverse() self.sorted = 1 priority, transform_class, pending = self.transforms.pop() transform = transform_class(self.document, startnode=pending) transform.apply() self.applied.append((priority, transform_class, pending)) --- NEW FILE: components.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ Docutils component-related transforms. """ __docformat__ = 'reStructuredText' import sys import os import re import time from docutils import nodes, utils from docutils import ApplicationError, DataError from docutils.transforms import Transform, TransformError class Filter(Transform): """ Include or exclude elements which depend on a specific Docutils component. For use with `nodes.pending` elements. A "pending" element's dictionary attribute ``details`` must contain the keys "component" and "format". The value of ``details['component']`` must match the type name of the component the elements depend on (e.g. "writer"). The value of ``details['format']`` is the name of a specific format or context of that component (e.g. "html"). If the matching Docutils component supports that format or context, the "pending" element is replaced by the contents of ``details['nodes']`` (a list of nodes); otherwise, the "pending" element is removed. For example, the reStructuredText "meta" directive creates a "pending" element containing a "meta" element (in ``pending.details['nodes']``). Only writers (``pending.details['component'] == 'writer'``) supporting the "html" format (``pending.details['format'] == 'html'``) will include the "meta" element; it will be deleted from the output of all other writers. """ default_priority = 780 def apply(self): pending = self.startnode component_type = pending.details['component'] # 'reader' or 'writer' format = pending.details['format'] component = self.document.transformer.components[component_type] if component.supports(format): pending.parent.replace(pending, pending.details['nodes']) else: pending.parent.remove(pending) --- NEW FILE: frontmatter.py --- # Authors: David Goodger, Ueli Schlaepfer # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ Transforms related to the front matter of a document (information found before the main text): - `DocTitle`: Used to transform a lone top level section's title to the document title, and promote a remaining lone top-level section's title to the document subtitle. - `DocInfo`: Used to transform a bibliographic field list into docinfo elements. """ __docformat__ = 'reStructuredText' import re from docutils import nodes, utils from docutils.transforms import TransformError, Transform class DocTitle(Transform): """ In reStructuredText_, there is no way to specify a document title and subtitle explicitly. Instead, we can supply the document title (and possibly the subtitle as well) implicitly, and use this two-step transform to "raise" or "promote" the title(s) (and their corresponding section contents) to the document level. 1. If the document contains a single top-level section as its first non-comment element, the top-level section's title becomes the document's title, and the top-level section's contents become the document's immediate contents. The lone top-level section header must be the first non-comment element in the document. For example, take this input text:: ================= Top-Level Title ================= A paragraph. Once parsed, it looks like this::
Top-Level Title <paragraph> A paragraph. After running the DocTitle transform, we have:: <document name="top-level title"> <title> Top-Level Title <paragraph> A paragraph. 2. If step 1 successfully determines the document title, we continue by checking for a subtitle. If the lone top-level section itself contains a single second-level section as its first non-comment element, that section's title is promoted to the document's subtitle, and that section's contents become the document's immediate contents. Given this input text:: ================= Top-Level Title ================= Second-Level Title ~~~~~~~~~~~~~~~~~~ A paragraph. After parsing and running the Section Promotion transform, the result is:: <document name="top-level title"> <title> Top-Level Title <subtitle name="second-level title"> Second-Level Title <paragraph> A paragraph. (Note that the implicit hyperlink target generated by the "Second-Level Title" is preserved on the "subtitle" element itself.) Any comment elements occurring before the document title or subtitle are accumulated and inserted as the first body elements after the title(s). """ default_priority = 320 def apply(self): if self.promote_document_title(): self.promote_document_subtitle() def promote_document_title(self): section, index = self.candidate_index() if index is None: return None document = self.document # Transfer the section's attributes to the document element (at root): document.attributes.update(section.attributes) document[:] = (section[:1] # section title + document[:index] # everything that was in the # document before the section + section[1:]) # everything that was in the section return 1 def promote_document_subtitle(self): subsection, index = self.candidate_index() if index is None: return None subtitle = nodes.subtitle() # Transfer the subsection's attributes to the new subtitle: subtitle.attributes.update(subsection.attributes) # Transfer the contents of the subsection's title to the subtitle: subtitle[:] = subsection[0][:] document = self.document document[:] = (document[:1] # document title + [subtitle] # everything that was before the section: + document[1:index] # everything that was in the subsection: + subsection[1:]) return 1 def candidate_index(self): """ Find and return the promotion candidate and its index. Return (None, None) if no valid candidate was found. """ document = self.document index = document.first_child_not_matching_class( nodes.PreBibliographic) if index is None or len(document) > (index + 1) or \ not isinstance(document[index], nodes.section): return None, None else: return document[index], index class DocInfo(Transform): """ This transform is specific to the reStructuredText_ markup syntax; see "Bibliographic Fields" in the `reStructuredText Markup Specification`_ for a high-level description. This transform should be run *after* the `DocTitle` transform. Given a field list as the first non-comment element after the document title and subtitle (if present), registered bibliographic field names are transformed to the corresponding DTD elements, becoming child elements of the "docinfo" element (except for a dedication and/or an abstract, which become "topic" elements after "docinfo"). For example, given this document fragment after parsing:: <document> <title> Document Title <field_list> <field> <field_name> Author <field_body> <paragraph> A. Name <field> <field_name> Status <field_body> <paragraph> $RCSfile: frontmatter.py,v $ ... After running the bibliographic field list transform, the resulting document tree would look like this:: <document> <title> Document Title <docinfo> <author> A. Name <status> frontmatter.py ... The "Status" field contained an expanded RCS keyword, which is normally (but optionally) cleaned up by the transform. The sole contents of the field body must be a paragraph containing an expanded RCS keyword of the form "$keyword: expansion text $". Any RCS keyword can be processed in any bibliographic field. The dollar signs and leading RCS keyword name are removed. Extra processing is done for the following RCS keywords: - "RCSfile" expands to the name of the file in the RCS or CVS repository, which is the name of the source file with a ",v" suffix appended. The transform will remove the ",v" suffix. - "Date" expands to the format "YYYY/MM/DD hh:mm:ss" (in the UTC time zone). The RCS Keywords transform will extract just the date itself and transform it to an ISO 8601 format date, as in "2000-12-31". (Since the source file for this text is itself stored under CVS, we can't show an example of the "Date" RCS keyword because we can't prevent any RCS keywords used in this explanation from being expanded. Only the "RCSfile" keyword is stable; its expansion text changes only if the file name changes.) """ default_priority = 340 def apply(self): document = self.document index = document.first_child_not_matching_class( nodes.PreBibliographic) if index is None: return candidate = document[index] if isinstance(candidate, nodes.field_list): biblioindex = document.first_child_not_matching_class( nodes.Titular) nodelist = self.extract_bibliographic(candidate) del document[index] # untransformed field list (candidate) document[biblioindex:biblioindex] = nodelist return def extract_bibliographic(self, field_list): docinfo = nodes.docinfo() bibliofields = self.language.bibliographic_fields labels = self.language.labels topics = {'dedication': None, 'abstract': None} for field in field_list: try: name = field[0][0].astext() normedname = utils.normalize_name(name) if not (len(field) == 2 and bibliofields.has_key(normedname) and self.check_empty_biblio_field(field, name)): raise TransformError biblioclass = bibliofields[normedname] if issubclass(biblioclass, nodes.TextElement): if not self.check_compound_biblio_field(field, name): raise TransformError utils.clean_rcs_keywords( field[1][0], self.rcs_keyword_substitutions) docinfo.append(biblioclass('', '', *field[1][0])) else: # multiple body elements possible if issubclass(biblioclass, nodes.authors): self.extract_authors(field, name, docinfo) elif issubclass(biblioclass, nodes.topic): if topics[normedname]: field[-1] += self.document.reporter.warning( 'There can only be one "%s" field.' % name, base_node=field) raise TransformError title = nodes.title(name, labels[normedname]) topics[normedname] = biblioclass( '', title, CLASS=normedname, *field[1].children) else: docinfo.append(biblioclass('', *field[1].children)) except TransformError: if len(field[-1]) == 1 \ and isinstance(field[-1][0], nodes.paragraph): utils.clean_rcs_keywords( field[-1][0], self.rcs_keyword_substitutions) docinfo.append(field) continue nodelist = [] if len(docinfo) != 0: nodelist.append(docinfo) for name in ('dedication', 'abstract'): if topics[name]: nodelist.append(topics[name]) return nodelist def check_empty_biblio_field(self, field, name): if len(field[-1]) < 1: field[-1] += self.document.reporter.warning( 'Cannot extract empty bibliographic field "%s".' % name, base_node=field) return None return 1 def check_compound_biblio_field(self, field, name): if len(field[-1]) > 1: field[-1] += self.document.reporter.warning( 'Cannot extract compound bibliographic field "%s".' % name, base_node=field) return None if not isinstance(field[-1][0], nodes.paragraph): field[-1] += self.document.reporter.warning( 'Cannot extract bibliographic field "%s" containing ' 'anything other than a single paragraph.' % name, base_node=field) return None return 1 rcs_keyword_substitutions = [ (re.compile(r'\$' r'Date: (\d\d\d\d)/(\d\d)/(\d\d) [\d:]+ \$$', re.IGNORECASE), r'\1-\2-\3'), (re.compile(r'\$' r'RCSfile: (.+),v \$$', re.IGNORECASE), r'\1'), (re.compile(r'\$[a-zA-Z]+: (.+) \$$'), r'\1'),] def extract_authors(self, field, name, docinfo): try: if len(field[1]) == 1: if isinstance(field[1][0], nodes.paragraph): authors = self.authors_from_one_paragraph(field) elif isinstance(field[1][0], nodes.bullet_list): authors = self.authors_from_bullet_list(field) else: raise TransformError else: authors = self.authors_from_paragraphs(field) authornodes = [nodes.author('', '', *author) for author in authors if author] if len(authornodes) > 1: docinfo.append(nodes.authors('', *authornodes)) elif len(authornodes) == 1: docinfo.append(authornodes[0]) else: raise TransformError except TransformError: field[-1] += self.document.reporter.warning( 'Bibliographic field "%s" incompatible with extraction: ' 'it must contain either a single paragraph (with authors ' 'separated by one of "%s"), multiple paragraphs (one per ' 'author), or a bullet list with one paragraph (one author) ' 'per item.' % (name, ''.join(self.language.author_separators)), base_node=field) raise def authors_from_one_paragraph(self, field): text = field[1][0].astext().strip() if not text: raise TransformError for authorsep in self.language.author_separators: authornames = text.split(authorsep) if len(authornames) > 1: break authornames = [author.strip() for author in authornames] authors = [[nodes.Text(author)] for author in authornames if author] return authors def authors_from_bullet_list(self, field): authors = [] for item in field[1][0]: if len(item) != 1 or not isinstance(item[0], nodes.paragraph): raise TransformError authors.append(item[0].children) if not authors: raise TransformError return authors def authors_from_paragraphs(self, field): for item in field[1]: if not isinstance(item, nodes.paragraph): raise TransformError authors = [item.children for item in field[1]] return authors --- NEW FILE: parts.py --- # Authors: David Goodger, Ueli Schlaepfer, Dmitry Jemerov # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ Transforms related to document parts. """ __docformat__ = 'reStructuredText' import re import sys from docutils import nodes, utils from docutils.transforms import TransformError, Transform class SectNum(Transform): """ Automatically assigns numbers to the titles of document sections. It is possible to limit the maximum section level for which the numbers are added. For those sections that are auto-numbered, the "autonum" attribute is set, informing the contents table generator that a different form of the TOC should be used. """ default_priority = 710 """Should be applied before `Contents`.""" def apply(self): self.maxdepth = self.startnode.details.get('depth', sys.maxint) self.startnode.parent.remove(self.startnode) self.update_section_numbers(self.document) def update_section_numbers(self, node, prefix=(), depth=0): depth += 1 sectnum = 1 for child in node: if isinstance(child, nodes.section): numbers = prefix + (str(sectnum),) title = child[0] # Use   for spacing: generated = nodes.generated( '', '.'.join(numbers) + u'\u00a0' * 3, CLASS='sectnum') title.insert(0, generated) title['auto'] = 1 if depth < self.maxdepth: self.update_section_numbers(child, numbers, depth) sectnum += 1 class Contents(Transform): """ This transform generates a table of contents from the entire document tree or from a single branch. It locates "section" elements and builds them into a nested bullet list, which is placed within a "topic". A title is either explicitly specified, taken from the appropriate language module, or omitted (local table of contents). The depth may be specified. Two-way references between the table of contents and section titles are generated (requires Writer support). This transform requires a startnode, which which contains generation options and provides the location for the generated table of contents (the startnode is replaced by the table of contents "topic"). """ default_priority = 720 def apply(self): topic = nodes.topic(CLASS='contents') title = self.startnode.details['title'] if self.startnode.details.has_key('local'): startnode = self.startnode.parent # @@@ generate an error if the startnode (directive) not at # section/document top-level? Drag it up until it is? while not isinstance(startnode, nodes.Structural): startnode = startnode.parent else: startnode = self.document if not title: title = nodes.title('', self.language.labels['contents']) if title: name = title.astext() topic += title else: name = self.language.labels['contents'] name = utils.normalize_name(name) if not self.document.has_name(name): topic['name'] = name self.document.note_implicit_target(topic) self.toc_id = topic['id'] if self.startnode.details.has_key('backlinks'): self.backlinks = self.startnode.details['backlinks'] else: self.backlinks = self.document.settings.toc_backlinks contents = self.build_contents(startnode) if len(contents): topic += contents self.startnode.parent.replace(self.startnode, topic) else: self.startnode.parent.remove(self.startnode) def build_contents(self, node, level=0): level += 1 sections = [] i = len(node) - 1 while i >= 0 and isinstance(node[i], nodes.section): sections.append(node[i]) i -= 1 sections.reverse() entries = [] autonum = 0 depth = self.startnode.details.get('depth', sys.maxint) for section in sections: title = section[0] auto = title.get('auto') # May be set by SectNum. entrytext = self.copy_and_filter(title) reference = nodes.reference('', '', refid=section['id'], *entrytext) ref_id = self.document.set_id(reference) entry = nodes.paragraph('', '', reference) item = nodes.list_item('', entry) if self.backlinks == 'entry': title['refid'] = ref_id elif self.backlinks == 'top': title['refid'] = self.toc_id if level < depth: subsects = self.build_contents(section, level) item += subsects entries.append(item) if entries: contents = nodes.bullet_list('', *entries) if auto: contents.set_class('auto-toc') return contents else: return [] def copy_and_filter(self, node): """Return a copy of a title, with references, images, etc. removed.""" visitor = ContentsFilter(self.document) node.walkabout(visitor) return visitor.get_entry_text() class ContentsFilter(nodes.TreeCopyVisitor): def get_entry_text(self): return self.get_tree_copy().get_children() def visit_citation_reference(self, node): raise nodes.SkipNode def visit_footnote_reference(self, node): raise nodes.SkipNode def visit_image(self, node): if node.hasattr('alt'): self.parent.append(nodes.Text(node['alt'])) raise nodes.SkipNode def ignore_node_but_process_children(self, node): raise nodes.SkipDeparture visit_interpreted = ignore_node_but_process_children visit_problematic = ignore_node_but_process_children visit_reference = ignore_node_but_process_children visit_target = ignore_node_but_process_children --- NEW FILE: peps.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ Transforms for PEP processing. - `Headers`: Used to transform a PEP's initial RFC-2822 header. It remains a field list, but some entries get processed. - `Contents`: Auto-inserts a table of contents. - `PEPZero`: Special processing for PEP 0. """ __docformat__ = 'reStructuredText' import sys import os import re import time from docutils import nodes, utils from docutils import ApplicationError, DataError from docutils.transforms import Transform, TransformError from docutils.transforms import parts, references class Headers(Transform): """ Process fields in a PEP's initial RFC-2822 header. """ default_priority = 360 pep_url = 'pep-%04d.html' pep_cvs_url = ('http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/' 'python/nondist/peps/pep-%04d.txt') rcs_keyword_substitutions = ( (re.compile(r'\$' r'RCSfile: (.+),v \$$', re.IGNORECASE), r'\1'), (re.compile(r'\$[a-zA-Z]+: (.+) \$$'), r'\1'),) def apply(self): if not len(self.document): raise DataError('Document tree is empty.') header = self.document[0] if not isinstance(header, nodes.field_list) or \ header.get('class') != 'rfc2822': raise DataError('Document does not begin with an RFC-2822 ' 'header; it is not a PEP.') pep = title = None for field in header: if field[0].astext().lower() == 'pep': # should be the first field value = field[1].astext() try: pep = int(value) cvs_url = self.pep_cvs_url % pep except ValueError: pep = value cvs_url = None msg = self.document.reporter.warning( '"PEP" header must contain an integer; "%s" is an ' 'invalid value.' % pep, base_node=field) msgid = self.document.set_id(msg) prb = nodes.problematic(value, value or '(none)', refid=msgid) prbid = self.document.set_id(prb) msg.add_backref(prbid) if len(field[1]): field[1][0][:] = [prb] else: field[1] += nodes.paragraph('', '', prb) break if pep is None: raise DataError('Document does not contain an RFC-2822 "PEP" ' 'header.') if pep == 0: # Special processing for PEP 0. pending = nodes.pending(PEPZero) self.document.insert(1, pending) self.document.note_pending(pending) for field in header: name = field[0].astext().lower() body = field[1] if len(body) > 1: raise DataError('PEP header field body contains multiple ' 'elements:\n%s' % field.pformat(level=1)) elif len(body) == 1: if not isinstance(body[0], nodes.paragraph): raise DataError('PEP header field body may only contain ' 'a single paragraph:\n%s' % field.pformat(level=1)) elif name == 'last-modified': date = time.strftime( '%d-%b-%Y', time.localtime(os.stat(self.document['source'])[8])) if cvs_url: body += nodes.paragraph( '', '', nodes.reference('', date, refuri=cvs_url)) else: # empty continue para = body[0] if name == 'author': for node in para: if isinstance(node, nodes.reference): node.parent.replace(node, mask_email(node)) elif name == 'discussions-to': for node in para: if isinstance(node, nodes.reference): node.parent.replace(node, mask_email(node, pep)) elif name in ('replaces', 'replaced-by', 'requires'): newbody = [] space = nodes.Text(' ') for refpep in re.split(',?\s+', body.astext()): pepno = int(refpep) newbody.append(nodes.reference( refpep, refpep, refuri=self.pep_url % pepno)) newbody.append(space) para[:] = newbody[:-1] # drop trailing space elif name == 'last-modified': utils.clean_rcs_keywords(para, self.rcs_keyword_substitutions) if cvs_url: date = para.astext() para[:] = [nodes.reference('', date, refuri=cvs_url)] elif name == 'content-type': pep_type = para.astext() uri = self.pep_url % 12 para[:] = [nodes.reference('', pep_type, refuri=uri)] elif name == 'version' and len(body): utils.clean_rcs_keywords(para, self.rcs_keyword_substitutions) class Contents(Transform): """ Insert a table of contents transform placeholder into the document after the RFC 2822 header. """ default_priority = 380 def apply(self): pending = nodes.pending(parts.Contents, {'title': None}) self.document.insert(1, pending) self.document.note_pending(pending) class TargetNotes(Transform): """ Locate the "References" section, insert a placeholder for an external target footnote insertion transform at the end, and run the transform. """ default_priority = 520 def apply(self): doc = self.document i = len(doc) - 1 refsect = copyright = None while i >= 0 and isinstance(doc[i], nodes.section): title_words = doc[i][0].astext().lower().split() if 'references' in title_words: refsect = doc[i] break elif 'copyright' in title_words: copyright = i i -= 1 if not refsect: refsect = nodes.section() refsect += nodes.title('', 'References') if copyright: # Put the new "References" section before "Copyright": doc.insert(copyright, refsect) else: # Put the new "References" section at end of doc: doc.append(refsect) pending = nodes.pending(references.TargetNotes) refsect.append(pending) self.document.note_pending(pending, 0) class PEPZero(Transform): """ Special processing for PEP 0. """ default_priority =760 def apply(self): visitor = PEPZeroSpecial(self.document) self.document.walk(visitor) self.startnode.parent.remove(self.startnode) class PEPZeroSpecial(nodes.SparseNodeVisitor): """ Perform the special processing needed by PEP 0: - Mask email addresses. - Link PEP numbers in the second column of 4-column tables to the PEPs themselves. """ pep_url = Headers.pep_url def unknown_visit(self, node): pass def visit_reference(self, node): node.parent.replace(node, mask_email(node)) def visit_field_list(self, node): if node.hasattr('class') and node['class'] == 'rfc2822': raise nodes.SkipNode def visit_tgroup(self, node): self.pep_table = node['cols'] == 4 self.entry = 0 def visit_colspec(self, node): self.entry += 1 if self.pep_table and self.entry == 2: node['class'] = 'num' def visit_row(self, node): self.entry = 0 def visit_entry(self, node): self.entry += 1 if self.pep_table and self.entry == 2 and len(node) == 1: node['class'] = 'num' p = node[0] if isinstance(p, nodes.paragraph) and len(p) == 1: text = p.astext() try: pep = int(text) ref = self.pep_url % pep p[0] = nodes.reference(text, text, refuri=ref) except ValueError: pass non_masked_addresses = ('peps@python.org', 'python-list@python.org', 'python-dev@python.org') def mask_email(ref, pepno=None): """ Mask the email address in `ref` and return a replacement node. `ref` is returned unchanged if it contains no email address. For email addresses such as "user@host", mask the address as "user at host" (text) to thwart simple email address harvesters (except for those listed in `non_masked_addresses`). If a PEP number (`pepno`) is given, return a reference including a default email subject. """ if ref.hasattr('refuri') and ref['refuri'].startswith('mailto:'): if ref['refuri'][8:] in non_masked_addresses: replacement = ref[0] else: replacement_text = ref.astext().replace('@', ' at ') replacement = nodes.raw('', replacement_text, format='html') if pepno is None: return replacement else: ref['refuri'] += '?subject=PEP%%20%s' % pepno ref[:] = [replacement] return ref else: return ref --- NEW FILE: references.py --- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ Transforms for resolving references. """ __docformat__ = 'reStructuredText' import sys import re from docutils import nodes, utils from docutils.transforms import TransformError, Transform indices = xrange(sys.maxint) class ChainedTargets(Transform): """ Attributes "refuri" and "refname" are migrated from the final direct target up the chain of contiguous adjacent internal targets, using `ChainedTargetResolver`. """ default_priority = 420 def apply(self): visitor = ChainedTargetResolver(self.document) self.document.walk(visitor) class ChainedTargetResolver(nodes.SparseNodeVisitor): """ Copy reference attributes up the length of a hyperlink target chain. "Chained targets" are multiple adjacent internal hyperlink targets which "point to" an external or indirect target. After the transform, all chained targets will effectively point to the same place. Given the following ``document`` as input:: <document> <target id="a" name="a"> <target id="b" name="b"> <target id="c" name="c" refuri="http://chained.external.targets"> <target id="d" name="d"> <paragraph> I'm known as "d". <target id="e" name="e"> <target id="id1"> <target id="f" name="f" refname="d"> ``ChainedTargetResolver(document).walk()`` will transform the above into:: <document> <target id="a" name="a" refuri="http://chained.external.targets"> <target id="b" name="b" refuri="http://chained.external.targets"> <target id="c" name="c" refuri="http://chained.external.targets"> <target id="d" name="d"> <paragraph> I'm known as "d". <target id="e" name="e" refname="d"> <target id="id1" refname="d"> <target id="f" name="f" refname="d"> """ def unknown_visit(self, node): pass def visit_target(self, node): if node.hasattr('refuri'): attname = 'refuri' call_if_named = self.document.note_external_target elif node.hasattr('refname'): attname = 'refname' call_if_named = self.document.note_indirect_target elif node.hasattr('refid'): attname = 'refid' call_if_named = None else: return attval = node[attname] index = node.parent.index(node) for i in range(index - 1, -1, -1): sibling = node.parent[i] if not isinstance(sibling, nodes.target) \ or sibling.hasattr('refuri') \ or sibling.hasattr('refname') \ or sibling.hasattr('refid'): break sibling[attname] = attval if sibling.hasattr('name') and call_if_named: call_if_named(sibling) class AnonymousHyperlinks(Transform): """ Link anonymous references to targets. Given:: <paragraph> <reference anonymous="1"> internal <reference anonymous="1"> external <target anonymous="1" id="id1"> <target anonymous="1" id="id2" refuri="http://external"> Corresponding references are linked via "refid" or resolved via "refuri":: <paragraph> <reference anonymous="1" refid="id1"> text <reference anonymous="1" refuri="http://external"> external <target anonymous="1" id="id1"> <target anonymous="1" id="id2" refuri="http://external"> """ default_priority = 440 def apply(self): if len(self.document.anonymous_refs) \ != len(self.document.anonymous_targets): msg = self.document.reporter.error( 'Anonymous hyperlink mismatch: %s references but %s ' 'targets.\nSee "backrefs" attribute for IDs.' % (len(self.document.anonymous_refs), len(self.document.anonymous_targets))) msgid = self.document.set_id(msg) for ref in self.document.anonymous_refs: prb = nodes.problematic( ref.rawsource, ref.rawsource, refid=msgid) prbid = self.document.set_id(prb) msg.add_backref(prbid) ref.parent.replace(ref, prb) return for ref, target in zip(self.document.anonymous_refs, self.document.anonymous_targets): if target.hasattr('refuri'): ref['refuri'] = target['refuri'] ref.resolved = 1 else: ref['refid'] = target['id'] self.document.note_refid(ref) target.referenced = 1 class IndirectHyperlinks(Transform): """ a) Indirect external references:: <paragraph> <reference refname="indirect external"> indirect external <target id="id1" name="direct external" refuri="http://indirect"> <target id="id2" name="indirect external" refname="direct external"> The "refuri" attribute is migrated back to all indirect targets from the final direct target (i.e. a target not referring to another indirect target):: <paragraph> <reference refname="indirect external"> indirect external <target id="id1" name="direct external" refuri="http://indirect"> <target id="id2" name="indirect external" refuri="http://indirect"> Once the attribute is migrated, the preexisting "refname" attribute is dropped. b) Indirect internal references:: <target id="id1" name="final target"> <paragraph> <reference refname="indirect internal"> indirect internal <target id="id2" name="indirect internal 2" refname="final target"> <target id="id3" name="indirect internal" refname="indirect internal 2"> Targets which indirectly refer to an internal target become one-hop indirect (their "refid" attributes are directly set to the internal target's "id"). References which indirectly refer to an internal target become direct internal references:: <target id="id1" name="final target"> <paragraph> <reference refid="id1"> indirect internal <target id="id2" name="indirect internal 2" refid="id1"> <target id="id3" name="indirect internal" refid="id1"> """ default_priority = 460 def apply(self): for target in self.document.indirect_targets: if not target.resolved: self.resolve_indirect_target(target) self.resolve_indirect_references(target) def resolve_indirect_target(self, target): refname = target['refname'] reftarget_id = self.document.nameids.get(refname) if not reftarget_id: self.nonexistent_indirect_target(target) return reftarget = self.document.ids[reftarget_id] if isinstance(reftarget, nodes.target) \ and not reftarget.resolved and reftarget.hasattr('refname'): self.one_indirect_target(reftarget) # multiply indirect if reftarget.hasattr('refuri'): target['refuri'] = reftarget['refuri'] if target.hasattr('name'): self.document.note_external_target(target) elif reftarget.hasattr('refid'): target['refid'] = reftarget['refid'] self.document.note_refid(target) else: try: target['refid'] = reftarget['id'] self.document.note_refid(target) except KeyError: self.nonexistent_indirect_target(target) return del target['refname'] target.resolved = 1 reftarget.referenced = 1 def nonexistent_indirect_target(self, target): naming = '' if target.hasattr('name'): naming = '"%s" ' % target['name'] reflist = self.document.refnames.get(target['name'], []) else: reflist = self.document.refids.get(target['id'], []) naming += '(id="%s")' % target['id'] msg = self.document.reporter.warning( 'Indirect hyperlink target %s refers to target "%s", ' 'which does not exist.' % (naming, target['refname']), base_node=target) msgid = self.document.set_id(msg) for ref in reflist: prb = nodes.problematic( ref.rawsource, ref.rawsource, refid=msgid) prbid = self.document.set_id(prb) msg.add_backref(prbid) ref.parent.replace(ref, prb) target.resolved = 1 def resolve_indirect_references(self, target): if target.hasattr('refid'): attname = 'refid' call_if_named = 0 call_method = self.document.note_refid elif target.hasattr('refuri'): attname = 'refuri' call_if_named = 1 call_method = self.document.note_external_target else: return attval = target[attname] if target.hasattr('name'): name = target['name'] try: reflist = self.document.refnames[name] except KeyError, instance: if target.referenced: return msg = self.document.reporter.info( 'Indirect hyperlink target "%s" is not referenced.' % name, base_node=target) target.referenced = 1 return delatt = 'refname' else: id = target['id'] try: reflist = self.document.refids[id] except KeyError, instance: if target.referenced: return msg = self.document.reporter.info( 'Indirect hyperlink target id="%s" is not referenced.' % id, base_node=target) target.referenced = 1 return delatt = 'refid' for ref in reflist: if ref.resolved: continue del ref[delatt] ref[attname] = attval if not call_if_named or ref.hasattr('name'): call_method(ref) ref.resolved = 1 if isinstance(ref, nodes.target): self.resolve_indirect_references(ref) target.referenced = 1 class ExternalTargets(Transform): """ Given:: <paragraph> <reference refname="direct external"> direct external <target id="id1" name="direct external" refuri="http://direct"> The "refname" attribute is replaced by the direct "refuri" attribute:: <paragraph> <reference refuri="http://direct"> direct external <target id="id1" name="direct external" refuri="http://direct"> """ default_priority = 640 def apply(self): for target in self.document.external_targets: if target.hasattr('refuri') and target.hasattr('name'): name = target['name'] refuri = target['refuri'] try: reflist = self.document.refnames[name] except KeyError, instance: if target.referenced: continue msg = self.document.reporter.info( 'External hyperlink target "%s" is not referenced.' % name, base_node=target) target.referenced = 1 continue for ref in reflist: if ref.resolved: continue del ref['refname'] ref['refuri'] = refuri ref.resolved = 1 target.referenced = 1 class InternalTargets(Transform): """ Given:: <paragraph> <reference refname="direct internal"> direct internal <target id="id1" name="direct internal"> The "refname" attribute is replaced by "refid" linking to the target's "id":: <paragraph> <reference refid="id1"> direct internal <target id="id1" name="direct internal"> """ default_priority = 660 def apply(self): for target in self.document.internal_targets: if target.hasattr('refuri') or target.hasattr('refid') \ or not target.hasattr('name'): continue name = target['name'] refid = target['id'] try: reflist = self.document.refnames[name] except KeyError, instance: if target.referenced: continue msg = self.document.reporter.info( 'Internal hyperlink target "%s" is not referenced.' % name, base_node=target) target.referenced = 1 continue for ref in reflist: if ref.resolved: continue del ref['refname'] ref['refid'] = refid ref.resolved = 1 target.referenced = 1 class Footnotes(Transform): """ Assign numbers to autonumbered footnotes, and resolve links to footnotes, citations, and their references. Given the following ``document`` as input:: <document> <paragraph> A labeled autonumbered footnote referece: <footnote_reference auto="1" id="id1" refname="footnote"> <paragraph> An unlabeled autonumbered footnote referece: <footnote_reference auto="1" id="id2"> <footnote auto="1" id="id3"> <paragraph> Unlabeled autonumbered footnote. <footnote auto="1" id="footnote" name="footnote"> <paragraph> Labeled autonumbered footnote. Auto-numbered footnotes have attribute ``auto="1"`` and no label. Auto-numbered footnote_references have no reference text (they're empty elements). When resolving the numbering, a ``label`` element is added to the beginning of the ``footnote``, and reference text to the ``footnote_reference``. The transformed result will be:: <document> <paragraph> A labeled autonumbered footnote referece: <footnote_reference auto="1" id="id1" refid="footnote"> 2 <paragraph> An unlabeled autonumbered footnote referece: <footnote_reference auto="1" id="id2" refid="id3"> 1 <footnote auto="1" id="id3" backrefs="id2"> <label> 1 <paragraph> Unlabeled autonumbered footnote. <footnote auto="1" id="footnote" name="footnote" backrefs="id1"> <label> 2 <paragraph> Labeled autonumbered footnote. Note that the footnotes are not in the same order as the references. The labels and reference text are added to the auto-numbered ``footnote`` and ``footnote_reference`` elements. Footnote elements are backlinked to their references via "refids" attributes. References are assigned "id" and "refid" attributes. After adding labels and reference text, the "auto" attributes can be ignored. """ default_priority = 620 autofootnote_labels = None """Keep track of unlabeled autonumbered footnotes.""" symbols = [ # Entries 1-4 and 6 below are from section 12.51 of # The Chicago Manual of Style, 14th edition. '*', # asterisk/star u'\u2020', # dagger † u'\u2021', # double dagger ‡ u'\u00A7', # section mark § u'\u00B6', # paragraph mark (pilcrow) ¶ # (parallels ['||'] in CMoS) '#', # number sign # The entries below were chosen arbitrarily. u'\u2660', # spade suit ♠ u'\u2665', # heart suit ♥ u'\u2666', # diamond suit ♦ u'\u2663', # club suit ♣ ] def apply(self): self.autofootnote_labels = [] startnum = self.document.autofootnote_start self.document.autofootnote_start = self.number_footnotes(startnum) self.number_footnote_references(startnum) self.symbolize_footnotes() self.resolve_footnotes_and_citations() def number_footnotes(self, startnum): """ Assign numbers to autonumbered footnotes. For labeled autonumbered footnotes, copy the number over to corresponding footnote references. """ for footnote in self.document.autofootnotes: while 1: label = str(startnum) startnum += 1 if not self.document.nameids.has_key(label): break footnote.insert(0, nodes.label('', label)) if footnote.hasattr('dupname'): continue if footnote.hasattr('name'): name = footnote['name'] for ref in self.document.footnote_refs.get(name, []): ref += nodes.Text(label) ref.delattr('refname') ref['refid'] = footnote['id'] footnote.add_backref(ref['id']) self.document.note_refid(ref) ref.resolved = 1 else: footnote['name'] = label self.document.note_explicit_target(footnote, footnote) self.autofootnote_labels.append(label) return startnum def number_footnote_references(self, startnum): """Assign numbers to autonumbered footnote references.""" i = 0 for ref in self.document.autofootnote_refs: if ref.resolved or ref.hasattr('refid'): continue try: label = self.autofootnote_labels[i] except IndexError: msg = self.document.reporter.error( 'Too many autonumbered footnote references: only %s ' 'corresponding footnotes available.' % len(self.autofootnote_labels), base_node=ref) msgid = self.document.set_id(msg) for ref in self.document.autofootnote_refs[i:]: if ref.resolved or ref.hasattr('refname'): continue prb = nodes.problematic( ref.rawsource, ref.rawsource, refid=msgid) prbid = self.document.set_id(prb) msg.add_backref(prbid) ref.parent.replace(ref, prb) break ref += nodes.Text(label) id = self.document.nameids[label] footnote = self.document.ids[id] ref['refid'] = id self.document.note_refid(ref) footnote.add_backref(ref['id']) ref.resolved = 1 i += 1 def symbolize_footnotes(self): """Add symbols indexes to "[*]"-style footnotes and references.""" labels = [] for footnote in self.document.symbol_footnotes: reps, index = divmod(self.document.symbol_footnote_start, len(self.symbols)) labeltext = self.symbols[index] * (reps + 1) labels.append(labeltext) footnote.insert(0, nodes.label('', labeltext)) self.document.symbol_footnote_start += 1 self.document.set_id(footnote) i = 0 for ref in self.document.symbol_footnote_refs: try: ref += nodes.Text(labels[i]) except IndexError: msg = self.document.reporter.error( 'Too many symbol footnote references: only %s ' 'corresponding footnotes available.' % len(labels), base_node=ref) msgid = self.document.set_id(msg) for ref in self.document.symbol_footnote_refs[i:]: if ref.resolved or ref.hasattr('refid'): continue prb = nodes.problematic( ref.rawsource, ref.rawsource, refid=msgid) prbid = self.document.set_id(prb) msg.add_backref(prbid) ref.parent.replace(ref, prb) break footnote = self.document.symbol_footnotes[i] ref['refid'] = footnote['id'] self.document.note_refid(ref) footnote.add_backref(ref['id']) i += 1 def resolve_footnotes_and_citations(self): """ Link manually-labeled footnotes and citations to/from their references. """ for footnote in self.document.footnotes: label = footnote['name'] if self.document.footnote_refs.has_key(label): reflist = self.document.footnote_refs[label] self.resolve_references(footnote, reflist) for citation in self.document.citations: label = citation['name'] if self.document.citation_refs.has_key(label): reflist = self.document.citation_refs[label] self.resolve_references(citation, reflist) def resolve_references(self, note, reflist): id = note['id'] for ref in reflist: if ref.resolved: continue ref.delattr('refname') ref['refid'] = id note.add_backref(ref['id']) ref.resolved = 1 note.resolved = 1 class Substitutions(Transform): """ Given the following ``document`` as input:: <document> <paragraph> The <substitution_reference refname="biohazard"> biohazard symbol is deservedly scary-looking. <substitution_definition name="biohazard"> <image alt="biohazard" uri="biohazard.png"> The ``substitution_reference`` will simply be replaced by the contents of the corresponding ``substitution_definition``. The transformed result will be:: <document> <paragraph> The <image alt="biohazard" uri="biohazard.png"> symbol is deservedly scary-looking. <substitution_definition name="biohazard"> <image alt="biohazard" uri="biohazard.png"> """ default_priority = 220 """The Substitutions transform has to be applied very early, before `docutils.tranforms.frontmatter.DocTitle` and others.""" def apply(self): defs = self.document.substitution_defs for refname, refs in self.document.substitution_refs.items(): for ref in refs: if defs.has_key(refname): ref.parent.replace(ref, defs[refname].get_children()) else: msg = self.document.reporter.error( 'Undefined substitution referenced: "%s".' % refname, base_node=ref) msgid = self.document.set_id(msg) prb = nodes.problematic( ref.rawsource, ref.rawsource, refid=msgid) prbid = self.document.set_id(prb) msg.add_backref(prbid) ref.parent.replace(ref, prb) self.document.substitution_refs = None # release replaced references class TargetNotes(Transform): """ Creates a footnote for each external target in the text, and corresponding footnote references after each reference. """ default_priority = 540 """The TargetNotes transform has to be applied after `IndirectHyperlinks` but before `Footnotes`.""" def apply(self): notes = {} nodelist = [] for target in self.document.external_targets: name = target.get('name') if not name: print >>sys.stderr, 'no name on target: %r' % target continue refs = self.document.refnames.get(name, []) if not refs: continue footnote = self.make_target_footnote(target, refs, notes) if not notes.has_key(target['refuri']): notes[target['refuri']] = footnote nodelist.append(footnote) if len(self.document.anonymous_targets) \ == len(self.document.anonymous_refs): for target, ref in zip(self.document.anonymous_targets, self.document.anonymous_refs): if target.hasattr('refuri'): footnote = self.make_target_footnote(target, [ref], notes) if not notes.has_key(target['refuri']): notes[target['refuri']] = footnote nodelist.append(footnote) self.startnode.parent.replace(self.startnode, nodelist) def make_target_footnote(self, target, refs, notes): refuri = target['refuri'] if notes.has_key(refuri): # duplicate? footnote = notes[refuri] footnote_name = footnote['name'] else: # original footnote = nodes.footnote() footnote_id = self.document.set_id(footnote) # Use a colon; they can't be produced inside names by the parser: footnote_name = 'target_note: ' + footnote_id footnote['auto'] = 1 footnote['name'] = footnote_name footnote_paragraph = nodes.paragraph() footnote_paragraph += nodes.reference('', refuri, refuri=refuri) footnote += footnote_paragraph self.document.note_autofootnote(footnote) self.document.note_explicit_target(footnote, footnote) for ref in refs: if isinstance(ref, nodes.target): continue refnode = nodes.footnote_reference( refname=footnote_name, auto=1) self.document.note_autofootnote_ref(refnode) self.document.note_footnote_ref(refnode) index = ref.parent.index(ref) + 1 reflist = [nodes.Text(' '), refnode] ref.parent.insert(index, reflist) return footnote --- NEW FILE: universal.py --- # Authors: David Goodger, Ueli Schlaepfer # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1.1 $ # Date: $Date: 2002/11/08 23:47:53 $ # Copyright: This module has been placed in the public domain. """ Transforms needed by most or all documents: - `Decorations`: Generate a document's header & footer. - `Messages`: Placement of system messages stored in `nodes.document.transform_messages`. - `TestMessages`: Like `Messages`, used on test runs. - `FinalReferences`: Resolve remaining references. """ __docformat__ = 'reStructuredText' import re import sys import time from docutils import nodes, utils from docutils.transforms import TransformError, Transform class Decorations(Transform): """ Populate a document's decoration element (header, footer). """ default_priority = 820 def apply(self): header = self.generate_header() footer = self.generate_footer() if header or footer: decoration = nodes.decoration() decoration += header decoration += footer document = self.document index = document.first_child_not_matching_class( nodes.PreDecorative) if index is None: document += decoration else: document[index:index] = [decoration] def generate_header(self): return None def generate_footer(self): # @@@ Text is hard-coded for now. # Should be made dynamic (language-dependent). settings = self.document.settings if settings.generator or settings.datestamp or settings.source_link \ or settings.source_url: text = [] if settings.source_link and settings._source \ or settings.source_url: if settings.source_url: source = settings.source_url else: source = utils.relative_path(settings._destination, settings._source) text.extend([ nodes.reference('', 'View document source', refuri=source), nodes.Text('.\n')]) if settings.datestamp: datestamp = time.strftime(settings.datestamp, time.gmtime()) text.append(nodes.Text('Generated on: ' + datestamp + '.\n')) if settings.generator: text.extend([ nodes.Text('Generated by '), nodes.reference('', 'Docutils', refuri= 'http://docutils.sourceforge.net/'), nodes.Text(' from '), nodes.reference('', 'reStructuredText', refuri='http://' 'docutils.sourceforge.net/rst.html'), nodes.Text(' source.\n')]) footer = nodes.footer() footer += nodes.paragraph('', '', *text) return footer else: return None class Messages(Transform): """ Place any system messages generated after parsing into a dedicated section of the document. """ default_priority = 860 def apply(self): unfiltered = self.document.transform_messages threshold = self.document.reporter['writer'].report_level messages = [] for msg in unfiltered: if msg['level'] >= threshold and not msg.parent: messages.append(msg) if len(messages) > 0: section = nodes.section(CLASS='system-messages') # @@@ get this from the language module? section += nodes.title('', 'Docutils System Messages') section += messages self.document.transform_messages[:] = [] self.document += section class TestMessages(Transform): """ Append all post-parse system messages to the end of the document. """ default_priority = 890 def apply(self): for msg in self.document.transform_messages: if not msg.parent: self.document += msg class FinalChecks(Transform): """ Perform last-minute checks. - Check for dangling references (incl. footnote & citation). """ default_priority = 840 def apply(self): visitor = FinalCheckVisitor(self.document) self.document.walk(visitor) if self.document.settings.expose_internals: visitor = InternalAttributeExposer(self.document) self.document.walk(visitor) class FinalCheckVisitor(nodes.SparseNodeVisitor): def unknown_visit(self, node): pass def visit_reference(self, node): if node.resolved or not node.hasattr('refname'): return refname = node['refname'] id = self.document.nameids.get(refname) if id is None: msg = self.document.reporter.error( 'Unknown target name: "%s".' % (node['refname']), base_node=node) msgid = self.document.set_id(msg) prb = nodes.problematic( node.rawsource, node.rawsource, refid=msgid) prbid = self.document.set_id(prb) msg.add_backref(prbid) node.parent.replace(node, prb) else: del node['refname'] node['refid'] = id self.document.ids[id].referenced = 1 node.resolved = 1 visit_footnote_reference = visit_citation_reference = visit_reference class InternalAttributeExposer(nodes.GenericNodeVisitor): def __init__(self, document): nodes.GenericNodeVisitor.__init__(self, document) self.internal_attributes = document.settings.expose_internals def default_visit(self, node): for att in self.internal_attributes: value = getattr(node, att, None) if value is not None: node['internal:' + att] = value From tim_one@users.sourceforge.net Sat Nov 9 04:21:46 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 20:21:46 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.4,1.5 Message-ID: <E18AN7y-0002c6-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv9970/modules Modified Files: bz2module.c Log Message: This couldn't compile on WIndows, due to hardcoded "long long". Repaired. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** bz2module.c 8 Nov 2002 14:31:49 -0000 1.4 --- bz2module.c 9 Nov 2002 04:21:44 -0000 1.5 *************** *** 37,41 **** #elif SIZEOF_LONG_LONG >= 8 #define BZS_TOTAL_OUT(bzs) \ ! (((long long)bzs->total_out_hi32 << 32) + bzs->total_out_lo32) #else #define BZS_TOTAL_OUT(bzs) \ --- 37,41 ---- #elif SIZEOF_LONG_LONG >= 8 #define BZS_TOTAL_OUT(bzs) \ ! (((LONG_LONG)bzs->total_out_hi32 << 32) + bzs->total_out_lo32) #else #define BZS_TOTAL_OUT(bzs) \ *************** *** 110,114 **** ret = 1; break; ! case BZ_PARAM_ERROR: PyErr_SetString(PyExc_ValueError, --- 110,114 ---- ret = 1; break; ! case BZ_PARAM_ERROR: PyErr_SetString(PyExc_ValueError, *************** *** 117,121 **** ret = 1; break; ! case BZ_MEM_ERROR: PyErr_NoMemory(); --- 117,121 ---- ret = 1; break; ! case BZ_MEM_ERROR: PyErr_NoMemory(); *************** *** 215,220 **** skipnextlf = 0; if (c == '\n') { ! /* Seeing a \n here with ! * skipnextlf true means we * saw a \r before. */ --- 215,220 ---- skipnextlf = 0; if (c == '\n') { ! /* Seeing a \n here with ! * skipnextlf true means we * saw a \r before. */ *************** *** 378,382 **** if (f->f_buf != NULL) { ! if((f->f_bufend - f->f_bufptr) >= 1) return 0; else --- 378,382 ---- if (f->f_buf != NULL) { ! if((f->f_bufend - f->f_bufptr) >= 1) return 0; else *************** *** 419,427 **** if (f->f_buf == NULL) ! if (Util_ReadAhead(bf, bufsize) < 0) return NULL; len = f->f_bufend - f->f_bufptr; ! if (len == 0) return (PyStringObject *) PyString_FromStringAndSize(NULL, skip); --- 419,427 ---- if (f->f_buf == NULL) ! if (Util_ReadAhead(bf, bufsize) < 0) return NULL; len = f->f_bufend - f->f_bufptr; ! if (len == 0) return (PyStringObject *) PyString_FromStringAndSize(NULL, skip); *************** *** 432,436 **** s = (PyStringObject *) PyString_FromStringAndSize(NULL, skip+len); ! if (s == NULL) return NULL; memcpy(PyString_AS_STRING(s)+skip, f->f_bufptr, len); --- 432,436 ---- s = (PyStringObject *) PyString_FromStringAndSize(NULL, skip+len); ! if (s == NULL) return NULL; memcpy(PyString_AS_STRING(s)+skip, f->f_bufptr, len); *************** *** 472,479 **** int bzerror; PyObject *ret = NULL; ! if (!PyArg_ParseTuple(args, "|l:read", &bytesrequested)) return NULL; ! ACQUIRE_LOCK(self); switch (self->mode) { --- 472,479 ---- int bzerror; PyObject *ret = NULL; ! if (!PyArg_ParseTuple(args, "|l:read", &bytesrequested)) return NULL; ! ACQUIRE_LOCK(self); switch (self->mode) { *************** *** 762,776 **** if (!PyArg_ParseTuple(args, "s#", &buf, &len)) return NULL; ! ACQUIRE_LOCK(self); switch (self->mode) { case MODE_WRITE: break; ! case MODE_CLOSED: PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); goto cleanup;; ! default: PyErr_SetString(PyExc_IOError, --- 762,776 ---- if (!PyArg_ParseTuple(args, "s#", &buf, &len)) return NULL; ! ACQUIRE_LOCK(self); switch (self->mode) { case MODE_WRITE: break; ! case MODE_CLOSED: PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); goto cleanup;; ! default: PyErr_SetString(PyExc_IOError, *************** *** 785,794 **** self->pos += len; Py_END_ALLOW_THREADS ! if (bzerror != BZ_OK) { Util_CatchBZ2Error(bzerror); goto cleanup; } ! Py_INCREF(Py_None); ret = Py_None; --- 785,794 ---- self->pos += len; Py_END_ALLOW_THREADS ! if (bzerror != BZ_OK) { Util_CatchBZ2Error(bzerror); goto cleanup; } ! Py_INCREF(Py_None); ret = Py_None; *************** *** 946,950 **** PyObject *func; PyObject *ret = NULL; ! if (!PyArg_ParseTuple(args, "l|i:seek", &offset, &where)) return NULL; --- 946,950 ---- PyObject *func; PyObject *ret = NULL; ! if (!PyArg_ParseTuple(args, "l|i:seek", &offset, &where)) return NULL; *************** *** 956,965 **** case MODE_READ_EOF: break; ! case MODE_CLOSED: PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); goto cleanup;; ! default: PyErr_SetString(PyExc_IOError, --- 956,965 ---- case MODE_READ_EOF: break; ! case MODE_CLOSED: PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); goto cleanup;; ! default: PyErr_SetString(PyExc_IOError, *************** *** 1193,1197 **** self->size = -1; ! if (!PyArg_ParseTupleAndKeywords(args, kwargs, "et|sii:BZ2File", kwlist, Py_FileSystemDefaultEncoding, --- 1193,1197 ---- self->size = -1; ! if (!PyArg_ParseTupleAndKeywords(args, kwargs, "et|sii:BZ2File", kwlist, Py_FileSystemDefaultEncoding, *************** *** 1241,1245 **** else mode = univ_newline ? "wbU" : "wb"; ! file_args = Py_BuildValue("(ssi)", name, mode, buffering); if (!file_args) --- 1241,1245 ---- else mode = univ_newline ? "wbU" : "wb"; ! file_args = Py_BuildValue("(ssi)", name, mode, buffering); if (!file_args) *************** *** 1953,1957 **** return NULL; } ! for (;;) { Py_BEGIN_ALLOW_THREADS --- 1953,1957 ---- return NULL; } ! for (;;) { Py_BEGIN_ALLOW_THREADS *************** *** 2026,2030 **** return NULL; } ! for (;;) { Py_BEGIN_ALLOW_THREADS --- 2026,2030 ---- return NULL; } ! for (;;) { Py_BEGIN_ALLOW_THREADS From tim_one@users.sourceforge.net Sat Nov 9 04:23:33 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 20:23:33 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.5,1.6 Message-ID: <E18AN9h-0002i3-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv10370/modules Modified Files: bz2module.c Log Message: Repaired signed-vs-unsigned mismatch. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** bz2module.c 9 Nov 2002 04:21:44 -0000 1.5 --- bz2module.c 9 Nov 2002 04:23:31 -0000 1.6 *************** *** 1048,1052 **** * to walk forward. */ for (;;) { ! if (offset-bytesread > buffersize) readsize = buffersize; else --- 1048,1052 ---- * to walk forward. */ for (;;) { ! if ((size_t)offset-bytesread > buffersize) readsize = buffersize; else From tim_one@users.sourceforge.net Sat Nov 9 04:26:06 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 20:26:06 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.6,1.7 Message-ID: <E18ANCA-0002oP-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv10598/modules Modified Files: bz2module.c Log Message: BZ2Comp_compress(): changed decl of totalout to LONG_LONG, since it's solely used to hold LONG_LONG values, and the compiler rightfully warns about potential data loss otherwise. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** bz2module.c 9 Nov 2002 04:23:31 -0000 1.6 --- bz2module.c 9 Nov 2002 04:26:02 -0000 1.7 *************** *** 1433,1437 **** int datasize; int bufsize = SMALLCHUNK; ! long totalout; PyObject *ret = NULL; bz_stream *bzs = &self->bzs; --- 1433,1437 ---- int datasize; int bufsize = SMALLCHUNK; ! LONG_LONG totalout; PyObject *ret = NULL; bz_stream *bzs = &self->bzs; From tim_one@users.sourceforge.net Sat Nov 9 04:28:20 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 20:28:20 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.7,1.8 Message-ID: <E18ANEK-0002vE-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv11057/modules Modified Files: bz2module.c Log Message: BZ2Comp_compress(): Explicitly cast the LONG_LONG size argument to _PyString_Resize to int. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** bz2module.c 9 Nov 2002 04:26:02 -0000 1.7 --- bz2module.c 9 Nov 2002 04:28:17 -0000 1.8 *************** *** 1481,1485 **** } ! _PyString_Resize(&ret, BZS_TOTAL_OUT(bzs) - totalout); RELEASE_LOCK(self); --- 1481,1485 ---- } ! _PyString_Resize(&ret, (int)(BZS_TOTAL_OUT(bzs) - totalout)); RELEASE_LOCK(self); From tim_one@users.sourceforge.net Sat Nov 9 04:30:11 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 20:30:11 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.8,1.9 Message-ID: <E18ANG7-00031u-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv11497/modules Modified Files: bz2module.c Log Message: BZ2Comp_flush(): Fixed more int vs LONG_LONG confusions. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** bz2module.c 9 Nov 2002 04:28:17 -0000 1.8 --- bz2module.c 9 Nov 2002 04:30:08 -0000 1.9 *************** *** 1505,1509 **** PyObject *ret = NULL; bz_stream *bzs = &self->bzs; ! int totalout; int bzerror; --- 1505,1509 ---- PyObject *ret = NULL; bz_stream *bzs = &self->bzs; ! LONG_LONG totalout; int bzerror; *************** *** 1547,1551 **** if (bzs->avail_out != 0) ! _PyString_Resize(&ret, BZS_TOTAL_OUT(bzs) - totalout); RELEASE_LOCK(self); --- 1547,1551 ---- if (bzs->avail_out != 0) ! _PyString_Resize(&ret, (int)(BZS_TOTAL_OUT(bzs) - totalout)); RELEASE_LOCK(self); From tim_one@users.sourceforge.net Sat Nov 9 04:31:41 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 20:31:41 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.9,1.10 Message-ID: <E18ANHZ-00035g-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv11840/modules Modified Files: bz2module.c Log Message: BZ2Decomp_decompress(): Fixed more long vs LONG_LONG confusions. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** bz2module.c 9 Nov 2002 04:30:08 -0000 1.9 --- bz2module.c 9 Nov 2002 04:31:38 -0000 1.10 *************** *** 1710,1714 **** int datasize; int bufsize = SMALLCHUNK; ! long totalout; PyObject *ret = NULL; bz_stream *bzs = &self->bzs; --- 1710,1714 ---- int datasize; int bufsize = SMALLCHUNK; ! LONG_LONG totalout; PyObject *ret = NULL; bz_stream *bzs = &self->bzs; *************** *** 1770,1774 **** if (bzs->avail_out != 0) ! _PyString_Resize(&ret, BZS_TOTAL_OUT(bzs) - totalout); RELEASE_LOCK(self); --- 1770,1774 ---- if (bzs->avail_out != 0) ! _PyString_Resize(&ret, (int)(BZS_TOTAL_OUT(bzs) - totalout)); RELEASE_LOCK(self); From tim_one@users.sourceforge.net Sat Nov 9 04:33:39 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 20:33:39 -0800 Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.10,1.11 Message-ID: <E18ANJT-0003CI-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv12156/modules Modified Files: bz2module.c Log Message: bz2_compress/bz2_decompress: more casting away LONG_LONG for _PyString_Resize calls. Index: bz2module.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** bz2module.c 9 Nov 2002 04:31:38 -0000 1.10 --- bz2module.c 9 Nov 2002 04:33:36 -0000 1.11 *************** *** 1979,1983 **** if (bzs->avail_out != 0) ! _PyString_Resize(&ret, BZS_TOTAL_OUT(bzs)); BZ2_bzCompressEnd(bzs); --- 1979,1983 ---- if (bzs->avail_out != 0) ! _PyString_Resize(&ret, (int)BZS_TOTAL_OUT(bzs)); BZ2_bzCompressEnd(bzs); *************** *** 2058,2062 **** if (bzs->avail_out != 0) ! _PyString_Resize(&ret, BZS_TOTAL_OUT(bzs)); BZ2_bzDecompressEnd(bzs); --- 2058,2062 ---- if (bzs->avail_out != 0) ! _PyString_Resize(&ret, (int)BZS_TOTAL_OUT(bzs)); BZ2_bzDecompressEnd(bzs); From tim_one@users.sourceforge.net Sat Nov 9 04:44:32 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 20:44:32 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_bz2.py,1.1,1.2 Message-ID: <E18ANU0-0003ee-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv13951/lib/test Modified Files: test_bz2.py Log Message: Open at least one binary file in binary mode. This allows a few of the bz2 tests to pass on Windows; most are still failing. Index: test_bz2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_bz2.py 5 Nov 2002 16:50:05 -0000 1.1 --- test_bz2.py 9 Nov 2002 04:44:30 -0000 1.2 *************** *** 35,39 **** def createTempFile(self, crlf=0): ! f = open(self.filename, "w") if crlf: data = self.DATA_CRLF --- 35,39 ---- def createTempFile(self, crlf=0): ! f = open(self.filename, "wb") if crlf: data = self.DATA_CRLF From tim_one@users.sourceforge.net Sat Nov 9 04:49:00 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 20:49:00 -0800 Subject: [Python-checkins] python/dist/src/PC dllbase_nt.txt,1.4,1.5 Message-ID: <E18ANYK-0003pt-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory usw-pr-cvs1:/tmp/cvs-serv14224/python/PC Modified Files: dllbase_nt.txt Log Message: Start building the bz2 module on Windows. CAUTION: The Python test still has many failures, but I'm out of time for this now (already took much longer than hoped to get this far). The base bz2 library does pass its own tests (see next). CAUTION: People building on Windows have to download and build tne bz2 compression libraries now. See PCbuild\readme.txt for complete instructions. Index: dllbase_nt.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/dllbase_nt.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dllbase_nt.txt 6 Sep 2001 06:42:00 -0000 1.4 --- dllbase_nt.txt 9 Nov 2002 04:48:58 -0000 1.5 *************** *** 31,34 **** --- 31,35 ---- - unicodedata 1D120000 - 1D160000 - winsound 1D160000 - 1D170000 + - bZ2 1D170000 - 1D180000 Other extension modules From tim_one@users.sourceforge.net Sat Nov 9 04:49:00 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 20:49:00 -0800 Subject: [Python-checkins] python/dist/src/PCbuild bz2.dsp,NONE,1.1 pcbuild.dsw,1.26,1.27 readme.txt,1.24,1.25 Message-ID: <E18ANYK-0003pz-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory usw-pr-cvs1:/tmp/cvs-serv14224/python/PCbuild Modified Files: pcbuild.dsw readme.txt Added Files: bz2.dsp Log Message: Start building the bz2 module on Windows. CAUTION: The Python test still has many failures, but I'm out of time for this now (already took much longer than hoped to get this far). The base bz2 library does pass its own tests (see next). CAUTION: People building on Windows have to download and build tne bz2 compression libraries now. See PCbuild\readme.txt for complete instructions. --- NEW FILE: bz2.dsp --- # Microsoft Developer Studio Project File - Name="bz2" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=bz2 - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "bz2.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "bz2.mak" CFG="bz2 - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "bz2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "bz2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "bz2" # PROP Scc_LocalPath ".." CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "bz2 - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "." # PROP Intermediate_Dir "x86-temp-release\bz2" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\Include" /I "..\PC" /I "..\..\bzip2-1.0.2" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 # ADD LINK32 ..\..\bzip2-1.0.2\libbz2.lib /nologo /base:"0x1D170000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./bz2.pyd" # SUBTRACT LINK32 /pdb:none /nodefaultlib !ELSEIF "$(CFG)" == "bz2 - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "." # PROP Intermediate_Dir "x86-temp-debug\bz2" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" F90=df.exe # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /I "..\..\bzip2-1.0.2" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 ..\..\bzip2-1.0.2\libbz2.lib /nologo /base:"0x1D170000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /nodefaultlib:"libc" /out:"./bz2_d.pyd" /pdbtype:sept # SUBTRACT LINK32 /pdb:none !ENDIF # Begin Target # Name "bz2 - Win32 Release" # Name "bz2 - Win32 Debug" # Begin Source File SOURCE=..\Modules\bz2module.c # End Source File # End Target # End Project Index: pcbuild.dsw =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/pcbuild.dsw,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** pcbuild.dsw 4 Feb 2001 03:09:53 -0000 1.26 --- pcbuild.dsw 9 Nov 2002 04:48:58 -0000 1.27 *************** *** 94,97 **** --- 94,109 ---- ############################################################################### + Project: "bz2"=.\bz2.dsp - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ + }}} + + ############################################################################### + Project: "mmap"=.\mmap.dsp - Package Owner=<4> Index: readme.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/readme.txt,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** readme.txt 10 Jul 2002 17:05:14 -0000 1.24 --- readme.txt 9 Nov 2002 04:48:58 -0000 1.25 *************** *** 89,92 **** --- 89,120 ---- you need to clean up zlib-1.1.4\ by hand. + bz2 + Python wrapper for the libbz2 compression library. Homepage + http://sources.redhat.com/bzip2/ + Download the source tarball, bzip2-1.0.2.tar.gz. + Unpack into dist\bzip2-1.0.2. WARNING: If you using WinZip, you + must disable its "TAR file smart CR/LF conversion" feature (under + Options -> Configuration -> Miscellaneous -> Other) for the duration. + Don't bother trying to use libbz2.dsp with MSVC. After 10 minutes + of fiddling, I couldn't get it to work. Perhaps it works with + MSVC 5 (I used MSVC 6). It's better to run the by-hand makefile + anyway, because it runs a helpful test step at the end. + cd into dist\bzip2-1.0.2, and run + nmake -f makefile.msc + [Note that if you're running Win9X, you'll need to run vcvars32.bat + before running nmake (this batch file is in your MSVC installation). + TODO: make this work like zlib (in particular, MSVC runs the prelink + step in an enviroment that already has the correct envars set up). + ] + The make step should yield any warnings or errors, and should end + by displaying 6 blocks each terminated with + FC: no differences encountered + If FC finds differences, see the warning abou WinZip above (when I + first tried it, sample3.ref failed due to CRLF conversion). + All of this managed to build bzip2-1.0.2\libbz2.lib, which the Python + project links in. + + + bsddb Python wrapper for the BSD database 1.85. Requires db.1.85.win32.zip, From tim_one@users.sourceforge.net Sat Nov 9 05:08:10 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 21:08:10 -0800 Subject: [Python-checkins] python/dist/src/Lib ConfigParser.py,1.51,1.52 httplib.py,1.66,1.67 locale.py,1.23,1.24 posixpath.py,1.53,1.54 site.py,1.45,1.46 telnetlib.py,1.21,1.22 Message-ID: <E18ANqs-0004pH-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv18453 Modified Files: ConfigParser.py httplib.py locale.py posixpath.py site.py telnetlib.py Log Message: Whitespace normalization. Index: ConfigParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** ConfigParser.py 6 Nov 2002 14:51:20 -0000 1.51 --- ConfigParser.py 9 Nov 2002 05:08:06 -0000 1.52 *************** *** 526,530 **** # do the string interpolation value = rawval ! depth = MAX_INTERPOLATION_DEPTH while depth: # Loop through this until it's done depth -= 1 --- 526,530 ---- # do the string interpolation value = rawval ! depth = MAX_INTERPOLATION_DEPTH while depth: # Loop through this until it's done depth -= 1 Index: httplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** httplib.py 3 Sep 2002 20:49:06 -0000 1.66 --- httplib.py 9 Nov 2002 05:08:06 -0000 1.67 *************** *** 372,376 **** if self.chunked: return self._read_chunked(amt) ! if amt is None: # unbounded read --- 372,376 ---- if self.chunked: return self._read_chunked(amt) ! if amt is None: # unbounded read *************** *** 442,446 **** return value ! def _safe_read(self, amt): """Read the number of bytes requested, compensating for partial reads. --- 442,446 ---- return value ! def _safe_read(self, amt): """Read the number of bytes requested, compensating for partial reads. Index: locale.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** locale.py 5 Nov 2002 03:49:09 -0000 1.23 --- locale.py 9 Nov 2002 05:08:06 -0000 1.24 *************** *** 273,277 **** # locales. Also, we ignore other modifiers. return code, 'iso-8859-15' ! if '.' in code: return code.split('.')[:2] --- 273,277 ---- # locales. Also, we ignore other modifiers. return code, 'iso-8859-15' ! if '.' in code: return code.split('.')[:2] *************** *** 421,425 **** else: return nl_langinfo(CODESET) ! ### Database --- 421,425 ---- else: return nl_langinfo(CODESET) ! ### Database Index: posixpath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** posixpath.py 8 Oct 2002 02:44:30 -0000 1.53 --- posixpath.py 9 Nov 2002 05:08:06 -0000 1.54 *************** *** 412,414 **** supports_unicode_filenames = False - --- 412,413 ---- Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** site.py 19 Sep 2002 11:11:27 -0000 1.45 --- site.py 9 Nov 2002 05:08:06 -0000 1.46 *************** *** 95,99 **** # XXX This should not be part of site.py, since it is needed even when # using the -S option for Python. See http://www.python.org/sf/586680 ! if (os.name == "posix" and sys.path and os.path.basename(sys.path[-1]) == "Modules"): from distutils.util import get_platform --- 95,99 ---- # XXX This should not be part of site.py, since it is needed even when # using the -S option for Python. See http://www.python.org/sf/586680 ! if (os.name == "posix" and sys.path and os.path.basename(sys.path[-1]) == "Modules"): from distutils.util import get_platform Index: telnetlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/telnetlib.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** telnetlib.py 4 Nov 2002 17:34:07 -0000 1.21 --- telnetlib.py 9 Nov 2002 05:08:06 -0000 1.22 *************** *** 400,409 **** raise EOFError, 'telnet connection closed' return buf ! def read_sb_data(self): """Return any data available in the SB ... SE queue. ! Return '' if no SB ... SE available. Should only be called ! after seeing a SB or SE command. When a new SB command is found, old unread SB data will be discarded. Don't block. --- 400,409 ---- raise EOFError, 'telnet connection closed' return buf ! def read_sb_data(self): """Return any data available in the SB ... SE queue. ! Return '' if no SB ... SE available. Should only be called ! after seeing a SB or SE command. When a new SB command is found, old unread SB data will be discarded. Don't block. *************** *** 443,447 **** self.iacseq += c continue ! self.iacseq = '' if c == IAC: --- 443,447 ---- self.iacseq += c continue ! self.iacseq = '' if c == IAC: *************** *** 469,473 **** opt = c if cmd in (DO, DONT): ! self.msg('IAC %s %d', cmd == DO and 'DO' or 'DONT', ord(opt)) if self.option_callback: --- 469,473 ---- opt = c if cmd in (DO, DONT): ! self.msg('IAC %s %d', cmd == DO and 'DO' or 'DONT', ord(opt)) if self.option_callback: From tim_one@users.sourceforge.net Sat Nov 9 05:08:10 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 21:08:10 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_bz2.py,1.2,1.3 Message-ID: <E18ANqs-0004pI-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv18453/test Modified Files: test_bz2.py Log Message: Whitespace normalization. Index: test_bz2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_bz2.py 9 Nov 2002 04:44:30 -0000 1.2 --- test_bz2.py 9 Nov 2002 05:08:07 -0000 1.3 *************** *** 29,37 **** def setUp(self): self.filename = tempfile.mktemp("bz2") ! def tearDown(self): if os.path.isfile(self.filename): os.unlink(self.filename) ! def createTempFile(self, crlf=0): f = open(self.filename, "wb") --- 29,37 ---- def setUp(self): self.filename = tempfile.mktemp("bz2") ! def tearDown(self): if os.path.isfile(self.filename): os.unlink(self.filename) ! def createTempFile(self, crlf=0): f = open(self.filename, "wb") *************** *** 42,46 **** f.write(data) f.close() ! def testRead(self): "Test BZ2File.read()" --- 42,46 ---- f.write(data) f.close() ! def testRead(self): "Test BZ2File.read()" *************** *** 49,53 **** self.assertEqual(bz2f.read(), self.TEXT) bz2f.close() ! def testReadChunk10(self): "Test BZ2File.read() in chunks of 10 bytes" --- 49,53 ---- self.assertEqual(bz2f.read(), self.TEXT) bz2f.close() ! def testReadChunk10(self): "Test BZ2File.read() in chunks of 10 bytes" *************** *** 62,66 **** self.assertEqual(text, text) bz2f.close() ! def testRead100(self): "Test BZ2File.read(100)" --- 62,66 ---- self.assertEqual(text, text) bz2f.close() ! def testRead100(self): "Test BZ2File.read(100)" *************** *** 69,73 **** self.assertEqual(bz2f.read(100), self.TEXT[:100]) bz2f.close() ! def testReadLine(self): "Test BZ2File.readline()" --- 69,73 ---- self.assertEqual(bz2f.read(100), self.TEXT[:100]) bz2f.close() ! def testReadLine(self): "Test BZ2File.readline()" *************** *** 78,82 **** self.assertEqual(bz2f.readline(), line) bz2f.close() ! def testReadLines(self): "Test BZ2File.readlines()" --- 78,82 ---- self.assertEqual(bz2f.readline(), line) bz2f.close() ! def testReadLines(self): "Test BZ2File.readlines()" *************** *** 86,90 **** self.assertEqual(bz2f.readlines(), sio.readlines()) bz2f.close() ! def testIterator(self): "Test iter(BZ2File)" --- 86,90 ---- self.assertEqual(bz2f.readlines(), sio.readlines()) bz2f.close() ! def testIterator(self): "Test iter(BZ2File)" *************** *** 94,98 **** self.assertEqual(list(iter(bz2f)), sio.readlines()) bz2f.close() ! def testXReadLines(self): "Test BZ2File.xreadlines()" --- 94,98 ---- self.assertEqual(list(iter(bz2f)), sio.readlines()) bz2f.close() ! def testXReadLines(self): "Test BZ2File.xreadlines()" *************** *** 102,106 **** self.assertEqual(list(bz2f.xreadlines()), sio.readlines()) bz2f.close() ! def testUniversalNewlinesLF(self): "Test BZ2File.read() with universal newlines (\\n)" --- 102,106 ---- self.assertEqual(list(bz2f.xreadlines()), sio.readlines()) bz2f.close() ! def testUniversalNewlinesLF(self): "Test BZ2File.read() with universal newlines (\\n)" *************** *** 110,114 **** self.assertEqual(bz2f.newlines, "\n") bz2f.close() ! def testUniversalNewlinesCRLF(self): "Test BZ2File.read() with universal newlines (\\r\\n)" --- 110,114 ---- self.assertEqual(bz2f.newlines, "\n") bz2f.close() ! def testUniversalNewlinesCRLF(self): "Test BZ2File.read() with universal newlines (\\r\\n)" *************** *** 118,122 **** self.assertEqual(bz2f.newlines, "\r\n") bz2f.close() ! def testWrite(self): "Test BZ2File.write()" --- 118,122 ---- self.assertEqual(bz2f.newlines, "\r\n") bz2f.close() ! def testWrite(self): "Test BZ2File.write()" *************** *** 152,156 **** self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() ! def testSeekForward(self): "Test BZ2File.seek(150, 0)" --- 152,156 ---- self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() ! def testSeekForward(self): "Test BZ2File.seek(150, 0)" *************** *** 174,178 **** bz2f.seek(-150, 2) self.assertEqual(bz2f.read(), self.TEXT[len(self.TEXT)-150:]) ! def testSeekPostEnd(self): "Test BZ2File.seek(150000)" --- 174,178 ---- bz2f.seek(-150, 2) self.assertEqual(bz2f.read(), self.TEXT[len(self.TEXT)-150:]) ! def testSeekPostEnd(self): "Test BZ2File.seek(150000)" *************** *** 259,263 **** class FuncTest(BaseTest): "Test module functions" ! def testCompress(self): "Test compress() function" --- 259,263 ---- class FuncTest(BaseTest): "Test module functions" ! def testCompress(self): "Test compress() function" *************** *** 269,273 **** text = decompress(self.DATA) self.assertEqual(text, self.TEXT) ! def testDecompressEmpty(self): "Test decompress() function with empty string" --- 269,273 ---- text = decompress(self.DATA) self.assertEqual(text, self.TEXT) ! def testDecompressEmpty(self): "Test decompress() function with empty string" From tim_one@users.sourceforge.net Sat Nov 9 05:22:44 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 21:22:44 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_bz2.py,1.3,1.4 Message-ID: <E18AO4y-0005XD-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv21230/Lib/test Modified Files: test_bz2.py Log Message: Comment out the test docstrings so we can at least tell which tests are failing. Index: test_bz2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_bz2.py 9 Nov 2002 05:08:07 -0000 1.3 --- test_bz2.py 9 Nov 2002 05:22:41 -0000 1.4 *************** *** 44,48 **** def testRead(self): ! "Test BZ2File.read()" self.createTempFile() bz2f = BZ2File(self.filename) --- 44,48 ---- def testRead(self): ! # "Test BZ2File.read()" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 51,55 **** def testReadChunk10(self): ! "Test BZ2File.read() in chunks of 10 bytes" self.createTempFile() bz2f = BZ2File(self.filename) --- 51,55 ---- def testReadChunk10(self): ! # "Test BZ2File.read() in chunks of 10 bytes" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 64,68 **** def testRead100(self): ! "Test BZ2File.read(100)" self.createTempFile() bz2f = BZ2File(self.filename) --- 64,68 ---- def testRead100(self): ! # "Test BZ2File.read(100)" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 71,75 **** def testReadLine(self): ! "Test BZ2File.readline()" self.createTempFile() bz2f = BZ2File(self.filename) --- 71,75 ---- def testReadLine(self): ! # "Test BZ2File.readline()" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 80,84 **** def testReadLines(self): ! "Test BZ2File.readlines()" self.createTempFile() bz2f = BZ2File(self.filename) --- 80,84 ---- def testReadLines(self): ! # "Test BZ2File.readlines()" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 88,92 **** def testIterator(self): ! "Test iter(BZ2File)" self.createTempFile() bz2f = BZ2File(self.filename) --- 88,92 ---- def testIterator(self): ! # "Test iter(BZ2File)" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 96,100 **** def testXReadLines(self): ! "Test BZ2File.xreadlines()" self.createTempFile() bz2f = BZ2File(self.filename) --- 96,100 ---- def testXReadLines(self): ! # "Test BZ2File.xreadlines()" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 104,108 **** def testUniversalNewlinesLF(self): ! "Test BZ2File.read() with universal newlines (\\n)" self.createTempFile() bz2f = BZ2File(self.filename, "rU") --- 104,108 ---- def testUniversalNewlinesLF(self): ! # "Test BZ2File.read() with universal newlines (\\n)" self.createTempFile() bz2f = BZ2File(self.filename, "rU") *************** *** 112,116 **** def testUniversalNewlinesCRLF(self): ! "Test BZ2File.read() with universal newlines (\\r\\n)" self.createTempFile(crlf=1) bz2f = BZ2File(self.filename, "rU") --- 112,116 ---- def testUniversalNewlinesCRLF(self): ! # "Test BZ2File.read() with universal newlines (\\r\\n)" self.createTempFile(crlf=1) bz2f = BZ2File(self.filename, "rU") *************** *** 120,124 **** def testWrite(self): ! "Test BZ2File.write()" bz2f = BZ2File(self.filename, "w") bz2f.write(self.TEXT) --- 120,124 ---- def testWrite(self): ! # "Test BZ2File.write()" bz2f = BZ2File(self.filename, "w") bz2f.write(self.TEXT) *************** *** 129,133 **** def testWriteChunks10(self): ! "Test BZ2File.write() with chunks of 10 bytes" bz2f = BZ2File(self.filename, "w") n = 0 --- 129,133 ---- def testWriteChunks10(self): ! # "Test BZ2File.write() with chunks of 10 bytes" bz2f = BZ2File(self.filename, "w") n = 0 *************** *** 144,148 **** def testWriteLines(self): ! "Test BZ2File.writelines()" bz2f = BZ2File(self.filename, "w") sio = StringIO(self.TEXT) --- 144,148 ---- def testWriteLines(self): ! # "Test BZ2File.writelines()" bz2f = BZ2File(self.filename, "w") sio = StringIO(self.TEXT) *************** *** 154,158 **** def testSeekForward(self): ! "Test BZ2File.seek(150, 0)" self.createTempFile() bz2f = BZ2File(self.filename) --- 154,158 ---- def testSeekForward(self): ! # "Test BZ2File.seek(150, 0)" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 161,165 **** def testSeekBackwards(self): ! "Test BZ2File.seek(-150, 1)" self.createTempFile() bz2f = BZ2File(self.filename) --- 161,165 ---- def testSeekBackwards(self): ! # "Test BZ2File.seek(-150, 1)" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 169,173 **** def testSeekBackwardsFromEnd(self): ! "Test BZ2File.seek(-150, 2)" self.createTempFile() bz2f = BZ2File(self.filename) --- 169,173 ---- def testSeekBackwardsFromEnd(self): ! # "Test BZ2File.seek(-150, 2)" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 176,180 **** def testSeekPostEnd(self): ! "Test BZ2File.seek(150000)" self.createTempFile() bz2f = BZ2File(self.filename) --- 176,180 ---- def testSeekPostEnd(self): ! # "Test BZ2File.seek(150000)" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 184,188 **** def testSeekPostEndTwice(self): ! "Test BZ2File.seek(150000) twice" self.createTempFile() bz2f = BZ2File(self.filename) --- 184,188 ---- def testSeekPostEndTwice(self): ! # "Test BZ2File.seek(150000) twice" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 193,197 **** def testSeekPreStart(self): ! "Test BZ2File.seek(-150, 0)" self.createTempFile() bz2f = BZ2File(self.filename) --- 193,197 ---- def testSeekPreStart(self): ! # "Test BZ2File.seek(-150, 0)" self.createTempFile() bz2f = BZ2File(self.filename) *************** *** 202,206 **** class BZ2CompressorTest(BaseTest): def testCompress(self): ! "Test BZ2Compressor.compress()/flush()" bz2c = BZ2Compressor() data = bz2c.compress(self.TEXT) --- 202,206 ---- class BZ2CompressorTest(BaseTest): def testCompress(self): ! # "Test BZ2Compressor.compress()/flush()" bz2c = BZ2Compressor() data = bz2c.compress(self.TEXT) *************** *** 209,213 **** def testCompressChunks10(self): ! "Test BZ2Compressor.compress()/flush() with chunks of 10 bytes" bz2c = BZ2Compressor() n = 0 --- 209,213 ---- def testCompressChunks10(self): ! # "Test BZ2Compressor.compress()/flush() with chunks of 10 bytes" bz2c = BZ2Compressor() n = 0 *************** *** 224,228 **** class BZ2DecompressorTest(BaseTest): def testDecompress(self): ! "Test BZ2Decompressor.decompress()" bz2d = BZ2Decompressor() text = bz2d.decompress(self.DATA) --- 224,228 ---- class BZ2DecompressorTest(BaseTest): def testDecompress(self): ! # "Test BZ2Decompressor.decompress()" bz2d = BZ2Decompressor() text = bz2d.decompress(self.DATA) *************** *** 230,234 **** def testDecompressChunks10(self): ! "Test BZ2Decompressor.decompress() with chunks of 10 bytes" bz2d = BZ2Decompressor() text = '' --- 230,234 ---- def testDecompressChunks10(self): ! # "Test BZ2Decompressor.decompress() with chunks of 10 bytes" bz2d = BZ2Decompressor() text = '' *************** *** 243,247 **** def testDecompressUnusedData(self): ! "Test BZ2Decompressor.decompress() with unused data" bz2d = BZ2Decompressor() unused_data = "this is unused data" --- 243,247 ---- def testDecompressUnusedData(self): ! # "Test BZ2Decompressor.decompress() with unused data" bz2d = BZ2Decompressor() unused_data = "this is unused data" *************** *** 251,255 **** def testEOFError(self): ! "Calling BZ2Decompressor.decompress() after EOS must raise EOFError" bz2d = BZ2Decompressor() text = bz2d.decompress(self.DATA) --- 251,255 ---- def testEOFError(self): ! # "Calling BZ2Decompressor.decompress() after EOS must raise EOFError" bz2d = BZ2Decompressor() text = bz2d.decompress(self.DATA) *************** *** 261,280 **** def testCompress(self): ! "Test compress() function" data = compress(self.TEXT) self.assertEqual(self.decompress(data), self.TEXT) def testDecompress(self): ! "Test decompress() function" text = decompress(self.DATA) self.assertEqual(text, self.TEXT) def testDecompressEmpty(self): ! "Test decompress() function with empty string" text = decompress("") self.assertEqual(text, "") def testDecompressIncomplete(self): ! "Test decompress() function with incomplete data" self.assertRaises(ValueError, decompress, self.DATA[:-10]) --- 261,280 ---- def testCompress(self): ! # "Test compress() function" data = compress(self.TEXT) self.assertEqual(self.decompress(data), self.TEXT) def testDecompress(self): ! # "Test decompress() function" text = decompress(self.DATA) self.assertEqual(text, self.TEXT) def testDecompressEmpty(self): ! # "Test decompress() function with empty string" text = decompress("") self.assertEqual(text, "") def testDecompressIncomplete(self): ! # "Test decompress() function with incomplete data" self.assertRaises(ValueError, decompress, self.DATA[:-10]) From tim_one@users.sourceforge.net Sat Nov 9 05:26:18 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 21:26:18 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_b1.py,1.56,1.57 test_bz2.py,1.4,1.5 test_codeccallbacks.py,1.2,1.3 test_pep277.py,1.4,1.5 test_sets.py,1.14,1.15 test_support.py,1.44,1.45 test_trace.py,1.5,1.6 Message-ID: <E18AO8Q-0005gH-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv21765/test Modified Files: test_b1.py test_bz2.py test_codeccallbacks.py test_pep277.py test_sets.py test_support.py test_trace.py Log Message: Whitespace normalization. Index: test_b1.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b1.py,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** test_b1.py 6 Nov 2002 16:15:10 -0000 1.56 --- test_b1.py 9 Nov 2002 05:26:13 -0000 1.57 *************** *** 471,476 **** if have_unicode: ! try: int(unichr(0x661) * 600) ! except: raise TestFailed("int('\\u0661' * 600) didn't return long") try: int(1, 12) --- 471,476 ---- if have_unicode: ! try: int(unichr(0x661) * 600) ! except: raise TestFailed("int('\\u0661' * 600) didn't return long") try: int(1, 12) *************** *** 540,554 **** # XXX re-enabled. try: ! # Verify clearing of bug #556025. ! # This assumes that the max data size (sys.maxint) == max ! # address size this also assumes that the address size is at ! # least 4 bytes with 8 byte addresses, the bug is not well ! # tested ! # ! # Note: This test is expected to SEGV under Cygwin 1.3.12 or ! # earlier due to a newlib bug. See the following mailing list ! # thread for the details: ! # http://sources.redhat.com/ml/newlib/2002/msg00369.html list(xrange(sys.maxint // 2)) except MemoryError: --- 540,554 ---- # XXX re-enabled. try: ! # Verify clearing of bug #556025. ! # This assumes that the max data size (sys.maxint) == max ! # address size this also assumes that the address size is at ! # least 4 bytes with 8 byte addresses, the bug is not well ! # tested ! # ! # Note: This test is expected to SEGV under Cygwin 1.3.12 or ! # earlier due to a newlib bug. See the following mailing list ! # thread for the details: ! # http://sources.redhat.com/ml/newlib/2002/msg00369.html list(xrange(sys.maxint // 2)) except MemoryError: Index: test_bz2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_bz2.py 9 Nov 2002 05:22:41 -0000 1.4 --- test_bz2.py 9 Nov 2002 05:26:14 -0000 1.5 *************** *** 9,281 **** class BaseTest(unittest.TestCase): ! "Base for other testcases." ! TEXT = 'root:x:0:0:root:/root:/bin/bash\nbin:x:1:1:bin:/bin:\ndaemon:x:2:2:daemon:/sbin:\nadm:x:3:4:adm:/var/adm:\nlp:x:4:7:lp:/var/spool/lpd:\nsync:x:5:0:sync:/sbin:/bin/sync\nshutdown:x:6:0:shutdown:/sbin:/sbin/shutdown\nhalt:x:7:0:halt:/sbin:/sbin/halt\nmail:x:8:12:mail:/var/spool/mail:\nnews:x:9:13:news:/var/spool/news:\nuucp:x:10:14:uucp:/var/spool/uucp:\noperator:x:11:0:operator:/root:\ngames:x:12:100:games:/usr/games:\ngopher:x:13:30:gopher:/usr/lib/gopher-data:\nftp:x:14:50:FTP User:/var/ftp:/bin/bash\nnobody:x:65534:65534:Nobody:/home:\npostfix:x:100:101:postfix:/var/spool/postfix:\nniemeyer:x:500:500::/home/niemeyer:/bin/bash\npostgres:x:101:102:PostgreSQL Server:/var/lib/pgsql:/bin/bash\nmysql:x:102:103:MySQL server:/var/lib/mysql:/bin/bash\nwww:x:103:104::/var/www:/bin/false\n' ! DATA = 'BZh91AY&SY.\xc8N\x18\x00\x01>_\x80\x00\x10@\x02\xff\xf0\x01\x07n\x00?\xe7\xff\xe00\x01\x99\xaa\x00\xc0\x03F\x86\x8c#&\x83F\x9a\x03\x06\xa6\xd0\xa6\x93M\x0fQ\xa7\xa8\x06\x804hh\x12$\x11\xa4i4\xf14S\xd2<Q\xb5\x0fH\xd3\xd4\xdd\xd5\x87\xbb\xf8\x94\r\x8f\xafI\x12\xe1\xc9\xf8/E\x00pu\x89\x12]\xc9\xbbDL\nQ\x0e\t1\x12\xdf\xa0\xc0\x97\xac2O9\x89\x13\x94\x0e\x1c7\x0ed\x95I\x0c\xaaJ\xa4\x18L\x10\x05#\x9c\xaf\xba\xbc/\x97\x8a#C\xc8\xe1\x8cW\xf9\xe2\xd0\xd6M\xa7\x8bXa<e\x84t\xcbL\xb3\xa7\xd9\xcd\xd1\xcb\x84.\xaf\xb3\xab\xab\xad`n}\xa0lh\tE,\x8eZ\x15\x17VH>\x88\xe5\xcd9gd6\x0b\n\xe9\x9b\xd5\x8a\x99\xf7\x08.K\x8ev\xfb\xf7xw\xbb\xdf\xa1\x92\xf1\xdd|/";\xa2\xba\x9f\xd5\xb1#A\xb6\xf6\xb3o\xc9\xc5y\\\xebO\xe7\x85\x9a\xbc\xb6f8\x952\xd5\xd7"%\x89>V,\xf7\xa6z\xe2\x9f\xa3\xdf\x11\x11"\xd6E)I\xa9\x13^\xca\xf3r\xd0\x03U\x922\xf26\xec\xb6\xed\x8b\xc3U\x13\x9d\xc5\x170\xa4\xfa^\x92\xacDF\x8a\x97\xd6\x19\xfe\xdd\xb8\xbd\x1a\x9a\x19\xa3\x80ankR\x8b\xe5\xd83]\xa9\xc6\x08\x82f\xf6\xb9"6l$\xb8j@\xc0\x8a\xb0l1..\xbak\x83ls\x15\xbc\xf4\xc1\x13\xbe\xf8E\xb8\x9d\r\xa8\x9dk\x84\xd3n\xfa\xacQ\x07\xb1%y\xaav\xb4\x08\xe0z\x1b\x16\xf5\x04\xe9\xcc\xb9\x08z\x1en7.G\xfc]\xc9\x14\xe1B@\xbb!8`' ! DATA_CRLF = 'BZh91AY&SY\xaez\xbbN\x00\x01H\xdf\x80\x00\x12@\x02\xff\xf0\x01\x07n\x00?\xe7\xff\xe0@\x01\xbc\xc6`\x86*\x8d=M\xa9\x9a\x86\xd0L@\x0fI\xa6!\xa1\x13\xc8\x88jdi\x8d@\x03@\x1a\x1a\x0c\x0c\x83 \x00\xc4h2\x19\x01\x82D\x84e\t\xe8\x99\x89\x19\x1ah\x00\r\x1a\x11\xaf\x9b\x0fG\xf5(\x1b\x1f?\t\x12\xcf\xb5\xfc\x95E\x00ps\x89\x12^\xa4\xdd\xa2&\x05(\x87\x04\x98\x89u\xe40%\xb6\x19\'\x8c\xc4\x89\xca\x07\x0e\x1b!\x91UIFU%C\x994!DI\xd2\xfa\xf0\xf1N8W\xde\x13A\xf5\x9cr%?\x9f3;I45A\xd1\x8bT\xb1<l\xba\xcb_\xc00xY\x17r\x17\x88\x08\x08@\xa0\ry@\x10\x04$)`\xf2\xce\x89z\xb0s\xec\x9b.iW\x9d\x81\xb5-+t\x9f\x1a\'\x97dB\xf5x\xb5\xbe.[.\xd7\x0e\x81\xe7\x08\x1cN`\x88\x10\xca\x87\xc3!"\x80\x92R\xa1/\xd1\xc0\xe6mf\xac\xbd\x99\xcca\xb3\x8780>\xa4\xc7\x8d\x1a\\"\xad\xa1\xabyBg\x15\xb9l\x88\x88\x91k"\x94\xa4\xd4\x89\xae*\xa6\x0b\x10\x0c\xd6\xd4m\xe86\xec\xb5j\x8a\x86j\';\xca.\x01I\xf2\xaaJ\xe8\x88\x8cU+t3\xfb\x0c\n\xa33\x13r2\r\x16\xe0\xb3(\xbf\x1d\x83r\xe7M\xf0D\x1365\xd8\x88\xd3\xa4\x92\xcb2\x06\x04\\\xc1\xb0\xea//\xbek&\xd8\xe6+t\xe5\xa1\x13\xada\x16\xder5"w]\xa2i\xb7[\x97R \xe2IT\xcd;Z\x04dk4\xad\x8a\t\xd3\x81z\x10\xf1:^`\xab\x1f\xc5\xdc\x91N\x14$+\x9e\xae\xd3\x80' ! def decompress(self, data): ! pop = popen2.Popen3("bunzip2", capturestderr=1) ! pop.tochild.write(data) ! pop.tochild.close() ! ret = pop.fromchild.read() ! pop.fromchild.close() ! if pop.wait() != 0: ! ret = decompress(data) ! return ret class BZ2FileTest(BaseTest): ! "Test MCRYPT type miscelaneous methods." ! def setUp(self): ! self.filename = tempfile.mktemp("bz2") ! def tearDown(self): ! if os.path.isfile(self.filename): ! os.unlink(self.filename) ! def createTempFile(self, crlf=0): ! f = open(self.filename, "wb") ! if crlf: ! data = self.DATA_CRLF ! else: ! data = self.DATA ! f.write(data) ! f.close() ! def testRead(self): ! # "Test BZ2File.read()" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! self.assertEqual(bz2f.read(), self.TEXT) ! bz2f.close() ! def testReadChunk10(self): ! # "Test BZ2File.read() in chunks of 10 bytes" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! text = '' ! while 1: ! str = bz2f.read(10) ! if not str: ! break ! text += str ! self.assertEqual(text, text) ! bz2f.close() ! def testRead100(self): ! # "Test BZ2File.read(100)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! self.assertEqual(bz2f.read(100), self.TEXT[:100]) ! bz2f.close() ! def testReadLine(self): ! # "Test BZ2File.readline()" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! sio = StringIO(self.TEXT) ! for line in sio.readlines(): ! self.assertEqual(bz2f.readline(), line) ! bz2f.close() ! def testReadLines(self): ! # "Test BZ2File.readlines()" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! sio = StringIO(self.TEXT) ! self.assertEqual(bz2f.readlines(), sio.readlines()) ! bz2f.close() ! def testIterator(self): ! # "Test iter(BZ2File)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! sio = StringIO(self.TEXT) ! self.assertEqual(list(iter(bz2f)), sio.readlines()) ! bz2f.close() ! def testXReadLines(self): ! # "Test BZ2File.xreadlines()" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! sio = StringIO(self.TEXT) ! self.assertEqual(list(bz2f.xreadlines()), sio.readlines()) ! bz2f.close() ! def testUniversalNewlinesLF(self): ! # "Test BZ2File.read() with universal newlines (\\n)" ! self.createTempFile() ! bz2f = BZ2File(self.filename, "rU") ! self.assertEqual(bz2f.read(), self.TEXT) ! self.assertEqual(bz2f.newlines, "\n") ! bz2f.close() ! def testUniversalNewlinesCRLF(self): ! # "Test BZ2File.read() with universal newlines (\\r\\n)" ! self.createTempFile(crlf=1) ! bz2f = BZ2File(self.filename, "rU") ! self.assertEqual(bz2f.read(), self.TEXT) ! self.assertEqual(bz2f.newlines, "\r\n") ! bz2f.close() ! def testWrite(self): ! # "Test BZ2File.write()" ! bz2f = BZ2File(self.filename, "w") ! bz2f.write(self.TEXT) ! bz2f.close() ! f = open(self.filename) ! self.assertEqual(self.decompress(f.read()), self.TEXT) ! f.close() ! def testWriteChunks10(self): ! # "Test BZ2File.write() with chunks of 10 bytes" ! bz2f = BZ2File(self.filename, "w") ! n = 0 ! while 1: ! str = self.TEXT[n*10:(n+1)*10] ! if not str: ! break ! bz2f.write(str) ! n += 1 ! bz2f.close() ! f = open(self.filename) ! self.assertEqual(self.decompress(f.read()), self.TEXT) ! f.close() ! def testWriteLines(self): ! # "Test BZ2File.writelines()" ! bz2f = BZ2File(self.filename, "w") ! sio = StringIO(self.TEXT) ! bz2f.writelines(sio.readlines()) ! bz2f.close() ! f = open(self.filename) ! self.assertEqual(self.decompress(f.read()), self.TEXT) ! f.close() ! def testSeekForward(self): ! # "Test BZ2File.seek(150, 0)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.seek(150) ! self.assertEqual(bz2f.read(), self.TEXT[150:]) ! def testSeekBackwards(self): ! # "Test BZ2File.seek(-150, 1)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.read(500) ! bz2f.seek(-150, 1) ! self.assertEqual(bz2f.read(), self.TEXT[500-150:]) ! def testSeekBackwardsFromEnd(self): ! # "Test BZ2File.seek(-150, 2)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.seek(-150, 2) ! self.assertEqual(bz2f.read(), self.TEXT[len(self.TEXT)-150:]) ! def testSeekPostEnd(self): ! # "Test BZ2File.seek(150000)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.seek(150000) ! self.assertEqual(bz2f.tell(), len(self.TEXT)) ! self.assertEqual(bz2f.read(), "") ! def testSeekPostEndTwice(self): ! # "Test BZ2File.seek(150000) twice" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.seek(150000) ! bz2f.seek(150000) ! self.assertEqual(bz2f.tell(), len(self.TEXT)) ! self.assertEqual(bz2f.read(), "") ! def testSeekPreStart(self): ! # "Test BZ2File.seek(-150, 0)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.seek(-150) ! self.assertEqual(bz2f.tell(), 0) ! self.assertEqual(bz2f.read(), self.TEXT) class BZ2CompressorTest(BaseTest): ! def testCompress(self): ! # "Test BZ2Compressor.compress()/flush()" ! bz2c = BZ2Compressor() ! data = bz2c.compress(self.TEXT) ! data += bz2c.flush() ! self.assertEqual(self.decompress(data), self.TEXT) ! def testCompressChunks10(self): ! # "Test BZ2Compressor.compress()/flush() with chunks of 10 bytes" ! bz2c = BZ2Compressor() ! n = 0 ! data = '' ! while 1: ! str = self.TEXT[n*10:(n+1)*10] ! if not str: ! break ! data += bz2c.compress(str) ! n += 1 ! data += bz2c.flush() ! self.assertEqual(self.decompress(data), self.TEXT) class BZ2DecompressorTest(BaseTest): ! def testDecompress(self): ! # "Test BZ2Decompressor.decompress()" ! bz2d = BZ2Decompressor() ! text = bz2d.decompress(self.DATA) ! self.assertEqual(text, self.TEXT) ! def testDecompressChunks10(self): ! # "Test BZ2Decompressor.decompress() with chunks of 10 bytes" ! bz2d = BZ2Decompressor() ! text = '' ! n = 0 ! while 1: ! str = self.DATA[n*10:(n+1)*10] ! if not str: ! break ! text += bz2d.decompress(str) ! n += 1 ! self.assertEqual(text, self.TEXT) ! def testDecompressUnusedData(self): ! # "Test BZ2Decompressor.decompress() with unused data" ! bz2d = BZ2Decompressor() ! unused_data = "this is unused data" ! text = bz2d.decompress(self.DATA+unused_data) ! self.assertEqual(text, self.TEXT) ! self.assertEqual(bz2d.unused_data, unused_data) ! def testEOFError(self): ! # "Calling BZ2Decompressor.decompress() after EOS must raise EOFError" ! bz2d = BZ2Decompressor() ! text = bz2d.decompress(self.DATA) ! self.assertRaises(EOFError, bz2d.decompress, "anything") class FuncTest(BaseTest): ! "Test module functions" ! def testCompress(self): ! # "Test compress() function" ! data = compress(self.TEXT) ! self.assertEqual(self.decompress(data), self.TEXT) ! def testDecompress(self): ! # "Test decompress() function" ! text = decompress(self.DATA) ! self.assertEqual(text, self.TEXT) ! def testDecompressEmpty(self): ! # "Test decompress() function with empty string" ! text = decompress("") ! self.assertEqual(text, "") ! def testDecompressIncomplete(self): ! # "Test decompress() function with incomplete data" ! self.assertRaises(ValueError, decompress, self.DATA[:-10]) def test_main(): --- 9,281 ---- class BaseTest(unittest.TestCase): ! "Base for other testcases." ! TEXT = 'root:x:0:0:root:/root:/bin/bash\nbin:x:1:1:bin:/bin:\ndaemon:x:2:2:daemon:/sbin:\nadm:x:3:4:adm:/var/adm:\nlp:x:4:7:lp:/var/spool/lpd:\nsync:x:5:0:sync:/sbin:/bin/sync\nshutdown:x:6:0:shutdown:/sbin:/sbin/shutdown\nhalt:x:7:0:halt:/sbin:/sbin/halt\nmail:x:8:12:mail:/var/spool/mail:\nnews:x:9:13:news:/var/spool/news:\nuucp:x:10:14:uucp:/var/spool/uucp:\noperator:x:11:0:operator:/root:\ngames:x:12:100:games:/usr/games:\ngopher:x:13:30:gopher:/usr/lib/gopher-data:\nftp:x:14:50:FTP User:/var/ftp:/bin/bash\nnobody:x:65534:65534:Nobody:/home:\npostfix:x:100:101:postfix:/var/spool/postfix:\nniemeyer:x:500:500::/home/niemeyer:/bin/bash\npostgres:x:101:102:PostgreSQL Server:/var/lib/pgsql:/bin/bash\nmysql:x:102:103:MySQL server:/var/lib/mysql:/bin/bash\nwww:x:103:104::/var/www:/bin/false\n' ! DATA = 'BZh91AY&SY.\xc8N\x18\x00\x01>_\x80\x00\x10@\x02\xff\xf0\x01\x07n\x00?\xe7\xff\xe00\x01\x99\xaa\x00\xc0\x03F\x86\x8c#&\x83F\x9a\x03\x06\xa6\xd0\xa6\x93M\x0fQ\xa7\xa8\x06\x804hh\x12$\x11\xa4i4\xf14S\xd2<Q\xb5\x0fH\xd3\xd4\xdd\xd5\x87\xbb\xf8\x94\r\x8f\xafI\x12\xe1\xc9\xf8/E\x00pu\x89\x12]\xc9\xbbDL\nQ\x0e\t1\x12\xdf\xa0\xc0\x97\xac2O9\x89\x13\x94\x0e\x1c7\x0ed\x95I\x0c\xaaJ\xa4\x18L\x10\x05#\x9c\xaf\xba\xbc/\x97\x8a#C\xc8\xe1\x8cW\xf9\xe2\xd0\xd6M\xa7\x8bXa<e\x84t\xcbL\xb3\xa7\xd9\xcd\xd1\xcb\x84.\xaf\xb3\xab\xab\xad`n}\xa0lh\tE,\x8eZ\x15\x17VH>\x88\xe5\xcd9gd6\x0b\n\xe9\x9b\xd5\x8a\x99\xf7\x08.K\x8ev\xfb\xf7xw\xbb\xdf\xa1\x92\xf1\xdd|/";\xa2\xba\x9f\xd5\xb1#A\xb6\xf6\xb3o\xc9\xc5y\\\xebO\xe7\x85\x9a\xbc\xb6f8\x952\xd5\xd7"%\x89>V,\xf7\xa6z\xe2\x9f\xa3\xdf\x11\x11"\xd6E)I\xa9\x13^\xca\xf3r\xd0\x03U\x922\xf26\xec\xb6\xed\x8b\xc3U\x13\x9d\xc5\x170\xa4\xfa^\x92\xacDF\x8a\x97\xd6\x19\xfe\xdd\xb8\xbd\x1a\x9a\x19\xa3\x80ankR\x8b\xe5\xd83]\xa9\xc6\x08\x82f\xf6\xb9"6l$\xb8j@\xc0\x8a\xb0l1..\xbak\x83ls\x15\xbc\xf4\xc1\x13\xbe\xf8E\xb8\x9d\r\xa8\x9dk\x84\xd3n\xfa\xacQ\x07\xb1%y\xaav\xb4\x08\xe0z\x1b\x16\xf5\x04\xe9\xcc\xb9\x08z\x1en7.G\xfc]\xc9\x14\xe1B@\xbb!8`' ! DATA_CRLF = 'BZh91AY&SY\xaez\xbbN\x00\x01H\xdf\x80\x00\x12@\x02\xff\xf0\x01\x07n\x00?\xe7\xff\xe0@\x01\xbc\xc6`\x86*\x8d=M\xa9\x9a\x86\xd0L@\x0fI\xa6!\xa1\x13\xc8\x88jdi\x8d@\x03@\x1a\x1a\x0c\x0c\x83 \x00\xc4h2\x19\x01\x82D\x84e\t\xe8\x99\x89\x19\x1ah\x00\r\x1a\x11\xaf\x9b\x0fG\xf5(\x1b\x1f?\t\x12\xcf\xb5\xfc\x95E\x00ps\x89\x12^\xa4\xdd\xa2&\x05(\x87\x04\x98\x89u\xe40%\xb6\x19\'\x8c\xc4\x89\xca\x07\x0e\x1b!\x91UIFU%C\x994!DI\xd2\xfa\xf0\xf1N8W\xde\x13A\xf5\x9cr%?\x9f3;I45A\xd1\x8bT\xb1<l\xba\xcb_\xc00xY\x17r\x17\x88\x08\x08@\xa0\ry@\x10\x04$)`\xf2\xce\x89z\xb0s\xec\x9b.iW\x9d\x81\xb5-+t\x9f\x1a\'\x97dB\xf5x\xb5\xbe.[.\xd7\x0e\x81\xe7\x08\x1cN`\x88\x10\xca\x87\xc3!"\x80\x92R\xa1/\xd1\xc0\xe6mf\xac\xbd\x99\xcca\xb3\x8780>\xa4\xc7\x8d\x1a\\"\xad\xa1\xabyBg\x15\xb9l\x88\x88\x91k"\x94\xa4\xd4\x89\xae*\xa6\x0b\x10\x0c\xd6\xd4m\xe86\xec\xb5j\x8a\x86j\';\xca.\x01I\xf2\xaaJ\xe8\x88\x8cU+t3\xfb\x0c\n\xa33\x13r2\r\x16\xe0\xb3(\xbf\x1d\x83r\xe7M\xf0D\x1365\xd8\x88\xd3\xa4\x92\xcb2\x06\x04\\\xc1\xb0\xea//\xbek&\xd8\xe6+t\xe5\xa1\x13\xada\x16\xder5"w]\xa2i\xb7[\x97R \xe2IT\xcd;Z\x04dk4\xad\x8a\t\xd3\x81z\x10\xf1:^`\xab\x1f\xc5\xdc\x91N\x14$+\x9e\xae\xd3\x80' ! def decompress(self, data): ! pop = popen2.Popen3("bunzip2", capturestderr=1) ! pop.tochild.write(data) ! pop.tochild.close() ! ret = pop.fromchild.read() ! pop.fromchild.close() ! if pop.wait() != 0: ! ret = decompress(data) ! return ret class BZ2FileTest(BaseTest): ! "Test MCRYPT type miscelaneous methods." ! def setUp(self): ! self.filename = tempfile.mktemp("bz2") ! def tearDown(self): ! if os.path.isfile(self.filename): ! os.unlink(self.filename) ! def createTempFile(self, crlf=0): ! f = open(self.filename, "wb") ! if crlf: ! data = self.DATA_CRLF ! else: ! data = self.DATA ! f.write(data) ! f.close() ! def testRead(self): ! # "Test BZ2File.read()" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! self.assertEqual(bz2f.read(), self.TEXT) ! bz2f.close() ! def testReadChunk10(self): ! # "Test BZ2File.read() in chunks of 10 bytes" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! text = '' ! while 1: ! str = bz2f.read(10) ! if not str: ! break ! text += str ! self.assertEqual(text, text) ! bz2f.close() ! def testRead100(self): ! # "Test BZ2File.read(100)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! self.assertEqual(bz2f.read(100), self.TEXT[:100]) ! bz2f.close() ! def testReadLine(self): ! # "Test BZ2File.readline()" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! sio = StringIO(self.TEXT) ! for line in sio.readlines(): ! self.assertEqual(bz2f.readline(), line) ! bz2f.close() ! def testReadLines(self): ! # "Test BZ2File.readlines()" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! sio = StringIO(self.TEXT) ! self.assertEqual(bz2f.readlines(), sio.readlines()) ! bz2f.close() ! def testIterator(self): ! # "Test iter(BZ2File)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! sio = StringIO(self.TEXT) ! self.assertEqual(list(iter(bz2f)), sio.readlines()) ! bz2f.close() ! def testXReadLines(self): ! # "Test BZ2File.xreadlines()" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! sio = StringIO(self.TEXT) ! self.assertEqual(list(bz2f.xreadlines()), sio.readlines()) ! bz2f.close() ! def testUniversalNewlinesLF(self): ! # "Test BZ2File.read() with universal newlines (\\n)" ! self.createTempFile() ! bz2f = BZ2File(self.filename, "rU") ! self.assertEqual(bz2f.read(), self.TEXT) ! self.assertEqual(bz2f.newlines, "\n") ! bz2f.close() ! def testUniversalNewlinesCRLF(self): ! # "Test BZ2File.read() with universal newlines (\\r\\n)" ! self.createTempFile(crlf=1) ! bz2f = BZ2File(self.filename, "rU") ! self.assertEqual(bz2f.read(), self.TEXT) ! self.assertEqual(bz2f.newlines, "\r\n") ! bz2f.close() ! def testWrite(self): ! # "Test BZ2File.write()" ! bz2f = BZ2File(self.filename, "w") ! bz2f.write(self.TEXT) ! bz2f.close() ! f = open(self.filename) ! self.assertEqual(self.decompress(f.read()), self.TEXT) ! f.close() ! def testWriteChunks10(self): ! # "Test BZ2File.write() with chunks of 10 bytes" ! bz2f = BZ2File(self.filename, "w") ! n = 0 ! while 1: ! str = self.TEXT[n*10:(n+1)*10] ! if not str: ! break ! bz2f.write(str) ! n += 1 ! bz2f.close() ! f = open(self.filename) ! self.assertEqual(self.decompress(f.read()), self.TEXT) ! f.close() ! def testWriteLines(self): ! # "Test BZ2File.writelines()" ! bz2f = BZ2File(self.filename, "w") ! sio = StringIO(self.TEXT) ! bz2f.writelines(sio.readlines()) ! bz2f.close() ! f = open(self.filename) ! self.assertEqual(self.decompress(f.read()), self.TEXT) ! f.close() ! def testSeekForward(self): ! # "Test BZ2File.seek(150, 0)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.seek(150) ! self.assertEqual(bz2f.read(), self.TEXT[150:]) ! def testSeekBackwards(self): ! # "Test BZ2File.seek(-150, 1)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.read(500) ! bz2f.seek(-150, 1) ! self.assertEqual(bz2f.read(), self.TEXT[500-150:]) ! def testSeekBackwardsFromEnd(self): ! # "Test BZ2File.seek(-150, 2)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.seek(-150, 2) ! self.assertEqual(bz2f.read(), self.TEXT[len(self.TEXT)-150:]) ! def testSeekPostEnd(self): ! # "Test BZ2File.seek(150000)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.seek(150000) ! self.assertEqual(bz2f.tell(), len(self.TEXT)) ! self.assertEqual(bz2f.read(), "") ! def testSeekPostEndTwice(self): ! # "Test BZ2File.seek(150000) twice" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.seek(150000) ! bz2f.seek(150000) ! self.assertEqual(bz2f.tell(), len(self.TEXT)) ! self.assertEqual(bz2f.read(), "") ! def testSeekPreStart(self): ! # "Test BZ2File.seek(-150, 0)" ! self.createTempFile() ! bz2f = BZ2File(self.filename) ! bz2f.seek(-150) ! self.assertEqual(bz2f.tell(), 0) ! self.assertEqual(bz2f.read(), self.TEXT) class BZ2CompressorTest(BaseTest): ! def testCompress(self): ! # "Test BZ2Compressor.compress()/flush()" ! bz2c = BZ2Compressor() ! data = bz2c.compress(self.TEXT) ! data += bz2c.flush() ! self.assertEqual(self.decompress(data), self.TEXT) ! def testCompressChunks10(self): ! # "Test BZ2Compressor.compress()/flush() with chunks of 10 bytes" ! bz2c = BZ2Compressor() ! n = 0 ! data = '' ! while 1: ! str = self.TEXT[n*10:(n+1)*10] ! if not str: ! break ! data += bz2c.compress(str) ! n += 1 ! data += bz2c.flush() ! self.assertEqual(self.decompress(data), self.TEXT) class BZ2DecompressorTest(BaseTest): ! def testDecompress(self): ! # "Test BZ2Decompressor.decompress()" ! bz2d = BZ2Decompressor() ! text = bz2d.decompress(self.DATA) ! self.assertEqual(text, self.TEXT) ! def testDecompressChunks10(self): ! # "Test BZ2Decompressor.decompress() with chunks of 10 bytes" ! bz2d = BZ2Decompressor() ! text = '' ! n = 0 ! while 1: ! str = self.DATA[n*10:(n+1)*10] ! if not str: ! break ! text += bz2d.decompress(str) ! n += 1 ! self.assertEqual(text, self.TEXT) ! def testDecompressUnusedData(self): ! # "Test BZ2Decompressor.decompress() with unused data" ! bz2d = BZ2Decompressor() ! unused_data = "this is unused data" ! text = bz2d.decompress(self.DATA+unused_data) ! self.assertEqual(text, self.TEXT) ! self.assertEqual(bz2d.unused_data, unused_data) ! def testEOFError(self): ! # "Calling BZ2Decompressor.decompress() after EOS must raise EOFError" ! bz2d = BZ2Decompressor() ! text = bz2d.decompress(self.DATA) ! self.assertRaises(EOFError, bz2d.decompress, "anything") class FuncTest(BaseTest): ! "Test module functions" ! def testCompress(self): ! # "Test compress() function" ! data = compress(self.TEXT) ! self.assertEqual(self.decompress(data), self.TEXT) ! def testDecompress(self): ! # "Test decompress() function" ! text = decompress(self.DATA) ! self.assertEqual(text, self.TEXT) ! def testDecompressEmpty(self): ! # "Test decompress() function with empty string" ! text = decompress("") ! self.assertEqual(text, "") ! def testDecompressIncomplete(self): ! # "Test decompress() function with incomplete data" ! self.assertRaises(ValueError, decompress, self.DATA[:-10]) def test_main(): Index: test_codeccallbacks.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codeccallbacks.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_codeccallbacks.py 6 Sep 2002 17:21:40 -0000 1.2 --- test_codeccallbacks.py 9 Nov 2002 05:26:14 -0000 1.3 *************** *** 214,221 **** for enc in ("ascii", "latin-1", "iso-8859-1", "iso-8859-15", "utf-8", "utf-7", "utf-16"): for err in errors: ! try: ! uni.encode(enc, err) ! except UnicodeError: ! pass def check_exceptionobjectargs(self, exctype, args, msg): --- 214,221 ---- for enc in ("ascii", "latin-1", "iso-8859-1", "iso-8859-15", "utf-8", "utf-7", "utf-16"): for err in errors: ! try: ! uni.encode(enc, err) ! except UnicodeError: ! pass def check_exceptionobjectargs(self, exctype, args, msg): *************** *** 230,234 **** for wrongarg in wrongargs: if type(wrongarg) is type(args[i]): ! continue # build argument array callargs = [] --- 230,234 ---- for wrongarg in wrongargs: if type(wrongarg) is type(args[i]): ! continue # build argument array callargs = [] Index: test_pep277.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pep277.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_pep277.py 8 Oct 2002 02:44:30 -0000 1.4 --- test_pep277.py 9 Nov 2002 05:26:15 -0000 1.5 *************** *** 53,60 **** except expected_exception, details: if check_fn_in_exception and details.filename != filename: ! raise TestFailed("Function '%s(%r) failed with " ! "bad filename in the exception: %r" ! % (fn.__name__, filename, ! details.filename)) def test_failures(self): --- 53,60 ---- except expected_exception, details: if check_fn_in_exception and details.filename != filename: ! raise TestFailed("Function '%s(%r) failed with " ! "bad filename in the exception: %r" ! % (fn.__name__, filename, ! details.filename)) def test_failures(self): Index: test_sets.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sets.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** test_sets.py 8 Nov 2002 05:03:21 -0000 1.14 --- test_sets.py 9 Nov 2002 05:26:15 -0000 1.15 *************** *** 447,454 **** class TestSubsetPartial(TestSubsets): ! left = Set([1]) ! right = Set([1, 2]) ! name = "one a non-empty proper subset of other" ! cases = "!=", "<", "<=" #------------------------------------------------------------------------------ --- 447,454 ---- class TestSubsetPartial(TestSubsets): ! left = Set([1]) ! right = Set([1, 2]) ! name = "one a non-empty proper subset of other" ! cases = "!=", "<", "<=" #------------------------------------------------------------------------------ Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** test_support.py 3 Nov 2002 00:35:53 -0000 1.44 --- test_support.py 9 Nov 2002 05:26:15 -0000 1.45 *************** *** 110,114 **** del TMP_TESTFN except IOError: ! print ('WARNING: tests will fail, unable to write to: %s or %s' % (TESTFN, TMP_TESTFN)) if fp is not None: --- 110,114 ---- del TMP_TESTFN except IOError: ! print ('WARNING: tests will fail, unable to write to: %s or %s' % (TESTFN, TMP_TESTFN)) if fp is not None: Index: test_trace.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_trace.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_trace.py 8 Nov 2002 13:08:45 -0000 1.5 --- test_trace.py 9 Nov 2002 05:26:15 -0000 1.6 *************** *** 108,112 **** def settrace_and_return(tracefunc): _settrace_and_return(tracefunc) ! settrace_and_return.events = [(1, 'return')] --- 108,112 ---- def settrace_and_return(tracefunc): _settrace_and_return(tracefunc) ! settrace_and_return.events = [(1, 'return')] *************** *** 120,124 **** except RuntimeError, exc: pass ! settrace_and_raise.events = [(2, 'exception'), (3, 'line'), --- 120,124 ---- except RuntimeError, exc: pass ! settrace_and_raise.events = [(2, 'exception'), (3, 'line'), *************** *** 135,139 **** class TraceTestCase(unittest.TestCase): def compare_events(self, line_offset, events, expected_events): ! events = [(l - line_offset, e) for (l, e) in events] if events != expected_events: self.fail( --- 135,139 ---- class TraceTestCase(unittest.TestCase): def compare_events(self, line_offset, events, expected_events): ! events = [(l - line_offset, e) for (l, e) in events] if events != expected_events: self.fail( *************** *** 141,146 **** "\n".join(difflib.ndiff(map(str, expected_events), map(str, events)))) ! ! def run_test(self, func): tracer = Tracer() --- 141,146 ---- "\n".join(difflib.ndiff(map(str, expected_events), map(str, events)))) ! ! def run_test(self, func): tracer = Tracer() *************** *** 157,161 **** self.compare_events(func.func_code.co_firstlineno, tracer.events, func.events) ! def test_1_basic(self): self.run_test(basic) --- 157,161 ---- self.compare_events(func.func_code.co_firstlineno, tracer.events, func.events) ! def test_1_basic(self): self.run_test(basic) *************** *** 186,190 **** else: return self.trace ! def f(self): """The function to trace; raises an exception if that's the case --- 186,190 ---- else: return self.trace ! def f(self): """The function to trace; raises an exception if that's the case *************** *** 195,199 **** else: return 1 ! def run_test_for_event(self, event): """Tests that an exception raised in response to the given event is --- 195,199 ---- else: return 1 ! def run_test_for_event(self, event): """Tests that an exception raised in response to the given event is *************** *** 211,215 **** except RuntimeError: self.fail("recursion counter not reset") ! # Test the handling of exceptions raised by each kind of trace event. def test_call(self): --- 211,215 ---- except RuntimeError: self.fail("recursion counter not reset") ! # Test the handling of exceptions raised by each kind of trace event. def test_call(self): From tim_one@users.sourceforge.net Sat Nov 9 06:31:58 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 22:31:58 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_bz2.py,1.5,1.6 Message-ID: <E18AP9y-0000BE-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv32717/Lib/test Modified Files: test_bz2.py Log Message: Many changes to get this to pass on Windows, and to make it easier to figure out what the code was doing. The fixes were a combination of closing open files before deletion, opening files in binary mode, and plain skipping things that can't work on Windows (BaseTest.decompress uses a process gimmick that doesn't exist on Windows, and, even if it did, assumes a "bunzip2" executable is on PATH). Index: test_bz2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_bz2.py 9 Nov 2002 05:26:14 -0000 1.5 --- test_bz2.py 9 Nov 2002 06:31:56 -0000 1.6 *************** *** 1,3 **** --- 1,5 ---- #!/usr/bin/python + from test import test_support + import unittest from cStringIO import StringIO *************** *** 5,10 **** import popen2 import tempfile ! from bz2 import * ! from test import test_support class BaseTest(unittest.TestCase): --- 7,14 ---- import popen2 import tempfile ! import sys ! ! import bz2 ! from bz2 import BZ2File, BZ2Compressor, BZ2Decompressor class BaseTest(unittest.TestCase): *************** *** 14,18 **** --- 18,28 ---- DATA_CRLF = 'BZh91AY&SY\xaez\xbbN\x00\x01H\xdf\x80\x00\x12@\x02\xff\xf0\x01\x07n\x00?\xe7\xff\xe0@\x01\xbc\xc6`\x86*\x8d=M\xa9\x9a\x86\xd0L@\x0fI\xa6!\xa1\x13\xc8\x88jdi\x8d@\x03@\x1a\x1a\x0c\x0c\x83 \x00\xc4h2\x19\x01\x82D\x84e\t\xe8\x99\x89\x19\x1ah\x00\r\x1a\x11\xaf\x9b\x0fG\xf5(\x1b\x1f?\t\x12\xcf\xb5\xfc\x95E\x00ps\x89\x12^\xa4\xdd\xa2&\x05(\x87\x04\x98\x89u\xe40%\xb6\x19\'\x8c\xc4\x89\xca\x07\x0e\x1b!\x91UIFU%C\x994!DI\xd2\xfa\xf0\xf1N8W\xde\x13A\xf5\x9cr%?\x9f3;I45A\xd1\x8bT\xb1<l\xba\xcb_\xc00xY\x17r\x17\x88\x08\x08@\xa0\ry@\x10\x04$)`\xf2\xce\x89z\xb0s\xec\x9b.iW\x9d\x81\xb5-+t\x9f\x1a\'\x97dB\xf5x\xb5\xbe.[.\xd7\x0e\x81\xe7\x08\x1cN`\x88\x10\xca\x87\xc3!"\x80\x92R\xa1/\xd1\xc0\xe6mf\xac\xbd\x99\xcca\xb3\x8780>\xa4\xc7\x8d\x1a\\"\xad\xa1\xabyBg\x15\xb9l\x88\x88\x91k"\x94\xa4\xd4\x89\xae*\xa6\x0b\x10\x0c\xd6\xd4m\xe86\xec\xb5j\x8a\x86j\';\xca.\x01I\xf2\xaaJ\xe8\x88\x8cU+t3\xfb\x0c\n\xa33\x13r2\r\x16\xe0\xb3(\xbf\x1d\x83r\xe7M\xf0D\x1365\xd8\x88\xd3\xa4\x92\xcb2\x06\x04\\\xc1\xb0\xea//\xbek&\xd8\xe6+t\xe5\xa1\x13\xada\x16\xder5"w]\xa2i\xb7[\x97R \xe2IT\xcd;Z\x04dk4\xad\x8a\t\xd3\x81z\x10\xf1:^`\xab\x1f\xc5\xdc\x91N\x14$+\x9e\xae\xd3\x80' + # XXX BaseTest.decompress can't run on Windows -- popen2.Popen3 doesn't + # XXX exist there, XXX and even if it did, bunzip2 isn't available to + # XXX run. Tests using this are therefore skipped on Windows. + skip_decompress_tests = sys.platform in ("win32",) + def decompress(self, data): + assert not self.skip_decompress_tests pop = popen2.Popen3("bunzip2", capturestderr=1) pop.tochild.write(data) *************** *** 21,25 **** pop.fromchild.close() if pop.wait() != 0: ! ret = decompress(data) return ret --- 31,38 ---- pop.fromchild.close() if pop.wait() != 0: ! # XXX I don't think this works. On Windows, trying to call ! # XXX bz2.decompress in this function always raises ! # XXD ValueError: couldn't find end of stream ! ret = bz2.decompress(data) return ret *************** *** 120,123 **** --- 133,138 ---- def testWrite(self): + if self.skip_decompress_tests: + return # "Test BZ2File.write()" bz2f = BZ2File(self.filename, "w") *************** *** 130,133 **** --- 145,150 ---- def testWriteChunks10(self): # "Test BZ2File.write() with chunks of 10 bytes" + if self.skip_decompress_tests: + return bz2f = BZ2File(self.filename, "w") n = 0 *************** *** 145,148 **** --- 162,167 ---- def testWriteLines(self): # "Test BZ2File.writelines()" + if self.skip_decompress_tests: + return bz2f = BZ2File(self.filename, "w") sio = StringIO(self.TEXT) *************** *** 159,162 **** --- 178,182 ---- bz2f.seek(150) self.assertEqual(bz2f.read(), self.TEXT[150:]) + bz2f.close() def testSeekBackwards(self): *************** *** 167,170 **** --- 187,191 ---- bz2f.seek(-150, 1) self.assertEqual(bz2f.read(), self.TEXT[500-150:]) + bz2f.close() def testSeekBackwardsFromEnd(self): *************** *** 174,177 **** --- 195,199 ---- bz2f.seek(-150, 2) self.assertEqual(bz2f.read(), self.TEXT[len(self.TEXT)-150:]) + bz2f.close() def testSeekPostEnd(self): *************** *** 182,185 **** --- 204,208 ---- self.assertEqual(bz2f.tell(), len(self.TEXT)) self.assertEqual(bz2f.read(), "") + bz2f.close() def testSeekPostEndTwice(self): *************** *** 191,194 **** --- 214,218 ---- self.assertEqual(bz2f.tell(), len(self.TEXT)) self.assertEqual(bz2f.read(), "") + bz2f.close() def testSeekPreStart(self): *************** *** 199,206 **** --- 223,233 ---- self.assertEqual(bz2f.tell(), 0) self.assertEqual(bz2f.read(), self.TEXT) + bz2f.close() class BZ2CompressorTest(BaseTest): def testCompress(self): # "Test BZ2Compressor.compress()/flush()" + if self.skip_decompress_tests: + return bz2c = BZ2Compressor() data = bz2c.compress(self.TEXT) *************** *** 210,213 **** --- 237,242 ---- def testCompressChunks10(self): # "Test BZ2Compressor.compress()/flush() with chunks of 10 bytes" + if self.skip_decompress_tests: + return bz2c = BZ2Compressor() n = 0 *************** *** 262,287 **** def testCompress(self): # "Test compress() function" ! data = compress(self.TEXT) self.assertEqual(self.decompress(data), self.TEXT) def testDecompress(self): # "Test decompress() function" ! text = decompress(self.DATA) self.assertEqual(text, self.TEXT) def testDecompressEmpty(self): # "Test decompress() function with empty string" ! text = decompress("") self.assertEqual(text, "") def testDecompressIncomplete(self): # "Test decompress() function with incomplete data" ! self.assertRaises(ValueError, decompress, self.DATA[:-10]) def test_main(): ! test_support.run_unittest(BZ2FileTest) ! test_support.run_unittest(BZ2CompressorTest) ! test_support.run_unittest(BZ2DecompressorTest) ! test_support.run_unittest(FuncTest) if __name__ == '__main__': --- 291,321 ---- def testCompress(self): # "Test compress() function" ! if self.skip_decompress_tests: ! return ! data = bz2.compress(self.TEXT) self.assertEqual(self.decompress(data), self.TEXT) def testDecompress(self): # "Test decompress() function" ! text = bz2.decompress(self.DATA) self.assertEqual(text, self.TEXT) def testDecompressEmpty(self): # "Test decompress() function with empty string" ! text = bz2.decompress("") self.assertEqual(text, "") def testDecompressIncomplete(self): # "Test decompress() function with incomplete data" ! self.assertRaises(ValueError, bz2.decompress, self.DATA[:-10]) def test_main(): ! suite = unittest.TestSuite() ! for test in (BZ2FileTest, ! BZ2CompressorTest, ! BZ2DecompressorTest, ! FuncTest): ! suite.addTest(unittest.makeSuite(test)) ! test_support.run_suite(suite) if __name__ == '__main__': From tim_one@users.sourceforge.net Sat Nov 9 06:45:33 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 22:45:33 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_bz2.py,1.6,1.7 Message-ID: <E18APN7-0000nW-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv2850/Lib/test Modified Files: test_bz2.py Log Message: More tests run on Windows now. Something is still wrong here, but no idea what. Added liberal XXX explanations for the next guy. Index: test_bz2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_bz2.py 9 Nov 2002 06:31:56 -0000 1.6 --- test_bz2.py 9 Nov 2002 06:45:31 -0000 1.7 *************** *** 12,15 **** --- 12,17 ---- from bz2 import BZ2File, BZ2Compressor, BZ2Decompressor + has_cmdline_bunzip2 = sys.platform not in ("win32",) + class BaseTest(unittest.TestCase): "Base for other testcases." *************** *** 18,39 **** DATA_CRLF = 'BZh91AY&SY\xaez\xbbN\x00\x01H\xdf\x80\x00\x12@\x02\xff\xf0\x01\x07n\x00?\xe7\xff\xe0@\x01\xbc\xc6`\x86*\x8d=M\xa9\x9a\x86\xd0L@\x0fI\xa6!\xa1\x13\xc8\x88jdi\x8d@\x03@\x1a\x1a\x0c\x0c\x83 \x00\xc4h2\x19\x01\x82D\x84e\t\xe8\x99\x89\x19\x1ah\x00\r\x1a\x11\xaf\x9b\x0fG\xf5(\x1b\x1f?\t\x12\xcf\xb5\xfc\x95E\x00ps\x89\x12^\xa4\xdd\xa2&\x05(\x87\x04\x98\x89u\xe40%\xb6\x19\'\x8c\xc4\x89\xca\x07\x0e\x1b!\x91UIFU%C\x994!DI\xd2\xfa\xf0\xf1N8W\xde\x13A\xf5\x9cr%?\x9f3;I45A\xd1\x8bT\xb1<l\xba\xcb_\xc00xY\x17r\x17\x88\x08\x08@\xa0\ry@\x10\x04$)`\xf2\xce\x89z\xb0s\xec\x9b.iW\x9d\x81\xb5-+t\x9f\x1a\'\x97dB\xf5x\xb5\xbe.[.\xd7\x0e\x81\xe7\x08\x1cN`\x88\x10\xca\x87\xc3!"\x80\x92R\xa1/\xd1\xc0\xe6mf\xac\xbd\x99\xcca\xb3\x8780>\xa4\xc7\x8d\x1a\\"\xad\xa1\xabyBg\x15\xb9l\x88\x88\x91k"\x94\xa4\xd4\x89\xae*\xa6\x0b\x10\x0c\xd6\xd4m\xe86\xec\xb5j\x8a\x86j\';\xca.\x01I\xf2\xaaJ\xe8\x88\x8cU+t3\xfb\x0c\n\xa33\x13r2\r\x16\xe0\xb3(\xbf\x1d\x83r\xe7M\xf0D\x1365\xd8\x88\xd3\xa4\x92\xcb2\x06\x04\\\xc1\xb0\xea//\xbek&\xd8\xe6+t\xe5\xa1\x13\xada\x16\xder5"w]\xa2i\xb7[\x97R \xe2IT\xcd;Z\x04dk4\xad\x8a\t\xd3\x81z\x10\xf1:^`\xab\x1f\xc5\xdc\x91N\x14$+\x9e\xae\xd3\x80' ! # XXX BaseTest.decompress can't run on Windows -- popen2.Popen3 doesn't ! # XXX exist there, XXX and even if it did, bunzip2 isn't available to ! # XXX run. Tests using this are therefore skipped on Windows. ! skip_decompress_tests = sys.platform in ("win32",) ! def decompress(self, data): ! assert not self.skip_decompress_tests ! pop = popen2.Popen3("bunzip2", capturestderr=1) ! pop.tochild.write(data) ! pop.tochild.close() ! ret = pop.fromchild.read() ! pop.fromchild.close() ! if pop.wait() != 0: ! # XXX I don't think this works. On Windows, trying to call ! # XXX bz2.decompress in this function always raises ! # XXD ValueError: couldn't find end of stream ! ret = bz2.decompress(data) ! return ret class BZ2FileTest(BaseTest): --- 20,52 ---- DATA_CRLF = 'BZh91AY&SY\xaez\xbbN\x00\x01H\xdf\x80\x00\x12@\x02\xff\xf0\x01\x07n\x00?\xe7\xff\xe0@\x01\xbc\xc6`\x86*\x8d=M\xa9\x9a\x86\xd0L@\x0fI\xa6!\xa1\x13\xc8\x88jdi\x8d@\x03@\x1a\x1a\x0c\x0c\x83 \x00\xc4h2\x19\x01\x82D\x84e\t\xe8\x99\x89\x19\x1ah\x00\r\x1a\x11\xaf\x9b\x0fG\xf5(\x1b\x1f?\t\x12\xcf\xb5\xfc\x95E\x00ps\x89\x12^\xa4\xdd\xa2&\x05(\x87\x04\x98\x89u\xe40%\xb6\x19\'\x8c\xc4\x89\xca\x07\x0e\x1b!\x91UIFU%C\x994!DI\xd2\xfa\xf0\xf1N8W\xde\x13A\xf5\x9cr%?\x9f3;I45A\xd1\x8bT\xb1<l\xba\xcb_\xc00xY\x17r\x17\x88\x08\x08@\xa0\ry@\x10\x04$)`\xf2\xce\x89z\xb0s\xec\x9b.iW\x9d\x81\xb5-+t\x9f\x1a\'\x97dB\xf5x\xb5\xbe.[.\xd7\x0e\x81\xe7\x08\x1cN`\x88\x10\xca\x87\xc3!"\x80\x92R\xa1/\xd1\xc0\xe6mf\xac\xbd\x99\xcca\xb3\x8780>\xa4\xc7\x8d\x1a\\"\xad\xa1\xabyBg\x15\xb9l\x88\x88\x91k"\x94\xa4\xd4\x89\xae*\xa6\x0b\x10\x0c\xd6\xd4m\xe86\xec\xb5j\x8a\x86j\';\xca.\x01I\xf2\xaaJ\xe8\x88\x8cU+t3\xfb\x0c\n\xa33\x13r2\r\x16\xe0\xb3(\xbf\x1d\x83r\xe7M\xf0D\x1365\xd8\x88\xd3\xa4\x92\xcb2\x06\x04\\\xc1\xb0\xea//\xbek&\xd8\xe6+t\xe5\xa1\x13\xada\x16\xder5"w]\xa2i\xb7[\x97R \xe2IT\xcd;Z\x04dk4\xad\x8a\t\xd3\x81z\x10\xf1:^`\xab\x1f\xc5\xdc\x91N\x14$+\x9e\xae\xd3\x80' ! if has_cmdline_bunzip2: ! def decompress(self, data): ! pop = popen2.Popen3("bunzip2", capturestderr=1) ! pop.tochild.write(data) ! pop.tochild.close() ! ret = pop.fromchild.read() ! pop.fromchild.close() ! if pop.wait() != 0: ! ret = bz2.decompress(data) ! return ret ! else: ! # popen2.Popen3 doesn't exist on Windows, and even if it did, bunzip2 ! # isn't available to run. ! ! # XXX This alternative doesn't work in all tests. It raises ! # XXX ValueError: couldn't find end of stream ! # XXX in ! # XXX testWrite ! # XXX testWriteChunks10 ! # XXX testWriteLines ! # XXX from BZ2FileTest . ! # XXX I don't know why. ! ! def decompress(self, data): ! return bz2.decompress(data) ! ! # XXX See XXX comment above. ! skip_mystery_test = not has_cmdline_bunzip2 class BZ2FileTest(BaseTest): *************** *** 133,137 **** def testWrite(self): ! if self.skip_decompress_tests: return # "Test BZ2File.write()" --- 146,150 ---- def testWrite(self): ! if self.skip_mystery_test: return # "Test BZ2File.write()" *************** *** 145,149 **** def testWriteChunks10(self): # "Test BZ2File.write() with chunks of 10 bytes" ! if self.skip_decompress_tests: return bz2f = BZ2File(self.filename, "w") --- 158,162 ---- def testWriteChunks10(self): # "Test BZ2File.write() with chunks of 10 bytes" ! if self.skip_mystery_test: return bz2f = BZ2File(self.filename, "w") *************** *** 162,166 **** def testWriteLines(self): # "Test BZ2File.writelines()" ! if self.skip_decompress_tests: return bz2f = BZ2File(self.filename, "w") --- 175,179 ---- def testWriteLines(self): # "Test BZ2File.writelines()" ! if self.skip_mystery_test: return bz2f = BZ2File(self.filename, "w") *************** *** 228,233 **** def testCompress(self): # "Test BZ2Compressor.compress()/flush()" - if self.skip_decompress_tests: - return bz2c = BZ2Compressor() data = bz2c.compress(self.TEXT) --- 241,244 ---- *************** *** 237,242 **** def testCompressChunks10(self): # "Test BZ2Compressor.compress()/flush() with chunks of 10 bytes" - if self.skip_decompress_tests: - return bz2c = BZ2Compressor() n = 0 --- 248,251 ---- *************** *** 291,296 **** def testCompress(self): # "Test compress() function" - if self.skip_decompress_tests: - return data = bz2.compress(self.TEXT) self.assertEqual(self.decompress(data), self.TEXT) --- 300,303 ---- From tim_one@users.sourceforge.net Sat Nov 9 06:49:45 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 22:49:45 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_bz2.py,1.7,1.8 Message-ID: <E18APRB-0000zD-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv3652a/Lib/test Modified Files: test_bz2.py Log Message: OK -- all tests pass on Windows now. The rest were due to 3 more binary-vs-text-mode screwups. Index: test_bz2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_bz2.py 9 Nov 2002 06:45:31 -0000 1.7 --- test_bz2.py 9 Nov 2002 06:49:43 -0000 1.8 *************** *** 34,53 **** # popen2.Popen3 doesn't exist on Windows, and even if it did, bunzip2 # isn't available to run. - - # XXX This alternative doesn't work in all tests. It raises - # XXX ValueError: couldn't find end of stream - # XXX in - # XXX testWrite - # XXX testWriteChunks10 - # XXX testWriteLines - # XXX from BZ2FileTest . - # XXX I don't know why. - def decompress(self, data): return bz2.decompress(data) - # XXX See XXX comment above. - skip_mystery_test = not has_cmdline_bunzip2 - class BZ2FileTest(BaseTest): "Test MCRYPT type miscelaneous methods." --- 34,40 ---- *************** *** 146,156 **** def testWrite(self): ! if self.skip_mystery_test: ! return # "Test BZ2File.write()" bz2f = BZ2File(self.filename, "w") bz2f.write(self.TEXT) bz2f.close() ! f = open(self.filename) self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() --- 133,143 ---- def testWrite(self): ! #if self.skip_mystery_test: ! # return # "Test BZ2File.write()" bz2f = BZ2File(self.filename, "w") bz2f.write(self.TEXT) bz2f.close() ! f = open(self.filename, 'rb') self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() *************** *** 158,163 **** def testWriteChunks10(self): # "Test BZ2File.write() with chunks of 10 bytes" - if self.skip_mystery_test: - return bz2f = BZ2File(self.filename, "w") n = 0 --- 145,148 ---- *************** *** 169,173 **** n += 1 bz2f.close() ! f = open(self.filename) self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() --- 154,158 ---- n += 1 bz2f.close() ! f = open(self.filename, 'rb') self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() *************** *** 175,185 **** def testWriteLines(self): # "Test BZ2File.writelines()" - if self.skip_mystery_test: - return bz2f = BZ2File(self.filename, "w") sio = StringIO(self.TEXT) bz2f.writelines(sio.readlines()) bz2f.close() ! f = open(self.filename) self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() --- 160,168 ---- def testWriteLines(self): # "Test BZ2File.writelines()" bz2f = BZ2File(self.filename, "w") sio = StringIO(self.TEXT) bz2f.writelines(sio.readlines()) bz2f.close() ! f = open(self.filename, 'rb') self.assertEqual(self.decompress(f.read()), self.TEXT) f.close() From tim_one@users.sourceforge.net Sat Nov 9 06:51:32 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Fri, 08 Nov 2002 22:51:32 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_bz2.py,1.8,1.9 Message-ID: <E18APSu-00014F-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv4067/Lib/test Modified Files: test_bz2.py Log Message: I already forgot what I changed -- it wasn't important <wink>. Index: test_bz2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_bz2.py 9 Nov 2002 06:49:43 -0000 1.8 --- test_bz2.py 9 Nov 2002 06:51:30 -0000 1.9 *************** *** 133,138 **** def testWrite(self): - #if self.skip_mystery_test: - # return # "Test BZ2File.write()" bz2f = BZ2File(self.filename, "w") --- 133,136 ---- From tim_one@users.sourceforge.net Sat Nov 9 08:25:00 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Sat, 09 Nov 2002 00:25:00 -0800 Subject: [Python-checkins] python/dist/src/PCbuild python20.wse,1.103,1.104 Message-ID: <E18AQvM-0005E7-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory usw-pr-cvs1:/tmp/cvs-serv20024/python/PCbuild Modified Files: python20.wse Log Message: Install the bz2 DLL on Windows. Index: python20.wse =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.wse,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** python20.wse 23 Jul 2002 19:56:30 -0000 1.103 --- python20.wse 9 Nov 2002 08:24:58 -0000 1.104 *************** *** 1721,1724 **** --- 1721,1729 ---- end item: Install File + Source=.\bz2.pyd + Destination=%MAINDIR%\DLLs\bz2.pyd + Flags=0000000000000010 + end + item: Install File Source=.\mmap.pyd Destination=%MAINDIR%\DLLs\mmap.pyd *************** *** 1795,1798 **** --- 1800,1808 ---- Source=.\bsddb.lib Destination=%MAINDIR%\libs\bsddb.lib + Flags=0000000000000010 + end + item: Install File + Source=.\bz2.lib + Destination=%MAINDIR%\libs\bz2.lib Flags=0000000000000010 end From mwh@users.sourceforge.net Sat Nov 9 14:47:20 2002 From: mwh@users.sourceforge.net (mwh@users.sourceforge.net) Date: Sat, 09 Nov 2002 06:47:20 -0800 Subject: [Python-checkins] python/dist/src/Python mactoolboxglue.c,1.12,1.13 Message-ID: <E18AWtM-0000cW-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv2207 Modified Files: mactoolboxglue.c Log Message: Restore to ANSI C. Index: mactoolboxglue.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mactoolboxglue.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mactoolboxglue.c 7 Nov 2002 23:07:03 -0000 1.12 --- mactoolboxglue.c 9 Nov 2002 14:47:18 -0000 1.13 *************** *** 91,96 **** ** this only once. */ - errors_loaded = 1; PyObject *m, *rv; m = PyImport_ImportModule("macresource"); --- 91,96 ---- ** this only once. */ PyObject *m, *rv; + errors_loaded = 1; m = PyImport_ImportModule("macresource"); *************** *** 604,606 **** GLUE_NEW(CFURLRef, CFURLRefObj_New, "Carbon.CF") ! #endif /* USE_TOOLBOX_OBJECT_GLUE */ \ No newline at end of file --- 604,606 ---- GLUE_NEW(CFURLRef, CFURLRefObj_New, "Carbon.CF") ! #endif /* USE_TOOLBOX_OBJECT_GLUE */ From loewis@users.sourceforge.net Sat Nov 9 19:01:47 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat, 09 Nov 2002 11:01:47 -0800 Subject: [Python-checkins] python/dist/src/Lib/lib-tk FixTk.py,1.6,1.7 Message-ID: <E18Aarb-00017C-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory usw-pr-cvs1:/tmp/cvs-serv3744 Modified Files: FixTk.py Log Message: Search for tix subdirectories. Fixes #564729. Will backport to 2.2. Index: FixTk.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/FixTk.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FixTk.py 24 Feb 2002 16:51:45 -0000 1.6 --- FixTk.py 9 Nov 2002 19:01:44 -0000 1.7 *************** *** 20,32 **** if os.path.isdir(tcldir): os.environ["TCL_LIBRARY"] = tcldir ! # Now set the other variables accordingly import _tkinter ver = str(_tkinter.TCL_VERSION) ! for t in "tk", "tix": ! key = t.upper() + "_LIBRARY" ! try: ! v = os.environ[key] ! except KeyError: ! v = os.path.join(sys.prefix, "tcl", t+ver) ! if os.path.exists(os.path.join(v, "tclIndex")): ! os.environ[key] = v --- 20,37 ---- if os.path.isdir(tcldir): os.environ["TCL_LIBRARY"] = tcldir ! # Compute TK_LIBRARY, knowing that it has the same version ! # as Tcl import _tkinter ver = str(_tkinter.TCL_VERSION) ! if not os.environ.has_key("TK_LIBRARY"): ! v = os.path.join(prefix, 'tk'+ver) ! if os.path.exists(os.path.join(v, "tclIndex")): ! os.environ['TK_LIBRARY'] = v ! # We don't know the Tix version, so we must search the entire ! # directory ! if not os.environ.has_key("TIX_LIBRARY"): ! for name in os.listdir(prefix): ! if name.startswith("tix"): ! tixdir = os.path.join(prefix,name) ! if os.path.isdir(tixdir): ! os.environ["TIX_LIBRARY"] = tixdir From loewis@users.sourceforge.net Sat Nov 9 19:02:36 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat, 09 Nov 2002 11:02:36 -0800 Subject: [Python-checkins] python/dist/src/Lib/lib-tk FixTk.py,1.5.10.1,1.5.10.2 Message-ID: <E18AasO-0001HI-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory usw-pr-cvs1:/tmp/cvs-serv4563 Modified Files: Tag: release22-maint FixTk.py Log Message: Search for tix subdirectories. Fixes #564729. Index: FixTk.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/FixTk.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 *** FixTk.py 25 Feb 2002 10:56:25 -0000 1.5.10.1 --- FixTk.py 9 Nov 2002 19:02:34 -0000 1.5.10.2 *************** *** 20,32 **** if os.path.isdir(tcldir): os.environ["TCL_LIBRARY"] = tcldir ! # Now set the other variables accordingly import _tkinter ver = str(_tkinter.TCL_VERSION) ! for t in "tk", "tix": ! key = t.upper() + "_LIBRARY" ! try: ! v = os.environ[key] ! except KeyError: ! v = os.path.join(sys.prefix, "tcl", t+ver) ! if os.path.exists(os.path.join(v, "tclIndex")): ! os.environ[key] = v --- 20,37 ---- if os.path.isdir(tcldir): os.environ["TCL_LIBRARY"] = tcldir ! # Compute TK_LIBRARY, knowing that it has the same version ! # as Tcl import _tkinter ver = str(_tkinter.TCL_VERSION) ! if not os.environ.has_key("TK_LIBRARY"): ! v = os.path.join(prefix, 'tk'+ver) ! if os.path.exists(os.path.join(v, "tclIndex")): ! os.environ['TK_LIBRARY'] = v ! # We don't know the Tix version, so we must search the entire ! # directory ! if not os.environ.has_key("TIX_LIBRARY"): ! for name in os.listdir(prefix): ! if name.startswith("tix"): ! tixdir = os.path.join(prefix,name) ! if os.path.isdir(tixdir): ! os.environ["TIX_LIBRARY"] = tixdir From loewis@users.sourceforge.net Sat Nov 9 19:53:06 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat, 09 Nov 2002 11:53:06 -0800 Subject: [Python-checkins] python/dist/src setup.py,1.114,1.115 Message-ID: <E18AbfG-0004ZR-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv17345 Modified Files: setup.py Log Message: Look in db4 directories when checking for db4. Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** setup.py 8 Nov 2002 13:11:50 -0000 1.114 --- setup.py 9 Nov 2002 19:53:04 -0000 1.115 *************** *** 456,463 **** '/usr/local/BerkeleyDB.4.1/include', '/usr/local/BerkeleyDB.4.0/include', ! '/usr/local/include/db3', ! '/opt/sfw/include/db3', ! '/sw/include/db3', ! '/usr/include/db3', ), 'incs': ('db_185.h',)}, --- 456,463 ---- '/usr/local/BerkeleyDB.4.1/include', '/usr/local/BerkeleyDB.4.0/include', ! '/usr/local/include/db4', ! '/opt/sfw/include/db4', ! '/sw/include/db4', ! '/usr/include/db4', ), 'incs': ('db_185.h',)}, From loewis@users.sourceforge.net Sat Nov 9 19:54:08 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat, 09 Nov 2002 11:54:08 -0800 Subject: [Python-checkins] python/dist/src/Modules gcmodule.c,2.55,2.56 Message-ID: <E18AbgG-0004qt-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv18496 Modified Files: gcmodule.c Log Message: Fix typo. Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.55 retrieving revision 2.56 diff -C2 -d -r2.55 -r2.56 *** gcmodule.c 9 Aug 2002 17:39:14 -0000 2.55 --- gcmodule.c 9 Nov 2002 19:54:06 -0000 2.56 *************** *** 97,101 **** times an object is referenced directly from outside the generation being collected. ! gc_refs reamins >= 0 throughout these steps. GC_TENTATIVELY_UNREACHABLE --- 97,101 ---- times an object is referenced directly from outside the generation being collected. ! gc_refs remains >= 0 throughout these steps. GC_TENTATIVELY_UNREACHABLE From loewis@users.sourceforge.net Sat Nov 9 19:57:28 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat, 09 Nov 2002 11:57:28 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_support.py,1.45,1.46 Message-ID: <E18AbjU-0005ag-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv21042 Modified Files: test_support.py Log Message: Don't try to convert the test filename to Unicode with -U. Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** test_support.py 9 Nov 2002 05:26:15 -0000 1.45 --- test_support.py 9 Nov 2002 19:57:26 -0000 1.46 *************** *** 93,97 **** # Unicode name only used if TEST_FN_ENCODING exists for the platform. if have_unicode: ! TESTFN_UNICODE=unicode("@test-\xe0\xf2", "latin-1") # 2 latin characters. if os.name=="nt": TESTFN_ENCODING="mbcs" --- 93,102 ---- # Unicode name only used if TEST_FN_ENCODING exists for the platform. if have_unicode: ! if isinstance('', unicode): ! # python -U ! # XXX perhaps unicode() should accept Unicode strings? ! TESTFN_UNICODE="@test-\xe0\xf2" ! else: ! TESTFN_UNICODE=unicode("@test-\xe0\xf2", "latin-1") # 2 latin characters. if os.name=="nt": TESTFN_ENCODING="mbcs" From loewis@users.sourceforge.net Sat Nov 9 20:19:15 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Sat, 09 Nov 2002 12:19:15 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test___future__.py,1.5,1.6 Message-ID: <E18Ac4Z-0003Li-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv12475 Modified Files: test___future__.py Log Message: Allow both string and Unicode objects in levels. Index: test___future__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test___future__.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test___future__.py 23 Jul 2002 19:03:43 -0000 1.5 --- test___future__.py 9 Nov 2002 20:19:12 -0000 1.6 *************** *** 34,38 **** verify(type(minor) is IntType, "optional minor isn't int") verify(type(micro) is IntType, "optional micro isn't int") ! verify(type(level) is StringType, "optional level isn't string") verify(level in GOOD_SERIALS, "optional level string has unknown value") --- 34,38 ---- verify(type(minor) is IntType, "optional minor isn't int") verify(type(micro) is IntType, "optional micro isn't int") ! verify(isinstance(level, basestring), "optional level isn't string") verify(level in GOOD_SERIALS, "optional level string has unknown value") *************** *** 47,51 **** verify(type(minor) is IntType, "mandatory minor isn't int") verify(type(micro) is IntType, "mandatory micro isn't int") ! verify(type(level) is StringType, "mandatory level isn't string") verify(level in GOOD_SERIALS, "mandatory serial string has unknown value") --- 47,51 ---- verify(type(minor) is IntType, "mandatory minor isn't int") verify(type(micro) is IntType, "mandatory micro isn't int") ! verify(isinstance(level, basestring), "mandatory level isn't string") verify(level in GOOD_SERIALS, "mandatory serial string has unknown value") From goodger@users.sourceforge.net Sat Nov 9 21:02:25 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Sat, 09 Nov 2002 13:02:25 -0800 Subject: [Python-checkins] python/nondist/peps pep-0287.txt,1.5,1.6 Message-ID: <E18AckL-00055e-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv19509 Modified Files: pep-0287.txt Log Message: typo caught by GvR Index: pep-0287.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0287.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pep-0287.txt 8 Nov 2002 04:26:56 -0000 1.5 --- pep-0287.txt 9 Nov 2002 21:02:21 -0000 1.6 *************** *** 26,30 **** Only the low-level syntax of docstrings is addressed here. This PEP is not concerned with docstring semantics or processing at all (see ! PEP 256 for a "Road Map to the Doctring PEPs"). Nor is it an attempt to deprecate pure plaintext docstrings, which are always going to be legitimate. The reStructuredText markup is an alternative for those --- 26,30 ---- Only the low-level syntax of docstrings is addressed here. This PEP is not concerned with docstring semantics or processing at all (see ! PEP 256 for a "Road Map to the Docstring PEPs"). Nor is it an attempt to deprecate pure plaintext docstrings, which are always going to be legitimate. The reStructuredText markup is an alternative for those From nnorwitz@users.sourceforge.net Sun Nov 10 14:33:28 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sun, 10 Nov 2002 06:33:28 -0800 Subject: [Python-checkins] python/dist/src/Modules _sre.c,2.85,2.86 Message-ID: <E18At9U-0003wO-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv15020/Modules Modified Files: _sre.c Log Message: Make private functions static so we don't pollute the namespace Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.85 retrieving revision 2.86 diff -C2 -d -r2.85 -r2.86 *** _sre.c 7 Nov 2002 03:28:56 -0000 2.85 --- _sre.c 10 Nov 2002 14:33:25 -0000 2.86 *************** *** 354,358 **** } ! void lastmark_restore(SRE_STATE *state, int lastmark) { if (state->lastmark > lastmark) { --- 354,359 ---- } ! static void ! lastmark_restore(SRE_STATE *state, int lastmark) { if (state->lastmark > lastmark) { From nnorwitz@users.sourceforge.net Sun Nov 10 14:33:29 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Sun, 10 Nov 2002 06:33:29 -0800 Subject: [Python-checkins] python/dist/src/Python ceval.c,2.341,2.342 Message-ID: <E18At9V-0003wT-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv15020/Python Modified Files: ceval.c Log Message: Make private functions static so we don't pollute the namespace Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.341 retrieving revision 2.342 diff -C2 -d -r2.341 -r2.342 *** ceval.c 8 Nov 2002 13:08:46 -0000 2.341 --- ceval.c 10 Nov 2002 14:33:26 -0000 2.342 *************** *** 3198,3202 **** #define EXT_POP(STACK_POINTER) (*--(STACK_POINTER)) ! void err_args(PyObject *func, int flags, int nargs) { --- 3198,3202 ---- #define EXT_POP(STACK_POINTER) (*--(STACK_POINTER)) ! static void err_args(PyObject *func, int flags, int nargs) { From jackjansen@users.sourceforge.net Mon Nov 11 00:05:03 2002 From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Sun, 10 Nov 2002 16:05:03 -0800 Subject: [Python-checkins] python/dist/src/Mac/OSX Makefile,1.28,1.29 Message-ID: <E18B24d-0001zz-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/OSX In directory usw-pr-cvs1:/tmp/cvs-serv7315 Modified Files: Makefile Log Message: - Building IDE is optional on waste being available, similar to building IDLE (it was a fatal error before) - Shuffled a few things around to facilitate the experimental building of MacPython for Jaguar's pre-installed python. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSX/Makefile,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Makefile 7 Nov 2002 23:07:04 -0000 1.28 --- Makefile 11 Nov 2002 00:05:00 -0000 1.29 *************** *** 14,17 **** --- 14,18 ---- PYTHONAPPSDIR=$(dstroot)/Applications/Python APPINSTALLDIR=$(prefix)/Resources/Python.app + PTHFILE=$(srcdir)/Mac/OSX/Mac.pth # Variables for installing the "normal" unix binaries *************** *** 28,41 **** LN=ln STRIPFLAG=-s ! OPT=-g -O3 -Wall -Wstrict-prototypes -Wno-long-double -no-cpp-precomp \ ! -fno-common -dynamic ! INCLUDES=-I$(builddir) -I$(srcdir)/Include -I$(srcdir)/Mac/Include ! DEFINES= ! ! CFLAGS=$(OPT) $(DEFINES) $(INCLUDES) ! LDFLAGS=-F$(builddir) -framework System -framework Python -framework Carbon \ ! -framework Foundation ! CC=cc ! LD=cc CPMAC=/Developer/Tools/CpMac --- 29,42 ---- LN=ln STRIPFLAG=-s ! ##OPT=-g -O3 -Wall -Wstrict-prototypes -Wno-long-double -no-cpp-precomp \ ! ## -fno-common -dynamic ! ##INCLUDES=-I$(builddir) -I$(srcdir)/Include -I$(srcdir)/Mac/Include ! ##DEFINES= ! ## ! ##CFLAGS=$(OPT) $(DEFINES) $(INCLUDES) ! ##LDFLAGS=-F$(builddir) -framework System -framework Python -framework Carbon \ ! ## -framework Foundation ! ##CC=cc ! ##LD=cc CPMAC=/Developer/Tools/CpMac *************** *** 44,47 **** --- 45,49 ---- APPSUBDIRS=MacOS Resources Resources/English.lproj CACHERSRC=$(srcdir)/Mac/scripts/cachersrc.py + compileall=$(srcdir)/Lib/compileall.py installapps: install_PythonLauncher install_Python install_BuildApplet install_IDE install_IDLE *************** *** 95,106 **** install_IDE: $(INSTALLED_PYTHONW) ! @if $(INSTALLED_PYTHONW) -c "import waste"; then : ; else \ echo PythonIDE needs the \"waste\" extension module; \ echo See Mac/OSX/README for details; \ ! exit 1; \ fi - $(INSTALLED_PYTHONW) $(srcdir)/Mac/scripts/BuildApplet.py \ - --output $(PYTHONAPPSDIR)/PythonIDE.app --noargv \ - $(srcdir)/Mac/Tools/IDE/PythonIDE.py install_IDLE: $(INSTALLED_PYTHONW) --- 97,111 ---- install_IDE: $(INSTALLED_PYTHONW) ! @if ! $(INSTALLED_PYTHONW) -c "import waste"; then \ echo PythonIDE needs the \"waste\" extension module; \ echo See Mac/OSX/README for details; \ ! else \ ! echo $(INSTALLED_PYTHONW) $(srcdir)/Mac/scripts/BuildApplet.py \ ! --output $(PYTHONAPPSDIR)/PythonIDE.app --noargv \ ! $(srcdir)/Mac/Tools/IDE/PythonIDE.py ; \ ! $(INSTALLED_PYTHONW) $(srcdir)/Mac/scripts/BuildApplet.py \ ! --output $(PYTHONAPPSDIR)/PythonIDE.app --noargv \ ! $(srcdir)/Mac/Tools/IDE/PythonIDE.py; \ fi install_IDLE: $(INSTALLED_PYTHONW) *************** *** 251,263 **** done ! $(INSTALL_DATA) $(srcdir)/Mac/OSX/Mac.pth $(LIBDEST)/site-packages/ $(PYTHON) $(CACHERSRC) -v $(MACLIBDEST) $(MACTOOLSDEST) ! $(PYTHON) -Wi -tt $(srcdir)/Lib/compileall.py -x badsyntax $(MACLIBDEST) $(MACTOOLSDEST) ! $(PYTHON) -O -Wi -tt $(srcdir)/Lib/compileall.py -x badsyntax $(MACLIBDEST) $(MACTOOLSDEST) ! ! # Put symlinks "python" and "pythonw" in the standard place ! $(INSTALLED_PYTHONW): install_Python # $(INSTALLED_PYTHON) has to be done by the main Makefile, we cannot do that here. --- 256,270 ---- done ! $(INSTALL_DATA) $(PTHFILE) $(LIBDEST)/site-packages/ $(PYTHON) $(CACHERSRC) -v $(MACLIBDEST) $(MACTOOLSDEST) ! $(PYTHON) -Wi -tt $(compileall) -x badsyntax $(MACLIBDEST) $(MACTOOLSDEST) ! $(PYTHON) -O -Wi -tt $(compileall) -x badsyntax $(MACLIBDEST) $(MACTOOLSDEST) ! # ! # We use the full name here in stead of $(INSTALLED_PYTHONW), because ! # the latter may be overridden by Makefile.jaguar when building for a pre-installed ! # /usr/bin/python ! $(APPINSTALLDIR)/Contents/MacOS/python: install_Python # $(INSTALLED_PYTHON) has to be done by the main Makefile, we cannot do that here. From jackjansen@users.sourceforge.net Mon Nov 11 00:06:16 2002 From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net) Date: Sun, 10 Nov 2002 16:06:16 -0800 Subject: [Python-checkins] python/dist/src/Mac/Lib buildtools.py,1.19,1.20 Message-ID: <E18B25o-00025C-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Mac/Lib In directory usw-pr-cvs1:/tmp/cvs-serv7846 Modified Files: buildtools.py Log Message: - Use imp to find appletrawmain.py in stead of hand-crafting the path to it. - Allow for symlinks in the applet template. Index: buildtools.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/buildtools.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** buildtools.py 7 Nov 2002 23:07:04 -0000 1.19 --- buildtools.py 11 Nov 2002 00:06:14 -0000 1.20 *************** *** 390,395 **** progress.label('Creating __rawmain__.pyc') progress.inc(0) ! rawsourcefile = os.path.join(sys.prefix, 'Mac', 'Lib', 'appletrawmain.py') ! rawsource = open(rawsourcefile, 'rU').read() rawcode = compile(rawsource, rawsourcefile, 'exec') writepycfile(rawcode, outputfilename) --- 390,395 ---- progress.label('Creating __rawmain__.pyc') progress.inc(0) ! rawsourcefp, rawsourcefile, d2 = imp.find_module('appletrawmain') ! rawsource = rawsourcefp.read() rawcode = compile(rawsource, rawsourcefile, 'exec') writepycfile(rawcode, outputfilename) *************** *** 489,492 **** --- 489,495 ---- if os.path.isdir(srcpath): os.mkdir(dstpath) + elif os.path.islink(srcpath): + endpoint = os.readlink(srcpath) + os.symlink(endpoint, dstpath) else: if progress: From loewis@users.sourceforge.net Mon Nov 11 13:23:49 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon, 11 Nov 2002 05:23:49 -0800 Subject: [Python-checkins] python/dist/src configure,1.353,1.354 configure.in,1.364,1.365 pyconfig.h.in,1.56,1.57 Message-ID: <E18BEXd-0002Uq-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv9356 Modified Files: configure configure.in pyconfig.h.in Log Message: Check whether we can take the address of chown, link, and symlink. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.353 retrieving revision 1.354 diff -C2 -d -r1.353 -r1.354 *** configure 7 Nov 2002 07:42:28 -0000 1.353 --- configure 11 Nov 2002 13:23:42 -0000 1.354 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.363 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.364 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. *************** *** 11965,11980 **** ! ! ! ! for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \ fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \ ! hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \ mremap nice pathconf pause plock poll pthread_init \ putenv readlink \ select setegid seteuid setgid setgroups \ setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ ! sigaction siginterrupt sigrelse strftime strptime symlink \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ truncate uname unsetenv utimes waitpid _getpty getpriority --- 11965,11977 ---- ! for ac_func in alarm chown clock confstr ctermid ctermid_r execv \ fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \ ! hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \ mremap nice pathconf pause plock poll pthread_init \ putenv readlink \ select setegid seteuid setgid setgroups \ setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ ! sigaction siginterrupt sigrelse strftime strptime \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ truncate uname unsetenv utimes waitpid _getpty getpriority *************** *** 12053,12056 **** --- 12050,12197 ---- done + + # For some functions, having a definition is not sufficient, since + # we want to take their address. + echo "$as_me:$LINENO: checking for chroot" >&5 + echo $ECHO_N "checking for chroot... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + #include "confdefs.h" + #include <unistd.h> + #ifdef F77_DUMMY_MAIN + # ifdef __cplusplus + extern "C" + # endif + int F77_DUMMY_MAIN() { return 1; } + #endif + int + main () + { + void *x=chroot + ; + 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_CHROOT 1 + _ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + else + echo "$as_me: failed program was:" >&5 + cat 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 link" >&5 + echo $ECHO_N "checking for link... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + #include "confdefs.h" + #include <unistd.h> + #ifdef F77_DUMMY_MAIN + # ifdef __cplusplus + extern "C" + # endif + int F77_DUMMY_MAIN() { return 1; } + #endif + int + main () + { + void *x=link + ; + 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_LINK 1 + _ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + else + echo "$as_me: failed program was:" >&5 + cat 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 symlink" >&5 + echo $ECHO_N "checking for symlink... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + #include "confdefs.h" + #include <unistd.h> + #ifdef F77_DUMMY_MAIN + # ifdef __cplusplus + extern "C" + # endif + int F77_DUMMY_MAIN() { return 1; } + #endif + int + main () + { + void *x=symlink + ; + 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_SYMLINK 1 + _ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + else + echo "$as_me: failed program was:" >&5 + cat 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 # check for openpty and forkpty Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.364 retrieving revision 1.365 diff -C2 -d -r1.364 -r1.365 *** configure.in 7 Nov 2002 07:42:30 -0000 1.364 --- configure.in 11 Nov 2002 13:23:45 -0000 1.365 *************** *** 1713,1727 **** # checks for library functions ! AC_CHECK_FUNCS(alarm chown chroot clock confstr ctermid ctermid_r execv \ fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \ ! hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \ mremap nice pathconf pause plock poll pthread_init \ putenv readlink \ select setegid seteuid setgid setgroups \ setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ ! sigaction siginterrupt sigrelse strftime strptime symlink \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ truncate uname unsetenv utimes waitpid _getpty getpriority) # check for openpty and forkpty --- 1713,1748 ---- # checks for library functions ! AC_CHECK_FUNCS(alarm chown clock confstr ctermid ctermid_r execv \ fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \ ! hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \ mremap nice pathconf pause plock poll pthread_init \ putenv readlink \ select setegid seteuid setgid setgroups \ setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ ! sigaction siginterrupt sigrelse strftime strptime \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ truncate uname unsetenv utimes waitpid _getpty getpriority) + + # For some functions, having a definition is not sufficient, since + # we want to take their address. + AC_MSG_CHECKING(for chroot) + AC_TRY_COMPILE([#include <unistd.h>], void *x=chroot, + AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + AC_MSG_CHECKING(for link) + AC_TRY_COMPILE([#include <unistd.h>], void *x=link, + AC_DEFINE(HAVE_LINK, 1, Define if you have the 'link' function.) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + AC_MSG_CHECKING(for symlink) + 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) + ) # check for openpty and forkpty Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** pyconfig.h.in 26 Oct 2002 13:33:00 -0000 1.56 --- pyconfig.h.in 11 Nov 2002 13:23:45 -0000 1.57 *************** *** 43,47 **** #undef HAVE_CHOWN ! /* Define to 1 if you have the `chroot' function. */ #undef HAVE_CHROOT --- 43,47 ---- #undef HAVE_CHOWN ! /* Define if you have the 'chroot' function. */ #undef HAVE_CHROOT *************** *** 236,240 **** #undef HAVE_LIMITS_H ! /* Define to 1 if you have the `link' function. */ #undef HAVE_LINK --- 236,240 ---- #undef HAVE_LIMITS_H ! /* Define if you have the 'link' function. */ #undef HAVE_LINK *************** *** 445,449 **** #undef HAVE_ST_BLOCKS ! /* Define to 1 if you have the `symlink' function. */ #undef HAVE_SYMLINK --- 445,449 ---- #undef HAVE_ST_BLOCKS ! /* Define if you have the 'symlink' function. */ #undef HAVE_SYMLINK From loewis@users.sourceforge.net Mon Nov 11 13:26:54 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon, 11 Nov 2002 05:26:54 -0800 Subject: [Python-checkins] python/dist/src configure,1.354,1.355 configure.in,1.365,1.366 pyconfig.h.in,1.57,1.58 Message-ID: <E18BEac-0002vo-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv11050 Modified Files: configure configure.in pyconfig.h.in Log Message: Don't define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012]. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.354 retrieving revision 1.355 diff -C2 -d -r1.354 -r1.355 *** configure 11 Nov 2002 13:23:42 -0000 1.354 --- configure 11 Nov 2002 13:26:51 -0000 1.355 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.364 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.365 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. *************** *** 1255,1262 **** - cat >>confdefs.h <<\_ACEOF - #define _XOPEN_SOURCE 500 - _ACEOF # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition --- 1255,1260 ---- + define_xopen_source=yes # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition *************** *** 1346,1349 **** --- 1344,1371 ---- '') MACHDEP="unknown";; esac + fi + + # Some systems cannot stand _XOPEN_SOURCE being defined at all; they + # disable features if it is defined, without any means to access these + # features as extensions. For these systems, we skip the definition of + # _XOPEN_SOURCE. Before adding a system to the list to gain access to + # some feature, make sure there is no alternative way to access this + # feature. Also, when using wildcards, make sure you have verified the + # need for not defining _XOPEN_SOURCE on all systems matching the + # wildcard, and that the wildcard does not include future systems + # (which may remove their limitations). + case $ac_sys_system/$ac_sys_release in + # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined, + # even though select is a POSIX function. Reported by J. Ribbens. + OpenBSD/2.* | OpenBSD/3.[012]) + define_xopen_source=no;; + esac + + if test $define_xopen_source = yes + then + cat >>confdefs.h <<\_ACEOF + #define _XOPEN_SOURCE 500 + _ACEOF + fi Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.365 retrieving revision 1.366 diff -C2 -d -r1.365 -r1.366 *** configure.in 11 Nov 2002 13:23:45 -0000 1.365 --- configure.in 11 Nov 2002 13:26:51 -0000 1.366 *************** *** 34,40 **** [/* Define on UNIX to activate XPG/5 features. */ #ifndef _XOPEN_SOURCE ! # define _XOPEN_SOURCE 500 #endif]) ! AC_DEFINE(_XOPEN_SOURCE, 500) # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition --- 34,41 ---- [/* Define on UNIX to activate XPG/5 features. */ #ifndef _XOPEN_SOURCE ! # undef _XOPEN_SOURCE #endif]) ! ! define_xopen_source=yes # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition *************** *** 112,115 **** --- 113,138 ---- '') MACHDEP="unknown";; esac + fi + + # Some systems cannot stand _XOPEN_SOURCE being defined at all; they + # disable features if it is defined, without any means to access these + # features as extensions. For these systems, we skip the definition of + # _XOPEN_SOURCE. Before adding a system to the list to gain access to + # some feature, make sure there is no alternative way to access this + # feature. Also, when using wildcards, make sure you have verified the + # need for not defining _XOPEN_SOURCE on all systems matching the + # wildcard, and that the wildcard does not include future systems + # (which may remove their limitations). + dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output + case $ac_sys_system/$ac_sys_release in + # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined, + # even though select is a POSIX function. Reported by J. Ribbens. + OpenBSD/2.* | OpenBSD/3.@<:@012@:>@) + define_xopen_source=no;; + esac + + if test $define_xopen_source = yes + then + AC_DEFINE(_XOPEN_SOURCE, 500) fi Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** pyconfig.h.in 11 Nov 2002 13:23:45 -0000 1.57 --- pyconfig.h.in 11 Nov 2002 13:26:51 -0000 1.58 *************** *** 800,804 **** /* Define on UNIX to activate XPG/5 features. */ #ifndef _XOPEN_SOURCE ! # define _XOPEN_SOURCE 500 #endif --- 800,804 ---- /* Define on UNIX to activate XPG/5 features. */ #ifndef _XOPEN_SOURCE ! # undef _XOPEN_SOURCE #endif From loewis@users.sourceforge.net Mon Nov 11 13:37:31 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon, 11 Nov 2002 05:37:31 -0800 Subject: [Python-checkins] python/dist/src configure,1.355,1.356 configure.in,1.366,1.367 pyconfig.h.in,1.58,1.59 Message-ID: <E18BEkt-0004Pe-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv16683 Modified Files: configure configure.in pyconfig.h.in Log Message: Protect pyconfig.h from multiple inclusions. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.355 retrieving revision 1.356 diff -C2 -d -r1.355 -r1.356 *** configure 11 Nov 2002 13:26:51 -0000 1.355 --- configure 11 Nov 2002 13:37:26 -0000 1.356 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.365 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.366 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. *************** *** 1234,1237 **** --- 1234,1239 ---- # This is for stuff that absolutely must end up in pyconfig.h. # Please use pyport.h instead, if possible. + + Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.366 retrieving revision 1.367 diff -C2 -d -r1.366 -r1.367 *** configure.in 11 Nov 2002 13:26:51 -0000 1.366 --- configure.in 11 Nov 2002 13:37:28 -0000 1.367 *************** *** 12,15 **** --- 12,19 ---- # This is for stuff that absolutely must end up in pyconfig.h. # Please use pyport.h instead, if possible. + AH_TOP([ + #ifndef Py_PYCONFIG_H + #define Py_PYCONFIG_H + ]) AH_BOTTOM([ /* Define the macros needed if on a UnixWare 7.x system. */ *************** *** 17,20 **** --- 21,26 ---- #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ #endif + + #endif /*Py_PYCONFIG_H*/ ]) Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** pyconfig.h.in 11 Nov 2002 13:26:51 -0000 1.58 --- pyconfig.h.in 11 Nov 2002 13:37:28 -0000 1.59 *************** *** 1,4 **** --- 1,9 ---- /* pyconfig.h.in. Generated from configure.in by autoheader. */ + + #ifndef Py_PYCONFIG_H + #define Py_PYCONFIG_H + + /* Define for AIX if your compiler is a genuine IBM xlC/xlC_r and you want support for AIX C++ shared extension modules. */ *************** *** 852,854 **** --- 857,861 ---- #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ #endif + + #endif /*Py_PYCONFIG_H*/ From loewis@users.sourceforge.net Mon Nov 11 14:58:49 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon, 11 Nov 2002 06:58:49 -0800 Subject: [Python-checkins] python/dist/src configure,1.356,1.357 configure.in,1.367,1.368 pyconfig.h.in,1.59,1.60 Message-ID: <E18BG1Z-00084Q-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv30239 Modified Files: configure configure.in pyconfig.h.in Log Message: Use new-style CHECK_TYPE to avoid modifying confdefs.h. Include sys/types.h Fixes #636431. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.356 retrieving revision 1.357 diff -C2 -d -r1.356 -r1.357 *** configure 11 Nov 2002 13:37:26 -0000 1.356 --- configure 11 Nov 2002 14:58:30 -0000 1.357 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.366 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.367 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. *************** *** 16526,16536 **** fi - # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! - # Add sys/socket.h to confdefs.h - cat >> confdefs.h <<\EOF - #ifdef HAVE_SYS_SOCKET_H - #include <sys/socket.h> - #endif - EOF echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 --- 16526,16529 ---- *************** *** 16541,16545 **** #line $LINENO "configure" #include "confdefs.h" ! $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus --- 16534,16546 ---- #line $LINENO "configure" #include "confdefs.h" ! ! #ifdef HAVE_SYS_TYPES_H ! #include <sys/types.h> ! #endif ! #ifdef HAVE_SYS_SOCKET_H ! #include <sys/socket.h> ! #endif ! ! #ifdef F77_DUMMY_MAIN # ifdef __cplusplus *************** *** 16585,16589 **** else ! cat >>confdefs.h <<_ACEOF #define socklen_t int _ACEOF --- 16586,16590 ---- else ! cat >>confdefs.h <<\_ACEOF #define socklen_t int _ACEOF *************** *** 16591,16605 **** fi - - #AC_MSG_CHECKING(for Modules/Setup) - #if test ! -f Modules/Setup ; then - # if test ! -d Modules ; then - # mkdir Modules - # fi - # cp "$srcdir/Modules/Setup.dist" Modules/Setup - # AC_MSG_RESULT(creating) - #else - # AC_MSG_RESULT(already exists) - #fi --- 16592,16595 ---- Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.367 retrieving revision 1.368 diff -C2 -d -r1.367 -r1.368 *** configure.in 11 Nov 2002 13:37:28 -0000 1.367 --- configure.in 11 Nov 2002 14:58:42 -0000 1.368 *************** *** 2446,2468 **** fi ! # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! ! # Add sys/socket.h to confdefs.h ! cat >> confdefs.h <<\EOF #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif ! EOF ! AC_CHECK_TYPE(socklen_t, int) ! ! #AC_MSG_CHECKING(for Modules/Setup) ! #if test ! -f Modules/Setup ; then ! # if test ! -d Modules ; then ! # mkdir Modules ! # fi ! # cp "$srcdir/Modules/Setup.dist" Modules/Setup ! # AC_MSG_RESULT(creating) ! #else ! # AC_MSG_RESULT(already exists) ! #fi AC_SUBST(THREADHEADERS) --- 2446,2459 ---- fi ! AC_CHECK_TYPE(socklen_t,, ! AC_DEFINE(socklen_t,int, ! Define to `int' if <sys/socket.h> does not define.),[ ! #ifdef HAVE_SYS_TYPES_H ! #include <sys/types.h> ! #endif #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif ! ]) AC_SUBST(THREADHEADERS) Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** pyconfig.h.in 11 Nov 2002 13:37:28 -0000 1.59 --- pyconfig.h.in 11 Nov 2002 14:58:44 -0000 1.60 *************** *** 843,847 **** #undef size_t ! /* Define to `int' if <sys/types.h> does not define. */ #undef socklen_t --- 843,847 ---- #undef size_t ! /* Define to `int' if <sys/socket.h> does not define. */ #undef socklen_t From tim_one@users.sourceforge.net Mon Nov 11 19:44:41 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon, 11 Nov 2002 11:44:41 -0800 Subject: [Python-checkins] python/dist/src/PC pyconfig.h,1.15,1.16 Message-ID: <E18BKUD-0006U7-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory usw-pr-cvs1:/tmp/cvs-serv23278/python/PC Modified Files: pyconfig.h Log Message: Some help for SF 614770: MSVC 7.0 compiler support This changes sys.version under Microsoft builds to include the MS compiler version number (_MSC_VER). Since VC 6 and VC 7 are apparently incompatible, and both can be installed on a single box, distutils needs some way to figure out which version of MSVC a given Python was compiled under. As also suggested by MvL, got rid of #ifdef'ery for the defunct _M_ALPHA target. Bugfix candidate? Hard to say. As far as I'm concerned, VC 7 wasn't a supported platform in the 2.2 line. If somebody thinks it should be, they can do the work. Index: pyconfig.h =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/pyconfig.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** pyconfig.h 3 Oct 2002 05:10:39 -0000 1.15 --- pyconfig.h 11 Nov 2002 19:44:39 -0000 1.16 *************** *** 62,65 **** --- 62,87 ---- #ifdef _MSC_VER + /* We want COMPILER to expand to a string containing _MSC_VER's *value*. + * This is horridly tricky, because the stringization operator only works + * on macro arguments, and doesn't evaluate macros passed *as* arguments. + * Attempts simpler than the following appear doomed to produce "_MSC_VER" + * literally in the string. + */ + #define _Py_PASTE_VERSION(SUFFIX) \ + ("[MSC v." _Py_STRINGIZE(_MSC_VER) " " SUFFIX "]") + /* e.g., this produces, after compile-time string catenation, + * ("[MSC v.1200 32 bit (Intel)]") + * + * _Py_STRINGIZE(_MSC_VER) expands to + * _Py_STRINGIZE1((_MSC_VER)) expands to + * _Py_STRINGIZE2(_MSC_VER) but as this call is the result of token-pasting + * it's scanned again for macros and so further expands to (under MSVC 6) + * _Py_STRINGIZE2(1200) which then expands to + * "1200" + */ + #define _Py_STRINGIZE(X) _Py_STRINGIZE1((X)) + #define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X + #define _Py_STRINGIZE2(X) #X + /* MSVC defines _WINxx to differentiate the windows platform types *************** *** 77,85 **** #ifdef MS_WIN64 #ifdef _M_IX86 ! #define COMPILER "[MSC 64 bit (Intel)]" ! #elif defined(_M_ALPHA) ! #define COMPILER "[MSC 64 bit (Alpha)]" #else ! #define COMPILER "[MSC 64 bit (Unknown)]" #endif #endif /* MS_WIN64 */ --- 99,105 ---- #ifdef MS_WIN64 #ifdef _M_IX86 ! #define COMPILER _Py_PASTE_VERSION("64 bit (Intel)" #else ! #define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)") #endif #endif /* MS_WIN64 */ *************** *** 87,95 **** #if defined(MS_WIN32) && !defined(MS_WIN64) #ifdef _M_IX86 ! #define COMPILER "[MSC 32 bit (Intel)]" ! #elif defined(_M_ALPHA) ! #define COMPILER "[MSC 32 bit (Alpha)]" #else ! #define COMPILER "[MSC (Unknown)]" #endif #endif /* MS_WIN32 && !MS_WIN64 */ --- 107,113 ---- #if defined(MS_WIN32) && !defined(MS_WIN64) #ifdef _M_IX86 ! #define COMPILER _Py_PASTE_VERSION("32 bit (Intel)") #else ! #define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)") #endif #endif /* MS_WIN32 && !MS_WIN64 */ *************** *** 178,182 **** #endif ! /* For Windows the Python core is in a DLL by default. Test Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) --- 196,200 ---- #endif ! /* For Windows the Python core is in a DLL by default. Test Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) *************** *** 197,201 **** # ifndef Py_BUILD_CORE /* not building the core - must be an ext */ # if defined(_MSC_VER) ! /* So MSVC users need not specify the .lib file in their Makefile (other compilers are generally taken care of by distutils.) */ --- 215,219 ---- # ifndef Py_BUILD_CORE /* not building the core - must be an ext */ # if defined(_MSC_VER) ! /* So MSVC users need not specify the .lib file in their Makefile (other compilers are generally taken care of by distutils.) */ *************** *** 228,241 **** # define PLATFORM "win32" # define HAVE_LARGEFILE_SUPPORT ! # ifdef _M_ALPHA ! # define SIZEOF_VOID_P 8 ! # define SIZEOF_TIME_T 8 ! # else ! # define SIZEOF_VOID_P 4 ! # define SIZEOF_TIME_T 4 ! # define SIZEOF_OFF_T 4 ! # define SIZEOF_FPOS_T 8 ! # define SIZEOF_HKEY 4 ! # endif #endif --- 246,254 ---- # define PLATFORM "win32" # define HAVE_LARGEFILE_SUPPORT ! # define SIZEOF_VOID_P 4 ! # define SIZEOF_TIME_T 4 ! # define SIZEOF_OFF_T 4 ! # define SIZEOF_FPOS_T 8 ! # define SIZEOF_HKEY 4 #endif From tim_one@users.sourceforge.net Mon Nov 11 19:51:45 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon, 11 Nov 2002 11:51:45 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.517,1.518 Message-ID: <E18BKb3-0007F3-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv27664/python/Misc Modified Files: NEWS Log Message: Added a blurb about the change to sys.version under MSVC. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.517 retrieving revision 1.518 diff -C2 -d -r1.517 -r1.518 *** NEWS 7 Nov 2002 16:23:55 -0000 1.517 --- NEWS 11 Nov 2002 19:51:33 -0000 1.518 *************** *** 752,755 **** --- 752,760 ---- ------- + - When Python is built under a Microsoft compiler, sys.version now + includes the compiler version number (_MSC_VER). For example, under + MSVC 6, sys.version constains the substring "MSC v.1200 ". 1200 is + the value of _MSC_VER under MSVC 6. + - Sometimes the uninstall executable (UNWISE.EXE) vanishes. One cause of that has been fixed in the installer (disabled Wise's "delete in- From tim_one@users.sourceforge.net Mon Nov 11 20:21:08 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Mon, 11 Nov 2002 12:21:08 -0800 Subject: [Python-checkins] python/dist/src/PC pyconfig.h,1.16,1.17 Message-ID: <E18BL3U-0001GX-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory usw-pr-cvs1:/tmp/cvs-serv4723/python/PC Modified Files: pyconfig.h Log Message: Forgot a paren in the MSVC + 64-bit + Intel case. Index: pyconfig.h =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/pyconfig.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** pyconfig.h 11 Nov 2002 19:44:39 -0000 1.16 --- pyconfig.h 11 Nov 2002 20:21:06 -0000 1.17 *************** *** 99,103 **** #ifdef MS_WIN64 #ifdef _M_IX86 ! #define COMPILER _Py_PASTE_VERSION("64 bit (Intel)" #else #define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)") --- 99,103 ---- #ifdef MS_WIN64 #ifdef _M_IX86 ! #define COMPILER _Py_PASTE_VERSION("64 bit (Intel)") #else #define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)") From goodger@users.sourceforge.net Tue Nov 12 00:55:12 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Mon, 11 Nov 2002 16:55:12 -0800 Subject: [Python-checkins] python/nondist/peps pep-html-template,1.4,1.5 Message-ID: <E18BPKi-0002vL-00@usw-pr-cvs1.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv11114 Modified Files: pep-html-template Log Message: removed bogus attributes Index: pep-html-template =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-html-template,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pep-html-template 8 Nov 2002 22:12:30 -0000 1.4 --- pep-html-template 12 Nov 2002 00:55:10 -0000 1.5 *************** *** 12,16 **** <title>PEP %(pep)s -- %(title)s %(stylesheet)s ! --- 12,16 ---- PEP %(pep)s -- %(title)s %(stylesheet)s ! From goodger@users.sourceforge.net Tue Nov 12 00:56:29 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Mon, 11 Nov 2002 16:56:29 -0800 Subject: [Python-checkins] python/nondist/peps pep2html.py,1.47,1.48 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv11640 Modified Files: pep2html.py Log Message: Added --local/-l option to make my life easier on creosote. Removed bogus attributes. Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** pep2html.py 8 Nov 2002 03:43:48 -0000 1.47 --- pep2html.py 12 Nov 2002 00:56:27 -0000 1.48 *************** *** 22,25 **** --- 22,29 ---- used instead). Without -i, -u is ignored. + -l/--local + Same as -i/--install, except run on the local machine. Use this when + logged in to the python.org machine (creosote). + -q/--quiet Turn off verbose messages. *************** *** 106,110 **** link = RFCURL % rfcnum if link: ! return '%s' % (link, cgi.escape(text)) return cgi.escape(match.group(0)) # really slow, but it works... --- 110,114 ---- link = RFCURL % rfcnum if link: ! return '%s' % (cgi.escape(link), cgi.escape(text)) return cgi.escape(match.group(0)) # really slow, but it works... *************** *** 171,177 **** r = random.choice(range(64)) print >> outfile, ( ! ' \n' '\n' ! '\n' '\n' --- 175,181 ---- r = random.choice(range(64)) print >> outfile, ( ! ' \n' '\n' ! '\n' '\n' *************** *** 368,379 **** return outpath ! def push_pep(htmlfiles, txtfiles, username, verbose): ! if verbose: ! quiet = "" else: ! quiet = "-q" ! if username: ! username = username + "@" ! target = username + HOST + ":" + HDIR files = htmlfiles[:] files.extend(txtfiles) --- 372,391 ---- return outpath ! def push_pep(htmlfiles, txtfiles, username, verbose, local=0): ! quiet = "" ! if local: ! if verbose: ! quiet = "-v" ! target = HDIR ! copy_cmd = "cp" ! chmod_cmd = "chmod" else: ! if not verbose: ! quiet = "-q" ! if username: ! username = username + "@" ! target = username + HOST + ":" + HDIR ! copy_cmd = "scp" ! chmod_cmd = "ssh %s%s chmod" % (username, HOST) files = htmlfiles[:] files.extend(txtfiles) *************** *** 381,388 **** files.append("pep.css") filelist = SPACE.join(files) ! rc = os.system("scp %s %s %s" % (quiet, filelist, target)) if rc: sys.exit(rc) ! rc = os.system("ssh %s%s chmod 664 %s/*" % (username, HOST, HDIR)) if rc: sys.exit(rc) --- 393,400 ---- files.append("pep.css") filelist = SPACE.join(files) ! rc = os.system("%s %s %s %s" % (copy_cmd, quiet, filelist, target)) if rc: sys.exit(rc) ! rc = os.system("%s 664 %s/*" % (chmod_cmd, HDIR)) if rc: sys.exit(rc) *************** *** 446,449 **** --- 458,462 ---- # defaults update = 0 + local = 0 username = '' verbose = 1 *************** *** 457,462 **** try: opts, args = getopt.getopt( ! argv, 'bihqu:', ! ['browse', 'install', 'help', 'quiet', 'user=']) except getopt.error, msg: usage(1, msg) --- 470,475 ---- try: opts, args = getopt.getopt( ! argv, 'bilhqu:', ! ['browse', 'install', 'local', 'help', 'quiet', 'user=']) except getopt.error, msg: usage(1, msg) *************** *** 467,470 **** --- 480,486 ---- elif opt in ('-i', '--install'): update = 1 + elif opt in ('-l', '--local'): + update = 1 + local = 1 elif opt in ('-u', '--user'): username = arg *************** *** 500,504 **** if update: ! push_pep(html, peptxt, username, verbose) if browse: if args: --- 516,520 ---- if update: ! push_pep(html, peptxt, username, verbose, local=local) if browse: if args: From goodger@users.sourceforge.net Tue Nov 12 03:06:39 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Mon, 11 Nov 2002 19:06:39 -0800 Subject: [Python-checkins] python/nondist/peps pep.css,1.4,1.5 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv2862 Modified Files: pep.css Log Message: fix Index: pep.css =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pep.css 8 Nov 2002 03:44:20 -0000 1.4 --- pep.css 12 Nov 2002 03:06:36 -0000 1.5 *************** *** 23,27 **** .navigation .navicon { width: 150px ; ! height: 35 } .navigation .textlinks { --- 23,27 ---- .navigation .navicon { width: 150px ; ! height: 35px } .navigation .textlinks { From goodger@users.sourceforge.net Tue Nov 12 05:36:11 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Mon, 11 Nov 2002 21:36:11 -0800 Subject: [Python-checkins] python/nondist/peps pep-html-template,1.5,1.6 pep2html.py,1.48,1.49 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv6081 Modified Files: pep-html-template pep2html.py Log Message: Moved comment inside to appease MSIE. Index: pep-html-template =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-html-template,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pep-html-template 12 Nov 2002 00:55:10 -0000 1.5 --- pep-html-template 12 Nov 2002 05:36:09 -0000 1.6 *************** *** 1,3 **** --- 1,5 ---- + + - - --- 7,10 ---- Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** pep2html.py 12 Nov 2002 00:56:27 -0000 1.48 --- pep2html.py 12 Nov 2002 05:36:09 -0000 1.49 *************** *** 143,149 **** infile = iter(input_lines) # convert plaintext pep to minimal XHTML markup - print >> outfile, COMMENT print >> outfile, DTD print >> outfile, '' print >> outfile, '' # head --- 143,149 ---- infile = iter(input_lines) # convert plaintext pep to minimal XHTML markup print >> outfile, DTD print >> outfile, '' + print >> outfile, COMMENT print >> outfile, '' # head From loewis@users.sourceforge.net Tue Nov 12 06:04:41 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Mon, 11 Nov 2002 22:04:41 -0800 Subject: [Python-checkins] python/dist/src configure,1.357,1.358 configure.in,1.368,1.369 pyconfig.h.in,1.60,1.61 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv13128 Modified Files: configure configure.in pyconfig.h.in Log Message: Don't define _XOPEN_SOURCE and _POSIX_C_SOURCE on FreeBSD 5.0. Fixes #636318. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.357 retrieving revision 1.358 diff -C2 -d -r1.357 -r1.358 *** configure 11 Nov 2002 14:58:30 -0000 1.357 --- configure 12 Nov 2002 06:04:36 -0000 1.358 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.367 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.368 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. *************** *** 1253,1278 **** - # The definition of _GNU_SOURCE potentially causes a change of the value - # of _XOPEN_SOURCE. So define it only conditionally. - - - define_xopen_source=yes - # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition - # of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs - # are not declared. Since this is also needed in some cases for HP-UX, - # we define it globally. - - cat >>confdefs.h <<\_ACEOF - #define _XOPEN_SOURCE_EXTENDED 1 - _ACEOF - - - cat >>confdefs.h <<\_ACEOF - #define _POSIX_C_SOURCE 199506L - _ACEOF - - # Arguments passed to configure. --- 1253,1258 ---- *************** *** 1362,1372 **** OpenBSD/2.* | OpenBSD/3.[012]) define_xopen_source=no;; esac if test $define_xopen_source = yes then ! cat >>confdefs.h <<\_ACEOF ! #define _XOPEN_SOURCE 500 _ACEOF fi --- 1342,1374 ---- OpenBSD/2.* | OpenBSD/3.[012]) define_xopen_source=no;; + # On FreeBSD 5.0, chroot and setgroups are not declared if _XOPEN_SOURCE + # is define. Reported by M. Recht. + FreeBSD/5.0*) + define_xopen_source=no;; esac if test $define_xopen_source = yes then ! ! cat >>confdefs.h <<\_ACEOF ! #define _XOPEN_SOURCE 600 ! _ACEOF ! ! ! # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires ! # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else ! # several APIs are not declared. Since this is also needed in some ! # cases for HP-UX, we define it globally. ! ! ! cat >>confdefs.h <<\_ACEOF ! #define _XOPEN_SOURCE_EXTENDED 1 _ACEOF + + + cat >>confdefs.h <<\_ACEOF + #define _POSIX_C_SOURCE 200112L + _ACEOF + fi Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.368 retrieving revision 1.369 diff -C2 -d -r1.368 -r1.369 *** configure.in 11 Nov 2002 14:58:42 -0000 1.368 --- configure.in 12 Nov 2002 06:04:39 -0000 1.369 *************** *** 35,55 **** AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features]) - # The definition of _GNU_SOURCE potentially causes a change of the value - # of _XOPEN_SOURCE. So define it only conditionally. - AH_VERBATIM([_XOPEN_SOURCE], - [/* Define on UNIX to activate XPG/5 features. */ - #ifndef _XOPEN_SOURCE - # undef _XOPEN_SOURCE - #endif]) - define_xopen_source=yes - # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition - # of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs - # are not declared. Since this is also needed in some cases for HP-UX, - # we define it globally. - AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Define to activate Unix95-and-earlier features) - AC_DEFINE(_POSIX_C_SOURCE, 199506L, Define to activate features from IEEE Stds 1003.{123}-1995) - # Arguments passed to configure. AC_SUBST(CONFIG_ARGS) --- 35,40 ---- *************** *** 136,144 **** OpenBSD/2.* | OpenBSD/3.@<:@012@:>@) define_xopen_source=no;; esac if test $define_xopen_source = yes then ! AC_DEFINE(_XOPEN_SOURCE, 500) fi --- 121,143 ---- OpenBSD/2.* | OpenBSD/3.@<:@012@:>@) define_xopen_source=no;; + # On FreeBSD 5.0, chroot and setgroups are not declared if _XOPEN_SOURCE + # is define. Reported by M. Recht. + FreeBSD/5.0*) + define_xopen_source=no;; esac if test $define_xopen_source = yes then ! AC_DEFINE(_XOPEN_SOURCE, 600, ! Define to the level of X/Open that your system supports) ! ! # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires ! # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else ! # several APIs are not declared. Since this is also needed in some ! # cases for HP-UX, we define it globally. ! ! AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Define to activate Unix95-and-earlier features) ! AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001) ! fi Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** pyconfig.h.in 11 Nov 2002 14:58:44 -0000 1.60 --- pyconfig.h.in 12 Nov 2002 06:04:39 -0000 1.61 *************** *** 791,795 **** #undef _POSIX_1_SOURCE ! /* Define to activate features from IEEE Stds 1003.{123}-1995 */ #undef _POSIX_C_SOURCE --- 791,795 ---- #undef _POSIX_1_SOURCE ! /* Define to activate features from IEEE Stds 1003.1-2001 */ #undef _POSIX_C_SOURCE *************** *** 803,810 **** #undef _REENTRANT ! /* Define on UNIX to activate XPG/5 features. */ ! #ifndef _XOPEN_SOURCE ! # undef _XOPEN_SOURCE ! #endif /* Define to activate Unix95-and-earlier features */ --- 803,808 ---- #undef _REENTRANT ! /* Define to the level of X/Open that your system supports */ ! #undef _XOPEN_SOURCE /* Define to activate Unix95-and-earlier features */ From perky@fallin.lv Tue Nov 12 07:24:54 2002 From: perky@fallin.lv (Hye-Shik Chang) Date: Tue, 12 Nov 2002 16:24:54 +0900 Subject: [Python-checkins] python/dist/src configure,1.357,1.358 configure.in,1.368,1.369 pyconfig.h.in,1.60,1.61 In-Reply-To: References: Message-ID: <20021112072454.GA86752@fallin.lv> On Mon, Nov 11, 2002 at 10:04:41PM -0800, loewis@users.sourceforge.net wrote: > Update of /cvsroot/python/python/dist/src > In directory usw-pr-cvs1:/tmp/cvs-serv13128 > > Modified Files: > configure configure.in pyconfig.h.in > Log Message: > Don't define _XOPEN_SOURCE and _POSIX_C_SOURCE on FreeBSD 5.0. Fixes #636318. > Thank you. -- Hye-Shik Chang Yonsei University, Seoul ^D From doerwalter@users.sourceforge.net Tue Nov 12 11:42:23 2002 From: doerwalter@users.sourceforge.net (doerwalter@users.sourceforge.net) Date: Tue, 12 Nov 2002 03:42:23 -0800 Subject: [Python-checkins] python/dist/src/Modules selectmodule.c,2.70,2.71 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv14761/Modules Modified Files: selectmodule.c Log Message: Use PyInt_AsLong instead of PyInt_AS_LONG after the call to PyNumber_Int, because now PyNumber_Int might return a long, and PyInt_AsLong can handle that, whereas PyInt_AS_LONG can't. This closes SF bug #629989. Index: selectmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v retrieving revision 2.70 retrieving revision 2.71 diff -C2 -d -r2.70 -r2.71 *** selectmodule.c 24 Sep 2002 17:03:26 -0000 2.70 --- selectmodule.c 12 Nov 2002 11:42:20 -0000 2.71 *************** *** 471,475 **** if (!tout) return NULL; ! timeout = PyInt_AS_LONG(tout); Py_DECREF(tout); } --- 471,475 ---- if (!tout) return NULL; ! timeout = PyInt_AsLong(tout); Py_DECREF(tout); } From loewis@users.sourceforge.net Tue Nov 12 13:03:36 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Tue, 12 Nov 2002 05:03:36 -0800 Subject: [Python-checkins] python/nondist/peps pep-0011.txt,1.4,1.5 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv30877 Modified Files: pep-0011.txt Log Message: Add Minix. Proposed by Skip Montanaro. Index: pep-0011.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0011.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pep-0011.txt 15 Jul 2002 18:26:52 -0000 1.4 --- pep-0011.txt 12 Nov 2002 13:03:33 -0000 1.5 *************** *** 89,93 **** Code removed in: Python 2.4 ! Name: dgux Unsupported in: Python 2.3 Code removed in: Python 2.4 --- 89,93 ---- Code removed in: Python 2.4 ! Name: Minix Unsupported in: Python 2.3 Code removed in: Python 2.4 From loewis@users.sourceforge.net Tue Nov 12 15:25:22 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Tue, 12 Nov 2002 07:25:22 -0800 Subject: [Python-checkins] python/nondist/peps pep-0011.txt,1.5,1.6 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv18550 Modified Files: pep-0011.txt Log Message: Deprecate --with-dl-dld. Proposed by Matthew Cowles, in #636313. Index: pep-0011.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0011.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pep-0011.txt 12 Nov 2002 13:03:33 -0000 1.5 --- pep-0011.txt 12 Nov 2002 15:25:17 -0000 1.6 *************** *** 102,105 **** --- 102,109 ---- Code removed in: Python 2.4 + Name: Systems using --with-dl-dld + Unsupported in: Python 2.3 + Code removed in: Python 2.4 + Copyright From montanaro@users.sourceforge.net Tue Nov 12 16:53:38 2002 From: montanaro@users.sourceforge.net (montanaro@users.sourceforge.net) Date: Tue, 12 Nov 2002 08:53:38 -0800 Subject: [Python-checkins] python/dist/src README,1.156,1.157 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv12298 Modified Files: README Log Message: delete reference to building on Minix, which will be unsupported in 2.3 Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -d -r1.156 -r1.157 *** README 4 Nov 2002 20:49:45 -0000 1.156 --- README 12 Nov 2002 16:53:36 -0000 1.157 *************** *** 313,318 **** optimization solves the problems. - Minix: When using ack, use "CC=cc AR=aal RANLIB=: ./configure"! - SCO: The following apply to SCO 3 only; Python builds out of the box on SCO 5 (or so we've heard). --- 313,316 ---- From rhettinger@users.sourceforge.net Tue Nov 12 17:41:59 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue, 12 Nov 2002 09:41:59 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.518,1.519 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv10733/Misc Modified Files: NEWS Log Message: SF patch 629637: Add sample(population, k) method to the random module. Used for random sampling without replacement. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.518 retrieving revision 1.519 diff -C2 -d -r1.518 -r1.519 *** NEWS 11 Nov 2002 19:51:33 -0000 1.518 --- NEWS 12 Nov 2002 17:41:56 -0000 1.519 *************** *** 428,431 **** --- 428,434 ---- - Added operator.pow(a,b) which is equivalent to a**b. + - Added random.sample(population,k) for random sampling without replacement. + Returns a k length list of unique elements chosen from the population. + - random.randrange(-sys.maxint-1, sys.maxint) no longer raises OverflowError. That is, it now accepts any combination of 'start' From rhettinger@users.sourceforge.net Tue Nov 12 17:41:59 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue, 12 Nov 2002 09:41:59 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib librandom.tex,1.30,1.31 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv10733/Doc/lib Modified Files: librandom.tex Log Message: SF patch 629637: Add sample(population, k) method to the random module. Used for random sampling without replacement. Index: librandom.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librandom.tex,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** librandom.tex 23 May 2002 21:07:19 -0000 1.30 --- librandom.tex 12 Nov 2002 17:41:57 -0000 1.31 *************** *** 180,183 **** --- 180,202 ---- \end{funcdesc} + \begin{funcdesc}{sample}{population, k} + Return a \var{k} length list of unique elements chosen from the + population sequence. Used for random sampling without replacement. + + Returns a new list containing elements from the population. The + list itself is in random order so that all sub-slices are also + random samples. The original sequence is left undisturbed. + + If the population has repeated elements, then each occurence is a + possible selection in the sample. + + If indices are needed for a large population, use \function{xrange} + as an argument: \code{sample(xrange(10000000), 60)}. + + Optional argument random is a 0-argument function returning a random + float in [0.0, 1.0); by default, the standard random.random. + \versionadded{2.3} + \end{funcdesc} + The following functions generate specific real-valued distributions. From rhettinger@users.sourceforge.net Tue Nov 12 17:42:00 2002 From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net) Date: Tue, 12 Nov 2002 09:42:00 -0800 Subject: [Python-checkins] python/dist/src/Lib random.py,1.35,1.36 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv10733/lib Modified Files: random.py Log Message: SF patch 629637: Add sample(population, k) method to the random module. Used for random sampling without replacement. Index: random.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/random.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** random.py 16 Aug 2002 03:41:39 -0000 1.35 --- random.py 12 Nov 2002 17:41:57 -0000 1.36 *************** *** 8,11 **** --- 8,12 ---- --------- pick random element + pick random sample generate random permutation *************** *** 78,82 **** from math import floor as _floor ! __all__ = ["Random","seed","random","uniform","randint","choice", "randrange","shuffle","normalvariate","lognormvariate", "cunifvariate","expovariate","vonmisesvariate","gammavariate", --- 79,83 ---- from math import floor as _floor ! __all__ = ["Random","seed","random","uniform","randint","choice","sample", "randrange","shuffle","normalvariate","lognormvariate", "cunifvariate","expovariate","vonmisesvariate","gammavariate", *************** *** 374,377 **** --- 375,415 ---- x[i], x[j] = x[j], x[i] + def sample(self, population, k, random=None, int=int): + """Chooses k unique random elements from a population sequence. + + Returns a new list containing elements from the population. The + list itself is in random order so that all sub-slices are also + random samples. The original sequence is left undisturbed. + + If the population has repeated elements, then each occurence is + a possible selection in the sample. + + If indices are needed for a large population, use xrange as an + argument: sample(xrange(10000000), 60) + + Optional arg random is a 0-argument function returning a random + float in [0.0, 1.0); by default, the standard random.random. + """ + + n = len(population) + if not 0 <= k <= n: + raise ValueError, "sample larger than population" + if random is None: + random = self.random + if n < 6 * k: # if n len list takes less space than a k len dict + pool = list(population) + for i in xrange(n-1, n-k-1, -1): + j = int(random() * (i+1)) + pool[i], pool[j] = pool[j], pool[i] + return pool[-k:] + inorder = [None] * k + selections = {} + for i in xrange(k): + j = int(random() * n) + while j in selections: + j = int(random() * n) + selections[j] = inorder[i] = population[j] + return inorder # return selections in the order they were picked + ## -------------------- real-valued distributions ------------------- *************** *** 712,716 **** (avg, stddev, smallest, largest) ! def _test(N=20000): print 'TWOPI =', TWOPI print 'LOG4 =', LOG4 --- 750,766 ---- (avg, stddev, smallest, largest) ! def _test_sample(n): ! # For the entire allowable range of 0 <= k <= n, validate that ! # the sample is of the correct length and contains only unique items ! population = xrange(n) ! for k in xrange(n+1): ! s = sample(population, k) ! assert len(dict([(elem,True) for elem in s])) == len(s) == k ! ! def _sample_generator(n, k): ! # Return a fixed element from the sample. Validates random ordering. ! return sample(xrange(n), k)[k//2] ! ! def _test(N=2000): print 'TWOPI =', TWOPI print 'LOG4 =', LOG4 *************** *** 736,739 **** --- 786,792 ---- _test_generator(N, 'paretovariate(1.0)') _test_generator(N, 'weibullvariate(1.0, 1.0)') + _test_generator(N, '_sample_generator(50, 5)') # expected s.d.: 14.4 + _test_generator(N, '_sample_generator(50, 45)') # expected s.d.: 14.4 + _test_sample(1000) # Test jumpahead. *************** *** 761,764 **** --- 814,818 ---- choice = _inst.choice randrange = _inst.randrange + sample = _inst.sample shuffle = _inst.shuffle normalvariate = _inst.normalvariate From akuchling@users.sourceforge.net Tue Nov 12 18:45:49 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue, 12 Nov 2002 10:45:49 -0800 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew22.tex,1.57,1.58 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory usw-pr-cvs1:/tmp/cvs-serv17915 Modified Files: whatsnew22.tex Log Message: Remove extra word Index: whatsnew22.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew22.tex,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** whatsnew22.tex 2 May 2002 17:55:26 -0000 1.57 --- whatsnew22.tex 12 Nov 2002 18:45:46 -0000 1.58 *************** *** 4,8 **** \title{What's New in Python 2.2} ! \release{1.01} \author{A.M. Kuchling} \authoraddress{\email{akuchlin@mems-exchange.org}} --- 4,8 ---- \title{What's New in Python 2.2} ! \release{1.02} \author{A.M. Kuchling} \authoraddress{\email{akuchlin@mems-exchange.org}} *************** *** 126,130 **** integers, lists, dictionaries, and even files, are new-style classes now. A new-style class named \class{object}, the base class for all ! built-in types, has been also been added so if no built-in type is suitable, you can just subclass \class{object}: --- 126,130 ---- integers, lists, dictionaries, and even files, are new-style classes now. A new-style class named \class{object}, the base class for all ! built-in types, has also been added so if no built-in type is suitable, you can just subclass \class{object}: *************** *** 1433,1437 **** Lundh, Michael McLay, Nick Mathewson, Paul Moore, Gustavo Niemeyer, Don O'Donnell, Joonas Paalasma, Tim Peters, Jens Quade, Tom Reinhardt, Neil ! Schemenauer, Guido van Rossum, Greg Ward. \end{document} --- 1433,1437 ---- Lundh, Michael McLay, Nick Mathewson, Paul Moore, Gustavo Niemeyer, Don O'Donnell, Joonas Paalasma, Tim Peters, Jens Quade, Tom Reinhardt, Neil ! Schemenauer, Guido van Rossum, Greg Ward, Edward Welbourne. \end{document} From akuchling@users.sourceforge.net Tue Nov 12 18:59:22 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue, 12 Nov 2002 10:59:22 -0800 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew22.tex,1.58,1.59 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory usw-pr-cvs1:/tmp/cvs-serv26165 Modified Files: whatsnew22.tex Log Message: Update text to refer to 2.2.2 Remove an XXX item: I'm not going to write a section on the email package at this point Index: whatsnew22.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew22.tex,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** whatsnew22.tex 12 Nov 2002 18:45:46 -0000 1.58 --- whatsnew22.tex 12 Nov 2002 18:59:20 -0000 1.59 *************** *** 12,17 **** \section{Introduction} ! This article explains the new features in Python 2.2.1, released on ! April 10, 2002. Python 2.2.1 is a bugfix release of Python 2.2, originally released on December 21, 2001. --- 12,17 ---- \section{Introduction} ! This article explains the new features in Python 2.2.2, released on ! October 14, 2002. Python 2.2.2 is a bugfix release of Python 2.2, originally released on December 21, 2001. *************** *** 1159,1163 **** Baxter and Michel Pelletier.) - % XXX should the 'email' module get a section of its own? \item The \module{rfc822} module's parsing of email addresses is now compliant with \rfc{2822}, an update to \rfc{822}. (The module's --- 1159,1162 ---- *************** *** 1279,1284 **** scattered throughout the source tree. A search through the CVS change logs finds there were 527 patches applied and 683 bugs fixed between ! Python 2.1 and 2.2; 2.2.1 applied 139 patches and fixed 143 bugs. ! Both figures are likely to be underestimates. Some of the more notable changes are: --- 1278,1284 ---- scattered throughout the source tree. A search through the CVS change logs finds there were 527 patches applied and 683 bugs fixed between ! Python 2.1 and 2.2; 2.2.1 applied 139 patches and fixed 143 bugs; ! 2.2.2 applied 106 patches and fixed 82 bugs. These figures are likely ! to be underestimates. Some of the more notable changes are: From akuchling@users.sourceforge.net Tue Nov 12 19:01:09 2002 From: akuchling@users.sourceforge.net (akuchling@users.sourceforge.net) Date: Tue, 12 Nov 2002 11:01:09 -0800 Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew22.tex,1.54.2.1,1.54.2.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/whatsnew In directory usw-pr-cvs1:/tmp/cvs-serv27073 Modified Files: Tag: release22-maint whatsnew22.tex Log Message: Commit version 1.02 (CVS revision 1.59) of whatsnew22.tex, which fixes various small errors and adds mention of the 2.2.1 and 2.2.2 releases. Index: whatsnew22.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew22.tex,v retrieving revision 1.54.2.1 retrieving revision 1.54.2.2 diff -C2 -d -r1.54.2.1 -r1.54.2.2 *** whatsnew22.tex 2 May 2002 17:56:17 -0000 1.54.2.1 --- whatsnew22.tex 12 Nov 2002 19:01:04 -0000 1.54.2.2 *************** *** 4,8 **** \title{What's New in Python 2.2} ! \release{1.00} \author{A.M. Kuchling} \authoraddress{\email{akuchlin@mems-exchange.org}} --- 4,8 ---- \title{What's New in Python 2.2} ! \release{1.02} \author{A.M. Kuchling} \authoraddress{\email{akuchlin@mems-exchange.org}} *************** *** 12,17 **** \section{Introduction} ! This article explains the new features in Python 2.2, released on ! December 21, 2001. Python 2.2 can be thought of as the "cleanup release". There are some --- 12,18 ---- \section{Introduction} ! This article explains the new features in Python 2.2.2, released on ! October 14, 2002. Python 2.2.2 is a bugfix release of Python 2.2, ! originally released on December 21, 2001. Python 2.2 can be thought of as the "cleanup release". There are some *************** *** 125,129 **** integers, lists, dictionaries, and even files, are new-style classes now. A new-style class named \class{object}, the base class for all ! built-in types, has been also been added so if no built-in type is suitable, you can just subclass \class{object}: --- 126,130 ---- integers, lists, dictionaries, and even files, are new-style classes now. A new-style class named \class{object}, the base class for all ! built-in types, has also been added so if no built-in type is suitable, you can just subclass \class{object}: *************** *** 1064,1068 **** \item The \module{xmlrpclib} module was contributed to the standard ! library by Fredrik Lundh, provding support for writing XML-RPC clients. XML-RPC is a simple remote procedure call protocol built on top of HTTP and XML. For example, the following snippet retrieves a --- 1065,1069 ---- \item The \module{xmlrpclib} module was contributed to the standard ! library by Fredrik Lundh, providing support for writing XML-RPC clients. XML-RPC is a simple remote procedure call protocol built on top of HTTP and XML. For example, the following snippet retrieves a *************** *** 1114,1118 **** \item The Python profiler has been extensively reworked and various ! errors in its output have been corrected. (Contributed by Fred Fred~L. Drake, Jr. and Tim Peters.) --- 1115,1119 ---- \item The Python profiler has been extensively reworked and various ! errors in its output have been corrected. (Contributed by Fred~L. Drake, Jr. and Tim Peters.) *************** *** 1158,1162 **** Baxter and Michel Pelletier.) - % XXX should the 'email' module get a section of its own? \item The \module{rfc822} module's parsing of email addresses is now compliant with \rfc{2822}, an update to \rfc{822}. (The module's --- 1159,1162 ---- *************** *** 1277,1283 **** As usual there were a bunch of other improvements and bugfixes scattered throughout the source tree. A search through the CVS change ! logs finds there were 527 patches applied, and 683 bugs fixed; both ! figures are likely to be underestimates. Some of the more notable ! changes are: \begin{itemize} --- 1277,1286 ---- As usual there were a bunch of other improvements and bugfixes scattered throughout the source tree. A search through the CVS change ! logs finds there were 527 patches applied and 683 bugs fixed between ! Python 2.1 and 2.2; 2.2.1 applied 139 patches and fixed 143 bugs; ! 2.2.2 applied 106 patches and fixed 82 bugs. These figures are likely ! to be underestimates. ! ! Some of the more notable changes are: \begin{itemize} *************** *** 1429,1434 **** Hudson, Jack Jansen, Marc-Andr\'e Lemburg, Martin von L\"owis, Fredrik Lundh, Michael McLay, Nick Mathewson, Paul Moore, Gustavo Niemeyer, ! Don O'Donnell, Tim Peters, Jens Quade, Tom Reinhardt, Neil ! Schemenauer, Guido van Rossum, Greg Ward. \end{document} --- 1432,1437 ---- Hudson, Jack Jansen, Marc-Andr\'e Lemburg, Martin von L\"owis, Fredrik Lundh, Michael McLay, Nick Mathewson, Paul Moore, Gustavo Niemeyer, ! Don O'Donnell, Joonas Paalasma, Tim Peters, Jens Quade, Tom Reinhardt, Neil ! Schemenauer, Guido van Rossum, Greg Ward, Edward Welbourne. \end{document} From loewis@users.sourceforge.net Tue Nov 12 19:58:40 2002 From: loewis@users.sourceforge.net (loewis@users.sourceforge.net) Date: Tue, 12 Nov 2002 11:58:40 -0800 Subject: [Python-checkins] python/nondist/peps pep-0011.txt,1.6,1.7 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv1642 Modified Files: pep-0011.txt Log Message: Redeprecate dgux. Index: pep-0011.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0011.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pep-0011.txt 12 Nov 2002 15:25:17 -0000 1.6 --- pep-0011.txt 12 Nov 2002 19:58:38 -0000 1.7 *************** *** 89,92 **** --- 89,96 ---- Code removed in: Python 2.4 + Name: dgux + Unsupported in: Python 2.3 + Code removed in: Python 2.4 + Name: Minix Unsupported in: Python 2.3 From fdrake@users.sourceforge.net Tue Nov 12 22:07:14 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 12 Nov 2002 14:07:14 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex,1.102,1.103 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv20402 Modified Files: libos.tex Log Message: Clarified documentation of tempnam(). Closes SF bug #635656. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** libos.tex 7 Nov 2002 17:13:03 -0000 1.102 --- libos.tex 12 Nov 2002 22:07:11 -0000 1.103 *************** *** 973,976 **** --- 973,980 ---- managing files created using paths returned by \function{tempnam()}; no automatic cleanup is provided. + On \UNIX, the environment variable \envvar{TMPDIR} overrides + \var{dir}, while on Windows the \envvar{TMP} is used. The specific + behavior of this function depends on the C library implementation; + some aspects are underspecified in system documentation. \warning{Use of \function{tempnam()} is vulnerable to symlink attacks; consider using \function{tmpfile()} instead.} From fdrake@users.sourceforge.net Tue Nov 12 22:07:51 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 12 Nov 2002 14:07:51 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libos.tex,1.74.2.1.2.7,1.74.2.1.2.8 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv20742 Modified Files: Tag: release22-maint libos.tex Log Message: Clarified documentation of tempnam(). Closes SF bug #635656. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.74.2.1.2.7 retrieving revision 1.74.2.1.2.8 diff -C2 -d -r1.74.2.1.2.7 -r1.74.2.1.2.8 *** libos.tex 23 Aug 2002 16:28:16 -0000 1.74.2.1.2.7 --- libos.tex 12 Nov 2002 22:07:48 -0000 1.74.2.1.2.8 *************** *** 866,869 **** --- 866,873 ---- managing files created using paths returned by \function{tempnam()}; no automatic cleanup is provided. + On \UNIX, the environment variable \envvar{TMPDIR} overrides + \var{dir}, while on Windows the \envvar{TMP} is used. The specific + behavior of this function depends on the C library implementation; + some aspects are underspecified in system documentation. \warning{Use of \function{tempnam()} is vulnerable to symlink attacks; consider using \function{tmpfile()} instead.} From tim_one@users.sourceforge.net Tue Nov 12 22:08:10 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Tue, 12 Nov 2002 14:08:10 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libstdtypes.tex,1.107,1.108 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv19759/python/Doc/lib Modified Files: libstdtypes.tex Log Message: SF patch 637176: list.sort crasher Armin Rigo's Draconian but effective fix for SF bug 453523: list.sort crasher slightly fiddled to catch more cases of list mutation. The dreaded internal "immutable list type" is gone! OTOH, if you look at a list *while* it's being sorted now, it will appear to be empty. Better than a core dump. Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** libstdtypes.tex 25 Oct 2002 16:55:51 -0000 1.107 --- libstdtypes.tex 12 Nov 2002 22:08:08 -0000 1.108 *************** *** 923,927 **** {reverses the items of \var{s} in place}{(6)} \lineiii{\var{s}.sort(\optional{\var{cmpfunc}})} ! {sort the items of \var{s} in place}{(6), (7), (8)} \end{tableiii} \indexiv{operations on}{mutable}{sequence}{types} --- 923,927 ---- {reverses the items of \var{s} in place}{(6)} \lineiii{\var{s}.sort(\optional{\var{cmpfunc}})} ! {sort the items of \var{s} in place}{(6), (7), (8), (9)} \end{tableiii} \indexiv{operations on}{mutable}{sequence}{types} *************** *** 981,984 **** --- 981,990 ---- \method{sort()} method, but code that intends to be portable across implementations and versions must not rely on stability. + + \item[(9)] While a list is being sorted, the effect of attempting to + mutate, or even inspect, the list is undefined. The C implementation + of Python 2.3 makes the list appear empty for the duration, and raises + \exception{ValueError} if it can detect that the list has been + mutated during a sort. \end{description} From tim_one@users.sourceforge.net Tue Nov 12 22:08:11 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Tue, 12 Nov 2002 14:08:11 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_sort.py,1.2,1.3 test_types.py,1.38,1.39 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv19759/python/Lib/test Modified Files: test_sort.py test_types.py Log Message: SF patch 637176: list.sort crasher Armin Rigo's Draconian but effective fix for SF bug 453523: list.sort crasher slightly fiddled to catch more cases of list mutation. The dreaded internal "immutable list type" is gone! OTOH, if you look at a list *while* it's being sorted now, it will appear to be empty. Better than a core dump. Index: test_sort.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sort.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_sort.py 3 Aug 2002 02:17:41 -0000 1.2 --- test_sort.py 12 Nov 2002 22:08:08 -0000 1.3 *************** *** 117,120 **** --- 117,149 ---- check("stability", x, s) + def bug453523(): + global nerrors + from random import random + + # If this fails, the most likely outcome is a core dump. + if verbose: + print "Testing bug 453523 -- list.sort() crasher." + + class C: + def __lt__(self, other): + if L and random() < 0.75: + pop() + else: + push(3) + return random() < 0.5 + + L = [C() for i in range(50)] + pop = L.pop + push = L.append + try: + L.sort() + except ValueError: + pass + else: + print " Mutation during list.sort() wasn't caught." + nerrors += 1 + + bug453523() + if nerrors: print "Test failed", nerrors Index: test_types.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_types.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** test_types.py 5 Nov 2002 17:38:05 -0000 1.38 --- test_types.py 12 Nov 2002 22:08:08 -0000 1.39 *************** *** 368,375 **** def selfmodifyingComparison(x,y): ! z[0] = 1 return cmp(x, y) try: z.sort(selfmodifyingComparison) ! except TypeError: pass else: raise TestFailed, 'modifying list during sort' --- 368,375 ---- def selfmodifyingComparison(x,y): ! z.append(1) return cmp(x, y) try: z.sort(selfmodifyingComparison) ! except ValueError: pass else: raise TestFailed, 'modifying list during sort' From tim_one@users.sourceforge.net Tue Nov 12 22:08:12 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Tue, 12 Nov 2002 14:08:12 -0800 Subject: [Python-checkins] python/dist/src/Misc NEWS,1.519,1.520 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv19759/python/Misc Modified Files: NEWS Log Message: SF patch 637176: list.sort crasher Armin Rigo's Draconian but effective fix for SF bug 453523: list.sort crasher slightly fiddled to catch more cases of list mutation. The dreaded internal "immutable list type" is gone! OTOH, if you look at a list *while* it's being sorted now, it will appear to be empty. Better than a core dump. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.519 retrieving revision 1.520 diff -C2 -d -r1.519 -r1.520 *** NEWS 12 Nov 2002 17:41:56 -0000 1.519 --- NEWS 12 Nov 2002 22:08:09 -0000 1.520 *************** *** 67,70 **** --- 67,80 ---- ----------------- + - Thanks to Armin Rigo, the last known way to provoke a system crash + by cleverly arranging for a comparison function to mutate a list + during a list.sort() operation has been fixed. The effect of + attempting to mutate a list, or even to inspect its contents or + length, while a sort is in progress, is not defined by the language. + The C implementation of Python 2.3 attempts to detect mutations, + and raise ValueError if one occurs, but there's no guarantee that + all mutations will be caught, or that any will be caught across + releases or implementations. + - Unicode file name processing for Windows (PEP 277) is implemented. All platforms now have an os.path.supports_unicode_filenames attribute, *************** *** 429,433 **** - Added random.sample(population,k) for random sampling without replacement. ! Returns a k length list of unique elements chosen from the population. - random.randrange(-sys.maxint-1, sys.maxint) no longer raises --- 439,443 ---- - Added random.sample(population,k) for random sampling without replacement. ! Returns a k length list of unique elements chosen from the population. - random.randrange(-sys.maxint-1, sys.maxint) no longer raises From tim_one@users.sourceforge.net Tue Nov 12 22:08:12 2002 From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net) Date: Tue, 12 Nov 2002 14:08:12 -0800 Subject: [Python-checkins] python/dist/src/Objects listobject.c,2.140,2.141 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv19759/python/Objects Modified Files: listobject.c Log Message: SF patch 637176: list.sort crasher Armin Rigo's Draconian but effective fix for SF bug 453523: list.sort crasher slightly fiddled to catch more cases of list mutation. The dreaded internal "immutable list type" is gone! OTOH, if you look at a list *while* it's being sorted now, it will appear to be empty. Better than a core dump. Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.140 retrieving revision 2.141 diff -C2 -d -r2.140 -r2.141 *** listobject.c 5 Nov 2002 22:41:37 -0000 2.140 --- listobject.c 12 Nov 2002 22:08:10 -0000 2.141 *************** *** 1635,1640 **** } - static PyTypeObject immutable_list_type; - /* An adaptive, stable, natural mergesort. See listsort.txt. * Returns Py_None on success, NULL on error. Even in case of error, the --- 1635,1638 ---- *************** *** 1649,1653 **** int nremaining; int minrun; ! PyTypeObject *savetype; PyObject *compare = NULL; PyObject *result = NULL; /* guilty until proved innocent */ --- 1647,1653 ---- int nremaining; int minrun; ! int saved_ob_size; ! PyObject **saved_ob_item; ! PyObject **empty_ob_item; PyObject *compare = NULL; PyObject *result = NULL; /* guilty until proved innocent */ *************** *** 1660,1667 **** merge_init(&ms, compare); ! savetype = self->ob_type; ! self->ob_type = &immutable_list_type; ! nremaining = self->ob_size; if (nremaining < 2) goto succeed; --- 1660,1674 ---- merge_init(&ms, compare); ! /* The list is temporarily made empty, so that mutations performed ! * by comparison functions can't affect the slice of memory we're ! * sorting (allowing mutations during sorting is a core-dump ! * factory, since ob_item may change). ! */ ! saved_ob_size = self->ob_size; ! saved_ob_item = self->ob_item; ! self->ob_size = 0; ! self->ob_item = empty_ob_item = PyMem_NEW(PyObject *, 0); ! nremaining = saved_ob_size; if (nremaining < 2) goto succeed; *************** *** 1670,1674 **** * and extending short natural runs to minrun elements. */ ! lo = self->ob_item; hi = lo + nremaining; minrun = merge_compute_minrun(nremaining); --- 1677,1681 ---- * and extending short natural runs to minrun elements. */ ! lo = saved_ob_item; hi = lo + nremaining; minrun = merge_compute_minrun(nremaining); *************** *** 1707,1717 **** goto fail; assert(ms.n == 1); ! assert(ms.pending[0].base == self->ob_item); ! assert(ms.pending[0].len == self->ob_size); succeed: result = Py_None; fail: ! self->ob_type = savetype; merge_freemem(&ms); Py_XINCREF(result); --- 1714,1736 ---- goto fail; assert(ms.n == 1); ! assert(ms.pending[0].base == saved_ob_item); ! assert(ms.pending[0].len == saved_ob_size); succeed: result = Py_None; fail: ! if (self->ob_item != empty_ob_item || self->ob_size) { ! /* The user mucked with the list during the sort. */ ! (void)list_ass_slice(self, 0, self->ob_size, (PyObject *)NULL); ! if (result != NULL) { ! PyErr_SetString(PyExc_ValueError, ! "list modified during sort"); ! result = NULL; ! } ! } ! if (self->ob_item == empty_ob_item) ! PyMem_FREE(empty_ob_item); ! self->ob_size = saved_ob_size; ! self->ob_item = saved_ob_item; merge_freemem(&ms); Py_XINCREF(result); *************** *** 2326,2415 **** PyType_GenericNew, /* tp_new */ PyObject_GC_Del, /* tp_free */ - }; - - - /* During a sort, we really can't have anyone modifying the list; it could - cause core dumps. Thus, we substitute a dummy type that raises an - explanatory exception when a modifying operation is used. Caveat: - comparisons may behave differently; but I guess it's a bad idea anyway to - compare a list that's being sorted... */ - - static PyObject * - immutable_list_op(void) - { - PyErr_SetString(PyExc_TypeError, - "a list cannot be modified while it is being sorted"); - return NULL; - } - - static PyMethodDef immutable_list_methods[] = { - {"append", (PyCFunction)immutable_list_op, METH_VARARGS}, - {"insert", (PyCFunction)immutable_list_op, METH_VARARGS}, - {"extend", (PyCFunction)immutable_list_op, METH_O}, - {"pop", (PyCFunction)immutable_list_op, METH_VARARGS}, - {"remove", (PyCFunction)immutable_list_op, METH_VARARGS}, - {"index", (PyCFunction)listindex, METH_O}, - {"count", (PyCFunction)listcount, METH_O}, - {"reverse", (PyCFunction)immutable_list_op, METH_VARARGS}, - {"sort", (PyCFunction)immutable_list_op, METH_VARARGS}, - {NULL, NULL} /* sentinel */ - }; - - static int - immutable_list_ass(void) - { - immutable_list_op(); - return -1; - } - - static PySequenceMethods immutable_list_as_sequence = { - (inquiry)list_length, /* sq_length */ - (binaryfunc)list_concat, /* sq_concat */ - (intargfunc)list_repeat, /* sq_repeat */ - (intargfunc)list_item, /* sq_item */ - (intintargfunc)list_slice, /* sq_slice */ - (intobjargproc)immutable_list_ass, /* sq_ass_item */ - (intintobjargproc)immutable_list_ass, /* sq_ass_slice */ - (objobjproc)list_contains, /* sq_contains */ - }; - - static PyTypeObject immutable_list_type = { - PyObject_HEAD_INIT(&PyType_Type) - 0, - "list (immutable, during sort)", - sizeof(PyListObject), - 0, - 0, /* Cannot happen */ /* tp_dealloc */ - (printfunc)list_print, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* Won't be called */ /* tp_compare */ - (reprfunc)list_repr, /* tp_repr */ - 0, /* tp_as_number */ - &immutable_list_as_sequence, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - list_nohash, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */ - list_doc, /* tp_doc */ - (traverseproc)list_traverse, /* tp_traverse */ - 0, /* tp_clear */ - list_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - immutable_list_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_init */ - /* NOTE: This is *not* the standard list_type struct! */ }; --- 2345,2348 ---- From fdrake@users.sourceforge.net Tue Nov 12 22:19:37 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 12 Nov 2002 14:19:37 -0800 Subject: [Python-checkins] python/dist/src/Tools/webchecker webchecker.py,1.28,1.29 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/webchecker In directory usw-pr-cvs1:/tmp/cvs-serv29984 Modified Files: webchecker.py Log Message: Handle the Content-Type header a little more appropriately: if it contains options, drop them to get the major/minor content type. Modified from the supplied patch to support more whitespace variation. Closes SF patch #613605. Index: webchecker.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/webchecker/webchecker.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** webchecker.py 11 Sep 2002 20:36:02 -0000 1.28 --- webchecker.py 12 Nov 2002 22:19:34 -0000 1.29 *************** *** 545,548 **** --- 545,551 ---- if info.has_key('content-type'): ctype = cgi.parse_header(info['content-type'])[0].lower() + if ';' in ctype: + # handle content-type: text/html; charset=iso8859-1 : + ctype = ctype.split(';', 1)[0].strip() else: if url[-1:] == "/": From fdrake@users.sourceforge.net Tue Nov 12 22:21:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 12 Nov 2002 14:21:03 -0800 Subject: [Python-checkins] python/dist/src/Tools/webchecker webchecker.py,1.25.6.1,1.25.6.2 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/webchecker In directory usw-pr-cvs1:/tmp/cvs-serv30979 Modified Files: Tag: release22-maint webchecker.py Log Message: Handle the Content-Type header a little more appropriately: if it contains options, drop them to get the major/minor content type. Modified from the supplied patch to support more whitespace variation. Closes SF patch #613605. Index: webchecker.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/webchecker/webchecker.py,v retrieving revision 1.25.6.1 retrieving revision 1.25.6.2 diff -C2 -d -r1.25.6.1 -r1.25.6.2 *** webchecker.py 11 Mar 2002 10:04:07 -0000 1.25.6.1 --- webchecker.py 12 Nov 2002 22:21:01 -0000 1.25.6.2 *************** *** 545,548 **** --- 545,551 ---- if info.has_key('content-type'): ctype = string.lower(info['content-type']) + if ';' in ctype: + # handle content-type: text/html; charset=iso8859-1 : + ctype = ctype.split(';', 1)[0].strip() else: if url[-1:] == "/": From nnorwitz@users.sourceforge.net Tue Nov 12 23:01:14 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Tue, 12 Nov 2002 15:01:14 -0800 Subject: [Python-checkins] python/dist/src/Objects stringobject.c,2.195,2.196 unicodeobject.c,2.173,2.174 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv23060/Objects Modified Files: stringobject.c unicodeobject.c Log Message: Fix SF # 635969, No error "not all arguments converted" When mwh added extended slicing, strings and unicode became mappings. Thus, dict was set which prevented an error when doing: newstr = 'format without a percent' % string_value This fix raises an exception again when there are no formats and % with a string value. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.195 retrieving revision 2.196 diff -C2 -d -r2.195 -r2.196 *** stringobject.c 11 Oct 2002 05:37:59 -0000 2.195 --- stringobject.c 12 Nov 2002 23:01:11 -0000 2.196 *************** *** 3623,3627 **** argidx = -2; } ! if (args->ob_type->tp_as_mapping && !PyTuple_Check(args)) dict = args; while (--fmtcnt >= 0) { --- 3623,3628 ---- argidx = -2; } ! if (args->ob_type->tp_as_mapping && !PyTuple_Check(args) && ! !PyObject_TypeCheck(args, &PyBaseString_Type)) dict = args; while (--fmtcnt >= 0) { Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.173 retrieving revision 2.174 diff -C2 -d -r2.173 -r2.174 *** unicodeobject.c 23 Oct 2002 09:02:46 -0000 2.173 --- unicodeobject.c 12 Nov 2002 23:01:11 -0000 2.174 *************** *** 6182,6186 **** argidx = -2; } ! if (args->ob_type->tp_as_mapping && !PyTuple_Check(args)) dict = args; --- 6182,6187 ---- argidx = -2; } ! if (args->ob_type->tp_as_mapping && !PyTuple_Check(args) && ! !PyObject_TypeCheck(args, &PyBaseString_Type)) dict = args; From nnorwitz@users.sourceforge.net Tue Nov 12 23:01:14 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Tue, 12 Nov 2002 15:01:14 -0800 Subject: [Python-checkins] python/dist/src/Lib/test test_format.py,1.17,1.18 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv23060/Lib/test Modified Files: test_format.py Log Message: Fix SF # 635969, No error "not all arguments converted" When mwh added extended slicing, strings and unicode became mappings. Thus, dict was set which prevented an error when doing: newstr = 'format without a percent' % string_value This fix raises an exception again when there are no formats and % with a string value. Index: test_format.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_format.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** test_format.py 11 Oct 2002 13:46:32 -0000 1.17 --- test_format.py 12 Nov 2002 23:01:12 -0000 1.18 *************** *** 222,225 **** --- 222,233 ---- test_exc('%d', '1', TypeError, "int argument required") test_exc('%g', '1', TypeError, "float argument required") + test_exc('no format', '1', TypeError, + "not all arguments converted during string formatting") + test_exc('no format', u'1', TypeError, + "not all arguments converted during string formatting") + test_exc(u'no format', '1', TypeError, + "not all arguments converted during string formatting") + test_exc(u'no format', u'1', TypeError, + "not all arguments converted during string formatting") if sys.maxint == 2**32-1: From nnorwitz@users.sourceforge.net Tue Nov 12 23:09:14 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Tue, 12 Nov 2002 15:09:14 -0800 Subject: [Python-checkins] python/dist/src/Tools/freeze modulefinder.py,1.20,1.21 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/freeze In directory usw-pr-cvs1:/tmp/cvs-serv28771/Tools/freeze Modified Files: modulefinder.py Log Message: SF # 627900, Bytecode copy bug in freeze Pass co_freevars and co_cellvars to new.code(). Will backport. Index: modulefinder.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/modulefinder.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** modulefinder.py 11 Sep 2002 20:36:00 -0000 1.20 --- modulefinder.py 12 Nov 2002 23:09:12 -0000 1.21 *************** *** 434,438 **** co.co_flags, co.co_code, tuple(consts), co.co_names, co.co_varnames, new_filename, co.co_name, ! co.co_firstlineno, co.co_lnotab) --- 434,439 ---- co.co_flags, co.co_code, tuple(consts), co.co_names, co.co_varnames, new_filename, co.co_name, ! co.co_firstlineno, co.co_lnotab, ! co.co_freevars, co.co_cellvars) From nnorwitz@users.sourceforge.net Tue Nov 12 23:10:34 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Tue, 12 Nov 2002 15:10:34 -0800 Subject: [Python-checkins] python/dist/src/Tools/freeze modulefinder.py,1.18,1.18.10.1 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/freeze In directory usw-pr-cvs1:/tmp/cvs-serv30369/Tools/freeze Modified Files: Tag: release22-maint modulefinder.py Log Message: SF # 627900, Bytecode copy bug in freeze Pass co_freevars and co_cellvars to new.code(). Index: modulefinder.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/modulefinder.py,v retrieving revision 1.18 retrieving revision 1.18.10.1 diff -C2 -d -r1.18 -r1.18.10.1 *** modulefinder.py 18 Oct 2001 19:15:32 -0000 1.18 --- modulefinder.py 12 Nov 2002 23:10:31 -0000 1.18.10.1 *************** *** 435,439 **** co.co_flags, co.co_code, tuple(consts), co.co_names, co.co_varnames, new_filename, co.co_name, ! co.co_firstlineno, co.co_lnotab) --- 435,440 ---- co.co_flags, co.co_code, tuple(consts), co.co_names, co.co_varnames, new_filename, co.co_name, ! co.co_firstlineno, co.co_lnotab, ! co.co_freevars, co.co_cellvars) From fdrake@users.sourceforge.net Tue Nov 12 23:12:56 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 12 Nov 2002 15:12:56 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libre.tex,1.90,1.91 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv31850 Modified Files: libre.tex Log Message: Clarified meaning of \w and \W with respect to the UNICODE and LOCALE flags. Closes SF bug #635595. Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** libre.tex 30 Oct 2002 21:03:28 -0000 1.90 --- libre.tex 12 Nov 2002 23:12:54 -0000 1.91 *************** *** 348,355 **** \item[\code{\e w}]When the \constant{LOCALE} and \constant{UNICODE} ! flags are not specified, ! matches any alphanumeric character; this is equivalent to the set \regexp{[a-zA-Z0-9_]}. With \constant{LOCALE}, it will match the set ! \regexp{[0-9_]} plus whatever characters are defined as letters for the current locale. If \constant{UNICODE} is set, this will match the characters \regexp{[0-9_]} plus whatever is classified as alphanumeric --- 348,355 ---- \item[\code{\e w}]When the \constant{LOCALE} and \constant{UNICODE} ! flags are not specified, matches any alphanumeric character and the ! underscore; this is equivalent to the set \regexp{[a-zA-Z0-9_]}. With \constant{LOCALE}, it will match the set ! \regexp{[0-9_]} plus whatever characters are defined as alphanumeric for the current locale. If \constant{UNICODE} is set, this will match the characters \regexp{[0-9_]} plus whatever is classified as alphanumeric *************** *** 360,366 **** is equivalent to the set \regexp{[{\textasciicircum}a-zA-Z0-9_]}. With \constant{LOCALE}, it will match any character not in the set ! \regexp{[0-9_]}, and not defined as a letter for the current locale. If \constant{UNICODE} is set, this will match anything other than ! \regexp{[0-9_]} and characters marked at alphanumeric in the Unicode character properties database. --- 360,366 ---- is equivalent to the set \regexp{[{\textasciicircum}a-zA-Z0-9_]}. With \constant{LOCALE}, it will match any character not in the set ! \regexp{[0-9_]}, and not defined as alphanumeric for the current locale. If \constant{UNICODE} is set, this will match anything other than ! \regexp{[0-9_]} and characters marked as alphanumeric in the Unicode character properties database. From fdrake@users.sourceforge.net Tue Nov 12 23:13:43 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue, 12 Nov 2002 15:13:43 -0800 Subject: [Python-checkins] python/dist/src/Doc/lib libre.tex,1.73.6.10,1.73.6.11 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv32255 Modified Files: Tag: release22-maint libre.tex Log Message: Clarified meaning of \w and \W with respect to the UNICODE and LOCALE flags. Closes SF bug #635595. Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.73.6.10 retrieving revision 1.73.6.11 diff -C2 -d -r1.73.6.10 -r1.73.6.11 *** libre.tex 5 Oct 2002 15:25:33 -0000 1.73.6.10 --- libre.tex 12 Nov 2002 23:13:40 -0000 1.73.6.11 *************** *** 357,364 **** \item[\code{\e w}]When the \constant{LOCALE} and \constant{UNICODE} ! flags are not specified, ! matches any alphanumeric character; this is equivalent to the set \regexp{[a-zA-Z0-9_]}. With \constant{LOCALE}, it will match the set ! \regexp{[0-9_]} plus whatever characters are defined as letters for the current locale. If \constant{UNICODE} is set, this will match the characters \regexp{[0-9_]} plus whatever is classified as alphanumeric --- 357,364 ---- \item[\code{\e w}]When the \constant{LOCALE} and \constant{UNICODE} ! flags are not specified, matches any alphanumeric character and the ! underscore; this is equivalent to the set \regexp{[a-zA-Z0-9_]}. With \constant{LOCALE}, it will match the set ! \regexp{[0-9_]} plus whatever characters are defined as alphanumeric for the current locale. If \constant{UNICODE} is set, this will match the characters \regexp{[0-9_]} plus whatever is classified as alphanumeric *************** *** 369,375 **** is equivalent to the set \regexp{[{\textasciicircum}a-zA-Z0-9_]}. With \constant{LOCALE}, it will match any character not in the set ! \regexp{[0-9_]}, and not defined as a letter for the current locale. If \constant{UNICODE} is set, this will match anything other than ! \regexp{[0-9_]} and characters marked at alphanumeric in the Unicode character properties database. --- 369,375 ---- is equivalent to the set \regexp{[{\textasciicircum}a-zA-Z0-9_]}. With \constant{LOCALE}, it will match any character not in the set ! \regexp{[0-9_]}, and not defined as alphanumeric for the current locale. If \constant{UNICODE} is set, this will match anything other than ! \regexp{[0-9_]} and characters marked as alphanumeric in the Unicode character properties database. From nnorwitz@users.sourceforge.net Tue Nov 12 23:21:18 2002 From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net) Date: Tue, 12 Nov 2002 15:21:18 -0800 Subject: [Python-checkins] python/dist/src/Tools/freeze modulefinder.py,1.21,1.22 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/freeze In directory usw-pr-cvs1:/tmp/cvs-serv3848/Tools/freeze Modified Files: modulefinder.py Log Message: Fix SF # 464405, freeze doesn't like DOS files on Linux Use universal newline support when opening a file for freezing. Index: modulefinder.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/freeze/modulefinder.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** modulefinder.py 12 Nov 2002 23:09:12 -0000 1.21 --- modulefinder.py 12 Nov 2002 23:21:15 -0000 1.22 *************** *** 117,121 **** def run_script(self, pathname): self.msg(2, "run_script", pathname) ! fp = open(pathname) stuff = ("", "r", imp.PY_SOURCE) self.load_module('__main__', fp, pathname, stuff) --- 117,121 ---- def run_script(self, pathname): self.msg(2, "run_script", pathname) ! fp = open(pathname, "U") stuff = ("", "r", imp.PY_SOURCE) self.load_module('__main__', fp, pathname, stuff) *************** *** 124,128 **** dir, name = os.path.split(pathname) name, ext = os.path.splitext(name) ! fp = open(pathname) stuff = (ext, "r", imp.PY_SOURCE) self.load_module(name, fp, pathname, stuff) --- 124,128 ---- dir, name = os.path.split(pathname) name, ext = os.path.splitext(name) ! fp = open(pathname, "U") stuff = (ext, "r", imp.PY_SOURCE) self.load_module(name, fp, pathname, stuff) From goodger@users.sourceforge.net Wed Nov 13 01:36:46 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Tue, 12 Nov 2002 17:36:46 -0800 Subject: [Python-checkins] python/nondist/peps pep2html.py,1.49,1.50 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv15470 Modified Files: pep2html.py Log Message: updated Index: pep2html.py =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** pep2html.py 12 Nov 2002 05:36:09 -0000 1.49 --- pep2html.py 13 Nov 2002 01:36:44 -0000 1.50 *************** *** 23,28 **** -l/--local ! Same as -i/--install, except run on the local machine. Use this when ! logged in to the python.org machine (creosote). -q/--quiet --- 23,28 ---- -l/--local ! Same as -i/--install, except install on the local machine. Use this ! when logged in to the python.org machine (creosote). -q/--quiet From goodger@users.sourceforge.net Wed Nov 13 01:37:04 2002 From: goodger@users.sourceforge.net (goodger@users.sourceforge.net) Date: Tue, 12 Nov 2002 17:37:04 -0800 Subject: [Python-checkins] python/nondist/peps pep-html-template,1.6,1.7 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv15639 Modified Files: pep-html-template Log Message: conform to XHTML spec Index: pep-html-template =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-html-template,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pep-html-template 12 Nov 2002 05:36:09 -0000 1.6 --- pep-html-template 13 Nov 2002 01:37:02 -0000 1.7 *************** *** 1,5 **** ! !