From python-dev@python.org Sun Oct 1 00:59:07 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 30 Sep 2000 16:59:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib mailbox.py,1.24,1.25 Message-ID: <200009302359.QAA26443@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26396/Lib Modified Files: mailbox.py Log Message: Add missing "s" from format string. This closes SourceForge patch #101714. Index: mailbox.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/mailbox.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** mailbox.py 2000/09/22 18:41:50 1.24 --- mailbox.py 2000/09/30 23:59:04 1.25 *************** *** 273,277 **** s = msg.getheader('subject') or "" d = msg.getheader('date') or "" ! print '-%20.20s %20.20 %-30.30s'%(f, d[5:], s) --- 273,277 ---- s = msg.getheader('subject') or "" d = msg.getheader('date') or "" ! print '-%20.20s %20.20s %-30.30s'%(f, d[5:], s) From python-dev@python.org Sun Oct 1 05:28:48 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 30 Sep 2000 21:28:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_b2.py,1.17,1.18 Message-ID: <200010010428.VAA06763@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv6740 Modified Files: test_b2.py Log Message: Added a zip() test where one of the arguments is an instance whose class has no __getitem__(). This raises an AttributeError. Index: test_b2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b2.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** test_b2.py 2000/09/19 14:42:09 1.17 --- test_b2.py 2000/10/01 04:28:43 1.18 *************** *** 291,294 **** --- 291,306 ---- if not exc: raise TestFailed, 'zip(None) - missing expected TypeError' + class G: + pass + exc = 0 + try: + zip(a, G()) + except AttributeError: + exc = 1 + except: + e = sys.exc_info()[0] + raise TestFailed, 'zip(a, b) - b instance w/o __getitem__' + if not exc: + raise TestFailed, 'zip(a, b) - missing expected AttributeError' From python-dev@python.org Sun Oct 1 18:50:50 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 1 Oct 2000 10:50:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.23,2.24 Message-ID: <200010011750.KAA15187@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv15121/Modules Modified Files: mmapmodule.c Log Message: my_getpagesize(): New function; returns the size of a page of memory. Versions are defined for Windows and Unix; the Unix flavor uses sysconf() to get the page size; this avoids the use of getpagesize(), which is deprecated and requires an additional library on some platforms (specifically, Reliant UNIX). This partially closes SourceForge bug #113797. Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** mmapmodule.c 2000/09/25 13:16:15 2.23 --- mmapmodule.c 2000/10/01 17:50:46 2.24 *************** *** 27,30 **** --- 27,37 ---- #ifdef MS_WIN32 #include + static int + my_getpagesize(void) + { + SYSTEM_INFO si; + GetSystemInfo(&si); + return si.dwPageSize; + } #endif *************** *** 39,42 **** --- 46,59 ---- #endif + #if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) + static int + my_getpagesize(void) + { + return sysconf(_SC_PAGESIZE); + } + #else + #define my_getpagesize getpagesize + #endif + #endif /* UNIX */ *************** *** 982,998 **** #endif - #ifdef UNIX PyDict_SetItemString (dict, "PAGESIZE", ! PyInt_FromLong( (long)getpagesize() ) ); ! #endif ! #ifdef MS_WIN32 ! { ! SYSTEM_INFO si; ! GetSystemInfo(&si); ! PyDict_SetItemString (dict, "PAGESIZE", ! PyInt_FromLong( si.dwPageSize ) ); ! } ! #endif /* MS_WIN32 */ ! } --- 999,1004 ---- #endif PyDict_SetItemString (dict, "PAGESIZE", ! PyInt_FromLong( (long)my_getpagesize() ) ); } From python-dev@python.org Sun Oct 1 18:52:04 2000 From: python-dev@python.org (Martin v. Löwis) Date: Sun, 1 Oct 2000 10:52:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-tk turtle.py,1.1,1.2 Message-ID: <200010011752.KAA16178@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory slayer.i.sourceforge.net:/tmp/cvs-serv15647 Modified Files: turtle.py Log Message: Don't rename Tkinter to Tk; closes bug 115714 Subclass Error from Exception. Index: turtle.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/turtle.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** turtle.py 1998/12/04 16:42:46 1.1 --- turtle.py 2000/10/01 17:52:01 1.2 *************** *** 3,8 **** from math import * # Also for export import Tkinter ! Tk = Tkinter ! Error = Exception class RawPen: --- 3,8 ---- from math import * # Also for export import Tkinter ! class Error(Exception): ! pass class RawPen: *************** *** 86,90 **** try: id = self._canvas.create_line(0, 0, 0, 0, fill=color) ! except Tk.TclError: raise Error, "bad color string: %s" % `color` self._color = color --- 86,90 ---- try: id = self._canvas.create_line(0, 0, 0, 0, fill=color) ! except Tkinter.TclError: raise Error, "bad color string: %s" % `color` self._color = color *************** *** 223,227 **** self._canvas.after(10) self._canvas.itemconfigure(item, arrow="none") ! except Tk.TclError: # Probably the window was closed! return --- 223,227 ---- self._canvas.after(10) self._canvas.itemconfigure(item, arrow="none") ! except Tkinter.TclError: # Probably the window was closed! return *************** *** 243,251 **** global _root, _canvas if _root is None: ! _root = Tk.Tk() _root.wm_protocol("WM_DELETE_WINDOW", self._destroy) if _canvas is None: # XXX Should have scroll bars ! _canvas = Tk.Canvas(_root, background="white") _canvas.pack(expand=1, fill="both") RawPen.__init__(self, _canvas) --- 243,251 ---- global _root, _canvas if _root is None: ! _root = Tkinter.Tk() _root.wm_protocol("WM_DELETE_WINDOW", self._destroy) if _canvas is None: # XXX Should have scroll bars ! _canvas = Tkinter.Canvas(_root, background="white") _canvas.pack(expand=1, fill="both") RawPen.__init__(self, _canvas) From python-dev@python.org Mon Oct 2 00:49:34 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 16:49:34 -0700 Subject: [Python-checkins] CVS: distutils/distutils util.py,1.52,1.53 Message-ID: <200010012349.QAA19410@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv19333 Modified Files: util.py Log Message: Tweaked 'byte_compile()' so it silently skips non-Python files, rather than blowing up. Index: util.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/util.py,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** util.py 2000/09/30 20:37:56 1.52 --- util.py 2000/10/01 23:49:30 1.53 *************** *** 298,304 **** verbose=1, dry_run=0, direct=None): ! """Byte-compile a collection of Python source files to either ! .pyc or .pyo files in the same directory. 'optimize' must be ! one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") --- 298,305 ---- verbose=1, dry_run=0, direct=None): ! """Byte-compile a collection of Python source files to either .pyc ! or .pyo files in the same directory. 'py_files' is a list of files ! to compile; any files that don't end in ".py" are silently skipped. ! 'optimize' must be one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") *************** *** 379,384 **** for file in py_files: if file[-3:] != ".py": ! raise ValueError, \ ! "invalid filename: %s doesn't end with '.py'" % `file` # Terminology from the py_compile module: --- 380,386 ---- for file in py_files: if file[-3:] != ".py": ! # This lets us be lazy and not filter filenames in ! # the "install_lib" command. ! continue # Terminology from the py_compile module: From python-dev@python.org Mon Oct 2 00:50:18 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 16:50:18 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install_lib.py,1.33,1.34 Message-ID: <200010012350.QAA19946@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv19830 Modified Files: install_lib.py Log Message: From 'run()', only call 'bytecompile()' if we actually have pure Python modules to compile. Index: install_lib.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_lib.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** install_lib.py 2000/09/30 20:39:09 1.33 --- install_lib.py 2000/10/01 23:50:13 1.34 *************** *** 58,62 **** # (Optionally) compile .py to .pyc ! if outfiles is not None: self.bytecompile(outfiles) --- 58,62 ---- # (Optionally) compile .py to .pyc ! if outfiles is not None and self.distribution.has_pure_modules(): self.bytecompile(outfiles) From python-dev@python.org Mon Oct 2 03:09:59 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 19:09:59 -0700 Subject: [Python-checkins] CVS: distutils/distutils util.py,1.53,1.54 Message-ID: <200010020209.TAA29860@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv29745 Modified Files: util.py Log Message: Remove the temporary byte-compilation script when we're done with it. Index: util.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/util.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -r1.53 -r1.54 *** util.py 2000/10/01 23:49:30 1.53 --- util.py 2000/10/02 02:09:55 1.54 *************** *** 370,373 **** --- 370,374 ---- cmd.insert(1, "-OO") spawn(cmd, verbose=verbose, dry_run=dry_run) + os.remove(script_name) # "Direct" byte-compilation: use the py_compile module to compile From python-dev@python.org Mon Oct 2 03:15:12 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 19:15:12 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install_lib.py,1.34,1.35 Message-ID: <200010020215.TAA02999@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv31207 Modified Files: install_lib.py Log Message: Finished the overhaul of byte-compilation options: there's now a 6-way choice between (compile, no-compile) * (optimize=0, optimize=1, optimize=2). Details: - added --no-compile option to complement --compile, which has been there for ages - changed --optimize (which never worked) to a value option, which expects 0, 1, or 2 - renamed 'bytecompile()' method to 'byte_compile()', and beefed it up to handle both 'compile' and 'optimize' options - fix '_bytecode_filenames()' to respect the new options Index: install_lib.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_lib.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** install_lib.py 2000/10/01 23:50:13 1.34 --- install_lib.py 2000/10/02 02:15:08 1.35 *************** *** 4,10 **** import sys, os, string from distutils.core import Command from distutils.dir_util import copy_tree - from distutils.util import byte_compile class install_lib (Command): --- 4,11 ---- import sys, os, string + from types import IntType from distutils.core import Command + from distutils.errors import DistutilsOptionError from distutils.dir_util import copy_tree class install_lib (Command): *************** *** 12,25 **** description = "install all Python modules (extensions and pure Python)" user_options = [ ('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ('force', 'f', "force installation (overwrite existing files)"), ! ('compile', 'c', "compile .py to .pyc"), ! ('optimize', 'o', "compile .py to .pyo (optimized)"), ('skip-build', None, "skip the build steps"), ] ! boolean_options = ['force', 'compile', 'optimize', 'skip-build'] --- 13,45 ---- description = "install all Python modules (extensions and pure Python)" + # The byte-compilation options are a tad confusing. Here are the + # possible scenarios: + # 1) no compilation at all (--no-compile --no-optimize) + # 2) compile .pyc only (--compile --no-optimize; default) + # 3) compile .pyc and "level 1" .pyo (--compile --optimize) + # 4) compile "level 1" .pyo only (--no-compile --optimize) + # 5) compile .pyc and "level 2" .pyo (--compile --optimize-more) + # 6) compile "level 2" .pyo only (--no-compile --optimize-more) + # + # The UI for this is two option, 'compile' and 'optimize'. + # 'compile' is strictly boolean, and only decides whether to + # generate .pyc files. 'optimize' is three-way (0, 1, or 2), and + # decides both whether to generate .pyo files and what level of + # optimization to use. + user_options = [ ('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ('force', 'f', "force installation (overwrite existing files)"), ! ('compile', 'c', "compile .py to .pyc [default]"), ! ('no-compile', None, "don't compile .py files"), ! ('optimize=', 'O', ! "also compile with optimization: -O1 for \"python -O\", " ! "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), ('skip-build', None, "skip the build steps"), ] ! boolean_options = ['force', 'compile', 'skip-build'] ! negative_opt = {'no-compile' : 'compile'} *************** *** 29,34 **** self.build_dir = None self.force = 0 ! self.compile = 1 ! self.optimize = 1 self.skip_build = None --- 49,54 ---- self.build_dir = None self.force = 0 ! self.compile = None ! self.optimize = None self.skip_build = None *************** *** 42,50 **** ('install_lib', 'install_dir'), ('force', 'force'), ! ('compile_py', 'compile'), ! ('optimize_py', 'optimize'), ('skip_build', 'skip_build'), ) def run (self): --- 62,84 ---- ('install_lib', 'install_dir'), ('force', 'force'), ! ('compile', 'compile'), ! ('optimize', 'optimize'), ('skip_build', 'skip_build'), ) + if self.compile is None: + self.compile = 1 + if self.optimize is None: + self.optimize = 0 + + print "install_lib: compile=%s, optimize=%s" % \ + (`self.compile`, `self.optimize`) + if type(self.optimize) is not IntType: + try: + self.optimize = int(self.optimize) + assert 0 <= self.optimize <= 2 + except (ValueError, AssertionError): + raise DistutilsOptionError, "optimize must be 0, 1, or 2" + def run (self): *************** *** 59,63 **** # (Optionally) compile .py to .pyc if outfiles is not None and self.distribution.has_pure_modules(): ! self.bytecompile(outfiles) # run () --- 93,97 ---- # (Optionally) compile .py to .pyc if outfiles is not None and self.distribution.has_pure_modules(): ! self.byte_compile(outfiles) # run () *************** *** 82,90 **** return return outfiles ! def bytecompile (self, files): ! byte_compile(files, ! force=self.force, ! verbose=self.verbose, dry_run=self.dry_run) --- 116,139 ---- return return outfiles + + def byte_compile (self, files): + from distutils.util import byte_compile ! # Get the "--root" directory supplied to the "install" command, ! # and use it as a prefix to strip off the purported filename ! # encoded in bytecode files. This is far from complete, but it ! # should at least generate usable bytecode in RPM distributions. ! install_root = self.get_finalized_command('install').root ! ! if self.compile: ! byte_compile(files, optimize=0, ! force=self.force, ! prefix=install_root, ! verbose=self.verbose, dry_run=self.dry_run) ! if self.optimize > 0: ! byte_compile(files, optimize=self.optimize, ! force=self.force, ! prefix=install_root, ! verbose=self.verbose, dry_run=self.dry_run) *************** *** 112,117 **** bytecode_files = [] for py_file in py_filenames: ! bytecode = py_file + (__debug__ and "c" or "o") ! bytecode_files.append(bytecode) return bytecode_files --- 161,168 ---- bytecode_files = [] for py_file in py_filenames: ! if self.compile: ! bytecode_files.append(py_file + "c") ! if self.optmize > 0: ! bytecode_files.append(py_file + "o") return bytecode_files From python-dev@python.org Mon Oct 2 03:16:10 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 19:16:10 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install.py,1.50,1.51 Message-ID: <200010020216.TAA03928@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv3827 Modified Files: install.py Log Message: Added --compile, --optimize options so users have an easy way to instruct the "install_lib" command from the command-line. Index: install.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install.py,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** install.py 2000/09/30 18:27:54 1.50 --- install.py 2000/10/02 02:16:04 1.51 *************** *** 91,94 **** --- 91,103 ---- "installation directory for data files"), + # Byte-compilation options -- see install_lib.py for details, as + # these are duplicated from there (but only install_lib does + # anything with them). + ('compile', 'c', "compile .py to .pyc [default]"), + ('no-compile', None, "don't compile .py files"), + ('optimize=', 'O', + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), + # Miscellaneous control options ('force', 'f', *************** *** 135,138 **** --- 144,150 ---- self.install_scripts = None self.install_data = None + + self.compile = None + self.optimize = None # These two are for putting non-packagized distributions into their From python-dev@python.org Mon Oct 2 03:19:07 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 19:19:07 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command build_py.py,1.32,1.33 Message-ID: <200010020219.TAA06707@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv5068 Modified Files: build_py.py Log Message: Added the ability to do byte-compilation at build time, currently off by default (since compiling at install time works just fine). Details: - added 'compile' and 'optimize' options - added 'byte_compile()' method - changed 'get_outputs()' so it includes bytecode files A lot of the code added is very similar to code in install_lib.py; would be nice to factor it out further. Index: build_py.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build_py.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** build_py.py 2000/09/30 18:27:54 1.32 --- build_py.py 2000/10/02 02:19:04 1.33 *************** *** 21,28 **** user_options = [ ('build-lib=', 'd', "directory to \"build\" (copy) to"), ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] ! boolean_options = ['force'] --- 21,34 ---- user_options = [ ('build-lib=', 'd', "directory to \"build\" (copy) to"), + ('compile', 'c', "compile .py to .pyc"), + ('no-compile', None, "don't compile .py files [default]"), + ('optimize=', 'O', + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] ! boolean_options = ['compile', 'force'] ! negative_opt = {'no-compile' : 'compile'} *************** *** 32,35 **** --- 38,43 ---- self.package = None self.package_dir = None + self.compile = 0 + self.optimize = 0 self.force = None *************** *** 45,48 **** --- 53,64 ---- self.package_dir = self.distribution.package_dir + # Ick, copied straight from install_lib.py (fancy_getopt needs a + # type system! Hell, *everything* needs a type system!!!) + if type(self.optimize) is not IntType: + try: + self.optimize = int(self.optimize) + assert 0 <= self.optimize <= 2 + except (ValueError, AssertionError): + raise DistutilsOptionError, "optimize must be 0, 1, or 2" def run (self): *************** *** 88,91 **** --- 104,109 ---- self.build_packages() + self.byte_compile(self.get_outputs(include_bytecode=0)) + # run () *************** *** 285,295 **** ! def get_outputs (self): modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: package = string.split(package, '.') ! outputs.append(self.get_module_outfile(self.build_lib, ! package, module)) return outputs --- 303,319 ---- ! def get_outputs (self, include_bytecode=1): modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: package = string.split(package, '.') ! filename = self.get_module_outfile(self.build_lib, package, module) ! outputs.append(filename) ! if include_bytecode: ! if self.compile: ! outputs.append(filename + "c") ! if self.optimize > 0: ! outputs.append(filename + "o") ! return outputs *************** *** 348,351 **** # build_packages () ! # class build_py --- 372,397 ---- # build_packages () ! ! ! def byte_compile (self, files): ! from distutils.util import byte_compile ! prefix = self.build_lib ! if prefix[-1] != os.sep: ! prefix = prefix + os.sep ! ! # XXX this code is essentially the same as the 'byte_compile() ! # method of the "install_lib" command, except for the determination ! # of the 'prefix' string. Hmmm. ! ! if self.compile: ! byte_compile(files, optimize=0, ! force=self.force, ! prefix=prefix, ! verbose=self.verbose, dry_run=self.dry_run) ! if self.optimize > 0: ! byte_compile(files, optimize=self.optimize, ! force=self.force, ! prefix=prefix, ! verbose=self.verbose, dry_run=self.dry_run) ! # class build_py From python-dev@python.org Mon Oct 2 03:25:53 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 19:25:53 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install_lib.py,1.35,1.36 Message-ID: <200010020225.TAA13911@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv13852 Modified Files: install_lib.py Log Message: Typo fix. Index: install_lib.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_lib.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** install_lib.py 2000/10/02 02:15:08 1.35 --- install_lib.py 2000/10/02 02:25:51 1.36 *************** *** 163,167 **** if self.compile: bytecode_files.append(py_file + "c") ! if self.optmize > 0: bytecode_files.append(py_file + "o") --- 163,167 ---- if self.compile: bytecode_files.append(py_file + "c") ! if self.optimize > 0: bytecode_files.append(py_file + "o") From python-dev@python.org Mon Oct 2 04:36:22 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 1 Oct 2000 20:36:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib liboperator.tex,1.15,1.16 Message-ID: <200010020336.UAA24093@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24071/lib Modified Files: liboperator.tex Log Message: Add documentation and warnings for the isCallable(), isMappingType(), isNumberType(), and isSequenceType() functions. This closes SourceForge bug #115789. Index: liboperator.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liboperator.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** liboperator.tex 2000/09/17 16:10:25 1.15 --- liboperator.tex 2000/10/02 03:36:18 1.16 *************** *** 160,163 **** --- 160,213 ---- \end{funcdesc} + The \module{operator} also defines a few predicates to test the type + of objects. \strong{Note:} Be careful not to misinterpret the + results of these functions; only \function{isCallable()} has any + measure of reliability with instance objects. For example: + + \begin{verbatim} + >>> class C: + ... pass + ... + >>> import operator + >>> o = C() + >>> operator.isMappingType(o) + 1 + \end{verbatim} + + \begin{funcdesc}{isCallable}{o} + \deprecated{2.0}{Use the \function{callable()} built-in function instead.} + Returns true if the object \var{o} can be called like a function, + otherwise it returns false. True is returned for functions, bound and + unbound methods, class objects, and instance objects which support the + \method{__call__()} method. + \end{funcdesc} + + \begin{funcdesc}{isMappingType}{o} + Returns true if the object \var{o} supports the mapping interface. + This is true for dictionaries and all instance objects. + \strong{Warning:} There is no reliable way to test if an instance + supports the complete mapping protocol since the interface itself is + ill-defined. This makes this test less useful than it otherwise might + be. + \end{funcdesc} + + \begin{funcdesc}{isNumberType}{o} + Returns true if the object \var{o} represents a number. This is true + for all numeric types implemented in C, and for all instance objects. + \strong{Warning:} There is no reliable way to test if an instance + supports the complete numeric interface since the interface itself is + ill-defined. This makes this test less useful than it otherwise might + be. + \end{funcdesc} + + \begin{funcdesc}{isSequenceType}{o} + Returns true if the object \var{o} supports the sequence protocol. + This returns true for all objects which define sequence methods in C, + and for all instance objects. \strong{Warning:} There is no reliable + way to test if an instance supports the complete sequence interface + since the interface itself is ill-defined. This makes this test less + useful than it otherwise might be. + \end{funcdesc} + Example: Build a dictionary that maps the ordinals from \code{0} to From python-dev@python.org Mon Oct 2 04:40:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 1 Oct 2000 20:40:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib webbrowser.py,1.3,1.4 Message-ID: <200010020340.UAA26110@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26061/Lib Modified Files: webbrowser.py Log Message: Do not set Konquerer to be the default browser if $KDEDIR is set -- some Linux distributions which provide both KDE and Gnome set this environment variable even if the user is not using KDE. We do *not* want to start Konquerer if KDE is not running unless the user actually tells us to! Index: webbrowser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/webbrowser.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** webbrowser.py 2000/09/22 10:05:52 1.3 --- webbrowser.py 2000/10/02 03:40:51 1.4 *************** *** 197,203 **** DEFAULT_BROWSER = "windows-default" elif os.environ.get("DISPLAY"): ! if os.environ.get("KDEDIR"): ! DEFAULT_BROWSER = "kfm" ! elif _iscommand("netscape"): DEFAULT_BROWSER = "netscape" --- 197,201 ---- DEFAULT_BROWSER = "windows-default" elif os.environ.get("DISPLAY"): ! if _iscommand("netscape"): DEFAULT_BROWSER = "netscape" From python-dev@python.org Mon Oct 2 04:42:46 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 1 Oct 2000 20:42:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libwebbrowser.tex,1.2,1.3 Message-ID: <200010020342.UAA26740@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26715/Doc/lib Modified Files: libwebbrowser.tex Log Message: Minor usage fix. Add a note that some way of reliably detecting the use of KDE would be really nice. Index: libwebbrowser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwebbrowser.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libwebbrowser.tex 2000/07/07 17:08:40 1.2 --- libwebbrowser.tex 2000/10/02 03:42:43 1.3 *************** *** 12,16 **** Under \UNIX, graphical browsers are preferred under X11, but text-mode ! browser will be used if graphical browsers are not available or an X11 display isn't available. If text-mode browsers are used, the calling process will block until the user exits the browser. --- 12,16 ---- Under \UNIX, graphical browsers are preferred under X11, but text-mode ! browsers will be used if graphical browsers are not available or an X11 display isn't available. If text-mode browsers are used, the calling process will block until the user exits the browser. *************** *** 70,75 **** \begin{description} \item[(1)] ! ``Konquerer'' is the file manager for the KDE desktop environment, and ! only makes sense to use if KDE is running. \item[(2)] --- 70,77 ---- \begin{description} \item[(1)] ! ``Konquerer'' is the file manager for the KDE desktop environment for ! UNIX, and only makes sense to use if KDE is running. Some way of ! reliably detecting KDE would be nice; the \envvar{KDEDIR} variable is ! not sufficient. \item[(2)] From python-dev@python.org Mon Oct 2 11:22:02 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 2 Oct 2000 03:22:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser parser.c,2.17,2.18 Message-ID: <200010021022.DAA29796@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv29765 Modified Files: parser.c Log Message: Fix a bug in stack overflow error handling. This fixes half of Bug #115555. The error from s_push() on stack overflow was -1, which was passed through unchanged by push(), but not tested for by push()'s caller -- which only expected positive error codes. Fixed by changing s_push() to return E_NOMEM on stack overflow. (Not quite the proper error code either, but I can't be bothered adding a new E_STACKOVERFLOW error code in all the right places.) Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** parser.c 2000/09/01 23:29:28 2.17 --- parser.c 2000/10/02 10:21:59 2.18 *************** *** 41,45 **** if (s->s_top == s->s_base) { fprintf(stderr, "s_push: parser stack overflow\n"); ! return -1; } top = --s->s_top; --- 41,45 ---- if (s->s_top == s->s_base) { fprintf(stderr, "s_push: parser stack overflow\n"); ! return E_NOMEM; } top = --s->s_top; From python-dev@python.org Mon Oct 2 14:43:36 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 2 Oct 2000 06:43:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.70,1.71 Message-ID: <200010021343.GAA00805@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv661/Misc Modified Files: NEWS Log Message: typo Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -r1.70 -r1.71 *** NEWS 2000/09/29 17:54:40 1.70 --- NEWS 2000/10/02 13:43:33 1.71 *************** *** 126,130 **** - sre: Added experimental expand() method to match objects. Does not ! user buffer interface on Unicode strings. Does not hang if group id is followed by whitespace. --- 126,130 ---- - sre: Added experimental expand() method to match objects. Does not ! use buffer interface on Unicode strings. Does not hang if group id is followed by whitespace. From python-dev@python.org Mon Oct 2 15:43:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 07:43:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/perl python.perl,1.86,1.87 Message-ID: <200010021443.HAA14082@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory slayer.i.sourceforge.net:/tmp/cvs-serv14028/perl Modified Files: python.perl Log Message: make_icon_filename(): Convenience function to turn a partial filename into a usable filename using $ICONSERVER and $IMAGE_TYPE as needed. get_link_icon(): Function to examine a URL and return the string to use to insert an icon if the link points off-site, if needed and $OFF_SITE_LINK_ICON is set. Adjusted appropriate places to use these new functions. Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -r1.86 -r1.87 *** python.perl 2000/09/22 17:05:04 1.86 --- python.perl 2000/10/02 14:43:38 1.87 *************** *** 9,12 **** --- 9,14 ---- package main; + use File::Basename; + sub next_argument{ *************** *** 24,28 **** --- 26,54 ---- } + sub make_icon_filename($){ + my($myname, $mydir, $myext) = fileparse(@_[0], '\..*'); + chop $mydir; + if ($mydir eq '.') { + $mydir = $ICONSERVER; + } + $myext = ".$IMAGE_TYPE" + unless $myext; + return "$mydir$dd$myname$myext"; + } + $OFF_SITE_LINK_ICON = ''; + + sub get_link_icon($){ + my $url = @_[0]; + if ($OFF_SITE_LINK_ICON && ($url =~ /^[-a-zA-Z0-9.]+:/)) { + # absolute URL; assume it points off-site + my $icon = make_icon_filename($OFF_SITE_LINK_ICON); + return (" [off-site link]"); + } + return ''; + } + # This is a fairly simple hack; it supports \let when it is used to create # (or redefine) a macro to exactly be some other macro: \let\newname=\oldname. *************** *** 212,217 **** local($_) = @_; my $newsgroup = next_argument(); my $stuff = "" ! . "$newsgroup"; return $stuff . $_; } --- 238,244 ---- local($_) = @_; my $newsgroup = next_argument(); + my $icon = get_link_icon("news:$newsgroup"); my $stuff = "" ! . "$newsgroup$icon"; return $stuff . $_; } *************** *** 234,239 **** local($_) = @_; my $url = next_argument(); $url =~ s/~/~/g; ! return "$url" . $_; } --- 261,267 ---- local($_) = @_; my $url = next_argument(); + my $icon = get_link_icon($url); $url =~ s/~/~/g; ! return "$url$icon" . $_; } *************** *** 256,264 **** my $id = "rfcref-" . ++$global{'max_id'}; my $href = get_pep_url($rfcnumber); # Save the reference my $nstr = gen_index_id("Python Enhancement Proposals!PEP $rfcnumber", ''); $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); ! return ("PEP $rfcnumber" ! . $_); } --- 284,293 ---- my $id = "rfcref-" . ++$global{'max_id'}; my $href = get_pep_url($rfcnumber); + my $icon = get_link_icon($href); # Save the reference my $nstr = gen_index_id("Python Enhancement Proposals!PEP $rfcnumber", ''); $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); ! return ("PEP $rfcnumber" ! . "$icon" . $_); } *************** *** 273,281 **** my $id = "rfcref-" . ++$global{'max_id'}; my $href = get_rfc_url($rfcnumber); # Save the reference my $nstr = gen_index_id("RFC!RFC $rfcnumber", ''); $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); ! return ("RFC $rfcnumber" ! . $_); } --- 302,311 ---- my $id = "rfcref-" . ++$global{'max_id'}; my $href = get_rfc_url($rfcnumber); + my $icon = get_link_icon($href); # Save the reference my $nstr = gen_index_id("RFC!RFC $rfcnumber", ''); $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); ! return ("RFC $rfcnumber" ! . "$icon" . $_); } *************** *** 284,287 **** --- 314,318 ---- my $url = next_optional_argument(); my $title = next_argument(); + my $icon = get_link_icon($url); my $repl = ''; if ($url) { *************** *** 289,293 **** . " href='$url'\n" . " title='$title'\n" ! . " >$title"); } else { --- 320,324 ---- . " href='$url'\n" . " title='$title'\n" ! . " >$title$icon"); } else { *************** *** 633,637 **** $REFCOUNTS_LOADED = 1; - use File::Basename; my $myname, $mydir, $myext; ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*'); --- 664,667 ---- *************** *** 1254,1267 **** } - use File::Basename; - sub make_my_titlegraphic() { ! my($myname, $mydir, $myext) = fileparse($TITLE_PAGE_GRAPHIC, '\..*'); ! chop $mydir; ! if ($mydir eq '.') { ! $mydir = $ICONSERVER; ! } ! $myext = ".$IMAGE_TYPE" ! unless $myext; my $graphic = "' . "\n
$what $rfcnum, $title:" . "\n
$text\n " . $_; --- 1477,1485 ---- my $text = next_argument(); my $url = get_rfc_url($rfcnum); + my $icon = get_link_icon($url); return '
' . "\n
$what $rfcnum, $title$icon:" . "\n
$text\n
" . $_; *************** *** 1476,1483 **** my $title = next_argument(); my $text = next_argument(); if ($url) { return '
' . "\n
$title" . "\n
$text\n
" . $_; --- 1499,1507 ---- my $title = next_argument(); my $text = next_argument(); + my $icon = get_link_icon($url); if ($url) { return '
' . "\n
$title$icon" . "\n
$text\n
" . $_; *************** *** 1494,1500 **** my $url = next_argument(); my $text = next_argument(); return '
' . "\n
$url" . "\n
$text\n
" . $_; --- 1518,1525 ---- my $url = next_argument(); my $text = next_argument(); + my $icon = get_link_icon($url); return '
' . "\n
$url$icon" . "\n
$text\n
" . $_; From python-dev@python.org Mon Oct 2 15:52:42 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 07:52:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.63,1.64 Message-ID: <200010021452.HAA20300@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv20148/Misc Modified Files: ACKS Log Message: Added Daniel Dittmar, for helping get the configuration working for Reliant UNIX. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -r1.63 -r1.64 *** ACKS 2000/09/25 14:46:26 1.63 --- ACKS 2000/10/02 14:52:31 1.64 *************** *** 81,84 **** --- 81,85 ---- Roger Dev Toby Dickenson + Daniel Dittmar Jaromir Dolecek Fred Drake From python-dev@python.org Mon Oct 2 16:53:12 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 2 Oct 2000 08:53:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.32,2.33 Message-ID: <200010021553.IAA01251@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv1200 Modified Files: readline.c Log Message: Supporting rl_library_version is more trouble than it's worth -- readline doesn't have it before readline 2.2 and there's no compile-time way to find out which readline version is in use. Sigh. GNU readline sucks. Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** readline.c 2000/09/20 20:24:21 2.32 --- readline.c 2000/10/02 15:53:08 2.33 *************** *** 39,43 **** extern int history_truncate_file(char *, int); extern Function *rl_event_hook; - extern char *rl_library_version; #endif --- 39,42 ---- *************** *** 496,509 **** initreadline(void) { ! PyObject *m, *d, *v; m = Py_InitModule4("readline", readline_methods, doc_module, (PyObject *)NULL, PYTHON_API_VERSION); - - d = PyModule_GetDict(m); - v = PyString_FromString(rl_library_version); - PyDict_SetItemString(d, "library_version", v); - Py_XDECREF(v); - if (isatty(fileno(stdin))) { PyOS_ReadlineFunctionPointer = call_readline; --- 495,502 ---- initreadline(void) { ! PyObject *m; m = Py_InitModule4("readline", readline_methods, doc_module, (PyObject *)NULL, PYTHON_API_VERSION); if (isatty(fileno(stdin))) { PyOS_ReadlineFunctionPointer = call_readline; From python-dev@python.org Mon Oct 2 18:23:19 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 2 Oct 2000 19:23:19 +0200 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.32,2.33 In-Reply-To: <200010021553.IAA01251@slayer.i.sourceforge.net>; from gvanrossum@users.sourceforge.net on Mon, Oct 02, 2000 at 08:53:12AM -0700 References: <200010021553.IAA01251@slayer.i.sourceforge.net> Message-ID: <20001002192319.C12812@xs4all.nl> On Mon, Oct 02, 2000 at 08:53:12AM -0700, Guido van Rossum wrote: > Update of /cvsroot/python/python/dist/src/Modules > In directory slayer.i.sourceforge.net:/tmp/cvs-serv1200 > Modified Files: > readline.c > Log Message: > Supporting rl_library_version is more trouble than it's worth -- > readline doesn't have it before readline 2.2 and there's no > compile-time way to find out which readline version is in use. But we can detect whether readline has rl_library_version during runtime, and #ifdef it ;) I think the readline version info is useful enough to warrant the extra #define and #ifdef... I can whip it up tonight, if the autoconf check is desired ;P -- Thomas Wouters Hi! I'm a .signature virus! copy me into your .signature file to help me spread! From python-dev@python.org Mon Oct 2 18:36:30 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 10:36:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html style.css,1.10,1.11 Message-ID: <200010021736.KAA19014@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv18971 Modified Files: style.css Log Message: Minor stylesheet nit. Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** style.css 2000/09/28 20:41:16 1.10 --- style.css 2000/10/02 17:36:27 1.11 *************** *** 63,67 **** .tableheader td { background-color: #99ccff; } ! .tableheader th { background-color: #99ccff; } .refcount-info { font-style: italic } --- 63,68 ---- .tableheader td { background-color: #99ccff; } ! .tableheader th { background-color: #99ccff; ! font-family: avantgarde, sans-serif; } .refcount-info { font-style: italic } From python-dev@python.org Mon Oct 2 21:56:33 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 13:56:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libzipfile.tex,1.4,1.5 Message-ID: <200010022056.NAA15622@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15558/lib Modified Files: libzipfile.tex Log Message: Substantially revised documentation for the zipfile module, partially based on revised text from Jim Ahlstrom . This closes SourceForge bug #115681. Index: libzipfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzipfile.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libzipfile.tex 2000/09/30 00:11:45 1.4 --- libzipfile.tex 2000/10/02 20:56:30 1.5 *************** *** 12,17 **** The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ! ZIP file. The available attributes of this module are: --- 12,23 ---- The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ! ZIP file. Any advanced use of this module will require an ! understanding of the format, as defined in ! \citetitle[http://www.pkware.com/appnote.html]{PKZIP Application ! Note}. + This module does not currently handle ZIP files which have appended + comments, or multi-disk ZIP files. + The available attributes of this module are: *************** *** 24,28 **** \end{datadesc} ! \begin{classdesc}{ZipFile}{...} The class for reading and writing ZIP files. See ``\citetitle{ZipFile Objects}'' (section \ref{zipfile-objects}) for --- 30,34 ---- \end{datadesc} ! \begin{classdesc}{ZipFile}{\unspecified} The class for reading and writing ZIP files. See ``\citetitle{ZipFile Objects}'' (section \ref{zipfile-objects}) for *************** *** 30,33 **** --- 36,55 ---- \end{classdesc} + \begin{classdesc}{PyZipFile}{\unspecified} + Class for creating ZIP archives containing Python libraries. + \end{classdesc} + + \begin{classdesc}{ZipInfo}{\optional{filename\optional{, date_time}}} + Class used the represent infomation about a member of an archive. + Instances of this class are returned by the \method{getinfo()} and + \method{listinfo()} methods of \class{ZipFile} objects. Most users + of the \module{zipfile} module will not need to create these, but + only use those created by this module. + \var{filename} should be the full name of the archive member, and + \var{date_time} should be a tuple containing six fields which + describe the time of the last modification to the file; the fields + are described in section \ref{zipinfo-objects}, ``ZipInfo Objects.'' + \end{classdesc} + \begin{funcdesc}{is_zipfile}{path} Returns true if \var{path} is a valid ZIP file based on its magic *************** *** 36,57 **** \end{funcdesc} - \begin{funcdesc}{zip2date}{zdate} - Return \code{(\var{year}, \var{month}, \var{day})} for a ZIP date - code. - \end{funcdesc} - - \begin{funcdesc}{zip2time}{ztime} - Return \code{(\var{hour}, \var{minute}, \var{second})} for a ZIP - time code. - \end{funcdesc} - - \begin{funcdesc}{date2zip}{year, month, day} - Return a ZIP date code. - \end{funcdesc} - - \begin{funcdesc}{time2zip}{hour, minute, second} - Return a ZIP time code. - \end{funcdesc} - \begin{datadesc}{ZIP_STORED} The numeric constant (\code{0}) for an uncompressed archive member. --- 58,61 ---- *************** *** 87,93 **** --- 91,99 ---- archive is appended to the file. This is meant for adding a ZIP archive to another file, such as \file{python.exe}. Using + \begin{verbatim} cat myzip.zip >> python.exe \end{verbatim} + also works, and at least \program{WinZip} can read such files. \var{compression} is the ZIP compression method to use when writing *************** *** 98,129 **** \end{classdesc} ! XXX explain the "extra" string for the ZIP format ! ! \begin{memberdesc}{TOC} ! A read-only dictionary whose keys are the names in the archive, and ! whose values are tuples as follows: ! ! \begin{tableii}{c|l}{code}{Index}{Meaning} ! \lineii{0}{File data seek offset} ! \lineii{1}{ZIP file "extra" data as a string} ! \lineii{2}{ZIP file bit flags} ! \lineii{3}{ZIP file compression type} ! \lineii{4}{File modification time in DOS format} ! \lineii{5}{File modification date in DOS format} ! \lineii{6}{The CRC-32 of the uncompressed data} ! \lineii{7}{The compressed size of the file} ! \lineii{8}{The uncompressed size of the file} ! \end{tableii} ! \end{memberdesc} ! ! The class ZipFile has these methods: ! \begin{methoddesc}{listdir}{} ! Return a list of names in the archive. Equivalent to ! \code{\var{zipfile}.TOC.keys()}. \end{methoddesc} \begin{methoddesc}{printdir}{} ! Print a table of contents for the archive to stdout. \end{methoddesc} --- 104,119 ---- \end{classdesc} ! \begin{methoddesc}{namelist}{} ! Return a list of archive members by name. ! \end{methoddesc} ! \begin{methoddesc}{infolist}{} ! Return a list containing a \class{ZipInfo} object for each member of ! the archive. The objects are in the same order as their entries in ! the actual ZIP file on disk if an existing archive was opened. \end{methoddesc} \begin{methoddesc}{printdir}{} ! Print a table of contents for the archive to \code{sys.stdout}. \end{methoddesc} *************** *** 133,159 **** \end{methoddesc} ! \begin{methoddesc}{writestr}{bytes, arcname, year, month, day, hour, ! minute, second\optional{, extra}} Write the string \var{bytes} and the other data to the archive, and ! give the archive member the name \var{arcname}. \var{extra} is the ! ZIP extra data string. The archive must be opened with mode ! \code{'w'} or \code{'a'}. \end{methoddesc} ! \begin{methoddesc}{write}{filename, arcname\optional{, extra}} Write the file named \var{filename} to the archive, giving it the ! archive name \var{arcname}. \var{extra} is the ZIP extra data ! string. The archive must be open with mode \code{'w'} or ! \code{'a'}. \end{methoddesc} ! \begin{methoddesc}{writepy}{pathname\optional{, basename}} Search for files \file{*.py} and add the corresponding file to the archive. The corresponding file is a \file{*.pyo} file if available, else a \file{*.pyc} file, compiling if necessary. If the pathname is a file, the filename must end with \file{.py}, and just ! the (corresponding \file{*.py[oc]}) file is added at the top level (no path information). If it is a directory, and the directory is ! not a package directory, then all the files \file{*.py[oc]} are added at the top level. If the directory is a package directory, then all \file{*.py[oc]} are added under the package name as a file --- 123,173 ---- \end{methoddesc} ! \begin{methoddesc}{testzip}{} ! Read all the files in the archive and check their CRC's. Return the ! name of the first bad file, or else return \code{None}. ! \end{methoddesc} ! ! \begin{methoddesc}{writestr}{bytes, arcname, year, month, day, ! hour, minute, second} Write the string \var{bytes} and the other data to the archive, and ! give the archive member the name \var{arcname}. The archive must be ! opened with mode \code{'w'} or \code{'a'}. \end{methoddesc} ! \begin{methoddesc}{write}{filename, arcname} Write the file named \var{filename} to the archive, giving it the ! archive name \var{arcname}. The archive must be open with mode ! \code{'w'} or \code{'a'}. ! \end{methoddesc} ! ! \begin{methoddesc}{close}{} ! Close the archive file. You must call \method{close()} before ! exiting your program or essential records will not be written. \end{methoddesc} + ! The following data attribute is also available: ! ! \begin{memberdesc}{debug} ! The level of debug output to use. This may be set from \code{0} ! (the default, no output) to \code{3} (the most output). Debugging ! information is written to \code{sys.stdout}. ! \end{memberdesc} ! ! ! \subsection{PyZipFile Objects \label{pyzipfile-objects}} ! ! The \class{PyZipFile} constructor takes the same parameters as the ! \class{ZipFile} constructor. Instances have one method in addition to ! those of \class{ZipFile} objects. ! ! \begin{methoddesc}[PyZipFile]{writepy}{pathname\optional{, basename}} Search for files \file{*.py} and add the corresponding file to the archive. The corresponding file is a \file{*.pyo} file if available, else a \file{*.pyc} file, compiling if necessary. If the pathname is a file, the filename must end with \file{.py}, and just ! the (corresponding \file{*.py[co]}) file is added at the top level (no path information). If it is a directory, and the directory is ! not a package directory, then all the files \file{*.py[co]} are added at the top level. If the directory is a package directory, then all \file{*.py[oc]} are added under the package name as a file *************** *** 172,177 **** \end{methoddesc} ! \begin{methoddesc}{close}{} ! Close the archive file. You must call \method{close()} before ! exiting your program or essential records will not be written. ! \end{methoddesc} --- 186,281 ---- \end{methoddesc} ! ! \subsection{ZipInfo Objects \label{zipinfo-objects}} ! ! Instances of the \class{ZipInfo} class are returned by the ! \method{getinfo()} and \method{listinfo()} methods of ! \class{ZipFile} objects. Each object stores information about a ! single member of the ZIP archive. ! ! Instances have the following attributes: ! ! \begin{memberdesc}[ZipInfo]{filename} ! Name of the file in the archive. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{date_time} ! The time and date of the last modification to to the archive ! member. This is a tuple of six values: ! ! \begin{tableii}{c|l}{code}{Index}{Value} ! \lineii{0}{Year} ! \lineii{1}{Month (one-based)} ! \lineii{2}{Day of month (one-based)} ! \lineii{3}{Hours (zero-based)} ! \lineii{4}{Minutes (zero-based)} ! \lineii{5}{Seconds (zero-based)} ! \end{tableii} ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{compress_type} ! Type of compression for the archive member. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{comment} ! Comment for the individual archive member. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{extra} ! Expansion field data. The ! \citetitle[http://www.pkware.com/appnote.html]{PKZIP Application ! Note} contains some comments on the internal structure of the data ! contained in this string. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{create_system} ! System which created ZIP archive. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{create_version} ! PKZIP version which created ZIP archive. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{extract_version} ! PKZIP version needed to extract archive. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{reserved} ! Must be zero. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{flag_bits} ! ZIP flag bits. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{volume} ! Volume number of file header. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{internal_attr} ! Internal attributes. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{external_attr} ! External file attributes. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{header_offset} ! Byte offset to the file header. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{file_offset} ! Byte offset to the start of the file data. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{CRC} ! CRC-32 of the uncompressed file. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{compress_size} ! Size of the compressed data. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{file_size} ! Size of the uncompressed file. ! \end{memberdesc} From python-dev@python.org Mon Oct 2 22:14:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 14:14:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib zipfile.py,1.3,1.4 Message-ID: <200010022114.OAA30971@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30928 Modified Files: zipfile.py Log Message: Delay import of py_compile until needed, since is is only used by the PyZipFile class. End sentences in docstrings with periods. Reformat docstrings to be more similar to those of other modules. Index: zipfile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/zipfile.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** zipfile.py 2000/09/29 20:44:48 1.3 --- zipfile.py 2000/10/02 21:14:52 1.4 *************** *** 1,8 **** ! "Read and write ZIP files" # Written by James C. Ahlstrom jim@interet.com # All rights transferred to CNRI pursuant to the Python contribution agreement import struct, os, time ! import binascii, py_compile try: --- 1,8 ---- ! "Read and write ZIP files." # Written by James C. Ahlstrom jim@interet.com # All rights transferred to CNRI pursuant to the Python contribution agreement import struct, os, time ! import binascii try: *************** *** 28,35 **** stringFileHeader = "PK\003\004" # magic number for file header def is_zipfile(filename): """Quickly see if file is a ZIP file by checking the magic number. ! Will not accept a ZIP archive with an ending comment.""" try: fpin = open(filename, "rb") --- 28,37 ---- stringFileHeader = "PK\003\004" # magic number for file header + def is_zipfile(filename): """Quickly see if file is a ZIP file by checking the magic number. ! Will not accept a ZIP archive with an ending comment. ! """ try: fpin = open(filename, "rb") *************** *** 42,47 **** pass class ZipInfo: ! "Class with attributes describing each file in the ZIP archive" def __init__(self, filename="NoName", date_time=(1980,1,1,0,0,0)): self.filename = filename # Name of the file in the archive --- 44,51 ---- pass + class ZipInfo: ! """Class with attributes describing each file in the ZIP archive.""" ! def __init__(self, filename="NoName", date_time=(1980,1,1,0,0,0)): self.filename = filename # Name of the file in the archive *************** *** 67,71 **** def FileHeader(self): ! 'Return the per-file header as a string' dt = self.date_time dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] --- 71,75 ---- def FileHeader(self): ! """Return the per-file header as a string.""" dt = self.date_time dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] *************** *** 87,93 **** class ZipFile: ! "Class with methods to open, read, write, close, list zip files" def __init__(self, filename, mode="r", compression=ZIP_STORED): ! 'Open the ZIP file with mode read "r", write "w" or append "a".' if compression == ZIP_STORED: pass --- 91,98 ---- class ZipFile: ! """Class with methods to open, read, write, close, list zip files.""" ! def __init__(self, filename, mode="r", compression=ZIP_STORED): ! """Open the ZIP file with mode read "r", write "w" or append "a".""" if compression == ZIP_STORED: pass *************** *** 124,128 **** def _GetContents(self): ! "Read in the table of contents for the zip file" fp = self.fp fp.seek(-22, 2) # Start of end-of-archive record --- 129,133 ---- def _GetContents(self): ! """Read in the table of contents for the ZIP file.""" fp = self.fp fp.seek(-22, 2) # Start of end-of-archive record *************** *** 185,189 **** def namelist(self): ! "Return a list of file names in the archive" l = [] for data in self.filelist: --- 190,194 ---- def namelist(self): ! """Return a list of file names in the archive.""" l = [] for data in self.filelist: *************** *** 192,200 **** def infolist(self): ! "Return a list of class ZipInfo instances for files in the archive" return self.filelist def printdir(self): ! "Print a table of contents for the zip file" print "%-46s %19s %12s" % ("File Name", "Modified ", "Size") for zinfo in self.filelist: --- 197,206 ---- def infolist(self): ! """Return a list of class ZipInfo instances for files in the ! archive.""" return self.filelist def printdir(self): ! """Print a table of contents for the zip file.""" print "%-46s %19s %12s" % ("File Name", "Modified ", "Size") for zinfo in self.filelist: *************** *** 203,207 **** def testzip(self): ! "Read all the files and check the CRC" for zinfo in self.filelist: try: --- 209,213 ---- def testzip(self): ! """Read all the files and check the CRC.""" for zinfo in self.filelist: try: *************** *** 211,219 **** def getinfo(self, name): ! 'Return the instance of ZipInfo given "name"' return self.NameToInfo[name] def read(self, name): ! "Return file bytes (as a string) for name" if self.mode not in ("r", "a"): raise RuntimeError, 'read() requires mode "r" or "a"' --- 217,225 ---- def getinfo(self, name): ! """Return the instance of ZipInfo given 'name'.""" return self.NameToInfo[name] def read(self, name): ! """Return file bytes (as a string) for name.""" if self.mode not in ("r", "a"): raise RuntimeError, 'read() requires mode "r" or "a"' *************** *** 249,253 **** def _writecheck(self, zinfo): ! 'Check for errors before writing a file to the archive' if self.NameToInfo.has_key(zinfo.filename): if self.debug: # Warning for duplicate names --- 255,259 ---- def _writecheck(self, zinfo): ! """Check for errors before writing a file to the archive.""" if self.NameToInfo.has_key(zinfo.filename): if self.debug: # Warning for duplicate names *************** *** 266,270 **** def write(self, filename, arcname=None, compress_type=None): ! 'Put the bytes from filename into the archive under the name arcname.' st = os.stat(filename) mtime = time.localtime(st[8]) --- 272,277 ---- def write(self, filename, arcname=None, compress_type=None): ! """Put the bytes from filename into the archive under the name ! arcname.""" st = os.stat(filename) mtime = time.localtime(st[8]) *************** *** 321,325 **** def writestr(self, zinfo, bytes): ! 'Write a file into the archive. The contents is the string "bytes"' self._writecheck(zinfo) zinfo.file_size = len(bytes) # Uncompressed size --- 328,333 ---- def writestr(self, zinfo, bytes): ! """Write a file into the archive. The contents is the string ! 'bytes'.""" self._writecheck(zinfo) zinfo.file_size = len(bytes) # Uncompressed size *************** *** 344,348 **** def __del__(self): ! 'Call the "close()" method in case the user forgot' if self.fp: self.fp.close() --- 352,356 ---- def __del__(self): ! """Call the "close()" method in case the user forgot.""" if self.fp: self.fp.close() *************** *** 350,354 **** def close(self): ! 'Close the file, and for mode "w" and "a" write the ending records' if self.mode in ("w", "a"): # write ending records count = 0 --- 358,363 ---- def close(self): ! """Close the file, and for mode "w" and "a" write the ending ! records.""" if self.mode in ("w", "a"): # write ending records count = 0 *************** *** 381,394 **** class PyZipFile(ZipFile): ! "Class to create ZIP archives with Python library files and packages" def writepy(self, pathname, basename = ""): """Add all files from "pathname" to the ZIP archive. ! If pathname is a package directory, search the directory and all ! package subdirectories recursively for all *.py and enter the modules into ! the archive. If pathname is a plain directory, listdir *.py and enter all ! modules. Else, pathname must be a Python *.py file and the module will be ! put into the archive. Added modules are always module.pyo or module.pyc. ! This method will compile the module.py into module.pyc if necessary.""" dir, name = os.path.split(pathname) if os.path.isdir(pathname): --- 390,407 ---- class PyZipFile(ZipFile): ! """Class to create ZIP archives with Python library files and packages.""" ! def writepy(self, pathname, basename = ""): """Add all files from "pathname" to the ZIP archive. ! If pathname is a package directory, search the directory and ! all package subdirectories recursively for all *.py and enter ! the modules into the archive. If pathname is a plain ! directory, listdir *.py and enter all modules. Else, pathname ! must be a Python *.py file and the module will be put into the ! archive. Added modules are always module.pyo or module.pyc. ! This method will compile the module.py into module.pyc if ! necessary. ! """ dir, name = os.path.split(pathname) if os.path.isdir(pathname): *************** *** 447,453 **** """Return (filename, archivename) for the path. ! Given a module name path, return the correct file path and archive name, ! compiling if necessary. For example, given /python/lib/string, ! return (/python/lib/string.pyc, string)""" file_py = pathname + ".py" file_pyc = pathname + ".pyc" --- 460,467 ---- """Return (filename, archivename) for the path. ! Given a module name path, return the correct file path and ! archive name, compiling if necessary. For example, given ! /python/lib/string, return (/python/lib/string.pyc, string). ! """ file_py = pathname + ".py" file_pyc = pathname + ".pyc" *************** *** 457,461 **** fname = file_pyo # Use .pyo file elif not os.path.isfile(file_pyc) or \ ! os.stat(file_pyc)[8] < os.stat(file_py)[8]: if self.debug: print "Compiling", file_py --- 471,476 ---- fname = file_pyo # Use .pyo file elif not os.path.isfile(file_pyc) or \ ! os.stat(file_pyc)[8] < os.stat(file_py)[8]: ! import py_compile if self.debug: print "Compiling", file_py *************** *** 468,470 **** archivename = "%s/%s" % (basename, archivename) return (fname, archivename) - --- 483,484 ---- From python-dev@python.org Mon Oct 2 22:20:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 14:20:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules Setup.in,1.110,1.111 Message-ID: <200010022120.OAA02677@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2611/Modules Modified Files: Setup.in Log Message: Remove comment about -lucb for the mmap module -- the module has been changed so that this is no longer needed on the only platform this is known to have been needed on. Fixed on indentation-related consistency nit. Index: Setup.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/Setup.in,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -r1.110 -r1.111 *** Setup.in 2000/09/15 18:55:58 1.110 --- Setup.in 2000/10/02 21:20:22 1.111 *************** *** 155,160 **** # Memory-mapped files (also works on Win32). ! # Some platforms require -lucb. ! mmap mmapmodule.c # -lucb # Socket module compiled with SSL support; you must edit the SSL variable: --- 155,159 ---- # Memory-mapped files (also works on Win32). ! mmap mmapmodule.c # Socket module compiled with SSL support; you must edit the SSL variable: *************** *** 183,187 **** #audioop audioop.c # Operations on audio samples #imageop imageop.c # Operations on images ! #rgbimg rgbimgmodule.c # Read SGI RGB image files (but coded portably) --- 182,186 ---- #audioop audioop.c # Operations on audio samples #imageop imageop.c # Operations on images ! #rgbimg rgbimgmodule.c # Read SGI RGB image files (but coded portably) From python-dev@python.org Mon Oct 2 22:26:31 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 14:26:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html index.html.in,1.10,1.11 Message-ID: <200010022126.OAA06983@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv6934/html Modified Files: index.html.in Log Message: Minor change to attributes so that the stylesheets can have better control. Index: index.html.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/index.html.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** index.html.in 2000/09/16 21:31:33 1.10 --- index.html.in 2000/10/02 21:26:28 1.11 *************** *** 31,35 ****
!

Python Documentation

--- 31,35 ----
!

Python Documentation

From python-dev@python.org Mon Oct 2 23:11:50 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 15:11:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib codecs.py,1.11,1.12 Message-ID: <200010022211.PAA09845@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9794/Lib Modified Files: codecs.py Log Message: Remove redundent information from a docstring. Index: codecs.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/codecs.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** codecs.py 2000/07/16 12:04:30 1.11 --- codecs.py 2000/10/02 22:11:47 1.12 *************** *** 522,528 **** encoding error occurs. - data_encoding and file_encoding are added to the wrapped file - object as attributes .data_encoding and .file_encoding resp. - The returned wrapped file object provides two extra attributes .data_encoding and .file_encoding which reflect the given --- 522,525 ---- From python-dev@python.org Mon Oct 2 23:14:12 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 15:14:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libxmllib.tex,1.27,1.28 Message-ID: <200010022214.PAA11974@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv11922/Doc/lib Modified Files: libxmllib.tex Log Message: Add deprecation note since the XML support is shaping up. Index: libxmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxmllib.tex,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** libxmllib.tex 2000/09/12 17:53:48 1.27 --- libxmllib.tex 2000/10/02 22:14:09 1.28 *************** *** 11,14 **** --- 11,17 ---- \index{Extensible Markup Language} + \deprecated{2.0}{Use \refmodule{xml.sax} instead. The newer XML + package includes full support for XML 1.0.} + \versionchanged{1.5.2} From python-dev@python.org Mon Oct 2 23:38:12 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 15:38:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ext ext.tex,1.85,1.86 Message-ID: <200010022238.PAA29734@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ext In directory slayer.i.sourceforge.net:/tmp/cvs-serv29667/ext Modified Files: ext.tex Log Message: Added some comments on the interaction of reload() and extension modules. Based on comments from Chris Barker . Index: ext.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/ext.tex,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -r1.85 -r1.86 *** ext.tex 2000/09/21 21:35:21 1.85 --- ext.tex 2000/10/02 22:38:09 1.86 *************** *** 436,440 **** \end{verbatim} ! And example may be found in the file \file{Demo/embed/demo.c} in the Python source distribution. --- 436,440 ---- \end{verbatim} ! An example may be found in the file \file{Demo/embed/demo.c} in the Python source distribution. *************** *** 445,448 **** --- 445,453 ---- Extension module authors should exercise caution when initializing internal data structures. + Note also that the \function{reload()} function can be used with + extension modules, and will call the module initialization function + (\cfunction{initspam()} in the example), but will not load the module + again if it was loaded from a dynamically loadable object file + (\file{.so} on \UNIX, \file{.dll} on Windows). A more substantial example module is included in the Python source From python-dev@python.org Tue Oct 3 00:04:05 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 2 Oct 2000 16:04:05 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.23,1.24 Message-ID: <200010022304.QAA19045@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv17756/nondist/peps Modified Files: pep-0042.txt Log Message: Provide a clearer error message when urlopen fails because of an invalid proxy setting. Minor change to call of unknown_url; always pass data argument explicitly since data defaults to None. PEP 42: Add as a feature that urllib handle proxy setting that contain only the host and port of the proxy. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** pep-0042.txt 2000/09/25 22:07:45 1.23 --- pep-0042.txt 2000/10/02 23:04:02 1.24 *************** *** 138,147 **** be parsed correctly. ! https://sourceforge.net/bugs/?func=detailbug&bug_id=110678&group_id=5470 - cgi.py's FieldStorage class should be more conservative with memory in the face of large binary file uploads. ! https://sourceforge.net/bugs/?func=detailbug&bug_id=110674&group_id=5470 There are two issues here: first, because --- 138,147 ---- be parsed correctly. ! http://sourceforge.net/bugs/?func=detailbug&bug_id=110678&group_id=5470 - cgi.py's FieldStorage class should be more conservative with memory in the face of large binary file uploads. ! http://sourceforge.net/bugs/?func=detailbug&bug_id=110674&group_id=5470 There are two issues here: first, because *************** *** 157,160 **** --- 157,165 ---- interface it /might/ be safe to remove it. OTOH, removing it will break code clever and nosy code. + + - urllib should support proxy definitions that contain just the + host and port + + http://sourceforge.net/bugs/?func=detailbug&bug_id=110849&group_id=5470 Tools From python-dev@python.org Tue Oct 3 00:04:05 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 2 Oct 2000 16:04:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.106,1.107 Message-ID: <200010022304.QAA19046@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv17756/dist/src/Lib Modified Files: urllib.py Log Message: Provide a clearer error message when urlopen fails because of an invalid proxy setting. Minor change to call of unknown_url; always pass data argument explicitly since data defaults to None. PEP 42: Add as a feature that urllib handle proxy setting that contain only the host and port of the proxy. Index: urllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -r1.106 -r1.107 *** urllib.py 2000/09/24 18:51:25 1.106 --- urllib.py 2000/10/02 23:04:02 1.107 *************** *** 143,152 **** return addinfourl(fp, headers, fullurl) type, url = splittype(fullurl) ! if not type: type = 'file' if self.proxies.has_key(type): proxy = self.proxies[type] ! type, proxy = splittype(proxy) ! host, selector = splithost(proxy) url = (host, fullurl) # Signal special case to open_*() name = 'open_' + type self.type = type --- 143,155 ---- return addinfourl(fp, headers, fullurl) type, url = splittype(fullurl) ! if not type: ! type = 'file' if self.proxies.has_key(type): proxy = self.proxies[type] ! type, proxyhost = splittype(proxy) ! host, selector = splithost(proxyhost) url = (host, fullurl) # Signal special case to open_*() + else: + proxy = None name = 'open_' + type self.type = type *************** *** 155,160 **** name = string.join(string.split(name, '-'), '_') if not hasattr(self, name): ! if data is None: ! return self.open_unknown(fullurl) else: return self.open_unknown(fullurl, data) --- 158,163 ---- name = string.join(string.split(name, '-'), '_') if not hasattr(self, name): ! if proxy: ! return self.open_unknown_proxy(proxy, fullurl, data) else: return self.open_unknown(fullurl, data) *************** *** 171,174 **** --- 174,182 ---- type, url = splittype(fullurl) raise IOError, ('url error', 'unknown url type', type) + + def open_unknown_proxy(self, proxy, fullurl, data=None): + """Overridable interface to open unknown URL type.""" + type, url = splittype(fullurl) + raise IOError, ('url error', 'invalid proxy for %s' % type, proxy) # External interface From python-dev@python.org Tue Oct 3 01:09:27 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 2 Oct 2000 17:09:27 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.24,1.25 Message-ID: <200010030009.RAA07209@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv7141 Modified Files: pep-0042.txt Log Message: CGIHTTPServer has been ported to Windows (and possibly even Mac), so this request can go. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** pep-0042.txt 2000/10/02 23:04:02 1.24 --- pep-0042.txt 2000/10/03 00:09:23 1.25 *************** *** 106,113 **** http://sourceforge.net/bugs/?func=detailbug&bug_id=114245&group_id=5470 - - Port CGIHTTPServer to Windows. - - http://sourceforge.net/bugs/?func=detailbug&bug_id=110839&group_id=5470 - - cStringIO.StringIO class should be given a readlines() method for compatibility with StringIO.StringIO class. --- 106,109 ---- From python-dev@python.org Tue Oct 3 04:31:09 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:31:09 -0700 Subject: [Python-checkins] CVS: distutils/distutils util.py,1.54,1.55 Message-ID: <200010030331.UAA22705@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv21795 Modified Files: util.py Log Message: Added a long-winded comment (and commented-out comment to go with out) about how it would be nice to write absolute paths to the temporary byte-compilation script, but this doesn't work because it screws up the trailing-slash trickery done to 'prefix' in build_py's 'byte_compile()' method. Fixed to use 'execute()' instead of 'os.remove()' to remove the temporary script: now it doesn't blow up in dry-run mode! Index: util.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/util.py,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** util.py 2000/10/02 02:09:55 1.54 --- util.py 2000/10/03 03:31:05 1.55 *************** *** 354,357 **** --- 354,372 ---- files = [ """) + + # XXX would be nice to write absolute filenames, just for + # safety's sake (script should be more robust in the face of + # chdir'ing before running it). But this requires abspath'ing + # 'prefix' as well, and that breaks the hack in build_lib's + # 'byte_compile()' method that carefully tacks on a trailing + # slash (os.sep really) to make sure the prefix here is "just + # right". This whole prefix business is rather delicate -- the + # problem is that it's really a directory, but I'm treating it + # as a dumb string, so trailing slashes and so forth matter. + + #py_files = map(os.path.abspath, py_files) + #if prefix: + # prefix = os.path.abspath(prefix) + script.write(string.join(map(repr, py_files), ",\n") + "]\n") script.write(""" *************** *** 370,374 **** cmd.insert(1, "-OO") spawn(cmd, verbose=verbose, dry_run=dry_run) ! os.remove(script_name) # "Direct" byte-compilation: use the py_compile module to compile --- 385,390 ---- cmd.insert(1, "-OO") spawn(cmd, verbose=verbose, dry_run=dry_run) ! execute(os.remove, (script_name,), "removing %s" % script_name, ! verbose=verbose, dry_run=dry_run) # "Direct" byte-compilation: use the py_compile module to compile From python-dev@python.org Tue Oct 3 04:31:55 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:31:55 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install.py,1.51,1.52 Message-ID: <200010030331.UAA23148@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv23078 Modified Files: install.py Log Message: Fixed so --no-compile is a negative alias for --compile. Index: install.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install.py,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -r1.51 -r1.52 *** install.py 2000/10/02 02:16:04 1.51 --- install.py 2000/10/03 03:31:52 1.52 *************** *** 117,120 **** --- 117,121 ---- boolean_options = ['force', 'skip-build'] + negative_opt = {'no-compile' : 'compile'} From python-dev@python.org Tue Oct 3 04:32:39 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:32:39 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install_lib.py,1.36,1.37 Message-ID: <200010030332.UAA23547@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv23476 Modified Files: install_lib.py Log Message: Remove some debugging prints. Index: install_lib.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_lib.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** install_lib.py 2000/10/02 02:25:51 1.36 --- install_lib.py 2000/10/03 03:32:37 1.37 *************** *** 72,77 **** self.optimize = 0 - print "install_lib: compile=%s, optimize=%s" % \ - (`self.compile`, `self.optimize`) if type(self.optimize) is not IntType: try: --- 72,75 ---- From python-dev@python.org Tue Oct 3 04:33:05 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:33:05 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample4 - New directory Message-ID: <200010030333.UAA23775@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample4 In directory slayer.i.sourceforge.net:/tmp/cvs-serv23699/sample4 Log Message: Directory /cvsroot/python/distutils/examples/sample4 added to the repository From python-dev@python.org Tue Oct 3 04:33:05 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:33:05 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample5 - New directory Message-ID: <200010030333.UAA23777@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv23699/sample5 Log Message: Directory /cvsroot/python/distutils/examples/sample5 added to the repository From python-dev@python.org Tue Oct 3 04:33:05 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:33:05 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6 - New directory Message-ID: <200010030333.UAA23776@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6 In directory slayer.i.sourceforge.net:/tmp/cvs-serv23699/sample6 Log Message: Directory /cvsroot/python/distutils/examples/sample6 added to the repository From python-dev@python.org Tue Oct 3 04:36:33 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:36:33 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample4 script1,NONE,1.1 script2,NONE,1.1 script3,NONE,1.1 script4,NONE,1.1 setup.py,NONE,1.1 Message-ID: <200010030336.UAA24765@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample4 In directory slayer.i.sourceforge.net:/tmp/cvs-serv24745 Added Files: script1 script2 script3 script4 setup.py Log Message: Sample Distribution #4: demonstrate building/installing scripts. --- NEW FILE --- #!python print "hello!" --- NEW FILE --- #!/usr/bin/env python print "hello again" --- NEW FILE --- #! /usr/local/bin/python -u import sys sys.stdout.write("un") sys.stderr.write("buf") sys.stdout.write("fer") sys.stderr.write("ed") sys.stdout.write("\n") --- NEW FILE --- #!/bin/sh echo "FOO" --- NEW FILE --- #!/usr/bin/env python # # sample4 -- try out the "build_script" and "install_script" commands # from distutils.core import setup setup (name = "sample4", version = "0", description = "Distutils Sample #4", scripts = ['script1', 'script2', 'script3', 'script4'], ) From python-dev@python.org Tue Oct 3 04:37:33 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:37:33 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample5 config,NONE,1.1 data,NONE,1.1 setup.py,NONE,1.1 sys_config,NONE,1.1 Message-ID: <200010030337.UAA25036@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv25014 Added Files: config data setup.py sys_config Log Message: Sample Distribution #5: demonstrate installing data files. --- NEW FILE --- this goes in /etc --- NEW FILE --- this goes in /share --- NEW FILE --- #!/usr/bin/env python # # sample5 -- try out the "install_data" command # from distutils.core import setup setup (name = "sample5", description = "Distutils Sample #5", data_files = [("share", ["data"]), ("etc", ["config"]), ("/etc", ["sys_config"])]) --- NEW FILE --- this goes in /etc From python-dev@python.org Tue Oct 3 04:38:33 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:38:33 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6/lib/pkg - New directory Message-ID: <200010030338.UAA25288@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6/lib/pkg In directory slayer.i.sourceforge.net:/tmp/cvs-serv25256/lib/pkg Log Message: Directory /cvsroot/python/distutils/examples/sample6/lib/pkg added to the repository From python-dev@python.org Tue Oct 3 04:38:33 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:38:33 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6/lib - New directory Message-ID: <200010030338.UAA25289@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv25256/lib Log Message: Directory /cvsroot/python/distutils/examples/sample6/lib added to the repository From python-dev@python.org Tue Oct 3 04:40:00 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:40:00 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6 setup1.py,NONE,1.1 setup2.py,NONE,1.1 Message-ID: <200010030340.UAA25873@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6 In directory slayer.i.sourceforge.net:/tmp/cvs-serv25802 Added Files: setup1.py setup2.py Log Message: Sample Distribution #6: demonstrate/test the 'package_dir' option, both with listing modules one-at-a-time and by whole packages. --- NEW FILE --- # # sample6, setup1 # # test that 'package_dir' works with individual module names and the # root package # from distutils.core import setup setup (name = "sample 6", description = "Distutils Sample #6", py_modules = ['mod1', 'pkg.mod2'], package_dir = {'': 'lib'}, options = {'build': {'build_base': 'build1'}}, ) --- NEW FILE --- # # sample6, setup2 # # test that 'package_dir' works with package names and the root package # from distutils.core import setup setup (name = "sample 6", description = "Distutils Sample #6", packages = ['', 'pkg'], package_dir = {'': 'lib'}, options = {'build': {'build_base': 'build2'}}, ) From python-dev@python.org Tue Oct 3 04:40:01 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:40:01 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6/lib mod1.py,NONE,1.1 Message-ID: <200010030340.UAA25872@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv25802/lib Added Files: mod1.py Log Message: Sample Distribution #6: demonstrate/test the 'package_dir' option, both with listing modules one-at-a-time and by whole packages. --- NEW FILE --- print "importing mod1" From python-dev@python.org Tue Oct 3 04:40:01 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:40:01 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6/lib/pkg __init__.py,NONE,1.1 mod2.py,NONE,1.1 Message-ID: <200010030340.UAA25876@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6/lib/pkg In directory slayer.i.sourceforge.net:/tmp/cvs-serv25802/lib/pkg Added Files: __init__.py mod2.py Log Message: Sample Distribution #6: demonstrate/test the 'package_dir' option, both with listing modules one-at-a-time and by whole packages. --- NEW FILE --- --- NEW FILE --- print "importing pkg.mod2" From python-dev@python.org Tue Oct 3 04:46:19 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:46:19 -0700 Subject: [Python-checkins] CVS: distutils/doc README.txt,1.2,1.3 Message-ID: <200010030346.UAA27574@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv27553/doc Modified Files: README.txt Log Message: Brought up-to-date. Index: README.txt =================================================================== RCS file: /cvsroot/python/distutils/doc/README.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** README.txt 2000/06/28 03:51:45 1.2 --- README.txt 2000/10/03 03:46:11 1.3 *************** *** 7,12 **** the rest of the world in the standard way) ! These manuals will be a standard part of the Python 1.6 documentation ! set, and are tightly integrated with the standard Python documentation tools. That means that you won't be able to process the LaTeX files here without downloading the latest Python documentation tools. --- 7,12 ---- the rest of the world in the standard way) ! These manuals are a standard part of the Python 2.0 documentation set, ! and are tightly integrated with the standard Python documentation tools. That means that you won't be able to process the LaTeX files here without downloading the latest Python documentation tools. From python-dev@python.org Tue Oct 3 04:47:31 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:47:31 -0700 Subject: [Python-checkins] CVS: distutils MANIFEST.in,1.10,1.11 Message-ID: <200010030347.UAA27880@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv27829 Modified Files: MANIFEST.in Log Message: Include everything in the examples/ tree (except sample?/build), not just *.txt and *.py. Include doc/*.txt too. Don't include test/ tree -- still no working test suite, and the old test scripts have bit-rotted badly. ;-( Index: MANIFEST.in =================================================================== RCS file: /cvsroot/python/distutils/MANIFEST.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** MANIFEST.in 2000/09/01 01:07:33 1.10 --- MANIFEST.in 2000/10/03 03:47:29 1.11 *************** *** 11,18 **** include *.txt TODO include MANIFEST.in ! recursive-include examples *.txt *.py prune examples/sample*/build ! include doc/dist/*.tex doc/inst/*.tex graft misc exclude misc/*.zip global-exclude *~ --- 11,19 ---- include *.txt TODO include MANIFEST.in ! graft examples prune examples/sample*/build ! include doc/*.txt doc/dist/*.tex doc/inst/*.tex graft misc exclude misc/*.zip + prune test global-exclude *~ From python-dev@python.org Tue Oct 3 04:47:49 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:47:49 -0700 Subject: [Python-checkins] CVS: distutils README.txt,1.21,1.22 CHANGES.txt,1.15,1.16 Message-ID: <200010030347.UAA27990@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv27932 Modified Files: README.txt CHANGES.txt Log Message: Updated for release 1.0. Index: README.txt =================================================================== RCS file: /cvsroot/python/distutils/README.txt,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** README.txt 2000/09/27 00:18:33 1.21 --- README.txt 2000/10/03 03:47:46 1.22 *************** *** 1,5 **** Python Distribution Utilities ! release 0.9.4 ! September 26, 2000 --- 1,5 ---- Python Distribution Utilities ! release 1.0 ! October 2, 2000 *************** *** 15,22 **** The Distutils are a standard part of Python 1.6/2.0; if you are running ! 1.6/2.0, you don't need to install the Distutils separately. This ! release is primarily so that you can add the Distutils to a Python 1.5.2 ! installation -- you will then be able to install modules that require ! the Distutils, or use the Distutils to distribute your own modules. More information is available at the Distutils web page: --- 15,24 ---- The Distutils are a standard part of Python 1.6/2.0; if you are running ! 1.6/2.0, you don't need to install the Distutils separately. (But you ! might want to upgrade to Distutils 1.0 if you are using Python 1.6; see ! below.) This release is primarily so that you can add the Distutils to ! a Python 1.5.2 installation -- you will then be able to install modules ! that require the Distutils, or use the Distutils to distribute your own ! modules. More information is available at the Distutils web page: *************** *** 42,50 **** ------------ ! This release of the Distutils requires Python 1.5.2 or later. (If you ! absolutely must use Python 1.5.1, Distutils 0.1.5 is backwards ! compatible. However, I have dropped plans to port the current Distutils ! code back to Python 1.5.1, as I have received exactly zero complaints ! about requiring Python 1.5.2 since releasing Distutils 0.8 in April.) To use the Distutils under Unix, you must have a *complete* Python --- 44,48 ---- ------------ ! This release of the Distutils requires Python 1.5.2 or later. To use the Distutils under Unix, you must have a *complete* Python *************** *** 112,121 **** --------------------------------- ! The Distutils have been included with Python since 1.6a1, and Distutils ! 0.9.4 is the same as the code included with Python 2.0b2. Thus, there's ! generally no need to install the Distutils under Python 1.6/2.0. ! However, Distutils releases may occasionally get ahead of Python ! releases, so if you really like life on the bleeding edge, you might ! want to install this Distutils release into your Python 1.6/2.0 library. To do this, you'll need to hide the original Distutils package directory --- 110,131 ---- --------------------------------- ! The Distutils have been included with Python since 1.6a1; the ! correspondence between Python releases and Distutils releases is as ! follows: ! ! Python release: Distutils release: ! 1.6a1 pre 0.8 ! 1.6a2 0.8 ! 1.6b1 0.9 ! 1.6 0.9.1 ! 2.0b1 0.9.2 ! 2.0b2 0.9.3 ! 2.0 (planned) 1.0 ! ! There's generally no need to install the Distutils under Python 1.6/2.0. ! However, if you'd like to upgrade the Distutils in your Python 1.6 ! installation, or if future Distutils releases get ahead of the Distutils ! included with Python 2.0, you might want to install a newer Distutils ! release into your Python 1.6/2.0 library. To do this, you'll need to hide the original Distutils package directory *************** *** 159,166 **** http://www.python.org/sigs/distutils-sig/doc/ ! These two manuals will soon be included in the standard Python ! documentation set. If you are an installer (system administrator or end-user) and you'd like to try out the Distutils, you've already done so by installing the --- 169,182 ---- http://www.python.org/sigs/distutils-sig/doc/ + + These two manuals are also part of the standard Python documentation + set; Fred Drake maintains a copy of the complete Python documentation at ! http://www.pythonlabs.com/doc/manuals/ + Sometimes Fred's version is more recent, and sometimes my version is. + Join both doc-sig@python.org and distutils-sig@python.org if you really + want to follow the latest documentation developments. + If you are an installer (system administrator or end-user) and you'd like to try out the Distutils, you've already done so by installing the *************** *** 174,209 **** - BACKWARDS INCOMPATIBILITY NOTE - ------------------------------ - - There were a couple of small incompatibilities introduced with Distutils - 0.8 (the previous major release) that affected setup scripts. - Unfortunately, two of the major module distributions currently using the - Distutils -- Numerical Python and PyXML -- stumble across these - incompatibilities. If you need to build and install either of these - (or, in theory, any module distribution that used Distutils 0.1.x -- - although most will not be affected), you have two options: - - * stick with Distutils 0.1.x (to be avoided, especially if you are - running Python 1.6/2.0) - - * replace the setup script provided by the module distribution with - the Distutils 0.8-compatible version provided here (recommended) - - For example, if you want to build Numerical Python 15.2 using Distutils - 0.8.x or 0.9, you would: - - * rename the setup.py provided with Numerical Python 15.2, eg. to - "setup.py.orig" - - * copy "examples/numpy_setup.py" into the Numerical Python source - tree as "setup.py" - - * run "python setup.py install" for Numerical Python as usual - - Note that Numerical Python 15.3 (the current release as I write this) - works fine with Distutils 0.8.x and 0.9.x. - - EXAMPLES -------- --- 190,193 ---- *************** *** 302,313 **** - FUTURE PLANS - ------------ - - Distutils 1.0 will, if all goes well, be the version included with - Python 2.0 (final). (If all does not go well, that version will be - 1.0.1 or 1.0.2 or so.) - - CONTRIBUTING ------------ --- 286,289 ---- *************** *** 355,359 **** format; the "bdist_rpm" command * Rene Liebscher: smarter extension-building; Cygwin/Mingw32 support; ! more help options [spiritual, in roughly chronological order since the birth of the project] --- 331,336 ---- format; the "bdist_rpm" command * Rene Liebscher: smarter extension-building; Cygwin/Mingw32 support; ! more help options; general improvement to the CCompiler classes; ! lots of other patches and bug reports [spiritual, in roughly chronological order since the birth of the project] Index: CHANGES.txt =================================================================== RCS file: /cvsroot/python/distutils/CHANGES.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** CHANGES.txt 2000/09/27 00:18:33 1.15 --- CHANGES.txt 2000/10/03 03:47:46 1.16 *************** *** 1,2 **** --- 1,17 ---- + Release 1.0 (2 October, 2000): + ------------------------------ + * code cleanup: got rid of a lot of redundant code in the various + implementations of the abstract C compiler interface + (Rene Liebscher) + + * overhauled the byte-compilation options: you can now choose to + compile at either build-time or install-time (the default), and + compiling with or without optimization (at either optimization + level) works + + * cleaned up some cruft in the bdist_wininst command (both the + Python module and C source) (Thomas Heller) + + Release 0.9.4 (26 September, 2000): ----------------------------------- *************** *** 18,22 **** * more improvements to the bdist_wininst command and the ! installers it generates: ....... (Thomas Heller) * fix the "sdist" command so it deals better with missing, empty, --- 33,37 ---- * more improvements to the bdist_wininst command and the ! installers it generates: (Thomas Heller) * fix the "sdist" command so it deals better with missing, empty, From python-dev@python.org Tue Oct 3 04:48:45 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:48:45 -0700 Subject: [Python-checkins] CVS: distutils setup.py,1.25,1.26 Message-ID: <200010030348.UAA28265@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv28252 Modified Files: setup.py Log Message: Bump version to 1.0. Index: setup.py =================================================================== RCS file: /cvsroot/python/distutils/setup.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** setup.py 2000/09/27 02:26:56 1.25 --- setup.py 2000/10/03 03:48:43 1.26 *************** *** 12,16 **** setup (name = "Distutils", ! version = "1.0pre", description = "Python Distribution Utilities", author = "Greg Ward", --- 12,16 ---- setup (name = "Distutils", ! version = "1.0", description = "Python Distribution Utilities", author = "Greg Ward", From python-dev@python.org Tue Oct 3 04:48:45 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:48:45 -0700 Subject: [Python-checkins] CVS: distutils/distutils __init__.py,1.16,1.17 Message-ID: <200010030348.UAA28269@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv28252/distutils Modified Files: __init__.py Log Message: Bump version to 1.0. Index: __init__.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/__init__.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** __init__.py 2000/09/27 02:26:57 1.16 --- __init__.py 2000/10/03 03:48:43 1.17 *************** *** 11,13 **** __revision__ = "$Id$" ! __version__ = "1.0pre" --- 11,13 ---- __revision__ = "$Id$" ! __version__ = "1.0" From python-dev@python.org Tue Oct 3 06:56:58 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 22:56:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsmtplib.tex,1.15,1.16 Message-ID: <200010030556.WAA28891@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv28884/lib Modified Files: libsmtplib.tex Log Message: Replace minimal \seetext references with better annotated \seerfc references, telling the reader more about what to expect at the other end of the links. Index: libsmtplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsmtplib.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libsmtplib.tex 2000/07/16 19:01:10 1.15 --- libsmtplib.tex 2000/10/03 05:56:55 1.16 *************** *** 76,86 **** \begin{seealso} ! \seetext{Internet \rfc{821}, \emph{Simple Mail Transfer Protocol}. ! Available online at ! \url{http://info.internet.isi.edu/in-notes/rfc/files/rfc821.txt}.} ! ! \seetext{Internet \rfc{1869}, \emph{SMTP Service Extensions}. ! Available online at ! \url{http://info.internet.isi.edu/in-notes/rfc/files/rfc1869.txt}.} \end{seealso} --- 76,87 ---- \begin{seealso} ! \seerfc{821}{Simple Mail Transfer Protocol}{Protocol definition for ! SMTP. This document covers the model, operating procedure, ! and protocol details for SMTP.} ! \seerfc{1869}{SMTP Service Extensions}{Definition of the ESMTP ! extensions for SMTP. This describes a framework for ! extending SMTP with new commands, supporting dynamic ! discovery of the commands provided by the server, and ! defines a few additional commands.} \end{seealso} From python-dev@python.org Tue Oct 3 07:05:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 23:05:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/perl python.perl,1.87,1.88 Message-ID: <200010030605.XAA30330@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory slayer.i.sourceforge.net:/tmp/cvs-serv30299/perl Modified Files: python.perl Log Message: $OFF_SITE_LINK_ICON: Don't define here; simply defining it overrides a definition provided by previously loaded configuration code, and testing whether it's defined isn't needed since the default was false anyway. get_link_icon(): Add support for $OFF_SITE_LINK_ICON_HEIGHT and $OFF_SITE_LINK_ICON_WIDTH, giving the dimensions of the icon being used. This can make for faster page display. Both are optional. make_my_titlegraphic(): Fix insertion of the off-site icon link. do_env_funcdesc(): Remove debugging print. handle_rfclike_reference(): Remove trailing colon from first line; it doesn't really make sense and looks bad if we add an icon to mark off-site links. Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -r1.87 -r1.88 *** python.perl 2000/10/02 14:43:38 1.87 --- python.perl 2000/10/03 06:05:25 1.88 *************** *** 37,42 **** } - $OFF_SITE_LINK_ICON = ''; - sub get_link_icon($){ my $url = @_[0]; --- 37,40 ---- *************** *** 45,49 **** my $icon = make_icon_filename($OFF_SITE_LINK_ICON); return (" [off-site link]"); } --- 43,54 ---- my $icon = make_icon_filename($OFF_SITE_LINK_ICON); return (" [off-site link]"); } *************** *** 770,774 **** my $idx = make_str_index_entry("$function_name()" . get_indexsubitem()); - print "\n--- funcdesc arg_list:\n$arg_list\n==="; $idx =~ s/ \(.*\)//; $idx =~ s/\(\)<\/tt>/<\/tt>/; --- 775,778 ---- *************** *** 1294,1298 **** $graphic .= " height=\"$TITLE_PAGE_GRAPHIC_HEIGHT\"" if ($TITLE_PAGE_GRAPHIC_HEIGHT); ! $graphic .= "\n src=\"$mydir/$myname$myext\">\n"; return $graphic; } --- 1298,1302 ---- $graphic .= " height=\"$TITLE_PAGE_GRAPHIC_HEIGHT\"" if ($TITLE_PAGE_GRAPHIC_HEIGHT); ! $graphic .= "\n src=\"$filename\">\n"; return $graphic; } *************** *** 1481,1485 **** . "\n
$what $rfcnum, $title$icon:" . "\n
$text\n " . $_; --- 1485,1489 ---- . "\n
$what $rfcnum, $title$icon" . "\n
$text\n " . $_; *************** *** 1499,1504 **** my $title = next_argument(); my $text = next_argument(); - my $icon = get_link_icon($url); if ($url) { return '
' . "\n
' . "\n
Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5482 Modified Files: cgi.py Log Message: Change first line to #!/usr/bin/env python (really just to test check-in). Index: cgi.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -r1.53 -r1.54 *** cgi.py 2000/09/19 04:11:46 1.53 --- cgi.py 2000/10/03 08:32:00 1.54 *************** *** 1,3 **** ! #! /usr/local/bin/python """Support module for CGI (Common Gateway Interface) scripts. --- 1,3 ---- ! #!/usr/bin/env python """Support module for CGI (Common Gateway Interface) scripts. From python-dev@python.org Tue Oct 3 09:52:37 2000 From: python-dev@python.org (Fredrik Lundh) Date: Tue, 3 Oct 2000 10:52:37 +0200 Subject: [Python-checkins] CVS: python/dist/src/Lib cgi.py,1.53,1.54 References: <200010030832.BAA05615@slayer.i.sourceforge.net> Message-ID: <011801c02d17$48659b10$0900a8c0@SPIFF> > Change first line to #!/usr/bin/env python (really just to test check-in). hmm. cgi.py is a CGI script. according to the Python FAQ, CGI scripts should use an explicit path, not /usr/bin/env: "Note -- *don't* do this for CGI scripts. The $PATH variable for CGI scripts is often very minimal, so you need to use the actual absolute pathname of the interpreter." (since this comes up over and over again, maybe someone should add a comment to the file?) From python-dev@python.org Tue Oct 3 14:51:12 2000 From: python-dev@python.org (Guido van Rossum) Date: Tue, 3 Oct 2000 06:51:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib cgi.py,1.54,1.55 Message-ID: <200010031351.GAA29689@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv29633 Modified Files: cgi.py Log Message: Undo Ping's change. CGI scripts should *not* use /usr/bin/env, since on systems that don't come standard with Python installed, Python isn't on the default $PATH. Too bad that this breaks on Linux, where Python is in /usr/bin which is on the default path -- the point is that you must manually edit your CGI scripts when you install them. Index: cgi.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** cgi.py 2000/10/03 08:32:00 1.54 --- cgi.py 2000/10/03 13:51:09 1.55 *************** *** 1,3 **** ! #!/usr/bin/env python """Support module for CGI (Common Gateway Interface) scripts. --- 1,3 ---- ! #! /usr/local/bin/python """Support module for CGI (Common Gateway Interface) scripts. From python-dev@python.org Tue Oct 3 15:18:22 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 3 Oct 2000 07:18:22 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.25,1.26 Message-ID: <200010031418.HAA18986@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv16651 Modified Files: pep-0042.txt Log Message: remove cStringIO.readlines request; it's done add urlparse request; handle RFC 2396 urls Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** pep-0042.txt 2000/10/03 00:09:23 1.25 --- pep-0042.txt 2000/10/03 14:18:13 1.26 *************** *** 106,114 **** http://sourceforge.net/bugs/?func=detailbug&bug_id=114245&group_id=5470 - - cStringIO.StringIO class should be given a readlines() method - for compatibility with StringIO.StringIO class. - - http://sourceforge.net/bugs/?func=detailbug&bug_id=110686&group_id=5470 - - Extend copy.py to class, module & function types. --- 106,109 ---- *************** *** 158,161 **** --- 153,161 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110849&group_id=5470 + + - urlparse should be updated to comply with RFC 2396, which + defines optional parameters for each segment of the page. + + http://sourceforge.net/bugs/?func=detailbug&bug_id=110834&group_id=5470 Tools From python-dev@python.org Tue Oct 3 16:16:34 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 08:16:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libzipfile.tex,1.5,1.6 Message-ID: <200010031516.IAA30198@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv29713/lib Modified Files: libzipfile.tex Log Message: Jim Ahlstrom sent a few corrections to my changes. (Thanks!) Index: libzipfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzipfile.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** libzipfile.tex 2000/10/02 20:56:30 1.5 --- libzipfile.tex 2000/10/03 15:16:31 1.6 *************** *** 26,33 **** \end{excdesc} - \begin{datadesc}{_debug} - Level of printing, defaults to \code{1}. - \end{datadesc} - \begin{classdesc}{ZipFile}{\unspecified} The class for reading and writing ZIP files. See --- 26,29 ---- *************** *** 43,47 **** Class used the represent infomation about a member of an archive. Instances of this class are returned by the \method{getinfo()} and ! \method{listinfo()} methods of \class{ZipFile} objects. Most users of the \module{zipfile} module will not need to create these, but only use those created by this module. --- 39,43 ---- Class used the represent infomation about a member of an archive. Instances of this class are returned by the \method{getinfo()} and ! \method{infolist()} methods of \class{ZipFile} objects. Most users of the \module{zipfile} module will not need to create these, but only use those created by this module. *************** *** 100,107 **** the archive, and should be \constant{ZIP_STORED} or \constant{ZIP_DEFLATED}; unrecognized values will cause ! \exception{ValueError} to be raised. The default is \constant{ZIP_STORED}. \end{classdesc} \begin{methoddesc}{namelist}{} Return a list of archive members by name. --- 96,115 ---- the archive, and should be \constant{ZIP_STORED} or \constant{ZIP_DEFLATED}; unrecognized values will cause ! \exception{RuntimeError} to be raised. If \constant{ZIP_DEFLATED} ! is specified but the \refmodule{zlib} module is not avaialble, ! \exception{RuntimeError} is also raised. The default is \constant{ZIP_STORED}. \end{classdesc} + \begin{methoddesc}{close}{} + Close the archive file. You must call \method{close()} before + exiting your program or essential records will not be written. + \end{methoddesc} + + \begin{methoddesc}{getinfo}{name} + Return a \class{ZipInfo} object with information about the archive + member \var{name}. + \end{methoddesc} + \begin{methoddesc}{namelist}{} Return a list of archive members by name. *************** *** 127,147 **** name of the first bad file, or else return \code{None}. \end{methoddesc} - - \begin{methoddesc}{writestr}{bytes, arcname, year, month, day, - hour, minute, second} - Write the string \var{bytes} and the other data to the archive, and - give the archive member the name \var{arcname}. The archive must be - opened with mode \code{'w'} or \code{'a'}. - \end{methoddesc} ! \begin{methoddesc}{write}{filename, arcname} Write the file named \var{filename} to the archive, giving it the ! archive name \var{arcname}. The archive must be open with mode ! \code{'w'} or \code{'a'}. \end{methoddesc} ! \begin{methoddesc}{close}{} ! Close the archive file. You must call \method{close()} before ! exiting your program or essential records will not be written. \end{methoddesc} --- 135,154 ---- name of the first bad file, or else return \code{None}. \end{methoddesc} ! \begin{methoddesc}{write}{filename\optional{, arcname\optional{, ! compress_type}}} Write the file named \var{filename} to the archive, giving it the ! archive name \var{arcname} (by default, this will be the same as ! \var{filename}). If given, \var{compress_type} overrides the value ! given for the \var{compression} parameter to the constructor for ! the new entry. The archive must be open with mode \code{'w'} or ! \code{'a'}. \end{methoddesc} ! \begin{methoddesc}{writestr}{zinfo, bytes} ! Write the string \var{bytes} to the archive; meta-information is ! given as the \class{ZipInfo} instance \var{zinfo}. At least the ! filename, date, and time must be given by \var{zinfo}. The archive ! must be opened with mode \code{'w'} or \code{'a'}. \end{methoddesc} *************** *** 190,194 **** Instances of the \class{ZipInfo} class are returned by the ! \method{getinfo()} and \method{listinfo()} methods of \class{ZipFile} objects. Each object stores information about a single member of the ZIP archive. --- 197,201 ---- Instances of the \class{ZipInfo} class are returned by the ! \method{getinfo()} and \method{infolist()} methods of \class{ZipFile} objects. Each object stores information about a single member of the ZIP archive. From python-dev@python.org Tue Oct 3 16:45:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 08:45:01 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.26,1.27 Message-ID: <200010031545.IAA18349@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv18309 Modified Files: pep-0042.txt Log Message: Added item that "continue" inside "try" should be fixed; the current behavior has been described as an implementation limitation. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** pep-0042.txt 2000/10/03 14:18:13 1.26 --- pep-0042.txt 2000/10/03 15:44:58 1.27 *************** *** 45,48 **** --- 45,60 ---- build with MSVC. + - "continue" inside "try" should work as expect instead of raising + SyntaxError. The current behavior is considered an implementation + limit. + + while 1: + try: + continue + except: + pass + + http://sourceforge.net/bugs/?func=detailbug&bug_id=110830&group_id=5470 + Standard Library From python-dev@python.org Tue Oct 3 17:02:09 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 3 Oct 2000 09:02:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python import.c,2.152,2.153 Message-ID: <200010031602.JAA32617@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv32538 Modified Files: import.c Log Message: _PyImport_Fini(): Closed small memory leak when an embedded app calls Py_Initialize()/Py_Finalize() in a loop. _PyImport_Filetab needed to be deallocated. Partial closure of SF #110681, Jitterbug PR#398. Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.152 retrieving revision 2.153 diff -C2 -r2.152 -r2.153 *** import.c 2000/09/29 04:03:10 2.152 --- import.c 2000/10/03 16:02:05 2.153 *************** *** 133,136 **** --- 133,138 ---- Py_XDECREF(extensions); extensions = NULL; + PyMem_DEL(_PyImport_Filetab); + _PyImport_Filetab = NULL; } From python-dev@python.org Tue Oct 3 17:29:26 2000 From: python-dev@python.org (Fredrik Lundh) Date: Tue, 3 Oct 2000 09:29:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.43,2.44 Message-ID: <200010031629.JAA22095@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv21244/Modules Modified Files: _sre.c Log Message: Fixed negative lookahead/lookbehind. Closes bug #115618. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** _sre.c 2000/09/26 05:46:01 2.43 --- _sre.c 2000/10/03 16:29:22 2.44 *************** *** 21,24 **** --- 21,25 ---- * 2000-09-20 fl added expand method * 2000-09-21 fl don't use the buffer interface for unicode strings + * 2000-10-03 fl fixed assert_not primitive * * Copyright (c) 1997-2000 by Secret Labs AB. All rights reserved. *************** *** 775,780 **** if (i <= 0) return i; - if (pattern[1] > 0 && state->ptr != ptr) - return SRE_ERROR_STATE; pattern += pattern[0]; break; --- 776,779 ---- *************** *** 792,797 **** if (i) return 0; - if (pattern[1] > 0 && state->ptr != ptr) - return SRE_ERROR_STATE; pattern += pattern[0]; break; --- 791,794 ---- From python-dev@python.org Tue Oct 3 17:29:26 2000 From: python-dev@python.org (Fredrik Lundh) Date: Tue, 3 Oct 2000 09:29:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test re_tests.py,1.21,1.22 Message-ID: <200010031629.JAA22101@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv21244/Lib/test Modified Files: re_tests.py Log Message: Fixed negative lookahead/lookbehind. Closes bug #115618. Index: re_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** re_tests.py 2000/09/24 14:46:23 1.21 --- re_tests.py 2000/10/03 16:29:23 1.22 *************** *** 616,618 **** --- 616,620 ---- ('(', '', SYNTAX_ERROR), ('[\\41]', '!', SUCCEED, 'found', '!'), + # bug 115618 + (r'(? Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv25917 Modified Files: pep-0042.txt Log Message: added reference to another "continue inside try" bug/feature request, but didn't close it. It's similar, but not exactly the same as the normal implementation limit. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** pep-0042.txt 2000/10/03 15:44:58 1.27 --- pep-0042.txt 2000/10/03 16:34:55 1.28 *************** *** 57,60 **** --- 57,65 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110830&group_id=5470 + though still open as of this change, the following bug report is + similar, though not quite the same, and should be checked for closure + when this feature request is addressed. + + http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115143 Standard Library From python-dev@python.org Tue Oct 3 17:50:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 09:50:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.201,1.202 Message-ID: <200010031650.JAA06580@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv6527 Modified Files: Makefile Log Message: Bump the release number for the upcoming candidate. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.201 retrieving revision 1.202 diff -C2 -r1.201 -r1.202 *** Makefile 2000/09/22 16:18:19 1.201 --- Makefile 2000/10/03 16:50:48 1.202 *************** *** 65,69 **** # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.0b2 --- 65,69 ---- # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.0c1 From python-dev@python.org Tue Oct 3 17:51:11 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 3 Oct 2000 09:51:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_pty.py,1.4,1.5 Message-ID: <200010031651.JAA06853@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv4948/Lib/test Modified Files: test_pty.py Log Message: On some systems (like Solaris), the master end of a tty/pty pair is apparently not considered a terminal, and so isatty(3) returns false. So we skip the test for ttyness of the master side and just check the slave side, which should really be a terminal. Index: test_pty.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pty.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_pty.py 2000/08/04 13:34:43 1.4 --- test_pty.py 2000/10/03 16:51:08 1.5 *************** *** 28,33 **** raise TestSkipped, "Pseudo-terminals (seemingly) not functional." - if not os.isatty(master_fd): - raise TestFailed, "master_fd is not a tty" if not os.isatty(slave_fd): raise TestFailed, "slave_fd is not a tty" --- 28,31 ---- From python-dev@python.org Tue Oct 3 17:54:29 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 3 Oct 2000 09:54:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.174,2.175 Message-ID: <200010031654.JAA09301@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8699/Modules Modified Files: posixmodule.c Log Message: Clarify that isatty is only guaranteed to return true for slave ends of terminals, not the master end (though it does, on most systems.) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.174 retrieving revision 2.175 diff -C2 -r2.174 -r2.175 *** posixmodule.c 2000/09/25 13:22:00 2.174 --- posixmodule.c 2000/10/03 16:54:24 2.175 *************** *** 3469,3473 **** "isatty(fd) -> Boolean\n\ Return true if the file descriptor 'fd' is an open file descriptor\n\ ! connected to a terminal."; static PyObject * --- 3469,3473 ---- "isatty(fd) -> Boolean\n\ Return true if the file descriptor 'fd' is an open file descriptor\n\ ! connected to the slave end of a terminal."; static PyObject * From python-dev@python.org Tue Oct 3 18:11:40 2000 From: python-dev@python.org (Guido van Rossum) Date: Tue, 3 Oct 2000 10:11:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib site.py,1.19,1.20 Message-ID: <200010031711.KAA22580@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv22509 Modified Files: site.py Log Message: Fix a few problems with the _Printer class and the license variable. 1. repr(license) will no longer print to stdout and read from stdin; you have to use license(). `license` is a short message explaining this. 2. Use lazy initialization so that startup isn't slowed down by the search for the LICENSE file. 3. repr(license) actually returns the desired string, rather than printing to stdout and returning ''. (Why didn't we think of this before?) 4. Use the pythonlabs license URL as the license fallback instead of the CNRI license handle. Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** site.py 2000/09/28 16:52:36 1.19 --- site.py 2000/10/03 17:11:37 1.20 *************** *** 146,154 **** MAXLINES = 23 ! def __init__(self, s): ! self.__lines = s.split('\n') self.__linecnt = len(self.__lines) def __repr__(self): prompt = 'Hit Return for more, or q (and Return) to quit: ' lineno = 0 --- 146,186 ---- MAXLINES = 23 ! def __init__(self, name, data, files=(), dirs=()): ! self.__name = name ! self.__data = data ! self.__files = files ! self.__dirs = dirs ! self.__lines = None ! ! def __setup(self): ! if self.__lines: ! return ! data = None ! for dir in self.__dirs: ! for file in self.__files: ! file = os.path.join(dir, file) ! try: ! fp = open(file) ! data = fp.read() ! fp.close() ! break ! except IOError: ! pass ! if data: ! break ! if not data: ! data = self.__data ! self.__lines = data.split('\n') self.__linecnt = len(self.__lines) def __repr__(self): + self.__setup() + if len(self.__lines) <= self.MAXLINES: + return "\n".join(self.__lines) + else: + return "Type %s() to see the full %s text" % ((self.__name,)*2) + + def __call__(self): + self.__setup() prompt = 'Hit Return for more, or q (and Return) to quit: ' lineno = 0 *************** *** 168,194 **** if key == 'q': break - return '' - - __builtin__.copyright = _Printer(sys.copyright) - __builtin__.credits = _Printer( - '''Python development is led by BeOpen PythonLabs (www.pythonlabs.com).''') - - def make_license(filename): - try: - return _Printer(open(filename).read()) - except IOError: - return None here = os.path.dirname(os.__file__) ! for dir in here, os.path.join(here, os.pardir), os.curdir: ! for file in "LICENSE.txt", "LICENSE": ! lic = make_license(os.path.join(dir, file)) ! if lic: ! break ! if lic: ! __builtin__.license = lic ! break ! else: ! __builtin__.license = _Printer('See http://hdl.handle.net/1895.22/1012') --- 200,212 ---- if key == 'q': break + __builtin__.copyright = _Printer("copyright", sys.copyright) + __builtin__.credits = _Printer("credits", + "Python development is led by BeOpen PythonLabs (www.pythonlabs.com).") here = os.path.dirname(os.__file__) ! __builtin__.license = _Printer( ! "license", "See http://www.pythonlabs.com/products/python2.0/license.html", ! ["LICENSE.txt", "LICENSE"], ! [here, os.path.join(here, os.pardir), os.curdir]) From python-dev@python.org Tue Oct 3 18:14:30 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 10:14:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.49,1.50 Message-ID: <200010031714.KAA24748@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24705/lib Modified Files: libos.tex Log Message: Remove old note that os.popen() on Windows is unreliable; this is no longer true. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** libos.tex 2000/09/29 04:15:19 1.49 --- libos.tex 2000/10/03 17:14:27 1.50 *************** *** 283,289 **** available as the return value of the \method{close()} method of the file object, except that when the exit status is zero (termination without ! errors), \code{None} is returned. \strong{Note:} This function ! behaves unreliably under Windows due to the native implementation of ! \cfunction{popen()}. Availability: \UNIX{}, Windows. \end{funcdesc} --- 283,287 ---- available as the return value of the \method{close()} method of the file object, except that when the exit status is zero (termination without ! errors), \code{None} is returned. Availability: \UNIX{}, Windows. \end{funcdesc} From python-dev@python.org Tue Oct 3 19:09:07 2000 From: python-dev@python.org (Guido van Rossum) Date: Tue, 3 Oct 2000 11:09:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.64,2.65 Message-ID: <200010031809.LAA05513@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv5377 Modified Files: unicodeobject.c Log Message: In _PyUnicode_Fini(), decref unicode_empty before tearng down the free list. Discovered by Barry, fix approved by MAL. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.64 retrieving revision 2.65 diff -C2 -r2.64 -r2.65 *** unicodeobject.c 2000/09/26 05:46:01 2.64 --- unicodeobject.c 2000/10/03 18:09:04 2.65 *************** *** 5226,5229 **** --- 5226,5231 ---- PyUnicodeObject *u = unicode_freelist; + Py_XDECREF(unicode_empty); + unicode_empty = NULL; while (u != NULL) { PyUnicodeObject *v = u; *************** *** 5236,5240 **** unicode_freelist = NULL; unicode_freelist_size = 0; - Py_XDECREF(unicode_empty); - unicode_empty = NULL; } --- 5238,5240 ---- From python-dev@python.org Tue Oct 3 20:22:30 2000 From: python-dev@python.org (Fredrik Lundh) Date: Tue, 3 Oct 2000 12:22:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test re_tests.py,1.22,1.23 Message-ID: <200010031922.MAA06202@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv3131/Lib/test Modified Files: re_tests.py Log Message: Recompile pattern if (?x) flag was found inside the pattern during the first scan. Closes bug #115040. Index: re_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** re_tests.py 2000/10/03 16:29:23 1.22 --- re_tests.py 2000/10/03 19:22:26 1.23 *************** *** 613,620 **** # bug 111869 (PRE/PCRE fails on this one, SRE doesn't) (r'.*d', 'abc\nabd', SUCCEED, 'found', 'abd'), ! # bug 112468 ('(', '', SYNTAX_ERROR), ('[\\41]', '!', SUCCEED, 'found', '!'), ! # bug 115618 (r'(? Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3131/Lib Modified Files: sre_parse.py Log Message: Recompile pattern if (?x) flag was found inside the pattern during the first scan. Closes bug #115040. Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** sre_parse.py 2000/09/24 14:46:19 1.34 --- sre_parse.py 2000/10/03 19:22:26 1.35 *************** *** 594,597 **** --- 594,602 ---- # p.dump() + if not (flags & SRE_FLAG_VERBOSE) and p.pattern.flags & SRE_FLAG_VERBOSE: + # the VERBOSE flag was switched on inside the pattern. to be + # on the safe side, we'll parse the whole thing again... + return parse(str, p.pattern.flags) + return p From python-dev@python.org Tue Oct 3 21:37:42 2000 From: python-dev@python.org (Guido van Rossum) Date: Tue, 3 Oct 2000 13:37:42 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.28,1.29 Message-ID: <200010032037.NAA32006@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv31973 Modified Files: pep-0042.txt Log Message: Properly record Skip's gripe, which was really that the compiler *appeared to* accept the first continue but complained about the second. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** pep-0042.txt 2000/10/03 16:34:55 1.28 --- pep-0042.txt 2000/10/03 20:37:39 1.29 *************** *** 57,63 **** http://sourceforge.net/bugs/?func=detailbug&bug_id=110830&group_id=5470 ! though still open as of this change, the following bug report is ! similar, though not quite the same, and should be checked for closure ! when this feature request is addressed. http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115143 --- 57,63 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110830&group_id=5470 ! - When the compiler pass complains about something, ! e.g. "continue" inside "try", it should complain about the ! *first* error, not the second or last. http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115143 From python-dev@python.org Tue Oct 3 21:43:38 2000 From: python-dev@python.org (Fredrik Lundh) Date: Tue, 3 Oct 2000 13:43:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.44,2.45 Message-ID: <200010032043.NAA04246@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2745/Modules Modified Files: _sre.c Log Message: Accept keyword arguments for (most) pattern and match object methods. Closes buglet #115845. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** _sre.c 2000/10/03 16:29:22 2.44 --- _sre.c 2000/10/03 20:43:34 2.45 *************** *** 21,25 **** * 2000-09-20 fl added expand method * 2000-09-21 fl don't use the buffer interface for unicode strings ! * 2000-10-03 fl fixed assert_not primitive * * Copyright (c) 1997-2000 by Secret Labs AB. All rights reserved. --- 21,25 ---- * 2000-09-20 fl added expand method * 2000-09-21 fl don't use the buffer interface for unicode strings ! * 2000-10-03 fl fixed assert_not primitive; support keyword arguments * * Copyright (c) 1997-2000 by Secret Labs AB. All rights reserved. *************** *** 1515,1519 **** static PyObject* ! pattern_match(PatternObject* self, PyObject* args) { SRE_STATE state; --- 1515,1519 ---- static PyObject* ! pattern_match(PatternObject* self, PyObject* args, PyObject* kw) { SRE_STATE state; *************** *** 1523,1527 **** int start = 0; int end = INT_MAX; ! if (!PyArg_ParseTuple(args, "O|ii:match", &string, &start, &end)) return NULL; --- 1523,1529 ---- int start = 0; int end = INT_MAX; ! static char* kwlist[] = { "pattern", "pos", "endpos", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "O|ii:match", kwlist, ! &string, &start, &end)) return NULL; *************** *** 1550,1554 **** static PyObject* ! pattern_search(PatternObject* self, PyObject* args) { SRE_STATE state; --- 1552,1556 ---- static PyObject* ! pattern_search(PatternObject* self, PyObject* args, PyObject* kw) { SRE_STATE state; *************** *** 1558,1562 **** int start = 0; int end = INT_MAX; ! if (!PyArg_ParseTuple(args, "O|ii:search", &string, &start, &end)) return NULL; --- 1560,1566 ---- int start = 0; int end = INT_MAX; ! static char* kwlist[] = { "pattern", "pos", "endpos", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "O|ii:search", kwlist, ! &string, &start, &end)) return NULL; *************** *** 1608,1617 **** static PyObject* ! pattern_sub(PatternObject* self, PyObject* args) { PyObject* template; PyObject* string; PyObject* count = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "OO|O:sub", &template, &string, &count)) return NULL; --- 1612,1623 ---- static PyObject* ! pattern_sub(PatternObject* self, PyObject* args, PyObject* kw) { PyObject* template; PyObject* string; PyObject* count = Py_False; /* zero */ ! static char* kwlist[] = { "repl", "string", "count", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|O:sub", kwlist, ! &template, &string, &count)) return NULL; *************** *** 1621,1630 **** static PyObject* ! pattern_subn(PatternObject* self, PyObject* args) { PyObject* template; PyObject* string; PyObject* count = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "OO|O:subn", &template, &string, &count)) return NULL; --- 1627,1638 ---- static PyObject* ! pattern_subn(PatternObject* self, PyObject* args, PyObject* kw) { PyObject* template; PyObject* string; PyObject* count = Py_False; /* zero */ ! static char* kwlist[] = { "repl", "string", "count", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|O:subn", kwlist, ! &template, &string, &count)) return NULL; *************** *** 1634,1642 **** static PyObject* ! pattern_split(PatternObject* self, PyObject* args) { PyObject* string; PyObject* maxsplit = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "O|O:split", &string, &maxsplit)) return NULL; --- 1642,1652 ---- static PyObject* ! pattern_split(PatternObject* self, PyObject* args, PyObject* kw) { PyObject* string; PyObject* maxsplit = Py_False; /* zero */ ! static char* kwlist[] = { "source", "maxsplit", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "O|O:split", kwlist, ! &string, &maxsplit)) return NULL; *************** *** 1646,1650 **** static PyObject* ! pattern_findall(PatternObject* self, PyObject* args) { SRE_STATE state; --- 1656,1660 ---- static PyObject* ! pattern_findall(PatternObject* self, PyObject* args, PyObject* kw) { SRE_STATE state; *************** *** 1656,1660 **** int start = 0; int end = INT_MAX; ! if (!PyArg_ParseTuple(args, "O|ii:findall", &string, &start, &end)) return NULL; --- 1666,1672 ---- int start = 0; int end = INT_MAX; ! static char* kwlist[] = { "source", "pos", "endpos", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "O|ii:findall", kwlist, ! &string, &start, &end)) return NULL; *************** *** 1746,1757 **** static PyMethodDef pattern_methods[] = { ! {"match", (PyCFunction) pattern_match, 1}, ! {"search", (PyCFunction) pattern_search, 1}, ! {"sub", (PyCFunction) pattern_sub, 1}, ! {"subn", (PyCFunction) pattern_subn, 1}, ! {"split", (PyCFunction) pattern_split, 1}, ! {"findall", (PyCFunction) pattern_findall, 1}, /* experimental */ ! {"scanner", (PyCFunction) pattern_scanner, 1}, {NULL, NULL} }; --- 1758,1769 ---- static PyMethodDef pattern_methods[] = { ! {"match", (PyCFunction) pattern_match, METH_VARARGS|METH_KEYWORDS}, ! {"search", (PyCFunction) pattern_search, METH_VARARGS|METH_KEYWORDS}, ! {"sub", (PyCFunction) pattern_sub, METH_VARARGS|METH_KEYWORDS}, ! {"subn", (PyCFunction) pattern_subn, METH_VARARGS|METH_KEYWORDS}, ! {"split", (PyCFunction) pattern_split, METH_VARARGS|METH_KEYWORDS}, ! {"findall", (PyCFunction) pattern_findall, METH_VARARGS|METH_KEYWORDS}, /* experimental */ ! {"scanner", (PyCFunction) pattern_scanner, METH_VARARGS}, {NULL, NULL} }; *************** *** 1915,1919 **** static PyObject* ! match_groups(MatchObject* self, PyObject* args) { PyObject* result; --- 1927,1931 ---- static PyObject* ! match_groups(MatchObject* self, PyObject* args, PyObject* kw) { PyObject* result; *************** *** 1921,1925 **** PyObject* def = Py_None; ! if (!PyArg_ParseTuple(args, "|O:groups", &def)) return NULL; --- 1933,1938 ---- PyObject* def = Py_None; ! static char* kwlist[] = { "default", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:groups", kwlist, &def)) return NULL; *************** *** 1942,1946 **** static PyObject* ! match_groupdict(MatchObject* self, PyObject* args) { PyObject* result; --- 1955,1959 ---- static PyObject* ! match_groupdict(MatchObject* self, PyObject* args, PyObject* kw) { PyObject* result; *************** *** 1949,1953 **** PyObject* def = Py_None; ! if (!PyArg_ParseTuple(args, "|O:groupdict", &def)) return NULL; --- 1962,1967 ---- PyObject* def = Py_None; ! static char* kwlist[] = { "default", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:groups", kwlist, &def)) return NULL; *************** *** 2110,2120 **** static PyMethodDef match_methods[] = { ! {"group", (PyCFunction) match_group, 1}, ! {"start", (PyCFunction) match_start, 1}, ! {"end", (PyCFunction) match_end, 1}, ! {"span", (PyCFunction) match_span, 1}, ! {"groups", (PyCFunction) match_groups, 1}, ! {"groupdict", (PyCFunction) match_groupdict, 1}, ! {"expand", (PyCFunction) match_expand, 1}, {NULL, NULL} }; --- 2124,2134 ---- static PyMethodDef match_methods[] = { ! {"group", (PyCFunction) match_group, METH_VARARGS}, ! {"start", (PyCFunction) match_start, METH_VARARGS}, ! {"end", (PyCFunction) match_end, METH_VARARGS}, ! {"span", (PyCFunction) match_span, METH_VARARGS}, ! {"groups", (PyCFunction) match_groups, METH_VARARGS|METH_KEYWORDS}, ! {"groupdict", (PyCFunction) match_groupdict, METH_VARARGS|METH_KEYWORDS}, ! {"expand", (PyCFunction) match_expand, METH_VARARGS}, {NULL, NULL} }; From python-dev@python.org Tue Oct 3 21:45:29 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 3 Oct 2000 13:45:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.65,2.66 Message-ID: <200010032045.NAA05812@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv5729 Modified Files: unicodeobject.c Log Message: _PyUnicode_Fini(): Initialize the local freelist walking variable `u' after unicode_empty has been freed, otherwise it might not point to the real start of the unicode_freelist. Final closure for SF bug #110681, Jitterbug PR#398. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.65 retrieving revision 2.66 diff -C2 -r2.65 -r2.66 *** unicodeobject.c 2000/10/03 18:09:04 2.65 --- unicodeobject.c 2000/10/03 20:45:26 2.66 *************** *** 5224,5232 **** _PyUnicode_Fini(void) { ! PyUnicodeObject *u = unicode_freelist; Py_XDECREF(unicode_empty); unicode_empty = NULL; ! while (u != NULL) { PyUnicodeObject *v = u; u = *(PyUnicodeObject **)u; --- 5224,5233 ---- _PyUnicode_Fini(void) { ! PyUnicodeObject *u; Py_XDECREF(unicode_empty); unicode_empty = NULL; ! ! for (u = unicode_freelist; u != NULL;) { PyUnicodeObject *v = u; u = *(PyUnicodeObject **)u; From python-dev@python.org Tue Oct 3 23:10:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 15:10:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools findacks,NONE,1.1 Message-ID: <200010032210.PAA09324@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv9286 Added Files: findacks Log Message: Preliminary tool to troll through the CVS logs and LaTeX sources for the names of people that should be in the ACKS file. This relies on some personal code that is not yet available, but should be by the time we release 2.0c1. --- NEW FILE --- #!/usr/bin/env python """Script to locate email addresses in the CVS logs.""" __version__ = '$Revision: 1.1 $' import os import re import sys import UserDict import fdrake.cvstools.info cvstools = fdrake.cvstools class Acknowledgements(UserDict.UserDict): def add(self, email, name, path): d = self.data d.setdefault(email, {})[path] = name def open_cvs_log(info, paths=None): cvsroot = info.get_cvsroot() cmd = "cvs -q -d%s log " % cvsroot if paths: cmd += " ".join(paths) return os.popen(cmd, "r") email_rx = re.compile("<([a-z][-a-z0-9._]*@[-a-z0-9.]+)>", re.IGNORECASE) def find_acks(f, acks): prev = '' filename = None MAGIC_WORDS = ('van', 'von') while 1: line = f.readline() if not line: break if line.startswith("Working file: "): filename = line.split(None, 2)[2].strip() prev = line continue m = email_rx.search(line) if m: words = prev.split() + line[:m.start()].split() L = [] while words \ and (words[-1][0].isupper() or words[-1] in MAGIC_WORDS): L.insert(0, words.pop()) name = " ".join(L) email = m.group(1).lower() acks.add(email, name, filename) prev = line def load_cvs_log_acks(acks, args): repolist = cvstools.info.get_repository_list(args or [""]) for info, paths in repolist: print >>sys.stderr, "Repository:", info.get_cvsroot() f = open_cvs_log(info, paths) find_acks(f, acks) f.close() def load_tex_source_acks(acks, args): for path in args: path = path or os.curdir if os.path.isfile(path): read_acks_from_tex_file(acks, path) else: read_acks_from_tex_dir(acks, path) def read_acks_from_tex_file(acks, path): f = open(path) while 1: line = f.readline() if not line: break if line.startswith(r"\sectionauthor{"): line = line[len(r"\sectionauthor"):] name, line = extract_tex_group(line) email, line = extract_tex_group(line) acks.add(email, name, path) def read_acks_from_tex_dir(acks, path): stack = [path] while stack: p = stack.pop() for n in os.listdir(p): n = os.path.join(p, n) if os.path.isdir(n): stack.insert(0, n) elif os.path.normpath(n).endswith(".tex"): read_acks_from_tex_file(acks, n) def extract_tex_group(s): c = 0 for i in range(len(s)): if s[i] == '{': c += 1 elif s[i] == '}': c -= 1 if c == 0: return s[1:i], s[i+1:] def print_acks(acks): first = 1 for email, D in acks.items(): if first: first = 0 else: print L = D.items() L.sort() prefname = L[0][1] for file, name in L[1:]: if name != prefname: prefname = "" break if prefname: print prefname, "<%s>:" % email else: print email + ":" for file, name in L: if name == prefname: print " " + file else: print " %s (as %s)" % (file, name) def print_ack_names(acks): names = [] for email, D in acks.items(): L = D.items() L.sort() prefname = L[0][1] for file, name in L[1:]: prefname = prefname or name names.append(prefname or email) def f(s1, s2): s1 = s1.lower() s2 = s2.lower() return cmp((s1.split()[-1], s1), (s2.split()[-1], s2)) names.sort(f) for name in names: print name def main(): args = sys.argv[1:] acks = Acknowledgements() load_cvs_log_acks(acks, args) load_tex_source_acks(acks, args) print_ack_names(acks) if __name__ == "__main__": main() From python-dev@python.org Tue Oct 3 23:35:31 2000 From: python-dev@python.org (Martin v. Löwis) Date: Tue, 3 Oct 2000 15:35:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax saxutils.py,1.8,1.9 Message-ID: <200010032235.PAA30562@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv29759/xml/sax Modified Files: saxutils.py Log Message: Support non-namespace elements in *ElementNS of XMLGenerator. Index: saxutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/saxutils.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** saxutils.py 2000/09/26 17:23:09 1.8 --- saxutils.py 2000/10/03 22:35:26 1.9 *************** *** 63,67 **** def startElementNS(self, name, qname, attrs): ! name = self._current_context[name[0]] + ":" + name[1] self._out.write('<' + name) --- 63,72 ---- def startElementNS(self, name, qname, attrs): ! if name[0] is None: ! # if the name was not namespace-scoped, use the unqualified part ! name = name[1] ! else: ! # else try to restore the original prefix from the namespace ! name = self._current_context[name[0]] + ":" + name[1] self._out.write('<' + name) *************** *** 76,80 **** def endElementNS(self, name, qname): ! name = self._current_context[name[0]] + ":" + name[1] self._out.write('' % name) --- 81,88 ---- def endElementNS(self, name, qname): ! if name[0] is None: ! name = name[1] ! else: ! name = self._current_context[name[0]] + ":" + name[1] self._out.write('' % name) From python-dev@python.org Tue Oct 3 23:35:31 2000 From: python-dev@python.org (Martin v. Löwis) Date: Tue, 3 Oct 2000 15:35:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_sax.py,1.7,1.8 Message-ID: <200010032235.PAA30567@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv29759/test Modified Files: test_sax.py Log Message: Support non-namespace elements in *ElementNS of XMLGenerator. Index: test_sax.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sax.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** test_sax.py 2000/09/27 08:12:17 1.7 --- test_sax.py 2000/10/03 22:35:29 1.8 *************** *** 113,121 **** gen.startPrefixMapping("ns1", ns_uri) gen.startElementNS((ns_uri, "doc"), "ns1:doc", {}) gen.endElementNS((ns_uri, "doc"), "ns1:doc") gen.endPrefixMapping("ns1") gen.endDocument() ! return result.getvalue() == start + ('' % ns_uri) --- 113,125 ---- gen.startPrefixMapping("ns1", ns_uri) gen.startElementNS((ns_uri, "doc"), "ns1:doc", {}) + # add an unqualified name + gen.startElementNS((None, "udoc"), None, {}) + gen.endElementNS((None, "udoc"), None) gen.endElementNS((ns_uri, "doc"), "ns1:doc") gen.endPrefixMapping("ns1") gen.endDocument() ! return result.getvalue() == start + \ ! ('' % ns_uri) From python-dev@python.org Wed Oct 4 00:07:19 2000 From: python-dev@python.org (Tim Peters) Date: Tue, 3 Oct 2000 16:07:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib popen2.py,1.16,1.17 Message-ID: <200010032307.QAA23758@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv23182/python/dist/src/lib Modified Files: popen2.py Log Message: test_popen2 broke on Windows shortly after 2.0b2 was released. Fixed it. Index: popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/popen2.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** popen2.py 2000/09/28 19:07:53 1.16 --- popen2.py 2000/10/03 23:07:13 1.17 *************** *** 112,116 **** if sys.platform[:3] == "win": # Some things don't make sense on non-Unix platforms. ! del Popen3, Popen4, _active, _cleanup def popen2(cmd, bufsize=-1, mode='t'): --- 112,116 ---- if sys.platform[:3] == "win": # Some things don't make sense on non-Unix platforms. ! del Popen3, Popen4 def popen2(cmd, bufsize=-1, mode='t'): From python-dev@python.org Wed Oct 4 05:21:22 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 21:21:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libstdtypes.tex,1.38,1.39 Message-ID: <200010040421.VAA07839@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv7812/lib Modified Files: libstdtypes.tex Log Message: Use \obindex{...} instead of \indexii{...}{type} in many places; this is more consistent with other index entries in the documentation. Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** libstdtypes.tex 2000/09/21 05:25:30 1.38 --- libstdtypes.tex 2000/10/04 04:21:19 1.39 *************** *** 167,176 **** their precision are off unless you happen to know the machine you are working with. ! \indexii{numeric}{types} ! \indexii{integer}{types} ! \indexii{integer}{type} ! \indexiii{long}{integer}{type} ! \indexii{floating point}{type} ! \indexii{complex number}{type} \indexii{C}{language} --- 167,175 ---- their precision are off unless you happen to know the machine you are working with. ! \obindex{numeric} ! \obindex{integer} ! \obindex{long integer} ! \obindex{floating point} ! \obindex{complex number} \indexii{C}{language} *************** *** 333,343 **** create them, but they are created using the \function{xrange()} function.\bifuncindex{xrange} ! \indexii{sequence}{types} ! \indexii{string}{type} ! \indexii{Unicode}{type} ! \indexii{buffer}{type} ! \indexii{tuple}{type} ! \indexii{list}{type} ! \indexii{xrange}{type} Sequence types support the following operations. The \samp{in} and --- 332,342 ---- create them, but they are created using the \function{xrange()} function.\bifuncindex{xrange} ! \obindex{sequence} ! \obindex{string} ! \obindex{Unicode} ! \obindex{buffer} ! \obindex{tuple} ! \obindex{list} ! \obindex{xrange} Sequence types support the following operations. The \samp{in} and *************** *** 648,652 **** \subsubsection{XRange Type \label{typesseq-xrange}} ! The xrange\indexii{xrange}{type} type is an immutable sequence which is commonly used for looping. The advantage of the xrange type is that an xrange object will always take the same amount of memory, no matter the --- 647,651 ---- \subsubsection{XRange Type \label{typesseq-xrange}} ! The xrange\obindex{xrange} type is an immutable sequence which is commonly used for looping. The advantage of the xrange type is that an xrange object will always take the same amount of memory, no matter the *************** *** 673,677 **** \var{x} is an arbitrary object): \indexiii{mutable}{sequence}{types} ! \indexii{list}{type} \begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes} --- 672,676 ---- \var{x} is an arbitrary object): \indexiii{mutable}{sequence}{types} ! \obindex{list} \begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes} *************** *** 750,755 **** \subsection{Mapping Types \label{typesmapping}} ! \indexii{mapping}{types} ! \indexii{dictionary}{type} A \dfn{mapping} object maps values of one type (the key type) to --- 749,754 ---- \subsection{Mapping Types \label{typesmapping}} ! \obindex{mapping} ! \obindex{dictionary} A \dfn{mapping} object maps values of one type (the key type) to From python-dev@python.org Wed Oct 4 14:39:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 06:39:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html about.html,1.1,1.2 index.html.in,1.11,1.12 Message-ID: <200010041339.GAA23569@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv23499/html Modified Files: about.html index.html.in Log Message: Remove styling information that conflicts with or duplicates the stylesheet; different browsers resolve the conflicts differently, and the "proper" resolution is not what we actually want. Reported by Peter Funk . Index: about.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/about.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** about.html 2000/09/08 21:53:22 1.1 --- about.html 2000/10/04 13:39:23 1.2 *************** *** 8,12 **** ! ''' HEAD = '''\ %(title)s ''' + NAVIGATION + '''\

%(title)s

''' TAIL = "
\n" + NAVIGATION + '''\ %(address)s ''' From python-dev@python.org Thu Oct 5 06:14:29 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:14:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools mkmodindex,1.7,1.8 Message-ID: <200010050514.WAA29448@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv29398/tools Modified Files: mkmodindex Log Message: Use the new support module instead of including all the getopt processing and style information directly. Index: mkmodindex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkmodindex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** mkmodindex 2000/10/04 13:39:24 1.7 --- mkmodindex 2000/10/05 05:14:26 1.8 *************** *** 27,50 **** """ import buildindex - import getopt import os import re import string import sys ! def usage(): ! program = os.path.basename(sys.argv[0]) ! print __doc__ % {"program": program} ! - def error(msg, rc=2): - sys.stdout = sys.stderr - print msg - print - usage() - sys.exit(rc) - _rx = re.compile( "
" --- 27,52 ---- """ import buildindex import os import re import string + import support import sys ! class IndexOptions(support.Options): ! def __init__(self): ! support.Options.__init__(self) ! self.add_args("l", ["letters"]) ! self.letters = 0 ! ! def handle_option(self, opt, val): ! if opt in ("-l", "--letters"): ! self.letters = 1 ! ! def usage(self): ! program = os.path.basename(sys.argv[0]) ! print __doc__ % {"program": program} _rx = re.compile( "
" *************** *** 53,106 **** def main(): ! outputfile = "-" ! columns = 1 ! letters = 0 ! uplink = "./" ! uptitle = "Python Documentation Index" ! variables = {"address": "", ! "iconserver": "icons", ! "imgtype": "gif", ! "title": "Global Module Index", ! "uplinkalt": "up", ! "uplinkicon": "up", ! } ! try: ! opts, args = getopt.getopt(sys.argv[1:], "a:c:hlo:", ! [# script controls: ! "columns=", "help", "letters", "output=", ! # content components: ! "address=", "iconserver=", ! "title=", "uplink=", "uptitle="]) ! except getopt.error, msg: ! error(msg) ! for opt, val in opts: ! if opt in ("-a", "--address"): ! val = string.strip(val) ! variables["address"] = val and "
\n%s\n
\n" % val ! elif opt in ("-h", "--help"): ! usage() ! sys.exit() ! elif opt in ("-o", "--output"): ! outputfile = val ! elif opt in ("-c", "--columns"): ! columns = string.atoi(val) ! elif opt in ("-l", "--letters"): ! letters = 1 ! elif opt == "--title": ! variables["title"] = string.strip(val) ! elif opt == "--uplink": ! uplink = string.strip(val) ! elif opt == "--uptitle": ! uptitle = string.strip(val) ! elif opt == "--iconserver": ! variables["iconserver"] = string.strip(val) or "." ! if uplink and uptitle: ! variables["uplinkalt"] = "up" ! variables["uplinkicon"] = "up" ! else: ! variables["uplinkalt"] = "" ! variables["uplinkicon"] = "blank" ! variables["uplink"] = uplink ! variables["uptitle"] = uptitle if not args: args = ["-"] --- 55,62 ---- def main(): ! options = IndexOptions() ! options.variables["title"] = "Global Module Index" ! options.parse(sys.argv[1:]) ! args = options.args if not args: args = ["-"] *************** *** 139,145 **** num_nodes = len(nodes) # Here's the HTML generation: ! parts = [HEAD % variables, ! buildindex.process_nodes(nodes, columns, letters), ! TAIL % variables, ] if has_plat_flag: --- 95,101 ---- num_nodes = len(nodes) # Here's the HTML generation: ! parts = [options.get_header(), ! buildindex.process_nodes(nodes, options.columns, options.letters), ! options.get_footer(), ] if has_plat_flag: *************** *** 147,155 **** html = string.join(parts, '') program = os.path.basename(sys.argv[0]) ! if outputfile == "-": ! sys.stdout.write(html) ! sys.stderr.write("%s: %d index nodes\n" % (program, num_nodes)) else: - open(outputfile, "w").write(html) print print "%s: %d index nodes" % (program, num_nodes) --- 103,111 ---- html = string.join(parts, '') program = os.path.basename(sys.argv[0]) ! fp = options.get_output_file() ! print >>fp, html.rstrip() ! if options.outputfile == "-": ! print >>sys.stderr, "%s: %d index nodes" % (program, num_nodes) else: print print "%s: %d index nodes" % (program, num_nodes) *************** *** 162,211 **** """ - NAVIGATION = '''\ -
- ''' - - HEAD = '''\ - - - - Global Module Index - - - - - - ''' + NAVIGATION + '''\ -
- -

%(title)s

- - ''' - - TAIL = "
\n" + NAVIGATION + '''\ - %(address)s - - ''' if __name__ == "__main__": --- 118,121 ---- From python-dev@python.org Thu Oct 5 06:15:31 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:15:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools mkackshtml,NONE,1.1 Message-ID: <200010050515.WAA29938@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv29910/tools Added Files: mkackshtml Log Message: New script to convert the ACKS file to a nicely formatted HTML file. Uses the new support module. --- NEW FILE --- #! /usr/bin/env python # -*- Python -*- import support import sys def collect(fp): names = [] while 1: line = fp.readline() if not line: break line = line.strip() if line: names.append(line) else: names = [] return names def main(): options = support.Options() options.columns = 4 options.variables["title"] = "Acknowledgements" options.parse(sys.argv[1:]) names = collect(sys.stdin) percol = (len(names) + options.columns - 1) / options.columns colnums = [percol*i for i in range(options.columns)] fp = options.get_output_file() print >>fp, options.get_header().rstrip() print >>fp, THANKS print >>fp, '' for i in range(percol): print >>fp, " " for j in colnums: try: print >>fp, " " % names[i + j] except IndexError: print >>fp, " " print >>fp, " " print >>fp, "
%s 
" print >>fp, options.get_footer().rstrip() THANKS = '''\

These people have contributed in some way to the Python documentation. This list is probably not complete -- if you feel that you or anyone else should be on this list, please let us know (send email to python-docs@python.org), and we will be glad to correct the problem.

It is only with the input and contributions of the Python community that Python has such wonderful documentation -- Thank You!

''' if __name__ == "__main__": main() From python-dev@python.org Thu Oct 5 06:16:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:16:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html .cvsignore,1.8,1.9 Message-ID: <200010050516.WAA30328@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv30299/html Modified Files: .cvsignore Log Message: Ignore the acks.html file, since it is generated. Index: .cvsignore =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/.cvsignore,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** .cvsignore 2000/04/28 17:45:27 1.8 --- .cvsignore 2000/10/05 05:16:12 1.9 *************** *** 8,11 **** --- 8,12 ---- dist inst + acks.html index.html modindex.html From python-dev@python.org Thu Oct 5 06:16:58 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:16:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html Makefile,1.37,1.38 Message-ID: <200010050516.WAA30756@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv30730/html Modified Files: Makefile Log Message: Add rules for generating the acks.html file at the top of the document tree. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/Makefile,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** Makefile 2000/09/12 19:53:18 1.37 --- Makefile 2000/10/05 05:16:56 1.38 *************** *** 60,64 **** # The index.html target is at the end since it screws up font-lock. ! modindex.html: lib/lib.html mac/mac.html $(TOOLSDIR)/mkmodindex $(TOOLSDIR)/mkmodindex --columns 4 --output modindex.html \ --address $(PYTHONDOCS) \ --- 60,69 ---- # The index.html target is at the end since it screws up font-lock. ! acks.html: ../ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml ! $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) --output acks.html \ ! <../ACKS ! ! modindex.html: $(TOOLSDIR)/support.py $(TOOLSDIR)/mkmodindex ! modindex.html: lib/lib.html mac/mac.html $(TOOLSDIR)/mkmodindex --columns 4 --output modindex.html \ --address $(PYTHONDOCS) \ *************** *** 108,112 **** distclean realclean clobber: clean ! rm -rf index.html modindex.html rm -rf api/ doc/ ext/ lib/ mac/ ref/ tut/ inst/ dist/ --- 113,117 ---- distclean realclean clobber: clean ! rm -rf index.html modindex.html acks.html rm -rf api/ doc/ ext/ lib/ mac/ ref/ tut/ inst/ dist/ From python-dev@python.org Thu Oct 5 06:17:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:17:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html about.html,1.2,1.3 Message-ID: <200010050517.WAA31055@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv31014/html Modified Files: about.html Log Message: Add a link to the new acks.html file. Index: about.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/about.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** about.html 2000/10/04 13:39:23 1.2 --- about.html 2000/10/05 05:17:29 1.3 *************** *** 46,49 **** --- 46,51 ---- href="http://www.python.org/">Python Web site. +

A list of contributors is available. +

Comments and Questions

From python-dev@python.org Thu Oct 5 06:20:57 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:20:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools support.py,1.1,1.2 Message-ID: <200010050520.WAA32367@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv32343/tools Modified Files: support.py Log Message: Better add at least a short docstring to the module! Index: support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/support.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** support.py 2000/10/05 05:11:57 1.1 --- support.py 2000/10/05 05:20:55 1.2 *************** *** 1,3 **** ! """ """ __version__ = '$Revision$' --- 1,7 ---- ! """Miscellaneous support code shared by some of the tool scripts. ! ! This includes option parsing code, HTML formatting code, and a couple of ! useful helpers. ! """ __version__ = '$Revision$' From python-dev@python.org Thu Oct 5 11:54:48 2000 From: python-dev@python.org (Mark Hammond) Date: Thu, 5 Oct 2000 03:54:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python dynload_win.c,2.6,2.7 Message-ID: <200010051054.DAA21558@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv21547 Modified Files: dynload_win.c Log Message: Detect conflicting Python DLL on module import under Windows - as per [ Patch #101676 ] Index: dynload_win.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_win.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** dynload_win.c 2000/09/01 23:29:28 2.6 --- dynload_win.c 2000/10/05 10:54:45 2.7 *************** *** 4,7 **** --- 4,8 ---- #include #include + #include #include "Python.h" *************** *** 20,28 **** dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, const char *pathname, FILE *fp) { dl_funcptr p; ! char funcname[258]; sprintf(funcname, "init%.200s", shortname); --- 21,162 ---- + #ifdef MS_WIN32 + + /* Case insensitive string compare, to avoid any dependencies on particular + C RTL implementations */ + + static int strcasecmp (char *string1, char *string2) + { + int first, second; + + do { + first = tolower(*string1); + second = tolower(*string2); + string1++; + string2++; + } while (first && first == second); + + return (first - second); + } + + + /* Function to return the name of the "python" DLL that the supplied module + directly imports. Looks through the list of imported modules and + returns the first entry that starts with "python" (case sensitive) and + is followed by nothing but numbers until the separator (period). + + Returns a pointer to the import name, or NULL if no matching name was + located. + + This function parses through the PE header for the module as loaded in + memory by the system loader. The PE header is accessed as documented by + Microsoft in the MSDN PE and COFF specification (2/99), and handles + both PE32 and PE32+. It only worries about the direct import table and + not the delay load import table since it's unlikely an extension is + going to be delay loading Python (after all, it's already loaded). + + If any magic values are not found (e.g., the PE header or optional + header magic), then this function simply returns NULL. */ + + #define DWORD_AT(mem) (*(DWORD *)(mem)) + #define WORD_AT(mem) (*(WORD *)(mem)) + + static char *GetPythonImport (HINSTANCE hModule) + { + unsigned char *dllbase, *import_data, *import_name; + DWORD pe_offset, opt_offset; + WORD opt_magic; + int num_dict_off, import_off; + + /* Safety check input */ + if (hModule == NULL) { + return NULL; + } + + /* Module instance is also the base load address. First portion of + memory is the MS-DOS loader, which holds the offset to the PE + header (from the load base) at 0x3C */ + dllbase = (unsigned char *)hModule; + pe_offset = DWORD_AT(dllbase + 0x3C); + + /* The PE signature must be "PE\0\0" */ + if (memcmp(dllbase+pe_offset,"PE\0\0",4)) { + return NULL; + } + + /* Following the PE signature is the standard COFF header (20 + bytes) and then the optional header. The optional header starts + with a magic value of 0x10B for PE32 or 0x20B for PE32+ (PE32+ + uses 64-bits for some fields). It might also be 0x107 for a ROM + image, but we don't process that here. + + The optional header ends with a data dictionary that directly + points to certain types of data, among them the import entries + (in the second table entry). Based on the header type, we + determine offsets for the data dictionary count and the entry + within the dictionary pointing to the imports. */ + + opt_offset = pe_offset + 4 + 20; + opt_magic = WORD_AT(dllbase+opt_offset); + if (opt_magic == 0x10B) { + /* PE32 */ + num_dict_off = 92; + import_off = 104; + } else if (opt_magic == 0x20B) { + /* PE32+ */ + num_dict_off = 108; + import_off = 120; + } else { + /* Unsupported */ + return NULL; + } + + /* Now if an import table exists, offset to it and walk the list of + imports. The import table is an array (ending when an entry has + empty values) of structures (20 bytes each), which contains (at + offset 12) a relative address (to the module base) at which a + string constant holding the import name is located. */ + + if (DWORD_AT(dllbase + opt_offset + num_dict_off) >= 2) { + import_data = dllbase + DWORD_AT(dllbase + + opt_offset + + import_off); + while (DWORD_AT(import_data)) { + import_name = dllbase + DWORD_AT(import_data+12); + if (strlen(import_name) >= 6 && + !strncmp(import_name,"python",6)) { + char *pch; + + /* Ensure python prefix is followed only + by numbers to the end of the basename */ + pch = import_name + 6; + while (*pch && *pch != '.') { + if (*pch >= '0' && *pch <= '9') { + pch++; + } else { + pch = NULL; + break; + } + } + + if (pch) { + /* Found it - return the name */ + return import_name; + } + } + import_data += 20; + } + } + + return NULL; + } + #endif /* MS_WIN32 */ + + dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, const char *pathname, FILE *fp) { dl_funcptr p; ! char funcname[258], *import_python; sprintf(funcname, "init%.200s", shortname); *************** *** 92,95 **** --- 226,246 ---- PyErr_SetString(PyExc_ImportError, errBuf); return NULL; + } else { + char buffer[256]; + + sprintf(buffer,"python%d%d.dll", + PY_MAJOR_VERSION,PY_MINOR_VERSION); + import_python = GetPythonImport(hDLL); + + if (import_python && + strcasecmp(buffer,import_python)) { + sprintf(buffer, + "Module use of %s conflicts " + "with this version of Python.", + import_python); + PyErr_SetString(PyExc_ImportError,buffer); + FreeLibrary(hDLL); + return NULL; + } } p = GetProcAddress(hDLL, funcname); From python-dev@python.org Thu Oct 5 13:35:33 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 5 Oct 2000 05:35:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.54,1.55 Message-ID: <200010051235.FAA06638@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6488 Modified Files: libre.tex Log Message: Document expand() method of MatchObjects Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** libre.tex 2000/09/25 17:52:40 1.54 --- libre.tex 2000/10/05 12:35:29 1.55 *************** *** 598,601 **** --- 598,610 ---- \class{MatchObject} instances support the following methods and attributes: + \begin{methoddesc}[MatchObject]{expand}{template} + Return the string obtained by doing backslash substitution on the + template string \var{template}, as done by the \method{sub()} method. + Escapes such as \samp{\e n} are converted to the appropriate + characters, and numeric backreferences (\samp{\e 1}, \samp{\e 2}) and named + backreferences (\samp{\e g<1>}, \samp{\e g}) are replaced by the contents of the + corresponding group. + \end{methoddesc} + \begin{methoddesc}[MatchObject]{group}{\optional{group1, \moreargs}} Returns one or more subgroups of the match. If there is a single From python-dev@python.org Thu Oct 5 13:43:27 2000 From: python-dev@python.org (Thomas Wouters) Date: Thu, 5 Oct 2000 05:43:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.54,2.55 Message-ID: <200010051243.FAA13743@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv11586/Objects Modified Files: abstract.c Log Message: Fix for SF bug #115987: PyInstance_HalfBinOp does not initialize the result-object-pointer that is passed in, when an exception occurs during coercion. The pointer has to be explicitly initialized in the caller to avoid putting trash on the Python stack. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.54 retrieving revision 2.55 diff -C2 -r2.54 -r2.55 *** abstract.c 2000/09/02 08:34:40 2.54 --- abstract.c 2000/10/05 12:43:25 2.55 *************** *** 652,656 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 652,656 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 684,688 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 684,688 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 716,720 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 716,720 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 748,752 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 748,752 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 780,784 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 780,784 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 812,816 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 812,816 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 856,860 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 856,860 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 889,893 **** PyObject * (*f)(PyObject *, PyObject *) = NULL; PyObject * (*g)(PyObject *, int) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 889,893 ---- PyObject * (*f)(PyObject *, PyObject *) = NULL; PyObject * (*g)(PyObject *, int) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 956,960 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 956,960 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 988,992 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 988,992 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 1027,1031 **** { PyObject * (*f)(PyObject *, PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 1027,1031 ---- { PyObject * (*f)(PyObject *, PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { From python-dev@python.org Thu Oct 5 15:35:18 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 5 Oct 2000 07:35:18 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.43,1.44 Message-ID: <200010051435.HAA11846@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv11392 Modified Files: pep-0200.txt Log Message: update schedule for 2.0c1; add explanation of release candidate Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** pep-0200.txt 2000/09/14 20:53:48 1.43 --- pep-0200.txt 2000/10/05 14:35:13 1.44 *************** *** 17,24 **** Tentative Release Schedule ! [revised 14 Sep 2000] 26-Sep-2000: 2.0 beta 2 ! 10-Oct-2000: 2.0 final Previous milestones --- 17,25 ---- Tentative Release Schedule ! [revised 5 Oct 2000] 26-Sep-2000: 2.0 beta 2 ! 9-Oct-2000: 2.0 release candidate 1 (2.0c1) ! 16-Oct-2000: 2.0 final Previous milestones *************** *** 26,29 **** --- 27,39 ---- 5-Sep-2000: 2.0 beta 1 + What is release candidate 1? + + We believe that release candidate 1 will fix all known bugs that + we intend to fix for the 2.0 final release. This release should + be a bit more stable than the previous betas. We would like to + see even more widespread testing before the final release, so we + are producing this release candidate. The final release will be + exactly the same unless any show-stopping (or brown bag) bugs are + found by testers of the release candidate. Guidelines for submitting patches and making changes From python-dev@python.org Thu Oct 5 16:22:32 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 5 Oct 2000 08:22:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.55,1.56 Message-ID: <200010051522.IAA18447@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18041 Modified Files: libre.tex Log Message: Document the lookbehind assertions (closing bug#115119) Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -r1.55 -r1.56 *** libre.tex 2000/10/05 12:35:29 1.55 --- libre.tex 2000/10/05 15:22:28 1.56 *************** *** 220,223 **** --- 220,238 ---- followed by \code{'Asimov'}. + \item[\code{(?<=...)}] Matches if the current position in the string + is preceded by a match for \regexp{...} that ends at the current + position. This is called a positive lookbehind assertion. + \regexp{(?<=abc)def} will match \samp{abcdef}, since the lookbehind + will back up 3 characters and check if the contained pattern matches. + The contained pattern must only match strings of some fixed length, + meaning that \regexp{abc} or \regexp{a|b} are allowed, but \regexp{a*} + isn't. + + \item[\code{(? Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv29107 Modified Files: pep-0042.txt Log Message: Added a section on Building and Installing; first entry: SF bug #110836 for configuring and building Python with a cross compiler. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** pep-0042.txt 2000/10/03 20:37:39 1.29 --- pep-0042.txt 2000/10/05 15:36:34 1.30 *************** *** 63,66 **** --- 63,67 ---- http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115143 + Standard Library *************** *** 187,190 **** --- 188,199 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110820&group_id=5470 + + + Building and Installing + + - You should be able to configure and build Python with a + cross-compiler. + + https://sourceforge.net/bugs/?func=detailbug&bug_id=110836&group_id=5470 From python-dev@python.org Thu Oct 5 18:24:37 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 5 Oct 2000 10:24:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib quopri.py,1.6,1.7 Message-ID: <200010051724.KAA17612@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv17268 Modified Files: quopri.py Log Message: Fix Bug #115907: encode '=' as '=3D' and not '==' Index: quopri.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/quopri.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** quopri.py 2000/02/04 15:28:40 1.6 --- quopri.py 2000/10/05 17:24:33 1.7 *************** *** 10,149 **** def needsquoting(c, quotetabs): ! """Decide whether a particular character needs to be quoted. ! The 'quotetabs' flag indicates whether tabs should be quoted.""" ! if c == '\t': ! return not quotetabs ! return c == ESCAPE or not(' ' <= c <= '~') def quote(c): ! """Quote a single character.""" ! if c == ESCAPE: ! return ESCAPE * 2 ! else: ! i = ord(c) ! return ESCAPE + HEX[i/16] + HEX[i%16] def encode(input, output, quotetabs): ! """Read 'input', apply quoted-printable encoding, and write to 'output'. ! 'input' and 'output' are files with readline() and write() methods. ! The 'quotetabs' flag indicates whether tabs should be quoted.""" ! while 1: ! line = input.readline() ! if not line: break ! new = '' ! last = line[-1:] ! if last == '\n': line = line[:-1] ! else: last = '' ! prev = '' ! for c in line: ! if needsquoting(c, quotetabs): ! c = quote(c) ! if len(new) + len(c) >= MAXLINESIZE: ! output.write(new + ESCAPE + '\n') ! new = '' ! new = new + c ! prev = c ! if prev in (' ', '\t'): ! output.write(new + ESCAPE + '\n\n') ! else: ! output.write(new + '\n') def decode(input, output): ! """Read 'input', apply quoted-printable decoding, and write to 'output'. ! 'input' and 'output' are files with readline() and write() methods.""" ! new = '' ! while 1: ! line = input.readline() ! if not line: break ! i, n = 0, len(line) ! if n > 0 and line[n-1] == '\n': ! partial = 0; n = n-1 ! # Strip trailing whitespace ! while n > 0 and line[n-1] in (' ', '\t'): ! n = n-1 ! else: ! partial = 1 ! while i < n: ! c = line[i] ! if c <> ESCAPE: ! new = new + c; i = i+1 ! elif i+1 == n and not partial: ! partial = 1; break ! elif i+1 < n and line[i+1] == ESCAPE: ! new = new + ESCAPE; i = i+2 ! elif i+2 < n and ishex(line[i+1]) and ishex(line[i+2]): ! new = new + chr(unhex(line[i+1:i+3])); i = i+3 ! else: # Bad escape sequence -- leave it in ! new = new + c; i = i+1 ! if not partial: ! output.write(new + '\n') ! new = '' ! if new: ! output.write(new) def ishex(c): ! """Return true if the character 'c' is a hexadecimal digit.""" ! return '0' <= c <= '9' or 'a' <= c <= 'f' or 'A' <= c <= 'F' def unhex(s): ! """Get the integer value of a hexadecimal number.""" ! bits = 0 ! for c in s: ! if '0' <= c <= '9': ! i = ord('0') ! elif 'a' <= c <= 'f': ! i = ord('a')-10 ! elif 'A' <= c <= 'F': ! i = ord('A')-10 ! else: ! break ! bits = bits*16 + (ord(c) - i) ! return bits def test(): ! import sys ! import getopt ! try: ! opts, args = getopt.getopt(sys.argv[1:], 'td') ! except getopt.error, msg: ! sys.stdout = sys.stderr ! print msg ! print "usage: quopri [-t | -d] [file] ..." ! print "-t: quote tabs" ! print "-d: decode; default encode" ! sys.exit(2) ! deco = 0 ! tabs = 0 ! for o, a in opts: ! if o == '-t': tabs = 1 ! if o == '-d': deco = 1 ! if tabs and deco: ! sys.stdout = sys.stderr ! print "-t and -d are mutually exclusive" ! sys.exit(2) ! if not args: args = ['-'] ! sts = 0 ! for file in args: ! if file == '-': ! fp = sys.stdin ! else: ! try: ! fp = open(file) ! except IOError, msg: ! sys.stderr.write("%s: can't open (%s)\n" % (file, msg)) ! sts = 1 ! continue ! if deco: ! decode(fp, sys.stdout) ! else: ! encode(fp, sys.stdout, tabs) ! if fp is not sys.stdin: ! fp.close() ! if sts: ! sys.exit(sts) if __name__ == '__main__': ! test() --- 10,150 ---- def needsquoting(c, quotetabs): ! """Decide whether a particular character needs to be quoted. ! The 'quotetabs' flag indicates whether tabs should be quoted.""" ! if c == '\t': ! return not quotetabs ! return c == ESCAPE or not(' ' <= c <= '~') def quote(c): ! """Quote a single character.""" ! i = ord(c) ! return ESCAPE + HEX[i/16] + HEX[i%16] def encode(input, output, quotetabs): ! """Read 'input', apply quoted-printable encoding, and write to 'output'. ! 'input' and 'output' are files with readline() and write() methods. ! The 'quotetabs' flag indicates whether tabs should be quoted. ! """ ! while 1: ! line = input.readline() ! if not line: ! break ! new = '' ! last = line[-1:] ! if last == '\n': ! line = line[:-1] ! else: ! last = '' ! prev = '' ! for c in line: ! if needsquoting(c, quotetabs): ! c = quote(c) ! if len(new) + len(c) >= MAXLINESIZE: ! output.write(new + ESCAPE + '\n') ! new = '' ! new = new + c ! prev = c ! if prev in (' ', '\t'): ! output.write(new + ESCAPE + '\n\n') ! else: ! output.write(new + '\n') def decode(input, output): ! """Read 'input', apply quoted-printable decoding, and write to 'output'. ! 'input' and 'output' are files with readline() and write() methods.""" ! new = '' ! while 1: ! line = input.readline() ! if not line: break ! i, n = 0, len(line) ! if n > 0 and line[n-1] == '\n': ! partial = 0; n = n-1 ! # Strip trailing whitespace ! while n > 0 and line[n-1] in (' ', '\t'): ! n = n-1 ! else: ! partial = 1 ! while i < n: ! c = line[i] ! if c <> ESCAPE: ! new = new + c; i = i+1 ! elif i+1 == n and not partial: ! partial = 1; break ! elif i+1 < n and line[i+1] == ESCAPE: ! new = new + ESCAPE; i = i+2 ! elif i+2 < n and ishex(line[i+1]) and ishex(line[i+2]): ! new = new + chr(unhex(line[i+1:i+3])); i = i+3 ! else: # Bad escape sequence -- leave it in ! new = new + c; i = i+1 ! if not partial: ! output.write(new + '\n') ! new = '' ! if new: ! output.write(new) def ishex(c): ! """Return true if the character 'c' is a hexadecimal digit.""" ! return '0' <= c <= '9' or 'a' <= c <= 'f' or 'A' <= c <= 'F' def unhex(s): ! """Get the integer value of a hexadecimal number.""" ! bits = 0 ! for c in s: ! if '0' <= c <= '9': ! i = ord('0') ! elif 'a' <= c <= 'f': ! i = ord('a')-10 ! elif 'A' <= c <= 'F': ! i = ord('A')-10 ! else: ! break ! bits = bits*16 + (ord(c) - i) ! return bits def test(): ! import sys ! import getopt ! try: ! opts, args = getopt.getopt(sys.argv[1:], 'td') ! except getopt.error, msg: ! sys.stdout = sys.stderr ! print msg ! print "usage: quopri [-t | -d] [file] ..." ! print "-t: quote tabs" ! print "-d: decode; default encode" ! sys.exit(2) ! deco = 0 ! tabs = 0 ! for o, a in opts: ! if o == '-t': tabs = 1 ! if o == '-d': deco = 1 ! if tabs and deco: ! sys.stdout = sys.stderr ! print "-t and -d are mutually exclusive" ! sys.exit(2) ! if not args: args = ['-'] ! sts = 0 ! for file in args: ! if file == '-': ! fp = sys.stdin ! else: ! try: ! fp = open(file) ! except IOError, msg: ! sys.stderr.write("%s: can't open (%s)\n" % (file, msg)) ! sts = 1 ! continue ! if deco: ! decode(fp, sys.stdout) ! else: ! encode(fp, sys.stdout, tabs) ! if fp is not sys.stdin: ! fp.close() ! if sts: ! sys.exit(sts) if __name__ == '__main__': ! test() From python-dev@python.org Thu Oct 5 18:25:53 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Thu, 5 Oct 2000 10:25:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.21,2.22 Message-ID: <200010051725.KAA18603@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv18477/Include Modified Files: pyport.h Log Message: Added Py_FPROTO macro which was available in Python 1.5.x and below. This should not be used for new code, but will probably make porting old extensions to 2.0 a lot easier. Also see Bug #116011. Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** pyport.h 2000/10/05 01:42:23 2.21 --- pyport.h 2000/10/05 17:25:45 2.22 *************** *** 40,43 **** --- 40,46 ---- #define Py_PROTO(x) () #endif + #ifndef Py_FPROTO + #define Py_FPROTO(x) Py_PROTO(x) + #endif /* typedefs for some C9X-defined synonyms for integral types. From python-dev@python.org Thu Oct 5 19:00:11 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 5 Oct 2000 11:00:11 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.156,1.157 configure.in,1.165,1.166 Message-ID: <200010051800.LAA16367@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv15671 Modified Files: configure configure.in Log Message: [ Patch #101730 ] Add initial static support for Darwin/MacOSX. By D.K. Wolfe. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -r1.156 -r1.157 *** configure 2000/09/26 16:57:37 1.156 --- configure 2000/10/05 18:00:05 1.157 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.165 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.166 [...4025 lines suppressed...] echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5885: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5888,5897 ---- EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5891: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -r1.165 -r1.166 *** configure.in 2000/09/25 15:08:45 1.165 --- configure.in 2000/10/05 18:00:06 1.166 *************** *** 9,13 **** VERSION=2.0 ! # NEXTSTEP stuff if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then --- 9,13 ---- VERSION=2.0 ! # NEXTSTEP|MacOSX|Darwin stuff if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then *************** *** 25,40 **** if test -z "$MACHDEP" then set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \ ! sed -e 's/://' -e 's/\./_/'` && \ ! ac_sys_system=next && ac_sys_release=$4 ! MACHDEP="$ac_sys_system$ac_sys_release" fi fi AC_ARG_WITH(next-framework, ! [ --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework],,) AC_ARG_WITH(dyld, ! [ --with-dyld Use (OpenStep|Rhapsody|MacOSX) dynamic linker],,) # Set name for machine-dependent library files --- 25,45 ---- if test -z "$MACHDEP" then + ac_sys_system=`uname -s` + if test "$ac_sys_system" = "Darwin" ; then + ac_sys_release=`uname -r` + else set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \ ! sed -e 's/://' -e 's/\./_/'` && \ ! ac_sys_system=next && ac_sys_release=$4 ! fi ! MACHDEP="$ac_sys_system$ac_sys_release" fi fi AC_ARG_WITH(next-framework, ! [ --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework],,) AC_ARG_WITH(dyld, ! [ --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) dynamic linker],,) # Set name for machine-dependent library files *************** *** 575,584 **** OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; DYNIX/ptx*) LDSHARED="ld -G";; ! next/*) if test "$ns_dyld" then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi ! if test "$with_next_framework" ; then LDSHARED="$LDSHARED \$(LDLIBRARY)" fi ;; --- 580,589 ---- OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; DYNIX/ptx*) LDSHARED="ld -G";; ! Darwin/*|next/*) if test "$ns_dyld" then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi ! if test "$with_next_framework" ; then LDSHARED="$LDSHARED \$(LDLIBRARY)" fi ;; *************** *** 1151,1154 **** --- 1156,1160 ---- AC_SUBST(LIBM) case $ac_sys_system in + Darwin) ;; next) ;; BeOS) ;; From python-dev@python.org Thu Oct 5 19:45:55 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 5 Oct 2000 11:45:55 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.157,1.158 configure.in,1.166,1.167 Message-ID: <200010051845.LAA16072@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv14007 Modified Files: configure configure.in Log Message: Change all occurances of test -d "$directory" to test ! -z "directory" -a -d "directory" Apparently, on SunOS 4.1.4_JL (and other?) OSes, -d on an empty string always returns true. This closes SF bug #115392. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.157 retrieving revision 1.158 diff -C2 -r1.157 -r1.158 *** configure 2000/10/05 18:00:05 1.157 --- configure 2000/10/05 18:45:52 1.158 *************** *** 3103,3110 **** USE_THREAD_MODULE="#" else ! if test -d "$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test -d "$withval" then LDFLAGS="$LDFLAGS -L$withval" fi --- 3103,3110 ---- USE_THREAD_MODULE="#" else ! if test ! -z $with_threads -a -d $with_threads then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z $withval -a -d $withval then LDFLAGS="$LDFLAGS -L$withval" fi *************** *** 3783,3787 **** DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test -d "$dldir" then LDFLAGS="$LDFLAGS -L$dldir" else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; } --- 3783,3787 ---- DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z $dldir -a -d $dldir then LDFLAGS="$LDFLAGS -L$dldir" else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; } *************** *** 3808,3812 **** dldir=`echo "$withval" | sed 's/,.*//'` dlddir=`echo "$withval" | sed 's/.*,//'` ! if test -d "$dldir" -a -d "$dlddir" then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; } --- 3808,3812 ---- dldir=`echo "$withval" | sed 's/,.*//'` dlddir=`echo "$withval" | sed 's/.*,//'` ! if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir" then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; } Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -r1.166 -r1.167 *** configure.in 2000/10/05 18:00:06 1.166 --- configure.in 2000/10/05 18:45:53 1.167 *************** *** 751,758 **** USE_THREAD_MODULE="#" else ! if test -d "$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test -d "$withval" then LDFLAGS="$LDFLAGS -L$withval" fi --- 751,758 ---- USE_THREAD_MODULE="#" else ! if test ! -z $with_threads -a -d $with_threads then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z $withval -a -d $withval then LDFLAGS="$LDFLAGS -L$withval" fi *************** *** 890,894 **** DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test -d "$dldir" then LDFLAGS="$LDFLAGS -L$dldir" else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY) --- 890,894 ---- DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z $dldir -a -d $dldir then LDFLAGS="$LDFLAGS -L$dldir" else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY) *************** *** 904,908 **** dldir=`echo "$withval" | sed 's/,.*//'` dlddir=`echo "$withval" | sed 's/.*,//'` ! if test -d "$dldir" -a -d "$dlddir" then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" else AC_ERROR(proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY) --- 904,908 ---- dldir=`echo "$withval" | sed 's/,.*//'` dlddir=`echo "$withval" | sed 's/.*,//'` ! if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir" then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" else AC_ERROR(proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY) From python-dev@python.org Thu Oct 5 19:48:16 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 5 Oct 2000 11:48:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib gettext.py,1.7,1.8 Message-ID: <200010051848.LAA19047@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18967 Modified Files: gettext.py Log Message: translation(): Minor optimization patch which avoids instantiating the default value's instance unless it's absolutely necessary. Index: gettext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/gettext.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** gettext.py 2000/09/01 02:20:20 1.7 --- gettext.py 2000/10/05 18:48:12 1.8 *************** *** 236,240 **** key = os.path.abspath(mofile) # TBD: do we need to worry about the file pointer getting collected? ! t = _translations.setdefault(key, class_(open(mofile, 'rb'))) return t --- 236,244 ---- key = os.path.abspath(mofile) # TBD: do we need to worry about the file pointer getting collected? ! # Avoid opening, reading, and parsing the .mo file after it's been done ! # once. ! t = _translations.get(key) ! if t is None: ! t = _translations.setdefault(key, class_(open(mofile, 'rb'))) return t From python-dev@python.org Thu Oct 5 20:24:28 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 5 Oct 2000 12:24:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.111,1.112 Message-ID: <200010051924.MAA29161@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27047/python/dist/src/Modules Modified Files: _tkinter.c Log Message: SF "bug" 115973: patches from Norman Vine so that shared libraries and Tkinter work under Cygwin. Accepted on faith & reasonableness. Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -r1.111 -r1.112 *** _tkinter.c 2000/09/01 23:29:26 1.111 --- _tkinter.c 2000/10/05 19:24:25 1.112 *************** *** 58,62 **** #endif ! #if !defined(MS_WINDOWS) #define HAVE_CREATEFILEHANDLER #endif --- 58,62 ---- #endif ! #if !(defined(MS_WINDOWS) || defined(__CYGWIN__)) #define HAVE_CREATEFILEHANDLER #endif From python-dev@python.org Thu Oct 5 20:24:28 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 5 Oct 2000 12:24:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python dynload_shlib.c,2.5,2.6 Message-ID: <200010051924.MAA29166@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv27047/python/dist/src/Python Modified Files: dynload_shlib.c Log Message: SF "bug" 115973: patches from Norman Vine so that shared libraries and Tkinter work under Cygwin. Accepted on faith & reasonableness. Index: dynload_shlib.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_shlib.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** dynload_shlib.c 2000/09/01 23:29:28 2.5 --- dynload_shlib.c 2000/10/05 19:24:26 2.6 *************** *** 23,28 **** --- 23,33 ---- const struct filedescr _PyImport_DynLoadFiletab[] = { + #ifdef __CYGWIN__ + {".pyd", "rb", C_EXTENSION}, + {".dll", "rb", C_EXTENSION}, + #else {".so", "rb", C_EXTENSION}, {"module.so", "rb", C_EXTENSION}, + #endif {0, 0} }; From python-dev@python.org Thu Oct 5 20:36:52 2000 From: python-dev@python.org (Neil Schemenauer) Date: Thu, 5 Oct 2000 12:36:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects tupleobject.c,2.46,2.47 Message-ID: <200010051936.MAA08993@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv6491/Objects Modified Files: tupleobject.c Log Message: Simplify _PyTuple_Resize by not using the tuple free list and dropping support for the last_is_sticky flag. A few hard to find bugs may be fixed by this patch since the old code was buggy. Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** tupleobject.c 2000/09/15 07:32:39 2.46 --- tupleobject.c 2000/10/05 19:36:49 2.47 *************** *** 425,433 **** it changes the size of a tuple. We get away with this only if there is only one module referencing the object. You can also think of it ! as creating a new tuple object and destroying the old one, only ! more efficiently. In any case, don't use this if the tuple may ! already be known to some other part of the code... ! If last_is_sticky is set, the tuple will grow or shrink at the ! front, otherwise it will grow or shrink at the end. */ int --- 425,432 ---- it changes the size of a tuple. We get away with this only if there is only one module referencing the object. You can also think of it ! as creating a new tuple object and destroying the old one, only more ! efficiently. In any case, don't use this if the tuple may already be ! known to some other part of the code. The last_is_sticky is not used ! and must always be false. */ int *************** *** 440,446 **** v = (PyTupleObject *) *pv; ! if (v == NULL || !PyTuple_Check(v) || v->ob_refcnt != 1) { *pv = 0; ! Py_DECREF(v); PyErr_BadInternalCall(); return -1; --- 439,446 ---- v = (PyTupleObject *) *pv; ! if (v == NULL || !PyTuple_Check(v) || v->ob_refcnt != 1 || ! last_is_sticky) { *pv = 0; ! Py_XDECREF(v); PyErr_BadInternalCall(); return -1; *************** *** 449,543 **** if (sizediff == 0) return 0; /* XXX UNREF/NEWREF interface should be more symmetrical */ #ifdef Py_REF_DEBUG --_Py_RefTotal; #endif ! _Py_ForgetReference((PyObject *)v); ! if (last_is_sticky && sizediff < 0) { ! /* shrinking: ! move entries to the front and zero moved entries */ ! for (i = 0; i < newsize; i++) { ! Py_XDECREF(v->ob_item[i]); ! v->ob_item[i] = v->ob_item[i - sizediff]; ! v->ob_item[i - sizediff] = NULL; ! } ! } for (i = newsize; i < v->ob_size; i++) { Py_XDECREF(v->ob_item[i]); v->ob_item[i] = NULL; - } - #if MAXSAVESIZE > 0 - if (newsize == 0 && free_tuples[0]) { - num_free_tuples[0]--; - sv = free_tuples[0]; - sv->ob_size = 0; - Py_INCREF(sv); - #ifdef COUNT_ALLOCS - tuple_zero_allocs++; - #endif - tupledealloc(v); - *pv = (PyObject*) sv; - return 0; } ! if (0 < newsize && newsize < MAXSAVESIZE && ! (sv = free_tuples[newsize]) != NULL) ! { ! free_tuples[newsize] = (PyTupleObject *) sv->ob_item[0]; ! num_free_tuples[newsize]--; ! #ifdef COUNT_ALLOCS ! fast_tuple_allocs++; ! #endif ! #ifdef Py_TRACE_REFS ! sv->ob_type = &PyTuple_Type; ! #endif ! for (i = 0; i < newsize; ++i){ ! sv->ob_item[i] = v->ob_item[i]; ! v->ob_item[i] = NULL; ! } ! sv->ob_size = v->ob_size; ! tupledealloc(v); ! *pv = (PyObject *) sv; ! } else ! #endif ! { ! #ifdef WITH_CYCLE_GC ! PyGC_Head *g = PyObject_AS_GC((PyObject *)v); ! PyObject_GC_Fini((PyObject *)v); ! g = (PyGC_Head *) ! PyObject_REALLOC((char *)g, sizeof(PyTupleObject) ! + PyGC_HEAD_SIZE ! + newsize * sizeof(PyObject *)); ! if (g == NULL) { ! sv = NULL; ! } else { ! sv = (PyTupleObject *)PyObject_FROM_GC(g); ! } ! #else ! sv = (PyTupleObject *) ! PyObject_REALLOC((char *)v, sizeof(PyTupleObject) ! + PyGC_HEAD_SIZE ! + newsize * sizeof(PyObject *)); ! #endif ! *pv = (PyObject *) sv; ! if (sv == NULL) { ! PyObject_GC_Init((PyObject *)v); ! v = (PyTupleObject *) PyObject_AS_GC(v); ! PyObject_DEL(v); ! PyErr_NoMemory(); ! return -1; ! } } ! _Py_NewReference((PyObject *)sv); for (i = sv->ob_size; i < newsize; i++) sv->ob_item[i] = NULL; - if (last_is_sticky && sizediff > 0) { - /* growing: move entries to the end and zero moved entries */ - for (i = newsize - 1; i >= sizediff; i--) { - sv->ob_item[i] = sv->ob_item[i - sizediff]; - sv->ob_item[i - sizediff] = NULL; - } - } - PyObject_GC_Init(sv); sv->ob_size = newsize; return 0; } --- 449,481 ---- if (sizediff == 0) return 0; + /* XXX UNREF/NEWREF interface should be more symmetrical */ #ifdef Py_REF_DEBUG --_Py_RefTotal; #endif ! _Py_ForgetReference((PyObject *) v); for (i = newsize; i < v->ob_size; i++) { Py_XDECREF(v->ob_item[i]); v->ob_item[i] = NULL; } ! PyObject_GC_Fini(v); ! v = (PyTupleObject *) PyObject_AS_GC(v); ! sv = (PyTupleObject *) PyObject_REALLOC((char *)v, ! sizeof(PyTupleObject) ! + PyGC_HEAD_SIZE ! + newsize * sizeof(PyObject *)); ! if (sv == NULL) { ! *pv = NULL; ! PyObject_DEL(v); ! PyErr_NoMemory(); ! return -1; } ! sv = (PyTupleObject *) PyObject_FROM_GC(sv); ! _Py_NewReference((PyObject *) sv); for (i = sv->ob_size; i < newsize; i++) sv->ob_item[i] = NULL; sv->ob_size = newsize; + *pv = (PyObject *) sv; + PyObject_GC_Init(sv); return 0; } From python-dev@python.org Thu Oct 5 20:38:28 2000 From: python-dev@python.org (Neil Schemenauer) Date: Thu, 5 Oct 2000 12:38:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.93,1.94 Message-ID: <200010051938.MAA10874@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv9591/Doc/api Modified Files: api.tex Log Message: The _PyTuple_Resize() last_is_sticky flag must now always be false. Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -r1.93 -r1.94 *** api.tex 2000/09/29 17:31:54 1.93 --- api.tex 2000/10/05 19:38:24 1.94 *************** *** 3071,3080 **** this should only be used if there is only one reference to the object. Do \emph{not} use this if the tuple may already be known to some other ! part of the code. \var{last_is_sticky} is a flag --- if true, the ! tuple will grow or shrink at the front, otherwise it will grow or ! shrink at the end. Think of this as destroying the old tuple and ! creating a new one, only more efficiently. Returns \code{0} on ! success and \code{-1} on failure (in which case a ! \exception{MemoryError} or \exception{SystemError} will be raised). \end{cfuncdesc} --- 3071,3080 ---- this should only be used if there is only one reference to the object. Do \emph{not} use this if the tuple may already be known to some other ! part of the code. The tuple will always grow or shrink at the end. The ! \var{last_is_sticky} flag is not used and should always be false. Think ! of this as destroying the old tuple and creating a new one, only more ! efficiently. Returns \code{0} on success and \code{-1} on failure (in ! which case a \exception{MemoryError} or \exception{SystemError} will be ! raised). \end{cfuncdesc} From python-dev@python.org Thu Oct 5 21:42:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 5 Oct 2000 13:42:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib rexec.py,1.25,1.26 Message-ID: <200010052042.NAA28447@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv28409 Modified Files: rexec.py Log Message: Add support for "import re" -- it uses pre, but user code does not need to. Index: rexec.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/rexec.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** rexec.py 1998/09/21 14:53:26 1.25 --- rexec.py 2000/10/05 20:42:44 1.26 *************** *** 154,157 **** --- 154,160 ---- self.loader = RModuleLoader(self.hooks, verbose) self.importer = RModuleImporter(self.loader, verbose) + # but since re isn't normally built-in, we can add it at the end; + # we need the imported to be set before this can be imported. + self.make_re() def set_trusted_path(self): *************** *** 198,201 **** --- 201,211 ---- for key, value in os.environ.items(): e[key] = value + + def make_re(self): + dst = self.add_module("re") + src = self.r_import("pre") + for name in dir(src): + if name != "__name__": + setattr(dst, name, getattr(src, name)) def make_sys(self): From python-dev@python.org Thu Oct 5 23:10:37 2000 From: python-dev@python.org (Mark Hammond) Date: Thu, 5 Oct 2000 15:10:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC frozen_dllmain.c,1.2,1.3 Message-ID: <200010052210.PAA02642@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv2564 Modified Files: frozen_dllmain.c Log Message: Remove some debugging messages - although this code is a complete hack, we dont need to announce it to the world every time they use freeze! Index: frozen_dllmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/frozen_dllmain.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** frozen_dllmain.c 2000/07/22 19:25:51 1.2 --- frozen_dllmain.c 2000/10/05 22:10:33 1.3 *************** *** 65,69 **** char **modName; for (modName = possibleModules;*modName;*modName++) { ! printf("Initialising '%s'\n", *modName); CallModuleDllMain(*modName, DLL_PROCESS_ATTACH); } --- 65,69 ---- char **modName; for (modName = possibleModules;*modName;*modName++) { ! /* printf("Initialising '%s'\n", *modName); */ CallModuleDllMain(*modName, DLL_PROCESS_ATTACH); } *************** *** 81,85 **** modName >= possibleModules; *modName--) { ! printf("Terminating '%s'\n", *modName); CallModuleDllMain(*modName, DLL_PROCESS_DETACH); } --- 81,85 ---- modName >= possibleModules; *modName--) { ! /* printf("Terminating '%s'\n", *modName);*/ CallModuleDllMain(*modName, DLL_PROCESS_DETACH); } From python-dev@python.org Fri Oct 6 01:10:58 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 5 Oct 2000 17:10:58 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.30,1.31 Message-ID: <200010060010.RAA05070@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv5035 Modified Files: pep-0042.txt Log Message: Add pickle/cPickle exception wish. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** pep-0042.txt 2000/10/05 15:36:34 1.30 --- pep-0042.txt 2000/10/06 00:10:56 1.31 *************** *** 177,180 **** --- 177,185 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110834&group_id=5470 + - The exceptions raised by pickle and cPickle are currently + different; these should be unified (probably the exceptions + should be defined in a helper module that's imported by both). + [No bug report; I just thought of this.] + Tools From python-dev@python.org Fri Oct 6 01:36:12 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 5 Oct 2000 17:36:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_pow.py,1.4,1.5 Message-ID: <200010060036.RAA30217@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv24366/python/dist/src/Lib/test Modified Files: test_pow.py Log Message: SF bug 115831 and Ping's SF patch 101751, 0.0**-2.0 returns inf rather than raise ValueError. Checked in the patch as far as it went, but also changed all of ints, longs and floats to raise ZeroDivisionError instead when raising 0 to a negative number. This is what 754-inspired stds require, as the "true result" is an infinity obtained from finite operands, i.e. it's a singularity. Also changed float pow to not be so timid about using its square-and-multiply algorithm. Note that what math.pow does is unrelated to what builtin pow does, and will still vary by platform. Index: test_pow.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pow.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_pow.py 1999/12/23 15:36:42 1.4 --- test_pow.py 2000/10/06 00:36:08 1.5 *************** *** 3,27 **** def powtest(type): ! if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): ! if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' ! if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) ! if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+str(i)+') != 0' ! if (pow(type(1),1)!=type(1)): raise ValueError, 'pow(1,'+str(i)+') != 1' ! for i in range(-100, 100): ! if (pow(type(i),3)!=i*i*i): raise ValueError, 'pow('+str(i)+',3) != '+str(i*i*i) ! pow2=1 for i in range(0,31): ! if (pow(2,i)!=pow2): raise ValueError, 'pow(2,'+str(i)+') != '+str(pow2) ! if (i!=30): pow2=pow2*2 print " Testing 3-argument pow() function..." --- 3,52 ---- def powtest(type): ! if type != float: print " Testing 2-argument pow() function..." for i in range(-1000, 1000): ! if pow(type(i), 0) != 1: raise ValueError, 'pow('+str(i)+',0) != 1' ! if pow(type(i), 1) != type(i): raise ValueError, 'pow('+str(i)+',1) != '+str(i) ! if pow(type(0), 1) != type(0): raise ValueError, 'pow(0,'+str(i)+') != 0' ! if pow(type(1), 1) != type(1): raise ValueError, 'pow(1,'+str(i)+') != 1' ! for i in range(-100, 100): ! if pow(type(i), 3) != i*i*i: raise ValueError, 'pow('+str(i)+',3) != '+str(i*i*i) ! pow2 = 1 for i in range(0,31): ! if pow(2, i) != pow2: raise ValueError, 'pow(2,'+str(i)+') != '+str(pow2) ! if i != 30 : pow2 = pow2*2 ! ! for othertype in int, long: ! for i in range(-10, 0) + range(1, 10): ! ii = type(i) ! for j in range(1, 11): ! jj = -othertype(j) ! try: ! pow(ii, jj) ! except ValueError: ! pass # taking an int to a neg int power should fail ! else: ! raise ValueError, "pow(%s, %s) did not fail" % (ii, jj) ! ! for othertype in int, long, float: ! for i in range(1, 100): ! zero = type(0) ! exp = -othertype(i/10.0) ! if exp == 0: ! continue ! try: ! pow(zero, exp) ! except ZeroDivisionError: ! pass # taking zero to any negative exponent should fail ! else: ! raise ValueError, "pow(%s, %s) did not fail" % (zero, exp) print " Testing 3-argument pow() function..." *************** *** 30,44 **** kl, kh = -10, 10 compare = cmp ! if (type==float): ! il=1 compare = test_support.fcmp ! elif (type==int): ! jl=0 ! elif (type==long): ! jl,jh = 0, 15 for i in range(il, ih+1): ! for j in range(jl,jh+1): for k in range(kl, kh+1): ! if (k!=0): if compare(pow(type(i),j,k), pow(type(i),j)% type(k)): raise ValueError, "pow(" +str(i)+ "," +str(j)+ \ --- 55,69 ---- kl, kh = -10, 10 compare = cmp ! if type == float: ! il = 1 compare = test_support.fcmp ! elif type == int: ! jl = 0 ! elif type == long: ! jl, jh = 0, 15 for i in range(il, ih+1): ! for j in range(jl, jh+1): for k in range(kl, kh+1): ! if k != 0: if compare(pow(type(i),j,k), pow(type(i),j)% type(k)): raise ValueError, "pow(" +str(i)+ "," +str(j)+ \ *************** *** 82,95 **** for j in range(0, 6): for k in range(-7, 11): ! if (j>=0 and k!=0): ! o=pow(i,j) % k ! n=pow(i,j,k) ! if (o!=n): print 'Integer mismatch:', i,j,k ! if (j>=0 and k<>0): ! o=pow(long(i),j) % k ! n=pow(long(i),j,k) ! if (o!=n): print 'Long mismatch:', i,j,k ! if (i>=0 and k<>0): ! o=pow(float(i),j) % k ! n=pow(float(i),j,k) ! if (o!=n): print 'Float mismatch:', i,j,k --- 107,120 ---- for j in range(0, 6): for k in range(-7, 11): ! if j >= 0 and k != 0: ! o = pow(i,j) % k ! n = pow(i,j,k) ! if o != n: print 'Integer mismatch:', i,j,k ! if j >= 0 and k <> 0: ! o = pow(long(i),j) % k ! n = pow(long(i),j,k) ! if o != n: print 'Long mismatch:', i,j,k ! if i >= 0 and k <> 0: ! o = pow(float(i),j) % k ! n = pow(float(i),j,k) ! if o != n: print 'Float mismatch:', i,j,k From python-dev@python.org Fri Oct 6 01:36:12 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 5 Oct 2000 17:36:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.73,2.74 intobject.c,2.51,2.52 longobject.c,1.67,1.68 Message-ID: <200010060036.RAA30230@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv24366/python/dist/src/Objects Modified Files: floatobject.c intobject.c longobject.c Log Message: SF bug 115831 and Ping's SF patch 101751, 0.0**-2.0 returns inf rather than raise ValueError. Checked in the patch as far as it went, but also changed all of ints, longs and floats to raise ZeroDivisionError instead when raising 0 to a negative number. This is what 754-inspired stds require, as the "true result" is an infinity obtained from finite operands, i.e. it's a singularity. Also changed float pow to not be so timid about using its square-and-multiply algorithm. Note that what math.pow does is unrelated to what builtin pow does, and will still vary by platform. Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.73 retrieving revision 2.74 diff -C2 -r2.73 -r2.74 *** floatobject.c 2000/09/26 05:46:01 2.73 --- floatobject.c 2000/10/06 00:36:09 2.74 *************** *** 450,467 **** iw = ((PyFloatObject *)w)->ob_fval; intw = (long)iw; ! if (iw == intw && -10000 < intw && intw < 10000) { ! /* Sort out special cases here instead of relying on pow() */ ! if (intw == 0) { /* x**0 is 1, even 0**0 */ ! PyFPE_START_PROTECT("pow", return 0) ! if ((PyObject *)z!=Py_None) { ! ix=fmod(1.0, z->ob_fval); ! if (ix!=0 && z->ob_fval<0) ix+=z->ob_fval; ! } ! else ix=1.0; ! PyFPE_END_PROTECT(ix) ! return PyFloat_FromDouble(ix); } errno = 0; ! PyFPE_START_PROTECT("pow", return 0) if (intw > 0) ix = powu(iv, intw); --- 450,480 ---- iw = ((PyFloatObject *)w)->ob_fval; intw = (long)iw; ! ! /* Sort out special cases here instead of relying on pow() */ ! if (iw == 0) { /* x**0 is 1, even 0**0 */ ! PyFPE_START_PROTECT("pow", return NULL) ! if ((PyObject *)z != Py_None) { ! ix = fmod(1.0, z->ob_fval); ! if (ix != 0 && z->ob_fval < 0) ! ix += z->ob_fval; } + else + ix = 1.0; + PyFPE_END_PROTECT(ix) + return PyFloat_FromDouble(ix); + } + if (iv == 0.0) { + if (iw < 0.0) { + PyErr_SetString(PyExc_ZeroDivisionError, + "0.0 to a negative power"); + return NULL; + } + return PyFloat_FromDouble(0.0); + } + + if (iw == intw && intw > LONG_MIN) { + /* ruled out LONG_MIN because -LONG_MIN isn't representable */ errno = 0; ! PyFPE_START_PROTECT("pow", return NULL) if (intw > 0) ix = powu(iv, intw); *************** *** 472,483 **** else { /* Sort out special cases here instead of relying on pow() */ - if (iv == 0.0) { - if (iw < 0.0) { - PyErr_SetString(PyExc_ValueError, - "0.0 to a negative power"); - return NULL; - } - return PyFloat_FromDouble(0.0); - } if (iv < 0.0) { PyErr_SetString(PyExc_ValueError, --- 485,488 ---- *************** *** 486,490 **** } errno = 0; ! PyFPE_START_PROTECT("pow", return 0) ix = pow(iv, iw); PyFPE_END_PROTECT(ix) --- 491,495 ---- } errno = 0; ! PyFPE_START_PROTECT("pow", return NULL) ix = pow(iv, iw); PyFPE_END_PROTECT(ix) *************** *** 496,506 **** return NULL; } ! if ((PyObject *)z!=Py_None) { ! PyFPE_START_PROTECT("pow", return 0) ! ix=fmod(ix, z->ob_fval); /* XXX To Be Rewritten */ ! if ( ix!=0 && ! ((iv<0 && z->ob_fval>0) || (iv>0 && z->ob_fval<0) )) { ! ix+=z->ob_fval; ! } PyFPE_END_PROTECT(ix) } --- 501,513 ---- return NULL; } ! if ((PyObject *)z != Py_None) { ! PyFPE_START_PROTECT("pow", return NULL) ! ix = fmod(ix, z->ob_fval); /* XXX To Be Rewritten */ ! if (ix != 0 && ! ((iv < 0 && z->ob_fval > 0) || ! (iv > 0 && z->ob_fval < 0) ! )) { ! ix += z->ob_fval; ! } PyFPE_END_PROTECT(ix) } Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.51 retrieving revision 2.52 diff -C2 -r2.51 -r2.52 *** intobject.c 2000/10/05 01:42:25 2.51 --- intobject.c 2000/10/06 00:36:09 2.52 *************** *** 484,489 **** iw = w->ob_ival; if (iw < 0) { ! PyErr_SetString(PyExc_ValueError, ! "integer to the negative power"); return NULL; } --- 484,493 ---- iw = w->ob_ival; if (iw < 0) { ! if (iv) ! PyErr_SetString(PyExc_ValueError, ! "integer to a negative power"); ! else ! PyErr_SetString(PyExc_ZeroDivisionError, ! "0 to a negative power"); return NULL; } Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -r1.67 -r1.68 *** longobject.c 2000/09/01 23:29:27 1.67 --- longobject.c 2000/10/06 00:36:09 1.68 *************** *** 1245,1250 **** size_b = b->ob_size; if (size_b < 0) { ! PyErr_SetString(PyExc_ValueError, ! "long integer to the negative power"); return NULL; } --- 1245,1254 ---- size_b = b->ob_size; if (size_b < 0) { ! if (a->ob_size) ! PyErr_SetString(PyExc_ValueError, ! "long integer to a negative power"); ! else ! PyErr_SetString(PyExc_ZeroDivisionError, ! "zero to a negative power"); return NULL; } From python-dev@python.org Fri Oct 6 01:38:55 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 5 Oct 2000 17:38:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-tk Canvas.py,1.14,1.15 Message-ID: <200010060038.RAA32463@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory slayer.i.sourceforge.net:/tmp/cvs-serv32398 Modified Files: Canvas.py Log Message: [ Bug #110677 ] PRIVATE: various minor Tkinter things (PR#388) http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=110677 Canvas.CanvasItem & Canvas.Group: - bind lacks an optional "add" param - unbind lacks an optional "funcid" param - tkraise/lower should call self.canvas.tag_XXXX (markus.oberhumer@jk.uni-linz.ac.at) Note: I'm *not* fixing "bbox() return value is inconsistent with Canvas.bbox()" -- it might break existing code. Index: Canvas.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Canvas.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** Canvas.py 1998/07/16 13:43:05 1.14 --- Canvas.py 2000/10/06 00:38:51 1.15 *************** *** 1,4 **** --- 1,7 ---- # This module exports classes for the various canvas item types + # NOTE: This module was an experiment and is now obsolete. + # It's best to use the Tkinter.Canvas class directly. + from Tkinter import Canvas, _cnfmerge, _flatten *************** *** 42,49 **** x1, y1, x2, y2 = self.canvas.bbox(self.id) return (x1, y1), (x2, y2) ! def bind(self, sequence=None, command=None): ! return self.canvas.tag_bind(self.id, sequence, command) ! def unbind(self, sequence): ! self.canvas.tag_bind(self.id, sequence, '') def config(self, cnf={}, **kw): return self.canvas.itemconfig(self.id, _cnfmerge((cnf, kw))) --- 45,52 ---- x1, y1, x2, y2 = self.canvas.bbox(self.id) return (x1, y1), (x2, y2) ! def bind(self, sequence=None, command=None, add=None): ! return self.canvas.tag_bind(self.id, sequence, command, add) ! def unbind(self, sequence, funcid=None): ! self.canvas.tag_unbind(self.id, sequence, funcid) def config(self, cnf={}, **kw): return self.canvas.itemconfig(self.id, _cnfmerge((cnf, kw))) *************** *** 67,75 **** self.canvas.insert(self.id, beforethis, string) def lower(self, belowthis=None): ! self.canvas.lower(self.id, belowthis) def move(self, xamount, yamount): self.canvas.move(self.id, xamount, yamount) def tkraise(self, abovethis=None): ! self.canvas.tkraise(self.id, abovethis) raise_ = tkraise # BW compat def scale(self, xorigin, yorigin, xscale, yscale): --- 70,78 ---- self.canvas.insert(self.id, beforethis, string) def lower(self, belowthis=None): ! self.canvas.tag_lower(self.id, belowthis) def move(self, xamount, yamount): self.canvas.move(self.id, xamount, yamount) def tkraise(self, abovethis=None): ! self.canvas.tag_raise(self.id, abovethis) raise_ = tkraise # BW compat def scale(self, xorigin, yorigin, xscale, yscale): *************** *** 143,150 **** def bbox(self): return self.canvas._getints(self._do('bbox')) ! def bind(self, sequence=None, command=None): ! return self.canvas.tag_bind(self.id, sequence, command) ! def unbind(self, sequence): ! self.canvas.tag_bind(self.id, sequence, '') def coords(self, *pts): return self._do('coords', pts) --- 146,153 ---- def bbox(self): return self.canvas._getints(self._do('bbox')) ! def bind(self, sequence=None, command=None, add=None): ! return self.canvas.tag_bind(self.id, sequence, command, add) ! def unbind(self, sequence, funcid=None): ! self.canvas.tag_unbind(self.id, sequence, funcid) def coords(self, *pts): return self._do('coords', pts) *************** *** 168,176 **** return self.canvas.itemconfigure(self.tag, _cnfmerge((cnf,kw))) def lower(self, belowThis=None): ! self._do('lower', belowThis) def move(self, xAmount, yAmount): self._do('move', xAmount, yAmount) def tkraise(self, aboveThis=None): ! self._do('raise', aboveThis) lift = tkraise def scale(self, xOrigin, yOrigin, xScale, yScale): --- 171,179 ---- return self.canvas.itemconfigure(self.tag, _cnfmerge((cnf,kw))) def lower(self, belowThis=None): ! self._do('tag_lower', belowThis) def move(self, xAmount, yAmount): self._do('move', xAmount, yAmount) def tkraise(self, aboveThis=None): ! self._do('tag_raise', aboveThis) lift = tkraise def scale(self, xOrigin, yOrigin, xScale, yScale): From python-dev@python.org Fri Oct 6 02:58:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 5 Oct 2000 18:58:51 -0700 Subject: [Python-checkins] CVS: python/dist/src README,1.101,1.102 Message-ID: <200010060158.SAA11960@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv11901 Modified Files: README Log Message: Added section on threads problems on Reliant UNIX; this relates to bug #113797. We should be able to resolve this for the next release. Reflowed the comments on Monterey (64-bit AIX) to match the flow of the other platform-specific sections. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -r1.101 -r1.102 *** README 2000/09/29 17:45:05 1.101 --- README 2000/10/06 01:58:48 1.102 *************** *** 387,397 **** in the resulting binaries of PYTHON15.DLL and PYTHON.EXE. ! Monterey (64-bit AIX): ! The current Monterey C compiler (Visual Age) uses the OBJECT_MODE={32|64} ! environment variable to set the compilation mode to either 32-bit or ! 64-bit (32-bit mode is the default). Presumably you want 64-bit ! compilation mode for this 64-bit OS. As a result you must first set ! OBJECT_MODE=64 in your environment before configuring (./configure) or ! building (make) Python on Monterey. --- 387,402 ---- in the resulting binaries of PYTHON15.DLL and PYTHON.EXE. ! Monterey (64-bit AIX): The current Monterey C compiler (Visual Age) ! uses the OBJECT_MODE={32|64} environment variable to set the ! compilation mode to either 32-bit or 64-bit (32-bit mode is ! the default). Presumably you want 64-bit compilation mode for ! this 64-bit OS. As a result you must first set OBJECT_MODE=64 ! in your environment before configuring (./configure) or ! building (make) Python on Monterey. ! ! Reliant UNIX: The thread support does not compile on Reliant UNIX, and ! there is a (minor) problem in the configure script for that ! platform as well. This should be resolved in time for a ! future release. From python-dev@python.org Fri Oct 6 16:25:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 08:25:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.1,1.2 Message-ID: <200010061525.IAA05234@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv5180 Modified Files: ACKS Log Message: Added a name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ACKS 2000/10/05 04:05:30 1.1 --- ACKS 2000/10/06 15:25:01 1.2 *************** *** 99,102 **** --- 99,103 ---- Koray Oner Denis S. Otkidach + Tim Peters Christopher Petrilli Justin D. Pettit From python-dev@python.org Fri Oct 6 16:29:59 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 08:29:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libzipfile.tex,1.6,1.7 Message-ID: <200010061529.IAA09414@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9354/lib Modified Files: libzipfile.tex Log Message: is_zipfile() description: Use the same name for the parameter as the code, in case someone wants to use it as a keyword paramter. ZIP_DEFLATED description: Do not reveal the specific value of the constant, since code should only use the symbolic name. Index: libzipfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzipfile.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libzipfile.tex 2000/10/03 15:16:31 1.6 --- libzipfile.tex 2000/10/06 15:29:56 1.7 *************** *** 48,53 **** \end{classdesc} ! \begin{funcdesc}{is_zipfile}{path} ! Returns true if \var{path} is a valid ZIP file based on its magic number, otherwise returns false. This module does not currently handle ZIP files which have appended comments. --- 48,53 ---- \end{classdesc} ! \begin{funcdesc}{is_zipfile}{filename} ! Returns true if \var{filename} is a valid ZIP file based on its magic number, otherwise returns false. This module does not currently handle ZIP files which have appended comments. *************** *** 55,59 **** \begin{datadesc}{ZIP_STORED} ! The numeric constant (\code{0}) for an uncompressed archive member. \end{datadesc} --- 55,59 ---- \begin{datadesc}{ZIP_STORED} ! The numeric constant for an uncompressed archive member. \end{datadesc} From python-dev@python.org Fri Oct 6 16:37:10 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 08:37:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.127,1.128 Message-ID: <200010061537.IAA14814@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14760 Modified Files: socketmodule.c Log Message: Norman Vine : tcp.h is not available on CygWin, so do not try to include it there. This closes SourceForge patch #101802. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -r1.127 -r1.128 *** socketmodule.c 2000/08/16 14:18:30 1.127 --- socketmodule.c 2000/10/06 15:37:06 1.128 *************** *** 123,127 **** #include #include ! #ifndef __BEOS__ #include #endif --- 123,127 ---- #include #include ! #if !(defined(__BEOS__) || defined(__CYGWIN__)) #include #endif From python-dev@python.org Fri Oct 6 16:48:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 08:48:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python thread.c,2.35,2.36 Message-ID: <200010061548.IAA22669@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv22617 Modified Files: thread.c Log Message: Donn Cave : Do not assume that all platforms using a MetroWorks compiler can use POSIX threads; the assumption breaks on BeOS. This fix only helps for BeOS. This closes SourceForge patch #101772. Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** thread.c 2000/09/19 00:46:46 2.35 --- thread.c 2000/10/06 15:48:38 2.36 *************** *** 59,63 **** #endif ! #ifdef __MWERKS__ #define _POSIX_THREADS #endif --- 59,63 ---- #endif ! #if defined(__MWERKS__) && !defined(__BEOS__) #define _POSIX_THREADS #endif From python-dev@python.org Fri Oct 6 16:56:31 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 6 Oct 2000 08:56:31 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.31,1.32 Message-ID: <200010061556.IAA28995@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28830 Modified Files: pep-0042.txt Log Message: add request to support parsing of deeply nested expressions Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** pep-0042.txt 2000/10/06 00:10:56 1.31 --- pep-0042.txt 2000/10/06 15:56:27 1.32 *************** *** 63,66 **** --- 63,75 ---- http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115143 + - The parser should handle more deeply nested parse trees. + + The following will fail -- eval("["*50 + "]"*50) -- because the + parser has a hard-coded limit on stack size. This limit should + be raised or removed. Removal would be hard because the + current compiler can overflow the C stack if the nesting is too + deep. + + http://sourceforge.net/bugs/?func=detailbug&bug_id=115555&group_id=5470 Standard Library From python-dev@python.org Fri Oct 6 16:57:48 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 08:57:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/BeOS linkmodule,1.4,1.5 Message-ID: <200010061557.IAA29893@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/BeOS In directory slayer.i.sourceforge.net:/tmp/cvs-serv29856 Modified Files: linkmodule Log Message: Donn Cave : Added definition of VERSION so this works as expected. Index: linkmodule =================================================================== RCS file: /cvsroot/python/python/dist/src/BeOS/linkmodule,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** linkmodule 2000/08/15 18:52:33 1.4 --- linkmodule 2000/10/06 15:57:45 1.5 *************** *** 25,28 **** --- 25,29 ---- TARGET="" ARGS="" + VERSION=2.0 while [ "$#" != "0" ]; do From python-dev@python.org Fri Oct 6 17:07:39 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 09:07:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-beos5 - New directory Message-ID: <200010061607.JAA03354@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-beos5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv3320/plat-beos5 Log Message: Directory /cvsroot/python/python/dist/src/Lib/plat-beos5 added to the repository From python-dev@python.org Fri Oct 6 17:11:24 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 09:11:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-beos5 regen,NONE,1.1 Message-ID: <200010061611.JAA05900@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-beos5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv5847 Added Files: regen Log Message: Donn Cave : Script to regenerate platform-specific modules of constants. [I moved common paths to variables for easier reading by humans. -- FLD] This closes SourceForge patch #101781. --- NEW FILE --- #! /bin/sh H2PY=../../Tools/scripts/h2py.py HEADERS=/boot/develop/headers set -v python $H2PY $HEADERS/posix/fcntl.h python $H2PY $HEADERS/be/net/socket.h python $H2PY -i '(u_long)' $HEADERS/be/net/netinet/in.h python $H2PY $HEADERS/posix/termios.h From python-dev@python.org Fri Oct 6 17:17:24 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 09:17:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/BeOS README,1.9,1.10 Message-ID: <200010061617.JAA10856@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/BeOS In directory slayer.i.sourceforge.net:/tmp/cvs-serv10812 Modified Files: README Log Message: Donn Cave : New README for BeOS R5. This closes SourceForge patch #101779. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/BeOS/README,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** README 2000/08/15 18:52:33 1.9 --- README 2000/10/06 16:17:21 1.10 *************** *** 6,18 **** What's Here? ! ar-fake - A shell script used by the build process to emulate a "real" ! POSIX ar command; helps to build the Python shared library. - dl_export.h - A header defining the evil magic declaration decorations - required for dynamic loading. - - linkcc - A shell script used by the build process to build the Python - shared library. - linkmodule - A shell script used by the build process to build the shared library versions of the standard modules; you'll --- 6,14 ---- What's Here? ! ar-fake - A shell script that copies around .o files, for the as much ! of the general effect of ar as we need but more fool-proof. ! It also has an "so" command to build the shared library ! that we actually install and use. linkmodule - A shell script used by the build process to build the shared library versions of the standard modules; you'll *************** *** 23,27 **** README.readline-2.2 - Instructions for compiling/installing GNU readline 2.2. ! You'll have to grab the GNU readline source code from prep.ai.mit.edu:/pub/GNU or any other GNU mirror. --- 19,23 ---- README.readline-2.2 - Instructions for compiling/installing GNU readline 2.2. ! You'll have to grab the GNU readline source code from prep.ai.mit.edu:/pub/GNU or any other GNU mirror. *************** *** 29,85 **** interactively if you've got readline installed. Highly recommended. - - Compiling Your Own Version - - To compile your own version of Python 1.5.x for BeOS (with any luck, - Python 1.5.2 and later will compile "out of the box" on BeOS), try this: - - 1) Get the latest Python source code from ftp.python.org. - - 2) Configure with: - - ./configure --verbose --prefix=/boot/home/config --with-thread - - 3) Copy Modules/Setup.in to Modules/Setup. ! 4) Edit Modules/Setup to turn on all the modules you want built. ! Make sure you use _socket instead of socket for the name of the ! socketmodule on BeOS (at least, until we get the new BONE networking). ! If you want the modules to be built as shared libraries, instead of as ! part of the Python shared library, be sure to uncomment the #*shared* ! line. I haven't done much testing with static linking, it's not as ! interesting. ! I've tried the following modules: - array audioop binascii cmath _codecs cPickle crypt cStringIO _curses - errno fcntl gdbm grp imageop _locale math md5 new operator parser - pcre posix pwd pyexpat readline regex rgbimg rotor select sha signal - _socket soundex _sre strop struct syslog termios time timing ucnhash - unicodedata zlib - - Note that some of these require extra libraries that aren't supplied - with Python. If you don't have the extra libs (you can probably get - them from GeekGadgets), don't try to use these modules; they won't - compile. - - 5) Make: - - make - - 6) Test: - make test test_popen2 will probably hang; it's deadlocked on a semaphore. I should probably disable popen2 support... it uses fork(), and fork() doesn't mix with threads on BeOS. In *THEORY* you could use it in a single-threaded program, but I haven't tried. ! If test_popen2 does hang, you can find the semaphore it's hung on via the "ps" command. Look for python and you'll find something like this: ! ./python -tt ../src/Lib/test/regrtest.py (team 26922) (uid 0) (gid 0) 39472 python sem 10 3785 1500 piperd(360526) --- 25,53 ---- interactively if you've got readline installed. Highly recommended. ! To build, ! 1) ./configure --prefix=/boot/home/config ! 2) cp Modules/Setup.in Modules/Setup ! edit Modules/Setup ! comment out grp and mmap, and pwd on 4.5 or earlier ! uncomment any modules you want to include in python ! (you can also add them later as shared libraries.) ! 3) make ! Test: make test + [Chris Herborth writes:] test_popen2 will probably hang; it's deadlocked on a semaphore. I should probably disable popen2 support... it uses fork(), and fork() doesn't mix with threads on BeOS. In *THEORY* you could use it in a single-threaded program, but I haven't tried. ! If test_popen2 does hang, you can find the semaphore it's hung on via the "ps" command. Look for python and you'll find something like this: ! ./python -tt ../src/Lib/test/regrtest.py (team 26922) (uid 0) (gid 0) 39472 python sem 10 3785 1500 piperd(360526) *************** *** 101,108 **** test test_fork1 skipped -- can't mix os.fork with threads on BeOS ! test test_re failed -- Writing: '=== Failed incorrectly', expected: ! "('abc', 'abc', 0, 'fou" ! ! test test_select crashed -- select.error : (-2147459072, 'Bad file descriptor') --- 69,73 ---- test test_fork1 skipped -- can't mix os.fork with threads on BeOS ! test test_select crashed -- select.error : (-2147459072, 'Bad file descriptor') *************** *** 112,123 **** sockets), or valid differences between systems. ! That test_re failure is a little worrysome though. ! 7) Install: make install ! 8) Enjoy! - Chris Herborth (chrish@pobox.com) July 21, 2000 --- 77,94 ---- sockets), or valid differences between systems. ! test test_pickle crashed. This is apparently a serious problem, ! "complex" number objects reconstructed from a ! pickle don't compare equal to their ancestors. ! But it happens on BeOS PPC only, not Intel. ! Install: make install ! Enjoy! - Chris Herborth (chrish@pobox.com) July 21, 2000 + + - Donn Cave (donn@oz.net) + October 4, 2000 From python-dev@python.org Fri Oct 6 17:36:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 09:36:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools cvsinfo.py,NONE,1.1 Message-ID: <200010061636.JAA26358@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv26293 Added Files: cvsinfo.py Log Message: Support module to help work with checked-out CVS trees. --- NEW FILE --- """Utility class and function to get information about the CVS repository based on checked-out files. """ import os def get_repository_list(paths): d = {} for name in paths: if os.path.isfile(name): dir = os.path.dirname(name) else: dir = name rootfile = os.path.join(name, "CVS", "Root") root = open(rootfile).readline().strip() if not d.has_key(root): d[root] = RepositoryInfo(dir), [name] else: d[root][1].append(name) return d.values() class RepositoryInfo: """Record holding information about the repository we want to talk to.""" cvsroot_path = None branch = None # type is '', ':ext', or ':pserver:' type = "" def __init__(self, dir=None): if dir is None: dir = os.getcwd() dir = os.path.join(dir, "CVS") root = open(os.path.join(dir, "Root")).readline().strip() if root.startswith(":pserver:"): self.type = ":pserver:" root = root[len(":pserver:"):] elif ":" in root: if root.startswith(":ext:"): root = root[len(":ext:"):] self.type = ":ext:" self.repository = root if ":" in root: host, path = root.split(":", 1) self.cvsroot_path = path else: self.cvsroot_path = root fn = os.path.join(dir, "Tag") if os.path.isfile(fn): self.branch = open(fn).readline().strip()[1:] def get_cvsroot(self): return self.type + self.repository _repository_dir_cache = {} def get_repository_file(self, path): filename = os.path.abspath(path) if os.path.isdir(path): dir = path join = 0 else: dir = os.path.dirname(path) join = 1 try: repodir = self._repository_dir_cache[dir] except KeyError: repofn = os.path.join(dir, "CVS", "Repository") repodir = open(repofn).readline().strip() repodir = os.path.join(self.cvsroot_path, repodir) self._repository_dir_cache[dir] = repodir if join: fn = os.path.join(repodir, os.path.basename(path)) else: fn = repodir return fn[len(self.cvsroot_path)+1:] def __repr__(self): return "" % `self.get_cvsroot()` From python-dev@python.org Fri Oct 6 17:37:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 09:37:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools findacks,1.1,1.2 Message-ID: <200010061637.JAA27011@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv26967 Modified Files: findacks Log Message: Use the cvsinfo module instead of a module stuff off in my personal collection. Index: findacks =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/findacks,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** findacks 2000/10/03 22:10:25 1.1 --- findacks 2000/10/06 16:37:47 1.2 *************** *** 8,13 **** import UserDict ! import fdrake.cvstools.info ! cvstools = fdrake.cvstools --- 8,12 ---- import UserDict ! import cvsinfo *************** *** 54,58 **** def load_cvs_log_acks(acks, args): ! repolist = cvstools.info.get_repository_list(args or [""]) for info, paths in repolist: print >>sys.stderr, "Repository:", info.get_cvsroot() --- 53,57 ---- def load_cvs_log_acks(acks, args): ! repolist = cvsinfo.get_repository_list(args or [""]) for info, paths in repolist: print >>sys.stderr, "Repository:", info.get_cvsroot() From python-dev@python.org Fri Oct 6 17:58:29 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 6 Oct 2000 09:58:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.112,1.113 Message-ID: <200010061658.JAA09524@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9460 Modified Files: _tkinter.c Log Message: [ Bug #113803 ] [2.0b1 NT4.0] printing non asci char causes idle to abort http://sourceforge.net/bugs/?func=detailbug&bug_id=113803&group_id=5470 Add Unicode support and error handling to AsString(). Both AsString() and Merge() now return NULL and set a proper Python exception condition when an error happens; Merge() and other callers of AsString() check for errors from AsString(). Also fixed cleanup in Merge() and Tkapp_Call() return cleanup code; the fv array was not necessarily completely initialized, causing calls to ckfree() with garbage arguments! (Also reindented some lines that were longer than 80 chars and reformatted some code that used an alien coding standard.) Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -r1.112 -r1.113 *** _tkinter.c 2000/10/05 19:24:25 1.112 --- _tkinter.c 2000/10/06 16:58:26 1.113 *************** *** 138,142 **** #define LEAVE_TCL \ ! tcl_tstate = NULL; PyThread_release_lock(tcl_lock); Py_END_ALLOW_THREADS} #define ENTER_OVERLAP \ --- 138,142 ---- #define LEAVE_TCL \ ! tcl_tstate = NULL; PyThread_release_lock(tcl_lock); Py_END_ALLOW_THREADS} #define ENTER_OVERLAP \ *************** *** 178,185 **** typedef int (*TclMacConvertEventPtr) (EventRecord *eventPtr); ! void Tcl_MacSetEventProc (TclMacConvertEventPtr procPtr); ! int TkMacConvertEvent (EventRecord *eventPtr); ! staticforward int PyMacConvertEvent (EventRecord *eventPtr); #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) --- 178,185 ---- typedef int (*TclMacConvertEventPtr) (EventRecord *eventPtr); ! void Tcl_MacSetEventProc(TclMacConvertEventPtr procPtr); ! int TkMacConvertEvent(EventRecord *eventPtr); ! staticforward int PyMacConvertEvent(EventRecord *eventPtr); #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) *************** *** 262,268 **** if (PyString_Check(value)) return PyString_AsString(value); else { PyObject *v = PyObject_Str(value); ! PyList_Append(tmp, v); Py_DECREF(v); return PyString_AsString(v); --- 262,284 ---- if (PyString_Check(value)) return PyString_AsString(value); + else if (PyUnicode_Check(value)) { + PyObject *v = PyUnicode_AsUTF8String(value); + if (v == NULL) + return NULL; + if (PyList_Append(tmp, v) != 0) { + Py_DECREF(v); + return NULL; + } + Py_DECREF(v); + return PyString_AsString(v); + } else { PyObject *v = PyObject_Str(value); ! if (v == NULL) ! return NULL; ! if (PyList_Append(tmp, v) != 0) { ! Py_DECREF(v); ! return NULL; ! } Py_DECREF(v); return PyString_AsString(v); *************** *** 282,286 **** int fvStore[ARGSZ]; int *fv = NULL; ! int argc = 0, i; char *res = NULL; --- 298,302 ---- int fvStore[ARGSZ]; int *fv = NULL; ! int argc = 0, fvc = 0, i; char *res = NULL; *************** *** 297,301 **** argc = 1; fv[0] = 0; ! argv[0] = AsString(args, tmp); } else { --- 313,318 ---- argc = 1; fv[0] = 0; ! if (!(argv[0] = AsString(args, tmp))) ! goto finally; } else { *************** *** 317,320 **** --- 334,338 ---- if (!(argv[i] = Merge(v))) goto finally; + fvc++; } else if (v == Py_None) { *************** *** 324,335 **** else { fv[i] = 0; ! argv[i] = AsString(v, tmp); } } } res = Tcl_Merge(argc, argv); finally: ! for (i = 0; i < argc; i++) if (fv[i]) { ckfree(argv[i]); --- 342,357 ---- else { fv[i] = 0; ! if (!(argv[i] = AsString(v, tmp))) ! goto finally; ! fvc++; } } } res = Tcl_Merge(argc, argv); + if (res == NULL) + PyErr_SetString(Tkinter_TclError, "merge failed"); finally: ! for (i = 0; i < fvc; i++) if (fv[i]) { ckfree(argv[i]); *************** *** 508,516 **** #if TKMAJORMINOR <= 8001 /* In Tcl 8.1 we must use UTF-8 */ ! PyObject* utf8 = PyUnicode_AsUTF8String (value); if (!utf8) return 0; ! result = Tcl_NewStringObj (PyString_AS_STRING (utf8), ! PyString_GET_SIZE (utf8)); Py_DECREF(utf8); return result; --- 530,538 ---- #if TKMAJORMINOR <= 8001 /* In Tcl 8.1 we must use UTF-8 */ ! PyObject* utf8 = PyUnicode_AsUTF8String(value); if (!utf8) return 0; ! result = Tcl_NewStringObj(PyString_AS_STRING(utf8), ! PyString_GET_SIZE(utf8)); Py_DECREF(utf8); return result; *************** *** 520,524 **** /* XXX Should really test this at compile time */ PyErr_SetString(PyExc_SystemError, ! "Py_UNICODE and Tcl_UniChar differ in size"); return 0; } --- 542,546 ---- /* XXX Should really test this at compile time */ PyErr_SetString(PyExc_SystemError, ! "Py_UNICODE and Tcl_UniChar differ in size"); return 0; } *************** *** 610,615 **** res = PyUnicode_DecodeUTF8(s, (int)(p-s), "strict"); if (res == NULL) { ! PyErr_Clear(); ! res = PyString_FromStringAndSize(s, (int)(p-s)); } } --- 632,637 ---- res = PyUnicode_DecodeUTF8(s, (int)(p-s), "strict"); if (res == NULL) { ! PyErr_Clear(); ! res = PyString_FromStringAndSize(s, (int)(p-s)); } } *************** *** 637,641 **** int fvStore[ARGSZ]; int *fv = NULL; ! int argc = 0, i; PyObject *res = NULL; /* except this has a different type */ Tcl_CmdInfo info; /* and this is added */ --- 659,663 ---- int fvStore[ARGSZ]; int *fv = NULL; ! int argc = 0, fvc = 0, i; PyObject *res = NULL; /* except this has a different type */ Tcl_CmdInfo info; /* and this is added */ *************** *** 654,658 **** argc = 1; fv[0] = 0; ! argv[0] = AsString(args, tmp); } else { --- 676,681 ---- argc = 1; fv[0] = 0; ! if (!(argv[0] = AsString(args, tmp))) ! goto finally; } else { *************** *** 674,677 **** --- 697,701 ---- if (!(argv[i] = Merge(v))) goto finally; + fvc++; } else if (v == Py_None) { *************** *** 681,685 **** else { fv[i] = 0; ! argv[i] = AsString(v, tmp); } } --- 705,711 ---- else { fv[i] = 0; ! if (!(argv[i] = AsString(v, tmp))) ! goto finally; ! fvc++; } } *************** *** 726,730 **** /* Copied from Merge() again */ finally: ! for (i = 0; i < argc; i++) if (fv[i]) { ckfree(argv[i]); --- 752,756 ---- /* Copied from Merge() again */ finally: ! for (i = 0; i < fvc; i++) if (fv[i]) { ckfree(argv[i]); *************** *** 754,761 **** cmd = Merge(args); ! if (!cmd) ! PyErr_SetString(Tkinter_TclError, "merge failed"); ! ! else { int err; ENTER_TCL --- 780,784 ---- cmd = Merge(args); ! if (cmd) { int err; ENTER_TCL *************** *** 767,774 **** res = PyString_FromString(Tkapp_Result(self)); LEAVE_OVERLAP_TCL - } - - if (cmd) ckfree(cmd); return res; --- 790,795 ---- res = PyString_FromString(Tkapp_Result(self)); LEAVE_OVERLAP_TCL ckfree(cmd); + } return res; *************** *** 893,896 **** --- 914,919 ---- /* XXX Merge? */ s = AsString(newValue, tmp); + if (s == NULL) + return NULL; ENTER_TCL ok = Tcl_SetVar(Tkapp_Interp(self), name1, s, flags); *************** *** 899,904 **** else { PyErr_Clear(); ! if (PyArg_ParseTuple(args, "ssO:setvar", &name1, &name2, &newValue)) { ! s = AsString (newValue, tmp); ENTER_TCL ok = Tcl_SetVar2(Tkapp_Interp(self), name1, name2, --- 922,930 ---- else { PyErr_Clear(); ! if (PyArg_ParseTuple(args, "ssO:setvar", ! &name1, &name2, &newValue)) { ! s = AsString(newValue, tmp); ! if (s == NULL) ! return NULL; ENTER_TCL ok = Tcl_SetVar2(Tkapp_Interp(self), name1, name2, *************** *** 1193,1198 **** ckfree(s); } - else - PyErr_SetString(Tkinter_TclError, "merge failed"); return res; --- 1219,1222 ---- *************** *** 1226,1230 **** PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; PyObject *self, *func, *arg, *res, *tmp; ! int i; ENTER_PYTHON --- 1250,1255 ---- PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; PyObject *self, *func, *arg, *res, *tmp; ! int i, rv; ! char *s; ENTER_PYTHON *************** *** 1257,1262 **** return PythonCmd_Error(interp); } - Tcl_SetResult(Tkapp_Interp(self), AsString(res, tmp), TCL_VOLATILE); Py_DECREF(res); Py_DECREF(tmp); --- 1282,1295 ---- return PythonCmd_Error(interp); } + + s = AsString(res, tmp); + if (s == NULL) { + rv = PythonCmd_Error(interp); + } + else { + Tcl_SetResult(Tkapp_Interp(self), s, TCL_VOLATILE); + rv = TCL_OK; + } Py_DECREF(res); Py_DECREF(tmp); *************** *** 1264,1268 **** LEAVE_PYTHON ! return TCL_OK; } --- 1297,1301 ---- LEAVE_PYTHON ! return rv; } *************** *** 1418,1422 **** int mask, tfile; ! if (!PyArg_ParseTuple(args, "OiO:createfilehandler", &file, &mask, &func)) return NULL; tfile = PyObject_AsFileDescriptor(file); --- 1451,1456 ---- int mask, tfile; ! if (!PyArg_ParseTuple(args, "OiO:createfilehandler", ! &file, &mask, &func)) return NULL; tfile = PyObject_AsFileDescriptor(file); *************** *** 1605,1609 **** TkttObject *v; ! if (!PyArg_ParseTuple(args, "iO:createtimerhandler", &milliseconds, &func)) return NULL; if (!PyCallable_Check(func)) { --- 1639,1644 ---- TkttObject *v; ! if (!PyArg_ParseTuple(args, "iO:createtimerhandler", ! &milliseconds, &func)) return NULL; if (!PyCallable_Check(func)) { *************** *** 1802,1807 **** _bump(FlattenContext* context, int size) { ! /* expand tuple to hold (at least) size new items. return true if ! successful, false if an exception was raised*/ int maxsize = context->maxsize * 2; --- 1837,1842 ---- _bump(FlattenContext* context, int size) { ! /* expand tuple to hold (at least) size new items. ! return true if successful, false if an exception was raised */ int maxsize = context->maxsize * 2; *************** *** 1823,1832 **** if (depth > 1000) { ! PyErr_SetString(PyExc_ValueError,"nesting too deep in _flatten"); return 0; } else if (PyList_Check(item)) { size = PyList_GET_SIZE(item); /* preallocate (assume no nesting) */ ! if (context->size + size > context->maxsize && !_bump(context, size)) return 0; /* copy items to output tuple */ --- 1858,1869 ---- if (depth > 1000) { ! PyErr_SetString(PyExc_ValueError, ! "nesting too deep in _flatten"); return 0; } else if (PyList_Check(item)) { size = PyList_GET_SIZE(item); /* preallocate (assume no nesting) */ ! if (context->size + size > context->maxsize && ! !_bump(context, size)) return 0; /* copy items to output tuple */ *************** *** 1837,1844 **** return 0; } else if (o != Py_None) { ! if (context->size + 1 > context->maxsize && !_bump(context, 1)) return 0; Py_INCREF(o); ! PyTuple_SET_ITEM(context->tuple, context->size++, o); } } --- 1874,1883 ---- return 0; } else if (o != Py_None) { ! if (context->size + 1 > context->maxsize && ! !_bump(context, 1)) return 0; Py_INCREF(o); ! PyTuple_SET_ITEM(context->tuple, ! context->size++, o); } } *************** *** 1846,1850 **** /* same, for tuples */ size = PyTuple_GET_SIZE(item); ! if (context->size + size > context->maxsize && !_bump(context, size)) return 0; for (i = 0; i < size; i++) { --- 1885,1890 ---- /* same, for tuples */ size = PyTuple_GET_SIZE(item); ! if (context->size + size > context->maxsize && ! !_bump(context, size)) return 0; for (i = 0; i < size; i++) { *************** *** 1854,1861 **** return 0; } else if (o != Py_None) { ! if (context->size + 1 > context->maxsize && !_bump(context, 1)) return 0; Py_INCREF(o); ! PyTuple_SET_ITEM(context->tuple, context->size++, o); } } --- 1894,1903 ---- return 0; } else if (o != Py_None) { ! if (context->size + 1 > context->maxsize && ! !_bump(context, 1)) return 0; Py_INCREF(o); ! PyTuple_SET_ITEM(context->tuple, ! context->size++, o); } } From python-dev@python.org Fri Oct 6 18:19:05 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 6 Oct 2000 10:19:05 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.32,1.33 Message-ID: <200010061719.KAA25719@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv25620 Modified Files: pep-0042.txt Log Message: Add another IDLE wish. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** pep-0042.txt 2000/10/06 15:56:27 1.32 --- pep-0042.txt 2000/10/06 17:18:55 1.33 *************** *** 203,207 **** --- 203,212 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110820&group_id=5470 + - IDLE's key bindings should be revised. Some of the advertised + bindings don't even work! + http://sourceforge.net/bugs/?func=detailbug&bug_id=110659&group_id=5470 + + Building and Installing *************** *** 209,213 **** cross-compiler. ! https://sourceforge.net/bugs/?func=detailbug&bug_id=110836&group_id=5470 --- 214,218 ---- cross-compiler. ! http://sourceforge.net/bugs/?func=detailbug&bug_id=110836&group_id=5470 From python-dev@python.org Fri Oct 6 18:37:17 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 6 Oct 2000 10:37:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/scripts redemo.py,NONE,1.1 Message-ID: <200010061737.KAA03103@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/scripts In directory slayer.i.sourceforge.net:/tmp/cvs-serv3050 Added Files: redemo.py Log Message: I'm moving redemo.py here from Demo/tkinter/guido, since it is somewhat useful to learn regular expressions, and this way it'll be installed on Windows. This closes bug report 115609. --- NEW FILE --- """Basic regular expression demostration facility (Perl style syntax).""" from Tkinter import * import re class ReDemo: def __init__(self, master): self.master = master self.promptdisplay = Label(self.master, anchor=W, text="Enter a Perl-style regular expression:") self.promptdisplay.pack(side=TOP, fill=X) self.regexdisplay = Entry(self.master) self.regexdisplay.pack(fill=X) self.regexdisplay.focus_set() self.addoptions() self.statusdisplay = Label(self.master, text="", anchor=W) self.statusdisplay.pack(side=TOP, fill=X) self.labeldisplay = Label(self.master, anchor=W, text="Enter a string to search:") self.labeldisplay.pack(fill=X) self.labeldisplay.pack(fill=X) self.showframe = Frame(master) self.showframe.pack(fill=X, anchor=W) self.showvar = StringVar(master) self.showvar.set("first") self.showfirstradio = Radiobutton(self.showframe, text="Highlight first match", variable=self.showvar, value="first", command=self.recompile) self.showfirstradio.pack(side=LEFT) self.showallradio = Radiobutton(self.showframe, text="Highlight all matches", variable=self.showvar, value="all", command=self.recompile) self.showallradio.pack(side=LEFT) self.stringdisplay = Text(self.master, width=60, height=4) self.stringdisplay.pack(fill=BOTH, expand=1) self.stringdisplay.tag_configure("hit", background="yellow") self.grouplabel = Label(self.master, text="Groups:", anchor=W) self.grouplabel.pack(fill=X) self.grouplist = Listbox(self.master) self.grouplist.pack(expand=1, fill=BOTH) self.regexdisplay.bind('', self.recompile) self.stringdisplay.bind('', self.reevaluate) self.compiled = None self.recompile() btags = self.regexdisplay.bindtags() self.regexdisplay.bindtags(btags[1:] + btags[:1]) btags = self.stringdisplay.bindtags() self.stringdisplay.bindtags(btags[1:] + btags[:1]) def addoptions(self): self.frames = [] self.boxes = [] self.vars = [] for name in ('IGNORECASE', 'LOCALE', 'MULTILINE', 'DOTALL', 'VERBOSE'): if len(self.boxes) % 3 == 0: frame = Frame(self.master) frame.pack(fill=X) self.frames.append(frame) val = getattr(re, name) var = IntVar() box = Checkbutton(frame, variable=var, text=name, offvalue=0, onvalue=val, command=self.recompile) box.pack(side=LEFT) self.boxes.append(box) self.vars.append(var) def getflags(self): flags = 0 for var in self.vars: flags = flags | var.get() flags = flags return flags def recompile(self, event=None): try: self.compiled = re.compile(self.regexdisplay.get(), self.getflags()) bg = self.promptdisplay['background'] self.statusdisplay.config(text="", background=bg) except re.error, msg: self.compiled = None self.statusdisplay.config( text="re.error: %s" % str(msg), background="red") self.reevaluate() def reevaluate(self, event=None): try: self.stringdisplay.tag_remove("hit", "1.0", END) except TclError: pass try: self.stringdisplay.tag_remove("hit0", "1.0", END) except TclError: pass self.grouplist.delete(0, END) if not self.compiled: return self.stringdisplay.tag_configure("hit", background="yellow") self.stringdisplay.tag_configure("hit0", background="orange") text = self.stringdisplay.get("1.0", END) last = 0 nmatches = 0 while last <= len(text): m = self.compiled.search(text, last) if m is None: break first, last = m.span() if last == first: last = first+1 tag = "hit0" else: tag = "hit" pfirst = "1.0 + %d chars" % first plast = "1.0 + %d chars" % last self.stringdisplay.tag_add(tag, pfirst, plast) if nmatches == 0: self.stringdisplay.yview_pickplace(pfirst) groups = list(m.groups()) groups.insert(0, m.group()) for i in range(len(groups)): g = "%2d: %s" % (i, `groups[i]`) self.grouplist.insert(END, g) nmatches = nmatches + 1 if self.showvar.get() == "first": break if nmatches == 0: self.statusdisplay.config(text="(no match)", background="yellow") else: self.statusdisplay.config(text="") # Main function, run when invoked as a stand-alone Python program. def main(): root = Tk() demo = ReDemo(root) root.protocol('WM_DELETE_WINDOW', root.quit) root.mainloop() if __name__ == '__main__': main() From python-dev@python.org Fri Oct 6 18:38:46 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 6 Oct 2000 10:38:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/tkinter/guido redemo.py,1.2,NONE regexdemo.py,1.2,NONE Message-ID: <200010061738.KAA03979@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/tkinter/guido In directory slayer.i.sourceforge.net:/tmp/cvs-serv3667 Removed Files: redemo.py regexdemo.py Log Message: Removing these scripts. redemo.py lives on in Tools/scripts/. regexdemo.py is obsolete with the regex module. --- redemo.py DELETED --- --- regexdemo.py DELETED --- From python-dev@python.org Fri Oct 6 18:41:54 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 10:41:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_sax.py,1.8,1.9 Message-ID: <200010061741.KAA05574@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv4893/test Modified Files: test_sax.py Log Message: Add SAXReaderNotAvailable, and use it to distinguish between an ImportError, and a missing driver. Index: test_sax.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sax.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_sax.py 2000/10/03 22:35:29 1.8 --- test_sax.py 2000/10/06 17:41:50 1.9 *************** *** 3,10 **** # $Id$ from xml.sax.saxutils import XMLGenerator, escape, XMLFilterBase from xml.sax.expatreader import create_parser from xml.sax.xmlreader import InputSource, AttributesImpl, AttributesNSImpl - from xml.sax.handler import ContentHandler from cStringIO import StringIO from test_support import verbose, TestFailed, findfile --- 3,15 ---- # $Id$ + from xml.sax import make_parser, ContentHandler + try: + make_parser() + except xml.sax.SAXReaderNotAvailable: + # don't try to test this module if we cannot create a parser + raise ImportError("no XML parsers available") from xml.sax.saxutils import XMLGenerator, escape, XMLFilterBase from xml.sax.expatreader import create_parser from xml.sax.xmlreader import InputSource, AttributesImpl, AttributesNSImpl from cStringIO import StringIO from test_support import verbose, TestFailed, findfile *************** *** 41,44 **** --- 46,60 ---- def test_escape_extra(): return escape("Hei pĺ deg", {"ĺ" : "å"}) == "Hei på deg" + + def test_make_parser(): + try: + # Creating a parser should succeed - it should fall back + # to the expatreader + p = make_parser(['xml.parsers.no_such_parser']) + except: + return 0 + else: + return p + # ===== XMLGenerator From python-dev@python.org Fri Oct 6 18:41:54 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 10:41:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_sax,1.4,1.5 Message-ID: <200010061741.KAA05573@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv4893/test/output Modified Files: test_sax Log Message: Add SAXReaderNotAvailable, and use it to distinguish between an ImportError, and a missing driver. Index: test_sax =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_sax,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_sax 2000/09/24 20:19:44 1.4 --- test_sax 2000/10/06 17:41:51 1.5 *************** *** 15,18 **** --- 15,19 ---- Passed test_expat_nsattrs_wattr Passed test_filter_basic + Passed test_make_parser Passed test_nsattrs_empty Passed test_nsattrs_wattr *************** *** 23,25 **** Passed test_xmlgen_ns Passed test_xmlgen_pi ! 23 tests, 0 failures --- 24,26 ---- Passed test_xmlgen_ns Passed test_xmlgen_pi ! 24 tests, 0 failures From python-dev@python.org Fri Oct 6 18:41:55 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 10:41:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax __init__.py,1.12,1.13 _exceptions.py,1.4,1.5 expatreader.py,1.13,1.14 Message-ID: <200010061741.KAA05587@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv4893/xml/sax Modified Files: __init__.py _exceptions.py expatreader.py Log Message: Add SAXReaderNotAvailable, and use it to distinguish between an ImportError, and a missing driver. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/__init__.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** __init__.py 2000/09/24 21:31:06 1.12 --- __init__.py 2000/10/06 17:41:51 1.13 *************** *** 23,27 **** from handler import ContentHandler, ErrorHandler from _exceptions import SAXException, SAXNotRecognizedException, \ ! SAXParseException, SAXNotSupportedException --- 23,28 ---- from handler import ContentHandler, ErrorHandler from _exceptions import SAXException, SAXNotRecognizedException, \ ! SAXParseException, SAXNotSupportedException, \ ! SAXReaderNotAvailable *************** *** 75,81 **** return _create_parser(parser_name) except ImportError,e: pass ! raise SAXException("No parsers found", None) # --- Internal utility methods used by make_parser --- 76,90 ---- return _create_parser(parser_name) except ImportError,e: + import sys + if sys.modules.has_key(parser_name): + # The parser module was found, but importing it + # failed unexpectedly, pass this exception through + raise + except SAXReaderNotAvailable: + # The parser module detected that it won't work properly, + # so try the next one pass ! raise SAXReaderNotAvailable("No parsers found", None) # --- Internal utility methods used by make_parser Index: _exceptions.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/_exceptions.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** _exceptions.py 2000/09/21 16:32:28 1.4 --- _exceptions.py 2000/10/06 17:41:52 1.5 *************** *** 105,106 **** --- 105,116 ---- applications and extensions may use this class for similar purposes.""" + + # ===== SAXNOTSUPPORTEDEXCEPTION ===== + + class SAXReaderNotAvailable(SAXNotSupportedException): + """Exception class for a missing driver. + + An XMLReader module (driver) should raise this exception when it + is first imported, e.g. when a support module cannot be imported. + It also may be raised during parsing, e.g. if executing an external + program is not permitted.""" Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** expatreader.py 2000/09/29 19:00:40 1.13 --- expatreader.py 2000/10/06 17:41:52 1.14 *************** *** 7,11 **** from xml.sax._exceptions import * ! from xml.parsers import expat from xml.sax import xmlreader, saxutils, handler --- 7,14 ---- from xml.sax._exceptions import * ! try: ! from xml.parsers import expat ! except ImportError: ! raise SAXReaderNotAvailable("expat not supported",None) from xml.sax import xmlreader, saxutils, handler From python-dev@python.org Fri Oct 6 19:46:24 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 6 Oct 2000 11:46:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_import.py,NONE,1.1 Message-ID: <200010061846.LAA12970@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv11958 Added Files: test_import.py Log Message: Adding Jeremy's new test_import (SF patch 101709). --- NEW FILE --- from test_support import TESTFN import os import random source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print >> f, "a =", a print >> f, "b =", b f.close() try: try: mod = __import__(TESTFN) except ImportError, err: raise ValueError, "import from .py failed: %s" % err if mod.a != a or mod.b != b: print a, "!=", mod.a print b, "!=", mod.b raise ValueError, "module loaded (%s) but contents invalid" % mod finally: os.unlink(source) try: try: reload(mod) except ImportError, err: raise ValueError, "import from .pyc/.pyo failed: %s" % err finally: try: os.unlink(pyc) except os.error: pass try: os.unlink(pyo) except os.error: pass From python-dev@python.org Fri Oct 6 19:46:24 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 6 Oct 2000 11:46:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_import,NONE,1.1 Message-ID: <200010061846.LAA12980@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv11958/output Added Files: test_import Log Message: Adding Jeremy's new test_import (SF patch 101709). --- NEW FILE --- test_import From python-dev@python.org Fri Oct 6 20:21:36 2000 From: python-dev@python.org (Jim Fulton) Date: Fri, 6 Oct 2000 12:21:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_StringIO.py,1.2,1.3 Message-ID: <200010061921.MAA22593@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv21804 Modified Files: test_StringIO.py Log Message: Uncommented tests that failed for cStringIO, Added missing clode to make the clode test test a close. ;) Index: test_StringIO.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_StringIO.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_StringIO.py 2000/09/28 04:25:33 1.2 --- test_StringIO.py 2000/10/06 19:21:32 1.3 *************** *** 15,35 **** f.truncate() print `f.getvalue()` ! # This test fails for cStringIO; reported as SourceForge bug #115531; ! # please uncomment this test when that bug is fixed. ! # http://sourceforge.net/bugs/?func=detailbug&bug_id=115531&group_id=5470 ! ## f.seek(0) ! ## f.truncate(5) ! ## print `f.getvalue()` ! ! # This test fails for cStringIO; reported as SourceForge bug #115530; ! # please uncomment this test when that bug is fixed. ! # http://sourceforge.net/bugs/?func=detailbug&bug_id=115530&group_id=5470 ! ## try: ! ## f.write("frobnitz") ! ## except ValueError, e: ! ## print "Caught expected ValueError writing to closed StringIO:" ! ## print e ! ## else: ! ## print "Failed to catch ValueError writing to closed StringIO." # Don't bother testing cStringIO without --- 15,29 ---- f.truncate() print `f.getvalue()` ! f.seek(0) ! f.truncate(5) ! print `f.getvalue()` ! f.close() ! try: ! f.write("frobnitz") ! except ValueError, e: ! print "Caught expected ValueError writing to closed StringIO:" ! print e ! else: ! print "Failed to catch ValueError writing to closed StringIO." # Don't bother testing cStringIO without From python-dev@python.org Fri Oct 6 20:24:27 2000 From: python-dev@python.org (Jim Fulton) Date: Fri, 6 Oct 2000 12:24:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cStringIO.c,2.26,2.27 Message-ID: <200010061924.MAA25998@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv24871 Modified Files: cStringIO.c Log Message: Added a new "base" type, IOobject for which most of the operations are defined. This will, hopefully clarify some of the logic. Added close test to raise proper error when operations are performed on closed StringIOs. Added a position argument to the truncate method. Added a size argument to readline. Added PyArg_Parse calls for methods that don't take arguments to make sure they don't take arguments. Index: cStringIO.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cStringIO.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** cStringIO.c 2000/09/19 11:06:46 2.26 --- cStringIO.c 2000/10/06 19:24:23 2.27 *************** *** 86,234 **** #include "cStringIO.h" ! #define UNLESS(E) if(!(E)) ! /* Declarations for objects of type StringO */ typedef struct { PyObject_HEAD char *buf; ! int pos, string_size, buf_size, softspace; [...992 lines suppressed...] --- 733,740 ---- static struct PycStringIO_CAPI CAPI = { ! IO_cread, ! IO_creadline, O_cwrite, ! IO_cgetval, newOobject, newIobject, *************** *** 701,704 **** /* Maybe make certain warnings go away */ ! if(0) PycString_IMPORT; } --- 771,774 ---- /* Maybe make certain warnings go away */ ! if (0) PycString_IMPORT; } From python-dev@python.org Fri Oct 6 20:26:08 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 12:26:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib UserList.py,1.12,1.13 Message-ID: <200010061926.MAA27867@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv27739 Modified Files: UserList.py Log Message: __getslice__(): Make this use the constructor form that gets a sequence as a parameter; this was the only use of the base constructor or surgical alteration of another object's data attribute. This change simplifies the constructor requirements for subclasses. This relates to SourceForge bug #115928. Index: UserList.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/UserList.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** UserList.py 2000/09/19 20:29:03 1.12 --- UserList.py 2000/10/06 19:26:01 1.13 *************** *** 25,31 **** def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) ! userlist = self.__class__() ! userlist.data[:] = self.data[i:j] ! return userlist def __setslice__(self, i, j, other): i = max(i, 0); j = max(j, 0) --- 25,29 ---- def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) ! return self.__class__(self.data[i:j]) def __setslice__(self, i, j, other): i = max(i, 0); j = max(j, 0) From python-dev@python.org Fri Oct 6 20:39:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 12:39:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcopy.tex,1.14,1.15 liboperator.tex,1.16,1.17 Message-ID: <200010061939.MAA06619@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6529/lib Modified Files: libcopy.tex liboperator.tex Log Message: It turns out that Guido does not like or encourage the use of the term "disciplines" for the __*__() methods, so they should be referred to as "methods" or "special methods", as appropriate in context. Index: libcopy.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcopy.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libcopy.tex 1999/06/29 16:02:12 1.14 --- libcopy.tex 2000/10/06 19:39:47 1.15 *************** *** 94,98 **** \begin{seealso} ! \seemodule{pickle}{Discussion of the special disciplines used to support object state retrieval and restoration.} \end{seealso} --- 94,98 ---- \begin{seealso} ! \seemodule{pickle}{Discussion of the special mmethds used to support object state retrieval and restoration.} \end{seealso} Index: liboperator.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liboperator.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** liboperator.tex 2000/10/02 03:36:18 1.16 --- liboperator.tex 2000/10/06 19:39:47 1.17 *************** *** 90,95 **** \funcline{__not__}{o} Return the outcome of \keyword{not} \var{o}. (Note that there is no ! \method{__not__()} discipline for object instances; only the ! interpreter core defines this operation.) \end{funcdesc} --- 90,95 ---- \funcline{__not__}{o} Return the outcome of \keyword{not} \var{o}. (Note that there is no ! \method{__not__()} method for object instances; only the interpreter ! core defines this operation.) \end{funcdesc} From python-dev@python.org Fri Oct 6 20:39:57 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 6 Oct 2000 12:39:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_linuxaudiodev.py,1.4,1.5 Message-ID: <200010061939.MAA06695@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv2679/Lib/test Modified Files: test_linuxaudiodev.py Log Message: test_linuxaudio: read the header from the .au file and do a sanity check pass only the data to the audio device call flush() so that program does not exit until playback is complete call all the other methods to verify that they work minimally call setparameters with a bunch of bugs arguments linuxaudiodev.c: use explicit O_WRONLY and O_RDONLY instead of 1 and 0 add a string name to each of the entries in audio_types[] add AFMT_A_LAW to the list of known formats add x_mode attribute to lad object, stores imode from open call test ioctl return value as == -1, not < 0 in read() method, resize string before return add getptr() method, that calls does ioctl on GETIPTR or GETOPTR depending on x_mode in setparameters() method, do better error checking and raise ValueErrors; also use ioctl calls recommended by Open Sound System Programmer's Guido (www.opensound.com) use PyModule_AddXXX to define names in module Index: test_linuxaudiodev.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_linuxaudiodev.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_linuxaudiodev.py 2000/08/04 15:25:58 1.4 --- test_linuxaudiodev.py 2000/10/06 19:39:55 1.5 *************** *** 1,11 **** from test_support import verbose, findfile, TestFailed, TestSkipped ! import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') --- 1,24 ---- from test_support import verbose, findfile, TestFailed, TestSkipped ! import errno + import fcntl + import linuxaudiodev import os + import select + import sunaudio + import time + + SND_FORMAT_MULAW_8 = 1 def play_sound_file(path): fp = open(path, 'r') + size, enc, rate, nchannels, extra = sunaudio.gethdr(fp) data = fp.read() fp.close() + + if enc != SND_FORMAT_MULAW_8: + print "Expect .au file with 8-bit mu-law samples" + return + try: a = linuxaudiodev.open('w') *************** *** 14,23 **** raise TestSkipped, msg raise TestFailed, msg ! else: ! a.write(data) ! a.close() def test(): play_sound_file(findfile('audiotest.au')) test() --- 27,78 ---- raise TestSkipped, msg raise TestFailed, msg ! ! # at least check that these methods can be invoked ! a.bufsize() ! a.obufcount() ! a.obuffree() ! a.getptr() ! a.fileno() ! ! # set parameters based on .au file headers ! a.setparameters(rate, 8, nchannels, linuxaudiodev.AFMT_MU_LAW, 1) ! a.write(data) ! a.flush() ! a.close() ! ! def test_errors(): ! a = linuxaudiodev.open("w") ! size = 8 ! fmt = linuxaudiodev.AFMT_U8 ! rate = 8000 ! nchannels = 1 ! try: ! a.setparameters(-1, size, nchannels, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, -2, nchannels, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, 3, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, nchannels, 177) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, nchannels, linuxaudiodev.AFMT_U16_LE) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, 16, nchannels, fmt) ! except ValueError, msg: ! print msg def test(): play_sound_file(findfile('audiotest.au')) + test_errors() test() From python-dev@python.org Fri Oct 6 20:39:58 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 6 Oct 2000 12:39:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_linuxaudiodev,1.1,1.2 Message-ID: <200010061939.MAA06704@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv2679/Lib/test/output Modified Files: test_linuxaudiodev Log Message: test_linuxaudio: read the header from the .au file and do a sanity check pass only the data to the audio device call flush() so that program does not exit until playback is complete call all the other methods to verify that they work minimally call setparameters with a bunch of bugs arguments linuxaudiodev.c: use explicit O_WRONLY and O_RDONLY instead of 1 and 0 add a string name to each of the entries in audio_types[] add AFMT_A_LAW to the list of known formats add x_mode attribute to lad object, stores imode from open call test ioctl return value as == -1, not < 0 in read() method, resize string before return add getptr() method, that calls does ioctl on GETIPTR or GETOPTR depending on x_mode in setparameters() method, do better error checking and raise ValueErrors; also use ioctl calls recommended by Open Sound System Programmer's Guido (www.opensound.com) use PyModule_AddXXX to define names in module Index: test_linuxaudiodev =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_linuxaudiodev,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_linuxaudiodev 2000/06/10 04:22:57 1.1 --- test_linuxaudiodev 2000/10/06 19:39:55 1.2 *************** *** 1 **** --- 1,7 ---- test_linuxaudiodev + expected rate >= 0, not -1 + expected sample size >= 0, not -2 + nchannels must be 1 or 2, not 3 + unknown audio encoding: 177 + sample size 16 expected for Little-endian 16-bit unsigned format: 8 received + sample size 8 expected for Logarithmic mu-law audio: 16 received From python-dev@python.org Fri Oct 6 20:39:58 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 6 Oct 2000 12:39:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules linuxaudiodev.c,2.9,2.10 Message-ID: <200010061939.MAA06705@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2679/Modules Modified Files: linuxaudiodev.c Log Message: test_linuxaudio: read the header from the .au file and do a sanity check pass only the data to the audio device call flush() so that program does not exit until playback is complete call all the other methods to verify that they work minimally call setparameters with a bunch of bugs arguments linuxaudiodev.c: use explicit O_WRONLY and O_RDONLY instead of 1 and 0 add a string name to each of the entries in audio_types[] add AFMT_A_LAW to the list of known formats add x_mode attribute to lad object, stores imode from open call test ioctl return value as == -1, not < 0 in read() method, resize string before return add getptr() method, that calls does ioctl on GETIPTR or GETOPTR depending on x_mode in setparameters() method, do better error checking and raise ValueErrors; also use ioctl calls recommended by Open Sound System Programmer's Guido (www.opensound.com) use PyModule_AddXXX to define names in module Index: linuxaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** linuxaudiodev.c 2000/09/01 15:35:12 2.9 --- linuxaudiodev.c 2000/10/06 19:39:55 2.10 *************** *** 25,30 **** --- 25,34 ---- #ifdef HAVE_FCNTL_H #include + #else + #define O_RDONLY 00 + #define O_WRONLY 01 #endif + #include #if defined(linux) *************** *** 45,66 **** PyObject_HEAD; int x_fd; /* The open file */ int x_icount; /* Input count */ int x_ocount; /* Output count */ ! uint32_t x_afmts; /* Supported audio formats */ } lad_t; static struct { int a_bps; uint32_t a_fmt; } audio_types[] = { ! { 8, AFMT_MU_LAW }, ! { 8, AFMT_U8 }, ! { 8, AFMT_S8 }, ! { 16, AFMT_U16_BE }, ! { 16, AFMT_U16_LE }, ! { 16, AFMT_S16_BE }, ! { 16, AFMT_S16_LE }, }; staticforward PyTypeObject Ladtype; --- 49,78 ---- PyObject_HEAD; int x_fd; /* The open file */ + int x_mode; /* file mode */ int x_icount; /* Input count */ int x_ocount; /* Output count */ ! uint32_t x_afmts; /* Audio formats supported by hardware*/ } lad_t; + /* XXX several format defined in soundcard.h are not supported, + including _NE (native endian) options and S32 options + */ + static struct { int a_bps; uint32_t a_fmt; + char *a_name; } audio_types[] = { ! { 8, AFMT_MU_LAW, "Logarithmic mu-law audio" }, ! { 8, AFMT_A_LAW, "Logarithmic A-law audio" }, ! { 8, AFMT_U8, "Standard unsigned 8-bit audio" }, ! { 8, AFMT_S8, "Standard signed 8-bit audio" }, ! { 16, AFMT_U16_BE, "Big-endian 16-bit unsigned format" }, ! { 16, AFMT_U16_LE, "Little-endian 16-bit unsigned format" }, ! { 16, AFMT_S16_BE, "Big-endian 16-bit signed format" }, ! { 16, AFMT_S16_LE, "Little-endian 16-bit signed format" }, }; + static int n_audio_types = sizeof(audio_types) / sizeof(audio_types[0]); staticforward PyTypeObject Ladtype; *************** *** 79,85 **** if (!PyArg_ParseTuple(arg, "s:open", &mode)) return NULL; if (strcmp(mode, "r") == 0) ! imode = 0; else if (strcmp(mode, "w") == 0) ! imode = 1; else { PyErr_SetString(LinuxAudioError, "Mode should be one of 'r', or 'w'"); --- 91,97 ---- if (!PyArg_ParseTuple(arg, "s:open", &mode)) return NULL; if (strcmp(mode, "r") == 0) ! imode = O_RDONLY; else if (strcmp(mode, "w") == 0) ! imode = O_WRONLY; else { PyErr_SetString(LinuxAudioError, "Mode should be one of 'r', or 'w'"); *************** *** 88,107 **** /* Open the correct device. The base device name comes from the ! * AUDIODEV environment variable first, then /dev/audio. The * control device tacks "ctl" onto the base device name. */ basedev = getenv("AUDIODEV"); if (!basedev) basedev = "/dev/dsp"; ! if ((fd = open(basedev, imode)) < 0) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; } ! if (imode && ioctl(fd, SNDCTL_DSP_NONBLOCK, NULL) < 0) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; } ! if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) < 0) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; --- 100,124 ---- /* Open the correct device. The base device name comes from the ! * AUDIODEV environment variable first, then /dev/dsp. The * control device tacks "ctl" onto the base device name. + * + * Note that the only difference between /dev/audio and /dev/dsp + * is that the former uses logarithmic mu-law encoding and the + * latter uses 8-bit unsigned encoding. */ + basedev = getenv("AUDIODEV"); if (!basedev) basedev = "/dev/dsp"; ! if ((fd = open(basedev, imode)) == -1) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; } ! if (imode == O_WRONLY && ioctl(fd, SNDCTL_DSP_NONBLOCK, NULL) == -1) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; } ! if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; *************** *** 112,116 **** return NULL; } ! xp->x_fd = fd; xp->x_icount = xp->x_ocount = 0; xp->x_afmts = afmts; --- 129,134 ---- return NULL; } ! xp->x_fd = fd; ! xp->x_mode = imode; xp->x_icount = xp->x_ocount = 0; xp->x_afmts = afmts; *************** *** 139,147 **** if (rv == NULL) return NULL; ! ! if (!(cp = PyString_AsString(rv))) { ! Py_DECREF(rv); ! return NULL; ! } if ((count = read(self->x_fd, cp, size)) < 0) { PyErr_SetFromErrno(LinuxAudioError); --- 157,161 ---- if (rv == NULL) return NULL; ! cp = PyString_AS_STRING(rv); if ((count = read(self->x_fd, cp, size)) < 0) { PyErr_SetFromErrno(LinuxAudioError); *************** *** 150,153 **** --- 164,169 ---- } self->x_icount += count; + if (_PyString_Resize(&rv, count) == -1) + return NULL; return rv; } *************** *** 159,172 **** int rv, size; ! if (!PyArg_ParseTuple(args, "s#:write", &cp, &size)) return NULL; while (size > 0) { ! if ((rv = write(self->x_fd, cp, size)) < 0) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } self->x_ocount += rv; ! size -= rv; ! cp += rv; } Py_INCREF(Py_None); --- 175,189 ---- int rv, size; ! if (!PyArg_ParseTuple(args, "s#:write", &cp, &size)) ! return NULL; while (size > 0) { ! if ((rv = write(self->x_fd, cp, size)) == -1) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } self->x_ocount += rv; ! size -= rv; ! cp += rv; } Py_INCREF(Py_None); *************** *** 177,181 **** lad_close(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":close")) return NULL; if (self->x_fd >= 0) { close(self->x_fd); --- 194,200 ---- lad_close(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":close")) ! return NULL; ! if (self->x_fd >= 0) { close(self->x_fd); *************** *** 189,193 **** lad_fileno(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":fileno")) return NULL; return PyInt_FromLong(self->x_fd); } --- 208,213 ---- lad_fileno(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":fileno")) ! return NULL; return PyInt_FromLong(self->x_fd); } *************** *** 196,236 **** lad_setparameters(lad_t *self, PyObject *args) { ! int rate, ssize, nchannels, stereo, n, fmt; ! if (!PyArg_ParseTuple(args, "iiii:setparameters", ! &rate, &ssize, &nchannels, &fmt)) return NULL; ! if (rate < 0 || ssize < 0 || (nchannels != 1 && nchannels != 2)) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; } ! if (ioctl(self->x_fd, SOUND_PCM_WRITE_RATE, &rate) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; } ! if (ioctl(self->x_fd, SNDCTL_DSP_SAMPLESIZE, &ssize) < 0) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } ! stereo = (nchannels == 1)? 0: (nchannels == 2)? 1: -1; ! if (ioctl(self->x_fd, SNDCTL_DSP_STEREO, &stereo) < 0) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } ! for (n = 0; n != sizeof(audio_types) / sizeof(audio_types[0]); n++) if (fmt == audio_types[n].a_fmt) break; ! ! if (n == sizeof(audio_types) / sizeof(audio_types[0]) || ! audio_types[n].a_bps != ssize || ! (self->x_afmts & audio_types[n].a_fmt) == 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; } ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &audio_types[n].a_fmt) < 0) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } Py_INCREF(Py_None); return Py_None; --- 216,278 ---- lad_setparameters(lad_t *self, PyObject *args) { ! int rate, ssize, nchannels, n, fmt, emulate=0; ! if (!PyArg_ParseTuple(args, "iiii|i:setparameters", ! &rate, &ssize, &nchannels, &fmt, &emulate)) return NULL; ! if (rate < 0) { ! PyErr_Format(PyExc_ValueError, "expected rate >= 0, not %d", ! rate); ! return NULL; } ! if (ssize < 0) { ! PyErr_Format(PyExc_ValueError, "expected sample size >= 0, not %d", ! ssize); ! return NULL; ! } ! if (nchannels != 1 && nchannels != 2) { ! PyErr_Format(PyExc_ValueError, "nchannels must be 1 or 2, not %d", ! nchannels); ! return NULL; } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_SPEED, &rate) == -1) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } ! if (ioctl(self->x_fd, SNDCTL_DSP_CHANNELS, &nchannels) == -1) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } ! ! for (n = 0; n < n_audio_types; n++) if (fmt == audio_types[n].a_fmt) break; ! if (n == n_audio_types) { ! PyErr_Format(PyExc_ValueError, "unknown audio encoding: %d", fmt); ! return NULL; ! } ! if (audio_types[n].a_bps != ssize) { ! PyErr_Format(PyExc_ValueError, ! "sample size %d expected for %s: %d received", ! audio_types[n].a_bps, audio_types[n].a_name, ssize); ! return NULL; ! } ! ! if (emulate == 0) { ! if ((self->x_afmts & audio_types[n].a_fmt) == 0) { ! PyErr_Format(PyExc_ValueError, ! "format not supported by device: %s", ! audio_types[n].a_name); ! return NULL; ! } } ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, ! &audio_types[n].a_fmt) == -1) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } + Py_INCREF(Py_None); return Py_None; *************** *** 343,347 **** if (!PyArg_ParseTuple(args, ":flush")) return NULL; ! if (ioctl(self->x_fd, SNDCTL_DSP_SYNC, NULL) < 0) { PyErr_SetFromErrno(LinuxAudioError); return NULL; --- 385,389 ---- if (!PyArg_ParseTuple(args, ":flush")) return NULL; ! if (ioctl(self->x_fd, SNDCTL_DSP_SYNC, NULL) == -1) { PyErr_SetFromErrno(LinuxAudioError); return NULL; *************** *** 351,354 **** --- 393,416 ---- } + static PyObject * + lad_getptr(lad_t *self, PyObject *args) + { + count_info info; + int req; + + if (!PyArg_ParseTuple(args, ":getptr")) + return NULL; + + if (self->x_mode == O_RDONLY) + req = SNDCTL_DSP_GETIPTR; + else + req = SNDCTL_DSP_GETOPTR; + if (ioctl(self->x_fd, req, &info) == -1) { + PyErr_SetFromErrno(LinuxAudioError); + return NULL; + } + return Py_BuildValue("iii", info.bytes, info.blocks, info.ptr); + } + static PyMethodDef lad_methods[] = { { "read", (PyCFunction)lad_read, METH_VARARGS }, *************** *** 361,364 **** --- 423,427 ---- { "close", (PyCFunction)lad_close, METH_VARARGS }, { "fileno", (PyCFunction)lad_fileno, METH_VARARGS }, + { "getptr", (PyCFunction)lad_getptr, METH_VARARGS }, { NULL, NULL} /* sentinel */ }; *************** *** 399,447 **** initlinuxaudiodev(void) { ! PyObject *m, *d, *x; m = Py_InitModule("linuxaudiodev", linuxaudiodev_methods); - d = PyModule_GetDict(m); LinuxAudioError = PyErr_NewException("linuxaudiodev.error", NULL, NULL); if (LinuxAudioError) ! PyDict_SetItemString(d, "error", LinuxAudioError); ! x = PyInt_FromLong((long) AFMT_MU_LAW); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_MU_LAW", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_LE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_LE", x) < 0) ! goto error; - error: - Py_DECREF(x); return; } --- 462,490 ---- initlinuxaudiodev(void) { ! PyObject *m; m = Py_InitModule("linuxaudiodev", linuxaudiodev_methods); LinuxAudioError = PyErr_NewException("linuxaudiodev.error", NULL, NULL); if (LinuxAudioError) ! PyModule_AddObject(m, "error", LinuxAudioError); ! if (PyModule_AddIntConstant(m, "AFMT_MU_LAW", (long)AFMT_MU_LAW) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_A_LAW", (long)AFMT_A_LAW) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_U8", (long)AFMT_U8) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_S8", (long)AFMT_S8) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_U16_BE", (long)AFMT_U16_BE) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_U16_LE", (long)AFMT_U16_LE) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_S16_BE", (long)AFMT_S16_BE) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_S16_LE", (long)AFMT_S16_LE) == -1) ! return; return; } From python-dev@python.org Fri Oct 6 20:59:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 12:59:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.56,1.57 Message-ID: <200010061959.MAA19695@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv19636 Modified Files: libre.tex Log Message: Made a number of revisions suggested by Fredrik Lundh. Revised the first paragraph so it doesn't sound like it was written when 7-bit strings were assumed; note that Unicode strings can be used. Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -r1.56 -r1.57 *** libre.tex 2000/10/05 15:22:28 1.56 --- libre.tex 2000/10/06 19:59:22 1.57 *************** *** 1,20 **** \section{\module{re} --- ! Perl-style regular expression operations.} \declaremodule{standard}{re} \moduleauthor{Andrew M. Kuchling}{amk1@bigfoot.com} \sectionauthor{Andrew M. Kuchling}{amk1@bigfoot.com} ! \modulesynopsis{Perl-style regular expression search and match ! operations.} This module provides regular expression matching operations similar to ! those found in Perl. It's 8-bit clean: the strings being processed ! may contain both null bytes and characters whose high bit is set. Regular ! expression pattern strings may not contain null bytes, but can specify ! the null byte using the \code{\e\var{number}} notation. ! Characters with the high bit set may be included. The \module{re} ! module is always available. Regular expressions use the backslash character (\character{\e}) to --- 1,20 ---- \section{\module{re} --- ! Regular expression operations} \declaremodule{standard}{re} \moduleauthor{Andrew M. Kuchling}{amk1@bigfoot.com} + \moduleauthor{Fredrik Lundh}{effbot@telia.com} \sectionauthor{Andrew M. Kuchling}{amk1@bigfoot.com} ! \modulesynopsis{Regular expression search and match operations with a ! Perl-style expression syntax.} This module provides regular expression matching operations similar to ! those found in Perl. Regular expression pattern strings may not ! contain null bytes, but can specify the null byte using the ! \code{\e\var{number}} notation. Both patterns and strings to be ! searched can be Unicode strings as well as 8-bit strings. The ! \module{re} module is always available. Regular expressions use the backslash character (\character{\e}) to *************** *** 35,38 **** --- 35,47 ---- string notation. + \strong{Implementation note:} + The \module{re}\refstmodindex{pre} module has two distinct + implementations: \module{sre} is the default implementation and + includes Unicode support, but may run into stack limitations for some + patterns. Though this will be fixed for a future release of Python, + the older implementation (without Unicode support) is still available + as the \module{pre}\refstmodindex{pre} module. + + \subsection{Regular Expression Syntax \label{re-syntax}} *************** *** 156,162 **** \item[\character{|}]\code{A|B}, where A and B can be arbitrary REs, ! creates a regular expression that will match either A or B. This can ! be used inside groups (see below) as well. To match a literal \character{|}, ! use \regexp{\e|}, or enclose it inside a character class, as in \regexp{[|]}. \item[\code{(...)}] Matches whatever regular expression is inside the --- 165,178 ---- \item[\character{|}]\code{A|B}, where A and B can be arbitrary REs, ! creates a regular expression that will match either A or B. An ! arbitrary number of REs can be separated by the \character{|} in this ! way. This can be used inside groups (see below) as well. REs ! separated by \character{|} are tried from left to right, and the first ! one that allows the complete pattern to match is considered the ! accepted branch. This means that if \code{A} matches, \code{B} will ! never be tested, even if it would produce a longer overall match. In ! other words, the \character{|} operator is never greedy. To match a ! literal \character{|}, use \regexp{\e|}, or enclose it inside a ! character class, as in \regexp{[|]}. \item[\code{(...)}] Matches whatever regular expression is inside the *************** *** 184,187 **** --- 200,208 ---- include the flags as part of the regular expression, instead of passing a \var{flag} argument to the \function{compile()} function. + + Note that the \regexp{(?x)} flag changes how the expression is parsed. + It should be used first in the expression string, or after one or more + whitespace characters. If there are non-whitespace characters before + the flag, the results are undefined. \item[\code{(?:...)}] A non-grouping version of regular parentheses. From python-dev@python.org Fri Oct 6 21:01:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 13:01:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.18,1.19 Message-ID: <200010062001.NAA21022@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20962 Modified Files: libcurses.tex Log Message: Revise the versioning information to say that this was revised in 1.6, not added then, and note what the change was (ncurses, change to a package). Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libcurses.tex 2000/09/25 14:14:30 1.18 --- libcurses.tex 2000/10/06 20:01:23 1.19 *************** *** 6,10 **** \sectionauthor{Eric Raymond}{esr@thyrsus.com} \modulesynopsis{An interface to the curses library.} ! \versionadded{1.6} The \module{curses} module provides an interface to the curses --- 6,12 ---- \sectionauthor{Eric Raymond}{esr@thyrsus.com} \modulesynopsis{An interface to the curses library.} ! ! \versionchanged[Added support for the \code{ncurses} library and ! converted to a package]{1.6} The \module{curses} module provides an interface to the curses From python-dev@python.org Fri Oct 6 21:04:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 13:04:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libuserdict.tex,1.16,1.17 Message-ID: <200010062004.NAA23709@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv23626 Modified Files: libuserdict.tex Log Message: Add notes on the requirements for subclasses. This closes SourceForge bug #115928. Index: libuserdict.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuserdict.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** libuserdict.tex 2000/09/09 03:23:50 1.16 --- libuserdict.tex 2000/10/06 20:04:48 1.17 *************** *** 65,68 **** --- 65,87 ---- \end{memberdesc} + \strong{Subclassing requirements:} + Subclasses of \class{UserList} are expect to offer a constructor which + can be called with either no arguments or one argument. List + operations which return a new sequence attempt to create an instance + of the actual implementation class. To do so, it assumes that the + constructor can be called with a single parameter, which is a sequence + object used as a data source. + + If a derived class does not wish to comply with this requirement, all + of the special methods supported by this class will need to be + overridden; please consult the sources for information about the + methods which need to be provided in that case. + + \versionchanged[Python versions 1.5.2 and 1.6 also required that the + constructor be callable with no parameters, and offer + a mutable \member{data} attribute. Earlier versions + of Python did not attempt to create instances of the + derived class]{2.0} + \section{\module{UserString} --- From python-dev@python.org Fri Oct 6 21:17:04 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 13:17:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcopy.tex,1.15,1.16 Message-ID: <200010062017.NAA00499@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv367 Modified Files: libcopy.tex Log Message: Fix really bad typo, noted by Neil Schemenauer . Index: libcopy.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcopy.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libcopy.tex 2000/10/06 19:39:47 1.15 --- libcopy.tex 2000/10/06 20:16:50 1.16 *************** *** 94,98 **** \begin{seealso} ! \seemodule{pickle}{Discussion of the special mmethds used to support object state retrieval and restoration.} \end{seealso} --- 94,98 ---- \begin{seealso} ! \seemodule{pickle}{Discussion of the special methods used to support object state retrieval and restoration.} \end{seealso} From python-dev@python.org Fri Oct 6 21:28:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 13:28:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sunau.py,1.17,1.18 Message-ID: <200010062028.NAA10036@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9980 Modified Files: sunau.py Log Message: Fix a couple of typos in docstrings. Index: sunau.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sunau.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** sunau.py 2000/08/17 04:45:13 1.17 --- sunau.py 2000/10/06 20:28:46 1.18 *************** *** 1,5 **** """Stuff to parse Sun and NeXT audio files. ! An audio consists of a header followed by the data. The structure of the header is as follows. --- 1,5 ---- """Stuff to parse Sun and NeXT audio files. ! An audio file consists of a header followed by the data. The structure of the header is as follows. *************** *** 27,31 **** The header size really gives the start of the data. The data size is the physical size of the data. From the other ! parameter the number of frames can be calculated. The encoding gives the way in which audio samples are encoded. Possible values are listed below. --- 27,31 ---- The header size really gives the start of the data. The data size is the physical size of the data. From the other ! parameters the number of frames can be calculated. The encoding gives the way in which audio samples are encoded. Possible values are listed below. From python-dev@python.org Fri Oct 6 21:42:36 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 13:42:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects fileobject.c,2.89,2.90 Message-ID: <200010062042.NAA20597@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20549/Objects Modified Files: fileobject.c Log Message: Donn Cave : Fix large file support for BeOS. This closes SourceForge patch #101773. Refer to the patch discussion for information on possible alternate fixes. Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.89 retrieving revision 2.90 diff -C2 -r2.89 -r2.90 *** fileobject.c 2000/09/26 05:46:01 2.89 --- fileobject.c 2000/10/06 20:42:33 2.90 *************** *** 255,258 **** --- 255,260 ---- #elif defined(HAVE_FSEEK64) return fseek64(fp, offset, whence); + #elif defined(__BEOS__) + return _fseek(fp, offset, whence); #elif defined(HAVE_LARGEFILE_SUPPORT) && SIZEOF_FPOS_T >= 8 /* lacking a 64-bit capable fseek() (as Win64 does) use a 64-bit capable From python-dev@python.org Fri Oct 6 22:00:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 14:00:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.2,1.3 Message-ID: <200010062100.OAA00437@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv319 Modified Files: ACKS Log Message: Another name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ACKS 2000/10/06 15:25:01 1.2 --- ACKS 2000/10/06 21:00:40 1.3 *************** *** 76,79 **** --- 76,80 ---- Peter A. Koren Daniel Kozan + Andrew M. Kuchling Erno Kuusela Detlef Lannert From python-dev@python.org Fri Oct 6 22:07:17 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 14:07:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsunau.tex,1.2,1.3 Message-ID: <200010062107.OAA05506@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5458/lib Modified Files: libsunau.tex Log Message: Include more information from the docstrings. Index: libsunau.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsunau.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libsunau.tex 2000/07/16 19:01:10 1.2 --- libsunau.tex 2000/10/06 21:07:14 1.3 *************** *** 6,13 **** \modulesynopsis{Provide an interface to the Sun AU sound format.} ! The \module{sunau} module provides a convenient interface to the Sun AU sound ! format. Note that this module is interface-compatible with the modules ! \refmodule{aifc} and \refmodule{wave}. The \module{sunau} module defines the following functions: --- 6,32 ---- \modulesynopsis{Provide an interface to the Sun AU sound format.} ! The \module{sunau} module provides a convenient interface to the Sun ! AU sound format. Note that this module is interface-compatible with ! the modules \refmodule{aifc} and \refmodule{wave}. ! ! An audio file consists of a header followed by the data. The fields ! of the header are: ! ! \begin{tableii}{l|l}{textrm}{Field}{Contents} ! \lineii{magic word}{The four bytes \samp{.snd}.} ! \lineii{header size}{Size of the header, including info, in bytes.} ! \lineii{data size}{Physical size of the data, in bytes.} ! \lineii{encoding}{Indicates how the audio samples are encoded.} ! \lineii{sample rate}{The sampling rate.} ! \lineii{\# of channels}{The number of channels in the samples.} ! \lineii{info}{\ASCII{} string giving a description of the audio ! file (padded with null bytes).} ! \end{tableii} ! ! Apart from the info field, all header fields are 4 bytes in size. ! They are all 32-bit unsigned integers encoded in big-endian byte ! order. + The \module{sunau} module defines the following functions: *************** *** 37,44 **** \end{excdesc} ! The \module{sunau} module defines the following data item: \begin{datadesc}{AUDIO_FILE_MAGIC} ! An integer every valid Sun AU file begins with a big-endian encoding of. \end{datadesc} --- 56,84 ---- \end{excdesc} ! The \module{sunau} module defines the following data items: \begin{datadesc}{AUDIO_FILE_MAGIC} ! An integer every valid Sun AU file begins with, stored in big-endian ! form. This is the string \samp{.snd} interpreted as an integer. ! \end{datadesc} ! ! \begin{datadesc}{AUDIO_FILE_ENCODING_MULAW_8} ! \dataline{AUDIO_FILE_ENCODING_LINEAR_8} ! \dataline{AUDIO_FILE_ENCODING_LINEAR_16} ! \dataline{AUDIO_FILE_ENCODING_LINEAR_24} ! \dataline{AUDIO_FILE_ENCODING_LINEAR_32} ! \dataline{AUDIO_FILE_ENCODING_ALAW_8} ! Values of the encoding field from the AU header which are supported by ! this module. ! \end{datadesc} ! ! \begin{datadesc}{AUDIO_FILE_ENCODING_FLOAT} ! \dataline{AUDIO_FILE_ENCODING_DOUBLE} ! \dataline{AUDIO_FILE_ENCODING_ADPCM_G721} ! \dataline{AUDIO_FILE_ENCODING_ADPCM_G722} ! \dataline{AUDIO_FILE_ENCODING_ADPCM_G723_3} ! \dataline{AUDIO_FILE_ENCODING_ADPCM_G723_5} ! Additional known values of the encoding field from the AU header, but ! which are not supported by this module. \end{datadesc} *************** *** 99,107 **** \begin{methoddesc}[AU_read]{setpos}{pos} ! Set the file pointer to the specified position. \end{methoddesc} \begin{methoddesc}[AU_read]{tell}{} ! Return current file pointer position. \end{methoddesc} --- 139,149 ---- \begin{methoddesc}[AU_read]{setpos}{pos} ! Set the file pointer to the specified position. Only values returned ! from \method{tell()} should be used for \var{pos}. \end{methoddesc} \begin{methoddesc}[AU_read]{tell}{} ! Return current file pointer position. Note that the returned value ! has nothing to do with the actual position in the file. \end{methoddesc} From python-dev@python.org Fri Oct 6 22:09:02 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:09:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.14,1.15 Message-ID: <200010062109.OAA07104@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv2763 Modified Files: expatreader.py Log Message: Move translation from expat.error to SAXParseException into feed, so that callers of feed will get a SAXException. In close, feed the last chunk first before calling endDocument, so that the parser may report errors before the end of the document. Don't do anything in a nested parser. Don't call endDocument in parse; that will be called in close. Use self._source for finding the SystemID; XML_GetBase will be cleared in case of an error. Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** expatreader.py 2000/10/06 17:41:52 1.14 --- expatreader.py 2000/10/06 21:08:59 1.15 *************** *** 40,50 **** self.reset() self._cont_handler.setDocumentLocator(self) ! try: ! xmlreader.IncrementalParser.parse(self, source) ! except expat.error: ! error_code = self._parser.ErrorCode ! raise SAXParseException(expat.ErrorString(error_code), None, self) ! ! self._cont_handler.endDocument() def prepareParser(self, source): --- 40,44 ---- self.reset() self._cont_handler.setDocumentLocator(self) ! xmlreader.IncrementalParser.parse(self, source) def prepareParser(self, source): *************** *** 74,78 **** # IncrementalParser methods ! def feed(self, data): if not self._parsing: self._parsing = 1 --- 68,72 ---- # IncrementalParser methods ! def feed(self, data, isFinal = 0): if not self._parsing: self._parsing = 1 *************** *** 80,92 **** self._cont_handler.startDocument() ! if not self._parser.Parse(data, 0): ! msg = pyexpat.ErrorString(self._parser.ErrorCode) ! raise SAXParseException(msg, None, self) def close(self): ! if self._parsing: ! self._cont_handler.endDocument() ! self._parsing = 0 ! self._parser.Parse("", 1) def reset(self): --- 74,94 ---- self._cont_handler.startDocument() ! try: ! # The isFinal parameter is internal to the expat reader. ! # If it is set to true, expat will check validity of the entire ! # document. When feeding chunks, they are not normally final - ! # except when invoked from close. ! self._parser.Parse(data, isFinal) ! except expat.error: ! error_code = self._parser.ErrorCode ! raise SAXParseException(expat.ErrorString(error_code), None, self) def close(self): ! if self._entity_stack: ! # If we are completing an external entity, do nothing here ! return ! self.feed("", isFinal = 1) ! self._cont_handler.endDocument() ! self._parsing = 0 def reset(self): *************** *** 129,133 **** def getSystemId(self): ! return self._parser.GetBase() # event handlers --- 131,135 ---- def getSystemId(self): ! return self._source.getSystemId() # event handlers *************** *** 195,199 **** try: xmlreader.IncrementalParser.parse(self, source) ! self.close() except: return 0 # FIXME: save error info here? --- 197,201 ---- try: xmlreader.IncrementalParser.parse(self, source) ! self._parser.Parse("",1) except: return 0 # FIXME: save error info here? From python-dev@python.org Fri Oct 6 22:10:37 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:10:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.15,1.16 Message-ID: <200010062110.OAA08697@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv8144 Modified Files: expatreader.py Log Message: Don't report a final chunk for an external entity parser. Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** expatreader.py 2000/10/06 21:08:59 1.15 --- expatreader.py 2000/10/06 21:10:34 1.16 *************** *** 197,201 **** try: xmlreader.IncrementalParser.parse(self, source) - self._parser.Parse("",1) except: return 0 # FIXME: save error info here? --- 197,200 ---- From python-dev@python.org Fri Oct 6 22:11:26 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:11:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax saxutils.py,1.9,1.10 Message-ID: <200010062111.OAA09288@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv8906 Modified Files: saxutils.py Log Message: Don't use a file object as system id; try to propagate the file name to the InputSource. Index: saxutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/saxutils.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** saxutils.py 2000/10/03 22:35:26 1.9 --- saxutils.py 2000/10/06 21:11:20 1.10 *************** *** 204,209 **** elif hasattr(source, "read"): f = source ! source = xmlreader.InputSource(source) source.setByteStream(f) if source.getByteStream() is None: --- 204,211 ---- elif hasattr(source, "read"): f = source ! source = xmlreader.InputSource() source.setByteStream(f) + if hasattr(f, "name"): + f.setSystemId(f.name) if source.getByteStream() is None: From python-dev@python.org Fri Oct 6 22:12:19 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:12:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax xmlreader.py,1.9,1.10 Message-ID: <200010062112.OAA09780@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv9458 Modified Files: xmlreader.py Log Message: In an incremental parser, close the parser after feeding everything. Index: xmlreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/xmlreader.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** xmlreader.py 2000/09/29 18:59:50 1.9 --- xmlreader.py 2000/10/06 21:12:12 1.10 *************** *** 120,123 **** --- 120,124 ---- self.feed(buffer) buffer = file.read(self._bufsize) + self.close() def feed(self, data): From python-dev@python.org Fri Oct 6 22:13:25 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:13:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_sax.py,1.9,1.10 Message-ID: <200010062113.OAA10743@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv10001 Modified Files: test_sax.py Log Message: Add a test case for reporting the file name, and for reporting an error for incomplete input. Index: test_sax.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sax.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** test_sax.py 2000/10/06 17:41:50 1.9 --- test_sax.py 2000/10/06 21:13:22 1.10 *************** *** 3,10 **** # $Id$ ! from xml.sax import make_parser, ContentHandler try: make_parser() ! except xml.sax.SAXReaderNotAvailable: # don't try to test this module if we cannot create a parser raise ImportError("no XML parsers available") --- 3,11 ---- # $Id$ ! from xml.sax import make_parser, ContentHandler, \ ! SAXException, SAXReaderNotAvailable, SAXParseException try: make_parser() ! except SAXReaderNotAvailable: # don't try to test this module if we cannot create a parser raise ImportError("no XML parsers available") *************** *** 313,316 **** --- 314,347 ---- return result.getvalue() == xml_test_out + + + # =========================================================================== + # + # error reporting + # + # =========================================================================== + + def test_expat_inpsource_location(): + parser = create_parser() + parser.setContentHandler(ContentHandler()) # do nothing + source = InputSource() + source.setByteStream(StringIO("")) #ill-formed + name = "a file name" + source.setSystemId(name) + try: + parser.parse(source) + except SAXException, e: + return e.getSystemId() == name + + def test_expat_incomplete(): + parser = create_parser() + parser.setContentHandler(ContentHandler()) # do nothing + try: + parser.parse(StringIO("")) + except SAXParseException: + return 1 # ok, error found + else: + return 0 + # =========================================================================== From python-dev@python.org Fri Oct 6 22:13:25 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:13:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_sax,1.5,1.6 Message-ID: <200010062113.OAA10749@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv10001/output Modified Files: test_sax Log Message: Add a test case for reporting the file name, and for reporting an error for incomplete input. Index: test_sax =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_sax,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_sax 2000/10/06 17:41:51 1.5 --- test_sax 2000/10/06 21:13:23 1.6 *************** *** 9,13 **** --- 9,15 ---- Passed test_expat_dtdhandler Passed test_expat_entityresolver + Passed test_expat_incomplete Passed test_expat_inpsource_filename + Passed test_expat_inpsource_location Passed test_expat_inpsource_stream Passed test_expat_inpsource_sysid *************** *** 24,26 **** Passed test_xmlgen_ns Passed test_xmlgen_pi ! 24 tests, 0 failures --- 26,28 ---- Passed test_xmlgen_ns Passed test_xmlgen_pi ! 26 tests, 0 failures From python-dev@python.org Fri Oct 6 23:36:08 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 15:36:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.7,1.8 pulldom.py,1.7,1.8 Message-ID: <200010062236.PAA04070@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv2065 Modified Files: minidom.py pulldom.py Log Message: minidom: access attribute value before printing it correct order of constructor args in createAttributeNS pulldom: use symbolic names for uri and localnames correct usage of createAttribute and setAttributeNode signatures. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** minidom.py 2000/09/24 05:21:58 1.7 --- minidom.py 2000/10/06 22:36:02 1.8 *************** *** 332,336 **** for a_name in a_names: writer.write(" %s=\"" % a_name) ! _write_data(writer, self._get_attributes()[a_name]) writer.write("\"") if self.childNodes: --- 332,336 ---- for a_name in a_names: writer.write(" %s=\"" % a_name) ! _write_data(writer, self._get_attributes()[a_name].value) writer.write("\"") if self.childNodes: *************** *** 430,434 **** def createAttributeNS(self, namespaceURI, qualifiedName): prefix,localName = _nssplit(qualifiedName) ! return Attr(namespaceURI, qualifiedName, localName, prefix) def getElementsByTagNameNS(self, namespaceURI, localName): --- 430,434 ---- def createAttributeNS(self, namespaceURI, qualifiedName): prefix,localName = _nssplit(qualifiedName) ! return Attr(qualifiedName, namespaceURI, localName, prefix) def getElementsByTagNameNS(self, namespaceURI, localName): Index: pulldom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** pulldom.py 2000/09/24 21:54:14 1.7 --- pulldom.py 2000/10/06 22:36:03 1.8 *************** *** 28,51 **** def startElementNS(self, name, tagName , attrs): ! if name[0]: # When using namespaces, the reader may or may not # provide us with the original name. If not, create # *a* valid tagName from the current context. if tagName is None: ! tagName = self._current_context[name[0]] + ":" + name[1] ! node = self.document.createElementNS(name[0], tagName) else: # When the tagname is not prefixed, it just appears as ! # name[1] ! node = self.document.createElement(name[1]) for aname,value in attrs.items(): ! if aname[0]: ! qname = self._current_context[name[0]] + ":" + aname[1] ! attr = self.document.createAttributeNS(name[0], qname) else: ! attr = self.document.createAttribute(name[0], name[1]) attr.value = value ! node.setAttributeNode(qname, attr) parent = self.curNode --- 28,53 ---- def startElementNS(self, name, tagName , attrs): ! uri,localname = name ! if uri: # When using namespaces, the reader may or may not # provide us with the original name. If not, create # *a* valid tagName from the current context. if tagName is None: ! tagName = self._current_context[uri] + ":" + localname ! node = self.document.createElementNS(uri, tagName) else: # When the tagname is not prefixed, it just appears as ! # localname ! node = self.document.createElement(localname) for aname,value in attrs.items(): ! a_uri, a_localname = aname ! if a_uri: ! qname = self._current_context[a_uri] + ":" + a_localname ! attr = self.document.createAttributeNS(a_uri, qname) else: ! attr = self.document.createAttribute(a_localname) attr.value = value ! node.setAttributeNode(attr) parent = self.curNode From python-dev@python.org Fri Oct 6 23:42:57 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 15:42:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,1.5,1.6 Message-ID: <200010062242.PAA09945@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv8524/output Modified Files: test_minidom Log Message: Add .toxml test case, as proposed by Alex Martelli in bug report #116244. Index: test_minidom =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_minidom,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_minidom 2000/09/19 19:33:02 1.5 --- test_minidom 2000/10/06 22:42:55 1.6 *************** *** 104,107 **** --- 104,108 ---- Test Succeeded testUnlink Test Succeeded testWriteText + Passed Test Test Succeeded testWriteXML All tests succeeded From python-dev@python.org Fri Oct 6 23:42:58 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 15:42:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.8,1.9 Message-ID: <200010062242.PAA09940@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv8524 Modified Files: test_minidom.py Log Message: Add .toxml test case, as proposed by Alex Martelli in bug report #116244. Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_minidom.py 2000/09/26 18:00:20 1.8 --- test_minidom.py 2000/10/06 22:42:54 1.9 *************** *** 247,251 **** def testTextNodeRepr(): pass ! def testWriteXML(): pass def testProcessingInstruction(): pass --- 247,256 ---- def testTextNodeRepr(): pass ! def testWriteXML(): ! str = '' ! dom = parseString(str) ! domstr = dom.toxml() ! dom.unlink() ! confirm(str == domstr) def testProcessingInstruction(): pass From python-dev@python.org Sat Oct 7 00:09:03 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 6 Oct 2000 16:09:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/idle PyParse.py,1.6,1.7 Message-ID: <200010062309.QAA32052@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/idle In directory slayer.i.sourceforge.net:/tmp/cvs-serv26651/python/dist/src/tools/idle Modified Files: PyParse.py Log Message: Fix for next iteration of SF bug 115690 (Unicode headaches in IDLE). The parsing functions in support of auto-indent weren't expecting Unicode strings, but text.get() can now return them (although it remains muddy as to exactly when or why that can happen). Fixed that with a Big Hammer. Index: PyParse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/idle/PyParse.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** PyParse.py 2000/03/13 14:50:24 1.6 --- PyParse.py 2000/10/06 23:09:00 1.7 *************** *** 114,117 **** --- 114,130 ---- def set_str(self, str): assert len(str) == 0 or str[-1] == '\n' + if type(str) == type(u""): + # The parse functions have no idea what to do with Unicode, so + # replace all Unicode characters with "x". This is "safe" + # so long as the only characters germane to parsing the structure + # of Python are 7-bit ASCII. It's *necessary* because Unicode + # strings don't have a .translate() method that supports + # deletechars. + uniphooey = str + str = [] + push = str.append + for raw in map(ord, uniphooey): + push(raw < 127 and chr(raw) or "x") + str = "".join(str) self.str = str self.study_level = 0 From python-dev@python.org Sat Oct 7 05:04:14 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 6 Oct 2000 21:04:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild BUILDno.txt,1.2,1.3 python20.dsp,1.12,1.13 python20.wse,1.19,1.20 Message-ID: <200010070404.VAA26370@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv26141/python/dist/src/pcbuild Modified Files: BUILDno.txt python20.dsp python20.wse Log Message: Prep Windows installer for 2.0c1: title and build number. Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** BUILDno.txt 2000/09/25 21:55:28 1.2 --- BUILDno.txt 2000/10/07 04:04:07 1.3 *************** *** 34,37 **** --- 34,39 ---- Windows Python BUILD numbers ---------------------------- + 7 2.0c1 + 07-Oct-2000 6 2.0b2 26-Sep-2000 Index: python20.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.dsp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** python20.dsp 2000/09/25 21:55:28 1.12 --- python20.dsp 2000/10/07 04:04:07 1.13 *************** *** 695,703 **** !IF "$(CFG)" == "python20 - Win32 Release" ! # ADD CPP /D BUILD=6 !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! # ADD CPP /D BUILD=6 !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" --- 695,703 ---- !IF "$(CFG)" == "python20 - Win32 Release" ! # ADD CPP /D BUILD=7 !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! # ADD CPP /D BUILD=7 !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" Index: python20.wse =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.wse,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** python20.wse 2000/09/26 02:37:53 1.19 --- python20.wse 2000/10/07 04:04:07 1.20 *************** *** 2,6 **** item: Global Version=5.0 ! Title=Python 2.0 beta 2 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 --- 2,6 ---- item: Global Version=5.0 ! Title=Python 2.0 Release Candidate 1 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 *************** *** 65,69 **** item: Set Variable Variable=APPTITLE ! Value=Python 2.0 beta 2 end item: Set Variable --- 65,69 ---- item: Set Variable Variable=APPTITLE ! Value=Python 2.0 Release Candidate 1 end item: Set Variable From python-dev@python.org Sat Oct 7 06:09:42 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 6 Oct 2000 22:09:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib tokenize.py,1.14,1.15 Message-ID: <200010070509.WAA10987@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv7373/python/dist/src/lib Modified Files: tokenize.py Log Message: Possible fix for Skip's bug 116136 (sre recursion limit hit in tokenize.py). tokenize.py has always used naive regexps for matching string literals, and that appears to trigger the sre recursion limit on Skip's platform (he has very long single-line string literals). Replaced all of tokenize.py's string regexps with the "unrolled" forms used in IDLE, where they're known to handle even absurd (multi-megabyte!) string literals without trouble. See Friedl's book for explanation (at heart, the naive regexps create a backtracking choice point for each character in the literal, while the unrolled forms create none). Index: tokenize.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/tokenize.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** tokenize.py 2000/08/24 21:44:52 1.14 --- tokenize.py 2000/10/07 05:09:39 1.15 *************** *** 47,62 **** Number = group(Imagnumber, Floatnumber, Intnumber) ! Single = any(r"[^'\\]", r'\\.') + "'" ! Double = any(r'[^"\\]', r'\\.') + '"' ! Single3 = any(r"[^'\\]",r'\\.',r"'[^'\\]",r"'\\.",r"''[^'\\]",r"''\\.") + "'''" ! Double3 = any(r'[^"\\]',r'\\.',r'"[^"\\]',r'"\\.',r'""[^"\\]',r'""\\.') + '"""' Triple = group("[rR]?'''", '[rR]?"""') ! String = group("[rR]?'" + any(r"[^\n'\\]", r'\\.') + "'", ! '[rR]?"' + any(r'[^\n"\\]', r'\\.') + '"') ! Operator = group('\+=', '\-=', '\*=', '%=', '/=', '\*\*=', '&=', '\|=', ! '\^=', '>>=', '<<=', '\+', '\-', '\*\*', '\*', '\^', '~', ! '/', '%', '&', '\|', '<<', '>>', '==', '<=', '<>', '!=', ! '>=', '=', '<', '>') Bracket = '[][(){}]' --- 47,69 ---- Number = group(Imagnumber, Floatnumber, Intnumber) ! # Tail end of ' string. ! Single = r"[^'\\]*(?:\\.[^'\\]*)*'" ! # Tail end of " string. ! Double = r'[^"\\]*(?:\\.[^"\\]*)*"' ! # Tail end of ''' string. ! Single3 = r"[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*'''" ! # Tail end of """ string. ! Double3 = r'[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""' Triple = group("[rR]?'''", '[rR]?"""') ! # Single-line ' or " string. ! String = group(r"[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*'", ! r'[rR]?"[^\n"\\]*(?:\\.[^\n"\\]*)*"') ! # Because of leftmost-then-longest match semantics, be sure to put the ! # longest operators first (e.g., if = came before ==, == would get ! # recognized as two instances of =). ! Operator = group(r"\*\*=?", r">>=?", r"<<=?", r"<>", r"!=", ! r"[+\-*/%&|^=<>]=?", ! r"~") Bracket = '[][(){}]' *************** *** 67,72 **** Token = Ignore + PlainToken ! ContStr = group("[rR]?'" + any(r'\\.', r"[^\n'\\]") + group("'", r'\\\r?\n'), ! '[rR]?"' + any(r'\\.', r'[^\n"\\]') + group('"', r'\\\r?\n')) PseudoExtras = group(r'\\\r?\n', Comment, Triple) PseudoToken = Whitespace + group(PseudoExtras, Number, Funny, ContStr, Name) --- 74,80 ---- Token = Ignore + PlainToken ! # First (or only) line of ' or " string. ! ContStr = group(r"[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*" + group("'", r'\\\r?\n'), ! r'[rR]?"[^\n"\\]*(?:\\.[^\n"\\]*)*' + group('"', r'\\\r?\n')) PseudoExtras = group(r'\\\r?\n', Comment, Triple) PseudoToken = Whitespace + group(PseudoExtras, Number, Funny, ContStr, Name) From python-dev@python.org Sat Oct 7 09:52:49 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Sat, 7 Oct 2000 01:52:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.20,1.21 Message-ID: <200010070852.BAA30101@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv30093/Lib/test Modified Files: test_unicode.py Log Message: Updated test with a case which checks for the bug reported in Index: test_unicode.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** test_unicode.py 2000/08/08 08:03:46 1.20 --- test_unicode.py 2000/10/07 08:52:45 1.21 *************** *** 342,345 **** --- 342,346 ---- assert '...%(foo)s...' % {u'foo':u"abc",u'def':123} == u'...abc...' assert '...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...1...2...3...abc...' + assert '...%%...%%s...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...%...%s...1...2...3...abc...' assert '...%s...' % u"abc" == u'...abc...' print 'done.' From python-dev@python.org Sat Oct 7 09:54:12 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Sat, 7 Oct 2000 01:54:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.90,2.91 Message-ID: <200010070854.BAA30183@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv30166/Objects Modified Files: stringobject.c Log Message: [ Bug #116174 ] using %% in cstrings sometimes fails with unicode paramsFix for the bug reported in Bug #116174: "%% %s" % u"abc" failed due to the way string formatting delegated work to the Unicode formatting function. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.90 retrieving revision 2.91 diff -C2 -r2.90 -r2.91 *** stringobject.c 2000/09/26 05:46:01 2.90 --- stringobject.c 2000/10/07 08:54:09 2.91 *************** *** 2667,2671 **** int fmtcnt, rescnt, reslen, arglen, argidx; int args_owned = 0; ! PyObject *result, *orig_args; PyObject *dict = NULL; if (format == NULL || !PyString_Check(format) || args == NULL) { --- 2667,2671 ---- int fmtcnt, rescnt, reslen, arglen, argidx; int args_owned = 0; ! PyObject *result, *orig_args, *v, *w; PyObject *dict = NULL; if (format == NULL || !PyString_Check(format) || args == NULL) { *************** *** 3056,3075 **** args = orig_args; } ! /* Paste rest of format string to what we have of the result ! string; we reuse result for this */ rescnt = res - PyString_AS_STRING(result); fmtcnt = PyString_GET_SIZE(format) - \ (fmt - PyString_AS_STRING(format)); ! if (_PyString_Resize(&result, rescnt + fmtcnt)) { ! Py_DECREF(args); goto error; ! } ! memcpy(PyString_AS_STRING(result) + rescnt, fmt, fmtcnt); ! format = result; ! /* Let Unicode do its magic */ ! result = PyUnicode_Format(format, args); Py_DECREF(format); Py_DECREF(args); ! return result; error: --- 3056,3081 ---- args = orig_args; } ! args_owned = 1; ! /* Take what we have of the result and let the Unicode formatting ! function format the rest of the input. */ rescnt = res - PyString_AS_STRING(result); + if (_PyString_Resize(&result, rescnt)) + goto error; fmtcnt = PyString_GET_SIZE(format) - \ (fmt - PyString_AS_STRING(format)); ! format = PyUnicode_Decode(fmt, fmtcnt, NULL, NULL); ! if (format == NULL) goto error; ! v = PyUnicode_Format(format, args); Py_DECREF(format); + if (v == NULL) + goto error; + /* Paste what we have (result) to what the Unicode formatting + function returned (v) and return the result (or error) */ + w = PyUnicode_Concat(result, v); + Py_DECREF(result); + Py_DECREF(v); Py_DECREF(args); ! return w; error: From python-dev@python.org Sat Oct 7 11:16:21 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 7 Oct 2000 03:16:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test re_tests.py,1.23,1.24 Message-ID: <200010071016.DAA16830@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv15855/Lib/test Modified Files: re_tests.py Log Message: SRE didn't handle character category followed by hyphen inside a character class. Fix provided by Andrew Kuchling. Closes bug #116251. Index: re_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** re_tests.py 2000/10/03 19:22:26 1.23 --- re_tests.py 2000/10/07 10:16:19 1.24 *************** *** 620,622 **** --- 620,624 ---- # bug 115618: negative lookahead (r'(? Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15855/Lib Modified Files: sre_parse.py Log Message: SRE didn't handle character category followed by hyphen inside a character class. Fix provided by Andrew Kuchling. Closes bug #116251. Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** sre_parse.py 2000/10/03 19:22:26 1.35 --- sre_parse.py 2000/10/07 10:16:14 1.36 *************** *** 394,397 **** --- 394,399 ---- this = source.get() if this == "]": + if code1[0] is IN: + code1 = code1[1][0] set.append(code1) set.append((LITERAL, ord("-"))) From python-dev@python.org Sat Oct 7 12:10:53 2000 From: python-dev@python.org (Mark Hammond) Date: Sat, 7 Oct 2000 04:10:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC getpathp.c,1.21,1.22 Message-ID: <200010071110.EAA30476@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv30457 Modified Files: getpathp.c Log Message: Prevent possible buffer overflow exploits under Windows. As per (the very quick) patch Patch #101801. Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** getpathp.c 2000/09/10 09:14:53 1.21 --- getpathp.c 2000/10/07 11:10:50 1.22 *************** *** 99,103 **** } ! static void reduce(char *dir) --- 99,105 ---- } ! /* assumes 'dir' null terminated in bounds. Never writes ! beyond existing terminator. ! */ static void reduce(char *dir) *************** *** 116,121 **** return stat(filename, &buf) == 0; } - static int ismodule(char *filename) /* Is module -- check for .pyc/.pyo too */ --- 118,125 ---- return stat(filename, &buf) == 0; } + /* Assumes 'filename' MAXPATHLEN+1 bytes long - + may extend 'filename' by one character. + */ static int ismodule(char *filename) /* Is module -- check for .pyc/.pyo too */ *************** *** 132,137 **** return 0; } - static void join(char *buffer, char *stuff) --- 136,141 ---- return 0; } + /* guarantees buffer will never overflow MAXPATHLEN+1 bytes */ static void join(char *buffer, char *stuff) *************** *** 152,156 **** } ! static int gotlandmark(char *landmark) --- 156,163 ---- } ! /* gotlandmark only called by search_for_prefix, which ensures ! 'prefix' is null terminated in bounds. join() ensures ! 'landmark' can not overflow prefix if too long. ! */ static int gotlandmark(char *landmark) *************** *** 165,169 **** } ! static int search_for_prefix(char *argv0_path, char *landmark) --- 172,177 ---- } ! /* assumes argv0_path is MAXPATHLEN+1 bytes long, already \0 term'd. ! assumption provided by only caller, calculate_path() */ static int search_for_prefix(char *argv0_path, char *landmark) *************** *** 341,349 **** #ifdef UNICODE WCHAR wprogpath[MAXPATHLEN+1]; if (GetModuleFileName(NULL, wprogpath, MAXPATHLEN)) { ! WideCharToMultiByte(CP_ACP, 0, wprogpath, -1, progpath, MAXPATHLEN+1, NULL, NULL); return; } #else if (GetModuleFileName(NULL, progpath, MAXPATHLEN)) return; --- 349,366 ---- #ifdef UNICODE WCHAR wprogpath[MAXPATHLEN+1]; + /* Windows documents that GetModuleFileName() will "truncate", + but makes no mention of the null terminator. Play it safe. + PLUS Windows itself defines MAX_PATH as the same, but anyway... + */ + wprogpath[MAXPATHLEN]=_T('\0')'; if (GetModuleFileName(NULL, wprogpath, MAXPATHLEN)) { ! WideCharToMultiByte(CP_ACP, 0, ! wprogpath, -1, ! progpath, MAXPATHLEN+1, ! NULL, NULL); return; } #else + /* static init of progpath ensures final char remains \0 */ if (GetModuleFileName(NULL, progpath, MAXPATHLEN)) return; *************** *** 363,367 **** if (strchr(prog, SEP)) #endif ! strcpy(progpath, prog); else if (path) { while (1) { --- 380,384 ---- if (strchr(prog, SEP)) #endif ! strncpy(progpath, prog, MAXPATHLEN); else if (path) { while (1) { *************** *** 370,379 **** if (delim) { size_t len = delim - path; strncpy(progpath, path, len); *(progpath + len) = '\0'; } else ! strcpy(progpath, path); join(progpath, prog); if (exists(progpath)) --- 387,399 ---- if (delim) { size_t len = delim - path; + /* ensure we can't overwrite buffer */ + len = min(MAXPATHLEN,len); strncpy(progpath, path, len); *(progpath + len) = '\0'; } else ! strncpy(progpath, path, MAXPATHLEN); + /* join() is safe for MAXPATHLEN+1 size buffer */ join(progpath, prog); if (exists(progpath)) *************** *** 407,410 **** --- 427,431 ---- get_progpath(); + /* progpath guaranteed \0 terminated in MAXPATH+1 bytes. */ strcpy(argv0_path, progpath); reduce(argv0_path); *************** *** 416,420 **** } else ! strcpy(prefix, pythonhome); if (envpath && *envpath == '\0') --- 437,441 ---- } else ! strncpy(prefix, pythonhome, MAXPATHLEN); if (envpath && *envpath == '\0') From python-dev@python.org Sat Oct 7 13:10:31 2000 From: python-dev@python.org (Martin v. Löwis) Date: Sat, 7 Oct 2000 05:10:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.8,1.9 Message-ID: <200010071210.FAA22013@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv21665 Modified Files: minidom.py Log Message: Record bugs found when comparing the module with DOM Core Level 2. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** minidom.py 2000/10/06 22:36:02 1.8 --- minidom.py 2000/10/07 12:10:28 1.9 *************** *** 251,255 **** del self._attrsNS[(node.namespaceURI, node.localName)] ! class Element( Node ): nodeType = Node.ELEMENT_NODE --- 251,255 ---- del self._attrsNS[(node.namespaceURI, node.localName)] ! class Element(Node): nodeType = Node.ELEMENT_NODE *************** *** 288,291 **** --- 288,292 ---- attr.__dict__["value"] = attr.__dict__["nodeValue"] = value self.setAttributeNode(attr) + # FIXME: return original node if something changed. def getAttributeNode(self, attrname): *************** *** 301,304 **** --- 302,306 ---- self._attrs[attr.name] = attr self._attrsNS[(attr.namespaceURI, attr.localName)] = attr + # FIXME: return old value if something changed def removeAttribute(self, name): *************** *** 324,327 **** --- 326,330 ---- return "" % (self.tagName, id(self)) + # undocumented def writexml(self, writer): writer.write("<" + self.tagName) From python-dev@python.org Sat Oct 7 13:25:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 7 Oct 2000 05:25:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-beos5 FCNTL.py,NONE,1.1 IN.py,NONE,1.1 SOCKET.py,NONE,1.1 TERMIOS.py,NONE,1.1 Message-ID: <200010071225.FAA04005@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-beos5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv3884 Added Files: FCNTL.py IN.py SOCKET.py TERMIOS.py Log Message: Donn Cave : Generated files for BeOS R5. --- NEW FILE --- # Generated by h2py from /boot/develop/headers/posix/fcntl.h # Included from be_setup.h def __std(ref): return ref __be_os = 2 __dest_os = __be_os __MSL__ = 0x4011 __GLIBC__ = -2 __GLIBC_MINOR__ = 1 # Included from BeBuild.h B_BEOS_VERSION_4 = 0x0400 B_BEOS_VERSION_4_5 = 0x0450 B_BEOS_VERSION_5 = 0x0500 B_BEOS_VERSION = B_BEOS_VERSION_5 B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 _PR2_COMPATIBLE_ = 1 _PR3_COMPATIBLE_ = 1 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 _PR2_COMPATIBLE_ = 0 _PR3_COMPATIBLE_ = 0 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 def _UNUSED(x): return x # Included from sys/types.h # Included from time.h # Included from null.h NULL = (0) NULL = 0L # Included from size_t.h # Included from stddef.h # Included from wchar_t.h CLOCKS_PER_SEC = 1000 CLK_TCK = CLOCKS_PER_SEC MAX_TIMESTR = 70 # Included from sys/stat.h S_ATTR_DIR = 01000000000 S_ATTR = 02000000000 S_INDEX_DIR = 04000000000 S_STR_INDEX = 00100000000 S_INT_INDEX = 00200000000 S_UINT_INDEX = 00400000000 S_LONG_LONG_INDEX = 00010000000 S_ULONG_LONG_INDEX = 00020000000 S_FLOAT_INDEX = 00040000000 S_DOUBLE_INDEX = 00001000000 S_ALLOW_DUPS = 00002000000 S_IFMT = 00000170000 S_IFLNK = 00000120000 S_IFREG = 00000100000 S_IFBLK = 00000060000 S_IFDIR = 00000040000 S_IFCHR = 00000020000 S_IFIFO = 00000010000 def S_ISREG(m): return (((m) & S_IFMT) == S_IFREG) def S_ISLNK(m): return (((m) & S_IFMT) == S_IFLNK) def S_ISBLK(m): return (((m) & S_IFMT) == S_IFBLK) def S_ISDIR(m): return (((m) & S_IFMT) == S_IFDIR) def S_ISCHR(m): return (((m) & S_IFMT) == S_IFCHR) def S_ISFIFO(m): return (((m) & S_IFMT) == S_IFIFO) def S_ISINDEX(m): return (((m) & S_INDEX_DIR) == S_INDEX_DIR) S_IUMSK = 07777 S_ISUID = 04000 S_ISGID = 02000 S_ISVTX = 01000 S_IRWXU = 00700 S_IRUSR = 00400 S_IWUSR = 00200 S_IXUSR = 00100 S_IRWXG = 00070 S_IRGRP = 00040 S_IWGRP = 00020 S_IXGRP = 00010 S_IRWXO = 00007 S_IROTH = 00004 S_IWOTH = 00002 S_IXOTH = 00001 F_DUPFD = 0x0001 F_GETFD = 0x0002 F_SETFD = 0x0004 F_GETFL = 0x0008 F_SETFL = 0x0010 F_GETLK = 0x0020 F_RDLCK = 0x0040 F_SETLK = 0x0080 F_SETLKW = 0x0100 F_UNLCK = 0x0200 F_WRLCK = 0x0400 FD_CLOEXEC = 1 FD_CLOEXEC = 0x0800 O_RDONLY = 0 O_WRONLY = 1 O_RDWR = 2 O_RWMASK = 3 O_CLOEXEC = 0x0040 O_NONBLOCK = 0x0080 O_EXCL = 0x0100 O_CREAT = 0x0200 O_TRUNC = 0x0400 O_APPEND = 0x0800 O_NOCTTY = 0x1000 O_NOTRAVERSE = 0x2000 O_ACCMODE = 0x0003 O_TEXT = 0x4000 O_BINARY = 0x8000 S_IREAD = 0x0100 S_IWRITE = 0x0080 --- NEW FILE --- # Generated by h2py from /boot/develop/headers/be/net/netinet/in.h # Included from socket.h # Included from BeBuild.h B_BEOS_VERSION_4 = 0x0400 B_BEOS_VERSION_4_5 = 0x0450 B_BEOS_VERSION_5 = 0x0500 B_BEOS_VERSION = B_BEOS_VERSION_5 B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 _PR2_COMPATIBLE_ = 1 _PR3_COMPATIBLE_ = 1 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 _PR2_COMPATIBLE_ = 0 _PR3_COMPATIBLE_ = 0 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 def _UNUSED(x): return x # Included from sys/types.h # Included from time.h # Included from be_setup.h def __std(ref): return ref __be_os = 2 __dest_os = __be_os __MSL__ = 0x4011 __GLIBC__ = -2 __GLIBC_MINOR__ = 1 # Included from null.h NULL = (0) NULL = 0L # Included from size_t.h # Included from stddef.h # Included from wchar_t.h CLOCKS_PER_SEC = 1000 CLK_TCK = CLOCKS_PER_SEC MAX_TIMESTR = 70 # Included from sys/time.h # Included from ByteOrder.h # Included from endian.h __LITTLE_ENDIAN = 1234 LITTLE_ENDIAN = __LITTLE_ENDIAN __BYTE_ORDER = __LITTLE_ENDIAN BYTE_ORDER = __BYTE_ORDER __BIG_ENDIAN = 0 BIG_ENDIAN = 0 __BIG_ENDIAN = 4321 BIG_ENDIAN = __BIG_ENDIAN __BYTE_ORDER = __BIG_ENDIAN BYTE_ORDER = __BYTE_ORDER __LITTLE_ENDIAN = 0 LITTLE_ENDIAN = 0 __PDP_ENDIAN = 3412 PDP_ENDIAN = __PDP_ENDIAN # Included from SupportDefs.h # Included from Errors.h # Included from limits.h # Included from float.h FLT_ROUNDS = 1 FLT_RADIX = 2 FLT_MANT_DIG = 24 FLT_DIG = 6 FLT_MIN_EXP = (-125) FLT_MIN_10_EXP = (-37) FLT_MAX_EXP = 128 FLT_MAX_10_EXP = 38 DBL_MANT_DIG = 53 DBL_DIG = 15 DBL_MIN_EXP = (-1021) DBL_MIN_10_EXP = (-308) DBL_MAX_EXP = 1024 DBL_MAX_10_EXP = 308 LDBL_MANT_DIG = DBL_MANT_DIG LDBL_DIG = DBL_DIG LDBL_MIN_EXP = DBL_MIN_EXP LDBL_MIN_10_EXP = DBL_MIN_10_EXP LDBL_MAX_EXP = DBL_MAX_EXP LDBL_MAX_10_EXP = DBL_MAX_10_EXP CHAR_BIT = (8) SCHAR_MIN = (-127-1) SCHAR_MAX = (127) CHAR_MIN = SCHAR_MIN CHAR_MAX = SCHAR_MAX MB_LEN_MAX = (1) SHRT_MIN = (-32767-1) SHRT_MAX = (32767) LONG_MIN = (-2147483647L-1) LONG_MAX = (2147483647L) INT_MIN = LONG_MIN INT_MAX = LONG_MAX ARG_MAX = (32768) ATEXIT_MAX = (32) CHILD_MAX = (1024) IOV_MAX = (256) FILESIZEBITS = (64) LINK_MAX = (1) LOGIN_NAME_MAX = (32) MAX_CANON = (255) MAX_INPUT = (255) NAME_MAX = (256) NGROUPS_MAX = (32) OPEN_MAX = (128) PATH_MAX = (1024) PIPE_MAX = (512) SSIZE_MAX = (2147483647L) TTY_NAME_MAX = (256) TZNAME_MAX = (32) SYMLINKS_MAX = (16) _POSIX_ARG_MAX = (32768) _POSIX_CHILD_MAX = (1024) _POSIX_LINK_MAX = (1) _POSIX_LOGIN_NAME_MAX = (9) _POSIX_MAX_CANON = (255) _POSIX_MAX_INPUT = (255) _POSIX_NAME_MAX = (255) _POSIX_NGROUPS_MAX = (0) _POSIX_OPEN_MAX = (128) _POSIX_PATH_MAX = (1024) _POSIX_PIPE_BUF = (512) _POSIX_SSIZE_MAX = (2147483647L) _POSIX_STREAM_MAX = (8) _POSIX_TTY_NAME_MAX = (256) _POSIX_TZNAME_MAX = (3) B_GENERAL_ERROR_BASE = LONG_MIN B_OS_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x1000 B_APP_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x2000 B_INTERFACE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x3000 B_MEDIA_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4000 B_TRANSLATION_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4800 B_MIDI_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x5000 B_STORAGE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x6000 B_POSIX_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x7000 B_MAIL_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x8000 B_PRINT_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x9000 B_DEVICE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0xa000 B_ERRORS_END = (B_GENERAL_ERROR_BASE + 0xffff) E2BIG = (B_POSIX_ERROR_BASE + 1) ECHILD = (B_POSIX_ERROR_BASE + 2) EDEADLK = (B_POSIX_ERROR_BASE + 3) EFBIG = (B_POSIX_ERROR_BASE + 4) EMLINK = (B_POSIX_ERROR_BASE + 5) ENFILE = (B_POSIX_ERROR_BASE + 6) ENODEV = (B_POSIX_ERROR_BASE + 7) ENOLCK = (B_POSIX_ERROR_BASE + 8) ENOSYS = (B_POSIX_ERROR_BASE + 9) ENOTTY = (B_POSIX_ERROR_BASE + 10) ENXIO = (B_POSIX_ERROR_BASE + 11) ESPIPE = (B_POSIX_ERROR_BASE + 12) ESRCH = (B_POSIX_ERROR_BASE + 13) EFPOS = (B_POSIX_ERROR_BASE + 14) ESIGPARM = (B_POSIX_ERROR_BASE + 15) EDOM = (B_POSIX_ERROR_BASE + 16) ERANGE = (B_POSIX_ERROR_BASE + 17) EPROTOTYPE = (B_POSIX_ERROR_BASE + 18) EPROTONOSUPPORT = (B_POSIX_ERROR_BASE + 19) EPFNOSUPPORT = (B_POSIX_ERROR_BASE + 20) EAFNOSUPPORT = (B_POSIX_ERROR_BASE + 21) EADDRINUSE = (B_POSIX_ERROR_BASE + 22) EADDRNOTAVAIL = (B_POSIX_ERROR_BASE + 23) ENETDOWN = (B_POSIX_ERROR_BASE + 24) ENETUNREACH = (B_POSIX_ERROR_BASE + 25) ENETRESET = (B_POSIX_ERROR_BASE + 26) ECONNABORTED = (B_POSIX_ERROR_BASE + 27) ECONNRESET = (B_POSIX_ERROR_BASE + 28) EISCONN = (B_POSIX_ERROR_BASE + 29) ENOTCONN = (B_POSIX_ERROR_BASE + 30) ESHUTDOWN = (B_POSIX_ERROR_BASE + 31) ECONNREFUSED = (B_POSIX_ERROR_BASE + 32) EHOSTUNREACH = (B_POSIX_ERROR_BASE + 33) ENOPROTOOPT = (B_POSIX_ERROR_BASE + 34) ENOBUFS = (B_POSIX_ERROR_BASE + 35) EINPROGRESS = (B_POSIX_ERROR_BASE + 36) EALREADY = (B_POSIX_ERROR_BASE + 37) EILSEQ = (B_POSIX_ERROR_BASE + 38) ENOMSG = (B_POSIX_ERROR_BASE + 39) ESTALE = (B_POSIX_ERROR_BASE + 40) EOVERFLOW = (B_POSIX_ERROR_BASE + 41) EMSGSIZE = (B_POSIX_ERROR_BASE + 42) EOPNOTSUPP = (B_POSIX_ERROR_BASE + 43) ENOTSOCK = (B_POSIX_ERROR_BASE + 44) false = 0 true = 1 NULL = (0) FALSE = 0 TRUE = 1 # Included from TypeConstants.h B_HOST_IS_LENDIAN = 1 B_HOST_IS_BENDIAN = 0 def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg) def B_HOST_TO_LENDIAN_FLOAT(arg): return (float)(arg) def B_HOST_TO_LENDIAN_INT64(arg): return (uint64)(arg) def B_HOST_TO_LENDIAN_INT32(arg): return (uint32)(arg) def B_HOST_TO_LENDIAN_INT16(arg): return (uint16)(arg) def B_HOST_TO_BENDIAN_DOUBLE(arg): return __swap_double(arg) def B_HOST_TO_BENDIAN_FLOAT(arg): return __swap_float(arg) def B_HOST_TO_BENDIAN_INT64(arg): return __swap_int64(arg) def B_HOST_TO_BENDIAN_INT32(arg): return __swap_int32(arg) def B_HOST_TO_BENDIAN_INT16(arg): return __swap_int16(arg) def B_LENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) def B_LENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) def B_LENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) def B_LENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) def B_LENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) def B_BENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) def B_BENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) def B_BENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) def B_BENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) def B_BENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) B_HOST_IS_LENDIAN = 0 B_HOST_IS_BENDIAN = 1 def B_HOST_TO_LENDIAN_DOUBLE(arg): return __swap_double(arg) def B_HOST_TO_LENDIAN_FLOAT(arg): return __swap_float(arg) def B_HOST_TO_LENDIAN_INT64(arg): return __swap_int64(arg) def B_HOST_TO_LENDIAN_INT32(arg): return __swap_int32(arg) def B_HOST_TO_LENDIAN_INT16(arg): return __swap_int16(arg) def B_HOST_TO_BENDIAN_DOUBLE(arg): return (double)(arg) def B_HOST_TO_BENDIAN_FLOAT(arg): return (float)(arg) def B_HOST_TO_BENDIAN_INT64(arg): return (uint64)(arg) def B_HOST_TO_BENDIAN_INT32(arg): return (uint32)(arg) def B_HOST_TO_BENDIAN_INT16(arg): return (uint16)(arg) def B_LENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) def B_LENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) def B_LENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) def B_LENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) def B_LENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) def B_BENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) def B_BENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) def B_BENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) def B_BENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) def B_BENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) def B_SWAP_DOUBLE(arg): return __swap_double(arg) def B_SWAP_FLOAT(arg): return __swap_float(arg) def B_SWAP_INT64(arg): return __swap_int64(arg) def B_SWAP_INT32(arg): return __swap_int32(arg) def B_SWAP_INT16(arg): return __swap_int16(arg) def htonl(x): return B_HOST_TO_BENDIAN_INT32(x) def ntohl(x): return B_BENDIAN_TO_HOST_INT32(x) def htons(x): return B_HOST_TO_BENDIAN_INT16(x) def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x) AF_INET = 1 INADDR_ANY = 0x00000000 INADDR_BROADCAST = 0xffffffff INADDR_LOOPBACK = 0x7f000001 SOL_SOCKET = 1 SO_DEBUG = 1 SO_REUSEADDR = 2 SO_NONBLOCK = 3 SO_REUSEPORT = 4 MSG_OOB = 0x1 SOCK_DGRAM = 1 SOCK_STREAM = 2 IPPROTO_UDP = 1 IPPROTO_TCP = 2 IPPROTO_ICMP = 3 B_UDP_MAX_SIZE = (65536 - 1024) FD_SETSIZE = 256 FDSETSIZE = FD_SETSIZE NFDBITS = 32 def _FDMSKNO(fd): return ((fd) / NFDBITS) def _FDBITNO(fd): return ((fd) % NFDBITS) --- NEW FILE --- # Generated by h2py from /boot/develop/headers/be/net/socket.h # Included from BeBuild.h B_BEOS_VERSION_4 = 0x0400 B_BEOS_VERSION_4_5 = 0x0450 B_BEOS_VERSION_5 = 0x0500 B_BEOS_VERSION = B_BEOS_VERSION_5 B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 _PR2_COMPATIBLE_ = 1 _PR3_COMPATIBLE_ = 1 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 _PR2_COMPATIBLE_ = 0 _PR3_COMPATIBLE_ = 0 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 def _UNUSED(x): return x # Included from sys/types.h # Included from time.h # Included from be_setup.h def __std(ref): return ref __be_os = 2 __dest_os = __be_os __MSL__ = 0x4011 __GLIBC__ = -2 __GLIBC_MINOR__ = 1 # Included from null.h NULL = (0) NULL = 0L # Included from size_t.h # Included from stddef.h # Included from wchar_t.h CLOCKS_PER_SEC = 1000 CLK_TCK = CLOCKS_PER_SEC MAX_TIMESTR = 70 # Included from sys/time.h # Included from ByteOrder.h # Included from endian.h __LITTLE_ENDIAN = 1234 LITTLE_ENDIAN = __LITTLE_ENDIAN __BYTE_ORDER = __LITTLE_ENDIAN BYTE_ORDER = __BYTE_ORDER __BIG_ENDIAN = 0 BIG_ENDIAN = 0 __BIG_ENDIAN = 4321 BIG_ENDIAN = __BIG_ENDIAN __BYTE_ORDER = __BIG_ENDIAN BYTE_ORDER = __BYTE_ORDER __LITTLE_ENDIAN = 0 LITTLE_ENDIAN = 0 __PDP_ENDIAN = 3412 PDP_ENDIAN = __PDP_ENDIAN # Included from SupportDefs.h # Included from Errors.h # Included from limits.h # Included from float.h FLT_ROUNDS = 1 FLT_RADIX = 2 FLT_MANT_DIG = 24 FLT_DIG = 6 FLT_MIN_EXP = (-125) FLT_MIN_10_EXP = (-37) FLT_MAX_EXP = 128 FLT_MAX_10_EXP = 38 DBL_MANT_DIG = 53 DBL_DIG = 15 DBL_MIN_EXP = (-1021) DBL_MIN_10_EXP = (-308) DBL_MAX_EXP = 1024 DBL_MAX_10_EXP = 308 LDBL_MANT_DIG = DBL_MANT_DIG LDBL_DIG = DBL_DIG LDBL_MIN_EXP = DBL_MIN_EXP LDBL_MIN_10_EXP = DBL_MIN_10_EXP LDBL_MAX_EXP = DBL_MAX_EXP LDBL_MAX_10_EXP = DBL_MAX_10_EXP CHAR_BIT = (8) SCHAR_MIN = (-127-1) SCHAR_MAX = (127) CHAR_MIN = SCHAR_MIN CHAR_MAX = SCHAR_MAX MB_LEN_MAX = (1) SHRT_MIN = (-32767-1) SHRT_MAX = (32767) LONG_MIN = (-2147483647L-1) LONG_MAX = (2147483647L) INT_MIN = LONG_MIN INT_MAX = LONG_MAX ARG_MAX = (32768) ATEXIT_MAX = (32) CHILD_MAX = (1024) IOV_MAX = (256) FILESIZEBITS = (64) LINK_MAX = (1) LOGIN_NAME_MAX = (32) MAX_CANON = (255) MAX_INPUT = (255) NAME_MAX = (256) NGROUPS_MAX = (32) OPEN_MAX = (128) PATH_MAX = (1024) PIPE_MAX = (512) SSIZE_MAX = (2147483647L) TTY_NAME_MAX = (256) TZNAME_MAX = (32) SYMLINKS_MAX = (16) _POSIX_ARG_MAX = (32768) _POSIX_CHILD_MAX = (1024) _POSIX_LINK_MAX = (1) _POSIX_LOGIN_NAME_MAX = (9) _POSIX_MAX_CANON = (255) _POSIX_MAX_INPUT = (255) _POSIX_NAME_MAX = (255) _POSIX_NGROUPS_MAX = (0) _POSIX_OPEN_MAX = (128) _POSIX_PATH_MAX = (1024) _POSIX_PIPE_BUF = (512) _POSIX_SSIZE_MAX = (2147483647L) _POSIX_STREAM_MAX = (8) _POSIX_TTY_NAME_MAX = (256) _POSIX_TZNAME_MAX = (3) B_GENERAL_ERROR_BASE = LONG_MIN B_OS_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x1000 B_APP_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x2000 B_INTERFACE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x3000 B_MEDIA_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4000 B_TRANSLATION_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4800 B_MIDI_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x5000 B_STORAGE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x6000 B_POSIX_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x7000 B_MAIL_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x8000 B_PRINT_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x9000 B_DEVICE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0xa000 B_ERRORS_END = (B_GENERAL_ERROR_BASE + 0xffff) E2BIG = (B_POSIX_ERROR_BASE + 1) ECHILD = (B_POSIX_ERROR_BASE + 2) EDEADLK = (B_POSIX_ERROR_BASE + 3) EFBIG = (B_POSIX_ERROR_BASE + 4) EMLINK = (B_POSIX_ERROR_BASE + 5) ENFILE = (B_POSIX_ERROR_BASE + 6) ENODEV = (B_POSIX_ERROR_BASE + 7) ENOLCK = (B_POSIX_ERROR_BASE + 8) ENOSYS = (B_POSIX_ERROR_BASE + 9) ENOTTY = (B_POSIX_ERROR_BASE + 10) ENXIO = (B_POSIX_ERROR_BASE + 11) ESPIPE = (B_POSIX_ERROR_BASE + 12) ESRCH = (B_POSIX_ERROR_BASE + 13) EFPOS = (B_POSIX_ERROR_BASE + 14) ESIGPARM = (B_POSIX_ERROR_BASE + 15) EDOM = (B_POSIX_ERROR_BASE + 16) ERANGE = (B_POSIX_ERROR_BASE + 17) EPROTOTYPE = (B_POSIX_ERROR_BASE + 18) EPROTONOSUPPORT = (B_POSIX_ERROR_BASE + 19) EPFNOSUPPORT = (B_POSIX_ERROR_BASE + 20) EAFNOSUPPORT = (B_POSIX_ERROR_BASE + 21) EADDRINUSE = (B_POSIX_ERROR_BASE + 22) EADDRNOTAVAIL = (B_POSIX_ERROR_BASE + 23) ENETDOWN = (B_POSIX_ERROR_BASE + 24) ENETUNREACH = (B_POSIX_ERROR_BASE + 25) ENETRESET = (B_POSIX_ERROR_BASE + 26) ECONNABORTED = (B_POSIX_ERROR_BASE + 27) ECONNRESET = (B_POSIX_ERROR_BASE + 28) EISCONN = (B_POSIX_ERROR_BASE + 29) ENOTCONN = (B_POSIX_ERROR_BASE + 30) ESHUTDOWN = (B_POSIX_ERROR_BASE + 31) ECONNREFUSED = (B_POSIX_ERROR_BASE + 32) EHOSTUNREACH = (B_POSIX_ERROR_BASE + 33) ENOPROTOOPT = (B_POSIX_ERROR_BASE + 34) ENOBUFS = (B_POSIX_ERROR_BASE + 35) EINPROGRESS = (B_POSIX_ERROR_BASE + 36) EALREADY = (B_POSIX_ERROR_BASE + 37) EILSEQ = (B_POSIX_ERROR_BASE + 38) ENOMSG = (B_POSIX_ERROR_BASE + 39) ESTALE = (B_POSIX_ERROR_BASE + 40) EOVERFLOW = (B_POSIX_ERROR_BASE + 41) EMSGSIZE = (B_POSIX_ERROR_BASE + 42) EOPNOTSUPP = (B_POSIX_ERROR_BASE + 43) ENOTSOCK = (B_POSIX_ERROR_BASE + 44) false = 0 true = 1 NULL = (0) FALSE = 0 TRUE = 1 # Included from TypeConstants.h B_HOST_IS_LENDIAN = 1 B_HOST_IS_BENDIAN = 0 def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg) def B_HOST_TO_LENDIAN_FLOAT(arg): return (float)(arg) def B_HOST_TO_LENDIAN_INT64(arg): return (uint64)(arg) def B_HOST_TO_LENDIAN_INT32(arg): return (uint32)(arg) def B_HOST_TO_LENDIAN_INT16(arg): return (uint16)(arg) def B_HOST_TO_BENDIAN_DOUBLE(arg): return __swap_double(arg) def B_HOST_TO_BENDIAN_FLOAT(arg): return __swap_float(arg) def B_HOST_TO_BENDIAN_INT64(arg): return __swap_int64(arg) def B_HOST_TO_BENDIAN_INT32(arg): return __swap_int32(arg) def B_HOST_TO_BENDIAN_INT16(arg): return __swap_int16(arg) def B_LENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) def B_LENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) def B_LENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) def B_LENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) def B_LENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) def B_BENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) def B_BENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) def B_BENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) def B_BENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) def B_BENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) B_HOST_IS_LENDIAN = 0 B_HOST_IS_BENDIAN = 1 def B_HOST_TO_LENDIAN_DOUBLE(arg): return __swap_double(arg) def B_HOST_TO_LENDIAN_FLOAT(arg): return __swap_float(arg) def B_HOST_TO_LENDIAN_INT64(arg): return __swap_int64(arg) def B_HOST_TO_LENDIAN_INT32(arg): return __swap_int32(arg) def B_HOST_TO_LENDIAN_INT16(arg): return __swap_int16(arg) def B_HOST_TO_BENDIAN_DOUBLE(arg): return (double)(arg) def B_HOST_TO_BENDIAN_FLOAT(arg): return (float)(arg) def B_HOST_TO_BENDIAN_INT64(arg): return (uint64)(arg) def B_HOST_TO_BENDIAN_INT32(arg): return (uint32)(arg) def B_HOST_TO_BENDIAN_INT16(arg): return (uint16)(arg) def B_LENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) def B_LENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) def B_LENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) def B_LENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) def B_LENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) def B_BENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) def B_BENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) def B_BENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) def B_BENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) def B_BENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) def B_SWAP_DOUBLE(arg): return __swap_double(arg) def B_SWAP_FLOAT(arg): return __swap_float(arg) def B_SWAP_INT64(arg): return __swap_int64(arg) def B_SWAP_INT32(arg): return __swap_int32(arg) def B_SWAP_INT16(arg): return __swap_int16(arg) def htonl(x): return B_HOST_TO_BENDIAN_INT32(x) def ntohl(x): return B_BENDIAN_TO_HOST_INT32(x) def htons(x): return B_HOST_TO_BENDIAN_INT16(x) def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x) AF_INET = 1 INADDR_ANY = 0x00000000 INADDR_BROADCAST = 0xffffffff INADDR_LOOPBACK = 0x7f000001 SOL_SOCKET = 1 SO_DEBUG = 1 SO_REUSEADDR = 2 SO_NONBLOCK = 3 SO_REUSEPORT = 4 MSG_OOB = 0x1 SOCK_DGRAM = 1 SOCK_STREAM = 2 IPPROTO_UDP = 1 IPPROTO_TCP = 2 IPPROTO_ICMP = 3 B_UDP_MAX_SIZE = (65536 - 1024) FD_SETSIZE = 256 FDSETSIZE = FD_SETSIZE NFDBITS = 32 def _FDMSKNO(fd): return ((fd) / NFDBITS) def _FDBITNO(fd): return ((fd) % NFDBITS) --- NEW FILE --- # Generated by h2py from /boot/develop/headers/posix/termios.h # Included from be_setup.h def __std(ref): return ref __be_os = 2 __dest_os = __be_os __MSL__ = 0x4011 __GLIBC__ = -2 __GLIBC_MINOR__ = 1 # Included from BeBuild.h B_BEOS_VERSION_4 = 0x0400 B_BEOS_VERSION_4_5 = 0x0450 B_BEOS_VERSION_5 = 0x0500 B_BEOS_VERSION = B_BEOS_VERSION_5 B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 _PR2_COMPATIBLE_ = 1 _PR3_COMPATIBLE_ = 1 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 _PR2_COMPATIBLE_ = 0 _PR3_COMPATIBLE_ = 0 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 def _UNUSED(x): return x # Included from sys/types.h # Included from time.h # Included from null.h NULL = (0) NULL = 0L # Included from size_t.h # Included from stddef.h # Included from wchar_t.h CLOCKS_PER_SEC = 1000 CLK_TCK = CLOCKS_PER_SEC MAX_TIMESTR = 70 # Included from unistd.h B_MOUNT_READ_ONLY = 1 R_OK = 4 W_OK = 2 X_OK = 1 F_OK = 0 STDIN_FILENO = 0 STDOUT_FILENO = 1 STDERR_FILENO = 2 _PC_CHOWN_RESTRICTED = 1 _PC_MAX_CANON = 2 _PC_MAX_INPUT = 3 _PC_NAME_MAX = 4 _PC_NO_TRUNC = 5 _PC_PATH_MAX = 6 _PC_PIPE_BUF = 7 _PC_VDISABLE = 8 _POSIX_CHOWN_RESTRICTED = 9 _POSIX_JOB_CONTROL = 10 _POSIX_NO_TRUNC = 11 _POSIX_SAVED_IDS = 12 _POSIX_VERSION = (199009L) _SC_ARG_MAX = 15 _SC_CHILD_MAX = 16 _SC_CLK_TCK = 17 _SC_JOB_CONTROL = 18 _SC_NGROUPS_MAX = 19 _SC_OPEN_MAX = 20 _SC_SAVED_IDS = 21 _SC_STREAM_MAX = 22 _SC_TZNAME_MAX = 23 _SC_VERSION = 24 _PC_LINK_MAX = 25 SEEK_SET = 0 SEEK_CUR = 1 SEEK_END = 2 NCC = 11 NCCS = NCC VINTR = 0 VQUIT = 1 VERASE = 2 VKILL = 3 VEOF = 4 VEOL = 5 VMIN = 4 VTIME = 5 VEOL2 = 6 VSWTCH = 7 VSTART = 8 VSTOP = 9 VSUSP = 10 IGNBRK = 0x01 BRKINT = 0x02 IGNPAR = 0x04 PARMRK = 0x08 INPCK = 0x10 ISTRIP = 0x20 INLCR = 0x40 IGNCR = 0x80 ICRNL = 0x100 IUCLC = 0x200 IXON = 0x400 IXANY = 0x800 IXOFF = 0x1000 OPOST = 0x01 OLCUC = 0x02 ONLCR = 0x04 OCRNL = 0x08 ONOCR = 0x10 ONLRET = 0x20 OFILL = 0x40 OFDEL = 0x80 NLDLY = 0x100 NL0 = 0x000 NL1 = 0x100 CRDLY = 0x600 CR0 = 0x000 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 TABDLY = 0x1800 TAB0 = 0x0000 TAB1 = 0x0800 TAB2 = 0x1000 TAB3 = 0x1800 BSDLY = 0x2000 BS0 = 0x0000 BS1 = 0x2000 VTDLY = 0x4000 VT0 = 0x0000 VT1 = 0x4000 FFDLY = 0x8000 FF0 = 0x0000 FF1 = 0x8000 CBAUD = 0x1F B0 = 0x00 B50 = 0x01 B75 = 0x02 B110 = 0x03 B134 = 0x04 B150 = 0x05 B200 = 0x06 B300 = 0x07 B600 = 0x08 B1200 = 0x09 B1800 = 0x0A B2400 = 0x0B B4800 = 0x0C B9600 = 0x0D B19200 = 0x0E B38400 = 0x0F B57600 = 0x10 B115200 = 0x11 B230400 = 0x12 B31250 = 0x13 CSIZE = 0x20 CS5 = 0x00 CS6 = 0x00 CS7 = 0x00 CS8 = 0x20 CSTOPB = 0x40 CREAD = 0x80 PARENB = 0x100 PARODD = 0x200 HUPCL = 0x400 CLOCAL = 0x800 XLOBLK = 0x1000 CTSFLOW = 0x2000 RTSFLOW = 0x4000 CRTSCTS = (RTSFLOW | CTSFLOW) ISIG = (0x01) ICANON = (0x02) XCASE = (0x04) ECHO = (0x08) ECHOE = (0x10) ECHOK = (0x20) ECHONL = (0x40) NOFLSH = (0x80) TOSTOP = (0x100) IEXTEN = (0x200) EV_RING = 0x0001 EV_BREAK = 0x0002 EV_CARRIER = 0x0004 EV_CARRIERLOST = 0x0008 TCGETA = (0x8000) TCSETA = (TCGETA+1) TCSETAF = (TCGETA+2) TCSETAW = (TCGETA+3) TCWAITEVENT = (TCGETA+4) TCSBRK = (TCGETA+5) TCFLSH = (TCGETA+6) TCXONC = (TCGETA+7) TCQUERYCONNECTED = (TCGETA+8) TCGETBITS = (TCGETA+9) TCSETDTR = (TCGETA+10) TCSETRTS = (TCGETA+11) TIOCGWINSZ = (TCGETA+12) TIOCSWINSZ = (TCGETA+13) TCVTIME = (TCGETA+14) TCGB_CTS = 0x01 TCGB_DSR = 0x02 TCGB_RI = 0x04 TCGB_DCD = 0x08 TCSANOW = 0x01 TCSADRAIN = 0x02 TCSAFLUSH = 0x04 TCOOFF = 0x01 TCOON = 0x02 TCIOFF = 0x04 TCION = 0x08 TCIFLUSH = 0x01 TCOFLUSH = 0x02 TCIOFLUSH = (TCIFLUSH | TCOFLUSH) From python-dev@python.org Sat Oct 7 13:31:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 7 Oct 2000 05:31:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.94,1.95 Message-ID: <200010071231.FAA09982@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv9858/Doc/api Modified Files: api.tex Log Message: Fix a couple of places where the descriptions of *_GET_SIZE() macros said they were similar to *_GetSize(); should be similar to *_Size(). Error noted by William Park . Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -r1.94 -r1.95 *** api.tex 2000/10/05 19:38:24 1.94 --- api.tex 2000/10/07 12:31:50 1.95 *************** *** 2090,2094 **** \begin{cfuncdesc}{int}{PyString_GET_SIZE}{PyObject *string} ! Macro form of \cfunction{PyString_GetSize()} but without error checking. \end{cfuncdesc} --- 2090,2094 ---- \begin{cfuncdesc}{int}{PyString_GET_SIZE}{PyObject *string} ! Macro form of \cfunction{PyString_Size()} but without error checking. \end{cfuncdesc} *************** *** 3109,3113 **** \begin{cfuncdesc}{int}{PyList_GET_SIZE}{PyObject *list} ! Macro form of \cfunction{PyList_GetSize()} without error checking. \end{cfuncdesc} --- 3109,3113 ---- \begin{cfuncdesc}{int}{PyList_GET_SIZE}{PyObject *list} ! Macro form of \cfunction{PyList_Size()} without error checking. \end{cfuncdesc} From python-dev@python.org Sat Oct 7 13:50:08 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 7 Oct 2000 05:50:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools indfix.py,1.4,1.5 toc2bkm.py,1.9,1.10 custlib.py,1.1,1.2 Message-ID: <200010071250.FAA26822@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv26754 Modified Files: indfix.py toc2bkm.py custlib.py Log Message: Hush the nanny. Index: indfix.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/indfix.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** indfix.py 1999/03/03 19:36:23 1.4 --- indfix.py 2000/10/07 12:50:04 1.5 *************** *** 31,42 **** def dump_entries(write, entries): if len(entries) == 1: ! write(" \\item %s (%s)%s\n" % entries[0]) ! return write(" \item %s\n" % entries[0][0]) # now sort these in a case insensitive manner: if len(entries) > 0: ! entries.sort(cmp_entries) for xxx, subitem, pages in entries: ! write(" \subitem %s%s\n" % (subitem, pages)) --- 31,42 ---- def dump_entries(write, entries): if len(entries) == 1: ! write(" \\item %s (%s)%s\n" % entries[0]) ! return write(" \item %s\n" % entries[0][0]) # now sort these in a case insensitive manner: if len(entries) > 0: ! entries.sort(cmp_entries) for xxx, subitem, pages in entries: ! write(" \subitem %s%s\n" % (subitem, pages)) *************** *** 57,76 **** write = ofp.write while 1: ! line = ifp.readline() ! if not line: ! break ! m = match(line) ! if m: ! entry = m.group(1, 2, 3) ! if entries and entries[-1][0] != entry[0]: ! dump_entries(write, entries) ! entries = [] ! entries.append(entry) ! elif entries: ! dump_entries(write, entries) ! entries = [] ! write(line) ! else: ! write(line) del write del match --- 57,76 ---- write = ofp.write while 1: ! line = ifp.readline() ! if not line: ! break ! m = match(line) ! if m: ! entry = m.group(1, 2, 3) ! if entries and entries[-1][0] != entry[0]: ! dump_entries(write, entries) ! entries = [] ! entries.append(entry) ! elif entries: ! dump_entries(write, entries) ! entries = [] ! write(line) ! else: ! write(line) del write del match *************** *** 79,85 **** ofp.close() if ofn == "-": ! ofp = sys.stdout else: ! ofp = open(ofn, "w") ofp.write(data) ofp.close() --- 79,85 ---- ofp.close() if ofn == "-": ! ofp = sys.stdout else: ! ofp = open(ofn, "w") ofp.write(data) ofp.close() *************** *** 91,96 **** opts, args = getopt.getopt(sys.argv[1:], "o:") for opt, val in opts: ! if opt in ("-o", "--output"): ! outfile = val filename = args[0] outfile = outfile or filename --- 91,96 ---- opts, args = getopt.getopt(sys.argv[1:], "o:") for opt, val in opts: ! if opt in ("-o", "--output"): ! outfile = val filename = args[0] outfile = outfile or filename Index: toc2bkm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/toc2bkm.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** toc2bkm.py 1999/03/03 19:25:56 1.9 --- toc2bkm.py 2000/10/07 12:50:05 1.10 *************** *** 24,28 **** \{(?:\\numberline\ \{([0-9.A-Z]+)})? # section number (.*)} # title string ! \{(\d+)}$""" # page number cline_rx = re.compile(cline_re, re.VERBOSE) --- 24,28 ---- \{(?:\\numberline\ \{([0-9.A-Z]+)})? # section number (.*)} # title string ! \{(\d+)}$""" # page number cline_rx = re.compile(cline_re, re.VERBOSE) *************** *** 51,82 **** lineno = 0 while 1: ! line = fp.readline() ! if not line: ! break ! lineno = lineno + 1 ! m = cline_rx.match(line) ! if m: ! stype, snum, title, pageno = m.group(1, 2, 3, 4) ! title = clean_title(title) ! entry = (stype, snum, title, string.atoi(pageno), []) ! if stype == level: ! toc.append(entry) ! else: if stype not in INCLUDED_LEVELS: # we don't want paragraphs & subparagraphs continue ! direction = _transition_map[(level, stype)] ! if direction == OUTER_TO_INNER: ! toc = toc[-1][-1] ! stack.insert(0, toc) ! toc.append(entry) ! else: ! for i in range(direction): ! del stack[0] ! toc = stack[0] ! toc.append(entry) ! level = stype ! else: ! sys.stderr.write("l.%s: " + line) return top --- 51,82 ---- lineno = 0 while 1: ! line = fp.readline() ! if not line: ! break ! lineno = lineno + 1 ! m = cline_rx.match(line) ! if m: ! stype, snum, title, pageno = m.group(1, 2, 3, 4) ! title = clean_title(title) ! entry = (stype, snum, title, string.atoi(pageno), []) ! if stype == level: ! toc.append(entry) ! else: if stype not in INCLUDED_LEVELS: # we don't want paragraphs & subparagraphs continue ! direction = _transition_map[(level, stype)] ! if direction == OUTER_TO_INNER: ! toc = toc[-1][-1] ! stack.insert(0, toc) ! toc.append(entry) ! else: ! for i in range(direction): ! del stack[0] ! toc = stack[0] ! toc.append(entry) ! level = stype ! else: ! sys.stderr.write("l.%s: " + line) return top *************** *** 92,103 **** pos = 0 while 1: ! m = title_rx.search(title, pos) ! if m: ! start = m.start() ! if title[start:start+15] != "\\textunderscore": ! title = title[:start] + title[m.end():] ! pos = start + 1 ! else: ! break title = string.translate(title, title_trans, "{}") return title --- 92,103 ---- pos = 0 while 1: ! m = title_rx.search(title, pos) ! if m: ! start = m.start() ! if title[start:start+15] != "\\textunderscore": ! title = title[:start] + title[m.end():] ! pos = start + 1 ! else: ! break title = string.translate(title, title_trans, "{}") return title *************** *** 106,110 **** def write_toc(toc, fp): for entry in toc: ! write_toc_entry(entry, fp, 0) def write_toc_entry(entry, fp, layer): --- 106,110 ---- def write_toc(toc, fp): for entry in toc: ! write_toc_entry(entry, fp, 0) def write_toc_entry(entry, fp, layer): *************** *** 112,122 **** s = "\\pdfoutline goto name{page%03d}" % pageno if toc: ! s = "%s count -%d" % (s, len(toc)) if snum: ! title = "%s %s" % (snum, title) s = "%s {%s}\n" % (s, title) fp.write(s) for entry in toc: ! write_toc_entry(entry, fp, layer + 1) --- 112,122 ---- s = "\\pdfoutline goto name{page%03d}" % pageno if toc: ! s = "%s count -%d" % (s, len(toc)) if snum: ! title = "%s %s" % (snum, title) s = "%s {%s}\n" % (s, title) fp.write(s) for entry in toc: ! write_toc_entry(entry, fp, layer + 1) *************** *** 130,140 **** opts, args = getopt.getopt(sys.argv[1:], "c:") if opts: ! bigpart = opts[0][1] if not args: ! usage() ! sys.exit(2) for filename in args: ! base, ext = os.path.splitext(filename) ! ext = ext or ".toc" process(base + ext, base + ".bkm", bigpart) --- 130,140 ---- opts, args = getopt.getopt(sys.argv[1:], "c:") if opts: ! bigpart = opts[0][1] if not args: ! usage() ! sys.exit(2) for filename in args: ! base, ext = os.path.splitext(filename) ! ext = ext or ".toc" process(base + ext, base + ".bkm", bigpart) Index: custlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/custlib.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** custlib.py 1997/06/02 17:57:10 1.1 --- custlib.py 2000/10/07 12:50:05 1.2 *************** *** 13,29 **** filelist=glob.glob(os.path.join(dir, '*.py')) for file in filelist: ! path, file = os.path.split(file) ! base, ext=os.path.splitext(file) ! modules[string.lower(base)]=base # Look for shared library files filelist=(glob.glob(os.path.join(dir, '*.so')) + ! glob.glob(os.path.join(dir, '*.sl')) + ! glob.glob(os.path.join(dir, '*.o')) ) for file in filelist: ! path, file = os.path.split(file) ! base, ext=os.path.splitext(file) ! if base[-6:]=='module': base=base[:-6] ! modules[string.lower(base)]=base # Minor oddity: the types module is documented in libtypes2.tex --- 13,29 ---- filelist=glob.glob(os.path.join(dir, '*.py')) for file in filelist: ! path, file = os.path.split(file) ! base, ext=os.path.splitext(file) ! modules[string.lower(base)]=base # Look for shared library files filelist=(glob.glob(os.path.join(dir, '*.so')) + ! glob.glob(os.path.join(dir, '*.sl')) + ! glob.glob(os.path.join(dir, '*.o')) ) for file in filelist: ! path, file = os.path.split(file) ! base, ext=os.path.splitext(file) ! if base[-6:]=='module': base=base[:-6] ! modules[string.lower(base)]=base # Minor oddity: the types module is documented in libtypes2.tex *************** *** 54,58 **** \\title{Python Library Reference} \\input{boilerplate} ! \\makeindex % tell \\index to actually write the .idx file \\begin{document} \\pagenumbering{roman} --- 54,58 ---- \\title{Python Library Reference} \\input{boilerplate} ! \\makeindex % tell \\index to actually write the .idx file \\begin{document} \\pagenumbering{roman} *************** *** 70,73 **** # Write the end ! print """\\input{custlib.ind} % Index \\end{document}""" --- 70,73 ---- # Write the end ! print """\\input{custlib.ind} % Index \\end{document}""" From python-dev@python.org Sat Oct 7 16:53:47 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 7 Oct 2000 08:53:47 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.33,1.34 Message-ID: <200010071553.IAA15358@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv14620 Modified Files: pep-0042.txt Log Message: Add request for syntax checking in makesetup, which would prevent confusing errors in config.c during build. (Derived from SF bug #116326) Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** pep-0042.txt 2000/10/06 17:18:55 1.33 --- pep-0042.txt 2000/10/07 15:53:43 1.34 *************** *** 216,219 **** --- 216,226 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110836&group_id=5470 + - Modules/makesetup should make sure the 'config.c' file it + generates from the various Setup files, is valid C. It currently + accepts module names with characters that are not allowable in + Python or C identifiers. + + http://sourceforge.net/bugs/?func=detailbug&bug_id=116326&group_id=5470 + From python-dev@python.org Sat Oct 7 17:21:30 2000 From: python-dev@python.org (Guido van Rossum) Date: Sat, 7 Oct 2000 09:21:30 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.158,1.159 configure.in,1.167,1.168 Message-ID: <200010071621.JAA04181@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv4081 Modified Files: configure configure.in Log Message: Put arguments to test -z in double quotes. Fixes Bug #116325. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.158 retrieving revision 1.159 diff -C2 -r1.158 -r1.159 *** configure 2000/10/05 18:45:52 1.158 --- configure 2000/10/07 16:21:27 1.159 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.166 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.168 # Guess values for system-dependent variables and create Makefiles. *************** *** 3103,3110 **** USE_THREAD_MODULE="#" else ! if test ! -z $with_threads -a -d $with_threads then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z $withval -a -d $withval then LDFLAGS="$LDFLAGS -L$withval" fi --- 3103,3110 ---- USE_THREAD_MODULE="#" else ! if test ! -z "$with_threads" -a -d "$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z "$withval" -a -d "$withval" then LDFLAGS="$LDFLAGS -L$withval" fi *************** *** 3783,3787 **** DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z $dldir -a -d $dldir then LDFLAGS="$LDFLAGS -L$dldir" else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; } --- 3783,3787 ---- DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z "$dldir" -a -d "$dldir" then LDFLAGS="$LDFLAGS -L$dldir" else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; } Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -r1.167 -r1.168 *** configure.in 2000/10/05 18:45:53 1.167 --- configure.in 2000/10/07 16:21:27 1.168 *************** *** 751,758 **** USE_THREAD_MODULE="#" else ! if test ! -z $with_threads -a -d $with_threads then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z $withval -a -d $withval then LDFLAGS="$LDFLAGS -L$withval" fi --- 751,758 ---- USE_THREAD_MODULE="#" else ! if test ! -z "$with_threads" -a -d "$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z "$withval" -a -d "$withval" then LDFLAGS="$LDFLAGS -L$withval" fi *************** *** 890,894 **** DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z $dldir -a -d $dldir then LDFLAGS="$LDFLAGS -L$dldir" else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY) --- 890,894 ---- DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z "$dldir" -a -d "$dldir" then LDFLAGS="$LDFLAGS -L$dldir" else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY) From python-dev@python.org Sat Oct 7 17:58:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 7 Oct 2000 09:58:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_StringIO,1.2,1.3 Message-ID: <200010071658.JAA02253@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv2195 Modified Files: test_StringIO Log Message: The test is good, but Jim forgot to check in the updated output. Index: test_StringIO =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_StringIO,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_StringIO 2000/09/28 04:25:33 1.2 --- test_StringIO 2000/10/07 16:58:11 1.3 *************** *** 5,8 **** --- 5,11 ---- 2 'abcdefghij' + 'abcde' + Caught expected ValueError writing to closed StringIO: + I/O operation on closed file abcdefghij klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ *************** *** 10,11 **** --- 13,17 ---- 2 'abcdefghij' + 'abcde' + Caught expected ValueError writing to closed StringIO: + I/O operation on closed file From python-dev@python.org Sat Oct 7 18:38:26 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 7 Oct 2000 10:38:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.30,1.31 sre_constants.py,1.20,1.21 sre_parse.py,1.36,1.37 Message-ID: <200010071738.KAA04559@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2906/Lib Modified Files: sre_compile.py sre_constants.py sre_parse.py Log Message: Fixed too ambitious "nothing to repeat" check. Closes bug #114033. Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** sre_compile.py 2000/08/07 20:59:04 1.30 --- sre_compile.py 2000/10/07 17:38:22 1.31 *************** *** 223,227 **** # check if av is a "simple" operator lo, hi = av[2].getwidth() ! if lo == 0: raise error, "nothing to repeat" return lo == hi == 1 and av[2][0][0] != SUBPATTERN --- 223,227 ---- # check if av is a "simple" operator lo, hi = av[2].getwidth() ! if lo == 0 and hi == MAXREPEAT: raise error, "nothing to repeat" return lo == hi == 1 and av[2][0][0] != SUBPATTERN Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** sre_constants.py 2000/08/01 22:47:48 1.20 --- sre_constants.py 2000/10/07 17:38:22 1.21 *************** *** 10,13 **** --- 10,15 ---- # + MAXREPEAT = 65535 + # should this really be here? Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** sre_parse.py 2000/10/07 10:16:14 1.36 --- sre_parse.py 2000/10/07 17:38:22 1.37 *************** *** 13,18 **** from sre_constants import * - MAXREPEAT = 65535 - SPECIAL_CHARS = ".\\[{()*+?^$|" REPEAT_CHARS = "*+?{" --- 13,16 ---- From python-dev@python.org Sat Oct 7 18:38:26 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 7 Oct 2000 10:38:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test re_tests.py,1.24,1.25 Message-ID: <200010071738.KAA04553@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv2906/Lib/test Modified Files: re_tests.py Log Message: Fixed too ambitious "nothing to repeat" check. Closes bug #114033. Index: re_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** re_tests.py 2000/10/07 10:16:19 1.24 --- re_tests.py 2000/10/07 17:38:23 1.25 *************** *** 616,619 **** --- 616,621 ---- ('(', '', SYNTAX_ERROR), ('[\\41]', '!', SUCCEED, 'found', '!'), + # bug 114033: nothing to repeat + (r'(x?)?', 'x', SUCCEED, 'found', 'x'), # bug 115040: rescan if flags are modified inside pattern (r' (?x)foo ', 'foo', SUCCEED, 'found', 'foo'), *************** *** 622,624 **** --- 624,627 ---- # bug 116251: character class bug (r'[\w-]+', 'laser_beam', SUCCEED, 'found', 'laser_beam'), + ] From python-dev@python.org Sat Oct 7 20:03:32 2000 From: python-dev@python.org (Martin v. Löwis) Date: Sat, 7 Oct 2000 12:03:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.9,1.10 Message-ID: <200010071903.MAA20917@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv20342 Modified Files: minidom.py Log Message: Don't use string methods to allow sharing this code with PyXML. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** minidom.py 2000/10/07 12:10:28 1.9 --- minidom.py 2000/10/07 19:03:20 1.10 *************** *** 392,396 **** def _nssplit(qualifiedName): ! fields = qualifiedName.split(':', 1) if len(fields) == 2: return fields --- 392,397 ---- def _nssplit(qualifiedName): ! import string ! fields = string.split(qualifiedName,':', 1) if len(fields) == 2: return fields From python-dev@python.org Sun Oct 8 01:20:24 2000 From: python-dev@python.org (Guido van Rossum) Date: Sat, 7 Oct 2000 17:20:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_linuxaudiodev.py,1.5,1.6 Message-ID: <200010080020.RAA05888@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv5835 Modified Files: test_linuxaudiodev.py Log Message: It seems our sound cards can't play mulaw data. Use native-format 16-bit signed data instead. Hope this works for you; it works for me. Index: test_linuxaudiodev.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_linuxaudiodev.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_linuxaudiodev.py 2000/10/06 19:39:55 1.5 --- test_linuxaudiodev.py 2000/10/08 00:20:20 1.6 *************** *** 5,11 **** --- 5,13 ---- import linuxaudiodev import os + import sys import select import sunaudio import time + import audioop SND_FORMAT_MULAW_8 = 1 *************** *** 28,31 **** --- 30,42 ---- raise TestFailed, msg + # convert the data to 16-bit signed + data = audioop.ulaw2lin(data, 2) + + # set the data format + if sys.byteorder == 'little': + fmt = linuxaudiodev.AFMT_S16_LE + else: + fmt = linuxaudiodev.AFMT_S16_BE + # at least check that these methods can be invoked a.bufsize() *************** *** 36,40 **** # set parameters based on .au file headers ! a.setparameters(rate, 8, nchannels, linuxaudiodev.AFMT_MU_LAW, 1) a.write(data) a.flush() --- 47,51 ---- # set parameters based on .au file headers ! a.setparameters(rate, 16, nchannels, fmt) a.write(data) a.flush() From python-dev@python.org Sun Oct 8 01:21:46 2000 From: python-dev@python.org (Guido van Rossum) Date: Sat, 7 Oct 2000 17:21:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_linuxaudiodev,1.2,1.3 Message-ID: <200010080021.RAA07502@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv7443 Modified Files: test_linuxaudiodev Log Message: Correct output. Index: test_linuxaudiodev =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_linuxaudiodev,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_linuxaudiodev 2000/10/06 19:39:55 1.2 --- test_linuxaudiodev 2000/10/08 00:21:43 1.3 *************** *** 5,7 **** unknown audio encoding: 177 sample size 16 expected for Little-endian 16-bit unsigned format: 8 received ! sample size 8 expected for Logarithmic mu-law audio: 16 received --- 5,7 ---- unknown audio encoding: 177 sample size 16 expected for Little-endian 16-bit unsigned format: 8 received ! sample size 8 expected for Standard unsigned 8-bit audio: 16 received From python-dev@python.org Sun Oct 8 20:47:50 2000 From: python-dev@python.org (Guido van Rossum) Date: Sun, 8 Oct 2000 12:47:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules linuxaudiodev.c,2.10,2.11 Message-ID: <200010081947.MAA26812@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26755 Modified Files: linuxaudiodev.c Log Message: Be consistent in the description of audio formats: "audio". Also add AFMT_S16_NE ("native-endian"). (Somehow there's no AFMT_U16_NE.) Index: linuxaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** linuxaudiodev.c 2000/10/06 19:39:55 2.10 --- linuxaudiodev.c 2000/10/08 19:47:47 2.11 *************** *** 68,75 **** { 8, AFMT_U8, "Standard unsigned 8-bit audio" }, { 8, AFMT_S8, "Standard signed 8-bit audio" }, ! { 16, AFMT_U16_BE, "Big-endian 16-bit unsigned format" }, ! { 16, AFMT_U16_LE, "Little-endian 16-bit unsigned format" }, ! { 16, AFMT_S16_BE, "Big-endian 16-bit signed format" }, ! { 16, AFMT_S16_LE, "Little-endian 16-bit signed format" }, }; --- 68,76 ---- { 8, AFMT_U8, "Standard unsigned 8-bit audio" }, { 8, AFMT_S8, "Standard signed 8-bit audio" }, ! { 16, AFMT_U16_BE, "Big-endian 16-bit unsigned audio" }, ! { 16, AFMT_U16_LE, "Little-endian 16-bit unsigned audio" }, ! { 16, AFMT_S16_BE, "Big-endian 16-bit signed audio" }, ! { 16, AFMT_S16_LE, "Little-endian 16-bit signed audio" }, ! { 16, AFMT_S16_NE, "Native-endian 16-bit signed audio" }, }; *************** *** 485,488 **** --- 486,491 ---- return; if (PyModule_AddIntConstant(m, "AFMT_S16_LE", (long)AFMT_S16_LE) == -1) + return; + if (PyModule_AddIntConstant(m, "AFMT_S16_NE", (long)AFMT_S16_NE) == -1) return; From python-dev@python.org Sun Oct 8 20:48:48 2000 From: python-dev@python.org (Guido van Rossum) Date: Sun, 8 Oct 2000 12:48:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_linuxaudiodev,1.3,1.4 Message-ID: <200010081948.MAA27681@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv27639 Modified Files: test_linuxaudiodev Log Message: Adapt test output to changed error message. Index: test_linuxaudiodev =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_linuxaudiodev,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_linuxaudiodev 2000/10/08 00:21:43 1.3 --- test_linuxaudiodev 2000/10/08 19:48:46 1.4 *************** *** 4,7 **** nchannels must be 1 or 2, not 3 unknown audio encoding: 177 ! sample size 16 expected for Little-endian 16-bit unsigned format: 8 received sample size 8 expected for Standard unsigned 8-bit audio: 16 received --- 4,7 ---- nchannels must be 1 or 2, not 3 unknown audio encoding: 177 ! sample size 16 expected for Little-endian 16-bit unsigned audio: 8 received sample size 8 expected for Standard unsigned 8-bit audio: 16 received From python-dev@python.org Mon Oct 9 13:42:07 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 05:42:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib calendar.py,1.17,1.18 Message-ID: <200010091242.FAA02671@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2609 Modified Files: calendar.py Log Message: Fixed leapdays(). From Patch #101841, by Denis S. Otkidach. Index: calendar.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/calendar.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** calendar.py 2000/08/30 14:01:28 1.17 --- calendar.py 2000/10/09 12:42:04 1.18 *************** *** 55,60 **** def leapdays(y1, y2): """Return number of leap years in range [y1, y2). ! Assume y1 <= y2 and no funny (non-leap century) years.""" ! return (y2+3)/4 - (y1+3)/4 def weekday(year, month, day): --- 55,62 ---- def leapdays(y1, y2): """Return number of leap years in range [y1, y2). ! Assume y1 <= y2.""" ! y1 -= 1 ! y2 -= 1 ! return (y2/4 - y1/4) - (y2/100 - y1/100) + (y2/400 - y1/400) def weekday(year, month, day): From python-dev@python.org Mon Oct 9 15:18:16 2000 From: python-dev@python.org (A.M. Kuchling) Date: Mon, 9 Oct 2000 07:18:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules zlibmodule.c,2.35,2.36 Message-ID: <200010091418.HAA08765@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6858 Modified Files: zlibmodule.c Log Message: Patch #101810: check whether zst.avail_out is non-zero when getting a Z_BUF_ERROR while decompressing. If it is, assume that this means the data being decompressed is bad and raise an exception, instead of just assuming that Z_BUF_ERROR always means that more space is required. Index: zlibmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/zlibmodule.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** zlibmodule.c 2000/08/03 02:04:05 2.35 --- zlibmodule.c 2000/10/09 14:18:10 2.36 *************** *** 215,219 **** break; case(Z_BUF_ERROR): ! case(Z_OK): /* need more memory */ if (_PyString_Resize(&result_str, r_strlen << 1) == -1) --- 215,233 ---- break; case(Z_BUF_ERROR): ! /* ! * If there is at least 1 byte of room according to zst.avail_out ! * and we get this error, assume that it means zlib cannot ! * process the inflate call() due to an error in the data. ! */ ! if (zst.avail_out > 0) ! { ! PyErr_Format(ZlibError, "Error %i while decompressing data", ! err); ! inflateEnd(&zst); ! Py_DECREF(result_str); ! return NULL; ! } ! /* fall through */ ! case(Z_OK): /* need more memory */ if (_PyString_Resize(&result_str, r_strlen << 1) == -1) From python-dev@python.org Mon Oct 9 15:35:27 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 07:35:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler dumppyc.py,NONE,1.1 Message-ID: <200010091435.HAA21426@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv21101 Added Files: dumppyc.py Log Message: read in a .pyc file and disassemble the code objects --- NEW FILE --- #! /usr/bin/env python import marshal import dis import types def dump(obj): print obj for attr in dir(obj): print "\t", attr, repr(getattr(obj, attr)) def loadCode(path): f = open(path) f.read(8) co = marshal.load(f) f.close() return co def walk(co, match=None): if match is None or co.co_name == match: dump(co) print dis.dis(co) for obj in co.co_consts: if type(obj) == types.CodeType: walk(obj, match) def main(filename, codename=None): co = loadCode(filename) walk(co, codename) if __name__ == "__main__": import sys if len(sys.argv) == 3: filename, codename = sys.argv[1:] else: filename = sys.argv[1] codename = None main(filename, codename) From python-dev@python.org Mon Oct 9 16:13:51 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 08:13:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.40,2.41 Message-ID: <200010091513.IAA22787@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv22465/Include Modified Files: patchlevel.h Log Message: bump patchlevel to 2.0c1 Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** patchlevel.h 2000/09/26 00:36:03 2.40 --- patchlevel.h 2000/10/09 15:13:47 2.41 *************** *** 23,34 **** #define PY_MINOR_VERSION 0 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA ! #define PY_RELEASE_SERIAL 2 /* Version as a string */ ! #define PY_VERSION "2.0b2" /* Historic */ ! #define PATCHLEVEL "2.0b2" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. --- 23,34 ---- #define PY_MINOR_VERSION 0 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA ! #define PY_RELEASE_SERIAL 1 /* Version as a string */ ! #define PY_VERSION "2.0c1" /* Historic */ ! #define PATCHLEVEL "2.0c1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. From python-dev@python.org Mon Oct 9 16:27:34 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 08:27:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcalendar.tex,1.8,1.9 Message-ID: <200010091527.IAA32670@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv32626/lib Modified Files: libcalendar.tex Log Message: Denis S. Otkidach : Correct description of leapdays() function. This closes SourceForge patch #101840. Index: libcalendar.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcalendar.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libcalendar.tex 2000/08/30 14:02:25 1.8 --- libcalendar.tex 2000/10/09 15:27:31 1.9 *************** *** 38,42 **** \begin{funcdesc}{leapdays}{y1, y2} Returns the number of leap years in the range ! [\var{y1}\ldots\var{y2}]. \end{funcdesc} --- 38,42 ---- \begin{funcdesc}{leapdays}{y1, y2} Returns the number of leap years in the range ! [\var{y1}\ldots\var{y2}). \end{funcdesc} From python-dev@python.org Mon Oct 9 17:45:58 2000 From: python-dev@python.org (Martin v. Löwis) Date: Mon, 9 Oct 2000 09:45:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax _exceptions.py,1.5,1.6 expatreader.py,1.16,1.17 Message-ID: <200010091645.JAA00377@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv31777 Modified Files: _exceptions.py expatreader.py Log Message: _exceptions: Format a missing system id as . expatreader: Use the error handler instead of raising exception directly. Index: _exceptions.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/_exceptions.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** _exceptions.py 2000/10/06 17:41:52 1.5 --- _exceptions.py 2000/10/09 16:45:54 1.6 *************** *** 80,87 **** def __str__(self): "Create a string representation of the exception." ! return "%s at %s:%d:%d" % (self._msg, ! self.getSystemId(), ! self.getLineNumber(), ! self.getColumnNumber()) --- 80,88 ---- def __str__(self): "Create a string representation of the exception." ! sysid = self.getSystemId() ! if sysid is None: ! sysid = "" ! return "%s:%d:%d: %s" % (sysid, self.getLineNumber(), ! self.getColumnNumber(), self._msg) Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** expatreader.py 2000/10/06 21:10:34 1.16 --- expatreader.py 2000/10/09 16:45:54 1.17 *************** *** 82,86 **** except expat.error: error_code = self._parser.ErrorCode ! raise SAXParseException(expat.ErrorString(error_code), None, self) def close(self): --- 82,87 ---- except expat.error: error_code = self._parser.ErrorCode ! exc = SAXParseException(expat.ErrorString(error_code), None, self) ! self._err_handler.fatalError(exc) def close(self): From python-dev@python.org Mon Oct 9 17:46:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 09:46:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/BeOS ar-fake,1.3,1.4 Message-ID: <200010091646.JAA00476@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/BeOS In directory slayer.i.sourceforge.net:/tmp/cvs-serv433/BeOS Modified Files: ar-fake Log Message: Updated version from Donn Cave . This closes SourceForge patch #101778. Index: ar-fake =================================================================== RCS file: /cvsroot/python/python/dist/src/BeOS/ar-fake,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ar-fake 1999/03/24 17:46:39 1.3 --- ar-fake 2000/10/09 16:46:02 1.4 *************** *** 1,157 **** ! #! /bin/sh # ! # Fake "ar" to build the Python shared library on BeOS. This "ar" ! # manipulates a .ar-libname file listing all the objects and regenerates ! # the shared lib every time it's called. This is probably only suitable ! # for things that get built like Python, and you'll probably have to make ! # some small modifications here and there. # ! # This stupid hackery is necessary due to the brain-damaged __declspec() ! # semantics on x86; on PowerPC, we could just build a static library ! # and turn that into a shared library using an exports list. On x86, you'd ! # need to use a fake table of pointers to every symbol you wanted to ! # export, otherwise you'd end up with an empty shared lib. This is ! # progress? ! # ! # Called via: ! # ! # ar-fake cr lib-name objects ! # ar-fake d lib-name objects ! # ! # This fake "ar" DOES NOT support any other POSIX "ar" commands! DO NOT ! # expect it to behave very intelligently, it's designed to build Python, ! # not any old shared lib. ! ! AR_COMMAND=$1 ; shift ! AR_LIB=$1 ; shift ! AR_LIB_NAME=$(basename $AR_LIB) ! AR_SO_LIB_NAME=${AR_LIB_NAME/.a/.so} ! AR_LIB_PATH=${AR_LIB/$AR_LIB_NAME/} ! if [ "$AR_LIB_PATH" = "" ] ; then ! AR_LIB_PATH="." ! fi ! AR_CRUD=${AR_LIB_PATH}/.ar-${AR_LIB_NAME} ! ! AR_CWD=$(pwd) ! ! # Function to tell is if the arg is an absolute path. Use it like this: ! # ! # if is_abs pathname ; then ... ! is_abs() { ! if [ "$1" != "$(echo $1 | sed -e "s,^/,,")" ] ; then ! return 0 ! fi ! return 1 ! } ! ! # Function to build the shared library. It does the right thing for ! # PowerPC or x86 systems running BeOS. ! build_lib() { ! LIB=$1 ; shift ! SO_LIB=${LIB/.a/.so} ! SO_NAME=$1 ; shift ! CRUD_NAME=$1 ; shift ! ! # maybe too much... ! EXTRA_LIBS="-lroot -lbe -lnet" ! ! case $BE_HOST_CPU in ! ppc) ! case $(uname -r) in ! 4.0*) AR_CC="mwcc -xms -export pragma -nodup" ;; ! *) AR_CC="mwcc -shared -export pragma -nodup" ;; ! esac ! GLUE_LOC=/boot/develop/lib/ppc ! AR_GLUE="${GLUE_LOC}/glue-noinit.a ${GLUE_LOC}/init_term_dyn.o ${GLUE_LOC}/start_dyn.o" ! ;; ! ! x86) ! AR_CC="gcc -nostart -Wl,-soname=${SO_NAME}" ! AR_GLUE= ! ;; ! *) ! # Send me the mystery system (soo-pah aitch!), then we'll talk... ! echo "No, no, no... $0 doesn't support $BE_HOST_CPU" ! exit 2 ! ;; ! esac ! # Build a list of the objects... ! PARTS="" ! while read OBJ_FILE OBJ_PATH ; do ! PARTS="$PARTS ${OBJ_PATH}${OBJ_FILE}" ! done < $CRUD_NAME ! ! $AR_CC -o $SO_LIB $PARTS $AR_GLUE $EXTRA_LIBS > /dev/null 2>&1 ! ! return 0 ! } ! ! # Make a backup of the old AR_CRUD file, just to be nice, and clean up ! # any of our temp files that may be laying around. ! if [ -e $AR_CRUD ] ; then ! mv -f $AR_CRUD ${AR_CRUD}.old ! cp ${AR_CRUD}.old $AR_CRUD ! else ! touch $AR_CRUD ! fi ! ! if [ -e ${AR_CRUD}.grepper ] ; then ! rm -f ${AR_CRUD}.grepper ! fi ! ! case $AR_COMMAND in ! cr) ! # Add the extra bits to the $AR_CRUD file. ! for OBJECT in "$@" ; do ! OBJ_NAME=$(basename $OBJECT) ! OBJ_PATH=${OBJECT%$OBJ_NAME} ! if ! is_abs $OBJ_PATH ; then ! OBJ_PATH=${AR_CWD}/${OBJECT} ! OBJ_PATH=${OBJ_PATH%$OBJ_NAME} ! fi ! ! # If this is already in there, we have to blow it away so ! # we can replace it with the new one. ! if egrep -q "^$OBJ_NAME " $AR_CRUD ; then ! egrep -v "^$OBJ_NAME " < $AR_CRUD > ${AR_CRUD}.grepper ! mv -f ${AR_CRUD}.grepper $AR_CRUD ! fi ! ! echo $OBJ_NAME $OBJ_PATH >> $AR_CRUD ! done ! ! # Now build a library from the files. ! build_lib $AR_LIB $AR_SO_LIB_NAME $AR_CRUD ! ;; ! ! d) ! # Remove files from the $AR_CRUD file. This isn't terribly ! # efficient. ! for OBJECT in "$@" ; do ! OBJ_NAME=$(basename $OBJECT) ! OBJ_PATH=${OBJECT%$OBJ_NAME} ! if ! is_abs $OBJ_PATH ; then ! OBJ_PATH=${AR_CWD}/${OBJECT} ! OBJ_PATH=${OBJ_PATH%$OBJ_NAME} ! fi ! ! # Strip the objects from the list, if they're in there. ! egrep -v "^$OBJ_NAME " < $AR_CRUD > ${AR_CRUD}.grepper ! mv -f ${AR_CRUD}.grepper $AR_CRUD ! done ! ! # Now build a library from the remaining objects. ! build_lib $AR_LIB $AR_SO_LIB_NAME $AR_CRUD ! ;; ! ! *) ! echo "$0 error:" ! echo " Unsupported command: $AR_COMMAND" ! exit 1 ! ;; esac ! # If we make it here, all went well. Hopefully. ! exit 0 --- 1,64 ---- ! #!/bin/sh # ! # Truly fake ar, using a directory to store object files. # ! # Donn Cave, donn@oz.net ! usage='Usage: ar-fake cr libpython.dir obj.o ... ! ar-fake d libpython.dir obj.o ... ! ar-fake so libpython.dir libpython.so' ! case $# in ! 0|1|2) ! echo "$usage" >&2 ! exit 1 ! ;; esac ! command=$1 ! library=$2 ! shift 2 ! ! case $command in ! cr) ! if test -d $library ! then : ! else ! mkdir $library ! fi ! if cp -p $* $library ! then ! # To force directory modify date, create or delete a file. ! if test -e $library/.tch ! then rm $library/.tch ! else echo tch > $library/.tch ! fi ! exit 0 ! fi ! ;; ! d) ! if test -d $library ! then ! cd $library ! rm -f $* ! fi ! ;; ! so) ! case $BE_HOST_CPU in ! ppc) ! mwld -xms -export pragma -nodup -o $1 $library/* ! ;; ! x86) ! gcc -nostart -Wl,-soname=$(basename $1) -o $1 $library/* ! ;; ! esac ! status=$? ! cd $(dirname $1) ! ln -sf $PWD lib ! exit $status ! ;; ! *) ! echo "$usage" >&2 ! exit 1 ! ;; ! esac From python-dev@python.org Mon Oct 9 17:48:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 09:48:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules Makefile.pre.in,1.67,1.68 Message-ID: <200010091648.JAA02601@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2529/Modules Modified Files: Makefile.pre.in Log Message: Donn Cave : Updated to work better with BeOS. This closes SourceForge patch #101777. Index: Makefile.pre.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/Makefile.pre.in,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -r1.67 -r1.68 *** Makefile.pre.in 2000/09/22 15:38:21 1.67 --- Makefile.pre.in 2000/10/09 16:48:09 1.68 *************** *** 150,154 **** config.c Makefile: Setup.config Setup Setup.local config.c Makefile: ! -rm -f $(LIBRARY) $(SHELL) $(MAKESETUP) Setup.config Setup.local Setup --- 150,154 ---- config.c Makefile: Setup.config Setup Setup.local config.c Makefile: ! -rm -rf $(LIBRARY) $(SHELL) $(MAKESETUP) Setup.config Setup.local Setup From python-dev@python.org Mon Oct 9 17:51:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 09:51:52 -0700 Subject: [Python-checkins] CVS: python/dist/src Makefile.in,1.104,1.105 Message-ID: <200010091651.JAA05703@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv5657 Modified Files: Makefile.in Log Message: Donn Cave : Revise BeOS support. This closes SourceForge patch #101776. Index: Makefile.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.in,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -r1.104 -r1.105 *** Makefile.in 2000/09/24 19:57:18 1.104 --- Makefile.in 2000/10/09 16:51:49 1.105 *************** *** 169,173 **** (cd $$i; $(MAKE) VERSION="$(VERSION)" add2lib); done ! # This rule is only here for DG/UX!!! libpython$(VERSION).so: $(LIBRARY) case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \ --- 169,173 ---- (cd $$i; $(MAKE) VERSION="$(VERSION)" add2lib); done ! # This rule is only here for DG/UX and BeOS!!! libpython$(VERSION).so: $(LIBRARY) case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \ *************** *** 177,180 **** --- 177,183 ---- /bin/rm -rf ./dgux \ ;; \ + beos) \ + $(srcdir)/BeOS/ar-fake so $(LIBRARY) $@ \ + ;; \ esac *************** *** 368,372 **** fi; \ done ! @if [ "$(MACHDEP)" != "beos" ] ; then \ $(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) ; \ $(RANLIB) $(LIBPL)/$(LIBRARY) ; \ --- 371,375 ---- fi; \ done ! @if test -d $(LIBRARY); then :; else \ $(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) ; \ $(RANLIB) $(LIBPL)/$(LIBRARY) ; \ *************** *** 397,401 **** else true; \ fi ! @if [ "$(MACHDEP)" = "beos" ] ; then \ echo; echo "Installing support files for building shared extension modules on BeOS:"; \ $(INSTALL_DATA) BeOS/README $(LIBPL)/README; \ --- 400,404 ---- else true; \ fi ! @case "$(MACHDEP)" in beos*) \ echo; echo "Installing support files for building shared extension modules on BeOS:"; \ $(INSTALL_DATA) BeOS/README $(LIBPL)/README; \ *************** *** 403,417 **** $(INSTALL_DATA) BeOS/README.readline-2.2 $(LIBPL)/README.readline-2.2; \ echo "$(LIBPL)/README.readline-2.2"; \ - $(INSTALL_DATA) BeOS/dl_export.h $(LIBPL)/dl_export.h; \ - echo "$(LIBPL)/dl_export.h"; \ $(INSTALL_PROGRAM) BeOS/ar-fake $(LIBPL)/ar-fake; \ echo "$(LIBPL)/ar-fake"; \ - $(INSTALL_PROGRAM) BeOS/linkcc $(LIBPL)/linkcc; \ - echo "$(LIBPL)/linkcc"; \ $(INSTALL_PROGRAM) BeOS/linkmodule $(LIBPL)/linkmodule; \ echo "$(LIBPL)/linkmodule"; \ echo; echo "See BeOS/README for details."; \ ! else true; \ ! fi # Install the dynamically loadable modules --- 406,416 ---- $(INSTALL_DATA) BeOS/README.readline-2.2 $(LIBPL)/README.readline-2.2; \ echo "$(LIBPL)/README.readline-2.2"; \ $(INSTALL_PROGRAM) BeOS/ar-fake $(LIBPL)/ar-fake; \ echo "$(LIBPL)/ar-fake"; \ $(INSTALL_PROGRAM) BeOS/linkmodule $(LIBPL)/linkmodule; \ echo "$(LIBPL)/linkmodule"; \ echo; echo "See BeOS/README for details."; \ ! ;; \ ! esac # Install the dynamically loadable modules From python-dev@python.org Mon Oct 9 18:01:07 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 10:01:07 -0700 Subject: [Python-checkins] CVS: python/dist/src config.h.in,2.75,2.76 acconfig.h,1.38,1.39 Message-ID: <200010091701.KAA12919@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv12856 Modified Files: config.h.in acconfig.h Log Message: Donn Cave : Removed DL_EXPORT_HEADER -- only needed on BeOS, and not needed there anymore. This closes SourceForge patch #101775. Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.75 retrieving revision 2.76 diff -C2 -r2.75 -r2.76 *** config.h.in 2000/09/19 00:46:45 2.75 --- config.h.in 2000/10/09 17:01:03 2.76 *************** *** 91,100 **** #undef clock_t - /* Used for BeOS configuration */ - #undef DL_EXPORT_HEADER - #ifdef DL_EXPORT_HEADER - #include DL_EXPORT_HEADER - #endif - /* Define if getpgrp() must be called as getpgrp(0). */ #undef GETPGRP_HAVE_ARG --- 91,94 ---- Index: acconfig.h =================================================================== RCS file: /cvsroot/python/python/dist/src/acconfig.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** acconfig.h 2000/09/19 00:46:45 1.38 --- acconfig.h 2000/10/09 17:01:03 1.39 *************** *** 23,32 **** #undef clock_t - /* Used for BeOS configuration */ - #undef DL_EXPORT_HEADER - #ifdef DL_EXPORT_HEADER - #include DL_EXPORT_HEADER - #endif - /* Define if getpgrp() must be called as getpgrp(0). */ #undef GETPGRP_HAVE_ARG --- 23,26 ---- From python-dev@python.org Mon Oct 9 18:06:17 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 10:06:17 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.168,1.169 configure,1.159,1.160 Message-ID: <200010091706.KAA17002@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv16929 Modified Files: configure.in configure Log Message: Donn Cave : Update for BeOS. This closes SourceForge patch #101774. Also fix typo in a comment. Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -r1.168 -r1.169 *** configure.in 2000/10/07 16:21:27 1.168 --- configure.in 2000/10/09 17:06:13 1.169 *************** *** 118,134 **** without_gcc=;; BeOS*) - # Dunno if it's a good idea to get this over with all at once, or - # to handle it in with the other goodies. - MACHDEP=beos - case $BE_HOST_CPU in ppc) ! CC="mwcc -I$PWD/BeOS -nodup" without_gcc=yes ! case `uname -r` in ! 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;; ! *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;; ! esac ! CCSHARED=-UUSE_DL_EXPORT LDFLAGS="$LDFLAGS -nodup" --- 118,127 ---- without_gcc=;; BeOS*) case $BE_HOST_CPU in ppc) ! CC=mwcc without_gcc=yes ! OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma" ! CCSHARED="UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" LDFLAGS="$LDFLAGS -nodup" *************** *** 139,154 **** ;; x86) ! CC="gcc -I$PWD/BeOS" without_gcc=no ! OPT="-DUSE_DL_EXPORT -O" ! CCSHARED=-UUSE_DL_EXPORT ! AR="$PWD/BeOS/ar-fake" RANLIB=: - - AC_DEFINE(DL_EXPORT_HEADER,"dl_export.h") ;; *) ! AC_ERROR(Your BeOS system isn't PowerPC or x86... neat, but this won't work...) ;; esac --- 132,144 ---- ;; x86) ! CC=gcc without_gcc=no ! OPT=-O ! # Really should use srcdir instead of PWD AR="$PWD/BeOS/ar-fake" RANLIB=: ;; *) ! AC_ERROR(Unknown BeOS platform \"$BE_HOST_CPU\") ;; esac *************** *** 221,228 **** cc|*/cc) CC="$CC -Ae";; esac;; - BeOS*) - case $CC in - cc) CC=cc;; - esac;; Monterey*) case $CC in --- 211,214 ---- *************** *** 240,244 **** # LINKCC is the command that links the python executable -- default is $(CC). ! # This is altered for AIX and BeOS in order to build the export list before # linking. AC_SUBST(LINKCC) --- 226,230 ---- # LINKCC is the command that links the python executable -- default is $(CC). ! # This is altered for AIX in order to build the export list before # linking. AC_SUBST(LINKCC) *************** *** 253,259 **** AIX*) LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; - BeOS*) - LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)" - LDLIBRARY='libpython$(VERSION).so';; dgux*) LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; --- 239,242 ---- *************** *** 275,283 **** # DG/UX requires some fancy ld contortions to produce a .so from an .a ! if test "$MACHDEP" = "dguxR4" ! then ! LDLIBRARY='libpython$(VERSION).so' ! OPT="$OPT -pic" ! fi AC_MSG_RESULT($LDLIBRARY) --- 258,270 ---- # DG/UX requires some fancy ld contortions to produce a .so from an .a ! case $MACHDEP in ! dguxR4) ! LDLIBRARY='libpython$(VERSION).so' ! OPT="$OPT -pic" ! ;; ! beos*) ! LDLIBRARY='libpython$(VERSION).so' ! ;; ! esac AC_MSG_RESULT($LDLIBRARY) *************** *** 842,846 **** fi else ! # make sure user knows why bsddb support wasn't enabled event # though s/he requested it if test "$with_libdb" = "yes" --- 829,833 ---- fi else ! # make sure user knows why bsddb support wasn't enabled even # though s/he requested it if test "$with_libdb" = "yes" Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.159 retrieving revision 1.160 diff -C2 -r1.159 -r1.160 *** configure 2000/10/07 16:21:27 1.159 --- configure 2000/10/09 17:06:13 1.160 *************** *** 4,8 **** # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 4,8 ---- # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. [...4700 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) --- 6022,6026 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6316,6319 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 6326,6329 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 From python-dev@python.org Mon Oct 9 19:08:59 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 11:08:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.3,1.4 Message-ID: <200010091808.LAA09166@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv9070 Modified Files: ACKS Log Message: Another name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ACKS 2000/10/06 21:00:40 1.3 --- ACKS 2000/10/09 18:08:56 1.4 *************** *** 100,103 **** --- 100,104 ---- Koray Oner Denis S. Otkidach + William Park Tim Peters Christopher Petrilli From python-dev@python.org Mon Oct 9 19:11:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 11:11:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib lib.tex,1.166,1.167 Message-ID: <200010091811.LAA12565@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12474/lib Modified Files: lib.tex Log Message: Push xmllib to the end of the markup chapter since it is deprecated. Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -r1.166 -r1.167 *** lib.tex 2000/09/25 18:25:46 1.166 --- lib.tex 2000/10/09 18:11:24 1.167 *************** *** 234,240 **** \input{libsgmllib} \input{libhtmllib} - \input{libxmllib} \input{libpyexpat} \input{xmlsax} \input{libmm} % Multimedia Services --- 234,240 ---- \input{libsgmllib} \input{libhtmllib} \input{libpyexpat} \input{xmlsax} + \input{libxmllib} \input{libmm} % Multimedia Services From python-dev@python.org Mon Oct 9 19:12:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 11:12:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libfnmatch.tex,1.16,1.17 libglob.tex,1.11,1.12 Message-ID: <200010091812.LAA14513@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv14415/lib Modified Files: libfnmatch.tex libglob.tex Log Message: Work around annoyances in LaTeX2HTML. Index: libfnmatch.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfnmatch.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** libfnmatch.tex 2000/04/03 20:13:53 1.16 --- libfnmatch.tex 2000/10/09 18:12:29 1.17 *************** *** 3,7 **** \declaremodule{standard}{fnmatch} ! \modulesynopsis{\UNIX{} shell style filename pattern matching.} --- 3,7 ---- \declaremodule{standard}{fnmatch} ! \modulesynopsis{\UNIX\ shell style filename pattern matching.} Index: libglob.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libglob.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** libglob.tex 1999/03/16 16:40:01 1.11 --- libglob.tex 2000/10/09 18:12:29 1.12 *************** *** 3,7 **** \declaremodule{standard}{glob} ! \modulesynopsis{\UNIX{} shell style pathname pattern expansion.} --- 3,7 ---- \declaremodule{standard}{glob} ! \modulesynopsis{\UNIX\ shell style pathname pattern expansion.} From python-dev@python.org Mon Oct 9 19:26:45 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 11:26:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.71,1.72 Message-ID: <200010091826.LAA03029@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv2615 Modified Files: NEWS Log Message: Summary of changes between 2.0b2 and 2.0c1 Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -r1.71 -r1.72 *** NEWS 2000/10/02 13:43:33 1.71 --- NEWS 2000/10/09 18:26:42 1.72 *************** *** 1,3 **** ! What's New in Python 2.0b2? =========================== --- 1,3 ---- ! What's New in Python 2.0c1? =========================== *************** *** 15,18 **** --- 15,141 ---- ====================================================================== + What's new in 2.0 release candidate 1 (since beta 2)? + ===================================================== + + All the changes since the last beta release are bug fixes or changes + to build support for specific platforms. + + Core language, builtins, and interpreter + + - A bug that caused crashes when __coerce__ was used with augmented + assignment, e.g. +=, was fixed. + + - Raise ZeroDivisionError when raising zero to a negative number, + e.g. 0.0 ** -2.0. Note that math.pow is unrelated to the builtin + power operator and the result of math.pow(0.0, -2.0) will vary by + platform. On Linux, it raises a ValueError. + + - A bug in Unicode string interpolation was fixed that occasionally + caused errors with formats including "%%". For example, the + following expression "%% %s" % u"abc" no longer raises a TypeError. + + - Compilation of deeply nested expressions raises MemoryError instead + of SyntaxError, e.g. eval("[" * 50 + "]" * 50). + + - In 2.0b2 on Windows, the interpreter wrote .pyc files in text mode, + rendering them useless. They are now written in binary mode again. + + Standard library + + - Keyword arguments are now accepted for most pattern and match object + methods in SRE, the standard regular expression engine. + + - In SRE, fix error with negative lookahead and lookbehind that + manifested itself as a runtime error in patterns like "? Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv1974 Modified Files: ACKS Log Message: new name Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -r1.64 -r1.65 *** ACKS 2000/10/02 14:52:31 1.64 --- ACKS 2000/10/09 18:26:16 1.65 *************** *** 48,51 **** --- 48,52 ---- Gary S. Brown Oleg Broytmann + Stan Bubrouski Erik de Bueger Jan-Hein B"uhrman From python-dev@python.org Mon Oct 9 19:34:16 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 11:34:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.72,1.73 Message-ID: <200010091834.LAA14398@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv13883 Modified Files: NEWS Log Message: added better description of BeOS changes from Donn Cave Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -r1.72 -r1.73 *** NEWS 2000/10/09 18:26:42 1.72 --- NEWS 2000/10/09 18:34:12 1.73 *************** *** 125,130 **** platform. ! - BeOS: Many changes were made to support compilation on BeOS 4.5 and ! 5.0. - Cygwin: Support for shared libraries, Tkinter, and sockets. --- 125,135 ---- platform. ! - BeOS: A number of changes were made to the build and installation ! process. ar-fake now operates on a directory of object files. ! dl_export.h is gone, and its macros now appear on the mwcc command ! line during build on PPC BeOS. ! ! Platform directory in lib/python2.0 is "plat-beos5" (or ! "plat-beos4", if building on BeOS 4.5), rather than "plat-beos". - Cygwin: Support for shared libraries, Tkinter, and sockets. From python-dev@python.org Mon Oct 9 19:56:29 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 11:56:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html Makefile,1.38,1.39 Message-ID: <200010091856.LAA12363@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv12235 Modified Files: Makefile Log Message: Do not forget to build the acks.html file when building "all"! Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/Makefile,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** Makefile 2000/10/05 05:16:56 1.38 --- Makefile 2000/10/09 18:56:23 1.39 *************** *** 38,42 **** ! all: $(INDEXFILES) index.html modindex.html .PHONY: api ext lib mac ref tut inst dist --- 38,42 ---- ! all: $(INDEXFILES) index.html modindex.html acks.html .PHONY: api ext lib mac ref tut inst dist From python-dev@python.org Mon Oct 9 20:19:06 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 12:19:06 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html index.html,1.4,1.5 Message-ID: <200010091919.MAA00997@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv884 Modified Files: index.html Log Message: Add pointer to development version of the documenatation. Index: index.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/index.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** index.html 2000/07/24 19:19:43 1.4 --- index.html 2000/10/09 19:18:55 1.5 *************** *** 25,28 **** --- 25,30 ---- Python Language Website - Documentation, Downloads, News and lots of other resources for the Python language.
+ Development + version of the documentation - Straight from Fred's working files.
PythonLabs.com - Python's core development team and its plans for Python development.
From python-dev@python.org Mon Oct 9 20:21:09 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 12:21:09 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html index.html,1.5,1.6 Message-ID: <200010091921.MAA02836@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv2771 Modified Files: index.html Log Message: And let us not include typos! Index: index.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/index.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** index.html 2000/10/09 19:18:55 1.5 --- index.html 2000/10/09 19:21:06 1.6 *************** *** 25,29 **** Python Language Website - Documentation, Downloads, News and lots of other resources for the Python language.
! Development version of the documentation - Straight from Fred's working files.
PythonLabs.com - Python's core development --- 25,29 ---- Python Language Website - Documentation, Downloads, News and lots of other resources for the Python language.
! Development version of the documentation - Straight from Fred's working files.
PythonLabs.com - Python's core development From python-dev@python.org Mon Oct 9 20:29:38 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 12:29:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.65,1.66 Message-ID: <200010091929.MAA11318@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv11258 Modified Files: ACKS Log Message: One more name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -r1.65 -r1.66 *** ACKS 2000/10/09 18:26:16 1.65 --- ACKS 2000/10/09 19:29:35 1.66 *************** *** 266,269 **** --- 266,270 ---- Nigel O'Brian Tim O'Malley + Denis S. Otkidach Piet van Oostrum Jason Orendorff From python-dev@python.org Mon Oct 9 20:31:48 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 12:31:48 -0700 Subject: [Python-checkins] CVS: python/dist/src Makefile.in,1.105,1.106 Message-ID: <200010091931.MAA13265@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv13186 Modified Files: Makefile.in Log Message: For Darwin, export EXE (needed by Lib/plat-generic/regen checkin, to follow). Adapted from a patch by Tony Lownds. (#101816) Index: Makefile.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.in,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -r1.105 -r1.106 *** Makefile.in 2000/10/09 16:51:49 1.105 --- Makefile.in 2000/10/09 19:31:40 1.106 *************** *** 337,340 **** --- 337,341 ---- export PATH; PATH="`pwd`:$$PATH"; \ export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ + export EXE; EXE="$(EXE)"; \ cd $(srcdir)/Lib/$(PLATDIR); ./regen From python-dev@python.org Mon Oct 9 20:34:19 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 12:34:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-generic regen,1.2,1.3 Message-ID: <200010091934.MAA14589@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-generic In directory slayer.i.sourceforge.net:/tmp/cvs-serv14512 Modified Files: regen Log Message: Use python$EXE instead of python, for Darwin. (Patch by Tony Lownds. (#101816) [Note: I'm not sure that this is really the right fix. Surely Darwin doesn't require you to say "python.exe" everywhere??? Even Windows doesn't! Or am I misunderstanding the point?] Index: regen =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-generic/regen,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** regen 1996/08/08 18:25:40 1.2 --- regen 2000/10/09 19:34:12 1.3 *************** *** 1,6 **** #! /bin/sh set -v ! python ../../Tools/scripts/h2py.py /usr/include/fcntl.h ! python ../../Tools/scripts/h2py.py /usr/include/sys/socket.h ! python ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h ! python ../../Tools/scripts/h2py.py /usr/include/termios.h --- 1,6 ---- #! /bin/sh set -v ! python$EXE ../../Tools/scripts/h2py.py /usr/include/fcntl.h ! python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/socket.h ! python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h ! python$EXE ../../Tools/scripts/h2py.py /usr/include/termios.h From python-dev@python.org Mon Oct 9 20:48:14 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 12:48:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.73,1.74 Message-ID: <200010091948.MAA27959@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv27872 Modified Files: NEWS Log Message: typo Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -r1.73 -r1.74 *** NEWS 2000/10/09 18:34:12 1.73 --- NEWS 2000/10/09 19:48:11 1.74 *************** *** 47,51 **** - In SRE, fix error with negative lookahead and lookbehind that ! manifested itself as a runtime error in patterns like "? Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv30998 Modified Files: ACKS Log Message: And another. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -r1.66 -r1.67 *** ACKS 2000/10/09 19:29:35 1.66 --- ACKS 2000/10/09 19:52:41 1.67 *************** *** 222,225 **** --- 222,226 ---- Martin von Löwis Anne Lord + Tony Lownds Ray Loyzaga Fredrik Lundh From python-dev@python.org Mon Oct 9 20:52:38 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 12:52:38 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.169,1.170 configure,1.160,1.161 Message-ID: <200010091952.MAA30973@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv27449 Modified Files: configure.in configure Log Message: Checking in three Darwin-specific patches. Tony Lownds: [ Patch #101816 ] Fixes shared modules on Mac OS X 1. Mac OS X is recognized by the Next-ish host recognition code as "Darwin/1.2" 2. When specifying just --with-dyld, modules can compile as shared 3. --with-dyld and --with-next-framework, modules can compile as shared 4. --with-suffix=.exe, and Lib/plat-darwin1.2 is being made, the regen script invokes python as python.exe [I had to reformat this patch a bit to make it work. Please test!] Dan Wolfe: [ Patch #101823 ] Fix Darwin POSIX Thread redefinition The patch below fixes the redefinition problem in Darwin with _POSIX_THREADS. I'm not sure if this is the correct long term fix but for now it fixes the problem and the fix is specific to Darwin. Dan Wolfe: [ Patch #101824 ] On Darwin, remove unrecognized option `-OPT:Olimit=0' After many, many, many compiles, I finally got itchy of this warning cluttering up the output... so I scratched (Darwin configs only) and it's gone! :-) Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.169 retrieving revision 1.170 diff -C2 -r1.169 -r1.170 *** configure.in 2000/10/09 17:06:13 1.169 --- configure.in 2000/10/09 19:52:35 1.170 *************** *** 342,346 **** AC_MSG_RESULT($ac_cv_opt_olimit_ok) if test $ac_cv_opt_olimit_ok = yes; then ! OPT="$OPT -OPT:Olimit=0" else AC_MSG_CHECKING(whether $CC accepts -Olimit 1500) --- 342,349 ---- AC_MSG_RESULT($ac_cv_opt_olimit_ok) if test $ac_cv_opt_olimit_ok = yes; then ! case $ac_sys_system in ! Darwin*) OPT="$OPT" ;; ! *) OPT="$OPT -OPT:Olimit=0";; ! esac else AC_MSG_CHECKING(whether $CC accepts -Olimit 1500) *************** *** 494,497 **** --- 497,503 ---- AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in + Darwin/*) + ns_undef_sym='_environ' + LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;; next/4*) ns_undef_sym='__environ' *************** *** 569,573 **** Darwin/*|next/*) if test "$ns_dyld" ! then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi --- 575,583 ---- Darwin/*|next/*) if test "$ns_dyld" ! then ! if test "$ac_sys_system" = Darwin ! then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress' ! else LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' ! fi else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi *************** *** 640,643 **** --- 650,654 ---- # loading of any modules which reference it in System.framework next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;; + Darwin/*) LINKFORSHARED="-framework System" ;; SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; *************** *** 762,766 **** LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD) ! AC_DEFINE(_POSIX_THREADS) LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD) --- 773,780 ---- LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD) ! case $ac_sys_system in ! Darwin*) ;; ! *) AC_DEFINE(_POSIX_THREADS);; ! esac LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD) *************** *** 912,916 **** BeOS*) DYNLOADFILE="dynload_beos.o";; hp*|HP*) DYNLOADFILE="dynload_hpux.o";; ! next/*) DYNLOADFILE="dynload_next.o";; *) # use dynload_shlib.c and dlopen() if we have it; otherwise stub --- 926,930 ---- BeOS*) DYNLOADFILE="dynload_beos.o";; hp*|HP*) DYNLOADFILE="dynload_hpux.o";; ! Darwin/*|next/*) DYNLOADFILE="dynload_next.o";; *) # use dynload_shlib.c and dlopen() if we have it; otherwise stub Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.160 retrieving revision 1.161 diff -C2 -r1.160 -r1.161 *** configure 2000/10/09 17:06:13 1.160 --- configure 2000/10/09 19:52:35 1.161 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.168 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...4375 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) --- 6010,6014 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6326,6329 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 --- 6314,6317 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 From python-dev@python.org Mon Oct 9 20:57:42 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 12:57:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.9,1.10 Message-ID: <200010091957.MAA02566@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv2487 Modified Files: test_minidom.py Log Message: Move the test for confirmation that all nodes have been freed into the driver code, so that each test gets this; it had been done inconsistently. Remove the lines that set the variables holding dom objects to None; not needed since the interpreter cleans up locals on function return. Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** test_minidom.py 2000/10/06 22:42:54 1.9 --- test_minidom.py 2000/10/09 19:57:38 1.10 *************** *** 36,41 **** dom.documentElement.getElementsByTagName( "LI" ) ) dom.unlink() - dom=None - confirm (len( Node.allnodes )==0) def testInsertBefore( ): --- 36,39 ---- *************** *** 51,57 **** #confirm( docel.childNodes[2].tet=="a" ) dom.unlink() - del dom - del docel - confirm( len( Node.allnodes )==0) def testAppendChild(): --- 49,52 ---- *************** *** 61,66 **** confirm( dom.documentElement.childNodes[-1].data=="Hello" ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testNonZero(): --- 56,59 ---- *************** *** 70,81 **** confirm( not dom.childNodes[-1].childNodes ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testUnlink(): dom=parse( tstfile ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testElement(): --- 63,70 ---- *************** *** 84,89 **** confirm( dom.documentElement ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testAAA(): --- 73,76 ---- *************** *** 92,96 **** el.setAttribute( "spam", "jam2" ) dom.unlink() - dom=None def testAAB(): --- 79,82 ---- *************** *** 100,104 **** el.setAttribute( "spam", "jam2" ) dom.unlink() - dom=None def testAddAttr(): --- 86,89 ---- *************** *** 121,128 **** confirm( len( child.attributes )==2 ) - dom.unlink() - dom=None - child=None def testDeleteAttr(): --- 106,110 ---- *************** *** 136,140 **** confirm( len( child.attributes)==0 ) dom.unlink() - confirm( len( Node.allnodes )==0 ) def testRemoveAttr(): --- 118,121 ---- *************** *** 161,165 **** dom.unlink() - dom=None def testRemoveAttributeNode(): --- 142,145 ---- *************** *** 173,178 **** dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testChangeAttr(): --- 153,156 ---- *************** *** 190,195 **** confirm( len( el.attributes )==2 ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testGetAttrList(): --- 168,171 ---- *************** *** 237,240 **** --- 213,217 ---- confirm( string1.find("slash:abc" )!=-1 ) dom.unlink() + confirm( len( Node.allnodes )==0 ) def testAttributeRepr(): *************** *** 244,247 **** --- 221,225 ---- confirm( str( node ) == repr( node ) ) dom.unlink() + confirm( len( Node.allnodes )==0 ) def testTextNodeRepr(): pass *************** *** 253,256 **** --- 231,235 ---- dom.unlink() confirm(str == domstr) + confirm( len( Node.allnodes )==0 ) def testProcessingInstruction(): pass *************** *** 342,345 **** --- 321,326 ---- func() print "Test Succeeded", name + confirm(len(Node.allnodes) == 0, + "assertion: len(Node.allnodes) == 0") if len( Node.allnodes ): print "Garbage left over:" From python-dev@python.org Mon Oct 9 20:57:42 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 12:57:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,1.6,1.7 Message-ID: <200010091957.MAA02570@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv2487/output Modified Files: test_minidom Log Message: Move the test for confirmation that all nodes have been freed into the driver code, so that each test gets this; it had been done inconsistently. Remove the lines that set the variables holding dom objects to None; not needed since the interpreter cleans up locals on function return. Index: test_minidom =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_minidom,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_minidom 2000/10/06 22:42:55 1.6 --- test_minidom 2000/10/09 19:57:39 1.7 *************** *** 1,5 **** --- 1,7 ---- test_minidom Test Succeeded testAAA + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAAB + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test *************** *** 11,30 **** Passed Test Test Succeeded testAddAttr Passed Test Passed Test - Passed Test Test Succeeded testAppendChild Test Succeeded testAttrListItem Test Succeeded testAttrListItemNS Test Succeeded testAttrListItems Test Succeeded testAttrListKeys Test Succeeded testAttrListKeysNS Test Succeeded testAttrListLength Test Succeeded testAttrListValues Test Succeeded testAttrList__getitem__ Test Succeeded testAttrList__setitem__ Passed Test - Test Succeeded testAttributeRepr Passed Test Passed Test Passed Test --- 13,43 ---- Passed Test Test Succeeded testAddAttr + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testAppendChild + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListItem + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListItemNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListItems + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListKeys + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListKeysNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListLength + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListValues + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrList__getitem__ + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrList__setitem__ + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test + Test Succeeded testAttributeRepr + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test *************** *** 33,108 **** Passed Test Test Succeeded testChangeAttr Test Succeeded testChildNodes Test Succeeded testCloneAttributeDeep Test Succeeded testCloneAttributeShallow Test Succeeded testCloneDocumentDeep Test Succeeded testCloneDocumentShallow Test Succeeded testCloneElementDeep Test Succeeded testCloneElementShallow Test Succeeded testCloneElementShallowCopiesAttributes Test Succeeded testClonePIDeep Test Succeeded testClonePIShallow Test Succeeded testComment Test Succeeded testCreatAttributeNS Test Succeeded testCreateElementNS Passed Test Passed Test Passed Test - Passed Test Test Succeeded testDeleteAttr Test Succeeded testDocumentElement ! Passed Test Passed Test Test Succeeded testElement Passed Test Test Succeeded testElementReprAndStr Test Succeeded testFirstChild Test Succeeded testGetAttrLength Test Succeeded testGetAttrList Test Succeeded testGetAttrValues Test Succeeded testGetAttribute Test Succeeded testGetAttributeNS Test Succeeded testGetAttributeNode ! Passed Test Passed Test Test Succeeded testGetElementsByTagName Test Succeeded testGetElementsByTagNameNS Test Succeeded testGetEmptyNodeListFromElementsByTagNameNS Test Succeeded testHasChildNodes ! Passed Test Test Succeeded testInsertBefore ! Passed Test Passed Test Passed Test Test Succeeded testNonZero Test Succeeded testParse Test Succeeded testParseAttributeNamespaces Test Succeeded testParseAttributes Test Succeeded testParseElement Test Succeeded testParseElementNamespaces Passed Test Test Succeeded testParseFromFile Test Succeeded testParseProcessingInstructions Test Succeeded testParseString Test Succeeded testProcessingInstruction Test Succeeded testProcessingInstructionRepr Passed Test Passed Test Test Succeeded testRemoveAttr Passed Test Passed Test Test Succeeded testRemoveAttrNS ! Passed Test Passed Test Passed Test Test Succeeded testRemoveAttributeNode Test Succeeded testSetAttrValueandNodeValue Test Succeeded testTextNodeRepr Test Succeeded testTextRepr Test Succeeded testTooManyDocumentElements ! Passed Test Test Succeeded testUnlink Test Succeeded testWriteText Passed Test Test Succeeded testWriteXML All tests succeeded --- 46,166 ---- Passed Test Test Succeeded testChangeAttr + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testChildNodes + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneAttributeDeep + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneAttributeShallow + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneDocumentDeep + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneDocumentShallow + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneElementDeep + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneElementShallow + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneElementShallowCopiesAttributes + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testClonePIDeep + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testClonePIShallow + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testComment + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCreatAttributeNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCreateElementNS + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Passed Test Test Succeeded testDeleteAttr + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testDocumentElement ! Passed assertion: len(Node.allnodes) == 0 Passed Test Test Succeeded testElement + Passed assertion: len(Node.allnodes) == 0 Passed Test Test Succeeded testElementReprAndStr + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testFirstChild + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttrLength + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttrList + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttrValues + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttribute + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttributeNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttributeNode ! Passed assertion: len(Node.allnodes) == 0 Passed Test Test Succeeded testGetElementsByTagName + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetElementsByTagNameNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetEmptyNodeListFromElementsByTagNameNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testHasChildNodes ! Passed assertion: len(Node.allnodes) == 0 Test Succeeded testInsertBefore ! Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testNonZero + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParse + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseAttributeNamespaces + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseAttributes + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseElement + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseElementNamespaces + Passed assertion: len(Node.allnodes) == 0 Passed Test Test Succeeded testParseFromFile + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseProcessingInstructions + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseString + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testProcessingInstruction + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testProcessingInstructionRepr + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testRemoveAttr + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testRemoveAttrNS ! Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testRemoveAttributeNode + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testSetAttrValueandNodeValue + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testTextNodeRepr + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testTextRepr + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testTooManyDocumentElements ! Passed assertion: len(Node.allnodes) == 0 Test Succeeded testUnlink + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testWriteText + Passed assertion: len(Node.allnodes) == 0 + Passed Test Passed Test Test Succeeded testWriteXML + Passed assertion: len(Node.allnodes) == 0 All tests succeeded From python-dev@python.org Mon Oct 9 21:01:56 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 13:01:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib wave.py,1.11,1.12 Message-ID: <200010092001.NAA05652@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5581 Modified Files: wave.py Log Message: Fix by Jean-Claude Rimbault [ Bug #116271 ] -- the WAVE header was never written properly because the '4' length indicators for the 's' format characters were missing. Index: wave.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/wave.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** wave.py 2000/08/17 04:45:13 1.11 --- wave.py 2000/10/09 20:01:53 1.12 *************** *** 440,444 **** self._datalength = self._nframes * self._nchannels * self._sampwidth self._form_length_pos = self._file.tell() ! self._file.write(struct.pack(' Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv7792/Lib/xml/dom Modified Files: minidom.py Log Message: Paul Prescod : Correct the chaining between siblings. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** minidom.py 2000/10/07 19:03:20 1.10 --- minidom.py 2000/10/09 20:04:16 1.11 *************** *** 103,106 **** --- 103,113 ---- def appendChild(self, node): + if self.childNodes: + last = self.lastChild + node.previousSibling = last + last.nextSibling = node + else: + node.previousSibling = None + node.nextSibling = None self.childNodes.append(node) return node From python-dev@python.org Mon Oct 9 21:06:04 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 13:06:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_wave.py,NONE,1.1 Message-ID: <200010092006.NAA09391@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv9355 Added Files: test_wave.py Log Message: Simple test suite for wave.py by Jean-Claude Rimbault (with some changes to avoid using assert). --- NEW FILE --- from test_support import TestFailed import os, tempfile import wave def check(t, msg=None): if not t: raise TestFailed, msg nchannels = 2 sampwidth = 2 framerate = 8000 nframes = 100 testfile = tempfile.mktemp() f = wave.open(testfile, 'w') f.setnchannels(nchannels) f.setsampwidth(sampwidth) f.setframerate(framerate) f.setnframes(nframes) output = '\0' * nframes * nchannels * sampwidth f.writeframes(output) f.close() f = wave.open(testfile, 'r') check(nchannels == f.getnchannels(), "nchannels") check(sampwidth == f.getsampwidth(), "sampwidth") check(framerate == f.getframerate(), "framerate") check(nframes == f.getnframes(), "nframes") input = f.readframes(nframes) check(input == output, "data") f.close() os.remove(testfile) From python-dev@python.org Mon Oct 9 21:06:53 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 13:06:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_wave,NONE,1.1 Message-ID: <200010092006.NAA10271@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv10211 Added Files: test_wave Log Message: wave test output --- NEW FILE --- test_wave From python-dev@python.org Mon Oct 9 21:07:02 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 13:07:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.67,1.68 Message-ID: <200010092007.NAA10443@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv10369 Modified Files: ACKS Log Message: WAVE test + bugfix contributor. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -r1.67 -r1.68 *** ACKS 2000/10/09 19:52:41 1.67 --- ACKS 2000/10/09 20:07:00 1.68 *************** *** 295,298 **** --- 295,299 ---- Jan Pieter Riegel Nicholas Riley + Jean-Claude Rimbault Andy Robinson Jim Robinson From python-dev@python.org Mon Oct 9 21:18:36 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 13:18:36 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.170,1.171 configure,1.161,1.162 Message-ID: <200010092018.NAA19234@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv19170 Modified Files: configure.in configure Log Message: Remove macro that mentions DL_EXPORT_HEADER; it caused a spurious warning from autoheader and is not useful anymore. (Approved by Donn Cave.) Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.170 retrieving revision 1.171 diff -C2 -r1.170 -r1.171 *** configure.in 2000/10/09 19:52:35 1.170 --- configure.in 2000/10/09 20:18:32 1.171 *************** *** 128,133 **** AR="$PWD/BeOS/ar-fake" RANLIB=: - - AC_DEFINE(DL_EXPORT_HEADER,"dl_export.h") ;; x86) --- 128,131 ---- Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.161 retrieving revision 1.162 diff -C2 -r1.161 -r1.162 *** configure 2000/10/09 19:52:35 1.161 --- configure 2000/10/09 20:18:32 1.162 *************** *** 4,8 **** # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 4,8 ---- # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. [...4600 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) --- 6031,6035 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6314,6317 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 6335,6338 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 From python-dev@python.org Mon Oct 9 21:22:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 13:22:32 -0700 Subject: [Python-checkins] CVS: python/dist/src config.h.in,2.76,2.77 Message-ID: <200010092022.NAA22175@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv22097 Modified Files: config.h.in Log Message: Another generated file... Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.76 retrieving revision 2.77 diff -C2 -r2.76 -r2.77 *** config.h.in 2000/10/09 17:01:03 2.76 --- config.h.in 2000/10/09 20:22:28 2.77 *************** *** 267,273 **** #undef SIZEOF_VOID_P - /* Define if you have the _getpty function. */ - #undef HAVE__GETPTY - /* Define if you have the alarm function. */ #undef HAVE_ALARM --- 267,270 ---- *************** *** 357,360 **** --- 354,360 ---- #undef HAVE_GETPID + /* Define if you have the _getpty function. */ + #undef HAVE__GETPTY + /* Define if you have the getpwent function. */ #undef HAVE_GETPWENT *************** *** 516,527 **** #undef HAVE_WAITPID ! /* Define if you have the header file. */ ! #undef HAVE_DB_H /* Define if you have the header file. */ #undef HAVE_DB1_NDBM_H ! /* Define if you have the header file. */ ! #undef HAVE_DB_185_H /* Define if you have the header file. */ --- 516,527 ---- #undef HAVE_WAITPID ! /* Define if you have the header file. */ ! #undef HAVE_DB_185_H /* Define if you have the header file. */ #undef HAVE_DB1_NDBM_H ! /* Define if you have the header file. */ ! #undef HAVE_DB_H /* Define if you have the header file. */ From python-dev@python.org Mon Oct 9 22:19:35 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 9 Oct 2000 14:19:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.74,1.75 Message-ID: <200010092119.OAA06892@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv6317/python/dist/src/misc Modified Files: NEWS Log Message: Repaired IDLE Unicode bug description. Added tokenize.py bugfix info. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -r1.74 -r1.75 *** NEWS 2000/10/09 19:48:11 1.74 --- NEWS 2000/10/09 21:19:31 1.75 *************** *** 80,83 **** --- 80,86 ---- - The binascii module is now enabled on Win64. + - tokenize.py no longer suffers "recursion depth" errors when parsing + programs with very long string literals. + Internals *************** *** 141,146 **** - Removed debugging prints from main used with freeze. ! - IDLE auto-indent internals no longer crashes when it encounters ! Unicode characters in the range 128 to 255. What's new in 2.0 beta 2 (since beta 1)? --- 144,149 ---- - Removed debugging prints from main used with freeze. ! - IDLE auto-indent no longer crashes when it encounters Unicode ! characters. What's new in 2.0 beta 2 (since beta 1)? From python-dev@python.org Mon Oct 9 22:26:16 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 14:26:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/BeOS dl_export.h,1.3,NONE Message-ID: <200010092126.OAA12625@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/BeOS In directory slayer.i.sourceforge.net:/tmp/cvs-serv12571 Removed Files: dl_export.h Log Message: This file is no longer used. --- dl_export.h DELETED --- From python-dev@python.org Mon Oct 9 22:27:25 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 14:27:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.75,1.76 Message-ID: <200010092127.OAA13565@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv13332/Misc Modified Files: NEWS Log Message: add note explaining what a release candidate is Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -r1.75 -r1.76 *** NEWS 2000/10/09 21:19:31 1.75 --- NEWS 2000/10/09 21:27:22 1.76 *************** *** 18,21 **** --- 18,31 ---- ===================================================== + What is release candidate 1? + + We believe that release candidate 1 will fix all known bugs that we + intend to fix for the 2.0 final release. This release should be a bit + more stable than the previous betas. We would like to see even more + widespread testing before the final release, so we are producing this + release candidate. The final release will be exactly the same unless + any show-stopping (or brown bag) bugs are found by testers of the + release candidate. + All the changes since the last beta release are bug fixes or changes to build support for specific platforms. From python-dev@python.org Mon Oct 9 22:34:54 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 14:34:54 -0700 Subject: [Python-checkins] CVS: python/dist/src README,1.102,1.103 Message-ID: <200010092134.OAA19556@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv19406 Modified Files: README Log Message: the usual Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -r1.102 -r1.103 *** README 2000/10/06 01:58:48 1.102 --- README 2000/10/09 21:34:51 1.103 *************** *** 1,4 **** ! This is Python version 2.0 beta 2 ! ================================= Copyright (c) 2000 BeOpen.com. --- 1,4 ---- ! This is Python version 2.0 release candidate 1 ! ============================================== Copyright (c) 2000 BeOpen.com. From python-dev@python.org Mon Oct 9 22:48:07 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 14:48:07 -0700 Subject: [Python-checkins] CVS: python/dist/src config.h.in,2.77,2.78 configure,1.162,1.163 Message-ID: <200010092148.OAA30728@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv30575 Modified Files: config.h.in configure Log Message: The Usual. Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -r2.77 -r2.78 *** config.h.in 2000/10/09 20:22:28 2.77 --- config.h.in 2000/10/09 21:48:02 2.78 *************** *** 267,270 **** --- 267,273 ---- #undef SIZEOF_VOID_P + /* Define if you have the _getpty function. */ + #undef HAVE__GETPTY + /* Define if you have the alarm function. */ #undef HAVE_ALARM *************** *** 354,360 **** #undef HAVE_GETPID - /* Define if you have the _getpty function. */ - #undef HAVE__GETPTY - /* Define if you have the getpwent function. */ #undef HAVE_GETPWENT --- 357,360 ---- *************** *** 516,527 **** #undef HAVE_WAITPID ! /* Define if you have the header file. */ ! #undef HAVE_DB_185_H /* Define if you have the header file. */ #undef HAVE_DB1_NDBM_H ! /* Define if you have the header file. */ ! #undef HAVE_DB_H /* Define if you have the header file. */ --- 516,527 ---- #undef HAVE_WAITPID ! /* Define if you have the header file. */ ! #undef HAVE_DB_H /* Define if you have the header file. */ #undef HAVE_DB1_NDBM_H ! /* Define if you have the header file. */ ! #undef HAVE_DB_185_H /* Define if you have the header file. */ Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.162 retrieving revision 1.163 diff -C2 -r1.162 -r1.163 *** configure 2000/10/09 20:18:32 1.162 --- configure 2000/10/09 21:48:02 1.163 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.170 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...4118 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) --- 6005,6009 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6335,6338 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 --- 6309,6312 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 From python-dev@python.org Mon Oct 9 23:14:48 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 15:14:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 test_cfg.py,NONE,1.1 test_imp.py,NONE,1.1 test_wav.py,NONE,1.1 configpa.py,1.9,1.10 mimetool.py,1.7,1.8 posixpat.py,1.12,1.13 sre_comp.py,1.6,1.7 sre_cons.py,1.4,1.5 sre_pars.py,1.7,1.8 stringio.py,1.5,1.6 test_cla.py,1.1,1.2 test_lin.py,1.2,1.3 test_min.py,1.2,1.3 test_str.py,1.11,1.12 test_uni.py,1.3,1.4 test_url.py,1.2,1.3 test_win.py,1.4,1.5 userlist.py,1.9,1.10 webbrows.py,1.3,1.4 Message-ID: <200010092214.PAA16993@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv16830 Modified Files: configpa.py mimetool.py posixpat.py sre_comp.py sre_cons.py sre_pars.py stringio.py test_cla.py test_lin.py test_min.py test_str.py test_uni.py test_url.py test_win.py userlist.py webbrows.py Added Files: test_cfg.py test_imp.py test_wav.py Log Message: The usual. --- NEW FILE --- import ConfigParser import StringIO def basic(src): print print "Testing basic accessors..." cf = ConfigParser.ConfigParser() sio = StringIO.StringIO(src) cf.readfp(sio) L = cf.sections() L.sort() print L for s in L: print "%s: %s" % (s, cf.options(s)) # The use of spaces in the section names serves as a regression test for # SourceForge bug #115357. # http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115357 print `cf.get('Foo Bar', 'foo', raw=1)` print `cf.get('Spacey Bar', 'foo', raw=1)` print `cf.get('Commented Bar', 'foo', raw=1)` if '__name__' in cf.options("Foo Bar"): print '__name__ "option" should not be exposed by the API!' else: print '__name__ "option" properly hidden by the API.' def interpolation(src): print print "Testing value interpolation..." cf = ConfigParser.ConfigParser({"getname": "%(__name__)s"}) sio = StringIO.StringIO(src) cf.readfp(sio) print `cf.get("Foo", "getname")` print `cf.get("Foo", "bar")` print `cf.get("Foo", "bar9")` print `cf.get("Foo", "bar10")` expect_get_error(cf, ConfigParser.InterpolationDepthError, "Foo", "bar11") def parse_errors(): print print "Testing for parsing errors..." expect_parse_error(ConfigParser.ParsingError, """[Foo]\n extra-spaces: splat\n""") expect_parse_error(ConfigParser.ParsingError, """[Foo]\n extra-spaces= splat\n""") expect_parse_error(ConfigParser.ParsingError, """[Foo]\noption-without-value\n""") expect_parse_error(ConfigParser.ParsingError, """[Foo]\n:value-without-option-name\n""") expect_parse_error(ConfigParser.ParsingError, """[Foo]\n=value-without-option-name\n""") expect_parse_error(ConfigParser.MissingSectionHeaderError, """No Section!\n""") def query_errors(): print print "Testing query interface..." cf = ConfigParser.ConfigParser() print cf.sections() print "Has section 'Foo'?", cf.has_section("Foo") try: cf.options("Foo") except ConfigParser.NoSectionError, e: print "Caught expected NoSectionError:", e else: print "Failed to catch expected NoSectionError from options()" try: cf.set("foo", "bar", "value") except ConfigParser.NoSectionError, e: print "Caught expected NoSectionError:", e else: print "Failed to catch expected NoSectionError from set()" expect_get_error(cf, ConfigParser.NoSectionError, "foo", "bar") cf.add_section("foo") expect_get_error(cf, ConfigParser.NoOptionError, "foo", "bar") def weird_errors(): print print "Testing miscellaneous error conditions..." cf = ConfigParser.ConfigParser() cf.add_section("Foo") try: cf.add_section("Foo") except ConfigParser.DuplicateSectionError, e: print "Caught expected DuplicateSectionError:", e else: print "Failed to catch expected DuplicateSectionError" def expect_get_error(cf, exctype, section, option, raw=0): try: cf.get(section, option, raw=raw) except exctype, e: print "Caught expected", exctype.__name__, ":" print e else: print "Failed to catch expected", exctype.__name__ def expect_parse_error(exctype, src): cf = ConfigParser.ConfigParser() sio = StringIO.StringIO(src) try: cf.readfp(sio) except exctype, e: print "Caught expected exception:", e else: print "Failed to catch expected", exctype.__name__ basic(r""" [Foo Bar] foo=bar [Spacey Bar] foo = bar [Commented Bar] foo: bar ; comment """) interpolation(r""" [Foo] bar=something %(with1)s interpolation (1 step) bar9=something %(with9)s lots of interpolation (9 steps) bar10=something %(with10)s lots of interpolation (10 steps) bar11=something %(with11)s lots of interpolation (11 steps) with11=%(with10)s with10=%(with9)s with9=%(with8)s with8=%(with7)s with7=%(with6)s with6=%(with5)s with5=%(with4)s with4=%(with3)s with3=%(with2)s with2=%(with1)s with1=with [Mutual Recursion] foo=%(bar)s bar=%(foo)s """) parse_errors() query_errors() weird_errors() --- NEW FILE --- from test_support import TESTFN import os import random source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print >> f, "a =", a print >> f, "b =", b f.close() try: try: mod = __import__(TESTFN) except ImportError, err: raise ValueError, "import from .py failed: %s" % err if mod.a != a or mod.b != b: print a, "!=", mod.a print b, "!=", mod.b raise ValueError, "module loaded (%s) but contents invalid" % mod finally: os.unlink(source) try: try: reload(mod) except ImportError, err: raise ValueError, "import from .pyc/.pyo failed: %s" % err finally: try: os.unlink(pyc) except os.error: pass try: os.unlink(pyo) except os.error: pass --- NEW FILE --- from test_support import TestFailed import os, tempfile import wave def check(t, msg=None): if not t: raise TestFailed, msg nchannels = 2 sampwidth = 2 framerate = 8000 nframes = 100 testfile = tempfile.mktemp() f = wave.open(testfile, 'w') f.setnchannels(nchannels) f.setsampwidth(sampwidth) f.setframerate(framerate) f.setnframes(nframes) output = '\0' * nframes * nchannels * sampwidth f.writeframes(output) f.close() f = wave.open(testfile, 'r') check(nchannels == f.getnchannels(), "nchannels") check(sampwidth == f.getsampwidth(), "sampwidth") check(framerate == f.getframerate(), "framerate") check(nframes == f.getnframes(), "nframes") input = f.readframes(nframes) check(input == output, "data") f.close() os.remove(testfile) Index: configpa.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/configpa.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** configpa.py 2000/09/26 17:32:27 1.9 --- configpa.py 2000/10/09 22:14:43 1.10 *************** *** 92,96 **** --- 92,98 ---- DEFAULTSECT = "DEFAULT" + MAX_INTERPOLATION_DEPTH = 10 + # exception classes *************** *** 131,143 **** self.section = section ! class MissingSectionHeaderError(Error): ! def __init__(self, filename, lineno, line): ! Error.__init__( ! self, ! 'File contains no section headers.\nfile: %s, line: %d\n%s' % ! (filename, lineno, line)) ! self.filename = filename ! self.lineno = lineno ! self.line = line class ParsingError(Error): --- 133,146 ---- self.section = section ! class InterpolationDepthError(Error): ! def __init__(self, option, section, rawval): ! Error.__init__(self, ! "Value interpolation too deeply recursive:\n" ! "\tsection: [%s]\n" ! "\toption : %s\n" ! "\trawval : %s\n" ! % (section, option, rawval)) ! self.option = option ! self.section = section class ParsingError(Error): *************** *** 151,155 **** --- 154,168 ---- self._msg = self._msg + '\n\t[line %2d]: %s' % (lineno, line) + class MissingSectionHeaderError(ParsingError): + def __init__(self, filename, lineno, line): + Error.__init__( + self, + 'File contains no section headers.\nfile: %s, line: %d\n%s' % + (filename, lineno, line)) + self.filename = filename + self.lineno = lineno + self.line = line + class ConfigParser: *************** *** 184,188 **** The DEFAULT section is not acknowledged. """ ! return self.__sections.has_key(section) def options(self, section): --- 197,201 ---- The DEFAULT section is not acknowledged. """ ! return section in self.sections() def options(self, section): *************** *** 193,205 **** raise NoSectionError(section) opts.update(self.__defaults) return opts.keys() def has_option(self, section, option): """Return whether the given section has the given option.""" ! try: ! opts = self.__sections[section] ! except KeyError: ! raise NoSectionError(section) ! return opts.has_key(option) def read(self, filenames): --- 206,216 ---- raise NoSectionError(section) opts.update(self.__defaults) + if opts.has_key('__name__'): + del opts['__name__'] return opts.keys() def has_option(self, section, option): """Return whether the given section has the given option.""" ! return option in self.options(section) def read(self, filenames): *************** *** 267,274 **** except KeyError: raise NoOptionError(option, section) ! # do the string interpolation if raw: return rawval value = rawval # Make it a pretty variable name depth = 0 --- 278,286 ---- except KeyError: raise NoOptionError(option, section) ! if raw: return rawval + # do the string interpolation value = rawval # Make it a pretty variable name depth = 0 *************** *** 281,285 **** raise InterpolationError(key, option, section, rawval) else: ! return value def __get(self, section, conv, option): --- 293,300 ---- raise InterpolationError(key, option, section, rawval) else: ! break ! if value.find("%(") >= 0: ! raise InterpolationDepthError(option, section, rawval) ! return value def __get(self, section, conv, option): *************** *** 366,370 **** SECTCRE = re.compile( r'\[' # [ ! r'(?P
[-\w_.*,(){}]+)' # a lot of stuff found by IvL r'\]' # ] ) --- 381,385 ---- SECTCRE = re.compile( r'\[' # [ ! r'(?P
[-\w_.*,(){} ]+)' # a lot of stuff found by IvL r'\]' # ] ) Index: mimetool.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/mimetool.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** mimetool.py 2000/05/08 17:31:00 1.7 --- mimetool.py 2000/10/09 22:14:43 1.8 *************** *** 142,146 **** return uu.decode(input, output) if encoding in ('7bit', '8bit'): ! output.write(input.read()) if decodetab.has_key(encoding): pipethrough(input, decodetab[encoding], output) --- 142,146 ---- return uu.decode(input, output) if encoding in ('7bit', '8bit'): ! return output.write(input.read()) if decodetab.has_key(encoding): pipethrough(input, decodetab[encoding], output) *************** *** 161,165 **** return uu.encode(input, output) if encoding in ('7bit', '8bit'): ! output.write(input.read()) if encodetab.has_key(encoding): pipethrough(input, encodetab[encoding], output) --- 161,165 ---- return uu.encode(input, output) if encoding in ('7bit', '8bit'): ! return output.write(input.read()) if encodetab.has_key(encoding): pipethrough(input, encodetab[encoding], output) Index: posixpat.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/posixpat.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** posixpat.py 2000/09/01 19:25:51 1.12 --- posixpat.py 2000/10/09 22:14:43 1.13 *************** *** 57,63 **** def split(p): """Split a pathname. Returns tuple "(head, tail)" where "tail" is ! everything after the final slash. Either part may be empty""" ! import string ! i = string.rfind(p, '/') + 1 head, tail = p[:i], p[i:] if head and head <> '/'*len(head): --- 57,62 ---- def split(p): """Split a pathname. Returns tuple "(head, tail)" where "tail" is ! everything after the final slash. Either part may be empty.""" ! i = p.rfind('/') + 1 head, tail = p[:i], p[i:] if head and head <> '/'*len(head): *************** *** 74,78 **** def splitext(p): """Split the extension from a pathname. Extension is everything from the ! last dot to the end. Returns "(root, ext)", either part may be empty""" root, ext = '', '' for c in p: --- 73,77 ---- def splitext(p): """Split the extension from a pathname. Extension is everything from the ! last dot to the end. Returns "(root, ext)", either part may be empty.""" root, ext = '', '' for c in p: *************** *** 96,100 **** def splitdrive(p): """Split a pathname into drive and path. On Posix, drive is always ! empty""" return '', p --- 95,99 ---- def splitdrive(p): """Split a pathname into drive and path. On Posix, drive is always ! empty.""" return '', p *************** *** 256,262 **** def walk(top, func, arg): """walk(top,func,arg) calls func(arg, d, files) for each directory "d" ! in the tree rooted at "top" (including "top" itself). "files" is a list ! of all the files and subdirs in directory "d". ! """ try: names = os.listdir(top) --- 255,261 ---- def walk(top, func, arg): """walk(top,func,arg) calls func(arg, d, files) for each directory "d" ! in the tree rooted at "top" (including "top" itself). "files" is a list ! of all the files and subdirs in directory "d". ! """ try: names = os.listdir(top) *************** *** 282,291 **** def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, ! do nothing""" if path[:1] <> '~': return path i, n = 1, len(path) while i < n and path[i] <> '/': ! i = i+1 if i == 1: if not os.environ.has_key('HOME'): --- 281,290 ---- def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, ! do nothing.""" if path[:1] <> '~': return path i, n = 1, len(path) while i < n and path[i] <> '/': ! i = i + 1 if i == 1: if not os.environ.has_key('HOME'): *************** *** 299,303 **** return path userhome = pwent[5] ! if userhome[-1:] == '/': i = i+1 return userhome + path[i:] --- 298,302 ---- return path userhome = pwent[5] ! if userhome[-1:] == '/': i = i + 1 return userhome + path[i:] *************** *** 311,315 **** def expandvars(path): """Expand shell variables of form $var and ${var}. Unknown variables ! are left unchanged""" global _varprog if '$' not in path: --- 310,314 ---- def expandvars(path): """Expand shell variables of form $var and ${var}. Unknown variables ! are left unchanged.""" global _varprog if '$' not in path: *************** *** 345,351 **** if path == '': return '.' - import string initial_slash = (path[0] == '/') ! comps = string.split(path, '/') new_comps = [] for comp in comps: --- 344,349 ---- if path == '': return '.' initial_slash = (path[0] == '/') ! comps = path.split('/') new_comps = [] for comp in comps: *************** *** 358,362 **** new_comps.pop() comps = new_comps ! path = string.join(comps, '/') if initial_slash: path = '/' + path --- 356,360 ---- new_comps.pop() comps = new_comps ! path = '/'.join(comps) if initial_slash: path = '/' + path Index: sre_comp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/sre_comp.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** sre_comp.py 2000/09/01 19:25:51 1.6 --- sre_comp.py 2000/10/09 22:14:43 1.7 *************** *** 223,227 **** # check if av is a "simple" operator lo, hi = av[2].getwidth() ! if lo == 0: raise error, "nothing to repeat" return lo == hi == 1 and av[2][0][0] != SUBPATTERN --- 223,227 ---- # check if av is a "simple" operator lo, hi = av[2].getwidth() ! if lo == 0 and hi == MAXREPEAT: raise error, "nothing to repeat" return lo == hi == 1 and av[2][0][0] != SUBPATTERN Index: sre_cons.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/sre_cons.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** sre_cons.py 2000/09/01 19:25:51 1.4 --- sre_cons.py 2000/10/09 22:14:43 1.5 *************** *** 10,13 **** --- 10,15 ---- # + MAXREPEAT = 65535 + # should this really be here? Index: sre_pars.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/sre_pars.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** sre_pars.py 2000/09/26 17:32:27 1.7 --- sre_pars.py 2000/10/09 22:14:43 1.8 *************** *** 13,18 **** from sre_constants import * - MAXREPEAT = 65535 - SPECIAL_CHARS = ".\\[{()*+?^$|" REPEAT_CHARS = "*+?{" --- 13,16 ---- *************** *** 394,397 **** --- 392,397 ---- this = source.get() if this == "]": + if code1[0] is IN: + code1 = code1[1][0] set.append(code1) set.append((LITERAL, ord("-"))) *************** *** 593,596 **** --- 593,601 ---- # p.dump() + + if not (flags & SRE_FLAG_VERBOSE) and p.pattern.flags & SRE_FLAG_VERBOSE: + # the VERBOSE flag was switched on inside the pattern. to be + # on the safe side, we'll parse the whole thing again... + return parse(str, p.pattern.flags) return p Index: stringio.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/stringio.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** stringio.py 2000/09/26 17:32:27 1.5 --- stringio.py 2000/10/09 22:14:43 1.6 *************** *** 14,17 **** --- 14,18 ---- buf = f.readline() # read until end of line ('\n') or EOF list = f.readlines()# list of f.readline() results until EOF + f.truncate([size]) # truncate file at to at most size (default: current pos) f.write(buf) # write at current position f.writelines(list) # for line in list: f.write(line) *************** *** 29,32 **** --- 30,34 ---- """ + import errno import string *************** *** 103,106 **** --- 105,119 ---- line = self.readline() return lines + def truncate(self, size=None): + if self.closed: + raise ValueError, "I/O operation on closed file" + if size is None: + size = self.pos + elif size < 0: + raise IOError(errno.EINVAL, + "Negative size not allowed") + elif size < self.pos: + self.pos = size + self.buf = self.getvalue()[:size] def write(self, s): if self.closed: Index: test_cla.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_cla.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_cla.py 2000/09/01 19:27:34 1.1 --- test_cla.py 2000/10/09 22:14:43 1.2 *************** *** 72,76 **** def __hash__(self, *args): print "__hash__:", args ! return id(self) def __str__(self, *args): --- 72,76 ---- def __hash__(self, *args): print "__hash__:", args ! return hash(id(self)) def __str__(self, *args): Index: test_lin.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_lin.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_lin.py 2000/09/01 19:25:51 1.2 --- test_lin.py 2000/10/09 22:14:43 1.3 *************** *** 1,11 **** from test_support import verbose, findfile, TestFailed, TestSkipped ! import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') --- 1,26 ---- from test_support import verbose, findfile, TestFailed, TestSkipped ! import errno + import fcntl + import linuxaudiodev import os + import sys + import select + import sunaudio + import time + import audioop + SND_FORMAT_MULAW_8 = 1 + def play_sound_file(path): fp = open(path, 'r') + size, enc, rate, nchannels, extra = sunaudio.gethdr(fp) data = fp.read() fp.close() + + if enc != SND_FORMAT_MULAW_8: + print "Expect .au file with 8-bit mu-law samples" + return + try: a = linuxaudiodev.open('w') *************** *** 14,23 **** raise TestSkipped, msg raise TestFailed, msg else: ! a.write(data) ! a.close() def test(): play_sound_file(findfile('audiotest.au')) test() --- 29,89 ---- raise TestSkipped, msg raise TestFailed, msg + + # convert the data to 16-bit signed + data = audioop.ulaw2lin(data, 2) + + # set the data format + if sys.byteorder == 'little': + fmt = linuxaudiodev.AFMT_S16_LE else: ! fmt = linuxaudiodev.AFMT_S16_BE ! ! # at least check that these methods can be invoked ! a.bufsize() ! a.obufcount() ! a.obuffree() ! a.getptr() ! a.fileno() ! ! # set parameters based on .au file headers ! a.setparameters(rate, 16, nchannels, fmt) ! a.write(data) ! a.flush() ! a.close() ! ! def test_errors(): ! a = linuxaudiodev.open("w") ! size = 8 ! fmt = linuxaudiodev.AFMT_U8 ! rate = 8000 ! nchannels = 1 ! try: ! a.setparameters(-1, size, nchannels, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, -2, nchannels, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, 3, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, nchannels, 177) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, nchannels, linuxaudiodev.AFMT_U16_LE) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, 16, nchannels, fmt) ! except ValueError, msg: ! print msg def test(): play_sound_file(findfile('audiotest.au')) + test_errors() test() Index: test_min.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_min.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_min.py 2000/09/26 17:32:27 1.2 --- test_min.py 2000/10/09 22:14:43 1.3 *************** *** 2,5 **** --- 2,6 ---- from xml.dom.minidom import parse, Node, Document, parseString + import xml.parsers.expat import os.path *************** *** 35,40 **** dom.documentElement.getElementsByTagName( "LI" ) ) dom.unlink() - dom=None - confirm (len( Node.allnodes )==0) def testInsertBefore( ): --- 36,39 ---- *************** *** 50,56 **** #confirm( docel.childNodes[2].tet=="a" ) dom.unlink() - del dom - del docel - confirm( len( Node.allnodes )==0) def testAppendChild(): --- 49,52 ---- *************** *** 60,65 **** confirm( dom.documentElement.childNodes[-1].data=="Hello" ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testNonZero(): --- 56,59 ---- *************** *** 69,80 **** confirm( not dom.childNodes[-1].childNodes ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testUnlink(): dom=parse( tstfile ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testElement(): --- 63,70 ---- *************** *** 83,88 **** confirm( dom.documentElement ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testAAA(): --- 73,76 ---- *************** *** 91,95 **** el.setAttribute( "spam", "jam2" ) dom.unlink() - dom=None def testAAB(): --- 79,82 ---- *************** *** 99,103 **** el.setAttribute( "spam", "jam2" ) dom.unlink() - dom=None def testAddAttr(): --- 86,89 ---- *************** *** 120,127 **** confirm( len( child.attributes )==2 ) - dom.unlink() - dom=None - child=None def testDeleteAttr(): --- 106,110 ---- *************** *** 135,139 **** confirm( len( child.attributes)==0 ) dom.unlink() - confirm( len( Node.allnodes )==0 ) def testRemoveAttr(): --- 118,121 ---- *************** *** 160,164 **** dom.unlink() - dom=None def testRemoveAttributeNode(): --- 142,145 ---- *************** *** 172,177 **** dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testChangeAttr(): --- 153,156 ---- *************** *** 189,194 **** confirm( len( el.attributes )==2 ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testGetAttrList(): --- 168,171 ---- *************** *** 236,239 **** --- 213,217 ---- confirm( string1.find("slash:abc" )!=-1 ) dom.unlink() + confirm( len( Node.allnodes )==0 ) def testAttributeRepr(): *************** *** 243,250 **** confirm( str( node ) == repr( node ) ) dom.unlink() def testTextNodeRepr(): pass ! def testWriteXML(): pass def testProcessingInstruction(): pass --- 221,235 ---- confirm( str( node ) == repr( node ) ) dom.unlink() + confirm( len( Node.allnodes )==0 ) def testTextNodeRepr(): pass ! def testWriteXML(): ! str = '' ! dom = parseString(str) ! domstr = dom.toxml() ! dom.unlink() ! confirm(str == domstr) ! confirm( len( Node.allnodes )==0 ) def testProcessingInstruction(): pass *************** *** 336,339 **** --- 321,326 ---- func() print "Test Succeeded", name + confirm(len(Node.allnodes) == 0, + "assertion: len(Node.allnodes) == 0") if len( Node.allnodes ): print "Garbage left over:" Index: test_str.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_str.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** test_str.py 2000/09/26 17:32:27 1.11 --- test_str.py 2000/10/09 22:14:43 1.12 *************** *** 1,15 **** ! # Tests StringIO and cStringIO ! import string ! def do_test(module): ! s = (string.letters+'\n')*5 ! f = module.StringIO(s) ! print f.read(10) ! print f.readline() ! print len(f.readlines(60)) ! ! # Don't bother testing cStringIO without ! import StringIO, cStringIO ! do_test(StringIO) ! do_test(cStringIO) --- 1,134 ---- ! #! /usr/bin/env python ! # Sanity checker for time.strftime ! import time, calendar, sys, string, os, re ! from test_support import verbose ! ! def main(): ! global verbose ! now = time.time() ! strftest(now) ! verbose = 0 ! # Try a bunch of dates and times, chosen to vary through time of ! # day and daylight saving time ! for j in range(-5, 5): ! for i in range(25): ! strftest(now + (i + j*100)*23*3603) ! ! def strftest(now): ! if verbose: ! print "strftime test for", time.ctime(now) ! nowsecs = str(long(now))[:-1] ! gmt = time.gmtime(now) ! now = time.localtime(now) ! ! if now[3] < 12: ampm='(AM|am)' ! else: ampm='(PM|pm)' ! ! jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) ! ! try: ! if now[8]: tz = time.tzname[1] ! else: tz = time.tzname[0] ! except AttributeError: ! tz = '' ! ! if now[3] > 12: clock12 = now[3] - 12 ! elif now[3] > 0: clock12 = now[3] ! else: clock12 = 12 ! ! expectations = ( ! ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ! ('%A', calendar.day_name[now[6]], 'full weekday name'), ! ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ! ('%B', calendar.month_name[now[1]], 'full month name'), ! # %c see below ! ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ! ('%H', '%02d' % now[3], 'hour (00-23)'), ! ('%I', '%02d' % clock12, 'hour (01-12)'), ! ('%j', '%03d' % now[7], 'julian day (001-366)'), ! ('%m', '%02d' % now[1], 'month as number (01-12)'), ! ('%M', '%02d' % now[4], 'minute, (00-59)'), ! ('%p', ampm, 'AM or PM as appropriate'), ! ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ! ('%U', '%02d' % ((now[7] + jan1[6])/7), ! 'week number of the year (Sun 1st)'), ! ('%w', '0?%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ! ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), ! 'week number of the year (Mon 1st)'), ! # %x see below ! ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ! ('%y', '%02d' % (now[0]%100), 'year without century'), ! ('%Y', '%d' % now[0], 'year with century'), ! # %Z see below ! ('%%', '%', 'single percent sign'), ! ) ! ! nonstandard_expectations = ( ! # These are standard but don't have predictable output ! ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ! ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), ! '%m/%d/%y %H:%M:%S'), ! ('%Z', '%s' % tz, 'time zone name'), ! ! # These are some platform specific extensions ! ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ! ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ! ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ! ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ! ('%n', '\n', 'newline character'), ! ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), ! '%I:%M:%S %p'), ! ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ! ('%s', nowsecs, 'seconds since the Epoch in UCT'), ! ('%t', '\t', 'tab character'), ! ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ! ('%3y', '%03d' % (now[0]%100), ! 'year without century rendered using fieldwidth'), ! ) ! ! if verbose: ! print "Strftime test, platform: %s, Python version: %s" % \ ! (sys.platform, string.split(sys.version)[0]) ! ! for e in expectations: ! try: ! result = time.strftime(e[0], now) ! except ValueError, error: ! print "Standard '%s' format gave error:" % e[0], error ! continue ! if re.match(e[1], result): continue ! if not result or result[0] == '%': ! print "Does not support standard '%s' format (%s)" % (e[0], e[2]) ! else: ! print "Conflict for %s (%s):" % (e[0], e[2]) ! print " Expected %s, but got %s" % (e[1], result) ! ! for e in nonstandard_expectations: ! try: ! result = time.strftime(e[0], now) ! except ValueError, result: ! if verbose: ! print "Error for nonstandard '%s' format (%s): %s" % \ ! (e[0], e[2], str(result)) ! continue ! if re.match(e[1], result): ! if verbose: ! print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) ! elif not result or result[0] == '%': ! if verbose: ! print "Does not appear to support '%s' format (%s)" % (e[0], ! e[2]) ! else: ! if verbose: ! print "Conflict for nonstandard '%s' format (%s):" % (e[0], ! e[2]) ! print " Expected %s, but got %s" % (e[1], result) ! ! def fixasctime(s): ! if s[8] == ' ': ! s = s[:8] + '0' + s[9:] ! return s ! ! main() Index: test_uni.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_uni.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_uni.py 2000/09/01 19:25:51 1.3 --- test_uni.py 2000/10/09 22:14:43 1.4 *************** *** 342,345 **** --- 342,346 ---- assert '...%(foo)s...' % {u'foo':u"abc",u'def':123} == u'...abc...' assert '...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...1...2...3...abc...' + assert '...%%...%%s...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...%...%s...1...2...3...abc...' assert '...%s...' % u"abc" == u'...abc...' print 'done.' Index: test_url.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_url.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_url.py 2000/09/26 17:32:27 1.2 --- test_url.py 2000/10/09 22:14:43 1.3 *************** *** 1,32 **** - # Minimal test of the quote function - import urllib - - chars = 'abcdefghijklmnopqrstuvwxyz'\ - '\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356' \ - '\357\360\361\362\363\364\365\366\370\371\372\373\374\375\376\377' \ - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' \ - '\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317' \ - '\320\321\322\323\324\325\326\330\331\332\333\334\335\336' - - expected = 'abcdefghijklmnopqrstuvwxyz%df%e0%e1%e2%e3%e4%e5%e6%e7%e8%e9%ea%eb%ec%ed%ee%ef%f0%f1%f2%f3%f4%f5%f6%f8%f9%fa%fb%fc%fd%fe%ffABCDEFGHIJKLMNOPQRSTUVWXYZ%c0%c1%c2%c3%c4%c5%c6%c7%c8%c9%ca%cb%cc%cd%ce%cf%d0%d1%d2%d3%d4%d5%d6%d8%d9%da%db%dc%dd%de' - - test = urllib.quote(chars) - assert test == expected, "urllib.quote problem" - test2 = urllib.unquote(expected) - assert test2 == chars - - in1 = "abc/def" - out1_1 = "abc/def" - out1_2 = "abc%2fdef" - - assert urllib.quote(in1) == out1_1, "urllib.quote problem" - assert urllib.quote(in1, '') == out1_2, "urllib.quote problem" - - in2 = "abc?def" - out2_1 = "abc%3fdef" - out2_2 = "abc?def" - - assert urllib.quote(in2) == out2_1, "urllib.quote problem" - assert urllib.quote(in2, '?') == out2_2, "urllib.quote problem" - - --- 0 ---- Index: test_win.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_win.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_win.py 2000/09/26 17:32:27 1.4 --- test_win.py 2000/10/09 22:14:43 1.5 *************** *** 1,147 **** ! # Test the windows specific win32reg module. ! # Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey ! from _winreg import * ! import os, sys ! ! test_key_name = "SOFTWARE\\Python Registry Test Key - Delete Me" ! ! test_data = [ ! ("Int Value", 45, REG_DWORD), ! ("String Val", "A string value", REG_SZ,), ! (u"Unicode Val", u"A Unicode value", REG_SZ,), ! ("StringExpand", "The path is %path%", REG_EXPAND_SZ), ! ("UnicodeExpand", u"The path is %path%", REG_EXPAND_SZ), ! ("Multi-string", ["Lots", "of", "string", "values"], REG_MULTI_SZ), ! ("Multi-unicode", [u"Lots", u"of", u"unicode", u"values"], REG_MULTI_SZ), ! ("Multi-mixed", [u"Unicode", u"and", "string", "values"],REG_MULTI_SZ), ! ("Raw Data", ("binary"+chr(0)+"data"), REG_BINARY), ! ] ! ! def WriteTestData(root_key): ! # Set the default value for this key. ! SetValue(root_key, test_key_name, REG_SZ, "Default value") ! key = CreateKey(root_key, test_key_name) ! # Create a sub-key ! sub_key = CreateKey(key, "sub_key") ! # Give the sub-key some named values ! ! for value_name, value_data, value_type in test_data: ! SetValueEx(sub_key, value_name, 0, value_type, value_data) ! ! # Check we wrote as many items as we thought. ! nkeys, nvalues, since_mod = QueryInfoKey(key) ! assert nkeys==1, "Not the correct number of sub keys" ! assert nvalues==1, "Not the correct number of values" ! nkeys, nvalues, since_mod = QueryInfoKey(sub_key) ! assert nkeys==0, "Not the correct number of sub keys" ! assert nvalues==len(test_data), "Not the correct number of values" ! # Close this key this way... ! # (but before we do, copy the key as an integer - this allows ! # us to test that the key really gets closed). ! int_sub_key = int(sub_key) ! CloseKey(sub_key) ! try: ! QueryInfoKey(int_sub_key) ! raise RuntimeError, "It appears the CloseKey() function does not close the actual key!" ! except EnvironmentError: ! pass ! # ... and close that key that way :-) ! int_key = int(key) ! key.Close() ! try: ! QueryInfoKey(int_key) ! raise RuntimeError, "It appears the key.Close() function does not close the actual key!" ! except EnvironmentError: ! pass ! ! def ReadTestData(root_key): ! # Check we can get default value for this key. ! val = QueryValue(root_key, test_key_name) ! assert val=="Default value", "Registry didn't give back the correct value" ! ! key = OpenKey(root_key, test_key_name) ! # Read the sub-keys ! sub_key = OpenKey(key, "sub_key") ! # Check I can enumerate over the values. ! index = 0 ! while 1: ! try: ! data = EnumValue(sub_key, index) ! except EnvironmentError: ! break ! assert data in test_data, "Didn't read back the correct test data" ! index = index + 1 ! assert index==len(test_data), "Didn't read the correct number of items" ! # Check I can directly access each item ! for value_name, value_data, value_type in test_data: ! read_val, read_typ = QueryValueEx(sub_key, value_name) ! assert read_val==value_data and read_typ == value_type, \ ! "Could not directly read the value" ! sub_key.Close() ! # Enumerate our main key. ! read_val = EnumKey(key, 0) ! assert read_val == "sub_key", "Read subkey value wrong" ! try: ! EnumKey(key, 1) ! assert 0, "Was able to get a second key when I only have one!" ! except EnvironmentError: ! pass ! ! key.Close() ! ! def DeleteTestData(root_key): ! key = OpenKey(root_key, test_key_name, 0, KEY_ALL_ACCESS) ! sub_key = OpenKey(key, "sub_key", 0, KEY_ALL_ACCESS) ! # It is not necessary to delete the values before deleting ! # the key (although subkeys must not exist). We delete them ! # manually just to prove we can :-) ! for value_name, value_data, value_type in test_data: ! DeleteValue(sub_key, value_name) ! ! nkeys, nvalues, since_mod = QueryInfoKey(sub_key) ! assert nkeys==0 and nvalues==0, "subkey not empty before delete" ! sub_key.Close() ! DeleteKey(key, "sub_key") ! ! try: ! # Shouldnt be able to delete it twice! ! DeleteKey(key, "sub_key") ! assert 0, "Deleting the key twice succeeded" ! except EnvironmentError: ! pass ! key.Close() ! DeleteKey(root_key, test_key_name) ! # Opening should now fail! ! try: ! key = OpenKey(root_key, test_key_name) ! assert 0, "Could open the non-existent key" ! except WindowsError: # Use this error name this time ! pass ! ! def TestAll(root_key): ! WriteTestData(root_key) ! ReadTestData(root_key) ! DeleteTestData(root_key) ! ! # Test on my local machine. ! TestAll(HKEY_CURRENT_USER) ! print "Local registry tests worked" ! try: ! remote_name = sys.argv[sys.argv.index("--remote")+1] ! except (IndexError, ValueError): ! remote_name = None ! ! if remote_name is not None: ! try: ! remote_key = ConnectRegistry(remote_name, HKEY_CURRENT_USER) ! except EnvironmentError, exc: ! print "Could not connect to the remote machine -", exc.strerror ! remote_key = None ! if remote_key is not None: ! TestAll(remote_key) ! print "Remote registry tests worked" ! else: ! print "Remote registry calls can be tested using", ! print "'test_winreg.py --remote \\\\machine_name'" --- 1,7 ---- ! # Ridiculously simple test of the winsound module for Windows. ! import winsound ! for i in range(100, 2000, 100): ! winsound.Beep(i, 75) ! print "Hopefully you heard some sounds increasing in frequency!" Index: userlist.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/userlist.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** userlist.py 2000/09/26 17:32:27 1.9 --- userlist.py 2000/10/09 22:14:43 1.10 *************** *** 25,31 **** def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) ! userlist = self.__class__() ! userlist.data[:] = self.data[i:j] ! return userlist def __setslice__(self, i, j, other): i = max(i, 0); j = max(j, 0) --- 25,29 ---- def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) ! return self.__class__(self.data[i:j]) def __setslice__(self, i, j, other): i = max(i, 0); j = max(j, 0) Index: webbrows.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/webbrows.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** webbrows.py 2000/09/26 17:32:27 1.3 --- webbrows.py 2000/10/09 22:14:43 1.4 *************** *** 197,203 **** DEFAULT_BROWSER = "windows-default" elif os.environ.get("DISPLAY"): ! if os.environ.get("KDEDIR"): ! DEFAULT_BROWSER = "kfm" ! elif _iscommand("netscape"): DEFAULT_BROWSER = "netscape" --- 197,201 ---- DEFAULT_BROWSER = "windows-default" elif os.environ.get("DISPLAY"): ! if _iscommand("netscape"): DEFAULT_BROWSER = "netscape" From python-dev@python.org Tue Oct 10 00:43:58 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 9 Oct 2000 16:43:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib wave.py,1.12,1.13 Message-ID: <200010092343.QAA19489@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv16460/python/dist/src/lib Modified Files: wave.py Log Message: When the classes in wave.py opened files themselves, their .close() methods didn't bother to close the files. This caused the new test_wave test to fail under Windows, as Windows won't let you delete a file that's open. Fixed that by ensuring the wave read & write classes' .close() and __del__ methods close files that were opened by their constructors. Index: wave.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/wave.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** wave.py 2000/10/09 20:01:53 1.12 --- wave.py 2000/10/09 23:43:55 1.13 *************** *** 153,161 **** --- 153,165 ---- def __init__(self, f): + self._i_opened_the_file = None if type(f) == type(''): f = __builtin__.open(f, 'rb') + self._i_opened_the_file = f # else, assume it is an open file object already self.initfp(f) + def __del__(self): + self.close() # # User visible methods. *************** *** 169,172 **** --- 173,179 ---- def close(self): + if self._i_opened_the_file: + self._i_opened_the_file.close() + self._i_opened_the_file = None self._file = None *************** *** 285,290 **** --- 292,299 ---- def __init__(self, f): + self._i_opened_the_file = None if type(f) == type(''): f = __builtin__.open(f, 'wb') + self._i_opened_the_file = f self.initfp(f) *************** *** 301,306 **** def __del__(self): ! if self._file: ! self.close() # --- 310,314 ---- def __del__(self): ! self.close() # *************** *** 414,422 **** def close(self): ! self._ensure_header_written(0) ! if self._datalength != self._datawritten: ! self._patchheader() ! self._file.flush() ! self._file = None # --- 422,434 ---- def close(self): ! if self._file: ! self._ensure_header_written(0) ! if self._datalength != self._datawritten: ! self._patchheader() ! self._file.flush() ! self._file = None ! if self._i_opened_the_file: ! self._i_opened_the_file.close() ! self._i_opened_the_file = None # From python-dev@python.org Tue Oct 10 15:49:51 2000 From: python-dev@python.org (Guido van Rossum) Date: Tue, 10 Oct 2000 07:49:51 -0700 Subject: [Python-checkins] CVS: python/dist/src LICENSE,1.6,1.7 Message-ID: <200010101449.HAA21537@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv21456 Modified Files: LICENSE Log Message: Place the full text of the CNRI license verbatim in the LICENSE file. Who know where the handle will point to tomorrow? Index: LICENSE =================================================================== RCS file: /cvsroot/python/python/dist/src/LICENSE,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** LICENSE 2000/09/05 03:05:07 1.6 --- LICENSE 2000/10/10 14:49:44 1.7 *************** *** 71,80 **** ---------------------------------- ! Python 1.6 is made available subject to the terms and conditions in ! CNRI's License Agreement. This Agreement together with Python 1.6 may ! be located on the Internet using the following unique, persistent ! identifier (known as a handle): 1895.22/1012. This Agreement may also be obtained from a proxy server on the Internet using the following ! URL: http://hdl.handle.net/1895.22/1012. --- 71,142 ---- ---------------------------------- ! Python 1.6 CNRI OPEN SOURCE LICENSE AGREEMENT ! ! IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY. BY CLICKING ! ON "ACCEPT" WHERE INDICATED BELOW, OR BY COPYING, INSTALLING OR ! OTHERWISE USING PYTHON 1.6 SOFTWARE, YOU ARE DEEMED TO HAVE AGREED TO ! THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. ! ! 1. This LICENSE AGREEMENT is between the Corporation for National ! Research Initiatives, having an office at 1895 Preston White Drive, ! Reston, VA 20191 ("CNRI"), and the Individual or Organization ! ("Licensee") accessing and otherwise using Python 1.6 software in ! source or binary form and its associated documentation, as released at ! the www.python.org Internet site on September 5, 2000 ("Python 1.6"). ! ! 2. Subject to the terms and conditions of this License Agreement, CNRI ! hereby grants Licensee a nonexclusive, royalty-free, world-wide ! license to reproduce, analyze, test, perform and/or display publicly, ! prepare derivative works, distribute, and otherwise use Python 1.6 ! alone or in any derivative version, provided, however, that CNRI's ! License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) ! 1995-2000 Corporation for National Research Initiatives; All Rights ! Reserved" are retained in Python 1.6 alone or in any derivative ! version prepared by ! ! Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee ! may substitute the following text (omitting the quotes): "Python 1.6 ! is made available subject to the terms and conditions in CNRI's ! License Agreement. This Agreement together with Python 1.6 may be ! located on the Internet using the following unique, persistent ! identifier (known as a handle): 1895.22/1012. This Agreement may also be obtained from a proxy server on the Internet using the following ! URL: http://hdl.handle.net/1895.22/1012". ! ! 3. In the event Licensee prepares a derivative work that is based on ! or incorporates Python 1.6 or any part thereof, and wants to make the ! derivative work available to others as provided herein, then Licensee ! hereby agrees to include in any such work a brief summary of the ! changes made to Python 1.6. ! ! 4. CNRI is making Python 1.6 available to Licensee on an "AS IS" ! basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR ! IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND ! DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS ! FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6 WILL NOT ! INFRINGE ANY THIRD PARTY RIGHTS. ! ! 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON ! 1.6 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A ! RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6, OR ! ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. ! ! 6. This License Agreement will automatically terminate upon a material ! breach of its terms and conditions. ! ! 7. This License Agreement shall be governed by and interpreted in all ! respects by the law of the State of Virginia, excluding conflict of ! law provisions. Nothing in this License Agreement shall be deemed to ! create any relationship of agency, partnership, or joint venture ! between CNRI and Licensee. This License Agreement does not grant ! permission to use CNRI trademarks or trade name in a trademark sense ! to endorse or promote products or services of Licensee, or any third ! party. ! ! 8. By clicking on the "ACCEPT" button where indicated, or by copying, ! installing or otherwise using Python 1.6, Licensee agrees to be bound ! by the terms and conditions of this License Agreement. ! ! ACCEPT From python-dev@python.org Tue Oct 10 17:46:39 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 09:46:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib lib.tex,1.167,1.168 Message-ID: <200010101646.JAA11172@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv11142 Modified Files: lib.tex Log Message: Move the documentation for the mutex module to be with the threading and queue-management modules, since that is where the general context for use in most cases. Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -r1.167 -r1.168 *** lib.tex 2000/10/09 18:11:24 1.167 --- lib.tex 2000/10/10 16:46:36 1.168 *************** *** 148,152 **** \input{liblocale} \input{libgettext} - \input{libmutex} \input{libsomeos} % Optional Operating System Services --- 148,151 ---- *************** *** 156,159 **** --- 155,159 ---- \input{libthread} \input{libthreading} + \input{libmutex} \input{libqueue} \input{libmmap} From python-dev@python.org Tue Oct 10 17:56:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 09:56:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libbasehttp.tex,1.11,1.12 libcgihttp.tex,1.3,1.4 Message-ID: <200010101656.JAA18565@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18517 Modified Files: libbasehttp.tex libcgihttp.tex Log Message: Better synopses based on suggestions from Ka-Ping Yee . Index: libbasehttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbasehttp.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** libbasehttp.tex 2000/07/16 19:01:09 1.11 --- libbasehttp.tex 2000/10/10 16:56:41 1.12 *************** *** 1,8 **** \section{\module{BaseHTTPServer} --- ! Basic HTTP server.} ! \declaremodule{standard}{BaseHTTPServer} \modulesynopsis{Basic HTTP server (base class for ! \class{SimpleHTTPServer} and \class{CGIHTTPServer}).} --- 1,8 ---- \section{\module{BaseHTTPServer} --- ! Basic HTTP server} + \declaremodule{standard}{BaseHTTPServer} \modulesynopsis{Basic HTTP server (base class for ! \class{SimpleHTTPServer} and \class{CGIHTTPServer}).} *************** *** 11,15 **** \index{URL} \index{httpd} - This module defines two classes for implementing HTTP servers --- 11,14 ---- Index: libcgihttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgihttp.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libcgihttp.tex 2000/07/16 19:01:09 1.3 --- libcgihttp.tex 2000/10/10 16:56:41 1.4 *************** *** 1,4 **** \section{\module{CGIHTTPServer} --- ! A Do-Something Request Handler} --- 1,4 ---- \section{\module{CGIHTTPServer} --- ! CGI-capable HTTP request handler} From python-dev@python.org Tue Oct 10 17:59:56 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 09:59:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsimplehttp.tex,1.1,1.2 Message-ID: <200010101659.JAA21378@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv21341 Modified Files: libsimplehttp.tex Log Message: Better synopsis based on suggestion from Ka-Ping Yee . Index: libsimplehttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsimplehttp.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libsimplehttp.tex 1999/06/14 19:47:47 1.1 --- libsimplehttp.tex 2000/10/10 16:59:53 1.2 *************** *** 1,8 **** \section{\module{SimpleHTTPServer} --- ! A Do-Something Request Handler} \declaremodule{standard}{SimpleHTTPServer} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} ! \modulesynopsis{This module provides a request handler for HTTP servers.} --- 1,9 ---- \section{\module{SimpleHTTPServer} --- ! Simple HTTP request handler} \declaremodule{standard}{SimpleHTTPServer} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} ! \modulesynopsis{This module provides a basic request handler for HTTP ! servers.} From python-dev@python.org Tue Oct 10 18:02:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 10:02:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libxdrlib.tex,1.22,1.23 Message-ID: <200010101702.KAA23632@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv23588 Modified Files: libxdrlib.tex Log Message: Minor nit fixes based on suggestions from Ka-Ping Yee . Added "See also" section with relevant RFC references. Index: libxdrlib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxdrlib.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** libxdrlib.tex 1999/04/20 13:41:14 1.22 --- libxdrlib.tex 2000/10/10 17:02:34 1.23 *************** *** 1,13 **** \section{\module{xdrlib} --- ! Encode and decode XDR data.} ! \declaremodule{standard}{xdrlib} \modulesynopsis{Encoders and decoders for the External Data ! Representation (XDR).} \index{XDR} \index{External Data Representation} - The \module{xdrlib} module supports the External Data Representation Standard as described in \rfc{1014}, written by Sun Microsystems, --- 1,12 ---- \section{\module{xdrlib} --- ! Encode and decode XDR data} + \declaremodule{standard}{xdrlib} \modulesynopsis{Encoders and decoders for the External Data ! Representation (XDR).} \index{XDR} \index{External Data Representation} The \module{xdrlib} module supports the External Data Representation Standard as described in \rfc{1014}, written by Sun Microsystems, *************** *** 29,32 **** --- 28,42 ---- \var{data}. \end{classdesc} + + + \begin{seealso} + \seerfc{1014}{XDR: External Data Representation Standard}{This RFC + defined the encoding of data which was XDR at the time + this module was originally written. It has + appearantly been obsoleted by \rfc{1832}.} + + \seerfc{1832}{XDR: External Data Representation Standard}{Newer RFC + that provides a revised definition of XDR.} + \end{seealso} From python-dev@python.org Tue Oct 10 18:03:48 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 10:03:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcmd.tex,1.5,1.6 libcurses.tex,1.19,1.20 libdis.tex,1.28,1.29 liberrno.tex,1.10,1.11 libgetopt.tex,1.14,1.15 libimghdr.tex,1.12,1.13 libnew.tex,1.4,1.5 libpprint.tex,1.13,1.14 libqueue.tex,1.10,1.11 libreadline.tex,1.4,1.5 librepr.tex,1.2,1.3 librlcompleter.tex,1.3,1.4 librotor.tex,1.15,1.16 libsignal.tex,1.18,1.19 libsndhdr.tex,1.2,1.3 libsocksvr.tex,1.12,1.13 Message-ID: <200010101703.KAA24890@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24805 Modified Files: libcmd.tex libcurses.tex libdis.tex liberrno.tex libgetopt.tex libimghdr.tex libnew.tex libpprint.tex libqueue.tex libreadline.tex librepr.tex librlcompleter.tex librotor.tex libsignal.tex libsndhdr.tex libsocksvr.tex Log Message: Fixed lots of small nits caught by Ka-Ping Yee . Index: libcmd.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcmd.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** libcmd.tex 2000/07/12 02:56:15 1.5 --- libcmd.tex 2000/10/10 17:03:45 1.6 *************** *** 1,9 **** \section{\module{cmd} --- ! Build line-oriented command interpreters.} \declaremodule{standard}{cmd} \sectionauthor{Eric S. Raymond}{esr@snark.thyrsus.com} ! ! \modulesynopsis{Build line-oriented command interpreters; this is used ! by module \module{pdb}.} --- 1,8 ---- \section{\module{cmd} --- ! Support for line-oriented command interpreters} ! \declaremodule{standard}{cmd} \sectionauthor{Eric S. Raymond}{esr@snark.thyrsus.com} ! \modulesynopsis{Build line-oriented command interpreters.} Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** libcurses.tex 2000/10/06 20:01:23 1.19 --- libcurses.tex 2000/10/10 17:03:45 1.20 *************** *** 1,9 **** \section{\module{curses} --- ! Screen painting and input handling for character-cell terminals} \declaremodule{standard}{curses} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} \sectionauthor{Eric Raymond}{esr@thyrsus.com} ! \modulesynopsis{An interface to the curses library.} \versionchanged[Added support for the \code{ncurses} library and --- 1,10 ---- \section{\module{curses} --- ! Terminal handling for character-cell displays} \declaremodule{standard}{curses} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} \sectionauthor{Eric Raymond}{esr@thyrsus.com} ! \modulesynopsis{An interface to the curses library, providing portable ! terminal handling.} \versionchanged[Added support for the \code{ncurses} library and Index: libdis.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdis.tex,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** libdis.tex 2000/09/12 16:23:48 1.28 --- libdis.tex 2000/10/10 17:03:45 1.29 *************** *** 1,7 **** \section{\module{dis} --- ! Disassembler.} ! \declaremodule{standard}{dis} ! \modulesynopsis{Disassembler.} --- 1,8 ---- \section{\module{dis} --- ! Disassembler for Python byte code} ! \declaremodule{standard}{dis} ! \modulesynopsis{Disassembler for Python byte code, as stored in code ! objects and \file{.pyc}/\file{.pyo} files.} Index: liberrno.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liberrno.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** liberrno.tex 1998/08/10 19:41:43 1.10 --- liberrno.tex 2000/10/10 17:03:45 1.11 *************** *** 1,11 **** \section{\module{errno} --- ! Standard errno system symbols.} ! \declaremodule{standard}{errno} \modulesynopsis{Standard errno system symbols.} - ! This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from \file{linux/include/errno.h}, --- 1,10 ---- \section{\module{errno} --- ! Standard errno system symbols} + \declaremodule{standard}{errno} \modulesynopsis{Standard errno system symbols.} ! This module makes available standard \code{errno} system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from \file{linux/include/errno.h}, *************** *** 22,27 **** Of the following list, symbols that are not used on the current ! platform are not defined by the module. Symbols available can ! include: \begin{datadesc}{EPERM} Operation not permitted \end{datadesc} --- 21,27 ---- Of the following list, symbols that are not used on the current ! platform are not defined by the module. The specific list of defined ! symbols is available as \code{errno.errorcode.keys()}. Symbols ! available can include: \begin{datadesc}{EPERM} Operation not permitted \end{datadesc} Index: libgetopt.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgetopt.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libgetopt.tex 2000/08/11 19:55:06 1.14 --- libgetopt.tex 2000/10/10 17:03:45 1.15 *************** *** 1,7 **** \section{\module{getopt} --- ! Parser for command line options.} ! \declaremodule{standard}{getopt} ! \modulesynopsis{Parser for command line options.} --- 1,8 ---- \section{\module{getopt} --- ! Parser for command line options} ! \declaremodule{standard}{getopt} ! \modulesynopsis{Portable parser for command line options; support both ! short and long option names.} Index: libimghdr.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimghdr.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libimghdr.tex 1999/01/05 22:54:49 1.12 --- libimghdr.tex 2000/10/10 17:03:45 1.13 *************** *** 1,7 **** \section{\module{imghdr} --- ! Determine the type of an image.} ! \declaremodule{standard}{imghdr} ! \modulesynopsis{Determine the type of image contained in a file or byte stream.} --- 1,8 ---- \section{\module{imghdr} --- ! Determine the type of an image} ! \declaremodule{standard}{imghdr} ! \modulesynopsis{Determine the type of image contained in a file or ! byte stream.} Index: libnew.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnew.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libnew.tex 1999/06/29 15:45:09 1.4 --- libnew.tex 2000/10/10 17:03:45 1.5 *************** *** 1,4 **** \section{\module{new} --- ! Runtime implementation object creation} \declaremodule{builtin}{new} --- 1,4 ---- \section{\module{new} --- ! Creation of runtime internal objects} \declaremodule{builtin}{new} Index: libpprint.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpprint.tex,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** libpprint.tex 1999/02/18 21:10:32 1.13 --- libpprint.tex 2000/10/10 17:03:45 1.14 *************** *** 1,4 **** \section{\module{pprint} --- ! Data pretty printer.} \declaremodule{standard}{pprint} --- 1,4 ---- \section{\module{pprint} --- ! Data pretty printer} \declaremodule{standard}{pprint} Index: libqueue.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libqueue.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** libqueue.tex 2000/04/03 20:13:54 1.10 --- libqueue.tex 2000/10/10 17:03:45 1.11 *************** *** 1,8 **** \section{\module{Queue} --- ! A synchronized queue class.} ! \declaremodule{standard}{Queue} \modulesynopsis{A synchronized queue class.} - --- 1,7 ---- \section{\module{Queue} --- ! A synchronized queue class} + \declaremodule{standard}{Queue} \modulesynopsis{A synchronized queue class.} Index: libreadline.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libreadline.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libreadline.tex 2000/08/09 14:37:05 1.4 --- libreadline.tex 2000/10/10 17:03:45 1.5 *************** *** 5,9 **** \platform{Unix} \sectionauthor{Skip Montanaro}{skip@mojam.com} ! \modulesynopsis{GNU Readline in Python.} --- 5,9 ---- \platform{Unix} \sectionauthor{Skip Montanaro}{skip@mojam.com} ! \modulesynopsis{GNU readline support for Python.} Index: librepr.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librepr.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** librepr.tex 1999/01/28 19:30:49 1.2 --- librepr.tex 2000/10/10 17:03:45 1.3 *************** *** 1,4 **** \section{\module{repr} --- ! Alternate \function{repr()} implementation.} \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} --- 1,4 ---- \section{\module{repr} --- ! Alternate \function{repr()} implementation} \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} Index: librlcompleter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librlcompleter.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** librlcompleter.tex 2000/07/06 04:51:04 1.3 --- librlcompleter.tex 2000/10/10 17:03:45 1.4 *************** *** 1,9 **** \section{\module{rlcompleter} --- ! Completion function for readline} \declaremodule{standard}{rlcompleter} \platform{Unix} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} ! \modulesynopsis{Python identifier completion in the readline library.} The \module{rlcompleter} module defines a completion function for --- 1,9 ---- \section{\module{rlcompleter} --- ! Completion function for GNU readline} \declaremodule{standard}{rlcompleter} \platform{Unix} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} ! \modulesynopsis{Python identifier completion for the GNU readline library.} The \module{rlcompleter} module defines a completion function for Index: librotor.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librotor.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** librotor.tex 2000/07/16 19:01:10 1.15 --- librotor.tex 2000/10/10 17:03:45 1.16 *************** *** 1,6 **** \section{\module{rotor} --- ! Enigma-like encryption and decryption.} ! \declaremodule{builtin}{rotor} \modulesynopsis{Enigma-like encryption and decryption.} --- 1,6 ---- \section{\module{rotor} --- ! Enigma-like encryption and decryption} + \declaremodule{builtin}{rotor} \modulesynopsis{Enigma-like encryption and decryption.} Index: libsignal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsignal.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libsignal.tex 2000/07/16 19:01:10 1.18 --- libsignal.tex 2000/10/10 17:03:45 1.19 *************** *** 1,8 **** \section{\module{signal} --- ! Set handlers for asynchronous events.} ! \declaremodule{builtin}{signal} ! \modulesynopsis{Set handlers for asynchronous events.} This module provides mechanisms to use signal handlers in Python. --- 1,8 ---- \section{\module{signal} --- ! Set handlers for asynchronous events} + \declaremodule{builtin}{signal} \modulesynopsis{Set handlers for asynchronous events.} + This module provides mechanisms to use signal handlers in Python. Index: libsndhdr.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsndhdr.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libsndhdr.tex 1999/01/06 15:21:19 1.2 --- libsndhdr.tex 2000/10/10 17:03:45 1.3 *************** *** 1,4 **** \section{\module{sndhdr} --- ! Determine type of sound file.} \declaremodule{standard}{sndhdr} --- 1,4 ---- \section{\module{sndhdr} --- ! Determine type of sound file} \declaremodule{standard}{sndhdr} Index: libsocksvr.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocksvr.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libsocksvr.tex 1999/11/10 16:21:37 1.12 --- libsocksvr.tex 2000/10/10 17:03:45 1.13 *************** *** 1,6 **** \section{\module{SocketServer} --- ! A framework for network servers.} ! \declaremodule{standard}{SocketServer} \modulesynopsis{A framework for network servers.} --- 1,6 ---- \section{\module{SocketServer} --- ! A framework for network servers} + \declaremodule{standard}{SocketServer} \modulesynopsis{A framework for network servers.} From python-dev@python.org Tue Oct 10 19:36:06 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 11:36:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcopyreg.tex,1.7,1.8 Message-ID: <200010101836.LAA19983@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv19896 Modified Files: libcopyreg.tex Log Message: Make it clear that copy_reg.pickle() should not be used for classes, but only for extension types. This partially fixes SourceForge bug #116295. Index: libcopyreg.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcopyreg.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libcopyreg.tex 1999/04/22 21:23:21 1.7 --- libcopyreg.tex 2000/10/10 18:36:02 1.8 *************** *** 21,28 **** \begin{funcdesc}{pickle}{type, function\optional{, constructor}} Declares that \var{function} should be used as a ``reduction'' ! function for objects of type or class \var{type}. \var{function} ! should return either a string or a tuple. The optional ! \var{constructor} parameter, if provided, is a callable object which ! can be used to reconstruct the object when called with the tuple of ! arguments returned by \var{function} at pickling time. \end{funcdesc} --- 21,29 ---- \begin{funcdesc}{pickle}{type, function\optional{, constructor}} Declares that \var{function} should be used as a ``reduction'' ! function for objects of type \var{type}; \var{type} should not a ! class object. \var{function} should return either a string or a ! tuple. The optional \var{constructor} parameter, if provided, is a ! callable object which can be used to reconstruct the object when ! called with the tuple of arguments returned by \var{function} at ! pickling time. \end{funcdesc} From python-dev@python.org Tue Oct 10 20:35:50 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 12:35:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools mksourcepkg,1.2,1.3 Message-ID: <200010101935.MAA19646@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv19522 Modified Files: mksourcepkg Log Message: Substantially revise to handle the fact that Python CVS is no longer in a file-system accessible repository. Add a little bit of smarts to convert the cvsroot to an anonymous cvsroot the real one requires an authenticated login to SourceForge; this avoids the SSH startup delay when doing the checkout or export to get a fresh copy of the tree. Index: mksourcepkg =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mksourcepkg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** mksourcepkg 2000/04/03 04:19:14 1.2 --- mksourcepkg 2000/10/10 19:35:40 1.3 *************** *** 22,31 **** --- 22,36 ---- import glob import os + import re import shutil import sys import tempfile + import cvsinfo + quiet = 0 + rx = re.compile(r":ext:(?:[a-zA-Z0-9]+)@cvs\.([a-zA-Z0-9]+).sourceforge.net:" + r"/cvsroot/\1") *************** *** 71,94 **** tempdir = tempfile.mktemp() os.mkdir(tempdir) ! os.mkdir(os.path.join(tempdir, "Python-%s" % release)) ! docdir = os.path.join(tempdir, "Python-%s" % release, "Doc") ! os.mkdir(docdir) ! mydir = os.getcwd() if cvstag: ! run("cvs export -r %s -d %s/Python-%s/Doc python/dist/src/Doc" ! % (cvstag, tempdir, release)) else: ! run("cvs checkout -d %s/Python-%s/Doc python/dist/src/Doc" ! % (tempdir, release)) # remove CVS directories - os.chdir("%s/Python-%s" % (tempdir, release)) for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'): map(shutil.rmtree, glob.glob(p)) - os.chdir(mydir) if tools: ! archive = "tools-" + release # we don't want the actual documents in this case: ! for d in ("api", "doc", "ext", "lib", "mac", "ref", "tut"): ! shutil.rmtree(os.path.join(docdir, d)) else: archive = "latex-" + release --- 76,113 ---- tempdir = tempfile.mktemp() os.mkdir(tempdir) ! pkgdir = os.path.join(tempdir, "Python-" + release) ! os.mkdir(pkgdir) ! pwd = os.getcwd() ! mydir = os.path.abspath(os.path.dirname(sys.argv[0])) ! info = cvsinfo.RepositoryInfo(mydir) ! cvsroot = info.get_cvsroot() ! m = rx.match(cvsroot) ! if m: ! # If this is an authenticated SourceForge repository, convert to ! # anonymous usage for the export/checkout, since that avoids the ! # SSH overhead. ! group = m.group(1) ! cvsroot = ":pserver:anonymous@cvs.%s.sourceforge.net:/cvsroot/%s" \ ! % (group, group) ! # For some reason, SourceForge/CVS doesn't seem to care that we ! # might not have done a "cvs login" to the anonymous server. ! # That avoids a lot of painful gunk here. ! os.chdir(pkgdir) ! if not quiet: ! print "--- current directory is:", pkgdir if cvstag: ! run("cvs -d%s export -r %s -d Doc python/dist/src/Doc" ! % (cvsroot, cvstag)) else: ! run("cvs -Q -d%s checkout -d Doc python/dist/src/Doc" % cvsroot) # remove CVS directories for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'): map(shutil.rmtree, glob.glob(p)) if tools: ! archive = "doctools-" + release # we don't want the actual documents in this case: ! for d in ("api", "dist", "doc", "ext", "inst", ! "lib", "mac", "ref", "tut"): ! shutil.rmtree(os.path.join(os.path.join(pkgdir, "Doc"), d)) else: archive = "latex-" + release *************** *** 97,101 **** os.chdir(tempdir) ! archive = os.path.join(mydir, archive) for format in formats: if format == "bzip2": --- 116,120 ---- os.chdir(tempdir) ! archive = os.path.join(pwd, archive) for format in formats: if format == "bzip2": *************** *** 112,116 **** # clean up the work area: ! os.chdir(mydir) shutil.rmtree(tempdir) --- 131,135 ---- # clean up the work area: ! os.chdir(pwd) shutil.rmtree(tempdir) *************** *** 120,124 **** print "+++", cmd if quiet: ! cmd = "(%s) >/dev/null" % cmd rc = os.system(cmd) if rc: --- 139,143 ---- print "+++", cmd if quiet: ! cmd = "%s >/dev/null" % cmd rc = os.system(cmd) if rc: From python-dev@python.org Tue Oct 10 21:23:13 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 13:23:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib liburllib.tex,1.29,1.30 Message-ID: <200010102023.NAA30923@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30867/lib Modified Files: liburllib.tex Log Message: Remove duplicated text from urlopen() description, noted by Ka-Ping Yee and probably others as well. Index: liburllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib.tex,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** liburllib.tex 2000/09/15 04:12:56 1.29 --- liburllib.tex 2000/10/10 20:23:10 1.30 *************** *** 82,101 **** Proxies which require authentication for use are not currently supported; this is considered an implementation limitation. - - The \function{urlopen()} function works transparently with proxies. - In a \UNIX{} or Windows environment, set the \envvar{http_proxy}, - \envvar{ftp_proxy} or \envvar{gopher_proxy} environment variables to a - URL that identifies the proxy server before starting the Python - interpreter, e.g.: - - \begin{verbatim} - % http_proxy="http://www.someproxy.com:3128" - % export http_proxy - % python - ... - \end{verbatim} - - In a Macintosh environment, \function{urlopen()} will retrieve proxy - information from Internet Config. \end{funcdesc} --- 82,85 ---- From python-dev@python.org Tue Oct 10 21:36:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 13:36:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.49,1.50 Message-ID: <200010102036.NAA08947@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv8904/lib Modified Files: libsocket.tex Log Message: Revise the examples not to use the "from socket import *", and adjust one comment in the example for clarity. Index: libsocket.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** libsocket.tex 2000/09/06 02:22:16 1.49 --- libsocket.tex 2000/10/10 20:36:29 1.50 *************** *** 427,434 **** \begin{verbatim} # Echo server program ! from socket import * HOST = '' # Symbolic name meaning the local host ! PORT = 50007 # Arbitrary non-privileged server ! s = socket(AF_INET, SOCK_STREAM) s.bind((HOST, PORT)) s.listen(1) --- 427,435 ---- \begin{verbatim} # Echo server program ! import socket ! HOST = '' # Symbolic name meaning the local host ! PORT = 50007 # Arbitrary non-privileged port ! s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST, PORT)) s.listen(1) *************** *** 444,451 **** \begin{verbatim} # Echo client program ! from socket import * HOST = 'daring.cwi.nl' # The remote host PORT = 50007 # The same port as used by the server ! s = socket(AF_INET, SOCK_STREAM) s.connect((HOST, PORT)) s.send('Hello, world') --- 445,453 ---- \begin{verbatim} # Echo client program ! import socket ! HOST = 'daring.cwi.nl' # The remote host PORT = 50007 # The same port as used by the server ! s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) s.send('Hello, world') From python-dev@python.org Tue Oct 10 21:58:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 13:58:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libuserdict.tex,1.17,1.18 Message-ID: <200010102058.NAA26130@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26065/lib Modified Files: libuserdict.tex Log Message: Note that the UserString/MutableString classes are far less efficient than the built-in string types (suggested by Moshe Zadka ). Clarified what "can be converted to a string" means. Fixed a few markup nits. Index: libuserdict.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuserdict.tex,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** libuserdict.tex 2000/10/06 20:04:48 1.17 --- libuserdict.tex 2000/10/10 20:58:48 1.18 *************** *** 93,113 **** \sectionauthor{Peter Funk}{pf@artcom-gmbh.de} ! This module defines a class that acts as a wrapper around ! string objects. It is a useful base class for ! your own string-like classes, which can inherit from ! them and override existing methods or add new ones. In this way one ! can add new behaviors to strings. ! The \module{UserString} module defines the \class{UserString} class: \begin{classdesc}{UserString}{\optional{sequence}} ! Return a class instance that simulates a string or a Unicode string object. ! The instance's content is kept in a regular string or Unicode string ! object, which is accessible via the ! \member{data} attribute of \class{UserString} instances. The instance's ! contents are initially set to a copy of \var{sequence}. ! \var{sequence} can be either a regular Python string or Unicode string, ! an instance of \class{UserString} (or a subclass) or an arbitrary sequence ! which can be converted into a string. \end{classdesc} --- 93,116 ---- \sectionauthor{Peter Funk}{pf@artcom-gmbh.de} ! This module defines a class that acts as a wrapper around string ! objects. It is a useful base class for your own string-like classes, ! which can inherit from them and override existing methods or add new ! ones. In this way one can add new behaviors to strings. ! It should be noted that these classes are highly inefficient compared ! to real string or Unicode objects; this is especially the case for ! \class{MutableString}. + The \module{UserString} module defines the following classes: + \begin{classdesc}{UserString}{\optional{sequence}} ! Return a class instance that simulates a string or a Unicode string ! object. The instance's content is kept in a regular string or Unicode ! string object, which is accessible via the \member{data} attribute of ! \class{UserString} instances. The instance's contents are initially ! set to a copy of \var{sequence}. \var{sequence} can be either a ! regular Python string or Unicode string, an instance of ! \class{UserString} (or a subclass) or an arbitrary sequence which can ! be converted into a string using the built-in \function{str()} function. \end{classdesc} *************** *** 118,129 **** keys. The main intention of this class is to serve as an educational example for inheritance and necessity to remove (override) the ! \function{__hash__} method in order to trap attempts to use a mutable object as dictionary key, which would be otherwise very error prone and hard to track down. \end{classdesc} ! In addition to supporting the methods and operations of string or ! Unicode objects (see section \ref{typesseq}), \class{UserString} instances ! provide the following attribute: \begin{memberdesc}{data} --- 121,133 ---- keys. The main intention of this class is to serve as an educational example for inheritance and necessity to remove (override) the ! \method{__hash__()} method in order to trap attempts to use a mutable object as dictionary key, which would be otherwise very error prone and hard to track down. \end{classdesc} ! In addition to supporting the methods and operations of string and ! Unicode objects (see section \ref{string-methods}, ``String ! Methods''), \class{UserString} instances provide the following ! attribute: \begin{memberdesc}{data} From python-dev@python.org Tue Oct 10 22:10:38 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 14:10:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python errors.c,2.56,2.57 Message-ID: <200010102110.OAA03799@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv3759 Modified Files: errors.c Log Message: Avoid a couple of "value computed is not used" warnings from gcc -Wall; these computations are required for their side effects in traversing the variable arguments list. Reported by Marc-Andre Lemburg . Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.56 retrieving revision 2.57 diff -C2 -r2.56 -r2.57 *** errors.c 2000/09/01 23:29:28 2.56 --- errors.c 2000/10/10 21:10:35 2.57 *************** *** 407,411 **** switch (*f) { case 'c': ! va_arg(vargs, int); /* fall through... */ case '%': --- 407,411 ---- switch (*f) { case 'c': ! (void) va_arg(vargs, int); /* fall through... */ case '%': *************** *** 413,417 **** break; case 'd': case 'i': case 'x': ! va_arg(vargs, int); /* 20 bytes should be enough to hold a 64-bit integer */ --- 413,417 ---- break; case 'd': case 'i': case 'x': ! (void) va_arg(vargs, int); /* 20 bytes should be enough to hold a 64-bit integer */ From python-dev@python.org Tue Oct 10 23:00:07 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 15:00:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libdis.tex,1.29,1.30 libimp.tex,1.26,1.27 libmailbox.tex,1.14,1.15 libmimetools.tex,1.18,1.19 libnew.tex,1.5,1.6 libre.tex,1.57,1.58 libsite.tex,1.19,1.20 libuserdict.tex,1.18,1.19 libxmllib.tex,1.28,1.29 Message-ID: <200010102200.PAA10947@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv10866 Modified Files: libdis.tex libimp.tex libmailbox.tex libmimetools.tex libnew.tex libre.tex libsite.tex libuserdict.tex libxmllib.tex Log Message: Fixed a large number of small problems, mostly noted by Detlef Lannert . Index: libdis.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdis.tex,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** libdis.tex 2000/10/10 17:03:45 1.29 --- libdis.tex 2000/10/10 22:00:03 1.30 *************** *** 3,8 **** \declaremodule{standard}{dis} ! \modulesynopsis{Disassembler for Python byte code, as stored in code ! objects and \file{.pyc}/\file{.pyo} files.} --- 3,7 ---- \declaremodule{standard}{dis} ! \modulesynopsis{Disassembler for Python byte code.} *************** *** 36,40 **** \end{verbatim} ! The \module{dis} module defines the following functions: \begin{funcdesc}{dis}{\optional{bytesource}} --- 35,39 ---- \end{verbatim} ! The \module{dis} module defines the following functions and constants: \begin{funcdesc}{dis}{\optional{bytesource}} *************** *** 76,80 **** \begin{datadesc}{opname} ! Sequence of a operation names, indexable using the byte code. \end{datadesc} --- 75,79 ---- \begin{datadesc}{opname} ! Sequence of operation names, indexable using the byte code. \end{datadesc} *************** *** 88,92 **** \begin{datadesc}{hasname} ! Sequence of byte codes that access a attribute by name. \end{datadesc} --- 87,91 ---- \begin{datadesc}{hasname} ! Sequence of byte codes that access an attribute by name. \end{datadesc} *************** *** 100,104 **** \begin{datadesc}{haslocal} ! Sequence of byte codes that access a a local variable. \end{datadesc} --- 99,103 ---- \begin{datadesc}{haslocal} ! Sequence of byte codes that access a local variable. \end{datadesc} *************** *** 197,205 **** \begin{opcodedesc}{BINARY_LSHIFT}{} ! Implements \code{TOS = TOS1 << TOS}. \end{opcodedesc} \begin{opcodedesc}{BINARY_RSHIFT}{} ! Implements \code{TOS = TOS1 >> TOS}. \end{opcodedesc} --- 196,204 ---- \begin{opcodedesc}{BINARY_LSHIFT}{} ! Implements \code{TOS = TOS1 <\code{}< TOS}. \end{opcodedesc} \begin{opcodedesc}{BINARY_RSHIFT}{} ! Implements \code{TOS = TOS1 >\code{}> TOS}. \end{opcodedesc} *************** *** 246,254 **** \begin{opcodedesc}{INPLACE_LSHIFT}{} ! Implements in-place \code{TOS = TOS1 << TOS}. \end{opcodedesc} \begin{opcodedesc}{INPLACE_RSHIFT}{} ! Implements in-place \code{TOS = TOS1 >> TOS}. \end{opcodedesc} --- 245,253 ---- \begin{opcodedesc}{INPLACE_LSHIFT}{} ! Implements in-place \code{TOS = TOS1 <\code{}< TOS}. \end{opcodedesc} \begin{opcodedesc}{INPLACE_RSHIFT}{} ! Implements in-place \code{TOS = TOS1 >\code{}> TOS}. \end{opcodedesc} Index: libimp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimp.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** libimp.tex 2000/07/16 19:01:09 1.26 --- libimp.tex 2000/10/10 22:00:03 1.27 *************** *** 71,82 **** function does more than importing the module: if the module was already imported, it is equivalent to a ! \function{reload()}\bifuncindex{reload}! The ! \var{name} argument indicates the full module name (including the ! package name, if this is a submodule of a package). The \var{file} ! argument is an open file, and \var{filename} is the corresponding ! file name; these can be \code{None} and \code{''}, respectively, when ! the module is not being loaded from a file. The \var{description} ! argument is a tuple as returned by \function{find_module()} describing ! what kind of module must be loaded. If the load is successful, the return value is the module object; --- 71,82 ---- function does more than importing the module: if the module was already imported, it is equivalent to a ! \function{reload()}\bifuncindex{reload}! The \var{name} argument ! indicates the full module name (including the package name, if this is ! a submodule of a package). The \var{file} argument is an open file, ! and \var{filename} is the corresponding file name; these can be ! \code{None} and \code{''}, respectively, when the module is not being ! loaded from a file. The \var{description} argument is a tuple, as ! would be returned by \function{get_suffixes()}, describing what kind ! of module must be loaded. If the load is successful, the return value is the module object; Index: libmailbox.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmailbox.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libmailbox.tex 1999/03/27 05:45:46 1.14 --- libmailbox.tex 2000/10/10 22:00:03 1.15 *************** *** 50,53 **** file object or a class instance simulating a file object, taking care of things like message boundaries if multiple mail messages are ! contained in a single file, etc. \end{methoddesc} --- 50,54 ---- file object or a class instance simulating a file object, taking care of things like message boundaries if multiple mail messages are ! contained in a single file, etc. If no more messages are available, ! this method returns \code{None}. \end{methoddesc} Index: libmimetools.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmimetools.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libmimetools.tex 2000/05/09 16:23:23 1.18 --- libmimetools.tex 2000/10/10 22:00:03 1.19 *************** *** 62,67 **** ! \subsection{Additional Methods of Message objects} ! \nodename{mimetools.Message Methods} The \class{Message} class defines the following methods in --- 62,67 ---- ! \subsection{Additional Methods of Message Objects ! \label{mimetools-message-objects}} The \class{Message} class defines the following methods in *************** *** 70,74 **** \begin{methoddesc}{getplist}{} Return the parameter list of the \code{content-type} header. This is ! a list if strings. For parameters of the form \samp{\var{key}=\var{value}}, \var{key} is converted to lower case but \var{value} is not. For example, if the message contains the header --- 70,74 ---- \begin{methoddesc}{getplist}{} Return the parameter list of the \code{content-type} header. This is ! a list of strings. For parameters of the form \samp{\var{key}=\var{value}}, \var{key} is converted to lower case but \var{value} is not. For example, if the message contains the header Index: libnew.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnew.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** libnew.tex 2000/10/10 17:03:45 1.5 --- libnew.tex 2000/10/10 22:00:03 1.6 *************** *** 28,37 **** \end{funcdesc} ! \begin{funcdesc}{function}{code, globals\optional{, name\optional{argdefs}}} Returns a (Python) function with the given code and globals. If \var{name} is given, it must be a string or \code{None}. If it is a string, the function will have the given name, otherwise the function name will be taken from \code{\var{code}.co_name}. If ! \var{argdefs} is given, it must be a tuple and will be used to the determine the default values of parameters. \end{funcdesc} --- 28,37 ---- \end{funcdesc} ! \begin{funcdesc}{function}{code, globals\optional{, name\optional{, argdefs}}} Returns a (Python) function with the given code and globals. If \var{name} is given, it must be a string or \code{None}. If it is a string, the function will have the given name, otherwise the function name will be taken from \code{\var{code}.co_name}. If ! \var{argdefs} is given, it must be a tuple and will be used to determine the default values of parameters. \end{funcdesc} Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -r1.57 -r1.58 *** libre.tex 2000/10/06 19:59:22 1.57 --- libre.tex 2000/10/10 22:00:03 1.58 *************** *** 181,185 **** be matched later in the string with the \regexp{\e \var{number}} special sequence, described below. To match the literals \character{(} or ! \character{')}, use \regexp{\e(} or \regexp{\e)}, or enclose them inside a character class: \regexp{[(] [)]}. --- 181,185 ---- be matched later in the string with the \regexp{\e \var{number}} special sequence, described below. To match the literals \character{(} or ! \character{)}, use \regexp{\e(} or \regexp{\e)}, or enclose them inside a character class: \regexp{[(] [)]}. Index: libsite.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsite.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** libsite.tex 2000/09/14 20:24:16 1.19 --- libsite.tex 2000/10/10 22:00:03 1.20 *************** *** 23,27 **** \file{lib/site-python} (on \UNIX{}). For each of the distinct head-tail combinations, it sees if it refers to an existing directory, ! and if so, adds to \code{sys.path}, and also inspected for path configuration files. \indexii{site-python}{directory} --- 23,27 ---- \file{lib/site-python} (on \UNIX{}). For each of the distinct head-tail combinations, it sees if it refers to an existing directory, ! and if so, adds to \code{sys.path}, and also inspects the path for configuration files. \indexii{site-python}{directory} Index: libuserdict.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuserdict.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libuserdict.tex 2000/10/10 20:58:48 1.18 --- libuserdict.tex 2000/10/10 22:00:03 1.19 *************** *** 14,18 **** \begin{classdesc}{UserDict}{\optional{initialdata}} ! Return a class instance that simulates a dictionary. The instance's contents are kept in a regular dictionary, which is accessible via the \member{data} attribute of \class{UserDict} instances. If --- 14,18 ---- \begin{classdesc}{UserDict}{\optional{initialdata}} ! Class that simulates a dictionary. The instance's contents are kept in a regular dictionary, which is accessible via the \member{data} attribute of \class{UserDict} instances. If *************** *** 48,52 **** \begin{classdesc}{UserList}{\optional{list}} ! Return a class instance that simulates a list. The instance's contents are kept in a regular list, which is accessible via the \member{data} attribute of \class{UserList} instances. The instance's --- 48,52 ---- \begin{classdesc}{UserList}{\optional{list}} ! Class that simulates a list. The instance's contents are kept in a regular list, which is accessible via the \member{data} attribute of \class{UserList} instances. The instance's *************** *** 105,109 **** \begin{classdesc}{UserString}{\optional{sequence}} ! Return a class instance that simulates a string or a Unicode string object. The instance's content is kept in a regular string or Unicode string object, which is accessible via the \member{data} attribute of --- 105,109 ---- \begin{classdesc}{UserString}{\optional{sequence}} ! Class that simulates a string or a Unicode string object. The instance's content is kept in a regular string or Unicode string object, which is accessible via the \member{data} attribute of Index: libxmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxmllib.tex,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** libxmllib.tex 2000/10/02 22:14:09 1.28 --- libxmllib.tex 2000/10/10 22:00:03 1.29 *************** *** 275,279 **** mentioned element is treated as if the tag name were \code{'http://www.w3.org/TR/REC-html40 a'} and the attribute name as ! if it were \code{'http://www.w3.org/TR/REC-html40 src'}. An older draft of the XML Namespaces proposal is also recognized, but --- 275,279 ---- mentioned element is treated as if the tag name were \code{'http://www.w3.org/TR/REC-html40 a'} and the attribute name as ! if it were \code{'http://www.w3.org/TR/REC-html40 href'}. An older draft of the XML Namespaces proposal is also recognized, but From python-dev@python.org Tue Oct 10 23:07:21 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 15:07:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules newmodule.c,2.27,2.28 Message-ID: <200010102207.PAA16712@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv16648 Modified Files: newmodule.c Log Message: Fix the docstring for new.function(). Based on a comment from Detlef Lannert . Index: newmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** newmodule.c 2000/09/01 23:29:26 2.27 --- newmodule.c 2000/10/10 22:07:18 2.28 *************** *** 60,64 **** static char new_function_doc[] = ! "Create a function object from (CODE, GLOBALS, [NAME, ARGDEFS])."; static PyObject * --- 60,64 ---- static char new_function_doc[] = ! "Create a function object from (CODE, GLOBALS, [NAME [, ARGDEFS]])."; static PyObject * From python-dev@python.org Wed Oct 11 08:04:52 2000 From: python-dev@python.org (Tim Peters) Date: Wed, 11 Oct 2000 00:04:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.207,2.208 Message-ID: <200010110704.AAA12861@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv10651/python/dist/src/python Modified Files: ceval.c Log Message: Attempt to fix bogus gcc -Wall warnings reported by Marc-Andre Lemburg, by making the DUP_TOPX code utterly straightforward. This also gets rid of all normal-case internal DUP_TOPX if/branches, and allows replacing one POP() with TOP() in each case, so is a good idea regardless. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.207 retrieving revision 2.208 diff -C2 -r2.207 -r2.208 *** ceval.c 2000/09/26 05:46:01 2.207 --- ceval.c 2000/10/11 07:04:49 2.208 *************** *** 709,727 **** case DUP_TOPX: switch (oparg) { - case 5: - case 4: - case 3: - case 2: case 1: x = POP(); ! if (oparg == 1) break; w = POP(); ! if (oparg == 2) break; v = POP(); ! if (oparg == 3) break; u = POP(); ! if (oparg == 4) break; ! t = POP(); ! break; default: fprintf(stderr, "Invalid argument to DUP_TOPX: %d!\n", oparg); --- 709,777 ---- case DUP_TOPX: switch (oparg) { case 1: + x = TOP(); + Py_INCREF(x); + PUSH(x); + continue; + case 2: x = POP(); ! Py_INCREF(x); ! w = TOP(); ! Py_INCREF(w); ! PUSH(x); ! PUSH(w); ! PUSH(x); ! continue; ! case 3: ! x = POP(); ! Py_INCREF(x); w = POP(); ! Py_INCREF(w); ! v = TOP(); ! Py_INCREF(v); ! PUSH(w); ! PUSH(x); ! PUSH(v); ! PUSH(w); ! PUSH(x); ! continue; ! case 4: ! x = POP(); ! Py_INCREF(x); ! w = POP(); ! Py_INCREF(w); ! v = POP(); ! Py_INCREF(v); ! u = TOP(); ! Py_INCREF(u); ! PUSH(v); ! PUSH(w); ! PUSH(x); ! PUSH(u); ! PUSH(v); ! PUSH(w); ! PUSH(x); ! continue; ! case 5: ! x = POP(); ! Py_INCREF(x); ! w = POP(); ! Py_INCREF(w); v = POP(); ! Py_INCREF(v); u = POP(); ! Py_INCREF(u); ! t = TOP(); ! Py_INCREF(t); ! PUSH(u); ! PUSH(v); ! PUSH(w); ! PUSH(x); ! PUSH(t); ! PUSH(u); ! PUSH(v); ! PUSH(w); ! PUSH(x); ! continue; default: fprintf(stderr, "Invalid argument to DUP_TOPX: %d!\n", oparg); *************** *** 729,755 **** "invalid argument to DUP_TOPX"); x = NULL; - } - if (x == NULL) break; - switch (oparg) { - case 5: PUSH(t); - Py_INCREF(t); /* Fallthrough */ - case 4: PUSH(u); - Py_INCREF(u); /* Fallthrough */ - case 3: PUSH(v); - Py_INCREF(v); /* Fallthrough */ - case 2: PUSH(w); - Py_INCREF(w); /* Fallthrough */ - case 1: PUSH(x); - Py_INCREF(x); /* Fallthrough */ - } - switch (oparg) { - case 5: PUSH(t); /* Fallthrough */ - case 4: PUSH(u); /* Fallthrough */ - case 3: PUSH(v); /* Fallthrough */ - case 2: PUSH(w); /* Fallthrough */ - case 1: PUSH(x); /* Fallthrough */ } ! continue; case UNARY_POSITIVE: --- 779,785 ---- "invalid argument to DUP_TOPX"); x = NULL; break; } ! break; case UNARY_POSITIVE: From python-dev@python.org Wed Oct 11 14:54:10 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 06:54:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.208,2.209 Message-ID: <200010111354.GAA24231@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv24175 Modified Files: ceval.c Log Message: Remove the last gcc -Wall warning about possible use of an uninitialized variable. w should be initialized before entering the bytecode interpretation loop since we only need one initialization to satisfy the compiler. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.208 retrieving revision 2.209 diff -C2 -r2.208 -r2.209 *** ceval.c 2000/10/11 07:04:49 2.208 --- ceval.c 2000/10/11 13:54:07 2.209 *************** *** 579,582 **** --- 579,583 ---- err = 0; x = Py_None; /* Not a reference, just anything non-NULL */ + w = NULL; for (;;) { From python-dev@python.org Wed Oct 11 18:18:15 2000 From: python-dev@python.org (Trent Mick) Date: Wed, 11 Oct 2000 10:18:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pythonrun.h,2.36,2.37 Message-ID: <200010111718.KAA28610@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv27127/Include Modified Files: pythonrun.h Log Message: Use suggested workaround for PyOS_CheckStack causing failure of test_[s]re.py on Win64. This closes bug http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=116516 Index: pythonrun.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythonrun.h,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** pythonrun.h 2000/09/16 16:31:31 2.36 --- pythonrun.h 2000/10/11 17:18:11 2.37 *************** *** 89,93 **** #define PYOS_STACK_MARGIN 2048 ! #if defined(WIN32) && defined(_MSC_VER) /* Enable stack checking under Microsoft C */ #define USE_STACKCHECK --- 89,93 ---- #define PYOS_STACK_MARGIN 2048 ! #if defined(WIN32) && !defined(MS_WIN64) && defined(_MSC_VER) /* Enable stack checking under Microsoft C */ #define USE_STACKCHECK From python-dev@python.org Wed Oct 11 19:56:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 11:56:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libzipfile.tex,1.7,1.8 Message-ID: <200010111856.LAA12821@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12719 Modified Files: libzipfile.tex Log Message: Make sure methods of ZipFile objects are in alphabetical order; the logical groupings are still maintained. Based on a comment by Steve Holden . Index: libzipfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzipfile.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libzipfile.tex 2000/10/06 15:29:56 1.7 --- libzipfile.tex 2000/10/11 18:56:00 1.8 *************** *** 112,123 **** \end{methoddesc} - \begin{methoddesc}{namelist}{} - Return a list of archive members by name. - \end{methoddesc} - \begin{methoddesc}{infolist}{} Return a list containing a \class{ZipInfo} object for each member of the archive. The objects are in the same order as their entries in the actual ZIP file on disk if an existing archive was opened. \end{methoddesc} --- 112,123 ---- \end{methoddesc} \begin{methoddesc}{infolist}{} Return a list containing a \class{ZipInfo} object for each member of the archive. The objects are in the same order as their entries in the actual ZIP file on disk if an existing archive was opened. + \end{methoddesc} + + \begin{methoddesc}{namelist}{} + Return a list of archive members by name. \end{methoddesc} From python-dev@python.org Wed Oct 11 22:26:06 2000 From: python-dev@python.org (Barry Warsaw) Date: Wed, 11 Oct 2000 14:26:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_grammar.py,1.18,1.19 Message-ID: <200010112126.OAA06520@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv6445 Modified Files: test_grammar.py Log Message: Added test cases for extended printing to an instance. This picked up a bug in JPython where the instance had to have a flush() method. Index: test_grammar.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_grammar.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** test_grammar.py 2000/09/19 20:59:05 1.18 --- test_grammar.py 2000/10/11 21:26:03 1.19 *************** *** 269,276 **** print >> sys.stdout, 0 or 1 ! # test print >> None class Gulp: def write(self, msg): pass def driver(): oldstdout = sys.stdout --- 269,284 ---- print >> sys.stdout, 0 or 1 ! # test printing to an instance class Gulp: def write(self, msg): pass + gulp = Gulp() + print >> gulp, 1, 2, 3 + print >> gulp, 1, 2, 3, + print >> gulp + print >> gulp, 0 or 1, 0 or 1, + print >> gulp, 0 or 1 + + # test print >> None def driver(): oldstdout = sys.stdout From python-dev@python.org Wed Oct 11 22:34:56 2000 From: python-dev@python.org (Guido van Rossum) Date: Wed, 11 Oct 2000 14:34:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_StringIO.py,1.3,1.4 Message-ID: <200010112134.OAA13930@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv13878 Modified Files: test_StringIO.py Log Message: Jack Jansen reported that the regression test failed on the Mac where string.letters was much more than expected. Solution: explicit is better than implicit; don't rely on string.letters. Index: test_StringIO.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_StringIO.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_StringIO.py 2000/10/06 19:21:32 1.3 --- test_StringIO.py 2000/10/11 21:34:53 1.4 *************** *** 1,8 **** # Tests StringIO and cStringIO - import string - def do_test(module): ! s = (string.letters+'\n')*5 f = module.StringIO(s) print f.read(10) --- 1,6 ---- # Tests StringIO and cStringIO def do_test(module): ! s = ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+'\n')*5 f = module.StringIO(s) print f.read(10) From python-dev@python.org Wed Oct 11 22:44:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 14:44:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules dlmodule.c,2.14,2.15 Message-ID: <200010112144.OAA20776@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv20717 Modified Files: dlmodule.c Log Message: Remove one more gcc -Wall warning. Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** dlmodule.c 2000/09/13 16:26:10 2.14 --- dlmodule.c 2000/10/11 21:44:02 2.15 *************** *** 71,75 **** { PyObject *name; ! long (*func)(); long alist[10]; long res; --- 71,76 ---- { PyObject *name; ! long (*func)(long, long, long, long, long, ! long, long, long, long, long); long alist[10]; long res; From python-dev@python.org Wed Oct 11 22:53:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 14:53:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mpzmodule.c,2.33,2.34 Message-ID: <200010112153.OAA27782@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27710 Modified Files: mpzmodule.c Log Message: Another gcc -Wall warning squashed: MPZ_divm(): Initialize mpzden to NULL, since it could be Py_XDECREF()ed without being initialized. Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** mpzmodule.c 2000/09/01 23:29:26 2.33 --- mpzmodule.c 2000/10/11 21:53:34 2.34 *************** *** 1210,1214 **** { PyObject *num, *den, *mod; ! mpzobject *mpznum, *mpzden, *mpzmod = NULL; mpzobject *z = NULL; --- 1210,1214 ---- { PyObject *num, *den, *mod; ! mpzobject *mpznum, *mpzden = NULL, *mpzmod = NULL; mpzobject *z = NULL; From python-dev@python.org Wed Oct 11 23:16:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 15:16:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib copy_reg.py,1.3,1.4 Message-ID: <200010112216.PAA15388@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15338 Modified Files: copy_reg.py Log Message: In the module docstring, clarify that this is used to register pickle support for extension types, not classes. pickle(): If the type is a class or if the reduction function is not callable, raise a TypeError. constructor(): If the constructor is not callable, raise TypeError. This (partially) closes SourceForge patch #101859. Index: copy_reg.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/copy_reg.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** copy_reg.py 2000/02/02 15:10:13 1.3 --- copy_reg.py 2000/10/11 22:16:45 1.4 *************** *** 1,8 **** ! """Helper to provide extensibility for pickle/cPickle.""" dispatch_table = {} safe_constructors = {} ! def pickle(ob_type, pickle_function, constructor_ob = None): dispatch_table[ob_type] = pickle_function --- 1,19 ---- ! """Helper to provide extensibility for pickle/cPickle. + This is only useful to add pickle support for extension types defined in + C, not for instances of user-defined classes. + """ + + from types import ClassType as _ClassType + dispatch_table = {} safe_constructors = {} ! def pickle(ob_type, pickle_function, constructor_ob=None): ! if type(ob_type) is _ClassType: ! raise TypeError("copy_reg is not intended for use with classes") ! ! if not callable(pickle_function): ! raise TypeError("reduction functions must be callable") dispatch_table[ob_type] = pickle_function *************** *** 11,14 **** --- 22,27 ---- def constructor(object): + if not callable(object): + raise TypeError("constructors must be callable") safe_constructors[object] = 1 *************** *** 19,21 **** pickle(type(1j), pickle_complex, complex) - --- 32,33 ---- From python-dev@python.org Wed Oct 11 23:17:38 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 15:17:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_copy_reg,NONE,1.1 Message-ID: <200010112217.PAA15971@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv15912/test/output Added Files: test_copy_reg Log Message: Test the exception-raising for error cases in copy_reg. --- NEW FILE --- test_copy_reg Caught expected TypeError: copy_reg is not intended for use with classes Caught expected TypeError: reduction functions must be callable Caught expected TypeError: constructors must be callable From python-dev@python.org Wed Oct 11 23:17:38 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 15:17:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_copy_reg.py,NONE,1.1 Message-ID: <200010112217.PAA15966@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv15912/test Added Files: test_copy_reg.py Log Message: Test the exception-raising for error cases in copy_reg. --- NEW FILE --- import copy_reg class C: pass try: copy_reg.pickle(C, None, None) except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch expected TypeError when registering a class type." print try: copy_reg.pickle(type(1), "not a callable") except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch TypeError " \ "when registering a non-callable reduction function." print try: copy_reg.pickle(type(1), int, "not a callable") except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch TypeError " \ "when registering a non-callable constructor." From python-dev@python.org Wed Oct 11 23:27:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 15:27:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcopyreg.tex,1.8,1.9 Message-ID: <200010112227.PAA24446@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24396/lib Modified Files: libcopyreg.tex Log Message: Document the exceptions that now get raised on invalid parameters. Index: libcopyreg.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcopyreg.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libcopyreg.tex 2000/10/10 18:36:02 1.8 --- libcopyreg.tex 2000/10/11 22:27:51 1.9 *************** *** 16,20 **** \begin{funcdesc}{constructor}{object} ! Declares \var{object} to be a valid constructor. \end{funcdesc} --- 16,22 ---- \begin{funcdesc}{constructor}{object} ! Declares \var{object} to be a valid constructor. If \var{object} is ! not callable (and hence not valid as a constructor), raises ! \exception{TypeError}. \end{funcdesc} *************** *** 26,29 **** callable object which can be used to reconstruct the object when called with the tuple of arguments returned by \var{function} at ! pickling time. \end{funcdesc} --- 28,32 ---- callable object which can be used to reconstruct the object when called with the tuple of arguments returned by \var{function} at ! pickling time. \exception{TypeError} will be raised if ! \var{object} is a class or \var{constructor} is not callable. \end{funcdesc} From python-dev@python.org Wed Oct 11 23:34:07 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Wed, 11 Oct 2000 15:34:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom pulldom.py,1.8,1.9 Message-ID: <200010112234.PAA29692@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv29462 Modified Files: pulldom.py Log Message: Added non-ns start and end element methods. Moved appendChild calls from DOMEventStream to PullDOM (parser indep). Removed duplicated sibling pointer setting (duplicated in appendChild). Index: pulldom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** pulldom.py 2000/10/06 22:36:03 1.8 --- pulldom.py 2000/10/11 22:34:04 1.9 *************** *** 52,59 **** parent = self.curNode node.parentNode = parent - if parent.childNodes: - node.previousSibling = parent.childNodes[-1] - node.previousSibling.nextSibling = node self.curNode = node --- 52,57 ---- parent = self.curNode + parent.appendChild(node) node.parentNode = parent self.curNode = node *************** *** 69,79 **** self.curNode = node.parentNode def comment(self, s): node = self.document.createComment(s) parent = self.curNode node.parentNode = parent - if parent.childNodes: - node.previousSibling = parent.childNodes[-1] - node.previousSibling.nextSibling = node self.lastEvent[1] = [(COMMENT, node), None] self.lastEvent = self.lastEvent[1] --- 67,99 ---- self.curNode = node.parentNode + def startElement(self, name, attrs): + node = self.document.createElement(name) + + for aname,value in attrs.items(): + attr = self.document.createAttribute(aname) + attr.value = value + node.setAttributeNode(attr) + + parent = self.curNode + parent.appendChild(node) + node.parentNode = parent + self.curNode = node + + self.lastEvent[1] = [(START_ELEMENT, node), None] + self.lastEvent = self.lastEvent[1] + #self.events.append((START_ELEMENT, node)) + + def endElement(self, name): + node = self.curNode + self.lastEvent[1] = [(END_ELEMENT, node), None] + self.lastEvent = self.lastEvent[1] + #self.events.append((END_ELEMENT, node)) + self.curNode = node.parentNode + def comment(self, s): node = self.document.createComment(s) parent = self.curNode + parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(COMMENT, node), None] self.lastEvent = self.lastEvent[1] *************** *** 82,92 **** def processingInstruction(self, target, data): node = self.document.createProcessingInstruction(target, data) - #self.appendChild(node) parent = self.curNode node.parentNode = parent - if parent.childNodes: - node.previousSibling = parent.childNodes[-1] - node.previousSibling.nextSibling = node self.lastEvent[1] = [(PROCESSING_INSTRUCTION, node), None] self.lastEvent = self.lastEvent[1] --- 102,109 ---- def processingInstruction(self, target, data): node = self.document.createProcessingInstruction(target, data) parent = self.curNode + parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(PROCESSING_INSTRUCTION, node), None] self.lastEvent = self.lastEvent[1] *************** *** 96,103 **** node = self.document.createTextNode(chars[start:start + length]) parent = self.curNode node.parentNode = parent - if parent.childNodes: - node.previousSibling = parent.childNodes[-1] - node.previousSibling.nextSibling = node self.lastEvent[1] = [(IGNORABLE_WHITESPACE, node), None] self.lastEvent = self.lastEvent[1] --- 113,118 ---- node = self.document.createTextNode(chars[start:start + length]) parent = self.curNode + parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(IGNORABLE_WHITESPACE, node), None] self.lastEvent = self.lastEvent[1] *************** *** 106,110 **** def characters(self, chars): node = self.document.createTextNode(chars) ! node.parentNode = self.curNode self.lastEvent[1] = [(CHARACTERS, node), None] self.lastEvent = self.lastEvent[1] --- 121,127 ---- def characters(self, chars): node = self.document.createTextNode(chars) ! parent = self.curNode ! parent.appendChild(node) ! node.parentNode = parent self.lastEvent[1] = [(CHARACTERS, node), None] self.lastEvent = self.lastEvent[1] *************** *** 161,166 **** if cur_node is node: return - if token != END_ELEMENT: - cur_node.parentNode.appendChild(cur_node) event = self.getEvent() --- 178,181 ---- From python-dev@python.org Wed Oct 11 23:35:04 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Wed, 11 Oct 2000 15:35:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax saxutils.py,1.10,1.11 Message-ID: <200010112235.PAA30477@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv30249 Modified Files: saxutils.py Log Message: Added parent attribute with getters and setters on XMLFilterBase. Index: saxutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/saxutils.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** saxutils.py 2000/10/06 21:11:20 1.10 --- saxutils.py 2000/10/11 22:35:00 1.11 *************** *** 105,108 **** --- 105,112 ---- through.""" + def __init__(self, parent = None): + xmlreader.XMLReader.__init__(self) + self._parent = parent + # ErrorHandler methods *************** *** 193,196 **** --- 197,208 ---- def setProperty(self, name, value): self._parent.setProperty(name, value) + + # XMLFilter methods + + def getParent(self): + return self._parent + + def setParent(self, parent): + self._parent = parent # --- Utility functions From python-dev@python.org Wed Oct 11 23:36:03 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Wed, 11 Oct 2000 15:36:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.10,1.11 Message-ID: <200010112236.PAA31178@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv30818 Modified Files: test_minidom.py Log Message: Added additional test cases for pulldom modifications. Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** test_minidom.py 2000/10/09 19:57:38 1.10 --- test_minidom.py 2000/10/11 22:35:59 1.11 *************** *** 309,313 **** --- 309,379 ---- def testClonePIDeep(): pass + def testSiblings(): + doc = parseString("text?") + root = doc.documentElement + (pi, text, elm) = root.childNodes + confirm(pi.nextSibling is text and + pi.previousSibling is None and + text.nextSibling is elm and + text.previousSibling is pi and + elm.nextSibling is None and + elm.previousSibling is text, "testSiblings") + + doc.unlink() + + def testParents(): + doc = parseString("") + root = doc.documentElement + elm1 = root.childNodes[0] + (elm2a, elm2b) = elm1.childNodes + elm3 = elm2b.childNodes[0] + + confirm(root.parentNode is doc and + elm1.parentNode is root and + elm2a.parentNode is elm1 and + elm2b.parentNode is elm1 and + elm3.parentNode is elm2b, "testParents") + + doc.unlink() + + def testNonNSElements(): + from xml.dom import pulldom + + pulldom = pulldom.PullDOM() + pulldom.startDocument() + pulldom.startElement("doc", {}) + pulldom.characters("text") + pulldom.startElement("subelm", {}) + pulldom.characters("text") + pulldom.endElement("subelm") + pulldom.characters("text") + pulldom.endElement("doc") + pulldom.endDocument() + + doc = pulldom.document + root = doc.documentElement + (text1, elm1, text2) = root.childNodes + text3 = elm1.childNodes[0] + + confirm(text1.previousSibling is None and + text1.nextSibling is elm1 and + elm1.previousSibling is text1 and + elm1.nextSibling is text2 and + text2.previousSibling is elm1 and + text2.nextSibling is None and + text3.previousSibling is None and + text3.nextSibling is None, "testNonNSElements - siblings") + + confirm(root.parentNode is doc and + text1.parentNode is root and + elm1.parentNode is root and + text2.parentNode is root and + text3.parentNode is elm1, "testNonNSElements - parents") + + doc.unlink() + + # --- MAIN PROGRAM + names=globals().keys() names.sort() From python-dev@python.org Wed Oct 11 23:36:03 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Wed, 11 Oct 2000 15:36:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,1.7,1.8 Message-ID: <200010112236.PAA31179@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv30818/output Modified Files: test_minidom Log Message: Added additional test cases for pulldom modifications. Index: test_minidom =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_minidom,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** test_minidom 2000/10/09 19:57:39 1.7 --- test_minidom 2000/10/11 22:36:00 1.8 *************** *** 111,118 **** --- 111,125 ---- Test Succeeded testInsertBefore Passed assertion: len(Node.allnodes) == 0 + Passed testNonNSElements - siblings + Passed testNonNSElements - parents + Test Succeeded testNonNSElements + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testNonZero Passed assertion: len(Node.allnodes) == 0 + Passed testParents + Test Succeeded testParents + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParse Passed assertion: len(Node.allnodes) == 0 *************** *** 149,152 **** --- 156,162 ---- Passed assertion: len(Node.allnodes) == 0 Test Succeeded testSetAttrValueandNodeValue + Passed assertion: len(Node.allnodes) == 0 + Passed testSiblings + Test Succeeded testSiblings Passed assertion: len(Node.allnodes) == 0 Test Succeeded testTextNodeRepr From python-dev@python.org Thu Oct 12 00:20:26 2000 From: python-dev@python.org (Thomas Wouters) Date: Wed, 11 Oct 2000 16:20:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.209,2.210 Message-ID: <200010112320.QAA00403@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv31960/Python Modified Files: ceval.c Log Message: Adjust debugging code in the implementation of the DUP_TOPX bytecode, use Py_FatalError() instead, and clarify the message somewhat. As discussed on python-dev. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.209 retrieving revision 2.210 diff -C2 -r2.209 -r2.210 *** ceval.c 2000/10/11 13:54:07 2.209 --- ceval.c 2000/10/11 23:20:09 2.210 *************** *** 776,784 **** continue; default: ! fprintf(stderr, "Invalid argument to DUP_TOPX: %d!\n", oparg); ! PyErr_SetString(PyExc_SystemError, ! "invalid argument to DUP_TOPX"); ! x = NULL; ! break; } break; --- 776,780 ---- continue; default: ! Py_FatalError("invalid argument to DUP_TOPX (bytecode corruption?)"); } break; From python-dev@python.org Thu Oct 12 00:26:15 2000 From: python-dev@python.org (Thomas Wouters) Date: Wed, 11 Oct 2000 16:26:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.210,2.211 Message-ID: <200010112326.QAA03041@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv2557/Python Modified Files: ceval.c Log Message: Do a better job at staying on-screen :P (Sorry, it's late here.) I'm assuming here that the ANSI-C adjacent-string-concatenation technique is allowable, now that Python requires an ANSI C compiler. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.210 retrieving revision 2.211 diff -C2 -r2.210 -r2.211 *** ceval.c 2000/10/11 23:20:09 2.210 --- ceval.c 2000/10/11 23:26:11 2.211 *************** *** 776,780 **** continue; default: ! Py_FatalError("invalid argument to DUP_TOPX (bytecode corruption?)"); } break; --- 776,781 ---- continue; default: ! Py_FatalError("invalid argument to DUP_TOPX" ! " (bytecode corruption?)"); } break; From python-dev@python.org Thu Oct 12 07:10:27 2000 From: python-dev@python.org (Tim Peters) Date: Wed, 11 Oct 2000 23:10:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_math.py,1.5,1.6 Message-ID: <200010120610.XAA16919@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv13972/python/dist/src/Lib/test Modified Files: test_math.py Log Message: Stop raising OverflowError on underflows reported by libm (errno==ERANGE and libm result is 0). Cautiously add a few libm exception test cases: 1. That exp(-huge) returns 0 without exception. 2. That exp(+huge) triggers OverflowError. 3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked with -lieee, it was raising OverflowError due to an accident of the way mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc). Index: test_math.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_math.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_math.py 2000/08/10 04:23:30 1.5 --- test_math.py 2000/10/12 06:10:24 1.6 *************** *** 153,154 **** --- 153,183 ---- testit('tanh(0)', math.tanh(0), 0) testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) + + print 'exceptions' # oooooh, *this* is a x-platform gamble! good luck + + try: + x = math.exp(-1000000000) + except: + # mathmodule.c is failing to weed out underflows from libm, or + # we've got an fp format with huge dynamic range + raise TestFailed("underflowing exp() should not have rasied an exception") + if x != 0: + raise TestFailed("underflowing exp() should have returned 0") + + # If this fails, probably using a strict IEEE-754 conforming libm, and x + # is +Inf afterwards. But Python wants overflows detected by default. + try: + x = math.exp(1000000000) + except OverflowError: + pass + else: + raise TestFailed("overflowing exp() didn't trigger OverflowError") + + # If this fails, it could be a puzzle. One odd possibility is that + # mathmodule.c's CHECK() macro is getting confused while comparing + # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE + # as a result (and so raising OverflowError instead). + try: + x = math.sqrt(-1.0) + except ValueError: + pass From python-dev@python.org Thu Oct 12 07:10:27 2000 From: python-dev@python.org (Tim Peters) Date: Wed, 11 Oct 2000 23:10:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_math,1.3,1.4 Message-ID: <200010120610.XAA16923@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv13972/python/dist/src/Lib/test/output Modified Files: test_math Log Message: Stop raising OverflowError on underflows reported by libm (errno==ERANGE and libm result is 0). Cautiously add a few libm exception test cases: 1. That exp(-huge) returns 0 without exception. 2. That exp(+huge) triggers OverflowError. 3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked with -lieee, it was raising OverflowError due to an accident of the way mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc). Index: test_math =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_math,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_math 2000/08/10 04:23:30 1.3 --- test_math 2000/10/12 06:10:25 1.4 *************** *** 25,26 **** --- 25,27 ---- tan tanh + exceptions From python-dev@python.org Thu Oct 12 07:10:28 2000 From: python-dev@python.org (Tim Peters) Date: Wed, 11 Oct 2000 23:10:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.56,2.57 Message-ID: <200010120610.XAA16928@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13972/python/dist/src/Modules Modified Files: mathmodule.c Log Message: Stop raising OverflowError on underflows reported by libm (errno==ERANGE and libm result is 0). Cautiously add a few libm exception test cases: 1. That exp(-huge) returns 0 without exception. 2. That exp(+huge) triggers OverflowError. 3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked with -lieee, it was raising OverflowError due to an accident of the way mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc). Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.56 retrieving revision 2.57 diff -C2 -r2.56 -r2.57 *** mathmodule.c 2000/09/16 03:54:24 2.56 --- mathmodule.c 2000/10/12 06:10:25 2.57 *************** *** 1,3 **** - /* Math module -- standard C math library functions, pi and e */ --- 1,2 ---- *************** *** 19,22 **** --- 18,26 ---- #endif + /* RED_FLAG 12-Oct-2000 Tim + * What CHECK does if errno != 0 and x is a NaN is a platform-dependent crap + * shoot. Most (but not all!) platforms will end up setting errno to ERANGE + * then, but EDOM is probably better. + */ #ifdef HUGE_VAL #define CHECK(x) if (errno != 0) ; \ *************** *** 27,41 **** #endif ! static PyObject * ! math_error(void) { if (errno == EDOM) PyErr_SetString(PyExc_ValueError, "math domain error"); ! else if (errno == ERANGE) ! PyErr_SetString(PyExc_OverflowError, "math range error"); else /* Unexpected math error */ PyErr_SetFromErrno(PyExc_ValueError); ! return NULL; } --- 31,63 ---- #endif ! /* Call is_error when errno != 0, and where x is the result libm ! * returned. is_error will usually set up an exception and return ! * true (1), but may return false (0) without setting up an exception. ! */ ! static int ! is_error(double x) { + int result = 1; /* presumption of guilt */ if (errno == EDOM) PyErr_SetString(PyExc_ValueError, "math domain error"); ! else if (errno == ERANGE) { ! /* ANSI C generally requires libm functions to set ERANGE ! * on overflow, but also generally *allows* them to set ! * ERANGE on underflow too. There's no consistency about ! * the latter across platforms. Here we suppress the ! * underflow errors (libm functions should return a zero ! * on underflow, and +- HUGE_VAL on overflow, so testing ! * the result for zero suffices to distinguish the cases). ! */ ! if (x) ! PyErr_SetString(PyExc_OverflowError, ! "math range error"); ! else ! result = 0; ! } else /* Unexpected math error */ PyErr_SetFromErrno(PyExc_ValueError); ! return result; } *************** *** 51,56 **** PyFPE_END_PROTECT(x) CHECK(x); ! if (errno != 0) ! return math_error(); else return PyFloat_FromDouble(x); --- 73,78 ---- PyFPE_END_PROTECT(x) CHECK(x); ! if (errno && is_error(x)) ! return NULL; else return PyFloat_FromDouble(x); *************** *** 68,73 **** PyFPE_END_PROTECT(x) CHECK(x); ! if (errno != 0) ! return math_error(); else return PyFloat_FromDouble(x); --- 90,95 ---- PyFPE_END_PROTECT(x) CHECK(x); ! if (errno && is_error(x)) ! return NULL; else return PyFloat_FromDouble(x); *************** *** 144,150 **** x = frexp(x, &i); CHECK(x); ! if (errno != 0) ! return math_error(); ! return Py_BuildValue("(di)", x, i); } --- 166,173 ---- x = frexp(x, &i); CHECK(x); ! if (errno && is_error(x)) ! return NULL; ! else ! return Py_BuildValue("(di)", x, i); } *************** *** 169,174 **** PyFPE_END_PROTECT(x) CHECK(x); ! if (errno != 0) ! return math_error(); else return PyFloat_FromDouble(x); --- 192,197 ---- PyFPE_END_PROTECT(x) CHECK(x); ! if (errno && is_error(x)) ! return NULL; else return PyFloat_FromDouble(x); *************** *** 198,204 **** #endif CHECK(x); ! if (errno != 0) ! return math_error(); ! return Py_BuildValue("(dd)", x, y); } --- 221,228 ---- #endif CHECK(x); ! if (errno && is_error(x)) ! return NULL; ! else ! return Py_BuildValue("(dd)", x, y); } From python-dev@python.org Thu Oct 12 08:15:57 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 12 Oct 2000 00:15:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_math.py,1.6,1.7 Message-ID: <200010120715.AAA01500@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv1071/python/dist/src/lib/test Modified Files: test_math.py Log Message: A Mystery: I somehow managed to delete the last two lines of my test_math.py changes. Here restoring them. Index: test_math.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_math.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_math.py 2000/10/12 06:10:24 1.6 --- test_math.py 2000/10/12 07:15:55 1.7 *************** *** 182,183 **** --- 182,185 ---- except ValueError: pass + else: + raise TestFailed("sqrt(-1) didn't raise ValueError") From python-dev@python.org Thu Oct 12 15:46:03 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 12 Oct 2000 07:46:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unpack.py,1.3,1.4 Message-ID: <200010121446.HAA12554@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv12506 Modified Files: test_unpack.py Log Message: Added some single tuple/list unpacking for JPython regression testing. Index: test_unpack.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unpack.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_unpack.py 2000/08/18 14:50:20 1.3 --- test_unpack.py 2000/10/12 14:45:58 1.4 *************** *** 48,51 **** --- 48,63 ---- raise TestFailed + # single element unpacking, with extra syntax + if verbose: + print 'unpack single tuple/list' + st = (99,) + sl = [100] + a, = st + if a <> 99: + raise TestFailed + b, = sl + if b <> 100: + raise TestFailed + # now for some failures From python-dev@python.org Thu Oct 12 17:01:59 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:01:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_fcntl.py,1.10,1.11 Message-ID: <200010121601.JAA09256@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv9194 Modified Files: test_fcntl.py Log Message: Anonymous patch to add Darwin 1.2 to the list of BSDs. Let's hope this is correct (I'm not sure why the sys.platform would be 'Darwin1.2' rather than 'darwin1', which seems to be the convention). Someone with Darwin please test this! Index: test_fcntl.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_fcntl.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** test_fcntl.py 2000/09/26 00:31:18 1.10 --- test_fcntl.py 2000/10/12 16:01:55 1.11 *************** *** 17,21 **** print 'Status from fnctl with O_NONBLOCK: ', rv ! if sys.platform in ('netbsd1', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4', --- 17,21 ---- print 'Status from fnctl with O_NONBLOCK: ', rv ! if sys.platform in ('netbsd1', 'Darwin1.2', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4', From python-dev@python.org Thu Oct 12 17:13:51 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:13:51 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.34,1.35 Message-ID: <200010121613.JAA18502@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv18458 Modified Files: pep-0042.txt Log Message: Pleas for Unicode support in (e.g.) urllib.quote(). Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** pep-0042.txt 2000/10/07 15:53:43 1.34 --- pep-0042.txt 2000/10/12 16:13:48 1.35 *************** *** 191,194 **** --- 191,201 ---- [No bug report; I just thought of this.] + - More standard library routines should support Unicode. For + example, urllib.quote() could convert Unicode strings to UTF-8 + and then do the usual %HH conversion. But this is not the only + one! + + http://sourceforge.net/bugs/?func=detailbug&bug_id=116716&group_id=5470 + Tools From python-dev@python.org Thu Oct 12 17:17:39 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:17:39 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.35,1.36 Message-ID: <200010121617.JAA21606@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv21565 Modified Files: pep-0042.txt Log Message: Wish about dependent buffer objects. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** pep-0042.txt 2000/10/12 16:13:48 1.35 --- pep-0042.txt 2000/10/12 16:17:36 1.36 *************** *** 73,76 **** --- 73,84 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=115555&group_id=5470 + - The buffer interface could be smarter when a buffer object is + created that depends on another buffer object -- if the + original buffer object has no base, the depending object will + have no base either. It could be argued that the depending + object should have the original object as a base. Or not. + + http://sourceforge.net/bugs/?func=detailbug&bug_id=116405&group_id=5470 + Standard Library From python-dev@python.org Thu Oct 12 17:45:40 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:45:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib StringIO.py,1.11,1.12 Message-ID: <200010121645.JAA09960@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9919 Modified Files: StringIO.py Log Message: [ Bug #116636 ] Bug in StringIO.write() http://sourceforge.net/bugs/?func=detailbug&bug_id=116636&group_id=5470 bobalex@rsv.ricoh.com Bug report: If the file position is less than the end of the "file", and a write is performed extending past then end of the file, the data string is corrupted. Solution: in write(), when writing past the end, properly set self.len when newpos is > self.len. Index: StringIO.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/StringIO.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** StringIO.py 2000/09/28 04:21:06 1.11 --- StringIO.py 2000/10/12 16:45:37 1.12 *************** *** 130,133 **** --- 130,135 ---- self.buflist = [self.buf[:self.pos], s, self.buf[newpos:]] self.buf = '' + if newpos > self.len: + self.len = newpos else: self.buflist.append(s) From python-dev@python.org Thu Oct 12 17:46:31 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:46:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_StringIO.py,1.4,1.5 Message-ID: <200010121646.JAA10772@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv10725 Modified Files: test_StringIO.py Log Message: Added a test for the StringIO write() error I just fixed. Index: test_StringIO.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_StringIO.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_StringIO.py 2000/10/11 21:34:53 1.4 --- test_StringIO.py 2000/10/12 16:46:28 1.5 *************** *** 9,12 **** --- 9,19 ---- f = module.StringIO() + f.write('abcdef') + f.seek(3) + f.write('uvwxyz') + f.write('!') + print `f.getvalue()` + f.close() + f = module.StringIO() f.write(s) f.seek(10) From python-dev@python.org Thu Oct 12 17:46:31 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:46:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_StringIO,1.3,1.4 Message-ID: <200010121646.JAA10776@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv10725/output Modified Files: test_StringIO Log Message: Added a test for the StringIO write() error I just fixed. Index: test_StringIO =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_StringIO,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_StringIO 2000/10/07 16:58:11 1.3 --- test_StringIO 2000/10/12 16:46:28 1.4 *************** *** 4,7 **** --- 4,8 ---- 2 + 'abcuvwxyz!' 'abcdefghij' 'abcde' *************** *** 12,15 **** --- 13,17 ---- 2 + 'abcuvwxyz!' 'abcdefghij' 'abcde' From python-dev@python.org Thu Oct 12 18:11:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 10:11:41 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.171,1.172 configure,1.163,1.164 Message-ID: <200010121711.KAA00584@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv523 Modified Files: configure.in configure Log Message: When we know the compiler is GCC, always add the -Wall and -Wstrict-prototypes options. This will make it a lot easier to keep warnings under control in the first place in the future. There is one known warning at this time, caught by the -Wstrict-prototypes option. In Modules/main.c, the declaration of getopt() without parameters gets a complaint (rightly) that it is not a proper prototype. The lack of a complete prototype information should be corrected when the right portability conditions have been identified. Approved by the Guido. Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -r1.171 -r1.172 *** configure.in 2000/10/09 20:18:32 1.171 --- configure.in 2000/10/12 17:11:38 1.172 *************** *** 309,314 **** yes) case $ac_cv_prog_cc_g in ! yes) OPT="-g -O2";; ! *) OPT="-O2";; esac ;; --- 309,314 ---- yes) case $ac_cv_prog_cc_g in ! yes) OPT="-g -O2 -Wall -Wstrict-prototypes";; ! *) OPT="-O2 -Wall -Wstrict-prototypes";; esac ;; Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -r1.163 -r1.164 *** configure 2000/10/09 21:48:02 1.163 --- configure 2000/10/12 17:11:38 1.164 *************** *** 4,8 **** # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 4,8 ---- # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. [...4127 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) --- 6031,6035 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6309,6312 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 6335,6338 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 From python-dev@python.org Thu Oct 12 18:14:49 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 10:14:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.113,1.114 Message-ID: <200010121714.KAA03229@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2266 Modified Files: _tkinter.c Log Message: Fix for Bug #116453. Direct use of interp->result is deprecated; changing this to Tcl_GetStringResult(interp) everywhere fixed the problem of losing the error message with TclError exceptions, on Windows. Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -r1.113 -r1.114 *** _tkinter.c 2000/10/06 16:58:26 1.113 --- _tkinter.c 2000/10/12 17:14:46 1.114 *************** *** 210,214 **** #define Tkapp_Check(v) ((v)->ob_type == &Tkapp_Type) #define Tkapp_Interp(v) (((TkappObject *) (v))->interp) ! #define Tkapp_Result(v) (((TkappObject *) (v))->interp->result) #define DEBUG_REFCNT(v) (printf("DEBUG: id=%p, refcnt=%i\n", \ --- 210,214 ---- #define Tkapp_Check(v) ((v)->ob_type == &Tkapp_Type) #define Tkapp_Interp(v) (((TkappObject *) (v))->interp) ! #define Tkapp_Result(v) Tcl_GetStringResult(Tkapp_Interp(v)) #define DEBUG_REFCNT(v) (printf("DEBUG: id=%p, refcnt=%i\n", \ *************** *** 421,429 **** main = Tk_MainWindow(interp); if (Tcl_Init(interp) == TCL_ERROR) { ! PySys_WriteStderr("Tcl_Init error: %s\n", interp->result); return TCL_ERROR; } if (Tk_Init(interp) == TCL_ERROR) { ! PySys_WriteStderr("Tk_Init error: %s\n", interp->result); return TCL_ERROR; } --- 421,429 ---- main = Tk_MainWindow(interp); if (Tcl_Init(interp) == TCL_ERROR) { ! PySys_WriteStderr("Tcl_Init error: %s\n", Tcl_GetStringResult(interp)); return TCL_ERROR; } if (Tk_Init(interp) == TCL_ERROR) { ! PySys_WriteStderr("Tk_Init error: %s\n", Tcl_GetStringResult(interp)); return TCL_ERROR; } *************** *** 740,750 **** if (Py_VerboseFlag >= 2) PySys_WriteStderr("... error: '%s'\n", ! interp->result); Tkinter_Error(self); } else { if (Py_VerboseFlag >= 2) ! PySys_WriteStderr("-> '%s'\n", interp->result); ! res = PyString_FromString(interp->result); } LEAVE_OVERLAP_TCL --- 740,750 ---- if (Py_VerboseFlag >= 2) PySys_WriteStderr("... error: '%s'\n", ! Tcl_GetStringResult(interp)); Tkinter_Error(self); } else { if (Py_VerboseFlag >= 2) ! PySys_WriteStderr("-> '%s'\n", Tcl_GetStringResult(interp)); ! res = PyString_FromString(Tcl_GetStringResult(interp)); } LEAVE_OVERLAP_TCL From python-dev@python.org Thu Oct 12 18:31:41 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 12 Oct 2000 10:31:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.11,1.12 Message-ID: <200010121731.KAA17317@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv16980 Modified Files: test_minidom.py Log Message: cosmetic changes only: use standard Python style for whitespace near = and () Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** test_minidom.py 2000/10/11 22:35:59 1.11 --- test_minidom.py 2000/10/12 17:31:36 1.12 *************** *** 16,20 **** del base ! def confirm( test, testname="Test" ): if test: print "Passed " + testname --- 16,20 ---- del base ! def confirm(test, testname = "Test"): if test: print "Passed " + testname *************** *** 23,43 **** raise Exception ! Node._debug=1 def testParseFromFile(): from StringIO import StringIO ! dom=parse( StringIO( open( tstfile ).read() ) ) dom.unlink() confirm(isinstance(dom,Document)) ! def testGetElementsByTagName( ): ! dom=parse( tstfile ) ! confirm( dom.getElementsByTagName( "LI" )==\ ! dom.documentElement.getElementsByTagName( "LI" ) ) dom.unlink() ! def testInsertBefore( ): ! dom=parse( tstfile ) ! docel=dom.documentElement #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[1]) --- 23,43 ---- raise Exception ! Node._debug = 1 def testParseFromFile(): from StringIO import StringIO ! dom = parse(StringIO(open(tstfile).read())) dom.unlink() confirm(isinstance(dom,Document)) ! def testGetElementsByTagName(): ! dom = parse(tstfile) ! confirm(dom.getElementsByTagName("LI") == \ ! dom.documentElement.getElementsByTagName("LI")) dom.unlink() ! def testInsertBefore(): ! dom = parse(tstfile) ! docel = dom.documentElement #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[1]) *************** *** 46,170 **** # docel.childNodes[0]) ! #confirm( docel.childNodes[0].tet=="a" ) ! #confirm( docel.childNodes[2].tet=="a" ) dom.unlink() def testAppendChild(): ! dom=parse( tstfile ) ! dom.documentElement.appendChild( dom.createComment( u"Hello" )) ! confirm( dom.documentElement.childNodes[-1].nodeName=="#comment" ) ! confirm( dom.documentElement.childNodes[-1].data=="Hello" ) dom.unlink() def testNonZero(): ! dom=parse( tstfile ) ! confirm( dom )# should not be zero ! dom.appendChild( dom.createComment( "foo" ) ) ! confirm( not dom.childNodes[-1].childNodes ) dom.unlink() def testUnlink(): ! dom=parse( tstfile ) dom.unlink() def testElement(): ! dom=Document() ! dom.appendChild( dom.createElement( "abc" ) ) ! confirm( dom.documentElement ) dom.unlink() def testAAA(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam2" ) dom.unlink() def testAAB(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam" ) ! el.setAttribute( "spam", "jam2" ) dom.unlink() def testAddAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! child.setAttribute( "def", "ghi" ) ! confirm( child.getAttribute( "def" )=="ghi" ) ! confirm( child.attributes["def"].value=="ghi" ) ! child.setAttribute( "jkl", "mno" ) ! confirm( child.getAttribute( "jkl" )=="mno" ) ! confirm( child.attributes["jkl"].value=="mno" ) ! confirm( len( child.attributes )==2 ) ! child.setAttribute( "def", "newval" ) ! confirm( child.getAttribute( "def" )=="newval" ) ! confirm( child.attributes["def"].value=="newval" ) ! confirm( len( child.attributes )==2 ) dom.unlink() def testDeleteAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! confirm( len( child.attributes)==0 ) ! child.setAttribute( "def", "ghi" ) ! confirm( len( child.attributes)==1 ) del child.attributes["def"] ! confirm( len( child.attributes)==0 ) dom.unlink() def testRemoveAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! child.setAttribute( "def", "ghi" ) ! confirm( len( child.attributes)==1 ) ! child.removeAttribute("def" ) ! confirm( len( child.attributes)==0 ) dom.unlink() def testRemoveAttrNS(): ! dom=Document() ! child=dom.appendChild( ! dom.createElementNS( "http://www.python.org", "python:abc" ) ) ! child.setAttributeNS( "http://www.w3.org", "xmlns:python", ! "http://www.python.org" ) ! child.setAttributeNS( "http://www.python.org", "python:abcattr", "foo" ) ! confirm( len( child.attributes )==2 ) ! child.removeAttributeNS( "http://www.python.org", "abcattr" ) ! confirm( len( child.attributes )==1 ) dom.unlink() def testRemoveAttributeNode(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "foo" ) ) ! child.setAttribute( "spam", "jam" ) ! confirm( len( child.attributes )==1 ) ! node=child.getAttributeNode( "spam" ) ! child.removeAttributeNode( node ) ! confirm( len( child.attributes )==0 ) dom.unlink() def testChangeAttr(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam" ) ! confirm( len( el.attributes )==1 ) ! el.setAttribute( "spam", "bam" ) ! confirm( len( el.attributes )==1 ) ! el.attributes["spam"]="ham" ! confirm( len( el.attributes )==1 ) ! el.setAttribute( "spam2", "bam" ) ! confirm( len( el.attributes )==2 ) ! el.attributes[ "spam2"]= "bam2" ! confirm( len( el.attributes )==2 ) dom.unlink() --- 46,170 ---- # docel.childNodes[0]) ! #confirm( docel.childNodes[0].tet == "a") ! #confirm( docel.childNodes[2].tet == "a") dom.unlink() def testAppendChild(): ! dom = parse(tstfile) ! dom.documentElement.appendChild(dom.createComment(u"Hello")) ! confirm(dom.documentElement.childNodes[-1].nodeName == "#comment") ! confirm(dom.documentElement.childNodes[-1].data == "Hello") dom.unlink() def testNonZero(): ! dom = parse(tstfile) ! confirm(dom)# should not be zero ! dom.appendChild(dom.createComment("foo")) ! confirm(not dom.childNodes[-1].childNodes) dom.unlink() def testUnlink(): ! dom = parse(tstfile) dom.unlink() def testElement(): ! dom = Document() ! dom.appendChild(dom.createElement("abc")) ! confirm(dom.documentElement) dom.unlink() def testAAA(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam2") dom.unlink() def testAAB(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam") ! el.setAttribute("spam", "jam2") dom.unlink() def testAddAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! child.setAttribute("def", "ghi") ! confirm(child.getAttribute("def") == "ghi") ! confirm(child.attributes["def"].value == "ghi") ! child.setAttribute("jkl", "mno") ! confirm(child.getAttribute("jkl") == "mno") ! confirm(child.attributes["jkl"].value == "mno") ! confirm(len(child.attributes) == 2) ! child.setAttribute("def", "newval") ! confirm(child.getAttribute("def") == "newval") ! confirm(child.attributes["def"].value == "newval") ! confirm(len(child.attributes) == 2) dom.unlink() def testDeleteAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! confirm(len(child.attributes) == 0) ! child.setAttribute("def", "ghi") ! confirm(len(child.attributes) == 1) del child.attributes["def"] ! confirm(len(child.attributes) == 0) dom.unlink() def testRemoveAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! child.setAttribute("def", "ghi") ! confirm(len(child.attributes) == 1) ! child.removeAttribute("def") ! confirm(len(child.attributes) == 0) dom.unlink() def testRemoveAttrNS(): ! dom = Document() ! child = dom.appendChild( ! dom.createElementNS("http://www.python.org", "python:abc")) ! child.setAttributeNS("http://www.w3.org", "xmlns:python", ! "http://www.python.org") ! child.setAttributeNS("http://www.python.org", "python:abcattr", "foo") ! confirm(len(child.attributes) == 2) ! child.removeAttributeNS("http://www.python.org", "abcattr") ! confirm(len(child.attributes) == 1) dom.unlink() def testRemoveAttributeNode(): ! dom = Document() ! child = dom.appendChild(dom.createElement("foo")) ! child.setAttribute("spam", "jam") ! confirm(len(child.attributes) == 1) ! node = child.getAttributeNode("spam") ! child.removeAttributeNode(node) ! confirm(len(child.attributes) == 0) dom.unlink() def testChangeAttr(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam") ! confirm(len(el.attributes) == 1) ! el.setAttribute("spam", "bam") ! confirm(len(el.attributes) == 1) ! el.attributes["spam"] = "ham" ! confirm(len(el.attributes) == 1) ! el.setAttribute("spam2", "bam") ! confirm(len(el.attributes) == 2) ! el.attributes[ "spam2"] = "bam2" ! confirm(len(el.attributes) == 2) dom.unlink() *************** *** 187,225 **** def testElementReprAndStr(): ! dom=Document() ! el=dom.appendChild( dom.createElement( "abc" ) ) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicode(): ! dom=Document() ! el=dom.appendChild( dom.createElement( u"abc" ) ) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicodeNS(): ! dom=Document() ! el=dom.appendChild( ! dom.createElementNS( u"http://www.slashdot.org", u"slash:abc" )) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) ! confirm( string1.find("slash:abc" )!=-1 ) dom.unlink() ! confirm( len( Node.allnodes )==0 ) def testAttributeRepr(): ! dom=Document() ! el=dom.appendChild( dom.createElement( u"abc" ) ) ! node=el.setAttribute( "abc", "def" ) ! confirm( str( node ) == repr( node ) ) dom.unlink() ! confirm( len( Node.allnodes )==0 ) def testTextNodeRepr(): pass --- 187,225 ---- def testElementReprAndStr(): ! dom = Document() ! el = dom.appendChild(dom.createElement("abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicode(): ! dom = Document() ! el = dom.appendChild(dom.createElement(u"abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicodeNS(): ! dom = Document() ! el = dom.appendChild( ! dom.createElementNS(u"http://www.slashdot.org", u"slash:abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) ! confirm(string1.find("slash:abc") != -1) dom.unlink() ! confirm(len(Node.allnodes) == 0) def testAttributeRepr(): ! dom = Document() ! el = dom.appendChild(dom.createElement(u"abc")) ! node = el.setAttribute("abc", "def") ! confirm(str(node) == repr(node)) dom.unlink() ! confirm(len(Node.allnodes) == 0) def testTextNodeRepr(): pass *************** *** 231,235 **** dom.unlink() confirm(str == domstr) ! confirm( len( Node.allnodes )==0 ) def testProcessingInstruction(): pass --- 231,235 ---- dom.unlink() confirm(str == domstr) ! confirm(len(Node.allnodes) == 0) def testProcessingInstruction(): pass *************** *** 376,387 **** # --- MAIN PROGRAM ! names=globals().keys() names.sort() ! works=1 for name in names: ! if name.startswith( "test" ): ! func=globals()[name] try: func() --- 376,387 ---- # --- MAIN PROGRAM ! names = globals().keys() names.sort() ! works = 1 for name in names: ! if name.startswith("test"): ! func = globals()[name] try: func() *************** *** 389,393 **** confirm(len(Node.allnodes) == 0, "assertion: len(Node.allnodes) == 0") ! if len( Node.allnodes ): print "Garbage left over:" if verbose: --- 389,393 ---- confirm(len(Node.allnodes) == 0, "assertion: len(Node.allnodes) == 0") ! if len(Node.allnodes): print "Garbage left over:" if verbose: *************** *** 397,407 **** # are needed print len(Node.allnodes) ! Node.allnodes={} ! except Exception, e : ! works=0 print "Test Failed: ", name ! apply( traceback.print_exception, sys.exc_info() ) print `e` ! Node.allnodes={} if works: --- 397,407 ---- # are needed print len(Node.allnodes) ! Node.allnodes = {} ! except Exception, e: ! works = 0 print "Test Failed: ", name ! traceback.print_exception(*sys.exc_info()) print `e` ! Node.allnodes = {} if works: From python-dev@python.org Thu Oct 12 19:54:21 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 12 Oct 2000 11:54:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib urllib2.py,1.5,1.6 Message-ID: <200010121854.LAA06610@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2932 Modified Files: urllib2.py Log Message: two fixes for redirects: - don't close the fp, since that appears to also close the socket - join the original url with the redirect reponse to deal with relative redirect URL wrap two socket ops in try/except to turn them into URLErrors, so that client code need only catch one exception. in HTTPError.__del__ only close fp if fp is not None style changes: - use f(*args) instead of apply(f, args) - use __super_init instead of super.__init__(self, ...) Index: urllib2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib2.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** urllib2.py 2000/07/16 12:04:30 1.5 --- urllib2.py 2000/10/12 18:54:18 1.6 *************** *** 156,162 **** class HTTPError(URLError, addinfourl): """Raised when HTTP error occurs, but also acts like non-error return""" def __init__(self, url, code, msg, hdrs, fp): ! addinfourl.__init__(self, fp, hdrs, url) self.code = code self.msg = msg --- 156,163 ---- class HTTPError(URLError, addinfourl): """Raised when HTTP error occurs, but also acts like non-error return""" + __super_init = addinfourl.__init__ def __init__(self, url, code, msg, hdrs, fp): ! self.__super_init(fp, hdrs, url) self.code = code self.msg = msg *************** *** 172,176 **** # XXX is this safe? what if user catches exception, then # extracts fp and discards exception? ! self.fp.close() class GopherError(URLError): --- 173,178 ---- # XXX is this safe? what if user catches exception, then # extracts fp and discards exception? ! if self.fp: ! self.fp.close() class GopherError(URLError): *************** *** 216,219 **** --- 218,222 ---- if self.type is None: self.type, self.__r_type = splittype(self.__original) + assert self.type is not None, self.__original return self.type *************** *** 298,302 **** for handler in handlers: func = getattr(handler, meth_name) ! result = apply(func, args) if result is not None: return result --- 301,306 ---- for handler in handlers: func = getattr(handler, meth_name) ! ! result = func(*args) if result is not None: return result *************** *** 319,323 **** type_ = req.get_type() result = self._call_chain(self.handle_open, type_, type_ + \ ! '_open', req) if result: return result --- 323,327 ---- type_ = req.get_type() result = self._call_chain(self.handle_open, type_, type_ + \ ! '_open', req) if result: return result *************** *** 339,343 **** http_err = 0 args = (dict, proto, meth_name) + args ! result = apply(self._call_chain, args) if result: return result --- 343,347 ---- http_err = 0 args = (dict, proto, meth_name) + args ! result = self._call_chain(*args) if result: return result *************** *** 345,349 **** if http_err: args = (dict, 'default', 'http_error_default') + orig_args ! return apply(self._call_chain, args) def is_callable(obj): --- 349,353 ---- if http_err: args = (dict, 'default', 'http_error_default') + orig_args ! return self._call_chain(*args) def is_callable(obj): *************** *** 441,444 **** --- 445,450 ---- fp.close() + newurl = urlparse.urljoin(req.get_full_url(), newurl) + # XXX Probably want to forget about the state of the current # request, although that might interact poorly with other *************** *** 728,744 **** raise URLError('no host given') ! h = httplib.HTTP(host) # will parse host:port ! ## h.set_debuglevel(1) ! if req.has_data(): ! data = req.get_data() ! h.putrequest('POST', req.get_selector()) ! h.putheader('Content-type', 'application/x-www-form-urlencoded') ! h.putheader('Content-length', '%d' % len(data)) ! else: ! h.putrequest('GET', req.get_selector()) # XXX proxies would have different host here h.putheader('Host', host) for args in self.parent.addheaders: ! apply(h.putheader, args) for k, v in req.headers.items(): h.putheader(k, v) --- 734,754 ---- raise URLError('no host given') ! try: ! h = httplib.HTTP(host) # will parse host:port ! if req.has_data(): ! data = req.get_data() ! h.putrequest('POST', req.get_selector()) ! h.putheader('Content-type', ! 'application/x-www-form-urlencoded') ! h.putheader('Content-length', '%d' % len(data)) ! else: ! h.putrequest('GET', req.get_selector()) ! except socket.error, err: ! raise URLError(err) ! # XXX proxies would have different host here h.putheader('Host', host) for args in self.parent.addheaders: ! h.putheader(*args) for k, v in req.headers.items(): h.putheader(k, v) *************** *** 752,761 **** return addinfourl(fp, hdrs, req.get_full_url()) else: - # want to make sure the socket is closed, even if error - # handling doesn't return immediately. the socket won't - # actually be closed until fp is also closed. - if h.sock: - h.sock.close() - h.sock = None return self.parent.error('http', req, fp, code, msg, hdrs) --- 762,765 ---- *************** *** 860,864 **** raise IOError, ('ftp error', 'no host given') # XXX handle custom username & password ! host = socket.gethostbyname(host) host, port = splitport(host) if port is None: --- 864,871 ---- raise IOError, ('ftp error', 'no host given') # XXX handle custom username & password ! try: ! host = socket.gethostbyname(host) ! except socket.error, msg: ! raise URLError(msg) host, port = splitport(host) if port is None: *************** *** 989,993 **** if socket.gethostname() == 'bitdiddle': localhost = 'bitdiddle.cnri.reston.va.us' ! elif socket.gethostname() == 'walden': localhost = 'localhost' else: --- 996,1000 ---- if socket.gethostname() == 'bitdiddle': localhost = 'bitdiddle.cnri.reston.va.us' ! elif socket.gethostname() == 'bitdiddle.concentric.net': localhost = 'localhost' else: From python-dev@python.org Thu Oct 12 20:26:01 2000 From: python-dev@python.org (Thomas Heller) Date: Thu, 12 Oct 2000 12:26:01 -0700 Subject: [Python-checkins] CVS: distutils/misc archive.h,1.2,1.3 extract.c,1.3,1.4 install.c,1.7,1.8 wininst.exe,1.5,1.6 Message-ID: <200010121926.MAA09394@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv6041 Modified Files: archive.h extract.c install.c wininst.exe Log Message: Extracting files did look at fields in the zip-datastructures which are not always valid, now they only look into valid fields. SOme function signatures had to be changed, because we no longer pass structures around, but the fields instead. Recompiled wininst.exe. Index: archive.h =================================================================== RCS file: /cvsroot/python/distutils/misc/archive.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** archive.h 2000/09/07 07:36:40 1.2 --- archive.h 2000/10/12 19:25:58 1.3 *************** *** 60,69 **** typedef int (*NOTIFYPROC)(int code, LPSTR text, ...); ! extern BOOL extract_file (char *dst, struct fhdr *phdr, char *src, ! NOTIFYPROC callback); extern BOOL unzip_archive (char *dirname, char *data, DWORD size, NOTIFYPROC callback); extern char *map_new_file (DWORD flags, char *filename, char ! *pathname_part, struct fhdr *pfhdr, NOTIFYPROC callback); extern BOOL ensure_directory (char *pathname, char *new_part, --- 60,70 ---- typedef int (*NOTIFYPROC)(int code, LPSTR text, ...); ! extern BOOL extract_file (char *dst, char *src, int method, int comp_size, ! int uncomp_size, NOTIFYPROC notify); extern BOOL unzip_archive (char *dirname, char *data, DWORD size, NOTIFYPROC callback); extern char *map_new_file (DWORD flags, char *filename, char ! *pathname_part, int size, ! WORD wFatDate, WORD wFatTime, NOTIFYPROC callback); extern BOOL ensure_directory (char *pathname, char *new_part, Index: extract.c =================================================================== RCS file: /cvsroot/python/distutils/misc/extract.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** extract.c 2000/09/29 11:20:55 1.3 --- extract.c 2000/10/12 19:25:58 1.4 *************** *** 47,56 **** */ char *map_new_file (DWORD flags, char *filename, ! char *pathname_part, struct fhdr *pfhdr, NOTIFYPROC notify) { HANDLE hFile, hFileMapping; char *dst; - int size = pfhdr->uncomp_size; FILETIME ft; --- 47,56 ---- */ char *map_new_file (DWORD flags, char *filename, ! char *pathname_part, int size, ! WORD wFatDate, WORD wFatTime, NOTIFYPROC notify) { HANDLE hFile, hFileMapping; char *dst; FILETIME ft; *************** *** 99,104 **** notify (FILE_CREATED, filename); ! DosDateTimeToFileTime (pfhdr->last_mod_file_date, ! pfhdr->last_mod_file_time, &ft); SetFileTime (hFile, &ft, &ft, &ft); --- 99,103 ---- notify (FILE_CREATED, filename); ! DosDateTimeToFileTime (wFatDate, wFatTime, &ft); SetFileTime (hFile, &ft, &ft, &ft); *************** *** 137,152 **** BOOL ! extract_file (char *dst, struct fhdr *phdr, char *src, NOTIFYPROC notify) { z_stream zstream; int result; ! if (phdr->method == Z_DEFLATED) { int x; memset (&zstream, 0, sizeof (zstream)); zstream.next_in = src; ! zstream.avail_in = phdr->comp_size+1; zstream.next_out = dst; ! zstream.avail_out = phdr->uncomp_size; /* Apparently an undocumented feature of zlib: Set windowsize --- 136,152 ---- BOOL ! extract_file (char *dst, char *src, int method, int comp_size, ! int uncomp_size, NOTIFYPROC notify) { z_stream zstream; int result; ! if (method == Z_DEFLATED) { int x; memset (&zstream, 0, sizeof (zstream)); zstream.next_in = src; ! zstream.avail_in = comp_size+1; zstream.next_out = dst; ! zstream.avail_out = uncomp_size; /* Apparently an undocumented feature of zlib: Set windowsize *************** *** 171,176 **** result = FALSE; } ! } else if (phdr->method == 0) { ! memcpy(dst, src, phdr->uncomp_size); result = TRUE; } else --- 171,176 ---- result = FALSE; } ! } else if (method == 0) { ! memcpy(dst, src, uncomp_size); result = TRUE; } else *************** *** 234,240 **** fixpath (pathname); if (pathname[strlen(pathname)-1] != '\\') { ! dst = map_new_file (0, pathname, new_part, pfhdr, notify); if (dst) { ! if (!extract_file (dst, pfhdr, pcomp, notify)) return FALSE; } /* else ??? */ --- 234,252 ---- fixpath (pathname); if (pathname[strlen(pathname)-1] != '\\') { ! /* ! * The local file header (pfhdr) does not always contain ! * the compressed and uncompressed sizes of the data ! * depending on bit 3 of the flags field. ! * So it seems better to use the data from the ! * central directory (pcdir). ! */ ! dst = map_new_file (0, pathname, new_part, ! pcdir->uncomp_size, ! pcdir->last_mod_file_date, ! pcdir->last_mod_file_time, notify); if (dst) { ! if (!extract_file (dst, pcomp, pfhdr->method, ! pcdir->comp_size, pcdir->uncomp_size, ! notify)) return FALSE; } /* else ??? */ Index: install.c =================================================================== RCS file: /cvsroot/python/distutils/misc/install.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** install.c 2000/09/29 11:28:41 1.7 --- install.c 2000/10/12 19:25:58 1.8 *************** *** 357,361 **** /* read meta_data info */ struct meta_data_hdr *pmd = (struct meta_data_hdr *)&data[ofs]; - struct fhdr fhdr; char *src, *dst; char *ini_file; --- 357,360 ---- *************** *** 382,387 **** } ! fhdr.uncomp_size = pmd->uncomp_size; ! dst = map_new_file (CREATE_ALWAYS, ini_file, NULL, &fhdr, notify); if (!dst) return NULL; --- 381,386 ---- } ! dst = map_new_file (CREATE_ALWAYS, ini_file, NULL, pmd->uncomp_size, ! 0, 0, notify); if (!dst) return NULL; Index: wininst.exe =================================================================== RCS file: /cvsroot/python/distutils/misc/wininst.exe,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 Binary files /tmp/cvsIoCK1k and /tmp/cvsiqHSMv differ From python-dev@python.org Thu Oct 12 20:31:16 2000 From: python-dev@python.org (Thomas Heller) Date: Thu, 12 Oct 2000 12:31:16 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist_wininst.py,1.17,1.18 Message-ID: <200010121931.MAA14705@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv13101 Modified Files: bdist_wininst.py Log Message: Recreated after installer source code changes. This should close SF bug (patch) http://sourceforge.net/patch/?func=detailpatch&patch_id=101844&group_id=5470 Index: bdist_wininst.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_wininst.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** bdist_wininst.py 2000/09/30 18:27:54 1.17 --- bdist_wininst.py 2000/10/12 19:31:13 1.18 *************** *** 219,225 **** TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ! ZGUuDQ0KJAAAAAAAAADqs5WMrtL7367S+9+u0vvf1c7336/S+98tzvXfrNL731Hy/9+s0vvfzM3o ! 36bS+9+u0vrf89L7367S+9+j0vvfUfLx36PS+99p1P3fr9L731JpY2iu0vvfAAAAAAAAAAAAAAAA ! AAAAAAAAAAAAAAAAUEUAAEwBAwD9e9Q5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAADVAAAA oAAAAOAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAA8AAAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAw4QAAcAEAAADgAAAwAQAAAAAAAAAAAAAAAAAAAAAA --- 219,225 ---- TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ! ZGUuDQ0KJAAAAAAAAABwj7aMNO7Y3zTu2N807tjfT/LU3zXu2N+38tbfNu7Y39zx3N827tjfVvHL ! 3zzu2N807tnfae7Y3zTu2N857tjf3PHS3znu2N+M6N7fNe7Y31JpY2g07tjfAAAAAAAAAAAAAAAA ! AAAAAAAAAAAAAAAAUEUAAEwBAwAu6+E5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAPDUAAAA oAAAAOAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAA8AAAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAw4QAAcAEAAADgAAAwAQAAAAAAAAAAAAAAAAAAAAAA *************** *** 234,482 **** IHBhY2tlZCB3aXRoIHRoZSBVUFggZXhlY3V0YWJsZSBwYWNrZXIgaHR0cDovL3VweC50c3gub3Jn ICQKACRJZDogVVBYIDEuMDEgQ29weXJpZ2h0IChDKSAxOTk2LTIwMDAgdGhlIFVQWCBUZWFtLiBB ! bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCmbxMY8TFMU40bYAAPM0AAAAsAAAJgEABP+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcRmP833//Y g/v/dR5qD5SFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJJD/T9itg10cACHGBlxG ! dZNqAVhfXr/7//9dW8NVi+yD7BCLRRRTVleLQBaLPXg0iUX4M/a79u7+d0PAOXUIdQfHRQgBDFZo ! gFYRY9/+9lZWUwUM/9eD+P8p/A+FiG182s23P/gDdRshGP91EOgV/wD2bffmcagPhApB67EfUHQJ ! UJn9sW176y9cGBjxUwxqAv9VGIW12bLxwC5nEGbW8GTsdSUuwmhUMOlTt/ue7wH0OwdZDvwkdAoT ! vb37yAONRfBQ3GaLSAoDQAxRYdj70Ht0Sn38GQNQ4XVvpqQ7+HUJC4idhy+U7psOVmoEVhCghIs9 ! iN/X4CKQhg9oOIk8mu3WNusmrCsCUyqcU8/3W9uuCCV2CDvGdRcnECjChmYwhJURM8B8ti385FvJ ! OFOLXVKLIVeh2B4W/kYIZj0IAFGeADiayG1uu13sUOjWPpJMEDZXyLbLVrgiEkC7CMwWXgbYtvvP ! 3SVoqFgq8VCJXdQtFTze+/7CjVrAdHf/dChQaJCfGUtbutvnBBZclXQTGg18kvLPde4E0JH2IR8U ! 7IXAHrqBHGTcUADGX8M7xrpmfev/dhbpU6GMbrh7cyOXXuvZ04HsGO2LTRC/4e/o2QxWfAv6jUQL ! 6sQrSAwrz4Pd9v+N6WbRA/qBOFBLBQaJVfTuSi6D337c/mUQAGaDeAr9jjMrA4sZi0wfKrbZfv+N ! BB+NNBED8y4BAisegT4L/R2f7QMENxLHLpKNFB8Pv1ge3f3ttk3wBlAgA0AcA9MDx36NPBC31n67 ! DUYcA1YaA8gDdlSKGh5shMYv7I2F6P6dXaQLgi1f92iw7lDMnhAfO9O72fRwjYQFDRdMGlDMbmFz ! GyUDAPAeDGG/DdjJSwRdV5hGFIC8BefCx+R3G1x0MP91FFhQ2JtrMLshAIZuFBsC7KmwM79WfAID ! EzmDxLjdrqNhGPhAwfzSClA4ar7WuY0GQRQhEv8aFTmNw8ntBozPV9KaXF/6buvr94sXBEQRigiE ! yf2A+S912Lcz/gPGAFxAde9zQFwMD3QXdpEaDI+cQd1hUnHsjdYFTgoLwFdQFExhb7aC4/NxSgxI ! agqZWfs2W/73+TPJaLRwUQAeaLwCAA1olkzDLzArOFA3W1PbMtcaDRQVKL6AibSlI2wEVhlZUC4P ! ATu57m4gHSQY/9NoKdco72sHdiBgIwoBFdOpzpzpXgtfLJ+eRK6xtWb08fbCPtrY3n3buAAGAD2s ! 4U50cIEFEOjumGVno4p9CFdBYTR8+E/nBgDHBCQgm78A8P/A5nCf7fJgNVgF0xq7t3ZpCugDPzrW ! aODCaP3ayOZgDKCcAARfhK3duzb9J2uBeAg4zXUZD/O9Z7ZqHXCpdFxUNByYNSmteWrwbBFigzB3 ! YzLWtr3ULjiL+AUE/IvIVPQRf+O28CvQK/JSD/gr4wPBUpkrwswaW8fR+BjwFfjoDXQ0IiMRgAUB ! CKBc4B1mg+hOVzXAAeBAt/BnbjgeLUTbwVvYfkgV7RdCvv7RgTdbq2YYEdvB6BBIJbd7AUcK+4st ! NDBo8OihgYYxI2jmgBLVP5Fsz/AIfiAbFgGgcWf+M+1VVWiLFdM7xYkFW7hlxZFIVUmGFMMLwrda ! LOoDJDweHQjWvf0SiCX8GyMrvKAUdUMPKE9YB4cRPmjvjRWwOiC3SAbO0woAmpbAYqYuzGuViP0G ! +yQYaJltvT5QVTXIZMs2PFVaKYqFz0IplLAc6FlFcoOMtXQyHImNsa1s0NAkV1AdcRzCLDHGFRhN ! EB8CbDF3Z/kDHGgsG6UfYGXvppspBOsQaNrBcRgNt4vrRacgWzjFYYR/PTP/V1cnaJl2YcPBNtsv ! dQQr6wLsJhLG2FfrVnrzYSgnG31bgc1rsN2+f/hTM9uoGQAMU0uSYzHSkur8iQhjdHFrN7QHMD0J ! 1lMAK/RTOpVbNDCYEPRQ3zhLMdeQsSdi9VuuidfAyiw8BqQQW7tmL/w7wy/NOBjrjWwnvtZNmCbV ! 4u42nJ7Npc5TUIRI/4Bx1klbe5F6EGQSAUOS5tnW10noKfj+VGx2ttIGYuzHINtsydqqxjXs8P1O ! 972W7lO18AB3CAwfdtdssxsMvFk36GiadIF1ARv3GPzy4MUK7oQboFISRsKyJmGB1YYCfpI76QxT ! g5meeV4t8QILrmmagD1gamfwAhFmDcoEAPV0ynbmsF3zaOwQWFAO8VmH2+BjjgtrHc0BNRywlkiB ! aNIQci/ZyprMVU1x90KuabceCD0xz3QpPQjr2eJjhMQDw/50gVk1Tla+Mok9AJ0W6j4EtoC4fxFc ! yA3BGmcnUBSewBwaGnifoAC7gXz8wlO7e+E5LIdpaMscBjXgmQWpxcHgcCsC13oZV2C3uzk1bBCj ! CGZ0EoU3dNtfhJ0iC3FZHnBXXrNCslu4aMQaKRtwHwNDbB5Rgz1UQ9lqotScICJ/uHJJh3dCYDW9 ! DY9t2H4wQMT4hUcFb+tTA665T681VBN5NPqMbI7e1AcMCcDorYGu07CtGLdMBaXumraJg9PnEIUM ! AlnPqQi9WnRKQnm5t1y6X1nDgEwBoZRgDZVwreY7LVmfBqaJ/wuMBEHr9g+3wcHgEExh3WyEw1a7 ! 5/FTsf29c12yHzZWVRBBFKlRl7u1lTx0TTb/jYh765LxaARzCA8kCpQkcHyb1Z2FawQmEOBK/Smh ! LTwci3YE66eLjfX9yis6gcS9w0gA12Zp4ZQpW2cQAPyjbqzvxAwZcxAJCGq2DczSSEgGq118Alza ! jmVZQghwSw216ybcy9A7ZDbzqXfYjAJB34HWUrNbslNXJhCF629tNxs4q1B+UCwN41hqMOmMs2cY ! aDj3XLlAIGPlxvo7ai4YJAxxKq5Est5oNCWTuh/LhmB/SrrrtF/DDnfYTGAL04vD4JYI/AjHMjQw ! DNc1iQbIljBC+1mJRgQDgV4bF34LN29WOQG+CnQ1IU0IKAvN0VBRBQUiEU2HcLbzSDcIr/j9ahaR ! YOKNBojtHiWLHe2UpCvwJWn6HJkSVuQUmTi21RBqUUD6NfyfcLq5mPmhvKFQWBfgFXaIdEltFbN0 ! Qzo2LmwEAY1qIyZ042xrvA3mODfWGAZ0FpMG9f79fwcPlcFJg+ECQYvBo0Lrx8cFB7zv2svJ9+xd ! w2okaFA8Gf0nc8dA6AZe99gbwEB5wNHTwRwhdDOv19Fs0b/95NaDHwoyc2Y6xHgJfCLy0Htx69vT ! QdYn7+21DXW3PREIOmgYuQmhEwIu6yWNgkOmkARddLdLd10EagswjX3EjvOrBvSJH1joBiKrqzZM ! 3QyrarFtYxqQE4wbv1BSa25geXbAMIkv621zVICdlxzc4XNrb48UjBvYVhUHIsxrnXu0NeQf8Lcr ! EmwuGbszIGMWQBn0bcklJ0/dGfhudgVo5zcfn09/jDQmNlP3XHyYYwWUC9tvt2wFrIx/kCCbdbQC ! vJmPti2oD6T+bhjBZbpeKYAEDxkxs5leCHAcYBE68I8DhvcSWFmjjDAkGX4YFWiYZmwXcHKZrOor ! 0ASdCF8DrmepEefb4lwyvdx68VcBalC73Wm+kH5oyT2ziAQM13QR8FlE6sTXSz9oP2sti81M/R8N ! I7NJd+pGfyB0FZnZXleKZA+jhBOQku7BozoYVOketXo0YcJHRO97bgldIJs8ozD1lN3jY6ITvFCj ! 2PwPjvRGghmnGaE32VGoNGCFNFyAYMMMs8AmBGGh/1mADf7wl1VPgPlcdUTA8vb2ikgBQAgwfOgE ! M34Wbtey/TevcnXZxgYNRuvTBQr0McGTri1zURj0PAqB39yvwx+IBlIfrYgORkCZ4FNrRCp9JFFT ! dO4J8U1HA1b6CIA0MQZj+HjYg+YrC0oXbCP8+WS9WOCCwqW37OmCJwIvG+EEa7mgBcXg/JdYs6BB ! 5RHsb7341SRQVQj10EwC6k3w1vZXK0EQAgwEHoE57o32JrjFNBBYqQDCeVY0Egu/3YbMnUmMlQe7 ! BD3+K8A5Drx+Zl9GktG5kNkzhr7c/k0zd7KXbFjPFNj0KPBspHTPaBo9i4SPLWixTD3W4NcE7QQd ! jgJx0wUbLNBz24b/zFe4BQuGutxt6x5X4mWU2+PrB9UNTYhgNEDsuAyHIQ/iKGww6SOXviJWpdgD ! 3HsUQHoj146l5OC7AH8rvRnOFpsN7GZkjz6S6cCdOzT/2LswdZjN1OZxIviAJYSV3EJDZBfGJBeg ! 6NhAwATM/djvNseBbOP4dFbCjEi5rTW837ARDP0QBG5F4awLLVZBYGhh05nNYRoKbBFw3wXthMjM ! AD4z0jvCVv/L9v90M4tIHDvKdCyJUBQCCBiLcQz33hv2UsNti+2D5gerMaccIBRRBw1bP2IavNde ! wmO4k/+iK4Z9CJAA7QjlXVvokTqYHNNUTiSFydm1Lmg9/QqTPyjc20psbggeGigcpiQNLoC5pccA ! AFSfNRs7aOhCO8cc94qYjU2xAQ0GOsFR5zNbq1b1awrceZupxb4MO/d1Cj/fiGQgb3hr7Yl+GDoT ! YCBgOn5+KDl+aWduC2QHDiSAgWoYM3Rtc12EINIniYY+/FjohZLaEIl4ZVb3uwZfF8+JegyJtPfZ ! x0AMAXitr3v7+Qh8WQQPf1QfuBHTt/1f2NpKEFLXUTfaG9JQ99KB4jA5TeF+tGVSuRs8GdhBO8W3 ! eE8jehR1D4Nus+7xLQ6cdgtWG5aM8GTJX7j6aRC6Ks8TcVNVEHcEdrcIBvR2CvkDoT4A1L+w2Qjw ! i1QjM9uD+gS/+z20f//ulcNLvQXB4/uJXBmJCPDwJ77IDQ+HxFMkjYAqGQTWNpqttj2ISR6JDRCN ! b63FCA8vBYsOihEc1i02vgQ1FhAEJw9CxHCu9I0uFnQVxzdV3b67ZV5sGJh1ROuiIotQEMHp5MBu ! 3CjBCF12GCSE+VrbwToWnhcFvQTIUIvmEUiKYNvW3hYnQHaLXhwLeQaJvaMXao8fAxODi0MEPebe ! +38IA8H39YXSdCHHA1aU0d2NT54uX2xo9sEgJdiws7mBYykHJhyBjwKO2EPaG7j2vYBh+KQ0/XUY ! owJVNTtRCPNPLGa3rXUqApIiAU9pAnNpobbUoDON6OlSHtaxORcSRFQM+QvYzEu+2Qw54wgtAtbc ! C+Zj5O3hStxbe67xweEYSAvkSTQJhkOhJbs7gxUKY+1IQokGOhwUkGTA/taBSDfiEAPKiUg5Cobk ! Irm+CAu52ZJLhDY/YZnDjTlINBI26yCYzRDlM1npNhACclSkaNmvfsgCdQmLx2zCCKe0g3NuZ3Jq ! Y6TYncksFlBHbscBAzm4JYQHFkhPN4oKkbNlaRtQ4dE+VskkB8gCBA7SRtghhCCJKLOFhJASIR94 ! kew1204w8wa4+DuCYRqWaSxEcArLZrMAJWoAyZbk2/0MQwEp/bv9Ym4GOAu3JkwuJwPbNM1yJCle ! ndgkKhfTNNtmpRIoA0eBuxJ4mWVcKmhbf7g18EDTV78FejyJtY0ocEN04AQPBlujvQQFdQ6+60JS ! mOx668BXynUGdQ0+V1E33pEN6jJ8KMfyAUY0tSCwbQIwDjjuUU244rMIIHQOCbvQath2ax9gRzDA ! w3+dK9Rnp21qCmRjILToqAbNaPaqyNHoHcLDi08oG0mqwAFnMxpf2SRmpZsti1cojJDIbAPcY8Ny ! QLpQKE7noDkoH58rUUhYA+ceLqI2eOtCNAJ8A9geiV4siSExW7w4yARGm0dIFqoyg+wwOFM10Fp0 ! bzg7+ylDoG2tsbJrEkguS/+1hb6VUhAwVjvIglQKwLXl3xVEcwUrwUjrBSwHHgd/Ll+MA4P4CRkM ! hZw4QNgykAn+GIP9A3M8kNzbvuF6lg3G5EiKD8cUTJS67u//i9GLzdPig8UIYwvyRzGJOImBf3vv ! L3LO6wQ3r4PgB4vI0ei1brpvbQFkHksYd5FjxIPtA/ffngUZAc0cB8HuA9PuK+k/d9XBprMcLkFI ! KiBSjWJ3W2iwhI0NMFEOOFKh1zV8zjmMJFwhNPhyAyXerlEPLFIQ3hAzX4HuKowUia6171wsZsae ! WHEGYRR3eEMOA/j9WOfWxVsUziBzLKn6+qAGc9kCDT9MLE/2fBO/g9xAJ0Zy1IvWi86Ct8C7UuEH ! cuoQM9GvojjSrb397YvBO8X6BIlsXEsmAYvbEsMOiQPpTNIXvGe0hHMqx0zJuYuLG75rfBpEO9Z1 ! I7+LeygtCt81fnQZi9c7sRVzByvCSFfrjm0XZCvyc4k1dWe0TEErHXyhSARTiVM0GDkHZt0XW0cw ! atajTDrnaBveMSvKSf9LLAcEPoOMfLdVdSBi99byO9vk5k6LzsKLyKResAsNw4QLBcl2TUP3Bp3C ! O8EFwT4URN0vsUVX0YEC86WLyi0c3eHxC98DK9DzpNpcJUTajba9A1INS10V8CsMFgyd6RaJeBwp ! AWg4TLC5XWQY3UEDeYwhKpYOcziQMa6SMg6S0habo/sl/z8lyCCYH4cdC33LHQbW0DzgCIFbF93c ! +qAFE/IFrQV9H3MO+AZGjYQIAsR3A5+Ns3RIKPlQYQyNBYkTbzwOSA7HQ27wmsbepgTrCK5xU5II ! 04VGNxEKg2Itc2hZMpX8zjK+NAYD0RFpYSwITrGL249PLfyYVEsMxQSRYQiYK7QGCAOGamfs/bB7 ! cpgwuBOhyHMhPDSu8F6bxzFpNaA3vrSdbiBy33AaJG9DEI1T5gwNllFSNFfx464UZ9NQUTKc8PAs ! ZNvMhSH7COYFwfDhK09l0DTiHzc1txNvZwJdD4N70lk76LX349FzM+NKOwXr+kJz77X5Spj29PkH ! S8eaG/ou+c2LyfCuvYO/iLkUI8bmVMEBjeY0drfVihjKVRCXNHMbyVhwre0r6tEMRYQSit9th2tx ! QKQ3IfAjErnNdPF4fKEDM/KD6BLNWbC/5C4rJPgLH8ALO+lzO5nAugXy4AQfMJ259mjk6cnsfHft ! NfrdVYsMjakjziYOFGq812pi1JAb19O5jHAVHOGMCh6517v1A9A7KoepddMqQo0SSzkQ6Znw+OZi ! 7oKTFQ3aHYr86wIevr1UAKgMQUiZj/x19XeJmTiQ0F56goWY9IFuexVAJCZRUECNWsdmzN8JLCRR ! ElI8Afev4TY7P1FCBQE8a6yByEbPFGUJBzjLDvNABg83/CQcddL0HxVMJEjXZh8OyiU0z3c92L6n ! AZ88ICsceVDLc8cQpE6EVwQEBniAbSEpSA9zW7QWFl5rPDCX2ATi61YX0CudOANWTINWc/Dozk3u ! 51ujU19RzEmxe0C7Es08dFZdtlQAB1y8OB0nTc4MEoU+DSMYsSBNHAopzCEYDczXSonSACzGwVyS ! AKGdz4smbbf12mialtrplUxRdyTQmnuF2hewkIbdDrmhMwYww+CbaePQUVxh/cszGNtzs8YUdj9V ! UfLk1yWD/fBq/SvRwwPqUE5LsGxPdkyNMYtpOVHQbhE21ysBZpLqLxVSUbVZAtk6Q4UytWWnvmrH ! QRj0PUtGEOZ+rEBISFGJeQRGRCYcOMIYEUsg6LOzCK7RrPKEp4QksDcIFVLIxmfAxXtUysQAzq3Q ! ic85QQSTioeCewb3K/cD7oNRT9FYaAmmBLhFwoewYBOfz55q/FCUZEMhBHmQ0HWEwjuMjM8rjjcS ! SIEYnf11exhlswZbpU9RqNYx2CI61yJolLBlREgUfJ66VmWMu5FSDMKBy91QBjXPBPcS0rTa/oEw ! xAqZ/V9bSOdCJEwQ7CyRlQEY5T6Rwh6DCTuerZS8XEhQUqYHDLvD6/VApmbnQVBWe2Q5oVN0S1PR ! dDeh9hHa3HvoIDcuiVYEf7ItVf5QK9WLbgjjbn0+4wD5VmYIGDHCtxUZQ3/HTFZVydag1cVjQ0tW ! SHoppJk7nSYEpEOYoJeZBIYQDRiRU7WvJgRPsP5FeAp7jUNIKkP/RCzLZbPdFD0tA7DbLoovcbJZ ! LpcwwDJnN84SOAZslt2oJ8YsKKkzGxvgkmLvDKIMagAHKAQQGJ7ClaJHWGndi3uNcgFYRigYDRgO ! cIDzCFdj6UGqscBPt7t6BtyI7911CuzCDN+9iw2SXPnbD4bvEVWB+7AV3MXvHZnDcgW4CCvYgg+M ! od+iFX+t6MHt22EQihaDs3dRiMYbrFbxA/kIDjnkkPLz9PU55JBD9vf45JBDDvn6+5BDDjn8/f4E ! G2zn/wNNvGS2dSain7kVFhJGE2N3K/VIdfSxDbnx8vfxTFttu2+/CIs19/fri/WHeAHYuhMxXRdb ! M18LwcGPSXAIn5UIUIKFUDZuQEZQvEsDuRx0PgTDD92SanQfHKE3hSKOu0KNik+jRYhQEFoOeiPw ! DIhIEXUAAA/i4TDgSBjD3xR/ICYMLbx2zgNGkm0JGgvwVsjabgyuFjYXwQw0wX7F2D5NE7wQwkYs ! B4luQIE+M0063/4GdMjxK2xYQoMcazsCLRqdzhAKCpJslj8YOShGeiyJfju0wFaujCkrIntSqW21 ! rfmFiQZl3LCjj+JVGNRSIk0RPXUM2E9VEHc67OrI07WS2aN+HLhInSjI2OY6DUCu/BijMMD/NRpy ! pXQTSffZG8n9YqsLBYPB701hKw2ppWrPZmORfk226q2xYkWyRVj4c0TnYsXDQFwEug61AV6xi+0w ! ALKOnPuSe8/T4NAAxwgLyDZ52eiu/eAsQT8KLHK8roVjS3Xf+CMgCFbISRjh0a9ROBTT6LhuCy79 ! GsFFK/hAigHF02yReBaLSY+VCAbR3egxr6gQdLvgD66LSbpYK68FIh8CHLTttkCvRcOoIAfjJ6Rz ! Q84fB4LaQth7nzkar0jcedBH8g0L59gIvnvfzMmLBEy5TQQDyM6tZrrWWpGw1HID1wzNbW3TQBj1 ! RcwiOSQYZV6WA5iEJYxEZAxgaAFpRARWUhCCcLNlDI0MwYhByBAgD9gCDIGBHHIMBW8bcChAfgNr ! FVLvBhzVdQPCKzdAoj1natYf7SNTZuMVlrEJllY+VeLHl9ROLC2OdSHUoLTZPjA7wRFUsD04qS0p ! DPsI6xtx6ogPf2eGFFIy0iRKhXJiPAaSITMMbWKQG+zkXWNhIl4hbonsj2Ke2wGQ9/dJGELzCYhK ! /xFBSDtQPPdFOAg+B04MYGBzdGZJYc8oN4ECG9KwAOPvk/FR4E0KiApCSETAFWFgvfbP0S0DTxSL ! Kwrix0M1AwWOHyvNExcRdCeJkKr0FMNKCUDA1c0wGNjYYpAfgRdQZWr9K81T21xhblZQScDrtJjl ! QRYqiokD/t4PZT6D/wd2FT88g+8IzvBeCZFMiUw31aGwhFC2i7KxYy5o6mKzTiA68JcyvSttbjz5 ! Uyv9i2uNsEJvZO+JC1v+SCYSHhJBARfJRLY7/pAsl93CJDt04QO8PEA9/pvlctl0PpI/Z0HfnUAI ! 8tUI4gT5DAUPPbIgUVNsIJDodCwzE3YQZ9Gx6mbY23UJoVtZqNv+8XUcslZVi2wJjbpT0pWAG+sg ! UlV3ARO2TPSLhTNMotP+11+irTcaW1NSx0cYJLy9S3EiVzRdXkzTLQW/Hvt0BoN90QwfABYWc1G+ ! wjApub8nLM+B7PCijCT0BtRAW1f8tN8B1VdN03QLz0QDSExQVDRN0zRYXGBkaN40TdNscHR4fIms ! JBIbZAhBMgHvXXr7hX5chESNRANDSom67TmVr+4CCHUfcRiBlPAiEf9uwIkpiSobj099MbYanBe5 ! EY2YOwBf2EBDOSg9QYPABPFpg24mdvN2+c1zBv/Yd+OaYroPK7R4OS51CEqD7rZd3OgEO9UFO/ql ! LHYlVP83/m36vlGJO9Pmr3MSjVyMRCszeCWhDXZvU8ME0RFy8m+Vo7fCzRCFHAxEjQMr8WxGvUC6 ! QHkQEaK1wdedA87liCwL9kr3u7m/hzPbA0wcSEnljBwXde/d9BWNTgRvtM0dbo0M/xwVjIQc7VhX ! sD0oQ4wNiVx4m4bC40KJERJ7HAhDO2O3O+LZcsVXi9/3QowUNZQKnGYjiSFdAyi+ZxpxJB5hx/x2 ! OmdHABLEHTwPj4ECEoXGRzM0ZYcNvBd4KLkKO0mF0uzvbXMLKz4g/TtND44HYDeLHGwUONYsLf3/ ! giX4bLo4A98r00UDzzvX3RI9E/AmGtccIP9JQEdJy7iNfQE7x3YnhiWa6YPP//caLcduhYUF3BhB ! BK59vsVta966u+AfByvHEnLuhCQkvzuO+rId54uxfAP4gf+I+nDGRtjvJiArLMJAD/Z+L42UhNg2 ! iTiLuz5147k/dDhDiEygtITE9osILNbLiAUxhV8v0b3G14tK/O+L9dNuLHyrwUMr8IkUO3Sf6wls ! eO/pShgo4PAGj/9vOEJXWoxuitAJHCrTiHjj0209MYsIDJF/cgfGV3QbGw7A6583KQyTu/AfffFz ! FIH+yRvSg+Kg9mCIce+CurLrICAUIuYCihTd2kS4MQyGgMJLNDGLltviIbEE9g6HbG1k4SRHuuK8 ! tDu6oIVNFXMet8WHMAzH+C13iTmNPNWkcQSGTIzQ7R1y5tUUeo3C3P4LrjGBhcJ0CDPQ0egHdfgN ! h9YiWEoOKGCMfTDaCByNBTEkTyP6KPddocs6XxiD6ARPiBzrgv0mK985MwgjddzhiTFOdRXISiAr ! 8TA11NLCHFLx6vTxkEDrwZoe6humt06RG0LXO/V0F9ZClu6RLAF0TfsBFgEXsAwKJA+glRAYX6PS ! wGN5YThoEmQYJ/DOAAtfZjRxkgYOVWQYNFJbAN7q09homGKgGAS9BHbQFVVScIX2CBaYsdfTRT44 ! M9nZW/vGDEwoSDju3E60exZMkGMEfg/sjVYeqFJRS3UkJ4M6MAC/txYIgf1qdxM/TuAtAR2r5E+H ! BaRZUdAe+7IhcMh1H7TjI7EhHzz8dAKQL2fAYGQjS2wSGExgQkxFF0gSzCMP3w34u0G0F/ze0qH8 ! Ck25C8CciQIQlMdwqwRs6nd/XYdA2Dgd8MhR7Qxja201gA3Xe8B2/aNtP07Bd3YDFSwRe2Mj6nrv ! O+hY6CIPMvyRhq0g9wjqIFYUK8UD1YKF2krmMFaWOG5UiF9wDotLPFUFNkM8Uj1uAhLNi/ekpnKp ! PmJZyqYDxWo7x78XSywD/aIKdX5BbtG5rUQoDZF1H3M0ClvYneqaK+6fEIQ5kOXkV0dXVi3UWAdH ! MHzNXviw91qLhHuC5IyKMJx6UWFaKBK+Ul1UiVFyNRheDr14wR/MWQsXbjf5i2mcUSA7cTA3OD8c ! u1EdO+5RQRw5cwkrpboc0PVOxc5JMU0o96rNgTa0S3xJ0w4cLCCD+Dwi1VEnmotJQRGL3ZcosaXI ! GmEIC9ZHHXI3eIu94liiVzAjysiKHHeOG/HOjTTOLISOwjJOAdOaKleA6gRnPzngBwvQBL4jawyd ! 5MBuH2BeBDYDyzhVdMH+AXTHg+MPK8M0MU4kW/sKDavLI6QPljSTTA8gNBFyZMqcMQUBALyZspTP ! O8NzKwc0F/ZZGIP559Ulvmo/h9dBJpdyB2vUlrM8WU76z3DBXFE2R+7H9UhwIQgF15S8SSjYv4Nv ! ETv3cheL90WKDkaITf8GrBENPoPrAusB6yetFfh2cSwfO992E4sdHDODnf0ARUZPdfYYKBBLnn5u ! S7brGb8GBBlwRUnYEQV6gWEScjpd0dWPDnIz+TvrPK8KtXWcEEkEE3QL9TbHK/M+rPCyrTuTdy7i ! 8w+CBy0+R4t0e7tAc9nFZcHrHtlzAt6xeoEeOCv5M40UzZqXYIyNwsQc+hZTRggKhXcQ6s+JPitn ! Vjg1q+QNVulzFSnAXmIgdFZXIBc2m89a29iMfK8dcj8QZv71bWelmohoAytBS2zQrVhAizFBOXdf ! 6Z0O3olBZ5r9Zp+fWwO4/yUAdQWsYAhhAL15PrRgsMzMUT1uKOzAkC0IcodJTr4tty6O/RCFARdz ! 7JjEDIvhke2mEmDPUMPMQwQHv1S4IAUrav9oCGRT3lLfZYBQZKGhUHQlBzReCrYYaMuJZei+dQOg ! UfUEFcTZXGMDgYMN2z8GEEo1FdsUyJsNpB0Z2ZrxCA3MZKHQ3LvC/QwAoxQo6205HUAYO5vbiH1u ! bE7UGPQ+2/1YaAxwgghwJ1KhYD9zC1ETL5QkXAwJLRXNdpxQA5CgTtxgyNcU7QQyAG9B3wVOoeBu ! MAGAPiLk2/7udTpGCIoGOsN0BDwN8hIEptm2ByB28tTQTqSMeyPa4vZF0DMR6NTrDitFi/55IHbY ! 6/VqCliVoCdBW4FMVRCDw1fRlc0z5JHsVHBxBHoJiU2Iy0xZCsZG2F4u/3WIH+yh8AXotbfwRti0 ! VQMELGGFDfMvgqzDkgB0h5EtL8C43QAAsgUAkRU0z4Gq//8QEU3TDdISCAMHCQY0TdM0CgULBAzT ! dE3TAw0CPw4Bv/0/SA8gaW5mbGF0ZSAxLgEzIENvcP/vvv15cmlnaHQPOTk1LQQ4IE1hcmsgQWRs ! ZXL33nuzIEtXY297g997771/e3drX6cTNE3TdLMXGx8jK9M0TdMzO0NTY0/TNE1zg6PD4wEM2UUI ! JQEDApAMyZADBLLTDMkFAHBfW8Is2Ucvf/dN03Tf8xk/ITFBYey60zSBwUCBAwEC0zRN0wMEBggM ! TdM0TRAYIDBAYGQjW2Hn18dCEpZwBqerrwzyLWGzAwsM6Kgggw32KhVStK2nPgOBbsAHVUNyZSVE ! af9f/d8GY3RvcnkgKCVzKRBNYXBWaWV3T2a7Nwv2RmlsZRUrEB1waRkwS9luZxcQesHcf/tFbmQg ! GXR1cm5zICVkUxewHyxhFBNJbml0MhilAxwwtktcfrv99lRpbWUUUm9tYW4LaGkKV2l6YXK5N2Db ! XHdxbOdzdGEH3263v3ggb24geW9AIGMpcHVTci4gQ7bt2v9saWNrIE5leHQg3RdudC51gG3vrbXo ! GUtjZWwVHGnAYN3WHWgVU31wWy52a619H3kWMowBLmRh525Htg9QIFZZc2kHFnb7BjzB529mdHc0 ! ZVwg2c0dbAZDbxGVXEmg7bay21DlaABDtShmswtb1wwpmP5n3HSEKTRnSGRTb9/67fY1PH9mc3PE ! LqtvLgA2ixxhG2OJHHQXwlsUIWKBbtprQzgMVrSli6FwuOCoTUlmX3Y6++DoXiyudiFMY2gSFuFt ! bWczBHkqg0DWdgsXc1p0dnMsKm9AGEI7QmEEnYltb0sYd4P3X09wO20udFujEWBMZw9SLV9Txlxh ! 2xBwwFMrVCNG7OO51ghsIwtLaQ2ECe/bAExvYWTwywbh0W1uADy0dBJfKQl2zAasOwsuB8pyJ9fe ! cNj0J4tAAEVycjML4WHNOX2NHQ9PdsmE5hxtd4bVvfFbtH+FPT8AG3M/CgpQcgZh238vnFlFU/dB ! TFdBWQlvLuy/Yw8sCnAtTk8sTkVWRVIrGI79qUNBTkNFTFxTS4vANlwoA6tkdY95LpcQGuLwb3Ce ! n0mutjbBPWZhS3/qFmTttcLbFWELYg0HDS/ZjNtyZxZfdsMPTLsJww6nD0gxYnWxkZpuBmRf6W/v ! b0McEelrfhoAdC9a616WBGxub3STZYFBt0muNVOyIJTUb2fao9y1cn3IdmFsc5RdFqm1DmV/O2Pr ! ethiifZl4WHOZoCFOWbtfvlHxS9vLMWkcQB3nWRvd1Y4KzRhPCsuWJ97iI1NVx1DHAdld5w7NFp/ ! uytk0zMdHtjqckAgKQ0KK7Rlb2snFxFEZQw2LJgZxXRziHXbODNWa5B3brvZhuFwwYZ7s2Qv1wrN ! dGIezuoVuHZqH1xw6Udvbyd4GG8ndwgZ0lNYeW1idq6W7G9scz8WPkZsb2zZm5l2L89fGERTgXt0 ! eXD49LTrGihK9y+oB5gDN2uapox4aFAb48kwdbixNmIyEX2Tug/zZmbxZSZjc26uVsERMzE82G1v ! cw07GDctIffQjuywbG0vuBtuCm3ZEgvkflm2GVrAwwPOCS/ey0gxbB0TBWA5O9IULAFQAAcQnGy6 ! plRzH1IfAHA03WCDMEDAH1AKNMggg2AgoAYZLAi4H4BAGWywQeA/Bh9YNN1jBhiQf1M7M8ggg3g4 ! 0DLIIE1REWgoyCCDDLAIiCCDDDJI8ARgTTPYVAcUVeN/gwwyyCt0NMgMMsggDWQkMsggg6gEhMkm ! gwxE6J+mGWSwXB8cmFQGGWSQU3w82AYZbBCfF/9sLBlkkEG4DIxkkEEGTPgDkEEGGVISo0EGGWQj ! cjIGGWSQxAtiIhlkkEGkAoJkkEEGQuQHkEEGGVoalEEGGWRDejoGGWSQ1BNqKhlkkEG0CopkkEEG ! SvQFpGkGGVYWwACQQQYZM3Y2QQYZZMwPZgYZZJAmrAaGGWSQQUbsCWSQQQZeHpyQQQYZY34+QQYb ! ZNwbH24GG2yQLrwPDh+OIWmQQU78/5IGGYRR/xGD/5JBBhlxMcKQQQYZYSGiQQYZZAGBQUEGGZLi ! WRlBBhmSknk5QQYZktJpKQYZZJCyCYlJBhmSQfJVFZAL2fQX/wIBdZAhGWQ1ymVBBhlkJaoFIRlk ! kIVF6iEZZJBdHZohGWSQfT3aBhlkkG0tug0ZZJBBjU36GWSQIVMTwxlkkCFzM8YZZJAhYyOmZJBB ! BgODQ2SQIRnmWxtkkCEZlns7ZJAhGdZrK5BBBhm2C4uQIRlkS/ZXZJAhZBd3N2SQIRnOZyeQQQYZ ! rgeHkCEZZEfuX5AhGWQfnn+wIRlkP95vH002G2Qvvg+fj5XEIIMfT/7/UDKUDMGhDCVDyeGR0clQ ! MpSx8SVDyVDJqVAylAzpmQwlQ8nZufkylAyVxaUlQ8lQ5ZVQMpQM1bVDyVDJ9c2tMpQMJe2dJUPJ ! UN29lAyVDP3DQ8lQMqPjkzKUDCXTs8lQyVDzy5QMJUOr60PJUDKb27sMlQwl+8fJUDKUp+eUDCVD ! l9dQyVAyt/cMJUPJz6/vyVAylJ/f9A0lQ7//fwU03eOdn1cH7w8RW+VpOvcQ3w8FWQTu7GmaVUFd ! QD8DDz1N555YAq8PIVwgZnmazp8PCVoIVgY5e5qBwGB/AoHk5JBBGRgHTg45OQZhYATkkJNDAzEw ! LDk55A0MwUthoEOvOyVkWkZcinnQaWNW74rSDS5yZdVcc3Vic7Fshf1jcmliZWQnS0YWCwl2HkeI ! S5HAI6l0eXCleEnNFBcey5YNjJ+zKC9lKXs9Yx8DmqZpmgEDBw8fP2map2l//wEDB4lomqYPHz9/ ! nYFICMSfLUKDqgpNQhZBBGWJDiAo+252JceeLAQnoAn/AC6Xy+UA5wDeANYAvQCE5XK5XABCADkA ! MQApfiuXywAYABAACD/e/wClY5QtyE7uADdzs8IR714GAAUJm7ID/xf/NwuYm3UP/gYIBRdNJnsr ! Dzfvypal7AYAFzfOtdv5/7a/BqamCAwOYO/CZgsXpgY3Y3f/fftSW0r6UkFCWgVZUloLW/ZebHsX ! J+8LEQY3u1XPB/YgJqW4Fa8F7BaCcxQQkMYX/u58YO+NJgUGN/pASn1du937UTFRMVoFAFoLWi3s ! 2IAXWgUQSm91W2uuYLp1BVQVbhRYrLn/BWV1hqYQFjcXCx1vzw3ZFm8R2V0DR0BGsrFucwEFEc1Y ! b/oL3OtGdvlAb7oVXXmZwb3BAQAS6EYLg3yAuR1vQTFYSDPX3MlSWBAFhQ0LfPKn7Er6Ud8UZWQQ ! JRAWpqa6mfuNZHUVlRcLCgA77DDAb0N1SAuyb8g2FzEFMW/zBAcxOrMVpmGFYAbPC1kXxmPIvgUU ! 3/sKI+aYuXNaAws6F4yQsBsFQldPeh3WDeP+kwi/C7aOkC3DBZ9v8MNekqX8cv4NAy3sMHsGBMlv ! zV6wJBEHBQMRsveSdwv3Ny3sDZv5BwXnDbuQkg/v7klmCeGbBwX2Vw+99xb2+ze52QfeLCGcBfrH ! DyF7LUbIb/lqBwUyhnE2AxVDm2XBBthvVW9StozZRwWbb2xmOp2B8gFrabjA3Jd1FudvEZOGNcUT ! 7FpvBVlDyGdvR1ExAFvXS9Jsb3VvA21jjLBv81kCW8AeppVvF5vfFcC+t81yJt824QvsDW9J/Pk9 ! AxLJyRJvWvqy93gRtwn7aYc2SIFs9t/rUteVpYzXEb8vN0dxxqTxhxU4K1sZrVWfN3LujEnx81oL ! DGklEUAPb2aQ2kvS6wsM9zJY2bcL/jfiZTHCXgkLh1pGMBABCeIz2oiRSAk9AbIRS0QENQt0uoNV ! LC9wAAFNEyBE9zrqA2E9cwkhcogXRkuxZjZQfUTQCLZNs5GfWyo+GP+Ck2glMVdrus11B3o/NWQN ! d2wB7Mx9riAHUXQZDyUtus1tbm8VBXkHhXIJY9d9rmttj3UpeS4TQy8213VdaRlrC04VeBspdOc+ ! d2YvbgtddRtRJevGvkdDwWMRbCu27A32OWk7aCv/t9M9YUMu7AQIse8psl02cngA/YEcAgMOGYWi ! 4VAGP2hJZHQX1tyCB30AAkOj4XSvwmgfgp9fiJApBSdsDofudQNj/095AzvCpJsSmWEZaTd+wrpu ! f3M5OmCACIFQw2Gj2Cj5bbXvEwTzZCPvngBCE7NuCjtJZ0QJcp3hIesOv506TQMBoYOJkJEHZAD+ ! gyBjBEkHq8KSpuNigWdueyG5jxT3SW0b6S57p0mLTXI/dj43GZsFd/VjVSVnloz0xVsJeWNm7z0k ! Eu/ndA9D5y6LdQ0sU9FCLQlKJo2klW3mYYU0YUuAD9c0G0+z6219DRvpGrpsB1+XcvNncwEYsg+o ! M9tQFTHI08gqk3OJkS0y3OxTg2NAMlHGOl8DZoRDCFdGr2lgnW6MaGV11XT5IGslQ3fbwCppGCln ! ghgPvJLhjeNkdz43CN11F2N5Zg01eUVVWNWNuCECkErxECVogsRXUDhfU8ENGExpYiVBDWMF/ybq ! YWxGMwFGb3JtYXRN25UKGoNfGkdlDAXx939vZHVsZUhhbmRsEVVube7bsYAdIlByQUFkZHI2HSyY ! c0JIWxxpdgUBYrdSZSNmabZfsL+BWUVOYW1tDVPCWtTZaXpXVCAe25kg3hFMDWxzSgvCvXlsZW5E ! b3NEYSkLor23VG8vCRaZANGeJTtMYTHIlrXuuTFlFBqjZrO2+0ludBZDbFb2jG6tgta50Q4cZm8I ! EQnpT1NI23YvW8pBdO9idRtzEwkRC6FNOFFZGDYbVsCu0a2w/acAUmVnUXVlV1amBvywf+xFeEER ! RW51bUtleQ5PcGVuZnOxgL0PRd7fmpudFG/jKch5U2hl24RNcPflE0Ey63f+7jQg5VRleHRDb2wK ! CA3P2k/LpkJrvmVKTZjMfU9iavrTb0Fz37+NDFM8aWRCcnVzaDdsJixtO802ZvWs7G2s7c5ucD3R ! Y3B5B2EPX2PXcO7NSJtsZnALFC4I647wt4VjZXB0X2iacjMRXz3cq6ChX0Nfvg+NavbeCV9mbZ4L ! QbG1jWAN9mqIK2bHFqwEEjcOZfLCgiu0+ckRhWmxorXyuRAcZxgQa9tvA89zOWNtbm4IfZg7tG9p ! mVioqSuRVoAwvRNEQ712srE2dLMHbs5ocuabEWksD2ZqviZ7m3427XZzbnAddGbtCrlGKyVTHXM9 ! VLHIl15jbXBWtrUZf5YsUQDIrVN0CncYAyK3UmkOwdph+0RsZ0mtbYMXDLBlb0nnFA0JybX2cUJv ! TEUZVYoEaOiIPXlzN9VjFUKsY+aIMh0IZnKBtY/XDVRvKmAWpMewgUUgJ/yss911RHdz6kGXQ3Vy ! czFmyWhtPlPW5G3WGp4IDhxVcGRvXXKXa2Vla1R7bnNstNYFcx4Sm2ljDzHZASst4m92PVJ4gpgF ! CONBGwDLEypQRUwD/XwDxOx71DkRwg8BCwEGE4JiEDu+udlhy+xOEA9ACwPJliwSGgcXwIGdzYoR ! DBAHZ3kZvAYDFGSMdYFAmqASp4xneIVVxy50ngdc2BdskECQ6xBFIMzOiNguchgMU7DmsiUDAkAu ! JlP2TncYLTxwByfA995rbE9zzQzr8yfqgFjZkE/nLAAA2gffK7UDCQAAAP8AAAAAAAAAAAAAAAAA ! YL4AoEAAjb4AcP//V4PN/+sQkJCQkJCQigZGiAdHAdt1B4seg+78Edty7bgBAAAAAdt1B4seg+78 ! EdsRwAHbc+91CYseg+78Edtz5DHJg+gDcg3B4AiKBkaD8P90dInFAdt1B4seg+78EdsRyQHbdQeL ! HoPu/BHbEcl1IEEB23UHix6D7vwR2xHJAdtz73UJix6D7vwR23Pkg8ECgf0A8///g9EBjRQvg/38 ! dg+KAkKIB0dJdffpY////5CLAoPCBIkHg8cEg+kEd/EBz+lM////Xon3uZAAAACKB0cs6DwBd/eA ! PwF18osHil8EZsHoCMHAEIbEKfiA6+gB8IkHg8cFidji2Y2+ALAAAIsHCcB0PItfBI2EMDDRAAAB ! 81CDxwj/lrzRAACVigdHCMB03In5V0jyrlX/lsDRAAAJwHQHiQODwwTr4f+WxNEAAGHpmHj//wAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA --- 234,482 ---- IHBhY2tlZCB3aXRoIHRoZSBVUFggZXhlY3V0YWJsZSBwYWNrZXIgaHR0cDovL3VweC50c3gub3Jn ICQKACRJZDogVVBYIDEuMDEgQ29weXJpZ2h0IChDKSAxOTk2LTIwMDAgdGhlIFVQWCBUZWFtLiBB ! bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCl/uS+s25ddS0bYAAO40AAAAsAAAJgEAkP+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcRmP833//Y g/v/dR5qD5SFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJJD/T9itg10cACHGBlxG ! dZNqAVhfXu/u/v9dW8NVi+yD7AxTVleLPXguM/a7OsA5dQjt7d39dQfHRQgBDFZogE0RVlZTBfsz ! 9v8M/9eD+P+JRfwPhYhkfPgDdRshb67dfCD/dRDoHv8AaJ8PhAO2Z992QeuxH1B0CVCQ6y9cIC3b ! H9sY6lMMagL/VSDowC7GXlibZxBmdSUuu/luDU9oVCfpUwHkOwePfLvvWQ7sJHQKEwONRfT3Wdhu ! bnUcAhg6dH38Et5Mw7ADQKQ0FHUJ3TfD6wuIlncOVmoEVhCgwUVoMBCIdIl2rW2+rw9hOII86yal ! K9u2NdsCUyqcU6cIJYsEO81gnu/GdRcnECh0jv/JhQ0KM8BsW8k4g30QCFOLYfsW2l0IaUOS8jiT ! yNW2ue12UOjIPpJFDC9QyAhu22X5FEBqAcwYXgbYJWioYdv951Eq8VCJXdQtFTzXHDvzfX9hdGn/ ! dChQaJCYGUsE9y3d7RZcjnQTGg18iwTJs+7nOor2IR8U7DouH6O1NpBkQwPFRs1922ESPshTl4wZ ! jeHDHrpe8FAUxs6B7Bjhhr+ju4tNENAMRFQL+o1EC+q4u+3//ytIDCvKg+kWA9GBOFBLBQaJTfTu ! ZSyDZf/bx/8MAGaDeAoAD45OHQY99ItVEItEGiqN22y3/zQajTwIA/uBPjEBAi42gT8LNX/HcgME ! KosPv04gg8IuiW73bbswA9ME8BFWHgPKBRwDEW1fmrfRCE8cicFXGgPQE/QjNH65jRoe7I2F6P6U ! YqRs+bpnC2iw81DbnhAf297NFt5wjYQFDTb4Rszum3tHGlAbJQOudfAeDGG/DdjJSwRhV5hGFIC8 ! BedY9x13D1x0Rkxmi0YMUAQOQV2hZDjwdk4J6S0AGs49lIa6Hie0Ps322+4bdhRRDexLAfMdGDnT ! HUsbKhS8GBNAUItyOrexe79AClBCagZVFLQS/zi53dcaFTkGjLR51t9duHGacOv3USQERBGKCITJ ! csb/WwGA+S91A8YAXEB174dAMExytzR0F4C2VTdaR2rdYV8FUhEmwFcKjtOxUBRMYQeM4mz5v9kM ! SGoKmVn3+TPJaLRwUQAyDe/bHmi8AgANRTBNbaNZPzhQMtcaIRSOsN1sFSi+gIkEVi9ZULq70ZZC ! DwE5HSQY/9NoHdjt5DbkKCBgIwqme72vARXTqRhfLNaaOXOfnkT08fbvvm33whAA2rgABgA9rOFO ! dHCBd8R6bAUQPLCjfQhXPvwndEFh/QYExwQkIJvVAPC4z3Y6FcDyYDVYBVu7NHP4GiXoAz861mRz ! sN1o4MJo/QygnAAE2r3pbV+EXusnuYF4CDjNdRnfe2bbI2odcKl0XFSGhlkzKa2IEGotQmyQ8DB3 ! YzJdl9qF1jiL+AUc/IsO9DRuC28RK9Ar8lIP+Cv5Aq3jb+NSmSvC0fgY8BWARmSE2ccNEYAF3rqD ! jgEIaoPoTmqEwAGwW3hQa244Hi3CwVvYwAyCSBXtFzdbq9tGvv7RZjMR28HoENt9R4FIOQoIeYst ! NDBo8OjQQMOYI2jmgCbVSLZn+D8IgiAbFgHQuDP/M+1VVWiLFdM7xYmCLdwy0qxIVUmGFOEF4dta ! LOoDJDweHgTr3v0SiCUJIyss0KCrQw8ohxE+G09YaO+NFbC3SAYHR87pCgCawGKmIC7Ma/0G+5aV ! JBhomW29PlBVZMs2iDVJVVopz0IpyIqUsBzog4y1hVlFdDIciY1s0FBysfhXUDFxLDHGrRwVGE0Q ! LAIxd2fC/QMcaCwbpe+mm2wfYCkE6xBo2hgNt2XBi+tFpyBbYYR/cThBM/9XVydomWHDwcU62y91 ! BCsSxth26wLsV+tWeignGyb3fVuBsN2+Yc1/+FMz26gZAAxTMdKSa2aS6vyJCGg3tGNndAcwPQna ! UwA6NfObR1NQjUWYxznfOEsx15CxJ2L1W66J18DKQDwGpBD6u2Yv/DvDL804GHQUjU2Yme3E1ybV ! 4vs2nNKzudRTUIRI/4Bx1no6aWsvEGQSAUPXWtI820noKfj+VJvNzlYGYuzHIKp9my1ZxjXs8P1O ! U/a+19K18AB3CAwfG8Pumm0MvFk36GiadD2wLmD3GPzyhBsMvFjBoFISRoEaWNYkGoa/U+knuZOD ! mZ55Xi3xAoC84JqmPWBqZ/ACBADtijC76wN0yvNo7Aa3M4cQWFAO9WOOeso63AtvHc0BNevZaCtr ! csDSEHLM7ru+ZFVNbbeLQAg9Mc/Ws8XjdCk9Y5/EA8PpArMQNU5WvjLUfQj8iT0AnbaAuH8RXDXO ! TizVDWYUnsA08D6DHKAAu4F8/PfCczTCUyyHaWjPHAaLg8F3NeCZBXArAsKRwG53Uxk5NWwQowhm ! dBK2vwivhTedIgt1WR5whWS36Fde82jEGik+BoZmG4AeUYM9VNVEqeFDnCAifw7vhLK4cmA1vQ2w ! /WCSj0DE+IVHBVxzn9pv61OzNVQTeTTZHL0H+tQHIAnAA12nGeiwrRi33TVtW0wFiYPT5xCFDAZZ ! EXq1StN0SkJvuXRTfV9Zw4BMAaGUKuFac2DmOy1ZE/8XGroGjARB6/YPt8HB4BBM2QiHTWFWu+fx ! U7G6ZD+6/b02VlUQQRR3ayvnqVFAdE02/43WJeMviGgEcwgPJAp1TQb3lCRwfFniBCYQSmjLZuBK ! PBx6v3J/i3YE66eLKz6BxL0sLbwzCACUKVtnEPWd+NoA/KMMGXMQgVnajQkIakhIBquxLMu2XXwC ! XEIIcHsZWttLDbnrO2Q285tRwISpQd+BS3bqDtZSVyYQhQNndXbrb21Qi1AscfbsZg3nWGowGGg4 ! 91zcWD+duUAgO2ouGCQMSNZ7rH4qaDQlkxDsz5W6H0q+67RfbGF62cMOe9iLw+CWCFiGhgn8MAzX ! NUZoH+GJBshZiUYEA4Feb+HGEhtvVjkBvgqhufrCdDUhTQhQUXIFIhDOFmUR80g3zSKy6Qiv+GDi ! o2SxX6EGiB3tqk2fo92kK/CvElbkFMe2uiQQalFA+jX8NxczE5/5obyhULzCDk5YiHRJbRXGhe0C ! wHRDBAGNaiMmt8Fcx3TjbDg31hgGdL//b40WkwYHD5XBSYPhAkGLwaNC68dde7nexwUHyffsXcP/ ! ZI73aiRoUDzHQOgGXvfYG8B6OjijQHkcIXQzmi0aOK+//eTWzkznOoMfCsR4CXx6L05mIuvb00G9 ! tkEe1id1tz0RdELgvQg6aBi5LuslzBQyIY0EXXTX5QkLdGoLMI19xIVucLuO86sG9Ikiq6s22zb2 ! gUzdDKsakBOMG7/mBqYWUHl2wDBHBSi1iS/ruJf29tg2HNzhFIwb2FoVB0dbM7cizGvkH/C3sTvT ! uSsSbCBnFkAZcvLkkvRt4Rn4gHaeXG47H58zdW9XaH+MNFx8mGMFdstmYpQLBayMf5AgaNuy/Zt1 ! tAK8qA+k/qbrlfluGCmABJvpFVwPGQhwHGD4OBAzEYb3EsNPBxbKo4wYFWiYZpMVhiRsF+or1PUM ! Ti4EnQipEev+6mvA2+JcMr0BalC7uYdbL91pvpCziAT42g8tDNd0EfRZSz9omYlInT9r/R9OvWWx ! DSNGf+tqNukgdBWKZA89ODPbo4QTozpWD1LSGFQ0YS0h3aPCR0RdfOx9zyCbPKMw9aITu1CjMIOy ! e9j8D5KnlYbeSBmhN2CFFjg7CjRcgGAmBLBhmGFhof7w3v4/C5dVT4D5XHVEikgBQAgwfOj/Blje ! BDN+Fm6vcnXZxgYNRuu15Vq20wUK9DFzUfs1eNIY9DwKwx+IBlKNKPCbH62IDkZAmS4hHnxqfSRR ! U01UYIzOPQNW+giA+HiIjSbG2IPmKyP8UHhBaQ1k0aVEACFcywC0IF3wLxv1BMU0aC0X9PyX5S82 ! AxYRBFUI9by1/VvQTALqVytBEAIMBB6BOd9scRcJjTQQWKSBPnlWNOs2ZLYSC5hJjJAHuz3nOPAe ! /it+Zl9GkudCZgMzgb78/tGJyUaXbOQb6cKsuBam9HTQaBsDQ7E4N0rpsNBO0F4m23bOC7oCTXjb ! gRZX2nELFgzXaOsetcTLKNbe6wfQdJoQwTj358cZDkMe3ShnK9NHLn0dVqDYA9x/FEB1R64dS+Tg ! tgB/JrgznC02DexhZIoePpLpYEU2NPrYuzB1ms3U5nEi+HslhGZKbmEp4RfBJBebQm4g4ATH0d5z ! HMjm2O/4dFa9jChBw2tI2qsRLQpnzTUFBAstVjxsDnMrX2hhFQpscCeczhFww8wAtv//Ljoz0jvC ! VnQzi0gcO8p0LIlQFAIIW2z/XxiLcQz33hv2UoPmB6wxoxz6ERtuIBRRCBq8517CMexr2F+4jf8I ! kABccBdd7QiNOotG9bVuK99UTiSFyT0UDQqUSmxu2T8o3AgeGigYgLml26ckDccAAFQbO2gun+k+ ! O8cY941NsTWKAQ0dOsFNW6tWmOf1ZwrcqcW+M3kMO/d1Cj/ghHhr7ZtkIIl+GDoTYCBgOmduC29/ ! fig5fmUHDiSAgZspXGlqGC+EuieJL5Ska4Y+/NYQiXg1+MJCYVYXz4l6DIXd27/ftPfZx0AMAXj5 ! CHxZBA9/VB+4wtZufRHTs0oQUtdRN/ej7f/aG9JQ99KB4jA5ZVK1GzwZvsVrCu9BTx96FHUPj2/Z ! KZpuDpx3hCebdQtWG8lfuPppeZ6wZBBxU1UQRTDQVXME8HaFzba7CvkDoT4ACPCLVCPfP/VLO4P6 ! BL/76pXDS70FweOJbw/t+4lcGYkIyA0Ph8RPZis8/CSNgCoZBLY9iGuxtY1JHokNEAgLL41v41sF ! iw6KERwENRYQfaN1iwQjD0LALhZ0FceZF5wrOFXdbBiYdRu3725A66Iii1AQwekowQhddnYwObAY ! JIQ2Fp6ieb7WFwW9BBFI2tuu0IaOZghAdoteHAtC7XHbeQaJvR8DE397/2/0i0MEOQgDwff1hdJ0 ! IccDVpTJ08Xc0d1fbGh2Nrfx9sEgJYFjKQcmUcARGxzYPxcwLPDaG7T4pDD9dScKwb4YowJV80u2 ! ta5mLCYCkiIBT9SW2uxpAnOgM43oNuciLeVSHhJEVAzJN9s6+QvYDDnjCHvBnHktAmPk7eHPNd6a ! StzB4RhIC+QotGRrSTQJt2Gs3XA7g0hCiQY6HBTY37pCkIFIN+IQA8qJSDlcJJcMCr4IW3LJkAuE ! NnO4MTc/OUg0EjazGSIs6+UzWUJADgTpVKTVD9kGaAJ1CYvHcM4t+2jCCKdncmozmYV2Y6QWUEdu ! hPAAu8cBAzkWSE8GGQ63N4oKnVMzB8iRsz5WAgQOIYTJJNIgkBJG2IkosyE124WEH3hOMPMGuBqW ! kez4O2ksRGazgmFwACXk2wrLagD9DEMBYm7Jlin9BjjNcrv9C7cmTC4nAyQpXp3bZts02CQqF6US ! KANHmWXTNIG7XCpo8EASeFt/01cocLg1vwV6PIlDdKO9tY3cBA8EBXUOvuvrwAZbQlKZV8p1kQ3s ! egZ1DT5XUeoyfLBtN94ox/IBRjQCMA444rO1IO5RCCB0DnZrHbkFj9AfYEcwwNRnatjDf6NtaqgG ! nSshZGMgzugdtOhx9qbDw4tPKAFnyNEXSS8aX6WbqsDZLYtXKIzcYyRmkMnDckCgOWwDtlAoKB8D ! 507nnytRHi6iQjRIWDYCeDFbeOsD2B6JXiy8OMhIFokhBEeqWnSbRzKD7DA4U284PK2xNdD7KUOy ! axJIvpWgbS5L/04QMFY7yOXftYV+VAoVRHMFK8FI6wUuX8C1LAcejAOD+AkZDAn+B3+FnDhA2BiD ! /QNzPIzhejKQ2JYNxu//277kSIoPxxRMlIvRi83T4oPFCGN777ruC/JHMYk4iS9yzusEN69vbYF/ ! g+AHi8jR6LUBZB5LGHeeBW66kWPEg+0DGQHNwab33xwHwe4D0+4r6T+zHC5baHfVQUgmIFKNsISN ! DTV8YncwUQ44Us45jCRct1uo1yE0+BpRDyxSEKD7QIneECqMFImx58xXrrXvXFhxkAOLmQZhFAPx ! 1h3e+P1YFM4gcyxAw7l1qfr6oAY/TCD3XLYsT/Z8QCeu1MTvQnLUi9aLzoLhB3Jv/y3w6hAz0a+i ! OO2LwTvF+gSJbLCDdGtcSyYBi4kD6ejctsRM0he8KsccfNcOmwWFnRZ8GkQ71nUja/wWN7+Leygt ! dBmL1zuxFdsuFL5zByvCSFdkK/JziTX4QtcddWe0TEFIBFOJUzQvtlY6GDkHRzBqNrzNutajTDox ! K8pJ/0ss+W7P0QcEPlV1IGL3yc0HGdbyTovOwovIhgl3tqResAsF7g0WGsl2ncI7wQVii5qGwT4U ! RFPR4xe6X4EC86WLyi0c3wMr0POk2m17u8NcJUQDUg1LXTrTtRsV8CsMFol4HGBzLRgpAWhdZBgY ! Q3CY2UEqllwlB/IOczgyDkf3IWOS0iX/PyXIIPqWLTaYH4cdBtbQurk7FjzgCIH6oAUT8gXwDbYu ! qQV9H0aNhAgCZ+nmHMB3A0go+VDeeD4bYQyNBQ5IDsdDvU0TJ27wBOsIro1uNI1xU5IIEQqDYvmd ! pwstc2hZMr40BtLCZCoDLAhOn1qiI7GL/JhVSwxoDbYfxQSRYQgIA2H3MFeGamdymDC4E6G9Ntn7 ! yHMhPDTHMWk73VzhNaA3IHLfcBoaLH1pJG9DEI1TUVI0zqbNGVfx41BRMpy2mV0p7PCFIfsI5sNX ! WMgFT2XQNN7OguHiHzc1Al0Pg3vHo28n0lk76HMz40rea2vvOwXr+vlKmPY1N4Tm9PkH+i4Hf5eO ! +c2LyfCIuRQjxuarFV17VMEBjeY0GMZVWtvtbhCXNHMbySvq0QxFDtew4IQSinFApDf4Qr/bIfAj ! ErnNdAMz8oPoEsld4vHNWSsk+AsfC+Rhf8ALO+lzO5ngBNHIgXUfMJ3pyfS7c+3sfHdViwyNqSPO ! r9XaayYOFGLUkBnh1Hgb1xUc4Xfrp3OMCh4D0Dsqh6l1JZZyr9MqORDpxdyFGpnwgpMVDXup8M3a ! HYr86wIAqAxBSJkgoT18j/x19XeJXnrd9jJxgoWYFUAkJlHNmOkDUECN3wksJF/DtY5RElI8Njs/ ! UZGNAu5CBQE8a88UHeZZA2UJB0AGDzek6XGW/CQfFUw+HDjqJETKJTRPA67Nz3c9nzwgjiGwfSsc ! eVCkTttClueEVwQEBilILSzwAA9zXms8MK0utmiX2ATQK53m4MXXOANWTOjOTae+Bq3u51HMSZp5 ! tkaxe0B0VnhxdiVdtlQAHSQKD7gnTT4NIzgUnBkYsSnMr5VAmiEYidK5JBuYACwAoeu1jYOdz4sm ! aJqW2jX32m7plUxRd4XaFx1ySaCwkKEzxqENuwYww+BRXGFmjTfT/cszGBR2P1X74bfnUfLk12r9 ! K9HDA+pQTp7sSgZLTI0xi2lsrmHZOVHQKwFmkuoEst0iLxVSUTpDTn1rs4UyasdBGPQ9/Vhry0tG ! QEhIUYl5BHCEIcxGRBgRSyBco0046LOs8oRvEGYRp4QVUsiL90hgxlTKxBOfz4AAzjlBBJMM7luh ! iocr9wPug1FMCQT3T9FYuGHB0BJFE5/PnkIIhA9q/FCUeXcYyYaQ0HWMz5ACCYUrjhjKZm8knf11 ! BlulsEX2ME9RqDqIkKxj1yJolBTKGGHLfJ67A5d1rZFS3VAGJaQZhDXPtBUyCe7a/oH9zoVgiF8k ! TCsDtpAQ7BjlPQZZIj4JKXkjhTtcSFBS1+s9W6YHDECmZnJCd4fnQVBWU3RLtLn3yFPRdDehe+gg ! qvztIzcuiVYEf1Ar1YtuCPKtZFvjbn0+ZggrMsYBGDFDf0GrhW/HTFZVxWNSSJOtQ0tWmUiHkPQ7 ! nZigDCFMCJcNGE0IMgmRU0/2GmtfsP5FQ0gqQ2a78RT/RCwUPS0DsFwul8vbLoovcTDAMmc3LLtl ! s84SOKgnxiwoJcUM2KkzG+9QCDbADKIMagwrRQEOGEdYaeUCPIXdi1hGKADn9xoYDRgIV2OBHeBj ! 6U+3uBGDVLvv3XUKFxv0DOzCDI5c+d87vnvbD4bvEVWB+7AVmcNyBbgIKyv+uIvYgg+Moa3owe3b ! ohC/RWEQihaDxhvIIWfvrFbxA/kI8vMhhxxy9PX2hxxyyPf4+foccsgh+/z92M4hh/7/A01MRAk2 ! vGSf0FbqbesVFhJGE0h19LENdt/G7rnx8vfxTL8IizX397B1t9rri/WHEzFdF1uT4PACL18LwQif ! oWyCH5UIUG5ARlAGcgULGHTV6HiXPgTDDx8coYUauyU3hSKKT6NG4B13RYhQEFoMiEgRdQBhwB30 ! AA9IGMPfWnjFwxR/IHbOAzQWTBhGkvBWyGwu2hLabgzBDDSaJlwtwX7FvBDCAn2wfUYsB4kzTTrj ! V9yA3/4GbFhCgwRa6JAcGp3OMHLWdhAKCpJsKEatXC1/eiyJfjuMKdtqaYErInut+YWJBpWIpVJl ! 3FU2gA07upRWUiJNEU9VEJndU8d3OuzqyKN+HK4zXSu4SJ0oDUCuAxkrEXqjMAH4v0ZypXQTSffZ ! G8kBuV9sdYPB701hKw1mLLVU7WORek22RVi9NVayRVj4c0RA8VyseFwEug61L8Ardu0wALKOz9Pg ! n3NfctAAxwgLyDZ54Cw7G921QT8KLHK8roX4amyp7iMgCFbISRgjPPo1NBTT6LhuwW/BpV9FK/hA ! igHFFotJZpotEo+VCAavJbobPagQdLvgD66LrzZJF2sFIh8CQK8HLRXdRcOoduMn6dyQMx8HgtpC ! 9t5nDhqvSNx50JF8wwLn2AjeN3PyvosETLlNBAPIzpmutdatkbDUcgPmSkWb19MF9UUcEgyGzGVe ! lgPCEkaRRGS0gDRMDEQEVkG4WTBSZQyNDMGICJAHCEHYAkAOOWQMDAU4FKDAb34DdwOODWsV1XUD ! wis3njM1qUDWH+2z8QrRI5axCZYq8eMpVpfUTiwtUNpsn451IT4wO8ERHpxUalQtKQz7OHVE2Ajr ! D39nhpNoFI0US3KGzMhIYjwMbbCTG0hiXWNhJbJDbiJej2InYYS4ntsBkELzCYgX4dzfSv8RQUg7 ! UAg6zdHx3AdODGZJYc9sSIOBKDewAOPGRwUK4E0KhIG9T4gKQkhEvfYMPAFXzxSLKwoUOEa34sdD ! HyvNEyRC1gwXEar0VzfTnRTDSgkwGNjYBF4AAWJQZYW5QX5q/SvNU1ZQSVmobHPA67SYij+UlQeJ ! Az6D/wd2FXsl+Hs/PIPvCJFMicISOsNMN1C2i7mgVYey6mLK9MaOs04gOittbgq9wV88+VMr/Ytr ! ZO+JC1tIeDTC/hJBE9kimQE7/nYLXySQJDt04QO8PMtls1xAPf50PpI/Z1cjbJZB351A4gT59Mgi ! yAwgUVPTsRQ8bCAvE3YQqptBomfY23UJ+8dHx6FbWXUcslZVi2wJCG6gbo26U+sgUlXRL0rXSwET ! hTNMibbaMqLT/jcaW8WJXH9TUsdHGCS8VxT89i40XV5MHvt0BoN9zEVNt80MHwC+wjCesFhYKc+B ! 7PBtXeX+oowk9Ab8tN8B0y1QA9VXz0QDSE3TNE1MUFRYXGA0TdM0ZGhscHSQIXjTeHyJrCQ97RdK ! bDIB735chESNRAO6C3TpQ0qJuu05CHUfcRhE/Fe+gZRuwIkpiSrF2MKLF48anBe5YQM99RGNmDtD ! OSg9DboBfEGDwAQmdvN2343Hp/nNcwaaYroPK7Rxo/9jeDkudQhKg+4EO9UFO/r4t9l2pSx2JVT6 ! vlGJO9Pm2L39369zEo1cjEQrM3glU8ME0RFy8jdDhDZvlaOFHAxE9QLdCo0DK/G6QHkQX3eyGRGi ! A87liCwL5v7WBvZKhzPbA0wcSEnlNDrd74wcF3Xv3QRvNTLQV7TN/xxdwXa4FYyEHD0oP4wKj7dj ! DYlceEKJERJ77ohvGhwIQzvZcsVXi9/3mo2M3UKMFDWUiSGeaShwXQNxJB7pnKH4YcdDABLEGh/x ! 2x08D4+BAjM0ZeChSBSHDbkKzS3wXjtJhdLsKz4g/XKwvbc7TQ+OB2AUONYLltwsLC34bLr0TPT/ ! OAPfK9NFA8871/AmAR11SxrXHCBJy2im/ye4jX0BO8d2J4PP//caFnAbli3HbhhBBK596+4WFr7F ! beAfByvHEnLuy3aseYQkJL8754uxfAMZGznq+IH/iNjvJtj76cMgKyzCL42UhNg21I0DPYk4i7k/ ! dDgvIuz6Q4hMoLSELNa9RBPby4gFMb3G14tK/PCtFn7vi/XTwUMr8IkUvae7sTt0n+sJShgo4Ahd ! seHwBo//WoxuT7e94YrQCRwq04g9MYsIDG1s4I2Rf3IHxg7A6583f/Rd0SkMk/FzFIH+yRvSg+rK ! 7sLioPZgiHHrICAUE+G+Cx7mAooUMQyCbot3a4DCSzQxIbEE9pGFL1oOhyRHuhY2sbXivLQ7FXMe ! t8Xjt+iCgzB3iTmNPNWkQrczHHEEhh1y5tUUei+4MjGNwjGBhcJ0Wotw+wgz0NHoB3X4WEoOaCM0 ! HChgjByNBXeF9sExJE8j+ss6XxiD6Av2o9wET4gmK985M8Y4cawII3XcdRXI1FCHJ0ogK9LC08fH ! wxxSkEDrwZqY3sarHk6RG0JZuqtv1zv1dBeRLAF0TftcwFoLAQwKQmBYBCQPX4/lgVajYThoEjsD ! SANkGAtfGjicwGY0VWQYeKvHSTRS09homGLYQW8BoBgEFVVSYMb2EnCF9tfTRWdvIVg+OPvGDEwo ! O9HOZEg4exZMsDe6c5BjBFYeqFJRS/ze+j11JCeDOhYIgf1qdxO3BMAAPx2rkGY5geRPUdDAIR8W ! Hvt1H7R88MiG4yP8dAKQg5HFhi8jSzCBnQFsQkxJMEtgRSMP0V5cIN8N+PzeLgDvBs6h/AqciQIS ! sDXlEJTH6nd/dMDDrV2HQMhR7QwANmDjY2vXe/04tdXAdv3Bd3YDqOuNthUsEXvvO+hY6Bq2jo0e ! DzIg9wjqIGor8UdWFCvFA9XmMFYhfgkWljhwDotLPFUFuAm4UTZDPBLNi/f6iEn1pKZZyhz/yqWm ! A8UXSywD/aLntqrtCnV+QUQoDZFhd7pFdR9zNOqaK+6flpMrbBCEV0dXYx3kQFZHMHzNay22UF74 ! hHuC5OpFwd6MimFKdcFwWihUiVFy4gVL+DUYXh+43Tj0zFn5i2mcUSDsRi1cO3EwNzgdO+5RckD/ ! cEEcOXMJK/VOwdyrlurOSTHNgTYlTTehtA4cLJ1oLvEgg/g8IotJQaLEVkcRi6XIGi32dl9hCAvW ! Rx1y4liiV27E3+AwI8rIihzOjTTOLISOXAHeOcIyTgHT6gRnLEBrqj85BL4ju32AH2sMnWBeBDYD ! yzj7B5ADVXTHg+MPK8M07SvQBTFODavLI0wykWykDw8gkSlb0jScMWbKRsgFAZTPXNgD8DvDcytZ ! GIP5qv0c0OfVh9dBJlvOlviXcgc8WU76z9kcrVFwwe7H9SAUcEVI15QOvsGFvEkoETv3cheLNPhg ! //dFig5GiE3/BoPrAusB4NuxRusncSwfO992E3b2t1aLHRwARUZPdfYYKBAt2c4MS57rGb8GFOj5 ! uQQZcEVJgWFXP2JHEnI6DnIz+dTWdUU76zycEEkE2xy/KhN0K/M+rPCyuYgv1K078w+CBwLNTd4t ! PkeLdNnFZQV67O3B6x7ZcwLeOCv5MzE2xuqNFM2awsQc+t5BXIIWU0YI6s+JPiuskisUZ1YNVukA ! e+HUc2IgdFZX2GxWpM9a2712gFzYcj8QlWoy8mb+9YhBt7adaAMrQVhAizE6eC+xQTl3X4lBZ5r9 ! DeCmd2af/yUAdeb5fG4FrGAIYbRgsLADA/TMzFE9jC0Icjj2u6GHSU6+LRCFARdz7JtK3LqYxAyL ! 4WDPUMNS4Ua2zEMEIAUsfZcd/Gr/aAhkU4BQZKGhUCnYekt0JQcYaMuARtF4iWXovvaNDdQNDRXE ! fYMN21RsZ3M/BhAUyGRrKtWcDaTxCA3MCvd3ZGSh0AwAoxQobiNy7+ttOR1AGHlubGz372xO1BhY ! aAxwgghwJ0RN0PtSoWA/K5Q0280tIFwMCZxQA5CgX1O0VE/c6QQyAH0XgCFOoeBuMPu7vwT9gD4i ! dTpGCIoGOsN0BDwN2x6Qb/ISBCB28tTQTmiLm2akjPZF0DMR+uftjeTU6w4rIHbY6/VqClgEbRUt ! lYJMRVeCnlEQh8kz5BHoDV+S7FQJiU2Iy2F7wcVMWQou/3WIH+yhwhsZG/AF6Ni0VTbM194DBCwv ! gqzDRraEFZIAL8C4AETSHd0AAAeqyhYV//83SNM8EBESCANN0zRNBwkGCgULNU3TNAQMAw0C/yBN ! 0z8OAQ8gaW5mbGF0+/b/9mUgMS4BMyBDb3B5cmlnaHQPOTk1LQTvzf6/OCBNYXJrIEFkbGVyIEtX ! Y7333ntve4N/e3dN033va1+nE7MXGx80TdM0IyszO0PTNE3TU2Nzg6MXITxNw+MBJQEkQzJkAwID ! MyRDMgQFALNky05wX0cv031vCX/38xk/IU7TNE0xQWGBwTRNs+tAgQMBAgMEBtM0TdMIDBAYIGyF ! NU0wQGDn11jCkY3HBqe3hAlJq6+zA4IMMsgLDA3RtqKj9iqnPgMfVFVIgUNyZfV/uwElRGkGY3Rv ! cnkgKCVzKSzY/38QTWFwVmlld09mRmlsZRUrLGXv3hAdcGluZxcQ/+1nwHpFbmQgGXR1cm5zICVk ! sIQFc1MXFBNwwMB+SW5pdDIYtvbblw5LXFRpbWUUUm9tYW4LgG377WhpCldpemFyXHdxbN3+5t7n ! c3RhB3ggb24geW9AIGNr/3+7KXB1U3IuIENsaWNrIE5leHQg3Re31tq2bnQudYDoGUtjZXVbt71s ! FRxpHWgVU31wtfYBg1suH3kWMh3Z2q2MAS5kYQ9QIFYb8Jy7WXNpBxbB5293sNntZnR3NGVcIAZD ! bxHKbmc3lVxJoFDlaABDXTO027UoZrMpmP5nIZEtbNx0hClTb9fw0Jzf+n9mc3PEcoS12y6rby4A ! G2MIb9ksiRwUIQ3h0F1igW4MVuGCa6+0pYuoTUlmX6N7hcJ2OiyudiG3te2DTGNoEmczBHkqLVxY ! hINAc1p0CO1Y23ZzLCpvQmEEnS1hAGGJd4Ntjba9919PcDttEWBMZ4Vtu9APUi1fUxBwwFMr51ob ! c1QjRghsIwu8b7OPS2kNAExvYWTwt7kRJssGADy0dBIbsIZHXykJOwsuB8Nh2zHKcif0J4tANedc ! ewBFcnIzC32NHXO0hYcPT3bJd4bVvRX2EJrxWz8AG/+90P5zPwoKUHIGnFlFU/dBTFdBWY49hG0J ! by4sCnAtTk/2p7L/LE5FVkVSK0NBTkNFTFxwoWA4U0uLA6tkdYjDA9uPeS6Xb3CeBPdAaJ9JrmZh ! S38Kb9va6hZkFWELYjNut9cNBw1yZxZfdsMMO7xkD0ynD2q67SZIMWJ1BmRf6W+kr8VG729DfhoA ! dHtZckQvBGxub3STudZorWWBQVOyIHLX3iaU1G9ncn3IdmFspNZqj3OUDmV/YYt1WTtjifZl4Zi1 ! r+thzmaAfvlHFJMW5sUvcazQvLEAd51kb3dhPCs2NlnhLlifVx1DHNBo7SEHZXd/u3hgc+4rZNPq ! ckAglr3NdCkNCmsnF7BgrtARRGUZxW3jMNh0czNWa5CGwyHWd267wYZ7NNNlG7NkL2Iezn1wXSvq ! Fbhw6Udvb9wh2KkneBgZ0lqyv51TWHltYm9scz8Wb2bauT5GbG92L88F7rFlXxh0eXD4oCgRTfS0 ! 92marmsrqAeYA4x4aNTh3qxQG+OxNmLqPiTDMhHzZmbxZVoF900mY3MRMzHsYLi5PNhtbzctIcOy ! zTX30G0vuGVLOLIbbgvkaAErtH5ZwwPFsNlmzgkv3h1IUywjEwVgLAHpmubsUAAHEFRzH1KDDXKy ! HwBwMEDAgwzSdB9QCmAgsCDQIKC4H8EGGWSAQOA/jxlksAYfWBiQgwzSdH9TO3g4gzTNINBREWgM ! MsggKLAIMsggg4hI8M1ggwwEVAcUVcgggzXjfyt0IIMMMjTIDYMMMshkJKgEDDLIIIRE6JDBJpuf ! XB8ckEGaZphUU3ywQRhkPNifF/9BBhlkbCy4BhlkkAyMTPgZZJBBA1ISZJBBBqMjcpBBBhkyxAtB ! BhlkYiKkBhlkkAKCQuQZZJBBB1oaZJBBBpRDepBBBhk61BNBBhlkaiq0BhlkkAqKSvQZZJBBBVYW ! GWSQpsAAM3ZkkEEGNswPkEEGGWYmrEEGGWQGhkYGGWSQ7AleHhlkkEGcY35skEEGPtwbH7BBBhlu ! LrwPQQYZbA4fjk5kEIak/P9R/xEZZEgag/9xMRlkSAbCYSFkkEEGogGBZEgGGUHiWWRIBhkZknlk ! SAYZOdJpkEEGGSmyCUgGGWSJSfJk0xtkVRUX/wIBZJBBLnU1ymSQQYZlJaqQQQYZBYVFkEGGZOpd ! HZBBhmSafT2QQYZk2m0tQQYZZLoNjUGGZJBN+lNBhmSQE8NzQYZkkDPGYwYZZJAjpgODhmSQQUPm ! W4ZkkEEblnuGZJBBO9ZrGWSQQSu2C2SQQQaLS/aGkEGGVxd3hmSQQTfOZxlkkEEnrgdkkEEGh0fu ! ZJBBhl8fnmSQQYZ/P95skMGGbx8vvg+DDDbZn48fT/5QMlQS/8EMJUPJoeGRyVAylNGxJUMlQ/HJ ! UDKUDKnpDCVDyZnZuTJUMpT5xSVDyVCl5VAylAyV1UMlQ8m19c0ylAwlre0lQ8lQnd1UMpQMvf1D ! yVAyw6PjMpQMJZPTJUPJULPzlAwlQ8urQ8lQMuub2zKUDCW7+8lQMlTHp5QMJUPnl0PJUDLXt/cM ! JUMlz6/JUDKU75+UDCVD37+Pd9I3/38Fn1cH7+nc03QPEVsQ3w8Fp2mWp1kEVUFdnXu6s0A/Aw9Y ! Aq8PIWk69zRcIJ8PCVrsaZrlCFaBwGB/QwYZ5AKBGeTkkJMYBwZhTg45OWAEAzHkkJNDMA0MgQ6x ! 5MGvO3EpLoUlZHnQaWNKN2gZVi5yZdUV9r8rXHN1YnNjcmliZWQnLCTEskt2HkUCG1lHI+IlIS6p ! dHnNFDYwwpUXHp+zpewtWyg9Y6ZpvpQfAwEDB56maZoPHz9//wFpmqZpAwcPHz8hECeif52fqioE ! Ii0EEQgNTTqACFkoHHuWJftuLAQnoAkul9uV/wAA5wDeANblcrlcAL0AhABCADlcLpfLADEAKQAY ! ABAACCA7+a0/3v8ApWPuAApHULY3717KDszNBgAF/xdu1iVs/zcP/gYI7K0sYAUXDzeWsjeZ7wYA ! F27nK1s3/7a/BqamC5s51wgMDgsX/feBvaYGN/tSW0r6UkFCWrHtjd0FWVJaC1sXJ+8LPR/YexEG ! N/YgJqUIzu1WuBWvBRQQvTeyW5DGF/7uJgUG7XbzgTf6QEr7UTFRMVoFYwP2dQBaC1oXWgUQrbm2 ! sEpvYLp1Beb+121UFW4UBWV1hqYQFjcXN2RjsQsdFm8R2brNvT1dA0dARgEFEc1YG9nJxm/6C/lA ! b7r3BnOvFV15AQAS6AHmZgZGCx1vcycP8kExWEhSWBAFhZ+yz1wNC0r6Ud8UZWQQ7jfyySUQFqam ! ZHUVlRfDAOtmCwoAb0Mh2+ywdUgLFzEcxMi+BTFvOoIZzBOzFabPCyH7hhVZFwUU3+bOGY/7CiNa ! AwvCbphjOhcFQldPN4wzQnr+kwi2DHdYvwu2BZ9vSZY6QvD8cv7D7A17DQMGBMnBkrSwbxEH3ks2 ! ewUDdwv3N2xGyDf5BwVCSraw5w/vhG827O5JBwX2V1vYmyUP+ze5hHD23tkHBfrHGCF7sw8hb/nG ! 2ey1agcFAxVDG2DLGJtvVTJmlwVvRwWb6XRK2W+B8gFzX7KZa2l1Fudv1hTjAhET7FpvIZ9NGgVv ! R1ExSbNlDQBbb3Uxwl4vbwNvmFa2jfNZAltvF/veAnub381yJt8vsFcADW9J/CdL2IT5PQNvWvrj ! RUgktwn7BbLJ3mmH9t8yXtsg61LXEb8vGZNWljfxh2W0HsUVOFWfMyatbDfx80QAyblaCwwPL0mn ! lW9m6wtl30JqDPcL/jcIe8lg4gkLwUCUxYcBaCNqGQmRSBERiM8JPQGyNVaxRCwLdC9wAOuo6w4B ! TRMgA2E9cwkYLRHdIXKxZjYj2CJeUH1Ns5Gp+BBBFP+CkzbXfW5oJTFXB3o/NWT3ua7pDXdsASAH ! UXQZt7mxMw8lLW8VBXkHua7pNoVyCWNtj3Up13Vd93kuE0MvaRlrC04V3JnZXHgbKXQvbgsb+577 ! XXUbUUdDwWMRN9iXrGwrOWk7aCuEDdmy/7cu7NnITfcECLHvKXgA/YEciobLdgIDDlAGP2hYc2cU ! SWSCB30AvQrTXQJDo2hCpoTTH4KfBbrXfSEnbANj/095bko4HAM7mWEZ67oJk2k3f3M5OmBio/gJ ! gAiBUMP5bZONhI217xPvninsEMwAQhNJZ6w7zLpECXKdv506TUYehIcDAaGDZAD+gxEkJUIHmo6D ! jKtigWduPlIIS3v3SeydhuRtG0mLTWRsprtyP3YFd/XSF/vcY1UlZ1sJeWOQSFgyZu8s1r3353QP ! Qw0sU9E0kp67Qi0JlRXSKJltYdNsmIdLgE+z62voPlxtfQ1sB1+XcvM+oG6kZ3MBM9tQI6tgyBUx ! k8hwI09ziexTg0QZR7ZjOl8OIQDJA1dGujGaEa9paGV11XSVDIF1+XekYYCs2ylngvBKAqvhjSB0 ! YzzjZHd1F2N5YVX73GYNNXmNuEAqFVXxoAmGCMRXUAU3QJQ4GExpYpuof00lQQ1jYWxGMwFGKmgU ! /G9ybWF0TYPf/21XXxpHZQxvZHVsZUhhbmRsEVXHAhbEbm0dIlByYM65b0FBZGRyNkJIW4jddrAc ! aXZSZSNmaf4GFgS2WUVOYW1RZ3/BbQ1TaXpXVIJ4C2sgHhH35m1nTA1sc0psZW5Eb3NEYfbeLggp ! VG8vCRZ7liyImTtMYTHWugNEuTFlFBra7iNbo0ludBZDbFYKWpvN9oy50SSku7UOHGZvT1O9bCFE ! SMpBdCyEbtvvYnUbcxNNONhsJERRVsD2n2ZhrtEAUmVnUXVlV/6xt8JWpgZFeEERRW51bUtlecUC ! 8sMOT3Blbr1udprND0XeFG/jNsF9aynIeVNoZfflE7vTbBNBMusg5VRlPGvf+Xh0Q29sCk/LpkJr ! MvchNL5lSk9iavrT/zY2YW9BDFM8aWRCcnVzaDTbzH03bCYsZvWsu8G17extrD3RY3B5B7k3tzth ! D19jSJtsZnALwt9ewxQuCIVjZXB0X2iagoauO3IzEV89X0Nf2Xtzr74PCV9mbZ4LNoI1qkEN9mqw ! EsTWiCtmEjeu0B5bDmXy+ckRyucKC4VpsRAcZ78NiNYYEM9zOWNt0L6tbW5uCH1pmViowvRi7qkr ! kRNExtpYAUO9dLMHbqSx2MnOaHLmD2Zq+tlsRr4m7XZzbnCtlOxtHXRm7QpTHSJf5hpzPV5jbXBm ! /FHFVpYsUQDIDIjY1q1TdAq3h+3fYVJpDkRsZ0mtbYO9JQVrFwznFNrHwZYNCUJvTEUZI/Yk11WK ! BHlzN9WZI6KhYxVCMh0+XrOOCGZyDVRvHsMG1ipggUXOdluQICd1RHdz6kElo/Gzl0N1cnNtPllr ! xJhT1p4IDsldkrccVXBka2VlaxfMvXVUe25zbB4Smwes0FppYw8t4m92YhbEZD1SCCxP4AnjQSpQ ! RUwQs28AAy7r4TkRikHwDcIPAQsBBjuHLU8IvuxOEA9AskjkZgsDGgc2KyZbF8ARDGXwBnYQBwYD ! Amme5RRkjKASFVbVBaeMx1+wneEudJ4HkECQ6xAjYnNhRSAuchjLljA7DFMDAjvdwZpALiYYLTxw ! B6+xTdknwE9zzQxiZd976/MnkE9oH6gD5yzfK7UDAAAAAAAAJAD/AABgvgCgQACNvgBw//9Xg83/ ! 6xCQkJCQkJCKBkaIB0cB23UHix6D7vwR23LtuAEAAAAB23UHix6D7vwR2xHAAdtz73UJix6D7vwR ! 23PkMcmD6ANyDcHgCIoGRoPw/3R0icUB23UHix6D7vwR2xHJAdt1B4seg+78EdsRyXUgQQHbdQeL ! HoPu/BHbEckB23PvdQmLHoPu/BHbc+SDwQKB/QDz//+D0QGNFC+D/fx2D4oCQogHR0l19+lj//// ! kIsCg8IEiQeDxwSD6QR38QHP6Uz///9eife5kQAAAIoHRyzoPAF394A/AXXyiweKXwRmwegIwcAQ ! hsQp+IDr6AHwiQeDxwWJ2OLZjb4AsAAAiwcJwHQ8i18EjYQwMNEAAAHzUIPHCP+WvNEAAJWKB0cI ! wHTciflXSPKuVf+WwNEAAAnAdAeJA4PDBOvh/5bE0QAAYemoeP//AAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA From python-dev@python.org Thu Oct 12 20:42:05 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 12 Oct 2000 12:42:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.57,2.58 Message-ID: <200010121942.MAA24894@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv24477/python/dist/src/modules Modified Files: mathmodule.c Log Message: Repaired a comment and asserted a precondition. Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.57 retrieving revision 2.58 diff -C2 -r2.57 -r2.58 *** mathmodule.c 2000/10/12 06:10:25 2.57 --- mathmodule.c 2000/10/12 19:42:00 2.58 *************** *** 19,23 **** /* RED_FLAG 12-Oct-2000 Tim ! * What CHECK does if errno != 0 and x is a NaN is a platform-dependent crap * shoot. Most (but not all!) platforms will end up setting errno to ERANGE * then, but EDOM is probably better. --- 19,23 ---- /* RED_FLAG 12-Oct-2000 Tim ! * What CHECK does if errno == 0 and x is a NaN is a platform-dependent crap * shoot. Most (but not all!) platforms will end up setting errno to ERANGE * then, but EDOM is probably better. *************** *** 39,42 **** --- 39,43 ---- { int result = 1; /* presumption of guilt */ + assert(errno); /* non-zero errno is a precondition for calling */ if (errno == EDOM) PyErr_SetString(PyExc_ValueError, "math domain error"); From python-dev@python.org Thu Oct 12 20:58:40 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 12 Oct 2000 12:58:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib httplib.py,1.23,1.24 Message-ID: <200010121958.MAA09334@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv8371/Lib Modified Files: httplib.py Log Message: If the status line is invalid, assume it is a pre-1.0 response. The msg/headers are empty and the entire response is treated as the body. Index: httplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** httplib.py 2000/09/21 22:09:47 1.23 --- httplib.py 2000/10/12 19:58:36 1.24 *************** *** 119,124 **** reason = "" except ValueError: ! self.close() ! raise BadStatusLine(line) if version[:5] != 'HTTP/': self.close() --- 119,125 ---- reason = "" except ValueError: ! version = "HTTP/0.9" ! status = "200" ! reason = "" if version[:5] != 'HTTP/': self.close() *************** *** 130,137 **** if version == 'HTTP/1.0': self.version = 10 ! elif version[:7] == 'HTTP/1.': self.version = 11 # use HTTP/1.1 code for HTTP/1.x where x>=1 else: raise UnknownProtocol(version) self.msg = mimetools.Message(self.fp, 0) --- 131,144 ---- if version == 'HTTP/1.0': self.version = 10 ! elif version.startswith('HTTP/1.'): self.version = 11 # use HTTP/1.1 code for HTTP/1.x where x>=1 + elif version == 'HTTP/0.9': + self.version = 9 else: raise UnknownProtocol(version) + + if self.version == 9: + self.msg = mimetools.Message(StringIO()) + return self.msg = mimetools.Message(self.fp, 0) From python-dev@python.org Thu Oct 12 21:05:12 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 13:05:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib xmlsaxhandler.tex,NONE,1.1 xmlsaxutils.tex,NONE,1.1 xmlsaxreader.tex,NONE,1.1 xmlsax.tex,1.1,1.2 Message-ID: <200010122005.NAA15982@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15904 Modified Files: xmlsax.tex Added Files: xmlsaxhandler.tex xmlsaxutils.tex xmlsaxreader.tex Log Message: Massive addition of SAX documentation from Martin von Loewis . Reorganized to be more like other parts of the documentation in its arrangement, but with few content changes. This closes SourceForge patch #101850. --- NEW FILE --- \section{\module{xml.sax.handler} --- Base classes for SAX handlers} \declaremodule{standard}{xml.sax.handler} \modulesynopsis{Base classes for SAX event handlers.} \sectionauthor{Martin v. L\"owis}{loewis@informatik.hu-berlin.de} \moduleauthor{Lars Marius Garshol}{larsga@garshol.priv.no} \versionadded{2.0} The SAX API defines four kinds of handlers: content handlers, DTD handlers, error handlers, and entity resolvers. Applications normally only need to implement those interfaces whose events they are interested in; they can implement the interfaces in a single object or in multiple objects. Handler implementations should inherit from the base classes provided in the module \module{xml.sax}, so that all methods get default implementations. \begin{classdesc}{ContentHandler}{} This is the main callback interface in SAX, and the one most important to applications. The order of events in this interface mirrors the order of the information in the document. \end{classdesc} \begin{classdesc}{DTDHandler}{} Handle DTD events. This interface specifies only those DTD events required for basic parsing (unparsed entities and attributes). \end{classdesc} \begin{classdesc}{EntityResolver}{} Basic interface for resolving entities. If you create an object implementing this interface, then register the object with your Parser, the parser will call the method in your object to resolve all external entities. \end{classdesc} In addition to these classes, \module{xml.sax.handler} provides symbolic constants for the feature and property names. \begin{datadesc}{feature_namespaces} Value: \code{"http://xml.org/sax/features/namespaces"}\\ true: Perform Namespace processing (default).\\ false: Optionally do not perform Namespace processing (implies namespace-prefixes).\\ access: (parsing) read-only; (not parsing) read/write\\ \end{datadesc} \begin{datadesc}{feature_namespace_prefixes} Value: \code{"http://xml.org/sax/features/namespace-prefixes"}\\ true: Report the original prefixed names and attributes used for Namespace declarations.\\ false: Do not report attributes used for Namespace declarations, and optionally do not report original prefixed names (default).\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{feature_string_interning} Value: \code{"http://xml.org/sax/features/string-interning"} true: All element names, prefixes, attribute names, Namespace URIs, and local names are interned using the built-in intern function.\\ false: Names are not necessarily interned, although they may be (default).\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{feature_validation} Value: \code{"http://xml.org/sax/features/validation"}\\ true: Report all validation errors (implies external-general-entities and external-parameter-entities).\\ false: Do not report validation errors.\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{feature_external_ges} Value: \code{"http://xml.org/sax/features/external-general-entities"}\\ true: Include all external general (text) entities.\\ false: Do not include external general entities.\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{feature_external_pes} Value: \code{"http://xml.org/sax/features/external-parameter-entities"}\\ true: Include all external parameter entities, including the external DTD subset.\\ false: Do not include any external parameter entities, even the external DTD subset.\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{all_features} List of all features. \end{datadesc} \begin{datadesc}{property_lexical_handler} Value: \code{"http://xml.org/sax/properties/lexical-handler"}\\ data type: xml.sax.sax2lib.LexicalHandler (not supported in Python 2)\\ description: An optional extension handler for lexical events like comments.\\ access: read/write \end{datadesc} \begin{datadesc}{property_declaration_handler} Value: \code{"http://xml.org/sax/properties/declaration-handler"}\\ data type: xml.sax.sax2lib.DeclHandler (not supported in Python 2)\\ description: An optional extension handler for DTD-related events other than notations and unparsed entities.\\ access: read/write \end{datadesc} \begin{datadesc}{property_dom_node} Value: \code{"http://xml.org/sax/properties/dom-node"}\\ data type: org.w3c.dom.Node (not supported in Python 2) \\ description: When parsing, the current DOM node being visited if this is a DOM iterator; when not parsing, the root DOM node for iteration.\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{property_xml_string} Value: \code{"http://xml.org/sax/properties/xml-string"}\\ data type: String\\ description: The literal string of characters that was the source for the current event.\\ access: read-only \end{datadesc} \begin{datadesc}{all_properties} List of all known property names. \end{datadesc} \subsection{ContentHandler Objects \label{content-handler-objects}} Users are expected to subclass \class{ContentHandler} to support their application. The following methods are called by the parser on the appropriate events in the input document: \begin{methoddesc}[ContentHandler]{setDocumentLocator}{locator} Called by the parser to give the application a locator for locating the origin of document events. SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the DocumentHandler interface. The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine. Note that the locator will return correct information only during the invocation of the events in this interface. The application should not attempt to use it at any other time. \end{methoddesc} \begin{methoddesc}[ContentHandler]{startDocument}{} Receive notification of the beginning of a document. The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for \method{setDocumentLocator()}). \end{methoddesc} \begin{methoddesc}[ContentHandler]{endDocument}{} Receive notification of the end of a document. The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input. \end{methoddesc} \begin{methoddesc}[ContentHandler]{startPrefixMapping}{prefix, uri} Begin the scope of a prefix-URI Namespace mapping. The information from this event is not necessary for normal Namespace processing: the SAX XML reader will automatically replace prefixes for element and attribute names when the \code{http://xml.org/sax/features/namespaces} feature is true (the default). %% XXX This is not really the default, is it? MvL There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary. Note that start/endPrefixMapping events are not guaranteed to be properly nested relative to each-other: all \method{startPrefixMapping()} events will occur before the corresponding startElement event, and all \method{endPrefixMapping()} events will occur after the corresponding \method{endElement()} event, but their order is not guaranteed. \end{methoddesc} \begin{methoddesc}[ContentHandler]{endPrefixMapping}{prefix} End the scope of a prefix-URI mapping. See \method{startPrefixMapping()} for details. This event will always occur after the corresponding endElement event, but the order of endPrefixMapping events is not otherwise guaranteed. \end{methoddesc} \begin{methoddesc}[ContentHandler]{startElement}{name, attrs} Signals the start of an element in non-namespace mode. The \var{name} parameter contains the raw XML 1.0 name of the element type as a string and the \var{attrs} parameter holds an instance of the \class{Attributes} class containing the attributes of the element. \end{methoddesc} \begin{methoddesc}[ContentHandler]{endElement}{name} Signals the end of an element in non-namespace mode. The \var{name} parameter contains the name of the element type, just as with the startElement event. \end{methoddesc} \begin{methoddesc}[ContentHandler]{startElementNS}{name, qname, attrs} Signals the start of an element in namespace mode. The \var{name} parameter contains the name of the element type as a (uri, localname) tuple, the \var{qname} parameter the raw XML 1.0 name used in the source document, and the \var{attrs} parameter holds an instance of the \class{AttributesNS} class containing the attributes of the element. Parsers may set the \var{qname} parameter to \code{None}, unless the \code{http://xml.org/sax/features/namespace-prefixes} feature is activated. \end{methoddesc} \begin{methoddesc}[ContentHandler]{endElementNS}{name, qname} Signals the end of an element in namespace mode. The \var{name} parameter contains the name of the element type, just as with the startElementNS event, likewise the \var{qname} parameter. \end{methoddesc} \begin{methoddesc}[ContentHandler]{characters}{content} Receive notification of character data. The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information. \var{content} may be a Unicode string or a byte string; the \code{expat} reader module produces always Unicode strings. \end{methoddesc} \begin{methoddesc}[ContentHandler]{ignorableWhitespace}{} Receive notification of ignorable whitespace in element content. Validating Parsers must use this method to report each chunk of ignorable whitespace (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models. SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information. \end{methoddesc} \begin{methoddesc}[ContentHandler]{processingInstruction}{target, data} Receive notification of a processing instruction. The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element. A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method. \end{methoddesc} \begin{methoddesc}[ContentHandler]{skippedEntity}{name} Receive notification of a skipped entity. The Parser will invoke this method once for each entity skipped. Non-validating processors may skip entities if they have not seen the declarations (because, for example, the entity was declared in an external DTD subset). All processors may skip external entities, depending on the values of the \code{http://xml.org/sax/features/external-general-entities} and the \code{http://xml.org/sax/features/external-parameter-entities} properties. \end{methoddesc} \subsection{DTDHandler Objects \label{dtd-handler-objects}} \class{DTDHandler} instances provide the following methods: \begin{methoddesc}[DTDHandler]{notationDecl}{name, publicId, systemId} Handle a notation declaration event. \end{methoddesc} \begin{methoddesc}[DTDHandler]{unparsedEntityDecl}{name, publicId, systemId, ndata} Handle an unparsed entity declaration event. \end{methoddesc} \subsection{EntityResolver Objects \label{entity-resolver-objects}} \begin{methoddesc}[EntityResolver]{resolveEntity}{publicId, systemId} Resolve the system identifier of an entity and return either the system identifier to read from as a string, or an InputSource to read from. The default implementation returns \var{systemId}. \end{methoddesc} --- NEW FILE --- \section{\module{xml.sax.saxutils} --- SAX Utilities} \declaremodule{standard}{xml.sax.saxutils} \modulesynopsis{Convenience functions and classes for use with SAX.} \sectionauthor{Martin v. L\"owis}{loewis@informatik.hu-berlin.de} \moduleauthor{Lars Marius Garshol}{larsga@garshol.priv.no} \versionadded{2.0} The module \module{xml.sax.saxutils} contains a number of classes and functions that are commonly useful when creating SAX applications, either in direct use, or as base classes. \begin{funcdesc}{escape}{data\optional{, entities}} Escape \&, <, and > in a string of data. You can escape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. \end{funcdesc} \begin{classdesc}{XMLGenerator}{\optional{out\optional{, encoding}}} This class implements the \class{ContentHandler} interface by writing SAX events back into an XML document. In other words, using an \class{XMLGenerator} as the content handler will reproduce the original document being parsed. \var{out} should be a file-like object which will default to \var{sys.stdout}. \var{encoding} is the encoding of the output stream which defaults to \code{'iso-8859-1'}. \end{classdesc} \begin{classdesc}{XMLFilterBase}{base} This class is designed to sit between an \class{XMLReader} and the client application's event handlers. By default, it does nothing but pass requests up to the reader and events on to the handlers unmodified, but subclasses can override specific methods to modify the event stream or the configuration requests as they pass through. \end{classdesc} \begin{funcdesc}{prepare_input_source}{source\optional{, base}} This function takes an input source and an optional base URL and returns a fully resolved \class{InputSource} object ready for reading. The input source can be given as a string, a file-like object, or an \class{InputSource} object; parsers will use this function to implement the polymorphic \var{source} argument to their \method{parse()} method. \end{funcdesc} --- NEW FILE --- \section{\module{xml.sax.xmlreader} --- Interface for XML parsers} \declaremodule{standard}{xml.sax.xmlreader} \modulesynopsis{Interface which SAX-compliant XML parsers must implement.} \sectionauthor{Martin v. L\"owis}{loewis@informatik.hu-berlin.de} \moduleauthor{Lars Marius Garshol}{larsga@garshol.priv.no} \versionadded{2.0} SAX parsers implement the \class{XMLReader} interface. They are implemented in a Python module, which must provide a function \function{create_parser()}. This function is invoked by \function{xml.sax.make_parser()} with no arguments to create a new parser object. \begin{classdesc}{XMLReader}{} Base class which can be inherited by SAX parsers. \end{classdesc} \begin{classdesc}{IncrementalParser}{} In some cases, it is desirable not to parse an input source at once, but to feed chunks of the document as they get available. Note that the reader will normally not read the entire file, but read it in chunks as well; still \method{parse()} won't return until the entire document is processed. So these interfaces should be used if the blocking behaviour of \method{parse()} is not desirable. When the parser is instantiated it is ready to begin accepting data from the feed method immediately. After parsing has been finished with a call to close the reset method must be called to make the parser ready to accept new data, either from feed or using the parse method. Note that these methods must \emph{not} be called during parsing, that is, after parse has been called and before it returns. By default, the class also implements the parse method of the XMLReader interface using the feed, close and reset methods of the IncrementalParser interface as a convenience to SAX 2.0 driver writers. \end{classdesc} \begin{classdesc}{Locator}{} Interface for associating a SAX event with a document location. A locator object will return valid results only during calls to DocumentHandler methods; at any other time, the results are unpredictable. If information is not available, methods may return \code{None}. \end{classdesc} \begin{classdesc}{InputSource}{\optional{systemId}} Encapsulation of the information needed by the \class{XMLReader} to read entities. This class may include information about the public identifier, system identifier, byte stream (possibly with character encoding information) and/or the character stream of an entity. Applications will create objects of this class for use in the \method{XMLReader.parse()} method and for returning from EntityResolver.resolveEntity. An \class{InputSource} belongs to the application, the \class{XMLReader} is not allowed to modify \class{InputSource} objects passed to it from the application, although it may make copies and modify those. \end{classdesc} \begin{classdesc}{AttributesImpl}{attrs} This is a dictionary-like object which represents the element attributes in a \method{startElement()} call. In addition to the most useful dictionary operations, it supports a number of other methods as described below. Objects of this class should be instantiated by readers; \var{attrs} must be a dictionary-like object. \end{classdesc} \begin{classdesc}{AttributesNSImpl}{attrs, qnames} Namespace-aware variant of attributes, which will be passed to \method{startElementNS()}. It is derived from \class{AttributesImpl}, but understands attribute names as two-tuples of \var{namespaceURI} and \var{localname}. In addition, it provides a number of methods expecting qualified names as they appear in the original document. \end{classdesc} \subsection{XMLReader Objects \label{xmlreader-objects}} The \class{XMLReader} interface supports the following methods: \begin{methoddesc}[XMLReader]{parse}{source} Process an input source, producing SAX events. The \var{source} object can be a system identifier (i.e. a string identifying the input source -- typically a file name or an URL), a file-like object, or an \class{InputSource} object. When \method{parse()} returns, the input is completely processed, and the parser object can be discarded or reset. As a limitation, the current implementation only accepts byte streams; processing of character streams is for further study. \end{methoddesc} \begin{methoddesc}[XMLReader]{getContentHandler}{} Return the current \class{ContentHandler}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setContentHandler}{handler} Set the current \class{ContentHandler}. If no \class{ContentHandler} is set, content events will be discarded. \end{methoddesc} \begin{methoddesc}[XMLReader]{getDTDHandler}{} Return the current \class{DTDHandler}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setDTDHandler}{handler} Set the current \class{DTDHandler}. If no \class{DTDHandler} is set, DTD events will be discarded. \end{methoddesc} \begin{methoddesc}[XMLReader]{getEntityResolver}{} Return the current \class{EntityResolver}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setEntityResolver}{handler} Set the current \class{EntityResolver}. If no \class{EntityResolver} is set, attempts to resolve an external entity will result in opening the system identifier for the entity, and fail if it is not available. \end{methoddesc} \begin{methoddesc}[XMLReader]{getErrorHandler}{} Return the current \class{ErrorHandler}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setErrorHandler}{handler} Set the current error handler. If no \class{ErrorHandler} is set, errors will be raised as exceptions, and warnings will be printed. \end{methoddesc} \begin{methoddesc}[XMLReader]{setLocale}{locale} Allow an application to set the locale for errors and warnings. SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, however, they must throw a SAX exception. Applications may request a locale change in the middle of a parse. \end{methoddesc} \begin{methoddesc}[XMLReader]{getFeature}{featurename} Return the current setting for feature \var{featurename}. If the feature is not recognized, \exception{SAXNotRecognizedException} is raised. The well-known featurenames are listed in the module \module{xml.sax.handler}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setFeature}{featurename, value} Set the \var{featurename} to \var{value}. If the feature is not recognized, \exception{SAXNotRecognizedException} is raised. If the feature or its setting is not supported by the parser, \var{SAXNotSupportedException} is raised. \end{methoddesc} \begin{methoddesc}[XMLReader]{getProperty}{propertyname} Return the current setting for property \var{propertyname}. If the property is not recognized, a \exception{SAXNotRecognizedException} is raised. The well-known propertynames are listed in the module \module{xml.sax.handler}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setProperty}{propertyname, value} Set the \var{propertyname} to \var{value}. If the property is not recognized, \exception{SAXNotRecognizedException} is raised. If the property or its setting is not supported by the parser, \var{SAXNotSupportedException} is raised. \end{methoddesc} \subsection{IncrementalParser Objects \label{incremental-parser-objects}} Instances of \class{IncrementalParser} offer the following additional methods: \begin{methoddesc}[IncrementalParser]{feed}{data} Process a chunk of \var{data}. \end{methoddesc} \begin{methoddesc}[IncrementalParser]{close}{} Assume the end of the document. That will check well-formedness conditions that can be checked only at the end, invoke handlers, and may clean up resources allocated during parsing. \end{methoddesc} \begin{methoddesc}[IncrementalParser]{reset}{} This method is called after close has been called to reset the parser so that it is ready to parse new documents. The results of calling parse or feed after close without calling reset are undefined.""" \end{methoddesc} \subsection{Locator Objects \label{locator-objects}} Instances of \class{Locator} provide these methods: \begin{methoddesc}[Locator]{getColumnNumber}{} Return the column number where the current event ends. \end{methoddesc} \begin{methoddesc}[Locator]{getLineNumber}{} Return the line number where the current event ends. \end{methoddesc} \begin{methoddesc}[Locator]{getPublicId}{} Return the public identifier for the current event. \end{methoddesc} \begin{methoddesc}[Locator]{getSystemId}{} Return the system identifier for the current event. \end{methoddesc} \subsection{InputSource Objects \label{input-source-objects}} \begin{methoddesc}[InputSource]{setPublicId}{id} Sets the public identifier of this \class{InputSource}. \end{methoddesc} \begin{methoddesc}[InputSource]{getPublicId}{} Returns the public identifier of this \class{InputSource}. \end{methoddesc} \begin{methoddesc}[InputSource]{setSystemId}{id} Sets the system identifier of this \class{InputSource}. \end{methoddesc} \begin{methoddesc}[InputSource]{getSystemId}{} Returns the system identifier of this \class{InputSource}. \end{methoddesc} \begin{methoddesc}[InputSource]{setEncoding}{encoding} Sets the character encoding of this \class{InputSource}. The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML recommendation). The encoding attribute of the \class{InputSource} is ignored if the \class{InputSource} also contains a character stream. \end{methoddesc} \begin{methoddesc}[InputSource]{getEncoding}{} Get the character encoding of this InputSource. \end{methoddesc} \begin{methoddesc}[InputSource]{setByteStream}{bytefile} Set the byte stream (a Python file-like object which does not perform byte-to-character conversion) for this input source. The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself. If the application knows the character encoding of the byte stream, it should set it with the setEncoding method. \end{methoddesc} \begin{methoddesc}[InputSource]{getByteStream}{} Get the byte stream for this input source. The getEncoding method will return the character encoding for this byte stream, or None if unknown. \end{methoddesc} \begin{methoddesc}[InputSource]{setCharacterStream}{charfile} Set the character stream for this input source. (The stream must be a Python 1.6 Unicode-wrapped file-like that performs conversion to Unicode strings.) If there is a character stream specified, the SAX parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier. \end{methoddesc} \begin{methoddesc}[InputSource]{getCharacterStream}{} Get the character stream for this input source. \end{methoddesc} \subsection{AttributesImpl Objects \label{attributes-impl-objects}} \class{AttributesImpl} objects implement a portion of the mapping protocol, and the methods \method{copy()}, \method{get()}, \method{has_key()}, \method{items()}, \method{keys()}, and \method{values()}. The following methods are also provided: \begin{methoddesc}[AttributesImpl]{getLength}{} Return the number of attributes. \end{methoddesc} \begin{methoddesc}[AttributesImpl]{getNames}{} Return the names of the attributes. \end{methoddesc} \begin{methoddesc}[AttributesImpl]{getType}{name} Returns the type of the attribute \var{name}, which is normally \code{'CDATA'}. \end{methoddesc} \begin{methoddesc}[AttributesImpl]{getValue}{name} Return the value of attribute \var{name}. \end{methoddesc} % getValueByQName, getNameByQName, getQNameByName, getQNames available % here already, but documented only for derived class. \subsection{AttributesNSImpl Objects \label{attributes-ns-impl-objects}} \begin{methoddesc}[AttributesNSImpl]{getValueByQName}{name} Return the value for a qualified name. \end{methoddesc} \begin{methoddesc}[AttributesNSImpl]{getNameByQName}{name} Return the \code{(\var{namespace}, \var{localname})} pair for a qualified \var{name}. \end{methoddesc} \begin{methoddesc}[AttributesNSImpl]{getQNameByName}{name} Return the qualified name for a \code{(\var{namespace}, \var{localname})} pair. \end{methoddesc} \begin{methoddesc}[AttributesNSImpl]{getQNames}{} Return the qualified names of all attributes. \end{methoddesc} Index: xmlsax.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/xmlsax.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** xmlsax.tex 2000/09/20 02:52:20 1.1 --- xmlsax.tex 2000/10/12 20:05:09 1.2 *************** *** 7,10 **** --- 7,11 ---- \moduleauthor{Lars Marius Garshol}{larsga@garshol.priv.no} \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} + \sectionauthor{Martin v. L\"owis}{loewis@informatik.hu-berlin.de} \versionadded{2.0} *************** *** 42,47 **** \end{funcdesc} ! The SAX exceptions are also provided here: \begin{excclassdesc}{SAXException}{msg\optional{, exception}} --- 43,69 ---- \end{funcdesc} + A typical SAX application uses three kinds of objects: readers, + handlers and input sources. ``Reader'' in this context is another term + for parser, ie. some piece of code that reads the bytes or characters + from the input source, and produces a sequence of events. The events + then get distributed to the handler objects, ie. the reader invokes a + method on the handler. A SAX application must therefore obtain a + handler object, create or open the input sources, create the handlers, + and connect these objects all together. As the final step, parsing is + invoked. During parsing + + For these objects, only the interfaces are relevant; they are normally + not instantiated by the application itself. Since Python does not have + an explicit notion of interface, they are formally introduced as + classes. The \class{InputSource}, \class{Locator}, + \class{AttributesImpl}, and \class{XMLReader} interfaces are defined + in the module \refmodule{xml.sax.xmlreader}. The handler interfaces + are defined in \refmodule{xml.sax.handler}. For convenience, + \class{InputSource} (which is often instantiated directly) and the + handler classes are also available from \module{xml.sax}. These + classes are described below. ! In addition to these classes, \module{xml.sax} provides the following ! exception classes. \begin{excclassdesc}{SAXException}{msg\optional{, exception}} *************** *** 95,99 **** ! \subsection{SAXException Objects \label{saxexception-objects}} The \class{SAXException} exception class supports the following --- 117,121 ---- ! \subsection{SAXException Objects \label{sax-exception-objects}} The \class{SAXException} exception class supports the following From python-dev@python.org Thu Oct 12 21:07:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 13:07:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.46,1.47 Message-ID: <200010122007.NAA18340@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv18253 Modified Files: Makefile.deps Log Message: Added entries for new files of SAX documentation. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -r1.46 -r1.47 *** Makefile.deps 2000/09/25 18:26:21 1.46 --- Makefile.deps 2000/10/12 20:07:08 1.47 *************** *** 172,175 **** --- 172,178 ---- ../lib/libpyexpat.tex \ ../lib/xmlsax.tex \ + ../lib/xmlsaxhandler.tex \ + ../lib/xmlsaxutils.tex \ + ../lib/xmlsaxreader.tex \ ../lib/libqueue.tex \ ../lib/liblocale.tex \ From python-dev@python.org Thu Oct 12 21:07:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 13:07:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib lib.tex,1.168,1.169 Message-ID: <200010122007.NAA18349@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18253/lib Modified Files: lib.tex Log Message: Added entries for new files of SAX documentation. Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -r1.168 -r1.169 *** lib.tex 2000/10/10 16:46:36 1.168 --- lib.tex 2000/10/12 20:07:09 1.169 *************** *** 236,239 **** --- 236,242 ---- \input{libpyexpat} \input{xmlsax} + \input{xmlsaxhandler} + \input{xmlsaxutils} + \input{xmlsaxreader} \input{libxmllib} From python-dev@python.org Thu Oct 12 21:23:27 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 12 Oct 2000 13:23:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler/compiler pyassem.py,1.11,1.12 pycodegen.py,1.24,1.25 transformer.py,1.14,1.15 Message-ID: <200010122023.NAA03254@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/compiler/compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv2177/compiler Modified Files: pyassem.py pycodegen.py transformer.py Log Message: Fix SF bug #116263: support for from .. import * transformer.py: return '*', None from com_import_as_name pycodegen.py: special case for name == '*' pyassem.py: fix stack counting for IMPORT_ opcodes Index: pyassem.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/pyassem.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** pyassem.py 2000/09/01 20:47:37 1.11 --- pyassem.py 2000/10/12 20:23:23 1.12 *************** *** 516,519 **** --- 516,522 ---- 'COMPARE_OP': -1, 'STORE_FAST': -1, + 'IMPORT_STAR': -1, + 'IMPORT_NAME': 0, + 'IMPORT_FROM': 1, } # use pattern match *************** *** 521,525 **** ('BINARY_', -1), ('LOAD_', 1), - ('IMPORT_', 1), ] --- 524,527 ---- Index: pycodegen.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/pycodegen.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** pycodegen.py 2000/09/01 20:47:37 1.24 --- pycodegen.py 2000/10/12 20:23:23 1.25 *************** *** 440,446 **** if name == '*': self.namespace = 0 ! self.emit('IMPORT_FROM', name) ! self._resolveDots(name) ! self.storeName(alias or name) self.emit('POP_TOP') --- 440,451 ---- if name == '*': self.namespace = 0 ! self.emit('IMPORT_STAR') ! # There can only be one name w/ from ... import * ! assert len(node.names) == 1 ! return ! else: ! self.emit('IMPORT_FROM', name) ! self._resolveDots(name) ! self.storeName(alias or name) self.emit('POP_TOP') Index: transformer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/transformer.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** transformer.py 2000/09/20 02:47:28 1.14 --- transformer.py 2000/10/12 20:23:23 1.15 *************** *** 826,829 **** --- 826,831 ---- def com_import_as_name(self, node): + if node == '*': + return '*', None if node[0] == token.NAME: return node[1], None From python-dev@python.org Thu Oct 12 21:50:58 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 13:50:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcodecs.tex,1.3,1.4 Message-ID: <200010122050.NAA24919@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24868/lib Modified Files: libcodecs.tex Log Message: Marc-Andre Lemburg : Documentation for the codec base classes. Lots of markup adjustments by FLD. This closes SourceForge bug #115308, patch #101877. Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libcodecs.tex 2000/07/24 19:33:49 1.3 --- libcodecs.tex 2000/10/12 20:50:55 1.4 *************** *** 29,40 **** \var{encoder} and \var{decoder}: These must be functions or methods ! which have the same interface as the .encode/.decode methods of ! Codec instances (see Codec Interface). The functions/methods are ! expected to work in a stateless mode. \var{stream_reader} and \var{stream_writer}: These have to be factory functions providing the following interface: ! \code{factory(\var{stream}, \var{errors}='strict')} The factory functions must return objects providing the interfaces --- 29,41 ---- \var{encoder} and \var{decoder}: These must be functions or methods ! which have the same interface as the ! \method{encode()}/\method{decode()} methods of Codec instances (see ! Codec Interface). The functions/methods are expected to work in a ! stateless mode. \var{stream_reader} and \var{stream_writer}: These have to be factory functions providing the following interface: ! \code{factory(\var{stream}, \var{errors}='strict')} The factory functions must return objects providing the interfaces *************** *** 104,113 **** \end{funcdesc} - - - ...XXX document codec base classes... - - - The module also provides the following constants which are useful for reading and writing to platform dependent files: --- 105,108 ---- *************** *** 127,129 **** --- 122,395 ---- (\samp{_LE} suffix) byte order using 32-bit and 64-bit encodings. \end{datadesc} + + \subsection{Codec Base Classes} + + The \module{codecs} defines a set of base classes which define the + interface and can also be used to easily write you own codecs for use + in Python. + + Each codec has to define four interfaces to make it usable as codec in + Python: stateless encoder, stateless decoder, stream reader and stream + writer. The stream reader and writers typically reuse the stateless + encoder/decoder to implement the file protocols. + + The \class{Codec} class defines the interface for stateless + encoders/decoders. + + To simplify and standardize error handling, the \method{encode()} and + \method{decode()} methods may implement different error handling + schemes by providing the \var{errors} string argument. The following + string values are defined and implemented by all standard Python + codecs: + + \begin{itemize} + \item \code{'strict'} Raise \exception{ValueError} (or a subclass); + this is the default. + \item \code{'ignore'} Ignore the character and continue with the next. + \item \code{'replace'} Replace with a suitable replacement character; + Python will use the official U+FFFD REPLACEMENT + CHARACTER for the builtin Unicode codecs. + \end{itemize} + + + \subsubsection{Codec Objects \label{codec-objects}} + + The \class{Codec} class defines these methods which also define the + function interfaces of the stateless encoder and decoder: + + \begin{methoddesc}{encode}{input\optional{, errors}} + Encodes the object \var{input} and returns a tuple (output object, + length consumed). + + \var{errors} defines the error handling to apply. It defaults to + \code{'strict'} handling. + + The method may not store state in the \class{Codec} instance. Use + \class{StreamCodec} for codecs which have to keep state in order to + make encoding/decoding efficient. + + The encoder must be able to handle zero length input and return an + empty object of the output object type in this situation. + \end{methoddesc} + + \begin{methoddesc}{decode}{input\optional{, errors}} + Decodes the object \var{input} and returns a tuple (output object, + length consumed). + + \var{input} must be an object which provides the \code{bf_getreadbuf} + buffer slot. Python strings, buffer objects and memory mapped files + are examples of objects providing this slot. + + \var{errors} defines the error handling to apply. It defaults to + \code{'strict'} handling. + + The method may not store state in the \class{Codec} instance. Use + \class{StreamCodec} for codecs which have to keep state in order to + make encoding/decoding efficient. + + The decoder must be able to handle zero length input and return an + empty object of the output object type in this situation. + \end{methoddesc} + + The \class{StreamWriter} and \class{StreamReader} classes provide + generic working interfaces which can be used to implement new + encodings submodules very easily. See \module{encodings.utf_8} for an + example on how this is done. + + + \subsubsection{StreamWriter Objects \label{stream-writer-objects}} + + The \class{StreamWriter} class is a subclass of \class{Codec} and + defines the following methods which every stream writer must define in + order to be compatible to the Python codec registry. + + \begin{classdesc}{StreamWriter}{stream\optional{, errors}} + Constructor for a \class{StreamWriter} instance. + + All stream writers must provide this constructor interface. They are + free to add additional keyword arguments, but only the ones defined + here are used by the Python codec registry. + + \var{stream} must be a file-like object open for writing (binary) + data. + + The \class{StreamWriter} may implement different error handling + schemes by providing the \var{errors} keyword argument. These + parameters are defined: + + \begin{itemize} + \item \code{'strict'} Raise \exception{ValueError} (or a subclass); + this is the default. + \item \code{'ignore'} Ignore the character and continue with the next. + \item \code{'replace'} Replace with a suitable replacement character + \end{itemize} + \end{classdesc} + + \begin{methoddesc}{write}{object} + Writes the object's contents encoded to the stream. + \end{methoddesc} + + \begin{methoddesc}{writelines}{list} + Writes the concatenated list of strings to the stream (possibly by + reusing the \method{write()} method). + \end{methoddesc} + + \begin{methoddesc}{reset}{} + Flushes and resets the codec buffers used for keeping state. + + Calling this method should ensure that the data on the output is put + into a clean state, that allows appending of new fresh data without + having to rescan the whole stream to recover state. + \end{methoddesc} + + In addition to the above methods, the \class{StreamWriter} must also + inherit all other methods and attribute from the underlying stream. + + + \subsubsection{StreamReader Objects \label{stream-reader-objects}} + + The \class{StreamReader} class is a subclass of \class{Codec} and + defines the following methods which every stream reader must define in + order to be compatible to the Python codec registry. + + \begin{classdesc}{StreamReader}{stream\optional{, errors}} + Constructor for a \class{StreamReader} instance. + + All stream readers must provide this constructor interface. They are + free to add additional keyword arguments, but only the ones defined + here are used by the Python codec registry. + + \var{stream} must be a file-like object open for reading (binary) + data. + + The \class{StreamReader} may implement different error handling + schemes by providing the \var{errors} keyword argument. These + parameters are defined: + + \begin{itemize} + \item \code{'strict'} Raise \exception{ValueError} (or a subclass); + this is the default. + \item \code{'ignore'} Ignore the character and continue with the next. + \item \code{'replace'} Replace with a suitable replacement character. + \end{itemize} + \end{classdesc} + + \begin{methoddesc}{read}{\optional{size}} + Decodes data from the stream and returns the resulting object. + + \var{size} indicates the approximate maximum number of bytes to read + from the stream for decoding purposes. The decoder can modify this + setting as appropriate. The default value -1 indicates to read and + decode as much as possible. \var{size} is intended to prevent having + to decode huge files in one step. + + The method should use a greedy read strategy meaning that it should + read as much data as is allowed within the definition of the encoding + and the given size, e.g. if optional encoding endings or state + markers are available on the stream, these should be read too. + \end{methoddesc} + + \begin{methoddesc}{readline}{[size]} + Read one line from the input stream and return the + decoded data. + + Note: Unlike the \method{readlines()} method, this method inherits + the line breaking knowledge from the underlying stream's + \method{readline()} method -- there is currently no support for line + breaking using the codec decoder due to lack of line buffering. + Sublcasses should however, if possible, try to implement this method + using their own knowledge of line breaking. + + \var{size}, if given, is passed as size argument to the stream's + \method{readline()} method. + \end{methoddesc} + + \begin{methoddesc}{readlines}{[sizehint]} + Read all lines available on the input stream and return them as list + of lines. + + Line breaks are implemented using the codec's decoder method and are + included in the list entries. + + \var{sizehint}, if given, is passed as \var{size} argument to the + stream's \method{read()} method. + \end{methoddesc} + + \begin{methoddesc}{reset}{} + Resets the codec buffers used for keeping state. + + Note that no stream repositioning should take place. This method is + primarily intended to be able to recover from decoding errors. + \end{methoddesc} + + In addition to the above methods, the \class{StreamReader} must also + inherit all other methods and attribute from the underlying stream. + + The next two base classes are included for convenience. They are not + needed by the codec registry, but may provide useful in practice. + + + \subsubsection{StreamReaderWriter Objects \label{stream-reader-writer}} + + The \class{StreamReaderWriter} allows wrapping streams which work in + both read and write modes. + + The design is such that one can use the factory functions returned by + the \function{lookup()} function to construct the instance. + + \begin{classdesc}{StreamReaderWriter}{stream, Reader, Writer, errors} + Creates a \class{StreamReaderWriter} instance. + \var{stream} must be a file-like object. + \var{Reader} and \var{Writer} must be factory functions or classes + providing the \class{StreamReader} and \class{StreamWriter} interface + resp. + Error handling is done in the same way as defined for the + stream readers and writers. + \end{classdesc} + + \class{StreamReaderWriter} instances define the combined interfaces of + \class{StreamReader} and \class{StreamWriter} classes. They inherit + all other methods and attribute from the underlying stream. + + + \subsubsection{StreamRecoder Objects \label{stream-recoder-objects}} + + The \class{StreamRecoder} provide a frontend - backend view of + encoding data which is sometimes useful when dealing with different + encoding environments. + + The design is such that one can use the factory functions returned by + the \function{lookup()} function to construct the instance. + + \begin{classdesc}{StreamRecoder}{stream, encode, decode, + Reader, Writer, errors} + Creates a \class{StreamRecoder} instance which implements a two-way + conversion: \var{encode} and \var{decode} work on the frontend (the + input to \method{read()} and output of \method{write()}) while + \var{Reader} and \var{Writer} work on the backend (reading and + writing to the stream). + + You can use these objects to do transparent direct recodings from + e.g.\ Latin-1 to UTF-8 and back. + + \var{stream} must be a file-like object. + + \var{encode}, \var{decode} must adhere to the \class{Codec} + interface, \var{Reader}, \var{Writer} must be factory functions or + classes providing objects of the the \class{StreamReader} and + \class{StreamWriter} interface respectively. + + \var{encode} and \var{decode} are needed for the frontend + translation, \var{Reader} and \var{Writer} for the backend + translation. The intermediate format used is determined by the two + sets of codecs, e.g. the Unicode codecs will use Unicode as + intermediate encoding. + + Error handling is done in the same way as defined for the + stream readers and writers. + \end{classdesc} + + \class{StreamRecoder} instances define the combined interfaces of + \class{StreamReader} and \class{StreamWriter} classes. They inherit + all other methods and attribute from the underlying stream. From python-dev@python.org Thu Oct 12 21:58:35 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 13:58:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python thread_pth.h,2.6,2.7 Message-ID: <200010122058.NAA30902@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv30861/Python Modified Files: thread_pth.h Log Message: Andy Dustman : Eliminate unused variables to appease compiler. Index: thread_pth.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** thread_pth.h 2000/09/01 23:29:28 2.6 --- thread_pth.h 2000/10/12 20:58:32 2.7 *************** *** 48,52 **** { pth_t th; - int success; dprintf(("PyThread_start_new_thread called\n")); if (!initialized) --- 48,51 ---- *************** *** 146,150 **** { pth_lock *thelock = (pth_lock *)lock; - int status, error = 0; dprintf(("PyThread_free_lock(%p) called\n", lock)); --- 145,148 ---- *************** *** 247,251 **** void PyThread_free_sema(PyThread_type_sema sema) { - int status, error = 0; struct semaphore *thesema = (struct semaphore *) sema; --- 245,248 ---- From python-dev@python.org Thu Oct 12 23:07:53 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 15:07:53 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.36,1.37 Message-ID: <200010122207.PAA20832@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv20767 Modified Files: pep-0042.txt Log Message: Add Tim's getopt wish. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** pep-0042.txt 2000/10/12 16:17:36 1.36 --- pep-0042.txt 2000/10/12 22:07:49 1.37 *************** *** 238,241 **** --- 238,246 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=116326&group_id=5470 + - We should rename and rationalize the API getopt.c provides, and + always use this, instead of trying to rely on the platform + getopt and fighting with its prototype. + + http://www.python.org/pipermail/python-dev/2000-October/016620.html From python-dev@python.org Fri Oct 13 02:32:45 2000 From: python-dev@python.org (Neil Schemenauer) Date: Thu, 12 Oct 2000 18:32:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test regrtest.py,1.25,1.26 Message-ID: <200010130132.SAA19755@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv18685/Lib/test Modified Files: regrtest.py Log Message: Make the regrtest.py -l (findleaks) option considerably less obnoxious. First, only report garbage that the GC cannot free. Second, only report the number of objects found, not their repr(). People can dig deeper on their own if they find a leak. Index: regrtest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** regrtest.py 2000/09/22 15:29:28 1.25 --- regrtest.py 2000/10/13 01:32:42 1.26 *************** *** 15,19 **** -s: single -- run only a single test (see below) -r: random -- randomize test execution order ! -l: findleaks -- if GC is available detect and print cyclic garbage --have-resources -- run tests that require large resources (time/space) --- 15,19 ---- -s: single -- run only a single test (see below) -r: random -- randomize test execution order ! -l: findleaks -- if GC is available detect tests that leak memory --have-resources -- run tests that require large resources (time/space) *************** *** 93,100 **** import gc except ImportError: ! print 'cycle garbage collection not available' findleaks = 0 else: ! gc.set_debug(gc.DEBUG_SAVEALL) found_garbage = [] --- 93,103 ---- import gc except ImportError: ! print 'No GC available, disabling findleaks.' findleaks = 0 else: ! # Uncomment the line below to report garbage that is not ! # freeable by reference counting alone. By default only ! # garbage that is not collectable by the GC is reported. ! #gc.set_debug(gc.DEBUG_SAVEALL) found_garbage = [] *************** *** 142,146 **** gc.collect() if gc.garbage: ! print "garbage:", repr(gc.garbage) found_garbage.extend(gc.garbage) del gc.garbage[:] --- 145,152 ---- gc.collect() if gc.garbage: ! print "Warning: test created", len(gc.garbage), ! print "uncollectable object(s)." ! # move the uncollectable objects somewhere so we don't see ! # them again found_garbage.extend(gc.garbage) del gc.garbage[:] From python-dev@python.org Fri Oct 13 16:35:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 08:35:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.202,1.203 Message-ID: <200010131535.IAA12601@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv12549 Modified Files: Makefile Log Message: Update the release number and date. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.202 retrieving revision 1.203 diff -C2 -r1.202 -r1.203 *** Makefile 2000/10/03 16:50:48 1.202 --- Makefile 2000/10/13 15:35:26 1.203 *************** *** 65,69 **** # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.0c1 --- 65,69 ---- # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.0 From python-dev@python.org Fri Oct 13 16:35:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 08:35:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.49,1.50 Message-ID: <200010131535.IAA12606@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory slayer.i.sourceforge.net:/tmp/cvs-serv12549/texinputs Modified Files: boilerplate.tex Log Message: Update the release number and date. Index: boilerplate.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** boilerplate.tex 2000/10/05 03:24:00 1.49 --- boilerplate.tex 2000/10/13 15:35:27 1.50 *************** *** 6,10 **** } ! \date{October 9, 2000} % XXX update before release! ! \release{2.0c1} % software release, not documentation \setshortversion{2.0} % major.minor only for software --- 6,10 ---- } ! \date{October 16, 2000} % XXX update before release! ! \release{2.0} % software release, not documentation \setshortversion{2.0} % major.minor only for software From python-dev@python.org Fri Oct 13 21:11:49 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 13 Oct 2000 13:11:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.11,1.12 Message-ID: <200010132011.NAA30404@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv30000 Modified Files: minidom.py Log Message: Clear siblings, now that they are being set. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** minidom.py 2000/10/09 20:04:16 1.11 --- minidom.py 2000/10/13 20:11:42 1.12 *************** *** 137,140 **** --- 137,142 ---- del self.childNodes[-1] # probably not most efficient! self.childNodes = None + self.previousSibling = None + self.nextSibling = None if self.attributes: for attr in self._attrs.values(): From python-dev@python.org Fri Oct 13 21:53:30 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Fri, 13 Oct 2000 13:53:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom pulldom.py,1.9,1.10 Message-ID: <200010132053.NAA29301@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv28660 Modified Files: pulldom.py Log Message: Moved appendChild calls back to DOMEventStream. Added SAX2DOM class. Index: pulldom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** pulldom.py 2000/10/11 22:34:04 1.9 --- pulldom.py 2000/10/13 20:53:27 1.10 *************** *** 52,56 **** parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.curNode = node --- 52,55 ---- *************** *** 76,80 **** parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.curNode = node --- 75,78 ---- *************** *** 94,98 **** node = self.document.createComment(s) parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(COMMENT, node), None] --- 92,95 ---- *************** *** 104,108 **** parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(PROCESSING_INSTRUCTION, node), None] --- 101,104 ---- *************** *** 113,117 **** node = self.document.createTextNode(chars[start:start + length]) parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(IGNORABLE_WHITESPACE, node), None] --- 109,112 ---- *************** *** 122,126 **** node = self.document.createTextNode(chars) parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(CHARACTERS, node), None] --- 117,120 ---- *************** *** 178,181 **** --- 172,177 ---- if cur_node is node: return + if token != END_ELEMENT: + cur_node.parentNode.appendChild(cur_node) event = self.getEvent() *************** *** 194,200 **** return rc default_bufsize = (2 ** 14) - 20 - # FIXME: move into sax package for common usage def parse(stream_or_string, parser=None, bufsize=default_bufsize): if type(stream_or_string) is type(""): --- 190,220 ---- return rc + class SAX2DOM(PullDOM): + + def startElementNS(self, name, tagName , attrs): + PullDOM.startElementNS(self, name, tagName, attrs) + self.curNode.parentNode.appendChild(self.curNode) + + def startElement(self, name, attrs): + PullDOM.startElement(self, name, attrs) + self.curNode.parentNode.appendChild(self.curNode) + + def processingInstruction(self, target, data): + PullDOM.processingInstruction(self, target, data) + node = self.lastEvent[0][1] + node.parentNode.appendChild(node) + + def ignorableWhitespace(self, chars): + PullDOM.ignorableWhitespace(self, chars) + node = self.lastEvent[0][1] + node.parentNode.appendChild(node) + + def characters(self, chars): + PullDOM.characters(self, chars) + node = self.lastEvent[0][1] + node.parentNode.appendChild(node) + default_bufsize = (2 ** 14) - 20 def parse(stream_or_string, parser=None, bufsize=default_bufsize): if type(stream_or_string) is type(""): From python-dev@python.org Fri Oct 13 21:54:14 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Fri, 13 Oct 2000 13:54:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,1.8,1.9 Message-ID: <200010132054.NAA30069@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv29715/output Modified Files: test_minidom Log Message: Updated test suite to latest pulldom changes. Index: test_minidom =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_minidom,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_minidom 2000/10/11 22:36:00 1.8 --- test_minidom 2000/10/13 20:54:10 1.9 *************** *** 111,118 **** Test Succeeded testInsertBefore Passed assertion: len(Node.allnodes) == 0 - Passed testNonNSElements - siblings - Passed testNonNSElements - parents - Test Succeeded testNonNSElements - Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test --- 111,114 ---- *************** *** 154,157 **** --- 150,157 ---- Passed Test Test Succeeded testRemoveAttributeNode + Passed assertion: len(Node.allnodes) == 0 + Passed testSAX2DOM - siblings + Passed testSAX2DOM - parents + Test Succeeded testSAX2DOM Passed assertion: len(Node.allnodes) == 0 Test Succeeded testSetAttrValueandNodeValue From python-dev@python.org Fri Oct 13 21:54:14 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Fri, 13 Oct 2000 13:54:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.12,1.13 Message-ID: <200010132054.NAA30070@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv29715 Modified Files: test_minidom.py Log Message: Updated test suite to latest pulldom changes. Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** test_minidom.py 2000/10/12 17:31:36 1.12 --- test_minidom.py 2000/10/13 20:54:10 1.13 *************** *** 338,356 **** doc.unlink() ! def testNonNSElements(): from xml.dom import pulldom ! pulldom = pulldom.PullDOM() ! pulldom.startDocument() ! pulldom.startElement("doc", {}) ! pulldom.characters("text") ! pulldom.startElement("subelm", {}) ! pulldom.characters("text") ! pulldom.endElement("subelm") ! pulldom.characters("text") ! pulldom.endElement("doc") ! pulldom.endDocument() ! doc = pulldom.document root = doc.documentElement (text1, elm1, text2) = root.childNodes --- 338,356 ---- doc.unlink() ! def testSAX2DOM(): from xml.dom import pulldom ! sax2dom = pulldom.SAX2DOM() ! sax2dom.startDocument() ! sax2dom.startElement("doc", {}) ! sax2dom.characters("text") ! sax2dom.startElement("subelm", {}) ! sax2dom.characters("text") ! sax2dom.endElement("subelm") ! sax2dom.characters("text") ! sax2dom.endElement("doc") ! sax2dom.endDocument() ! doc = sax2dom.document root = doc.documentElement (text1, elm1, text2) = root.childNodes *************** *** 364,368 **** text2.nextSibling is None and text3.previousSibling is None and ! text3.nextSibling is None, "testNonNSElements - siblings") confirm(root.parentNode is doc and --- 364,368 ---- text2.nextSibling is None and text3.previousSibling is None and ! text3.nextSibling is None, "testSAX2DOM - siblings") confirm(root.parentNode is doc and *************** *** 370,374 **** elm1.parentNode is root and text2.parentNode is root and ! text3.parentNode is elm1, "testNonNSElements - parents") doc.unlink() --- 370,374 ---- elm1.parentNode is root and text2.parentNode is root and ! text3.parentNode is elm1, "testSAX2DOM - parents") doc.unlink() From python-dev@python.org Fri Oct 13 22:58:16 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 13 Oct 2000 14:58:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler/compiler ast.py,1.9,1.10 pyassem.py,1.12,1.13 pycodegen.py,1.25,1.26 transformer.py,1.15,1.16 Message-ID: <200010132158.OAA29101@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/compiler/compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv28922 Modified Files: ast.py pyassem.py pycodegen.py transformer.py Log Message: Now supports entire Python 2.0 language and still supports Python 1.5.2. The compiler generates code for the version of the interpreter it is run under. ast.py: Print and Printnl add dest attr for extended print new node AugAssign for augmented assignments new nodes ListComp, ListCompFor, and ListCompIf for list comprehensions pyassem.py: add work around for string-Unicode comparison raising UnicodeError on comparison of two objects in code object's const table pycodegen.py: define VERSION, the Python major version number get magic number using imp.get_magic() instead of hard coding implement list comprehensions, extended print, and augmented assignment; augmented assignment uses Delegator classes (see doc string) fix import and tuple unpacking for 1.5.2 transformer.py: various changes to support new 2.0 grammar and old 1.5 grammar add debug_tree helper than converts and symbol and token numbers to their names Index: ast.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/ast.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** ast.py 2000/05/02 22:32:59 1.9 --- ast.py 2000/10/13 21:58:13 1.10 *************** *** 280,299 **** nodes['print'] = 'Print' ! def __init__(self, nodes): self.nodes = nodes ! self._children = ('print', nodes) def __repr__(self): ! return "Print(%s)" % self._children[1:] class Printnl(Node): nodes['printnl'] = 'Printnl' ! def __init__(self, nodes): self.nodes = nodes ! self._children = ('printnl', nodes) def __repr__(self): ! return "Printnl(%s)" % self._children[1:] class Discard(Node): --- 280,301 ---- nodes['print'] = 'Print' ! def __init__(self, nodes, dest): self.nodes = nodes ! self.dest = dest ! self._children = ('print', nodes, dest) def __repr__(self): ! return "Print(%s, %s)" % (self._children[1:-1], self._children[-1]) class Printnl(Node): nodes['printnl'] = 'Printnl' ! def __init__(self, nodes, dest): self.nodes = nodes ! self.dest = dest ! self._children = ('printnl', nodes, dest) def __repr__(self): ! return "Printnl(%s, %s)" % (self._children[1:-1], self._children[-1]) class Discard(Node): *************** *** 307,310 **** --- 309,324 ---- return "Discard(%s)" % self._children[1:] + class AugAssign(Node): + nodes['augassign'] = 'AugAssign' + + def __init__(self, node, op, expr): + self.node = node + self.op = op + self.expr = expr + self._children = ('augassign', node, op, expr) + + def __repr__(self): + return "AugAssign(%s)" % str(self._children[1:]) + class Assign(Node): nodes['assign'] = 'Assign' *************** *** 360,363 **** --- 374,412 ---- def __repr__(self): return "AssAttr(%s,%s,%s)" % self._children[1:] + + class ListComp(Node): + nodes['listcomp'] = 'ListComp' + + def __init__(self, expr, quals): + self.expr = expr + self.quals = quals + self._children = ('listcomp', expr, quals) + + def __repr__(self): + return "ListComp(%s, %s)" % self._children[1:] + + class ListCompFor(Node): + nodes['listcomp_for'] = 'ListCompFor' + + # transformer fills in ifs after node is created + + def __init__(self, assign, list, ifs): + self.assign = assign + self.list = list + self.ifs = ifs + self._children = ('listcomp_for', assign, list, ifs) + + def __repr__(self): + return "ListCompFor(%s, %s, %s)" % self._children[1:] + + class ListCompIf(Node): + nodes['listcomp_if'] = 'ListCompIf' + + def __init__(self, test): + self.test = test + self._children = ('listcomp_if', test) + + def __repr__(self): + return "ListCompIf(%s)" % self._children[1:] class List(Node): Index: pyassem.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/pyassem.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** pyassem.py 2000/10/12 20:23:23 1.12 --- pyassem.py 2000/10/13 21:58:13 1.13 *************** *** 254,259 **** def _lookupName(self, name, list): """Return index of name in list, appending if necessary""" ! if name in list: ! i = list.index(name) # this is cheap, but incorrect in some cases, e.g 2 vs. 2L if type(name) == type(list[i]): --- 254,265 ---- def _lookupName(self, name, list): """Return index of name in list, appending if necessary""" ! found = None ! t = type(name) ! for i in range(len(list)): ! # must do a comparison on type first to prevent UnicodeErrors ! if t == type(list[i]) and list[i] == name: ! found = 1 ! break ! if found: # this is cheap, but incorrect in some cases, e.g 2 vs. 2L if type(name) == type(list[i]): Index: pycodegen.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/pycodegen.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** pycodegen.py 2000/10/12 20:23:23 1.25 --- pycodegen.py 2000/10/13 21:58:13 1.26 *************** *** 1,2 **** --- 1,3 ---- + import imp import os import marshal *************** *** 4,7 **** --- 5,9 ---- import string import struct + import sys import types from cStringIO import StringIO *************** *** 11,14 **** --- 13,22 ---- from compiler.pyassem import CO_VARARGS, CO_VARKEYWORDS, CO_NEWLOCALS, TupleArg + # Do we have Python 1.x or Python 2.x? + try: + VERSION = sys.version_info[0] + except AttributeError: + VERSION = 1 + callfunc_opcode_info = { # (Have *args, Have **args) : opcode *************** *** 19,28 **** } ! def compile(filename): f = open(filename) buf = f.read() f.close() mod = Module(buf, filename) ! mod.compile() f = open(filename + "c", "wb") mod.dump(f) --- 27,36 ---- } ! def compile(filename, display=0): f = open(filename) buf = f.read() f.close() mod = Module(buf, filename) ! mod.compile(display) f = open(filename + "c", "wb") mod.dump(f) *************** *** 35,43 **** self.code = None ! def compile(self): ast = parse(self.source) root, filename = os.path.split(self.filename) gen = ModuleCodeGenerator(filename) walk(ast, gen, 1) self.code = gen.getCode() --- 43,54 ---- self.code = None ! def compile(self, display=0): ast = parse(self.source) root, filename = os.path.split(self.filename) gen = ModuleCodeGenerator(filename) walk(ast, gen, 1) + if display: + import pprint + print pprint.pprint(ast) self.code = gen.getCode() *************** *** 46,50 **** marshal.dump(self.code, f) ! MAGIC = (50823 | (ord('\r')<<16) | (ord('\n')<<24)) def getPycHeader(self): --- 57,61 ---- marshal.dump(self.code, f) ! MAGIC = imp.get_magic() def getPycHeader(self): *************** *** 53,60 **** # to indicate the type of the value. simplest way to get the # same effect is to call marshal and then skip the code. - magic = marshal.dumps(self.MAGIC)[1:] mtime = os.stat(self.filename)[stat.ST_MTIME] mtime = struct.pack('i', mtime) ! return magic + mtime class CodeGenerator: --- 64,70 ---- # to indicate the type of the value. simplest way to get the # same effect is to call marshal and then skip the code. mtime = os.stat(self.filename)[stat.ST_MTIME] mtime = struct.pack('i', mtime) ! return self.MAGIC + mtime class CodeGenerator: *************** *** 64,68 **** def __init__(self, filename): ## Subclasses must define a constructor that intializes self.graph ! ## before calling this init function ## self.graph = pyassem.PyFlowGraph() self.filename = filename --- 74,78 ---- def __init__(self, filename): ## Subclasses must define a constructor that intializes self.graph ! ## before calling this init function, e.g. ## self.graph = pyassem.PyFlowGraph() self.filename = filename *************** *** 143,147 **** def visitLambda(self, node): self._visitFuncOrLambda(node, isLambda=1) - ## self.storeName("") def _visitFuncOrLambda(self, node, isLambda): --- 153,156 ---- *************** *** 181,188 **** self.set_lineno(test) self.visit(test) - ## if i == numtests - 1 and not node.else_: - ## nextTest = end - ## else: - ## nextTest = self.newBlock() nextTest = self.newBlock() self.emit('JUMP_IF_FALSE', nextTest) --- 190,193 ---- *************** *** 305,308 **** --- 310,377 ---- self.nextBlock(end) + # list comprehensions + __list_count = 0 + + def visitListComp(self, node): + # XXX would it be easier to transform the AST into the form it + # would have if the list comp were expressed as a series of + # for and if stmts and an explicit append? + self.set_lineno(node) + # setup list + append = "$append%d" % self.__list_count + self.__list_count = self.__list_count + 1 + self.emit('BUILD_LIST', 0) + self.emit('DUP_TOP') + self.emit('LOAD_ATTR', 'append') + self.storeName(append) + l = len(node.quals) + stack = [] + for i, for_ in zip(range(l), node.quals): + start, anchor = self.visit(for_) + cont = None + for if_ in for_.ifs: + if cont is None: + cont = self.newBlock() + self.visit(if_, cont) + stack.insert(0, (start, cont, anchor)) + + self.loadName(append) + self.visit(node.expr) + self.emit('CALL_FUNCTION', 1) + self.emit('POP_TOP') + + for start, cont, anchor in stack: + if cont: + skip_one = self.newBlock() + self.emit('JUMP_FORWARD', skip_one) + self.nextBlock(cont) + self.emit('POP_TOP') + self.nextBlock(skip_one) + self.emit('JUMP_ABSOLUTE', start) + self.nextBlock(anchor) + self.delName(append) + + self.__list_count = self.__list_count - 1 + + def visitListCompFor(self, node): + self.set_lineno(node) + start = self.newBlock() + anchor = self.newBlock() + + self.visit(node.list) + self.visit(ast.Const(0)) + self.emit('SET_LINENO', node.lineno) + self.nextBlock(start) + self.emit('FOR_LOOP', anchor) + self.visit(node.assign) + return start, anchor + + def visitListCompIf(self, node, branch): + self.set_lineno(node) + self.visit(node.test) + self.emit('JUMP_IF_FALSE', branch) + self.newBlock() + self.emit('POP_TOP') + # exception related *************** *** 398,405 **** # misc - ## def visitStmt(self, node): - ## # nothing to do except walk the children - ## pass - def visitDiscard(self, node): self.visit(node.expr) --- 467,470 ---- *************** *** 427,451 **** self.set_lineno(node) for name, alias in node.names: ! self.emit('LOAD_CONST', None) self.emit('IMPORT_NAME', name) ! self._resolveDots(name) ! self.storeName(alias or name) def visitFrom(self, node): self.set_lineno(node) fromlist = map(lambda (name, alias): name, node.names) ! self.emit('LOAD_CONST', tuple(fromlist)) self.emit('IMPORT_NAME', node.modname) for name, alias in node.names: ! if name == '*': ! self.namespace = 0 ! self.emit('IMPORT_STAR') ! # There can only be one name w/ from ... import * ! assert len(node.names) == 1 ! return else: self.emit('IMPORT_FROM', name) - self._resolveDots(name) - self.storeName(alias or name) self.emit('POP_TOP') --- 492,521 ---- self.set_lineno(node) for name, alias in node.names: ! if VERSION > 1: ! self.emit('LOAD_CONST', None) self.emit('IMPORT_NAME', name) ! mod = string.split(name, ".")[0] ! self.storeName(alias or mod) def visitFrom(self, node): self.set_lineno(node) fromlist = map(lambda (name, alias): name, node.names) ! if VERSION > 1: ! self.emit('LOAD_CONST', tuple(fromlist)) self.emit('IMPORT_NAME', node.modname) for name, alias in node.names: ! if VERSION > 1: ! if name == '*': ! self.namespace = 0 ! self.emit('IMPORT_STAR') ! # There can only be one name w/ from ... import * ! assert len(node.names) == 1 ! return ! else: ! self.emit('IMPORT_FROM', name) ! self._resolveDots(name) ! self.storeName(alias or name) else: self.emit('IMPORT_FROM', name) self.emit('POP_TOP') *************** *** 492,502 **** print node ! def visitAssTuple(self, node): if findOp(node) != 'OP_DELETE': ! self.emit('UNPACK_SEQUENCE', len(node.nodes)) for child in node.nodes: self.visit(child) ! visitAssList = visitAssTuple def visitExec(self, node): --- 562,644 ---- print node ! def _visitAssSequence(self, node, op='UNPACK_SEQUENCE'): if findOp(node) != 'OP_DELETE': ! self.emit(op, len(node.nodes)) for child in node.nodes: self.visit(child) ! if VERSION > 1: ! visitAssTuple = _visitAssSequence ! visitAssList = _visitAssSequence ! else: ! def visitAssTuple(self, node): ! self._visitAssSequence(node, 'UNPACK_TUPLE') ! ! def visitAssList(self, node): ! self._visitAssSequence(node, 'UNPACK_LIST') ! ! # augmented assignment ! ! def visitAugAssign(self, node): ! aug_node = wrap_aug(node.node) ! self.visit(aug_node, "load") ! self.visit(node.expr) ! self.emit(self._augmented_opcode[node.op]) ! self.visit(aug_node, "store") ! ! _augmented_opcode = { ! '+=' : 'INPLACE_ADD', ! '-=' : 'INPLACE_SUBTRACT', ! '*=' : 'INPLACE_MULTIPLY', ! '/=' : 'INPLACE_DIVIDE', ! '%=' : 'INPLACE_MODULO', ! '**=': 'INPLACE_POWER', ! '>>=': 'INPLACE_RSHIFT', ! '<<=': 'INPLACE_LSHIFT', ! '&=' : 'INPLACE_AND', ! '^=' : 'INPLACE_XOR', ! '|=' : 'INPLACE_OR', ! } ! ! def visitAugName(self, node, mode): ! if mode == "load": ! self.loadName(node.name) ! elif mode == "store": ! self.storeName(node.name) ! ! def visitAugGetattr(self, node, mode): ! if mode == "load": ! self.visit(node.expr) ! self.emit('DUP_TOP') ! self.emit('LOAD_ATTR', node.attrname) ! elif mode == "store": ! self.emit('ROT_TWO') ! self.emit('STORE_ATTR', node.attrname) ! ! def visitAugSlice(self, node, mode): ! if mode == "load": ! self.visitSlice(node, 1) ! elif mode == "store": ! slice = 0 ! if node.lower: ! slice = slice | 1 ! if node.upper: ! slice = slice | 2 ! if slice == 0: ! self.emit('ROT_TWO') ! elif slice == 3: ! self.emit('ROT_FOUR') ! else: ! self.emit('ROT_THREE') ! self.emit('STORE_SLICE+%d' % slice) ! ! def visitAugSubscript(self, node, mode): ! if len(node.subs) > 1: ! raise SyntaxError, "augmented assignment to tuple is not possible" ! if mode == "load": ! self.visitSubscript(node, 1) ! elif mode == "store": ! self.emit('ROT_THREE') ! self.emit('STORE_SUBSCR') def visitExec(self, node): *************** *** 534,544 **** def visitPrint(self, node): self.set_lineno(node) for child in node.nodes: self.visit(child) ! self.emit('PRINT_ITEM') def visitPrintnl(self, node): self.visitPrint(node) ! self.emit('PRINT_NEWLINE') def visitReturn(self, node): --- 676,697 ---- def visitPrint(self, node): self.set_lineno(node) + if node.dest: + self.visit(node.dest) for child in node.nodes: + if node.dest: + self.emit('DUP_TOP') self.visit(child) ! if node.dest: ! self.emit('ROT_TWO') ! self.emit('PRINT_ITEM_TO') ! else: ! self.emit('PRINT_ITEM') def visitPrintnl(self, node): self.visitPrint(node) ! if node.dest: ! self.emit('PRINT_NEWLINE_TO') ! else: ! self.emit('PRINT_NEWLINE') def visitReturn(self, node): *************** *** 549,553 **** # slice and subscript stuff ! def visitSlice(self, node): self.visit(node.expr) slice = 0 --- 702,707 ---- # slice and subscript stuff ! def visitSlice(self, node, aug_flag=None): ! # aug_flag is used by visitAugSlice self.visit(node.expr) slice = 0 *************** *** 558,561 **** --- 712,722 ---- self.visit(node.upper) slice = slice | 2 + if aug_flag: + if slice == 0: + self.emit('DUP_TOP') + elif slice == 3: + self.emit('DUP_TOPX', 3) + else: + self.emit('DUP_TOPX', 2) if node.flags == 'OP_APPLY': self.emit('SLICE+%d' % slice) *************** *** 568,575 **** raise ! def visitSubscript(self, node): self.visit(node.expr) for sub in node.subs: self.visit(sub) if len(node.subs) > 1: self.emit('BUILD_TUPLE', len(node.subs)) --- 729,738 ---- raise ! def visitSubscript(self, node, aug_flag=None): self.visit(node.expr) for sub in node.subs: self.visit(sub) + if aug_flag: + self.emit('DUP_TOPX', 2) if len(node.subs) > 1: self.emit('BUILD_TUPLE', len(node.subs)) *************** *** 741,745 **** def unpackSequence(self, tup): ! self.emit('UNPACK_SEQUENCE', len(tup)) for elt in tup: if type(elt) == types.TupleType: --- 904,911 ---- def unpackSequence(self, tup): ! if VERSION > 1: ! self.emit('UNPACK_SEQUENCE', len(tup)) ! else: ! self.emit('UNPACK_TUPLE', len(tup)) for elt in tup: if type(elt) == types.TupleType: *************** *** 766,770 **** self.emit('RETURN_VALUE') - def generateArgList(arglist): """Generate an arg list marking TupleArgs""" --- 932,935 ---- *************** *** 838,841 **** --- 1003,1045 ---- elif self.op != node.flags: raise ValueError, "mixed ops in stmt" + + class Delegator: + """Base class to support delegation for augmented assignment nodes + + To generator code for augmented assignments, we use the following + wrapper classes. In visitAugAssign, the left-hand expression node + is visited twice. The first time the visit uses the normal method + for that node . The second time the visit uses a different method + that generates the appropriate code to perform the assignment. + These delegator classes wrap the original AST nodes in order to + support the variant visit methods. + """ + def __init__(self, obj): + self.obj = obj + + def __getattr__(self, attr): + return getattr(self.obj, attr) + + class AugGetattr(Delegator): + pass + + class AugName(Delegator): + pass + + class AugSlice(Delegator): + pass + + class AugSubscript(Delegator): + pass + + wrapper = { + ast.Getattr: AugGetattr, + ast.Name: AugName, + ast.Slice: AugSlice, + ast.Subscript: AugSubscript, + } + + def wrap_aug(node): + return wrapper[node.__class__](node) if __name__ == "__main__": Index: transformer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/transformer.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** transformer.py 2000/10/12 20:23:23 1.15 --- transformer.py 2000/10/13 21:58:13 1.16 *************** *** 1,18 **** - # - # Copyright (C) 1997-1998 Greg Stein. All Rights Reserved. - # - # This module is provided under a BSD-ish license. See - # http://www.opensource.org/licenses/bsd-license.html - # and replace OWNER, ORGANIZATION, and YEAR as appropriate. - # - # - # Written by Greg Stein (gstein@lyra.org) - # and Bill Tutt (rassilon@lima.mudlib.org) - # February 1997. - # - # Support for ast.Node subclasses written and other revisions by - # Jeremy Hylton (jeremy@beopen.com) - # - """Parse tree transformation module. --- 1,2 ---- *************** *** 25,29 **** --- 9,27 ---- """ + # Original version written by Greg Stein (gstein@lyra.org) + # and Bill Tutt (rassilon@lima.mudlib.org) + # February 1997. + # + # Modifications and improvements for Python 2.0 by Jeremy Hylton and + # Mark Hammond + + # Portions of this file are: + # Copyright (C) 1997-1998 Greg Stein. All Rights Reserved. # + # This module is provided under a BSD-ish license. See + # http://www.opensource.org/licenses/bsd-license.html + # and replace OWNER, ORGANIZATION, and YEAR as appropriate. + + # The output tree has the following nodes: # *************** *** 50,56 **** # return: valueNode # const: value ! # print: [ node1, ..., nodeN ] ! # printnl: [ node1, ..., nodeN ] # discard: exprNode # assign: [ node1, ..., nodeN ], exprNode # ass_tuple: [ node1, ..., nodeN ] --- 48,55 ---- # return: valueNode # const: value ! # print: [ node1, ..., nodeN ] [, dest] ! # printnl: [ node1, ..., nodeN ] [, dest] # discard: exprNode + # augassign: node, op, expr # assign: [ node1, ..., nodeN ], exprNode # ass_tuple: [ node1, ..., nodeN ] *************** *** 98,107 **** import ast import parser import symbol import token import string - import pprint - error = 'walker.error' --- 97,106 ---- import ast import parser + # Care must be taken to use only symbols and tokens defined in Python + # 1.5.2 for code branches executed in 1.5.2 import symbol import token import string error = 'walker.error' *************** *** 329,353 **** def expr_stmt(self, nodelist): ! # testlist ('=' testlist)* exprNode = self.com_node(nodelist[-1]) if len(nodelist) == 1: return Node('discard', exprNode) ! nodes = [ ] ! for i in range(0, len(nodelist) - 2, 2): ! nodes.append(self.com_assign(nodelist[i], OP_ASSIGN)) ! n = Node('assign', nodes, exprNode) ! n.lineno = nodelist[1][2] return n def print_stmt(self, nodelist): ! # print: (test ',')* [test] items = [ ] ! for i in range(1, len(nodelist), 2): items.append(self.com_node(nodelist[i])) if nodelist[-1][0] == token.COMMA: ! n = Node('print', items) n.lineno = nodelist[0][2] return n ! n = Node('printnl', items) n.lineno = nodelist[0][2] return n --- 328,369 ---- def expr_stmt(self, nodelist): ! # augassign testlist | testlist ('=' testlist)* exprNode = self.com_node(nodelist[-1]) if len(nodelist) == 1: return Node('discard', exprNode) ! if nodelist[1][0] == token.EQUAL: ! nodes = [ ] ! for i in range(0, len(nodelist) - 2, 2): ! nodes.append(self.com_assign(nodelist[i], OP_ASSIGN)) ! n = Node('assign', nodes, exprNode) ! n.lineno = nodelist[1][2] ! else: ! lval = self.com_augassign(nodelist[0]) ! op = self.com_augassign_op(nodelist[1]) ! n = Node('augassign', lval, op[1], exprNode) ! n.lineno = op[2] return n def print_stmt(self, nodelist): ! # print ([ test (',' test)* [','] ] | '>>' test [ (',' test)+ [','] ]) items = [ ] ! if len(nodelist) == 1: ! start = 1 ! dest = None ! elif nodelist[1][0] == token.RIGHTSHIFT: ! assert len(nodelist) == 3 \ ! or nodelist[3][0] == token.COMMA ! dest = self.com_node(nodelist[2]) ! start = 4 ! else: ! dest = None ! start = 1 ! for i in range(start, len(nodelist), 2): items.append(self.com_node(nodelist[i])) if nodelist[-1][0] == token.COMMA: ! n = Node('print', items, dest) n.lineno = nodelist[0][2] return n ! n = Node('printnl', items, dest) n.lineno = nodelist[0][2] return n *************** *** 406,420 **** # from: 'from' dotted_name 'import' # ('*' | import_as_name (',' import_as_name)*) - names = [] - is_as = 0 if nodelist[0][1] == 'from': ! for i in range(3, len(nodelist), 2): ! names.append(self.com_import_as_name(nodelist[i][1])) n = Node('from', self.com_dotted_name(nodelist[1]), names) n.lineno = nodelist[0][2] return n ! for i in range(1, len(nodelist), 2): ! names.append(self.com_dotted_as_name(nodelist[i])) n = Node('import', names) n.lineno = nodelist[0][2] --- 422,443 ---- # from: 'from' dotted_name 'import' # ('*' | import_as_name (',' import_as_name)*) if nodelist[0][1] == 'from': ! names = [] ! if nodelist[3][0] == token.NAME: ! for i in range(3, len(nodelist), 2): ! names.append((nodelist[i][1], None)) ! else: ! for i in range(3, len(nodelist), 2): ! names.append(self.com_import_as_name(nodelist[i][1])) n = Node('from', self.com_dotted_name(nodelist[1]), names) n.lineno = nodelist[0][2] return n ! if nodelist[1][0] == symbol.dotted_name: ! names = [(self.com_dotted_name(nodelist[1][1:]), None)] ! else: ! names = [] ! for i in range(1, len(nodelist), 2): ! names.append(self.com_dotted_as_name(nodelist[i])) n = Node('import', names) n.lineno = nodelist[0][2] *************** *** 738,742 **** if node[0] not in _legal_node_types: ! raise error, 'illegal node passed to com_node: %s' % node[0] # print "dispatch", self._dispatch[node[0]].__name__, node --- 761,765 ---- if node[0] not in _legal_node_types: ! raise error, 'illegal node passed to com_node: %s' % `node` # print "dispatch", self._dispatch[node[0]].__name__, node *************** *** 819,827 **** def com_dotted_as_name(self, node): dot = self.com_dotted_name(node[1]) ! if len(node) == 2: return dot, None ! assert node[2][1] == 'as' ! assert node[3][0] == token.NAME ! return dot, node[3][1] def com_import_as_name(self, node): --- 842,853 ---- def com_dotted_as_name(self, node): dot = self.com_dotted_name(node[1]) ! if len(node) <= 2: return dot, None ! if node[0] == symbol.dotted_name: ! pass ! else: ! assert node[2][1] == 'as' ! assert node[3][0] == token.NAME ! return dot, node[3][1] def com_import_as_name(self, node): *************** *** 873,876 **** --- 899,916 ---- return n + def com_augassign_op(self, node): + assert node[0] == symbol.augassign + return node[1] + + def com_augassign(self, node): + """Return node suitable for lvalue of augmented assignment + + Names, slices, and attributes are the only allowable nodes. + """ + l = self.com_node(node) + if l[0] in ('name', 'slice', 'subscript', 'getattr'): + return l + raise SyntaxError, "can't assign to %s" % l[0] + def com_assign(self, node, assigning): # return a node suitable for use as an "lvalue" *************** *** 956,960 **** def com_stmt(self, node): - #pprint.pprint(node) result = self.com_node(node) try: --- 996,999 ---- *************** *** 977,985 **** stmts.append(result) ! def com_list_constructor(self, nodelist): ! values = [ ] ! for i in range(1, len(nodelist), 2): ! values.append(self.com_node(nodelist[i])) ! return Node('list', values) def com_dictmaker(self, nodelist): --- 1016,1077 ---- stmts.append(result) ! if hasattr(symbol, 'list_for'): ! def com_list_constructor(self, nodelist): ! # listmaker: test ( list_for | (',' test)* [','] ) ! values = [ ] ! for i in range(1, len(nodelist)): ! if nodelist[i][0] == symbol.list_for: ! assert len(nodelist[i:]) == 1 ! return self.com_list_comprehension(values[0], ! nodelist[i]) ! elif nodelist[i][0] == token.COMMA: ! continue ! values.append(self.com_node(nodelist[i])) ! return Node('list', values) ! ! def com_list_comprehension(self, expr, node): ! # list_iter: list_for | list_if ! # list_for: 'for' exprlist 'in' testlist [list_iter] ! # list_if: 'if' test [list_iter] ! lineno = node[1][2] ! fors = [] ! while node: ! if node[1][1] == 'for': ! assignNode = self.com_assign(node[2], OP_ASSIGN) ! listNode = self.com_node(node[4]) ! newfor = Node('listcomp_for', assignNode, ! listNode, []) ! newfor.lineno = node[1][2] ! fors.append(newfor) ! if len(node) == 5: ! node = None ! else: ! node = self.com_list_iter(node[5]) ! elif node[1][1] == 'if': ! test = self.com_node(node[2]) ! newif = Node('listcomp_if', test) ! newif.lineno = node[1][2] ! newfor.ifs.append(newif) ! if len(node) == 3: ! node = None ! else: ! node = self.com_list_iter(node[3]) ! else: ! raise SyntaxError, \ ! ("unexpected list comprehension element: %s %d" ! % (node, lineno)) ! n = Node('listcomp', expr, fors) ! n.lineno = lineno ! return n ! ! def com_list_iter(self, node): ! assert node[0] == symbol.list_iter ! return node[1] ! else: ! def com_list_constructor(self, nodelist): ! values = [ ] ! for i in range(1, len(nodelist), 2): ! values.append(self.com_node(nodelist[i])) ! return Node('list', values) def com_dictmaker(self, nodelist): *************** *** 987,991 **** items = [ ] for i in range(1, len(nodelist), 4): ! items.append((self.com_node(nodelist[i]), self.com_node(nodelist[i+2]))) return Node('dict', items) --- 1079,1084 ---- items = [ ] for i in range(1, len(nodelist), 4): ! items.append((self.com_node(nodelist[i]), ! self.com_node(nodelist[i+2]))) return Node('dict', items) *************** *** 1251,1252 **** --- 1344,1363 ---- symbol.factor, ] + + import types + _names = {} + for k, v in symbol.sym_name.items(): + _names[k] = v + for k, v in token.tok_name.items(): + _names[k] = v + + def debug_tree(tree): + l = [] + for elt in tree: + if type(elt) == types.IntType: + l.append(_names.get(elt, elt)) + elif type(elt) == types.StringType: + l.append(elt) + else: + l.append(debug_tree(elt)) + return l From python-dev@python.org Fri Oct 13 22:59:35 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 13 Oct 2000 14:59:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler compile.py,1.2,1.3 Message-ID: <200010132159.OAA29646@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv29555 Modified Files: compile.py Log Message: add -d option that dumps entire AST before compiling Index: compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compile.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** compile.py 2000/05/02 22:29:46 1.2 --- compile.py 2000/10/13 21:59:32 1.3 *************** *** 6,10 **** def main(): VERBOSE = 0 ! opts, args = getopt.getopt(sys.argv[1:], 'vq') for k, v in opts: if k == '-v': --- 6,11 ---- def main(): VERBOSE = 0 ! DISPLAY = 0 ! opts, args = getopt.getopt(sys.argv[1:], 'vqd') for k, v in opts: if k == '-v': *************** *** 17,20 **** --- 18,23 ---- f = open('/dev/null', 'wb') sys.stdout = f + if k == '-d': + DISPLAY = 1 if not args: print "no files to compile" *************** *** 23,27 **** if VERBOSE: print filename ! compile(filename) if __name__ == "__main__": --- 26,30 ---- if VERBOSE: print filename ! compile(filename, DISPLAY) if __name__ == "__main__": From python-dev@python.org Fri Oct 13 23:00:19 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 13 Oct 2000 15:00:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler regrtest.py,NONE,1.1 Message-ID: <200010132200.PAA30044@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv29827 Added Files: regrtest.py Log Message: run the std regression test suite using bytecode produced by the compiler --- NEW FILE --- """Run the Python regression test using the compiler This test runs the standard Python test suite using bytecode generated by this compiler instead of by the builtin compiler. The regression test is run with the interpreter in verbose mode so that import problems can be observed easily. """ from compiler import compile import os import sys import test import tempfile def copy_test_suite(): dest = tempfile.mktemp() os.mkdir(dest) os.system("cp -r %s/* %s" % (test.__path__[0], dest)) print "Creating copy of test suite in", dest return dest def compile_files(dir): print "Compiling", line_len = 10 for file in os.listdir(dir): base, ext = os.path.splitext(file) if ext == '.py' and base[:4] == 'test': source = os.path.join(dir, file) line_len = line_len + len(file) + 1 if line_len > 75: print "\n\t", line_len = len(source) + 9 print file, compile(source) # make sure the .pyc file is not over-written os.chmod(source + "c", 444) print def run_regrtest(test_dir): os.chdir(test_dir) os.system("%s -v regrtest.py" % sys.executable) def cleanup(dir): os.system("rm -rf %s" % dir) def main(): test_dir = copy_test_suite() compile_files(test_dir) run_regrtest(test_dir) cleanup(test_dir) if __name__ == "__main__": main() From python-dev@python.org Sat Oct 14 00:05:47 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 13 Oct 2000 16:05:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.41,2.42 Message-ID: <200010132305.QAA17399@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv17290/Include Modified Files: patchlevel.h Log Message: getting close Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** patchlevel.h 2000/10/09 15:13:47 2.41 --- patchlevel.h 2000/10/13 23:05:44 2.42 *************** *** 23,34 **** #define PY_MINOR_VERSION 0 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA #define PY_RELEASE_SERIAL 1 /* Version as a string */ ! #define PY_VERSION "2.0c1" /* Historic */ ! #define PATCHLEVEL "2.0c1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. --- 23,34 ---- #define PY_MINOR_VERSION 0 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL #define PY_RELEASE_SERIAL 1 /* Version as a string */ ! #define PY_VERSION "2.0" /* Historic */ ! #define PATCHLEVEL "2.0" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. From python-dev@python.org Sat Oct 14 04:40:23 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 20:40:23 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command config.py,1.4,1.5 Message-ID: <200010140340.UAA03033@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv2997/distutils/command Modified Files: config.py Log Message: Bastian Kleineidam: fix up any supplied command-line options. Index: config.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/config.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** config.py 2000/09/30 18:27:54 1.4 --- config.py 2000/10/14 03:40:20 1.5 *************** *** 15,18 **** --- 15,19 ---- import sys, os, string, re + from types import * from distutils.core import Command from distutils.errors import DistutilsExecError *************** *** 70,74 **** def finalize_options (self): ! pass def run (self): --- 71,89 ---- def finalize_options (self): ! if self.include_dirs is None: ! self.include_dirs = self.distribution.include_dirs or [] ! elif type(self.include_dirs) is StringType: ! self.include_dirs = string.split(self.include_dirs, os.pathsep) ! ! if self.libraries is None: ! self.libraries = [] ! elif type(self.libraries) is StringType: ! self.libraries = [self.libraries] ! ! if self.library_dirs is None: ! self.library_dirs = [] ! elif type(self.library_dirs) is StringType: ! self.library_dirs = string.split(self.library_dirs, os.pathsep) ! def run (self): From python-dev@python.org Sat Oct 14 04:47:10 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 20:47:10 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install.py,1.52,1.53 Message-ID: <200010140347.UAA04862@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv4851/distutils/command Modified Files: install.py Log Message: Lyle Johnson: use 'normcase()' in addition to 'normpath()' when testing if we actually installed modules to a directory in sys.path. Index: install.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install.py,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** install.py 2000/10/03 03:31:52 1.52 --- install.py 2000/10/14 03:47:07 1.53 *************** *** 498,505 **** self.record) ! normalized_path = map(os.path.normpath, sys.path) if (self.warn_dir and not (self.path_file and self.install_path_file) and ! os.path.normpath(self.install_lib) not in normalized_path): self.warn(("modules installed to '%s', which is not in " + "Python's module search path (sys.path) -- " + --- 498,507 ---- self.record) ! sys_path = map(os.path.normpath, sys.path) ! sys_path = map(os.path.normcase, sys_path) ! install_lib = os.path.normcase(os.path.normpath(self.install_lib)) if (self.warn_dir and not (self.path_file and self.install_path_file) and ! install_lib not in sys_path): self.warn(("modules installed to '%s', which is not in " + "Python's module search path (sys.path) -- " + From python-dev@python.org Sat Oct 14 04:56:44 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 20:56:44 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command config.py,1.5,1.6 Message-ID: <200010140356.UAA05487@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv5479 Modified Files: config.py Log Message: Bastian Kleineidam: make 'check_lib()' more like AC_CHECK_LIB by adding an 'other_libraries()' parameter. Index: config.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/config.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** config.py 2000/10/14 03:40:20 1.5 --- config.py 2000/10/14 03:56:42 1.6 *************** *** 326,339 **** def check_lib (self, library, library_dirs=None, ! headers=None, include_dirs=None): """Determine if 'library' is available to be linked against, without actually checking that any particular symbols are provided by it. 'headers' will be used in constructing the source file to be compiled, but the only effect of this is to check if all the ! header files listed are available. """ self._check_compiler() return self.try_link("int main (void) { }", ! headers, include_dirs, [library], library_dirs) def check_header (self, header, include_dirs=None, --- 326,342 ---- def check_lib (self, library, library_dirs=None, ! headers=None, include_dirs=None, other_libraries=[]): """Determine if 'library' is available to be linked against, without actually checking that any particular symbols are provided by it. 'headers' will be used in constructing the source file to be compiled, but the only effect of this is to check if all the ! header files listed are available. Any libraries listed in ! 'other_libraries' will be included in the link, in case 'library' ! has symbols that depend on other libraries. """ self._check_compiler() return self.try_link("int main (void) { }", ! headers, include_dirs, ! [library]+other_libraries, library_dirs) def check_header (self, header, include_dirs=None, From python-dev@python.org Sat Oct 14 05:06:43 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 21:06:43 -0700 Subject: [Python-checkins] CVS: distutils/distutils dist.py,1.40,1.41 Message-ID: <200010140406.VAA07633@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv7529 Modified Files: dist.py Log Message: Untabified. Index: dist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/dist.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** dist.py 2000/09/27 00:15:37 1.40 --- dist.py 2000/10/14 04:06:40 1.41 *************** *** 285,289 **** else: user_filename = "pydistutils.cfg" ! # And look for the user config file if os.environ.has_key('HOME'): --- 285,289 ---- else: user_filename = "pydistutils.cfg" ! # And look for the user config file if os.environ.has_key('HOME'): *************** *** 462,467 **** negative_opt.update(cmd_class.negative_opt) ! # Check for help_options in command class. They have a different ! # format (tuple of four) so we need to preprocess them here. if (hasattr(cmd_class, 'help_options') and type(cmd_class.help_options) is ListType): --- 462,467 ---- negative_opt.update(cmd_class.negative_opt) ! # Check for help_options in command class. They have a different ! # format (tuple of four) so we need to preprocess them here. if (hasattr(cmd_class, 'help_options') and type(cmd_class.help_options) is ListType): *************** *** 488,492 **** if hasattr(opts, parser.get_attr_name(help_option)): help_option_found=1 ! #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) --- 488,492 ---- if hasattr(opts, parser.get_attr_name(help_option)): help_option_found=1 ! #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) *************** *** 564,568 **** # _show_help () ! def handle_display_options (self, option_order): --- 564,568 ---- # _show_help () ! def handle_display_options (self, option_order): From python-dev@python.org Sat Oct 14 05:06:43 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 21:06:43 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist.py,1.19,1.20 build.py,1.30,1.31 build_clib.py,1.21,1.22 clean.py,1.11,1.12 install.py,1.53,1.54 install_data.py,1.15,1.16 sdist.py,1.50,1.51 Message-ID: <200010140406.VAA07643@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv7529/command Modified Files: bdist.py build.py build_clib.py clean.py install.py install_data.py sdist.py Log Message: Untabified. Index: bdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** bdist.py 2000/09/30 18:27:54 1.19 --- bdist.py 2000/10/14 04:06:40 1.20 *************** *** 46,50 **** ('help-formats', None, "lists available distribution formats", show_formats), ! ] # The following commands do not take a format option from bdist --- 46,50 ---- ('help-formats', None, "lists available distribution formats", show_formats), ! ] # The following commands do not take a format option from bdist Index: build.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** build.py 2000/09/30 18:27:54 1.30 --- build.py 2000/10/14 04:06:40 1.31 *************** *** 48,52 **** ('help-compiler', None, "list available compilers", show_compilers), ! ] def initialize_options (self): --- 48,52 ---- ('help-compiler', None, "list available compilers", show_compilers), ! ] def initialize_options (self): Index: build_clib.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build_clib.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** build_clib.py 2000/09/30 18:27:54 1.21 --- build_clib.py 2000/10/14 04:06:40 1.22 *************** *** 54,58 **** ('help-compiler', None, "list available compilers", show_compilers), ! ] def initialize_options (self): --- 54,58 ---- ('help-compiler', None, "list available compilers", show_compilers), ! ] def initialize_options (self): Index: clean.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/clean.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** clean.py 2000/09/30 18:27:54 1.11 --- clean.py 2000/10/14 04:06:40 1.12 *************** *** 61,65 **** for directory in (self.build_lib, self.bdist_base, ! self.build_scripts): if os.path.exists(directory): remove_tree(directory, self.verbose, self.dry_run) --- 61,65 ---- for directory in (self.build_lib, self.bdist_base, ! self.build_scripts): if os.path.exists(directory): remove_tree(directory, self.verbose, self.dry_run) Index: install.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -r1.53 -r1.54 *** install.py 2000/10/14 03:47:07 1.53 --- install.py 2000/10/14 04:06:40 1.54 *************** *** 499,503 **** sys_path = map(os.path.normpath, sys.path) ! sys_path = map(os.path.normcase, sys_path) install_lib = os.path.normcase(os.path.normpath(self.install_lib)) if (self.warn_dir and --- 499,503 ---- sys_path = map(os.path.normpath, sys.path) ! sys_path = map(os.path.normcase, sys_path) install_lib = os.path.normcase(os.path.normpath(self.install_lib)) if (self.warn_dir and Index: install_data.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_data.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** install_data.py 2000/09/30 17:34:50 1.15 --- install_data.py 2000/10/14 04:06:40 1.16 *************** *** 39,46 **** def finalize_options (self): self.set_undefined_options('install', ! ('install_data', 'install_dir'), ! ('root', 'root'), ('force', 'force'), ! ) def run (self): --- 39,46 ---- def finalize_options (self): self.set_undefined_options('install', ! ('install_data', 'install_dir'), ! ('root', 'root'), ('force', 'force'), ! ) def run (self): Index: sdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** sdist.py 2000/09/30 18:27:54 1.50 --- sdist.py 2000/10/14 04:06:40 1.51 *************** *** 75,79 **** ('help-formats', None, "list available distribution formats", show_formats), ! ] negative_opt = {'no-defaults': 'use-defaults', --- 75,79 ---- ('help-formats', None, "list available distribution formats", show_formats), ! ] negative_opt = {'no-defaults': 'use-defaults', From python-dev@python.org Sat Oct 14 05:07:41 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 21:07:41 -0700 Subject: [Python-checkins] CVS: distutils/distutils util.py,1.55,1.56 Message-ID: <200010140407.VAA08029@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv7982 Modified Files: util.py Log Message: Removed debugging code at bottom. Index: util.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/util.py,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -r1.55 -r1.56 *** util.py 2000/10/03 03:31:05 1.55 --- util.py 2000/10/14 04:07:39 1.56 *************** *** 428,437 **** # byte_compile () - - - if __name__ == "__main__": - import glob - f = glob.glob("command/*.py") - byte_compile(f, optimize=0, prefix="command/", base_dir="/usr/lib/python") - #byte_compile(f, optimize=1) - #byte_compile(f, optimize=2) --- 428,429 ---- From python-dev@python.org Sat Oct 14 05:07:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:07:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs copyright.tex,1.8,1.9 Message-ID: <200010140407.VAA08088@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory slayer.i.sourceforge.net:/tmp/cvs-serv8067/texinputs Modified Files: copyright.tex Log Message: Center the top line of the license page, to make it look just a little bit cleaner. Index: copyright.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/copyright.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** copyright.tex 2000/09/05 04:32:26 1.8 --- copyright.tex 2000/10/14 04:07:49 1.9 *************** *** 1,3 **** ! \strong{BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0} \centerline{\strong{BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1}} --- 1,3 ---- ! \centerline{\strong{BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0}} \centerline{\strong{BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1}} From python-dev@python.org Sat Oct 14 05:14:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:14:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules Setup.in,1.111,1.112 Message-ID: <200010140414.VAA10282@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv10257/Modules Modified Files: Setup.in Log Message: Update the comments for the BSD DB module, including a new pointer to the DB 3 module; thanks to Robin Dunn . This closes SourceForge bug #116850. Index: Setup.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/Setup.in,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -r1.111 -r1.112 *** Setup.in 2000/10/02 21:20:22 1.111 --- Setup.in 2000/10/14 04:14:09 1.112 *************** *** 361,369 **** # and the subdirectory of PORT where you built it. # ! # (See http://www.jenkon-dev.com/~rd/python/ for an interface to ! # BSD DB 2.1.0.) # Note: If a db.h file is found by configure, bsddb will be enabled ! # automatically via Setup.config.in #DB=/depot/sundry/src/berkeley-db/db.1.85 --- 361,371 ---- # and the subdirectory of PORT where you built it. # ! # (See http://electricrain.com/greg/python/bsddb3/ for an interface to ! # BSD DB 3.x.) # Note: If a db.h file is found by configure, bsddb will be enabled ! # automatically via Setup.config.in. It only needs to be enabled here ! # if it is not automatically enabled there; check the generated ! # Setup.config before enabling it here. #DB=/depot/sundry/src/berkeley-db/db.1.85 From python-dev@python.org Sat Oct 14 05:45:24 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:45:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libmacfs.tex,1.24,1.25 libmacic.tex,1.14,1.15 Message-ID: <200010140445.VAA18557@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv18544 Modified Files: libmacfs.tex libmacic.tex Log Message: A bunch of nits fix and some additional information added by Chris Barker . Index: libmacfs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacfs.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** libmacfs.tex 2000/09/22 15:46:35 1.24 --- libmacfs.tex 2000/10/14 04:45:22 1.25 *************** *** 16,24 **** Whenever a function or method expects a \var{file} argument, this argument can be one of three things:\ (1) a full or partial Macintosh ! pathname, (2) an \pytype{FSSpec} object or (3) a 3-tuple \code{(\var{wdRefNum}, ! \var{parID}, \var{name})} as described in \citetitle{Inside ! Macintosh:\ Files}. A description of aliases and the Standard File ! package can also be found there. \begin{funcdesc}{FSSpec}{file} Create an \pytype{FSSpec} object for the specified file. --- 16,27 ---- Whenever a function or method expects a \var{file} argument, this argument can be one of three things:\ (1) a full or partial Macintosh ! pathname, (2) an \pytype{FSSpec} object or (3) a 3-tuple ! \code{(\var{wdRefNum}, \var{parID}, \var{name})} as described in ! \citetitle{Inside Macintosh:\ Files}. A description of aliases and the ! Standard File package can also be found there. + \strong{Note:} A module, \refmodule{macfsn}, is auto-imported to replace + StandardFile calls in macfs with NavServices calls. + \begin{funcdesc}{FSSpec}{file} Create an \pytype{FSSpec} object for the specified file. *************** *** 60,64 **** \begin{funcdesc}{PromptGetFile}{prompt\optional{, type, \moreargs}} Similar to \function{StandardGetFile()} but allows you to specify a ! prompt. \end{funcdesc} --- 63,67 ---- \begin{funcdesc}{PromptGetFile}{prompt\optional{, type, \moreargs}} Similar to \function{StandardGetFile()} but allows you to specify a ! prompt which will be displayed at the top of the dialog. \end{funcdesc} *************** *** 72,78 **** \begin{funcdesc}{GetDirectory}{\optional{prompt}} ! Present the user with a non-standard ``select a directory'' ! dialog. \var{prompt} is the prompt string, and the optional. ! Return an \pytype{FSSpec} object and a success-indicator. \end{funcdesc} --- 75,83 ---- \begin{funcdesc}{GetDirectory}{\optional{prompt}} ! Present the user with a non-standard ``select a directory'' dialog. You ! have to first open the directory before clicking on the ``select current ! directory'' button. \var{prompt} is the prompt string which will be ! displayed at the top of the dialog. Return an \pytype{FSSpec} object and ! a success-indicator. \end{funcdesc} *************** *** 85,89 **** Note that starting with system 7.5 the user can change Standard File ! behaviour with the ``general controls'' controlpanel, thereby making this call inoperative. \end{funcdesc} --- 90,94 ---- Note that starting with system 7.5 the user can change Standard File ! behaviour with the ``general controls'' control panel, thereby making this call inoperative. \end{funcdesc} *************** *** 107,111 **** \begin{funcdesc}{FindApplication}{creator} ! Locate the application with 4-char creator code \var{creator}. The function returns an \pytype{FSSpec} object pointing to the application. \end{funcdesc} --- 112,116 ---- \begin{funcdesc}{FindApplication}{creator} ! Locate the application with 4-character creator code \var{creator}. The function returns an \pytype{FSSpec} object pointing to the application. \end{funcdesc} Index: libmacic.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacic.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libmacic.tex 1999/03/04 19:00:26 1.14 --- libmacic.tex 2000/10/14 04:45:22 1.15 *************** *** 13,17 **** of mappings from Macintosh creator/type codes to foreign filename extensions plus information on how to transfer files (binary, ascii, ! etc). There is a low-level companion module --- 13,17 ---- of mappings from Macintosh creator/type codes to foreign filename extensions plus information on how to transfer files (binary, ascii, ! etc.). Since MacOS 9, this module is a control panel named Internet. There is a low-level companion module *************** *** 62,66 **** representation to a ``logical'' Python data structure. Running the \module{ic} module standalone will run a test program that lists all ! keys and values in your IC database, this will have to server as documentation. --- 62,66 ---- representation to a ``logical'' Python data structure. Running the \module{ic} module standalone will run a test program that lists all ! keys and values in your IC database, this will have to serve as documentation. *************** *** 85,89 **** position and the URL. The optional \var{start} and \var{end} can be used to limit the search, so for instance if a user clicks in a long ! textfield you can pass the whole textfield and the click-position in \var{start} and this routine will return the whole URL in which the user clicked. As above, \var{hint} is an optional scheme used to --- 85,89 ---- position and the URL. The optional \var{start} and \var{end} can be used to limit the search, so for instance if a user clicks in a long ! text field you can pass the whole text field and the click-position in \var{start} and this routine will return the whole URL in which the user clicked. As above, \var{hint} is an optional scheme used to From python-dev@python.org Sat Oct 14 05:47:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:47:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.4,1.5 Message-ID: <200010140447.VAA18626@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv18618 Modified Files: ACKS Log Message: More names. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ACKS 2000/10/09 18:08:56 1.4 --- ACKS 2000/10/14 04:47:53 1.5 *************** *** 91,94 **** --- 91,95 ---- Andrew MacIntyre Vladimir Marangozov + Vincent Marchetti Aahz Maruch Doug Mennella *************** *** 118,121 **** --- 119,123 ---- Constantina S. Hugh Sasse + Bob Savage Neil Schemenauer Barry Scott From python-dev@python.org Sat Oct 14 05:49:38 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:49:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libctb.tex,1.14,1.15 Message-ID: <200010140449.VAA18770@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv18763 Modified Files: libctb.tex Log Message: Wrap a long line. Index: libctb.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libctb.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libctb.tex 1999/03/02 16:36:31 1.14 --- libctb.tex 2000/10/14 04:49:36 1.15 *************** *** 4,9 **** \declaremodule{builtin}{ctb} \platform{Mac} ! \modulesynopsis{Interfaces to the Communications Tool Box. Only the Connection ! Manager is supported.} --- 4,9 ---- \declaremodule{builtin}{ctb} \platform{Mac} ! \modulesynopsis{Interfaces to the Communications Tool Box. Only the ! Connection Manager is supported.} From python-dev@python.org Sat Oct 14 05:53:33 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:53:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libframework.tex,1.8,1.9 Message-ID: <200010140453.VAA18985@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv18892 Modified Files: libframework.tex Log Message: Chris Barker : Added summary of the strengths and weaknesses of the FrameWork module and fixed some typos. Index: libframework.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libframework.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libframework.tex 1999/03/02 16:36:31 1.8 --- libframework.tex 2000/10/14 04:53:31 1.9 *************** *** 19,24 **** documentation describes only the most important functionality, and not in the most logical manner at that. Examine the source or the examples ! for more details. The \module{FrameWork} module defines the following functions: --- 19,37 ---- documentation describes only the most important functionality, and not in the most logical manner at that. Examine the source or the examples ! for more details. The following are some comments posted on the ! MacPython newsgroup about the strengths and limitations of ! \module{FrameWork}: ! ! \begin{quotation} ! The strong point of \module{FrameWork} is that it allows you to break ! into the control-flow at many different places. \refmodule{W}, for ! instance, uses a different way to enable/disable menus and that plugs ! right in leaving the rest intact. The weak points of ! \module{FrameWork} are that it has no abstract command interface (but ! that shouldn't be difficult), that it's dialog support is minimal and ! that it's control/toolbar support is non-existent. ! \end{quotation} + The \module{FrameWork} module defines the following functions: *************** *** 43,53 **** \begin{funcdesc}{MenuItem}{menu, title\optional{, shortcut, callback}} ! Create a menu item object. The arguments are the menu to crate the ! item it, the item title string and optionally the keyboard shortcut and a callback routine. The callback is called with the arguments menu-id, item number within menu (1-based), current front window and the event record. ! In stead of a callable object the callback can also be a string. In this case menu selection causes the lookup of a method in the topmost window and the application. The method name is the callback string --- 56,66 ---- \begin{funcdesc}{MenuItem}{menu, title\optional{, shortcut, callback}} ! Create a menu item object. The arguments are the menu to create, the ! item item title string and optionally the keyboard shortcut and a callback routine. The callback is called with the arguments menu-id, item number within menu (1-based), current front window and the event record. ! Instead of a callable object the callback can also be a string. In this case menu selection causes the lookup of a method in the topmost window and the application. The method name is the callback string *************** *** 80,85 **** tuple suitable for creation of a window of given width and height. The window will be staggered with respect to previous windows, and an ! attempt is made to keep the whole window on-screen. The window will ! however always be exact the size given, so parts may be offscreen. \end{funcdesc} --- 93,98 ---- tuple suitable for creation of a window of given width and height. The window will be staggered with respect to previous windows, and an ! attempt is made to keep the whole window on-screen. However, the window will ! however always be the exact size given, so parts may be offscreen. \end{funcdesc} *************** *** 267,271 **** \begin{methoddesc}[ScrolledWindow]{do_activate}{onoff, event} Takes care of dimming/highlighting scrollbars when a window becomes ! frontmost vv. If you override this method call this one at the end of your method. \end{methoddesc} --- 280,284 ---- \begin{methoddesc}[ScrolledWindow]{do_activate}{onoff, event} Takes care of dimming/highlighting scrollbars when a window becomes ! frontmost. If you override this method, call this one at the end of your method. \end{methoddesc} From python-dev@python.org Sat Oct 14 05:55:17 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:55:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libminiae.tex,1.6,1.7 Message-ID: <200010140455.VAA19063@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv19054 Modified Files: libminiae.tex Log Message: Chris Barker : Small clarification, remove the assertion that the module is temporary. Index: libminiae.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libminiae.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libminiae.tex 1999/03/02 16:36:37 1.6 --- libminiae.tex 2000/10/14 04:55:15 1.7 *************** *** 13,21 **** (OSA) server, i.e. receive and process AppleEvents\index{AppleEvents}. It can be used in conjunction with ! \refmodule{FrameWork}\refstmodindex{FrameWork} or standalone. - This module is temporary, it will eventually be replaced by a module - that handles argument names better and possibly automates making your - application scriptable. The \module{MiniAEFrame} module defines the following classes: --- 13,19 ---- (OSA) server, i.e. receive and process AppleEvents\index{AppleEvents}. It can be used in conjunction with ! \refmodule{FrameWork}\refstmodindex{FrameWork} or standalone. As an ! example, it is used in \program{PythonCGISlave}. The \module{MiniAEFrame} module defines the following classes: From python-dev@python.org Sat Oct 14 05:56:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:56:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libmacui.tex,1.15,1.16 Message-ID: <200010140456.VAA19122@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv19113 Modified Files: libmacui.tex Log Message: Chris Barker : Various updates and additions. Index: libmacui.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacui.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libmacui.tex 2000/08/30 14:33:02 1.15 --- libmacui.tex 2000/10/14 04:56:52 1.16 *************** *** 23,27 **** \begin{funcdesc}{AskString}{prompt\optional{, default}} Ask the user to input a string value, in a modal dialog. \var{prompt} ! is the promt message, the optional \var{default} arg is the initial value for the string. All strings can be at most 255 bytes long. \function{AskString()} returns the string entered or \code{None} --- 23,27 ---- \begin{funcdesc}{AskString}{prompt\optional{, default}} Ask the user to input a string value, in a modal dialog. \var{prompt} ! is the prompt message, the optional \var{default} arg is the initial value for the string. All strings can be at most 255 bytes long. \function{AskString()} returns the string entered or \code{None} *************** *** 29,32 **** --- 29,41 ---- \end{funcdesc} + \begin{funcdesc}{AskPassword}{prompt\optional{, default}} + Ask the user to input a string value, in a modal dialog. Like + \method{AskString}, but with the text shown as bullets. \var{prompt} + is the prompt message, the optional \var{default} arg is the initial + value for the string. All strings can be at most 255 bytes + long. \function{AskString()} returns the string entered or \code{None} + in case the user cancelled. + \end{funcdesc} + \begin{funcdesc}{AskYesNoCancel}{question\optional{, default}} Present a dialog with text \var{question} and three buttons labelled *************** *** 37,57 **** \end{funcdesc} ! \begin{funcdesc}{ProgressBar}{\optional{label\optional{, maxval}}} ! Display a modeless progress dialog with a thermometer bar. \var{label} is the text string displayed (default ``Working...''), \var{maxval} is ! the value at which progress is complete (default \code{100}). The ! returned object has one method, \code{set(\var{value})}, which sets ! the value of the progress bar. The bar remains visible until the ! object returned is discarded. ! The progress bar has a ``cancel'' button, but it is currently ! non-functional. \end{funcdesc} - - Note that \module{EasyDialogs} does not currently use the notification - manager. This means that displaying dialogs while the program is in - the background will lead to unexpected results and possibly - crashes. Also, all dialogs are modeless and hence expect to be at the - top of the stacking order. This is true when the dialogs are created, - but windows that pop-up later (like a console window) may also result - in crashes. --- 46,60 ---- \end{funcdesc} ! \begin{funcdesc}{ProgressBar}{\optional{title \optional{, maxval\optional{,label}}}} ! Display a modeless progress dialog with a thermometer bar. \var{title} is the text string displayed (default ``Working...''), \var{maxval} is ! the value at which progress is complete (default ! \code{100}). \var{label} is the text that is displayed over the progress ! bar itself. The returned object has two methods, ! \code{set(\var{value})}, which sets the value of the progress bar, and ! \code{label(\var{text})}, which sets the text of the label. The bar ! remains visible until the object returned is discarded. ! The progress bar has a ``cancel'' button. [NOTE: how does the cancel ! button behave?] \end{funcdesc} From python-dev@python.org Sat Oct 14 05:59:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:59:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libmacostools.tex,1.12,1.13 Message-ID: <200010140459.VAA19284@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv19277 Modified Files: libmacostools.tex Log Message: Chris Barker : Small fixes. Index: libmacostools.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacostools.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libmacostools.tex 1999/03/02 16:36:35 1.12 --- libmacostools.tex 2000/10/14 04:59:12 1.13 *************** *** 40,44 **** Tell the finder that some bits of finder-information such as creator or type for file \var{dst} has changed. The file can be specified by ! pathname or fsspec. This call should prod the finder into redrawing the files icon. \end{funcdesc} --- 40,44 ---- Tell the finder that some bits of finder-information such as creator or type for file \var{dst} has changed. The file can be specified by ! pathname or fsspec. This call should tell the finder to redraw the files icon. \end{funcdesc} *************** *** 80,84 **** Tell the finder to print a file (again specified by full pathname or \pytype{FSSpec}). The behaviour is identical to selecting the file and using ! the print command in the finder. \end{funcdesc} --- 80,84 ---- Tell the finder to print a file (again specified by full pathname or \pytype{FSSpec}). The behaviour is identical to selecting the file and using ! the print command in the finder's file menu. \end{funcdesc} From python-dev@python.org Sat Oct 14 06:06:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:06:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libaepack.tex,NONE,1.1 libaetypes.tex,NONE,1.1 Message-ID: <200010140506.WAA21694@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv21666 Added Files: libaepack.tex libaetypes.tex Log Message: Documentation for the aepack and aetypes modules, by Vincent Marchetti . --- NEW FILE --- \section{\module{aepack} --- Conversion between Python variables and AppleEvent data containers} \declaremodule{standard}{aepack} \platform{Mac} %\moduleauthor{Jack Jansen?}{email} \modulesynopsis{Conversion between Python variables and AppleEvent data containers.} \sectionauthor{Vincent Marchetti}{vincem@en.com} The \module{aepack} module defines functions for converting (packing) Python variables to AppleEvent descriptors and back (unpacking). Within Python the AppleEvent descriptor is handled by Python objects of built-in type \pytype{AEDesc}, defined in module \refmodule{AE}. The \module{aepack} module defines the following functions: \begin{funcdesc}{pack}{x\optional{, forcetype}} Returns an \class{AEDesc} object containing a conversion of Python value x. If \var{forcetype} is provided it specifies the descriptor type of the result. Otherwise, a default mapping of Python types to Apple Event descriptor types is used, as follows: \begin{tableii}{l|l}{textrm}{Python type}{descriptor type} \lineii{\class{FSSpec}}{typeFSS} \lineii{\class{Alias}}{typeAlias} \lineii{integer}{typeLong (32 bit integer)} \lineii{float}{typeFloat (64 bit floating point)} \lineii{string}{typeText} \lineii{list}{typeAEList} \lineii{dictionary}{typeAERecord} \lineii{instance}{\emph{see below}} \end{tableii} \pytype{FSSpec} and \pytype{Alias} are built-in object types defined in the module \refmodule{macfs}. If \var{x} is a Python instance then this function attempts to call an \method{__aepack__()} method. This method should return an \pytype{AE.AEDesc} object. If the conversion \var{x} is not defined above, this function returns the Python string representation of a value (the repr() function) encoded as a text descriptor. \end{funcdesc} \begin{funcdesc}{unpack}{x} \var{x} must be an object of type \class{AEDesc}. This function returns a Python object representation of the data in the Apple Event descriptor \var{x}. Simple AppleEvent data types (integer, text, float) are returned as their obvious Python counterparts. Apple Event lists are returned as Python lists, and the list elements are recursively unpacked. Object references (ex. \code{line 3 of document 1}) are returned as instances of \class{aetypes.ObjectSpecifier}. AppleEvent descriptors with descriptor type typeFSS are returned as \class{FSSpec} objects. AppleEvent record descriptors are returned as Python dictionaries, with keys of type \class{?} and elements recursively unpacked. \end{funcdesc} \begin{seealso} \seemodule{AE}{Built-in access to Apple Event Manager routines.} \seemodule{aetypes}{Python definitions of codes for Apple Event descriptor types.} \seetitle[http://developer.apple.com/techpubs/mac/IAC/IAC-2.html]{ Inside Macintosh: Interapplication Communication}{Information about inter-process communications on the Macintosh.} \end{seealso} --- NEW FILE --- \section{\module{aetypes} --- AppleEvent objects} \declaremodule{standard}{aetypes} \platform{Mac} %\moduleauthor{Jack Jansen?}{email} \modulesynopsis{Python representation of the Apple Event Object Model.} \sectionauthor{Vincent Marchetti}{vincem@en.com} The \module{aetypes} defines classes used to represent Apple Event object specifiers. An object specifier is essentially an address of an object implemented in a Apple Event server. An Apple Event specifier is used as the direct object for an Apple Event or as the argument of an optional parameter. In AppleScript an object specifier is represented by a phrase such as: \code{character 23 of document "Semprini"}. The classes defined in this module allow this specifier to be represented by a Python object which is initialized as follows: \code{res = Document(1).Character(23)} The \module{AEObjects} module defines the following class: \begin{classdesc}{ObjectSpecifier}{want, form, seld, from} This is the base class for representing object specifiers and is generally not constructed directly by the user. Its important functionality is to define an \function{__aepack__()} function, which returns the Apple Event descriptor containing the object specifier. Its data members, set directly from the constructor arguments, are: \end{classdesc} \begin{memberdesc}{want} A four character string representing the class code of the object. These class codes are specified in Apple Event Suites; for example the standard code for a character object is the 4 bytes \samp{char}. \end{memberdesc} From python-dev@python.org Sat Oct 14 06:08:36 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:08:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac toolbox.tex,NONE,1.1 undoc.tex,NONE,1.1 Message-ID: <200010140508.WAA22845@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv22780 Added Files: toolbox.tex undoc.tex Log Message: Chapters on Mac Toolbox modules and other undocumented modules, ready to be filled in with real information. Contributed by Chris Barker . --- NEW FILE --- \chapter{MacOS Toolbox Modules \label{toolbox}} There are a set of modules that provide interfaces to various MacOS toolboxes. If applicable the module will define a number of Python objects for the various structures declared by the toolbox, and operations will be implemented as methods of the object. Other operations will be implemented as functions in the module. Not all operations possible in C will also be possible in Python (callbacks are often a problem), and parameters will occasionally be different in Python (input and output buffers, especially). All methods and functions have a \member{__doc__} string describing their arguments and return values, and for additional description you are referred to \citetitle[http://developer.apple.com/techpubs/macos8/mac8.html]{Inside Macintosh} or similar works. \strong{Warning!} These modules are not yet documented. If you wish to contribute documentation of any of these modules, please get in touch with \email{python-docs@python.org}. \localmoduletable %\section{Argument Handling for Toolbox Modules} \section{\module{AE} --- Apple Events} \declaremodule{standard}{AE} \platform{Mac} \modulesynopsis{Interface to the Apple Events toolbox} \section{\module{Cm} --- Component Manager} \declaremodule{standard}{Cm} \platform{Cm} \modulesynopsis{Interface to the Component Manager} \section{\module{Ctl} --- Control Manager} \declaremodule{standard}{Ctl} \platform{Mac} \modulesynopsis{Interface to the Control Manager} \section{\module{Dlg} --- Dialog Manager} \declaremodule{standard}{Dlg} \platform{Mac} \modulesynopsis{Interface to the Dialog Manager} \section{\module{Evt} --- Event Manager} \declaremodule{standard}{Evt} \platform{Mac} \modulesynopsis{Interface to the Event Manager} \section{\module{Fm} --- Font Manager} \declaremodule{standard}{Fm} \platform{Mac} \modulesynopsis{Interface to the Font Manager} \section{\module{List} --- List Manager} \declaremodule{standard}{List} \platform{Mac} \modulesynopsis{Interface to the List Manager} \section{\module{Menu} --- Menu Manager} \declaremodule{standard}{Menu} \platform{Mac} \modulesynopsis{Interface to the Menu Manager} \section{\module{Qd} --- QuickDraw} \declaremodule{builtin}{Qd} \platform{Mac} \modulesynopsis{Interface to the QuickDraw toolbox} \section{\module{Qt} --- QuickTime} \declaremodule{standard}{Qt} \platform{Mac} \modulesynopsis{Interface to the QuickTime toolbox} \section{\module{Res} --- Resource Manager and Handles} \declaremodule{standard}{Res} \platform{Mac} \modulesynopsis{Interface to the Resource Manager and Handles} \section{\module{Scrap} --- Scrap Manager} \declaremodule{standard}{Scrap} \platform{Mac} \modulesynopsis{Interface to the Scrap Manager} \section{\module{Snd} --- Sound Manager} \declaremodule{standard}{Snd} \platform{Mac} \modulesynopsis{Interface to the Sound Manager } \section{\module{TE} --- TextEdit} \declaremodule{standard}{TE} \platform{Mac} \modulesynopsis{Interface to TextEdit} \section{\module{waste} --- non-Apple \program{TextEdit} replacement} \declaremodule{standard}{waste} \platform{Mac} \modulesynopsis{Interface to the ``WorldScript-Aware Styled Text Engine.''} \begin{seealso} \seetitle[http://www.merzwaren.com/waste/]{About WASTE}{Information about the WASTE widget and library, including documentation and downloads.} \end{seealso} \section{\module{Win} --- Window Manager} \declaremodule{standard}{Win} \platform{Mac} \modulesynopsis{Interface to the Window Manager} --- NEW FILE --- \chapter{Undocumented Modules \label{undocumented-modules}} The modules in this chapter are poorly documented (if at all). If you wish to contribute documentation of any of these modules, please get in touch with \email{python-docs@python.org}. \localmoduletable \section{\module{buildtools} --- Helper module for BuildApplet and Friends} \declaremodule{standard}{buildtools} \platform{Mac} \modulesynopsis{Helper module for BuildApple, BuildApplication and macfreeze} \section{\module{py_resource} --- } \declaremodule[pyresource]{standard}{py_resource} \platform{Mac} \modulesynopsis{} \section{\module{cfmfile} --- Code Fragment Resource module} \declaremodule{standard}{cfmfile} \platform{Mac} \modulesynopsis{Code Fragment Resource module} \module{cfmfile} is a module that understands Code Fragments and the accompanying ``cfrg'' resources. It can parse them and merge them, and is used by BuildApplication to combine all plugin modules to a single executable. \section{\module{macerrors} --- MacOS Errors} \declaremodule{standard}{macerrors} \platform{Mac} \modulesynopsis{Constant definitions for many MacOS error codes} \module{macerrors} cotains constant definitions for many MacOS error codes. \section{\module{macfsn} --- NavServices calls} \declaremodule{standard}{macfsn} \platform{Mac} \modulesynopsis{NavServices versions of StandardFile calls} \module{macfsn} contains wrapper functions that have the same API as the macfs StandardFile calls, but are implemented with Navigation Services. Importing it will replace the methods in macfs with these, if Navigation Services is available on your machine. \section{\module{icopen} --- Internet Config replacement for \method{open()}} \declaremodule{standard}{icopen} \platform{Mac} \modulesynopsis{Internet Config replacement for \method{open()}} Importing \module{icopen} will replace the builtin \method{open()} with a version that uses Internet Config to set file type and creator for new files. \section{\module{mactty} --- } \declaremodule{standard}{mactty} \platform{Mac} \modulesynopsis{} \section{\module{nsremote} --- Wrapper around Netscape OSA modules} \declaremodule{standard}{nsremote} \platform{Mac} \modulesynopsis{Wrapper around Netscape OSA modules} \module{nsremote} is a wrapper around the Netscape OSA modules that allows you to easily send your browser to a given URL. \section{\module{PixMapWrapper} --- Wrapper for PixMap objects} \declaremodule{standard}{PixMapWrapper} \platform{Mac} \modulesynopsis{Wrapper for PixMap objects} \module{PixMapWrapper} wraps a PixMap object with a Python object that allows access to the fields by name. It also has methods to convert to and from \module{PIL} images. \section{\module{preferences} --- } \declaremodule{standard}{preferences} \platform{Mac} \modulesynopsis{} \section{\module{pythonprefs} --- } \declaremodule{standard}{pythonprefs} \platform{Mac} \modulesynopsis{} \section{\module{quietconsole} --- non-visible stdout output} \declaremodule{standard}{quietconsole} \platform{Mac} \modulesynopsis{buffered, non-visible stdout output} \module{quietconsole} allows you to keep stdio output in a buffer without displaying it (or without displaying the stdout window altogether, if set with \program{EditPythonPrefs}) until you try to read from stdin or disable the buffering, at which point all the saved output is sent to the window. Good for GUI programs that do want to display their output at a crash. \section{\module{W} --- Widgets built on \module{FrameWork}} \declaremodule{standard}{W} \platform{Mac} \modulesynopsis{Widgets for the Mac, built on top of \module{FrameWork}} The \module{W} widgets are used extensively in the \program{IDE}. From python-dev@python.org Sat Oct 14 06:09:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:09:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac using.tex,NONE,1.1 Message-ID: <200010140509.WAA23555@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv23534 Added Files: using.tex Log Message: Chapter on how to use MacPython, by Bob Savage . --- NEW FILE --- \chapter{Using Python on the Macintosh \label{using}} \sectionauthor{Bob Savage}{bobsavage@mac.com} Using Python on the Macintosh can seem like something completely different than using it on a \UNIX-like or Windows system. Most of the Python documentation, both the ``official'' documentation and published books, describe only how Python is used on these systems, causing confusion for the new user of MacPython. This chapter gives a brief introduction to the specifics of using Python on a Macintosh. \section{Getting and Installing MacPython \label{getting}} The most recent release version as well as possible newer experimental versions are best found at the MacPython page maintained by Jack Jansen: \url{http://www.cwi.nl/~jack/macpython.html}. Please refer to the \file{README} included with your distribution for the most up-to-date instructions. \section{Entering the interactive Interpreter \label{interpreter}} The interactive interpreter that you will see used in Python documentation is started by double-clicking the \program{PythonInterpreter} icon, which looks like a 16-ton weight falling. You should see the version information and the \samp{>>>~} prompt. Use it exactly as described in the standard documentation. \section{How to run a Python script} There are several ways to run an existing Python script; two common ways to run a Python script are ``drag and drop'' and ``double clicking''. Other ways include running it from within the IDE (see Section \ref{IDE}), or launching via AppleScript. \subsection{Drag and drop} One of the easiest ways to launch a Python script is via ``Drag and Drop''. This is just like launching a text file in the Finder by ``dragging'' it over your word processor's icon and ``dropping'' it there. Make sure that you use an icon referring to the \program{PythonInterpreter}, not the \program{IDE} or \program{Idle} icons which have different behaviour which is described below. Some things that might have gone wrong: \begin{itemize} \item A window flashes after dropping the script onto the \program{PythonInterpreter}, but then disappears. Most likely this is a configuration issue; your \program{PythonInterpreter} is setup to exit immediately upon completion, but your script assumes that if it prints something that text will stick around for a while. To fix this, see section \ref{Defaults}. \item After dropping the script onto the \program{PythonInterpreter}, a window appeared which said: ``File contains \code{\e r} characters (incorrect line endings?)''. That script probably originated on a \UNIX{} or Windows machine. You will need to change the line endings to the standard Mac usage. One way to do this is to open the file in \program{BBedit} (\url{http://www.barebones.com/products/bbedit_lite.html}) which can easily change the line endings between Mac, DOS, and \UNIX\ styles. \item When you waved the script icon over the \program{PythonInterpreter}, the \program{PythonInterpreter} icon did not hilight. Most likely the Creator code and document type is unset (or set incorrectly) -- this often happens when a file originates on a non-Mac computer. See section \ref{CreatorCode} for more details. \end{itemize} \subsection{Set Creator and Double Click \label{creator-code}} If the script that you want to launch has the appropriate Creator Code and File Type you can simply double-click on the script to launch it. To be ``double-clickable'' a file needs to be of type \samp{TEXT}, with a creator code of \samp{Pyth}. Setting the creator code and filetype can be done with the IDE (see sections \ref{IDEwrite} and \ref{IDEapplet}), with an editor with a Python mode (\program{BBEdit}) -- see section \ref{scripting-with-BBedit}, or with assorted other Mac utilities, but a script (\file{fixfiletypes.py}) has been included in the MacPython distribution, making it possible to set the proper Type and Creator Codes with Python. The \file{fixfiletypes.py} script will change the file type and creator codes for the indicated directory. To use \file{fixfiletypes.py}: \begin{enumerate} \item Locate it in the \file{scripts} folder of the \file{Mac} folder of the MacPython distribution. \item Put all of the scripts that you want to fix in a folder with nothing else in it. \item Double-click on the \file{fixfiletypes.py} icon. \item Navigate into the folder of files you want to fix, and press the ``Select current folder'' button. \end{enumerate} \section{Simulating command line arguments \label{argv}} There are two ways to simulate command-line arguments with MacPython. \begin{enumerate} \item via Interpreter options \begin{itemize} % nestable? I hope so! \item Hold the option-key down when launching your script. This will bring up a dialog box of Python Interpreter options. \item Click ``Set \UNIX-style command line..'' button. \item Type the arguments into the ``Argument'' field. \item Click ``OK'' \item Click ``Run''. \end{itemize} % end \item via drag and drop If you save the script as an applet (see Section \ref{IDEapplet}), you can also simulate some command-line arguments via ``Drag-and-Drop''. In this case, the names of the files that were dropped onto the applet will be appended to \code{sys.argv}, so that it will appear to the script as though they had been typed on a command line. As on \UNIX\ systems, the first item in \code{sys.srgv} is the path to the applet, and the rest are the files dropped on the applet. \end{enumerate} \section{Creating a Python script} Since Python scripts are simply text files, they can be created in any way that text files can be created, but some special tools also exist with extra features. \subsection{In an editor} You can create a text file with any word processing program such as \program{MSWord} or \program{AppleWorks} but you need to make sure that the file is saved as ``\ASCII'' or ``plain text''. \subsubsection{Editors with Python modes} Several text editors have additional features that add functionality when you are creating a Python script. These can include coloring Python keywords to make your code easier to read, module browsing, or a built-in debugger. These include \program{Alpha}, \program{Pepper}, and \program{BBedit}, and the MacPython IDE (Section \ref{IDE}). %\subsubsection{Alpha} % **NEED INFO HERE** \subsubsection{BBedit \label{scripting-with-BBedit}} If you use \program{BBEdit} to create your scripts you will want to tell it about the Python creator code so that you can simply double click on the saved file to launch it. \begin{itemize} \item Launch \program{BBEdit}. \item Select ``Preferences'' from the ``Edit'' menu. \item Select ``File Types'' from the scrolling list. \item click on the ``Add...'' button and navigate to \program{PythonInterpreter} in the main directory of the MacPython distribution; click ``open''. \item Click on the ``Save'' button in the Preferences panel. \end{itemize} % Are there additional BBedit Python-specific features? I'm not aware of any. %\subsubsection{IDE} %You can use the \program{Python IDE} supplied in the MacPython Distribution to create longer Python scripts %-- see Section \ref{IDEwrite} for details. %\subsubsection{IDLE} %Idle is an IDE for Python that was written in Python, using TKInter. You should be able to use it on a Mac by following %the standard documentation, but see Section \ref{TKInter} for guidance on using TKInter with MacPython. %\subsubsection{Pepper} % **NEED INFO HERE** \section{The IDE\label{IDE}} The \program{Python IDE} (Integrated Development Environment) is a separate application that acts as a text editor for your Python code, a class browser, a graphical debugger, and more. \subsection{Using the ``Python Interactive'' window} Use this window like you would the \program{PythonInterpreter}, except that you cannot use the ``Drag and drop'' method above. Instead, dropping a script onto the \program{Python IDE} icon will open the file in a seperate script window (which you can then execute manually -- see section \ref{IDEexecution}). \subsection{Writing a Python Script \label{IDEwrite}} In addition to using the \program{Python IDE} interactively, you can also type out a complete Python program, saving it incrementally, and execute it or smaller selections of it. You can create a new script, open a previously saved script, and save your currently open script by selecting the appropriate item in the ``File'' menu. Dropping a Python script onto the \program{Python IDE} will open it for editting. If you try to open a script with the \program{Python IDE} but either can't locate it from the ``Open'' dialog box, or you get an error message like ``Can't open file of type ...'' see section \ref{CreatorCode}. When the \program{Python IDE} saves a script, it uses the creator code settings which are available by clicking on the small black triangle on the top right of the document window, and selecting ``save options''. The default is to save the file with the \program{Python IDE} as the creator, this means that you can open the file for editing by simply double-clicking on its icon. You might want to change this behaviour so that it will be opened by the \program{PythonInterpreter}, and run. To do this simply choose ``Python Interpreter'' from the ``save options''. Note that these options are associated with the \emph{file} not the application. \subsection{Executing a script from within the IDE \label{IDEexecution}} You can run the script in the frontmost window of the \program{Python IDE} by hitting the run all button. You should be aware, however that if you use the Python convention \samp{if __name__ == "__main__":} the script will \emph{not} be ``__main__'' by default. To get that behaviour you must select the ``Run as __main__'' option from the small black triangle on the top right of the document window. Note that this option is associated with the \emph{file} not the application. It \emph{will} stay active after a save, however; to shut this feature off simply select it again. \subsection{``Save as'' versus ``Save as Applet'' \label{IDEapplet}} When you are done writing your Python script you have the option of saving it as an ``applet'' (by selecting ``Save as applet'' from the ``File'' menu). This has a significant advantage in that you can drop files or folders onto it, to pass them to the applet the way command-line users would type them onto the command-line to pass them as arguments to the script. However, you should make sure to save the applet as a seperate file, do not overwrite the script you are writing, because you will not be able to edit it again. Accessing the items passed to the applet via ``drag-and-drop'' is done using the standard \member{sys.argv} mechanism. See the general documentation for more % need to link to the appropriate place in non-Mac docs Note that saving a script as an applet will not make it runnable on a system without a Python installation. %\subsection{Debugger} % **NEED INFO HERE** %\subsection{Module Browser} % **NEED INFO HERE** %\subsection{Profiler} % **NEED INFO HERE** % end IDE %\subsection{The ``Scripts'' menu} % **NEED INFO HERE** \section{Configuration \label{configuration}} The MacPython distribution comes with \program{EditPythonPrefs}, an applet which will help you to customize the MacPython environment for your working habits. \subsection{EditPythonPrefs\label{EditPythonPrefs}} \program{EditPythonPrefs} gives you the capability to configure Python to behave the way you want it to. There are two ways to use \program{EditPythonPrefs}, you can use it to set the preferences in general, or you can drop a particular Python engine onto it to customize only that version. The latter can be handy if, for example, you want to have a second copy of the \program{PythonInterpreter} that keeps the output window open on a normal exit even though you prefer to normally not work that way. To change the default preferences, simply double-click on \program{EditPythonPrefs}. To change the preferences only for one copy of the Interpreter, drop the icon for that copy onto \program{EditPythonPrefs}. You can also use \program{EditPythonPrefs} in this fashion to set the preferences of the \program{Python IDE} and any applets you create -- see Sections \ref{BuildApplet} and \ref{IDEapplet}. \subsection{Adding modules to the Module Search Path \label{search-path}} When executing an \keyword{import} statement, Python looks for modules in places defined by the \member{sys.path} To edit the \member{sys.path} on a Mac, launch \program{EditPythonPrefs}, and enter them into the largish field at the top (one per line). Since MacPython defines a main Python directory, the easiest thing is to add folders to search within the main Python directory. To add a folder of scripts that you created called ``My Folder'' located in the main Python Folder, enter \samp{\$(PYTHON):My Folder} onto a new line. To add the Desktop under OS 9 or below, add \samp{StartupDriveName:Desktop Folder} on a new line. \subsection{Default startup options \label{defaults}} % I'm assuming that there exists some other documentation on the % rest of the options so I only go over a couple here. The ``Default startup options...'' button in the \program{EditPythonPrefs} dialog box gives you many options including the ability to keep the ``Output'' window open after the script terminates, and the ability to enter interactive mode after the termination of the run script. The latter can be very helpful if you want to examine the objects that were created during your script. %\section{Nifty Tools} %There are many other tools included with the MacPython %distribution. In addition to those discussed here, make %sure to check the \file{Mac} directory. %\subsection{BuildApplet \label{BuildApplet}} % **NEED INFO HERE** %\subsection{BuildApplication} % **NEED INFO HERE** %\section{TKInter on the Mac \label{TKInter}} %TKinter is installed by default with the MacPython distribution, but %you may need to add the \file{lib-tk} folder to the Python Path (see %section \ref{search-path}). Also, it is important that you do not %try to launch Tk from within the \program{Python IDE} because the two %event loops will collide -- always run a script which uses Tkinter %with the \program{PythonInterpreter} instead -- see section %\ref{interpreter}. %\section{CGI on the Mac with Python \label{CGI}} %**NEED INFO HERE** \section{Mac OS X} At the time of this writing Mac OS X had just been released as a Public Beta. Efforts are under way to bring MacPython to Mac OS X. The MacPython release \version{1.5.2c1} runs quite well within the ``Classic'' environment. A ``Carbon'' port of the MacPython code is being prepared for release, and several people have made a command line version available to the ``Darwin'' layer (which is accessible via Terminal.app). From python-dev@python.org Sat Oct 14 06:24:23 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:24:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac using.tex,1.1,1.2 Message-ID: <200010140524.WAA31483@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv31476 Modified Files: using.tex Log Message: Fix some internal references that I botched. Index: using.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/using.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** using.tex 2000/10/14 05:09:42 1.1 --- using.tex 2000/10/14 05:24:20 1.2 *************** *** 58,62 **** immediately upon completion, but your script assumes that if it prints something that text will stick around for a while. To fix this, see ! section \ref{Defaults}. \item --- 58,62 ---- immediately upon completion, but your script assumes that if it prints something that text will stick around for a while. To fix this, see ! section \ref{defaults}. \item *************** *** 75,79 **** Creator code and document type is unset (or set incorrectly) -- this often happens when a file originates on a non-Mac computer. See ! section \ref{CreatorCode} for more details. \end{itemize} --- 75,79 ---- Creator code and document type is unset (or set incorrectly) -- this often happens when a file originates on a non-Mac computer. See ! section \ref{creator-code} for more details. \end{itemize} *************** *** 226,230 **** can't locate it from the ``Open'' dialog box, or you get an error message like ``Can't open file of type ...'' see section ! \ref{CreatorCode}. When the \program{Python IDE} saves a script, it uses the creator code --- 226,230 ---- can't locate it from the ``Open'' dialog box, or you get an error message like ``Can't open file of type ...'' see section ! \ref{creator-code}. When the \program{Python IDE} saves a script, it uses the creator code *************** *** 309,313 **** \program{EditPythonPrefs}. You can also use \program{EditPythonPrefs} in this fashion to set the preferences of the \program{Python IDE} and ! any applets you create -- see Sections \ref{BuildApplet} and \ref{IDEapplet}. --- 309,313 ---- \program{EditPythonPrefs}. You can also use \program{EditPythonPrefs} in this fashion to set the preferences of the \program{Python IDE} and ! any applets you create -- see section %s \ref{BuildApplet} and \ref{IDEapplet}. From python-dev@python.org Sat Oct 14 06:39:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:39:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libmac.tex,1.20,1.21 Message-ID: <200010140539.WAA07627@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv7585 Modified Files: libmac.tex Log Message: Remove everything that is not module documentation. It is no longer needed here. Index: libmac.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmac.tex,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** libmac.tex 1999/11/10 16:12:30 1.20 --- libmac.tex 2000/10/14 05:39:08 1.21 *************** *** 1,43 **** - \section{Introduction} - \label{intro} - - The modules in this manual are available on the Apple Macintosh only. - - Aside from the modules described here there are also interfaces to - various MacOS toolboxes, which are currently not extensively - described. The toolboxes for which modules exist are: - \module{AE} (Apple Events), - \module{Cm} (Component Manager), - \module{Ctl} (Control Manager), - \module{Dlg} (Dialog Manager), - \module{Evt} (Event Manager), - \module{Fm} (Font Manager), - \module{List} (List Manager), - \module{Menu} (Moenu Manager), - \module{Qd} (QuickDraw), - \module{Qt} (QuickTime), - \module{Res} (Resource Manager and Handles), - \module{Scrap} (Scrap Manager), - \module{Snd} (Sound Manager), - \module{TE} (TextEdit), - \module{Waste} (non-Apple \program{TextEdit} replacement) and - \module{Win} (Window Manager). - - If applicable the module will define a number of Python objects for - the various structures declared by the toolbox, and operations will be - implemented as methods of the object. Other operations will be - implemented as functions in the module. Not all operations possible in - \C{} will also be possible in Python (callbacks are often a problem), and - parameters will occasionally be different in Python (input and output - buffers, especially). All methods and functions have a \code{__doc__} - string describing their arguments and return values, and for - additional description you are referred to \citetitle{Inside - Macintosh} or similar works. - - The following modules are documented here: - - \localmoduletable - - \section{\module{mac} --- Implementations for the \module{os} module} --- 1,2 ---- From python-dev@python.org Sat Oct 14 06:41:20 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:41:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac mac.tex,1.5,1.6 Message-ID: <200010140541.WAA09395@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv9357 Modified Files: mac.tex Log Message: Update to include all the new chapters & sections. Convert from a howto to a manual, so we can *have* chapters! Comment out the macconsole module documentation; Think C seems to have disappeared. Index: mac.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/mac.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** mac.tex 1999/11/10 16:12:30 1.5 --- mac.tex 2000/10/14 05:41:17 1.6 *************** *** 1,3 **** ! \documentclass{howto} \title{Macintosh Library Modules} --- 1,3 ---- ! \documentclass{manual} \title{Macintosh Library Modules} *************** *** 5,12 **** \input{boilerplate} ! \makeindex % tell \index to actually write the ! % .idx file ! \makemodindex % ... and the module index as well. ! %\ignorePlatformAnnotation{Mac} --- 5,10 ---- \input{boilerplate} ! \makeindex % tell \index to actually write the .idx file ! \makemodindex % ... and the module index as well. *************** *** 42,48 **** \tableofcontents ! \input{libmac} % MACINTOSH ONLY \input{libctb} ! \input{libmacconsole} \input{libmacdnr} \input{libmacfs} --- 40,57 ---- \tableofcontents ! ! \input{using.tex} % Using Python on the Macintosh ! ! ! \chapter{MacPython Modules \label{macpython-modules}} ! ! The following modules are only available on the Macintosh, and are ! documented here: ! ! \localmoduletable ! ! \input{libmac} \input{libctb} ! %\input{libmacconsole} \input{libmacdnr} \input{libmacfs} *************** *** 55,58 **** --- 64,73 ---- \input{libframework} \input{libminiae} + \input{libaepack} + \input{libaetypes} + + \input{toolbox} % MacOS Toolbox Modules + + \input{undoc} % Undocumented Modules % *************** *** 65,74 **** \renewcommand{\indexname}{Module Index} %end{latexonly} ! \input{modmac.ind} % Module Index %begin{latexonly} \renewcommand{\indexname}{Index} %end{latexonly} ! \input{mac.ind} % Index \end{document} --- 80,89 ---- \renewcommand{\indexname}{Module Index} %end{latexonly} ! \input{modmac.ind} % Module Index %begin{latexonly} \renewcommand{\indexname}{Index} %end{latexonly} ! \input{mac.ind} % Index \end{document} From python-dev@python.org Sat Oct 14 06:44:34 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:44:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.47,1.48 Message-ID: <200010140544.WAA12119@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv12080 Modified Files: Makefile.deps Log Message: Update dependencies for the Macintosh manual. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -r1.47 -r1.48 *** Makefile.deps 2000/10/12 20:07:08 1.47 --- Makefile.deps 2000/10/14 05:44:32 1.48 *************** *** 251,257 **** MACFILES= $(HOWTOSTYLES) $(COMMONTEX) \ ../mac/mac.tex \ ../mac/libmac.tex \ ../mac/libctb.tex \ - ../mac/libmacconsole.tex \ ../mac/libmacdnr.tex \ ../mac/libmacfs.tex \ --- 251,261 ---- MACFILES= $(HOWTOSTYLES) $(COMMONTEX) \ ../mac/mac.tex \ + ../mac/using.tex \ + ../mac/toolbox.tex \ + ../mac/undoc.tex \ ../mac/libmac.tex \ + ../mac/libaepack.tex \ + ../mac/libaetypes.tex \ ../mac/libctb.tex \ ../mac/libmacdnr.tex \ ../mac/libmacfs.tex \ From python-dev@python.org Sat Oct 14 06:46:14 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:46:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.51,1.52 Message-ID: <200010140546.WAA13492@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv13450/lib Modified Files: libos.tex Log Message: For os.stat() & friends, note that the time fields are returned as floating-point values. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -r1.51 -r1.52 *** libos.tex 2000/10/04 13:57:27 1.51 --- libos.tex 2000/10/14 05:46:11 1.52 *************** *** 711,715 **** \code{st_mtime}, \code{st_ctime}. ! More items may be added at the end by some implementations. (On MS Windows, some items are filled with dummy values.) Availability: Macintosh, \UNIX{}, Windows. --- 711,717 ---- \code{st_mtime}, \code{st_ctime}. ! More items may be added at the end by some implementations. Note that ! on the Macintosh, the time values are floating point values, like all ! time values on the Macintosh. (On MS Windows, some items are filled with dummy values.) Availability: Macintosh, \UNIX{}, Windows. From python-dev@python.org Sat Oct 14 06:47:19 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:47:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/paper-letter Makefile,1.17,1.18 Message-ID: <200010140547.WAA14369@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/paper-letter In directory slayer.i.sourceforge.net:/tmp/cvs-serv14330/paper-letter Modified Files: Makefile Log Message: Adjust the Macintosh manual to have the formatting dependencies for manuals instead of howtos. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/paper-letter/Makefile,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** Makefile 2000/09/12 15:20:54 1.17 --- Makefile 2000/10/14 05:47:17 1.18 *************** *** 14,25 **** # what's what ! MANDVIFILES= api.dvi ext.dvi lib.dvi ref.dvi tut.dvi ! HOWTODVIFILES= doc.dvi mac.dvi inst.dvi dist.dvi ! MANPDFFILES= api.pdf ext.pdf lib.pdf ref.pdf tut.pdf ! HOWTOPDFFILES= doc.pdf mac.pdf inst.pdf dist.pdf ! MANPSFILES= api.ps ext.ps lib.ps ref.ps tut.ps ! HOWTOPSFILES= doc.ps mac.ps inst.ps dist.ps DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES) --- 14,25 ---- # what's what ! MANDVIFILES= api.dvi ext.dvi lib.dvi mac.dvi ref.dvi tut.dvi ! HOWTODVIFILES= doc.dvi inst.dvi dist.dvi ! MANPDFFILES= api.pdf ext.pdf lib.pdf mac.pdf ref.pdf tut.pdf ! HOWTOPDFFILES= doc.pdf inst.pdf dist.pdf ! MANPSFILES= api.ps ext.ps lib.ps mac.ps ref.ps tut.ps ! HOWTOPSFILES= doc.ps inst.ps dist.ps DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES) From python-dev@python.org Sat Oct 14 06:49:33 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:49:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.95,1.96 Message-ID: <200010140549.WAA16299@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv16239/api Modified Files: api.tex Log Message: For PyErr_Format(), note that the exception parameter can be a string or class, but not an instance (since an instance will be created using the formatted message string as the constructor parameter). Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -r1.95 -r1.96 *** api.tex 2000/10/07 12:31:50 1.95 --- api.tex 2000/10/14 05:49:30 1.96 *************** *** 883,888 **** \begin{cfuncdesc}{PyObject*}{PyErr_Format}{PyObject *exception, const char *format, \moreargs} ! This function sets the error indicator. ! \var{exception} should be a Python object. \var{fmt} should be a string, containing format codes, similar to \cfunction{printf}. The \code{width.precision} before a format code --- 883,888 ---- \begin{cfuncdesc}{PyObject*}{PyErr_Format}{PyObject *exception, const char *format, \moreargs} ! This function sets the error indicator. \var{exception} should be a ! Python exception (string or class, not an instance). \var{fmt} should be a string, containing format codes, similar to \cfunction{printf}. The \code{width.precision} before a format code From python-dev@python.org Sat Oct 14 08:35:18 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 14 Oct 2000 00:35:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild BUILDno.txt,1.3,1.4 python20.dsp,1.13,1.14 python20.wse,1.20,1.21 Message-ID: <200010140735.AAA21264@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv18588/python/dist/src/pcbuild Modified Files: BUILDno.txt python20.dsp python20.wse Log Message: Prep the Windows installer for 2.0 final: + Bump the build number. + Changed app name in installer dialogs. + Fiddled dialogs to repair grammar and get rid of anachronisms (e.g., "ProgMan" and "Program Manager" haven't made sense since Windows 3.1!). Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** BUILDno.txt 2000/10/07 04:04:07 1.3 --- BUILDno.txt 2000/10/14 07:35:14 1.4 *************** *** 28,32 **** + This is not enough to convince MSDev to recompile getbuildinfo.c, so force that and relink. ! + Verify that the new build number shows up in both release and debug builds. --- 28,32 ---- + This is not enough to convince MSDev to recompile getbuildinfo.c, so force that and relink. ! + Verify that the new build number shows up in both release and debug builds. *************** *** 34,37 **** --- 34,39 ---- Windows Python BUILD numbers ---------------------------- + 8 2.0 (final) + 14-Oct-2000 7 2.0c1 07-Oct-2000 Index: python20.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.dsp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** python20.dsp 2000/10/07 04:04:07 1.13 --- python20.dsp 2000/10/14 07:35:15 1.14 *************** *** 695,703 **** !IF "$(CFG)" == "python20 - Win32 Release" ! # ADD CPP /D BUILD=7 !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! # ADD CPP /D BUILD=7 !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" --- 695,703 ---- !IF "$(CFG)" == "python20 - Win32 Release" ! # ADD CPP /D BUILD=8 !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! # ADD CPP /D BUILD=8 !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" Index: python20.wse =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.wse,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** python20.wse 2000/10/07 04:04:07 1.20 --- python20.wse 2000/10/14 07:35:15 1.21 *************** *** 2,6 **** item: Global Version=5.0 ! Title=Python 2.0 Release Candidate 1 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 --- 2,6 ---- item: Global Version=5.0 ! Title=Python 2.0 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 *************** *** 65,69 **** item: Set Variable Variable=APPTITLE ! Value=Python 2.0 Release Candidate 1 end item: Set Variable --- 65,69 ---- item: Set Variable Variable=APPTITLE ! Value=Python 2.0 end item: Set Variable *************** *** 511,515 **** Name=Times New Roman Font Style=-24 0 0 0 700 255 0 0 0 3 2 1 18 ! Text=Select ProgMan Group Text French=Sélectionner le groupe du Gestionnaire de programme Text German=Bestimmung der Programm-Managergruppe --- 511,515 ---- Name=Times New Roman Font Style=-24 0 0 0 700 255 0 0 0 3 2 1 18 ! Text=Select Start Menu Group Text French=Sélectionner le groupe du Gestionnaire de programme Text German=Bestimmung der Programm-Managergruppe *************** *** 520,524 **** Rectangle=86 44 256 68 Create Flags=01010000000000000000000000000000 ! Text=Enter the name of the Program Manager group to add %APPTITLE% icons to: Text French=Entrez le nom du groupe du Gestionnaire de programme dans lequel vous souhaitez ajouter les icônes de %APPTITLE% : Text German=Geben Sie den Namen der Programmgruppe ein, der das Symbol %APPTITLE% hinzugefügt werden soll: --- 520,524 ---- Rectangle=86 44 256 68 Create Flags=01010000000000000000000000000000 ! Text=Enter the name of the Start Menu program group to which to add the %APPTITLE% icons: Text French=Entrez le nom du groupe du Gestionnaire de programme dans lequel vous souhaitez ajouter les icônes de %APPTITLE% : Text German=Geben Sie den Namen der Programmgruppe ein, der das Symbol %APPTITLE% hinzugefügt werden soll: *************** *** 606,610 **** Text=You are now ready to install %APPTITLE%. Text= ! Text=Press the Next button to begin the installation or the Back button to reenter the installation information. Text French=Vous ętes maintenant pręt ŕ installer les fichiers %APPTITLE%. Text French= --- 606,610 ---- Text=You are now ready to install %APPTITLE%. Text= ! Text=Click the Next button to begin the installation, or the Back button to change choices made previously. Text French=Vous ętes maintenant pręt ŕ installer les fichiers %APPTITLE%. Text French= *************** *** 1073,1076 **** --- 1073,1077 ---- Source=%_SRC_%\Lib\test\*.xml Destination=%MAINDIR%\Lib\test + Description=Python Test files Flags=0000000000000010 end *************** *** 1078,1081 **** --- 1079,1083 ---- Source=%_SRC_%\Lib\test\*.out Destination=%MAINDIR%\Lib\test + Description=Python Test files Flags=0000000000000010 end *************** *** 1351,1354 **** --- 1353,1357 ---- Source=%_SRC_%\..\tcl\bin\tk8%_TCLMINOR_%.dll Destination=%MAINDIR%\DLLs\tk8%_TCLMINOR_%.dll + Description=Tcl/Tk binaries and libraries Flags=0000000000000010 end *************** *** 1356,1359 **** --- 1359,1363 ---- Source=%_SRC_%\..\tcl\lib\*.* Destination=%MAINDIR%\tcl + Description=Tcl/Tk binaries and libraries Flags=0000000100000010 end From python-dev@python.org Sat Oct 14 11:28:05 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Sat, 14 Oct 2000 03:28:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.17,1.18 Message-ID: <200010141028.DAA01339@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv1038 Modified Files: expatreader.py Log Message: Fixed minor problem with reset(). Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** expatreader.py 2000/10/09 16:45:54 1.17 --- expatreader.py 2000/10/14 10:28:01 1.18 *************** *** 70,75 **** def feed(self, data, isFinal = 0): if not self._parsing: - self._parsing = 1 self.reset() self._cont_handler.startDocument() --- 70,75 ---- def feed(self, data, isFinal = 0): if not self._parsing: self.reset() + self._parsing = 1 self._cont_handler.startDocument() *************** *** 118,121 **** --- 118,122 ---- self._parser.ExternalEntityRefHandler = self.external_entity_ref + self._parsing = 0 self._entity_stack = [] From python-dev@python.org Sun Oct 15 20:20:22 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 15 Oct 2000 12:20:22 -0700 Subject: [Python-checkins] CVS: distutils/distutils __init__.py,1.17,1.18 Message-ID: <200010151920.MAA19349@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv19263/distutils Modified Files: __init__.py Log Message: Bump version to 1.0.1. Index: __init__.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/__init__.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** __init__.py 2000/10/03 03:48:43 1.17 --- __init__.py 2000/10/15 19:20:20 1.18 *************** *** 11,13 **** __revision__ = "$Id$" ! __version__ = "1.0" --- 11,13 ---- __revision__ = "$Id$" ! __version__ = "1.0.1" From python-dev@python.org Sun Oct 15 20:20:22 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 15 Oct 2000 12:20:22 -0700 Subject: [Python-checkins] CVS: distutils setup.py,1.26,1.27 Message-ID: <200010151920.MAA19345@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv19263 Modified Files: setup.py Log Message: Bump version to 1.0.1. Index: setup.py =================================================================== RCS file: /cvsroot/python/distutils/setup.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** setup.py 2000/10/03 03:48:43 1.26 --- setup.py 2000/10/15 19:20:19 1.27 *************** *** 12,16 **** setup (name = "Distutils", ! version = "1.0", description = "Python Distribution Utilities", author = "Greg Ward", --- 12,16 ---- setup (name = "Distutils", ! version = "1.0.1", description = "Python Distribution Utilities", author = "Greg Ward", From python-dev@python.org Sun Oct 15 20:21:00 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 15 Oct 2000 12:21:00 -0700 Subject: [Python-checkins] CVS: distutils README.txt,1.22,1.23 CHANGES.txt,1.16,1.17 Message-ID: <200010151921.MAA19813@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv19703 Modified Files: README.txt CHANGES.txt Log Message: Update for version 1.0.1. Index: README.txt =================================================================== RCS file: /cvsroot/python/distutils/README.txt,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** README.txt 2000/10/03 03:47:46 1.22 --- README.txt 2000/10/15 19:20:56 1.23 *************** *** 1,5 **** Python Distribution Utilities ! release 1.0 ! October 2, 2000 --- 1,5 ---- Python Distribution Utilities ! release 1.0.1 ! October 15, 2000 *************** *** 121,125 **** 2.0b1 0.9.2 2.0b2 0.9.3 ! 2.0 (planned) 1.0 There's generally no need to install the Distutils under Python 1.6/2.0. --- 121,125 ---- 2.0b1 0.9.2 2.0b2 0.9.3 ! 2.0 1.0.1 There's generally no need to install the Distutils under Python 1.6/2.0. Index: CHANGES.txt =================================================================== RCS file: /cvsroot/python/distutils/CHANGES.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** CHANGES.txt 2000/10/03 03:47:46 1.16 --- CHANGES.txt 2000/10/15 19:20:56 1.17 *************** *** 1,2 **** --- 1,15 ---- + Relase 1.0.1 (15 October, 2000): + -------------------------------- + * fixed Windows installer to deal with ZIP files created by the + zipfile module better (Thomas Heller) + + * fixed install command's spurious warnings on Windows (due to + case-sensitive filename comparison) + + * two tweaks to the (experimental, unfinished) config command: + make 'check_lib()' more like AC_CHECK_LIB, and make sure + any command-line options are the right type + + Release 1.0 (2 October, 2000): ------------------------------ From python-dev@python.org Mon Oct 16 16:25:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 16 Oct 2000 08:25:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/xml - New directory Message-ID: <200010161525.IAA17544@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/xml In directory slayer.i.sourceforge.net:/tmp/cvs-serv17472/xml Log Message: Directory /cvsroot/python/python/dist/src/Demo/xml added to the repository From python-dev@python.org Mon Oct 16 16:27:08 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 16 Oct 2000 08:27:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/xml elem_count.py,NONE,1.1 roundtrip.py,NONE,1.1 rss2html.py,NONE,1.1 Message-ID: <200010161527.IAA18605@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/xml In directory slayer.i.sourceforge.net:/tmp/cvs-serv18550 Added Files: elem_count.py roundtrip.py rss2html.py Log Message: Demos of the new XML support from Lars Marius Garshol . --- NEW FILE --- import sys from xml.sax import make_parser, handler class FancyCounter(handler.ContentHandler): def __init__(self): self._elems = 0 self._attrs = 0 self._elem_types = {} self._attr_types = {} def startElement(self, name, attrs): self._elems = self._elems + 1 self._attrs = self._attrs + len(attrs) self._elem_types[name] = self._elem_types.get(name, 0) + 1 for name in attrs.keys(): self._attr_types[name] = self._attr_types.get(name, 0) + 1 def endDocument(self): print "There were", self._elems, "elements." print "There were", self._attrs, "attributes." print "---ELEMENT TYPES" for pair in self._elem_types.items(): print "%20s %d" % pair print "---ATTRIBUTE TYPES" for pair in self._attr_types.items(): print "%20s %d" % pair parser = make_parser() parser.setContentHandler(FancyCounter()) parser.parse(sys.argv[1]) --- NEW FILE --- """ A simple demo that reads in an XML document and spits out an equivalent, but not necessarily identical, document. """ import sys, string from xml.sax import saxutils, handler, make_parser # --- The ContentHandler class ContentGenerator(handler.ContentHandler): def __init__(self, out = sys.stdout): handler.ContentHandler.__init__(self) self._out = out # ContentHandler methods def startDocument(self): self._out.write('\n') def startElement(self, name, attrs): self._out.write('<' + name) for (name, value) in attrs.items(): self._out.write(' %s="%s"' % (name, saxutils.escape(value))) self._out.write('>') def endElement(self, name): self._out.write('' % name) def characters(self, content): self._out.write(saxutils.escape(content)) def ignorableWhitespace(self, content): self._out.write(content) def processingInstruction(self, target, data): self._out.write('' % (target, data)) # --- The main program parser = make_parser() parser.setContentHandler(ContentGenerator()) parser.parse(sys.argv[1]) --- NEW FILE --- import sys from xml.sax import make_parser, handler # --- Templates top = \ """ %s

%s

""" bottom = \ """
Converted to HTML by sax_rss2html.py.
""" # --- The ContentHandler class RSSHandler(handler.ContentHandler): def __init__(self, out = sys.stdout): handler.ContentHandler.__init__(self) self._out = out self._text = "" self._parent = None self._list_started = 0 self._title = None self._link = None self._descr = "" # ContentHandler methods def startElement(self, name, attrs): if name == "channel" or name == "image" or name == "item": self._parent = name self._text = "" def endElement(self, name): if self._parent == "channel": if name == "title": self._out.write(top % (self._text, self._text)) elif name == "description": self._out.write("

%s

\n" % self._text) elif self._parent == "item": if name == "title": self._title = self._text elif name == "link": self._link = self._text elif name == "description": self._descr = self._text elif name == "item": if not self._list_started: self._out.write("
    \n") self._list_started = 1 self._out.write('
  • %s %s\n' % (self._link, self._title, self._descr)) self._title = None self._link = None self._descr = "" if name == "rss": self._out.write(bottom) def characters(self, content): self._text = self._text + content # --- Main program parser = make_parser() parser.setContentHandler(RSSHandler()) parser.parse(sys.argv[1]) From python-dev@python.org Mon Oct 16 16:33:34 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 08:33:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM - New directory Message-ID: <200010161533.IAA22665@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM In directory slayer.i.sourceforge.net:/tmp/cvs-serv22618/RPM Log Message: Directory /cvsroot/python/python/dist/src/Misc/RPM added to the repository From python-dev@python.org Mon Oct 16 16:34:54 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 08:34:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM README,NONE,1.1 beopen-python.spec,NONE,1.1 BeOpen-Python-Setup.patch,NONE,1.1 make-spec.sh,NONE,1.1 Message-ID: <200010161534.IAA23728@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM In directory slayer.i.sourceforge.net:/tmp/cvs-serv23487 Added Files: README beopen-python.spec BeOpen-Python-Setup.patch make-spec.sh Log Message: misc. RPM support files --- NEW FILE --- This directory contains support file used to build RPM releases of Python. beopen-python.spec: Template for the spec file used to build Python. The make-spec.sh program below converts fills in the template with current release information. BeOpen-Python-Setup.patch: This patch modifies Setup.in to include many extension modules that compile cleanly on a generic Linux system. make-spec.sh: Copies the .spec and .patch files into /usr/src/redhat/SPECS and SOURCES respectively. The generated versions of these files have version numbers set from the source tree. Tkinter: The files in this directory are used to package the _tkinter extension module with distutils. The src subdirectory should contain copies of _tkinter.c and tkappinit.c from the Modules directory of the source tree. --- NEW FILE --- %define name BeOpen-Python %define version 2.0 %define release 1 %define __prefix /usr/local Summary: An interpreted, interactive, object-oriented programming language. Name: %{name} Version: %{version} Release: %{release} Copyright: Modified CNRI Open Source License Group: Development/Languages Source: %{name}-%{version}.tar.bz2 Source1: html-%{version}.tar.bz2 Patch0: %{name}-%{version}-Setup.patch BuildRoot: /var/tmp/%{name}-%{version}-root Prefix: %{__prefix} URL: http://www.pythonlabs.com/ Vendor: BeOpen PythonLabs Packager: Jeremy Hylton %description Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++. It is also usable as an extension language for applications that need a programmable interface. Finally, Python is portable: it runs on many brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the Mac. %changelog * Mon Oct 9 2000 Jeremy Hylton - updated for 2.0c1 - build audioop, imageop, and rgbimg extension modules - include xml.parsers subpackage - add test.xml.out to files list * Thu Oct 5 2000 Jeremy Hylton - added bin/python2.0 to files list (suggested by Martin v. Löwis) * Tue Sep 26 2000 Jeremy Hylton - updated for release 1 of 2.0b2 - use .bz2 version of Python source * Tue Sep 12 2000 Jeremy Hylton - Version 2 of 2.0b1 - Make the package relocatable. Thanks to Suchandra Thapa. - Exclude Tkinter from main RPM. If it is in a separate RPM, it is easier to track Tk releases. %prep %setup -n Python-%{version} %patch0 %setup -D -T -a 1 -n Python-%{version} # This command drops the HTML files in the top-level build directory. # That's not perfect, but it will do for now. %build ./configure make %install [ -d $RPM_BUILD_ROOT ] && rm -fr $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{__prefix} make prefix=$RPM_BUILD_ROOT%{__prefix} install %clean rm -fr $RPM_BUILD_ROOT %files %defattr(-, root, root) %{__prefix}/bin/python %{__prefix}/bin/python2.0 %{__prefix}/man/man1/python.1 %doc Misc/README Misc/HYPE Misc/cheatsheet Misc/unicode.txt Misc/Porting %doc LICENSE Misc/ACKS Misc/BLURB.* Misc/HISTORY Misc/NEWS %doc index.html modindex.html api dist doc ext inst lib mac ref tut icons %dir %{__prefix}/include/python2.0 %{__prefix}/include/python2.0/*.h %dir %{__prefix}/lib/python2.0/ %{__prefix}/lib/python2.0/*.py* %{__prefix}/lib/python2.0/pdb.doc %{__prefix}/lib/python2.0/profile.doc %dir %{__prefix}/lib/python2.0/config %{__prefix}/lib/python2.0/config/Makefile %{__prefix}/lib/python2.0/config/Makefile.pre.in %{__prefix}/lib/python2.0/config/Setup %{__prefix}/lib/python2.0/config/Setup.config %{__prefix}/lib/python2.0/config/Setup.local %{__prefix}/lib/python2.0/config/config.c %{__prefix}/lib/python2.0/config/config.c.in %{__prefix}/lib/python2.0/config/install-sh %{__prefix}/lib/python2.0/config/libpython2.0.a %{__prefix}/lib/python2.0/config/makesetup %{__prefix}/lib/python2.0/config/python.o %dir %{__prefix}/lib/python2.0/curses %{__prefix}/lib/python2.0/curses/*.py* %dir %{__prefix}/lib/python2.0/distutils %{__prefix}/lib/python2.0/distutils/*.py* %{__prefix}/lib/python2.0/distutils/README %dir %{__prefix}/lib/python2.0/distutils/command %{__prefix}/lib/python2.0/distutils/command/*.py* %{__prefix}/lib/python2.0/distutils/command/command_template %dir %{__prefix}/lib/python2.0/encodings %{__prefix}/lib/python2.0/encodings/*.py* %dir %{__prefix}/lib/python2.0/lib-dynload %dir %{__prefix}/lib/python2.0/lib-tk %{__prefix}/lib/python2.0/lib-tk/*.py* %{__prefix}/lib/python2.0/lib-dynload/_codecsmodule.so %{__prefix}/lib/python2.0/lib-dynload/_cursesmodule.so %{__prefix}/lib/python2.0/lib-dynload/_localemodule.so %{__prefix}/lib/python2.0/lib-dynload/arraymodule.so %{__prefix}/lib/python2.0/lib-dynload/audioop.so %{__prefix}/lib/python2.0/lib-dynload/binascii.so %{__prefix}/lib/python2.0/lib-dynload/cPickle.so %{__prefix}/lib/python2.0/lib-dynload/cStringIO.so %{__prefix}/lib/python2.0/lib-dynload/cmathmodule.so %{__prefix}/lib/python2.0/lib-dynload/errnomodule.so %{__prefix}/lib/python2.0/lib-dynload/fcntlmodule.so %{__prefix}/lib/python2.0/lib-dynload/gdbmmodule.so %{__prefix}/lib/python2.0/lib-dynload/grpmodule.so %{__prefix}/lib/python2.0/lib-dynload/imageop.so %{__prefix}/lib/python2.0/lib-dynload/linuxaudiodev.so %{__prefix}/lib/python2.0/lib-dynload/mathmodule.so %{__prefix}/lib/python2.0/lib-dynload/md5module.so %{__prefix}/lib/python2.0/lib-dynload/mmapmodule.so %{__prefix}/lib/python2.0/lib-dynload/newmodule.so %{__prefix}/lib/python2.0/lib-dynload/operator.so %{__prefix}/lib/python2.0/lib-dynload/parsermodule.so %{__prefix}/lib/python2.0/lib-dynload/pwdmodule.so %{__prefix}/lib/python2.0/lib-dynload/pyexpat.so %{__prefix}/lib/python2.0/lib-dynload/readline.so %{__prefix}/lib/python2.0/lib-dynload/resource.so %{__prefix}/lib/python2.0/lib-dynload/rgbimgmodule.so %{__prefix}/lib/python2.0/lib-dynload/rotormodule.so %{__prefix}/lib/python2.0/lib-dynload/selectmodule.so %{__prefix}/lib/python2.0/lib-dynload/shamodule.so %{__prefix}/lib/python2.0/lib-dynload/_socketmodule.so %{__prefix}/lib/python2.0/lib-dynload/stropmodule.so %{__prefix}/lib/python2.0/lib-dynload/structmodule.so %{__prefix}/lib/python2.0/lib-dynload/syslogmodule.so %{__prefix}/lib/python2.0/lib-dynload/termios.so %{__prefix}/lib/python2.0/lib-dynload/timemodule.so %{__prefix}/lib/python2.0/lib-dynload/ucnhash.so %{__prefix}/lib/python2.0/lib-dynload/unicodedata.so %{__prefix}/lib/python2.0/lib-dynload/zlibmodule.so %dir %{__prefix}/lib/python2.0/lib-old %{__prefix}/lib/python2.0/lib-old/*.py* %dir %{__prefix}/lib/python2.0/plat-linux2 %{__prefix}/lib/python2.0/plat-linux2/*.py* %{__prefix}/lib/python2.0/plat-linux2/regen %dir %{__prefix}/lib/python2.0/site-packages %{__prefix}/lib/python2.0/site-packages/README %dir %{__prefix}/lib/python2.0/test %{__prefix}/lib/python2.0/test/*.py* %{__prefix}/lib/python2.0/test/README %{__prefix}/lib/python2.0/test/audiotest.au %{__prefix}/lib/python2.0/test/greyrgb.uue %{__prefix}/lib/python2.0/test/test.xml %{__prefix}/lib/python2.0/test/test.xml.out %{__prefix}/lib/python2.0/test/testimg.uue %{__prefix}/lib/python2.0/test/testimgr.uue %{__prefix}/lib/python2.0/test/testrgb.uue %dir %{__prefix}/lib/python2.0/test/output %{__prefix}/lib/python2.0/test/output/test_* %dir %{__prefix}/lib/python2.0/xml %{__prefix}/lib/python2.0/xml/*.py* %dir %{__prefix}/lib/python2.0/xml/dom %{__prefix}/lib/python2.0/xml/dom/*.py* %dir %{__prefix}/lib/python2.0/xml/parsers %{__prefix}/lib/python2.0/xml/parsers/*.py* %dir %{__prefix}/lib/python2.0/xml/sax %{__prefix}/lib/python2.0/xml/sax/*.py* --- NEW FILE --- *** /src/python/dist/src/Modules/Setup.in Mon Oct 9 10:40:21 2000 --- Modules/Setup.in Mon Oct 9 16:27:33 2000 *************** *** 111,117 **** # modules are to be built as shared libraries (see above for more # detail; also note that *static* reverses this effect): ! #*shared* # GNU readline. Unlike previous Python incarnations, GNU readline is # now incorporated in an optional module, configured in the Setup file --- 111,117 ---- # modules are to be built as shared libraries (see above for more # detail; also note that *static* reverses this effect): ! *shared* # GNU readline. Unlike previous Python incarnations, GNU readline is # now incorporated in an optional module, configured in the Setup file *************** *** 121,127 **** # it, depending on your system -- see the GNU readline instructions. # It's okay for this to be a shared library, too. ! #readline readline.c -lreadline -ltermcap # Modules that should always be present (non UNIX dependent): --- 121,127 ---- # it, depending on your system -- see the GNU readline instructions. # It's okay for this to be a shared library, too. ! readline readline.c -lreadline -ltermcap # Modules that should always be present (non UNIX dependent): *************** *** 170,187 **** # Some more UNIX dependent modules -- off by default, since these # are not supported by all UNIX systems: ! #nis nismodule.c -lnsl # Sun yellow pages -- not everywhere ! #termios termios.c # Steen Lumholt's termios module ! #resource resource.c # Jeremy Hylton's rlimit interface # Multimedia modules -- off by default. # These don't work for 64-bit platforms!!! # These represent audio samples or images as strings: ! #audioop audioop.c # Operations on audio samples ! #imageop imageop.c # Operations on images ! #rgbimg rgbimgmodule.c # Read SGI RGB image files (but coded portably) # The md5 module implements the RSA Data Security, Inc. MD5 --- 170,187 ---- # Some more UNIX dependent modules -- off by default, since these # are not supported by all UNIX systems: ! nis nismodule.c -lnsl # Sun yellow pages -- not everywhere ! termios termios.c # Steen Lumholt's termios module ! resource resource.c # Jeremy Hylton's rlimit interface # Multimedia modules -- off by default. # These don't work for 64-bit platforms!!! # These represent audio samples or images as strings: ! audioop audioop.c # Operations on audio samples ! imageop imageop.c # Operations on images ! rgbimg rgbimgmodule.c # Read SGI RGB image files (but coded portably) # The md5 module implements the RSA Data Security, Inc. MD5 *************** *** 255,261 **** # Linux specific modules -- off by default: ! #linuxaudiodev linuxaudiodev.c # George Neville-Neil's timing module: --- 255,261 ---- # Linux specific modules -- off by default: ! linuxaudiodev linuxaudiodev.c # George Neville-Neil's timing module: *************** *** 311,317 **** # Lance Ellinghaus's modules: rotor rotormodule.c # enigma-inspired encryption ! #syslog syslogmodule.c # syslog daemon interface # Curses support, requring the System V version of curses, often --- 311,317 ---- # Lance Ellinghaus's modules: rotor rotormodule.c # enigma-inspired encryption ! syslog syslogmodule.c # syslog daemon interface # Curses support, requring the System V version of curses, often *************** *** 319,325 **** # instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include # -L/usr/5lib before -lcurses). ! #_curses _cursesmodule.c -lcurses -ltermcap --- 319,325 ---- # instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include # -L/usr/5lib before -lcurses). ! _curses _cursesmodule.c -lcurses -ltermcap *************** *** 349,355 **** # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: ! #gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm # Berkeley DB interface. --- 349,355 ---- # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: ! gdbm gdbmmodule.c -I/usr/include -L/usr/lib -lgdbm # Berkeley DB interface. *************** *** 406,412 **** # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.cdrom.com/pub/infozip/zlib/ ! #zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz # Interface to the Expat XML parser # --- 406,412 ---- # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.cdrom.com/pub/infozip/zlib/ ! zlib zlibmodule.c -I/usr/include -L/usr/lib -lz # Interface to the Expat XML parser # *************** *** 427,434 **** # # ar cr libexpat.a xmltok/*.o xmlparse/*.o # ! #EXPAT_DIR=/usr/local/src/expat ! #pyexpat pyexpat.c -I$(EXPAT_DIR)/xmlparse -L$(EXPAT_DIR) -lexpat # Example -- included for reference only: --- 427,433 ---- # # ar cr libexpat.a xmltok/*.o xmlparse/*.o # ! pyexpat pyexpat.c -I/usr/local/include/xmlparse -L/usr/local/lib -lexpat # Example -- included for reference only: --- NEW FILE --- #! /bin/bash RPM_TOPDIR=/usr/src/redhat PY_VERSION=`perl -ne 'print "$1\n" if (/PY_VERSION\s*\"(.*)\"/o);' ../../Include/patchlevel.h` export PY_VERSION cp beopen-python.spec $RPM_TOPDIR/SPECS/beopen-python-$PY_VERSION.spec cp BeOpen-Python-Setup.patch $RPM_TOPDIR/SOURCES/BeOpen-Python-$PY_VERSION-Setup.patch perl -pi -e "s/(%define version).*/\$1 $PY_VERSION/;" $RPM_TOPDIR/SPECS/beopen-python-$PY_VERSION.spec From python-dev@python.org Mon Oct 16 16:35:40 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 08:35:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM/Tkinter - New directory Message-ID: <200010161535.IAA24136@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM/Tkinter In directory slayer.i.sourceforge.net:/tmp/cvs-serv24095/Tkinter Log Message: Directory /cvsroot/python/python/dist/src/Misc/RPM/Tkinter added to the repository From python-dev@python.org Mon Oct 16 16:36:28 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 08:36:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM/Tkinter setup.py,NONE,1.1 setup.cfg,NONE,1.1 Message-ID: <200010161536.IAA24793@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM/Tkinter In directory slayer.i.sourceforge.net:/tmp/cvs-serv24645 Added Files: setup.py setup.cfg Log Message: distutils setup files for Tkinter --- NEW FILE --- #! /usr/bin/env python """Tkinter is the Python interface to the Tk GUI toolkit. Tk offers native look and feel on most major platforms, including Unix, Windows, and Macintosh. The Tkinter-2.0 RPM contains the Python C extension module for Python 2.0. The Python source files are distributed with the main Python distribution.""" from distutils.core import setup, Extension setup(name="Tkinter-2.0", version="8.0", description="Python interface to Tk GUI toolkit", author="Python development team", author_email="pythoneers@beopen.com", url="http://www.pythonlabs.com/products/python2.0/", licence="Modified CNRI Open Source License", ext_modules=[Extension("_tkinter", ["src/_tkinter.c", "src/tkappinit.c"], define_macros=[('WITH_APPINIT', None)], library_dirs=["/usr/X11R6/lib"], libraries=["tk8.0", "tcl8.0", "X11"], )], long_description = __doc__ ) --- NEW FILE --- [bdist_rpm] packager = Jeremy Hylton vendor = BeOpen PythonLabs release = 2 From python-dev@python.org Mon Oct 16 16:36:41 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 08:36:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM/Tkinter/src - New directory Message-ID: <200010161536.IAA24976@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM/Tkinter/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv24926/src Log Message: Directory /cvsroot/python/python/dist/src/Misc/RPM/Tkinter/src added to the repository From python-dev@python.org Mon Oct 16 16:47:53 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 16 Oct 2000 08:47:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib gettext.py,1.8,1.9 Message-ID: <200010161547.IAA00993@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv934 Modified Files: gettext.py Log Message: find(): Application of (slightly modified) SF patch #101928 by Ulf Betlehem, verified by Peter Funk. Fixes preservation of language search order lost due to use of dictionary keys instead of a list. Closes SF bug #116964. Index: gettext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/gettext.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** gettext.py 2000/10/05 18:48:12 1.8 --- gettext.py 2000/10/16 15:47:50 1.9 *************** *** 209,219 **** languages.append('C') # now normalize and expand the languages ! langdict = {} for lang in languages: for nelang in _expand_lang(lang): ! langdict[nelang] = nelang ! languages = langdict.keys() # select a language ! for lang in languages: if lang == 'C': break --- 209,219 ---- languages.append('C') # now normalize and expand the languages ! nelangs = [] for lang in languages: for nelang in _expand_lang(lang): ! if nelang not in nelangs: ! nelangs.append(nelang) # select a language ! for lang in nelangs: if lang == 'C': break From python-dev@python.org Mon Oct 16 17:59:17 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 09:59:17 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.172,1.173 configure,1.164,1.165 Message-ID: <200010161659.JAA26312@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv25935 Modified Files: configure.in configure Log Message: Patch #101936: Auto-detect DEC threads (which need "-threads" argument) by Thomas Wouters Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.172 retrieving revision 1.173 diff -C2 -r1.172 -r1.173 *** configure.in 2000/10/12 17:11:38 1.172 --- configure.in 2000/10/16 16:59:12 1.173 *************** *** 806,809 **** --- 806,818 ---- LIBOBJS="$LIBOBJS thread.o" USE_THREAD_MODULE=""]) + + if test "$USE_THREAD_MODULE" != "#" + then + # If the above checks didn't disable threads, (at least) OSF1 + # needs this '-threads' argument during linking. + case $ac_sys_system in + OSF1) LDLAST=-threads;; + esac + fi fi Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.164 retrieving revision 1.165 diff -C2 -r1.164 -r1.165 *** configure 2000/10/12 17:11:38 1.164 --- configure 2000/10/16 16:59:12 1.165 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.171 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...4098 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) --- 6014,6018 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6335,6338 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 --- 6318,6321 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 From python-dev@python.org Mon Oct 16 18:33:53 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 10:33:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 test_cop.py,NONE,1.1 stringio.py,1.6,1.7 test_fcn.py,1.8,1.9 test_gra.py,1.5,1.6 test_mat.py,1.4,1.5 test_min.py,1.3,1.4 test_str.py,1.12,1.13 test_unp.py,1.3,1.4 test_url.py,1.3,1.4 test_win.py,1.5,1.6 Message-ID: <200010161733.KAA19541@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv18471 Modified Files: stringio.py test_fcn.py test_gra.py test_mat.py test_min.py test_str.py test_unp.py test_url.py test_win.py Added Files: test_cop.py Log Message: the usual --- NEW FILE --- import copy_reg class C: pass try: copy_reg.pickle(C, None, None) except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch expected TypeError when registering a class type." print try: copy_reg.pickle(type(1), "not a callable") except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch TypeError " \ "when registering a non-callable reduction function." print try: copy_reg.pickle(type(1), int, "not a callable") except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch TypeError " \ "when registering a non-callable constructor." Index: stringio.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/stringio.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** stringio.py 2000/10/09 22:14:43 1.6 --- stringio.py 2000/10/16 17:33:50 1.7 *************** *** 130,133 **** --- 130,135 ---- self.buflist = [self.buf[:self.pos], s, self.buf[newpos:]] self.buf = '' + if newpos > self.len: + self.len = newpos else: self.buflist.append(s) Index: test_fcn.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_fcn.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_fcn.py 2000/09/26 17:32:27 1.8 --- test_fcn.py 2000/10/16 17:33:50 1.9 *************** *** 17,21 **** print 'Status from fnctl with O_NONBLOCK: ', rv ! if sys.platform in ('netbsd1', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4', --- 17,21 ---- print 'Status from fnctl with O_NONBLOCK: ', rv ! if sys.platform in ('netbsd1', 'Darwin1.2', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4', Index: test_gra.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_gra.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_gra.py 2000/09/26 17:32:27 1.5 --- test_gra.py 2000/10/16 17:33:50 1.6 *************** *** 269,276 **** print >> sys.stdout, 0 or 1 ! # test print >> None class Gulp: def write(self, msg): pass def driver(): oldstdout = sys.stdout --- 269,284 ---- print >> sys.stdout, 0 or 1 ! # test printing to an instance class Gulp: def write(self, msg): pass + gulp = Gulp() + print >> gulp, 1, 2, 3 + print >> gulp, 1, 2, 3, + print >> gulp + print >> gulp, 0 or 1, 0 or 1, + print >> gulp, 0 or 1 + + # test print >> None def driver(): oldstdout = sys.stdout Index: test_mat.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_mat.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_mat.py 2000/09/01 19:25:51 1.4 --- test_mat.py 2000/10/16 17:33:50 1.5 *************** *** 153,154 **** --- 153,185 ---- testit('tanh(0)', math.tanh(0), 0) testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) + + print 'exceptions' # oooooh, *this* is a x-platform gamble! good luck + + try: + x = math.exp(-1000000000) + except: + # mathmodule.c is failing to weed out underflows from libm, or + # we've got an fp format with huge dynamic range + raise TestFailed("underflowing exp() should not have rasied an exception") + if x != 0: + raise TestFailed("underflowing exp() should have returned 0") + + # If this fails, probably using a strict IEEE-754 conforming libm, and x + # is +Inf afterwards. But Python wants overflows detected by default. + try: + x = math.exp(1000000000) + except OverflowError: + pass + else: + raise TestFailed("overflowing exp() didn't trigger OverflowError") + + # If this fails, it could be a puzzle. One odd possibility is that + # mathmodule.c's CHECK() macro is getting confused while comparing + # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE + # as a result (and so raising OverflowError instead). + try: + x = math.sqrt(-1.0) + except ValueError: + pass + else: + raise TestFailed("sqrt(-1) didn't raise ValueError") Index: test_min.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_min.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_min.py 2000/10/09 22:14:43 1.3 --- test_min.py 2000/10/16 17:33:50 1.4 *************** *** 16,20 **** del base ! def confirm( test, testname="Test" ): if test: print "Passed " + testname --- 16,20 ---- del base ! def confirm(test, testname = "Test"): if test: print "Passed " + testname *************** *** 23,43 **** raise Exception ! Node._debug=1 def testParseFromFile(): from StringIO import StringIO ! dom=parse( StringIO( open( tstfile ).read() ) ) dom.unlink() confirm(isinstance(dom,Document)) ! def testGetElementsByTagName( ): ! dom=parse( tstfile ) ! confirm( dom.getElementsByTagName( "LI" )==\ ! dom.documentElement.getElementsByTagName( "LI" ) ) dom.unlink() ! def testInsertBefore( ): ! dom=parse( tstfile ) ! docel=dom.documentElement #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[1]) --- 23,43 ---- raise Exception ! Node._debug = 1 def testParseFromFile(): from StringIO import StringIO ! dom = parse(StringIO(open(tstfile).read())) dom.unlink() confirm(isinstance(dom,Document)) ! def testGetElementsByTagName(): ! dom = parse(tstfile) ! confirm(dom.getElementsByTagName("LI") == \ ! dom.documentElement.getElementsByTagName("LI")) dom.unlink() ! def testInsertBefore(): ! dom = parse(tstfile) ! docel = dom.documentElement #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[1]) *************** *** 46,170 **** # docel.childNodes[0]) ! #confirm( docel.childNodes[0].tet=="a" ) ! #confirm( docel.childNodes[2].tet=="a" ) dom.unlink() def testAppendChild(): ! dom=parse( tstfile ) ! dom.documentElement.appendChild( dom.createComment( u"Hello" )) ! confirm( dom.documentElement.childNodes[-1].nodeName=="#comment" ) ! confirm( dom.documentElement.childNodes[-1].data=="Hello" ) dom.unlink() def testNonZero(): ! dom=parse( tstfile ) ! confirm( dom )# should not be zero ! dom.appendChild( dom.createComment( "foo" ) ) ! confirm( not dom.childNodes[-1].childNodes ) dom.unlink() def testUnlink(): ! dom=parse( tstfile ) dom.unlink() def testElement(): ! dom=Document() ! dom.appendChild( dom.createElement( "abc" ) ) ! confirm( dom.documentElement ) dom.unlink() def testAAA(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam2" ) dom.unlink() def testAAB(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam" ) ! el.setAttribute( "spam", "jam2" ) dom.unlink() def testAddAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! child.setAttribute( "def", "ghi" ) ! confirm( child.getAttribute( "def" )=="ghi" ) ! confirm( child.attributes["def"].value=="ghi" ) ! child.setAttribute( "jkl", "mno" ) ! confirm( child.getAttribute( "jkl" )=="mno" ) ! confirm( child.attributes["jkl"].value=="mno" ) ! confirm( len( child.attributes )==2 ) ! child.setAttribute( "def", "newval" ) ! confirm( child.getAttribute( "def" )=="newval" ) ! confirm( child.attributes["def"].value=="newval" ) ! confirm( len( child.attributes )==2 ) dom.unlink() def testDeleteAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! confirm( len( child.attributes)==0 ) ! child.setAttribute( "def", "ghi" ) ! confirm( len( child.attributes)==1 ) del child.attributes["def"] ! confirm( len( child.attributes)==0 ) dom.unlink() def testRemoveAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! child.setAttribute( "def", "ghi" ) ! confirm( len( child.attributes)==1 ) ! child.removeAttribute("def" ) ! confirm( len( child.attributes)==0 ) dom.unlink() def testRemoveAttrNS(): ! dom=Document() ! child=dom.appendChild( ! dom.createElementNS( "http://www.python.org", "python:abc" ) ) ! child.setAttributeNS( "http://www.w3.org", "xmlns:python", ! "http://www.python.org" ) ! child.setAttributeNS( "http://www.python.org", "python:abcattr", "foo" ) ! confirm( len( child.attributes )==2 ) ! child.removeAttributeNS( "http://www.python.org", "abcattr" ) ! confirm( len( child.attributes )==1 ) dom.unlink() def testRemoveAttributeNode(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "foo" ) ) ! child.setAttribute( "spam", "jam" ) ! confirm( len( child.attributes )==1 ) ! node=child.getAttributeNode( "spam" ) ! child.removeAttributeNode( node ) ! confirm( len( child.attributes )==0 ) dom.unlink() def testChangeAttr(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam" ) ! confirm( len( el.attributes )==1 ) ! el.setAttribute( "spam", "bam" ) ! confirm( len( el.attributes )==1 ) ! el.attributes["spam"]="ham" ! confirm( len( el.attributes )==1 ) ! el.setAttribute( "spam2", "bam" ) ! confirm( len( el.attributes )==2 ) ! el.attributes[ "spam2"]= "bam2" ! confirm( len( el.attributes )==2 ) dom.unlink() --- 46,170 ---- # docel.childNodes[0]) ! #confirm( docel.childNodes[0].tet == "a") ! #confirm( docel.childNodes[2].tet == "a") dom.unlink() def testAppendChild(): ! dom = parse(tstfile) ! dom.documentElement.appendChild(dom.createComment(u"Hello")) ! confirm(dom.documentElement.childNodes[-1].nodeName == "#comment") ! confirm(dom.documentElement.childNodes[-1].data == "Hello") dom.unlink() def testNonZero(): ! dom = parse(tstfile) ! confirm(dom)# should not be zero ! dom.appendChild(dom.createComment("foo")) ! confirm(not dom.childNodes[-1].childNodes) dom.unlink() def testUnlink(): ! dom = parse(tstfile) dom.unlink() def testElement(): ! dom = Document() ! dom.appendChild(dom.createElement("abc")) ! confirm(dom.documentElement) dom.unlink() def testAAA(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam2") dom.unlink() def testAAB(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam") ! el.setAttribute("spam", "jam2") dom.unlink() def testAddAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! child.setAttribute("def", "ghi") ! confirm(child.getAttribute("def") == "ghi") ! confirm(child.attributes["def"].value == "ghi") ! child.setAttribute("jkl", "mno") ! confirm(child.getAttribute("jkl") == "mno") ! confirm(child.attributes["jkl"].value == "mno") ! confirm(len(child.attributes) == 2) ! child.setAttribute("def", "newval") ! confirm(child.getAttribute("def") == "newval") ! confirm(child.attributes["def"].value == "newval") ! confirm(len(child.attributes) == 2) dom.unlink() def testDeleteAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! confirm(len(child.attributes) == 0) ! child.setAttribute("def", "ghi") ! confirm(len(child.attributes) == 1) del child.attributes["def"] ! confirm(len(child.attributes) == 0) dom.unlink() def testRemoveAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! child.setAttribute("def", "ghi") ! confirm(len(child.attributes) == 1) ! child.removeAttribute("def") ! confirm(len(child.attributes) == 0) dom.unlink() def testRemoveAttrNS(): ! dom = Document() ! child = dom.appendChild( ! dom.createElementNS("http://www.python.org", "python:abc")) ! child.setAttributeNS("http://www.w3.org", "xmlns:python", ! "http://www.python.org") ! child.setAttributeNS("http://www.python.org", "python:abcattr", "foo") ! confirm(len(child.attributes) == 2) ! child.removeAttributeNS("http://www.python.org", "abcattr") ! confirm(len(child.attributes) == 1) dom.unlink() def testRemoveAttributeNode(): ! dom = Document() ! child = dom.appendChild(dom.createElement("foo")) ! child.setAttribute("spam", "jam") ! confirm(len(child.attributes) == 1) ! node = child.getAttributeNode("spam") ! child.removeAttributeNode(node) ! confirm(len(child.attributes) == 0) dom.unlink() def testChangeAttr(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam") ! confirm(len(el.attributes) == 1) ! el.setAttribute("spam", "bam") ! confirm(len(el.attributes) == 1) ! el.attributes["spam"] = "ham" ! confirm(len(el.attributes) == 1) ! el.setAttribute("spam2", "bam") ! confirm(len(el.attributes) == 2) ! el.attributes[ "spam2"] = "bam2" ! confirm(len(el.attributes) == 2) dom.unlink() *************** *** 187,225 **** def testElementReprAndStr(): ! dom=Document() ! el=dom.appendChild( dom.createElement( "abc" ) ) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicode(): ! dom=Document() ! el=dom.appendChild( dom.createElement( u"abc" ) ) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicodeNS(): ! dom=Document() ! el=dom.appendChild( ! dom.createElementNS( u"http://www.slashdot.org", u"slash:abc" )) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) ! confirm( string1.find("slash:abc" )!=-1 ) dom.unlink() ! confirm( len( Node.allnodes )==0 ) def testAttributeRepr(): ! dom=Document() ! el=dom.appendChild( dom.createElement( u"abc" ) ) ! node=el.setAttribute( "abc", "def" ) ! confirm( str( node ) == repr( node ) ) dom.unlink() ! confirm( len( Node.allnodes )==0 ) def testTextNodeRepr(): pass --- 187,225 ---- def testElementReprAndStr(): ! dom = Document() ! el = dom.appendChild(dom.createElement("abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicode(): ! dom = Document() ! el = dom.appendChild(dom.createElement(u"abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicodeNS(): ! dom = Document() ! el = dom.appendChild( ! dom.createElementNS(u"http://www.slashdot.org", u"slash:abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) ! confirm(string1.find("slash:abc") != -1) dom.unlink() ! confirm(len(Node.allnodes) == 0) def testAttributeRepr(): ! dom = Document() ! el = dom.appendChild(dom.createElement(u"abc")) ! node = el.setAttribute("abc", "def") ! confirm(str(node) == repr(node)) dom.unlink() ! confirm(len(Node.allnodes) == 0) def testTextNodeRepr(): pass *************** *** 231,235 **** dom.unlink() confirm(str == domstr) ! confirm( len( Node.allnodes )==0 ) def testProcessingInstruction(): pass --- 231,235 ---- dom.unlink() confirm(str == domstr) ! confirm(len(Node.allnodes) == 0) def testProcessingInstruction(): pass *************** *** 309,321 **** def testClonePIDeep(): pass ! names=globals().keys() names.sort() ! works=1 for name in names: ! if name.startswith( "test" ): ! func=globals()[name] try: func() --- 309,387 ---- def testClonePIDeep(): pass + def testSiblings(): + doc = parseString("text?") + root = doc.documentElement + (pi, text, elm) = root.childNodes + + confirm(pi.nextSibling is text and + pi.previousSibling is None and + text.nextSibling is elm and + text.previousSibling is pi and + elm.nextSibling is None and + elm.previousSibling is text, "testSiblings") + + doc.unlink() + + def testParents(): + doc = parseString("") + root = doc.documentElement + elm1 = root.childNodes[0] + (elm2a, elm2b) = elm1.childNodes + elm3 = elm2b.childNodes[0] + + confirm(root.parentNode is doc and + elm1.parentNode is root and + elm2a.parentNode is elm1 and + elm2b.parentNode is elm1 and + elm3.parentNode is elm2b, "testParents") + + doc.unlink() + + def testSAX2DOM(): + from xml.dom import pulldom + + sax2dom = pulldom.SAX2DOM() + sax2dom.startDocument() + sax2dom.startElement("doc", {}) + sax2dom.characters("text") + sax2dom.startElement("subelm", {}) + sax2dom.characters("text") + sax2dom.endElement("subelm") + sax2dom.characters("text") + sax2dom.endElement("doc") + sax2dom.endDocument() + + doc = sax2dom.document + root = doc.documentElement + (text1, elm1, text2) = root.childNodes + text3 = elm1.childNodes[0] + + confirm(text1.previousSibling is None and + text1.nextSibling is elm1 and + elm1.previousSibling is text1 and + elm1.nextSibling is text2 and + text2.previousSibling is elm1 and + text2.nextSibling is None and + text3.previousSibling is None and + text3.nextSibling is None, "testSAX2DOM - siblings") + + confirm(root.parentNode is doc and + text1.parentNode is root and + elm1.parentNode is root and + text2.parentNode is root and + text3.parentNode is elm1, "testSAX2DOM - parents") + + doc.unlink() ! # --- MAIN PROGRAM ! ! names = globals().keys() names.sort() ! works = 1 for name in names: ! if name.startswith("test"): ! func = globals()[name] try: func() *************** *** 323,327 **** confirm(len(Node.allnodes) == 0, "assertion: len(Node.allnodes) == 0") ! if len( Node.allnodes ): print "Garbage left over:" if verbose: --- 389,393 ---- confirm(len(Node.allnodes) == 0, "assertion: len(Node.allnodes) == 0") ! if len(Node.allnodes): print "Garbage left over:" if verbose: *************** *** 331,341 **** # are needed print len(Node.allnodes) ! Node.allnodes={} ! except Exception, e : ! works=0 print "Test Failed: ", name ! apply( traceback.print_exception, sys.exc_info() ) print `e` ! Node.allnodes={} if works: --- 397,407 ---- # are needed print len(Node.allnodes) ! Node.allnodes = {} ! except Exception, e: ! works = 0 print "Test Failed: ", name ! traceback.print_exception(*sys.exc_info()) print `e` ! Node.allnodes = {} if works: Index: test_str.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_str.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** test_str.py 2000/10/09 22:14:43 1.12 --- test_str.py 2000/10/16 17:33:50 1.13 *************** *** 1,134 **** ! #! /usr/bin/env python ! # Sanity checker for time.strftime ! ! import time, calendar, sys, string, os, re ! from test_support import verbose ! ! def main(): ! global verbose ! now = time.time() ! strftest(now) ! verbose = 0 ! # Try a bunch of dates and times, chosen to vary through time of ! # day and daylight saving time ! for j in range(-5, 5): ! for i in range(25): ! strftest(now + (i + j*100)*23*3603) ! ! def strftest(now): ! if verbose: ! print "strftime test for", time.ctime(now) ! nowsecs = str(long(now))[:-1] ! gmt = time.gmtime(now) ! now = time.localtime(now) ! ! if now[3] < 12: ampm='(AM|am)' ! else: ampm='(PM|pm)' ! ! jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) ! try: ! if now[8]: tz = time.tzname[1] ! else: tz = time.tzname[0] ! except AttributeError: ! tz = '' ! ! if now[3] > 12: clock12 = now[3] - 12 ! elif now[3] > 0: clock12 = now[3] ! else: clock12 = 12 ! ! expectations = ( ! ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ! ('%A', calendar.day_name[now[6]], 'full weekday name'), ! ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ! ('%B', calendar.month_name[now[1]], 'full month name'), ! # %c see below ! ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ! ('%H', '%02d' % now[3], 'hour (00-23)'), ! ('%I', '%02d' % clock12, 'hour (01-12)'), ! ('%j', '%03d' % now[7], 'julian day (001-366)'), ! ('%m', '%02d' % now[1], 'month as number (01-12)'), ! ('%M', '%02d' % now[4], 'minute, (00-59)'), ! ('%p', ampm, 'AM or PM as appropriate'), ! ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ! ('%U', '%02d' % ((now[7] + jan1[6])/7), ! 'week number of the year (Sun 1st)'), ! ('%w', '0?%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ! ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), ! 'week number of the year (Mon 1st)'), ! # %x see below ! ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ! ('%y', '%02d' % (now[0]%100), 'year without century'), ! ('%Y', '%d' % now[0], 'year with century'), ! # %Z see below ! ('%%', '%', 'single percent sign'), ! ) ! ! nonstandard_expectations = ( ! # These are standard but don't have predictable output ! ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ! ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), ! '%m/%d/%y %H:%M:%S'), ! ('%Z', '%s' % tz, 'time zone name'), ! ! # These are some platform specific extensions ! ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ! ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ! ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ! ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ! ('%n', '\n', 'newline character'), ! ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), ! '%I:%M:%S %p'), ! ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ! ('%s', nowsecs, 'seconds since the Epoch in UCT'), ! ('%t', '\t', 'tab character'), ! ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ! ('%3y', '%03d' % (now[0]%100), ! 'year without century rendered using fieldwidth'), ! ) ! ! if verbose: ! print "Strftime test, platform: %s, Python version: %s" % \ ! (sys.platform, string.split(sys.version)[0]) ! ! for e in expectations: ! try: ! result = time.strftime(e[0], now) ! except ValueError, error: ! print "Standard '%s' format gave error:" % e[0], error ! continue ! if re.match(e[1], result): continue ! if not result or result[0] == '%': ! print "Does not support standard '%s' format (%s)" % (e[0], e[2]) ! else: ! print "Conflict for %s (%s):" % (e[0], e[2]) ! print " Expected %s, but got %s" % (e[1], result) ! ! for e in nonstandard_expectations: ! try: ! result = time.strftime(e[0], now) ! except ValueError, result: ! if verbose: ! print "Error for nonstandard '%s' format (%s): %s" % \ ! (e[0], e[2], str(result)) ! continue ! if re.match(e[1], result): ! if verbose: ! print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) ! elif not result or result[0] == '%': ! if verbose: ! print "Does not appear to support '%s' format (%s)" % (e[0], ! e[2]) ! else: ! if verbose: ! print "Conflict for nonstandard '%s' format (%s):" % (e[0], ! e[2]) ! print " Expected %s, but got %s" % (e[1], result) ! ! def fixasctime(s): ! if s[8] == ' ': ! s = s[:8] + '0' + s[9:] ! return s ! ! main() --- 1,37 ---- ! # Tests StringIO and cStringIO ! def do_test(module): ! s = ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+'\n')*5 ! f = module.StringIO(s) ! print f.read(10) ! print f.readline() ! print len(f.readlines(60)) ! ! f = module.StringIO() ! f.write('abcdef') ! f.seek(3) ! f.write('uvwxyz') ! f.write('!') ! print `f.getvalue()` ! f.close() ! f = module.StringIO() ! f.write(s) ! f.seek(10) ! f.truncate() ! print `f.getvalue()` ! f.seek(0) ! f.truncate(5) ! print `f.getvalue()` ! f.close() try: ! f.write("frobnitz") ! except ValueError, e: ! print "Caught expected ValueError writing to closed StringIO:" ! print e ! else: ! print "Failed to catch ValueError writing to closed StringIO." ! ! # Don't bother testing cStringIO without ! import StringIO, cStringIO ! do_test(StringIO) ! do_test(cStringIO) Index: test_unp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_unp.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_unp.py 2000/09/01 19:25:51 1.3 --- test_unp.py 2000/10/16 17:33:50 1.4 *************** *** 48,51 **** --- 48,63 ---- raise TestFailed + # single element unpacking, with extra syntax + if verbose: + print 'unpack single tuple/list' + st = (99,) + sl = [100] + a, = st + if a <> 99: + raise TestFailed + b, = sl + if b <> 100: + raise TestFailed + # now for some failures Index: test_url.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_url.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_url.py 2000/10/09 22:14:43 1.3 --- test_url.py 2000/10/16 17:33:50 1.4 *************** *** 0 **** --- 1,32 ---- + # Minimal test of the quote function + import urllib + + chars = 'abcdefghijklmnopqrstuvwxyz'\ + '\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356' \ + '\357\360\361\362\363\364\365\366\370\371\372\373\374\375\376\377' \ + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' \ + '\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317' \ + '\320\321\322\323\324\325\326\330\331\332\333\334\335\336' + + expected = 'abcdefghijklmnopqrstuvwxyz%df%e0%e1%e2%e3%e4%e5%e6%e7%e8%e9%ea%eb%ec%ed%ee%ef%f0%f1%f2%f3%f4%f5%f6%f8%f9%fa%fb%fc%fd%fe%ffABCDEFGHIJKLMNOPQRSTUVWXYZ%c0%c1%c2%c3%c4%c5%c6%c7%c8%c9%ca%cb%cc%cd%ce%cf%d0%d1%d2%d3%d4%d5%d6%d8%d9%da%db%dc%dd%de' + + test = urllib.quote(chars) + assert test == expected, "urllib.quote problem" + test2 = urllib.unquote(expected) + assert test2 == chars + + in1 = "abc/def" + out1_1 = "abc/def" + out1_2 = "abc%2fdef" + + assert urllib.quote(in1) == out1_1, "urllib.quote problem" + assert urllib.quote(in1, '') == out1_2, "urllib.quote problem" + + in2 = "abc?def" + out2_1 = "abc%3fdef" + out2_2 = "abc?def" + + assert urllib.quote(in2) == out2_1, "urllib.quote problem" + assert urllib.quote(in2, '?') == out2_2, "urllib.quote problem" + + Index: test_win.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_win.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_win.py 2000/10/09 22:14:43 1.5 --- test_win.py 2000/10/16 17:33:50 1.6 *************** *** 1,7 **** ! # Ridiculously simple test of the winsound module for Windows. ! import winsound ! for i in range(100, 2000, 100): ! winsound.Beep(i, 75) ! print "Hopefully you heard some sounds increasing in frequency!" --- 1,147 ---- ! # Test the windows specific win32reg module. ! # Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey ! from _winreg import * ! import os, sys ! ! test_key_name = "SOFTWARE\\Python Registry Test Key - Delete Me" ! ! test_data = [ ! ("Int Value", 45, REG_DWORD), ! ("String Val", "A string value", REG_SZ,), ! (u"Unicode Val", u"A Unicode value", REG_SZ,), ! ("StringExpand", "The path is %path%", REG_EXPAND_SZ), ! ("UnicodeExpand", u"The path is %path%", REG_EXPAND_SZ), ! ("Multi-string", ["Lots", "of", "string", "values"], REG_MULTI_SZ), ! ("Multi-unicode", [u"Lots", u"of", u"unicode", u"values"], REG_MULTI_SZ), ! ("Multi-mixed", [u"Unicode", u"and", "string", "values"],REG_MULTI_SZ), ! ("Raw Data", ("binary"+chr(0)+"data"), REG_BINARY), ! ] ! ! def WriteTestData(root_key): ! # Set the default value for this key. ! SetValue(root_key, test_key_name, REG_SZ, "Default value") ! key = CreateKey(root_key, test_key_name) ! # Create a sub-key ! sub_key = CreateKey(key, "sub_key") ! # Give the sub-key some named values ! ! for value_name, value_data, value_type in test_data: ! SetValueEx(sub_key, value_name, 0, value_type, value_data) ! ! # Check we wrote as many items as we thought. ! nkeys, nvalues, since_mod = QueryInfoKey(key) ! assert nkeys==1, "Not the correct number of sub keys" ! assert nvalues==1, "Not the correct number of values" ! nkeys, nvalues, since_mod = QueryInfoKey(sub_key) ! assert nkeys==0, "Not the correct number of sub keys" ! assert nvalues==len(test_data), "Not the correct number of values" ! # Close this key this way... ! # (but before we do, copy the key as an integer - this allows ! # us to test that the key really gets closed). ! int_sub_key = int(sub_key) ! CloseKey(sub_key) ! try: ! QueryInfoKey(int_sub_key) ! raise RuntimeError, "It appears the CloseKey() function does not close the actual key!" ! except EnvironmentError: ! pass ! # ... and close that key that way :-) ! int_key = int(key) ! key.Close() ! try: ! QueryInfoKey(int_key) ! raise RuntimeError, "It appears the key.Close() function does not close the actual key!" ! except EnvironmentError: ! pass ! ! def ReadTestData(root_key): ! # Check we can get default value for this key. ! val = QueryValue(root_key, test_key_name) ! assert val=="Default value", "Registry didn't give back the correct value" ! ! key = OpenKey(root_key, test_key_name) ! # Read the sub-keys ! sub_key = OpenKey(key, "sub_key") ! # Check I can enumerate over the values. ! index = 0 ! while 1: ! try: ! data = EnumValue(sub_key, index) ! except EnvironmentError: ! break ! assert data in test_data, "Didn't read back the correct test data" ! index = index + 1 ! assert index==len(test_data), "Didn't read the correct number of items" ! # Check I can directly access each item ! for value_name, value_data, value_type in test_data: ! read_val, read_typ = QueryValueEx(sub_key, value_name) ! assert read_val==value_data and read_typ == value_type, \ ! "Could not directly read the value" ! sub_key.Close() ! # Enumerate our main key. ! read_val = EnumKey(key, 0) ! assert read_val == "sub_key", "Read subkey value wrong" ! try: ! EnumKey(key, 1) ! assert 0, "Was able to get a second key when I only have one!" ! except EnvironmentError: ! pass ! ! key.Close() ! ! def DeleteTestData(root_key): ! key = OpenKey(root_key, test_key_name, 0, KEY_ALL_ACCESS) ! sub_key = OpenKey(key, "sub_key", 0, KEY_ALL_ACCESS) ! # It is not necessary to delete the values before deleting ! # the key (although subkeys must not exist). We delete them ! # manually just to prove we can :-) ! for value_name, value_data, value_type in test_data: ! DeleteValue(sub_key, value_name) ! ! nkeys, nvalues, since_mod = QueryInfoKey(sub_key) ! assert nkeys==0 and nvalues==0, "subkey not empty before delete" ! sub_key.Close() ! DeleteKey(key, "sub_key") ! ! try: ! # Shouldnt be able to delete it twice! ! DeleteKey(key, "sub_key") ! assert 0, "Deleting the key twice succeeded" ! except EnvironmentError: ! pass ! key.Close() ! DeleteKey(root_key, test_key_name) ! # Opening should now fail! ! try: ! key = OpenKey(root_key, test_key_name) ! assert 0, "Could open the non-existent key" ! except WindowsError: # Use this error name this time ! pass ! ! def TestAll(root_key): ! WriteTestData(root_key) ! ReadTestData(root_key) ! DeleteTestData(root_key) ! ! # Test on my local machine. ! TestAll(HKEY_CURRENT_USER) ! print "Local registry tests worked" ! try: ! remote_name = sys.argv[sys.argv.index("--remote")+1] ! except (IndexError, ValueError): ! remote_name = None ! ! if remote_name is not None: ! try: ! remote_key = ConnectRegistry(remote_name, HKEY_CURRENT_USER) ! except EnvironmentError, exc: ! print "Could not connect to the remote machine -", exc.strerror ! remote_key = None ! if remote_key is not None: ! TestAll(remote_key) ! print "Remote registry tests worked" ! else: ! print "Remote registry calls can be tested using", ! print "'test_winreg.py --remote \\\\machine_name'" From python-dev@python.org Mon Oct 16 18:35:19 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 16 Oct 2000 10:35:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_math.py,1.7,1.8 Message-ID: <200010161735.KAA20503@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv19269/python/dist/src/lib/test Modified Files: test_math.py Log Message: Test for math.* exceptional behavior only in verbose mode, so that the oddball platforms (where, e.g., math.exp(+huge) still fails to raise OverflowError) don't fail the std test suite when run normally. Index: test_math.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_math.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** test_math.py 2000/10/12 07:15:55 1.7 --- test_math.py 2000/10/16 17:35:12 1.8 *************** *** 154,185 **** testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) ! print 'exceptions' # oooooh, *this* is a x-platform gamble! good luck ! try: ! x = math.exp(-1000000000) ! except: ! # mathmodule.c is failing to weed out underflows from libm, or ! # we've got an fp format with huge dynamic range ! raise TestFailed("underflowing exp() should not have rasied an exception") ! if x != 0: ! raise TestFailed("underflowing exp() should have returned 0") ! # If this fails, probably using a strict IEEE-754 conforming libm, and x ! # is +Inf afterwards. But Python wants overflows detected by default. ! try: ! x = math.exp(1000000000) ! except OverflowError: ! pass ! else: ! raise TestFailed("overflowing exp() didn't trigger OverflowError") ! # If this fails, it could be a puzzle. One odd possibility is that ! # mathmodule.c's CHECK() macro is getting confused while comparing ! # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE ! # as a result (and so raising OverflowError instead). ! try: ! x = math.sqrt(-1.0) ! except ValueError: ! pass ! else: ! raise TestFailed("sqrt(-1) didn't raise ValueError") --- 154,195 ---- testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) ! # RED_FLAG 16-Oct-2000 Tim ! # While 2.0 is more consistent about exceptions than previous releases, it ! # still fails this part of the test on some platforms. For now, we only ! # *run* test_exceptions() in verbose mode, so that this isn't normally ! # tested. ! def test_exceptions(): ! print 'exceptions' ! try: ! x = math.exp(-1000000000) ! except: ! # mathmodule.c is failing to weed out underflows from libm, or ! # we've got an fp format with huge dynamic range ! raise TestFailed("underflowing exp() should not have raised " ! "an exception") ! if x != 0: ! raise TestFailed("underflowing exp() should have returned 0") ! # If this fails, probably using a strict IEEE-754 conforming libm, and x ! # is +Inf afterwards. But Python wants overflows detected by default. ! try: ! x = math.exp(1000000000) ! except OverflowError: ! pass ! else: ! raise TestFailed("overflowing exp() didn't trigger OverflowError") ! # If this fails, it could be a puzzle. One odd possibility is that ! # mathmodule.c's CHECK() macro is getting confused while comparing ! # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE ! # as a result (and so raising OverflowError instead). ! try: ! x = math.sqrt(-1.0) ! except ValueError: ! pass ! else: ! raise TestFailed("sqrt(-1) didn't raise ValueError") ! ! if verbose: ! test_exceptions() From python-dev@python.org Mon Oct 16 18:35:17 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 16 Oct 2000 10:35:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_math,1.4,1.5 Message-ID: <200010161735.KAA20499@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv19269/python/dist/src/lib/test/output Modified Files: test_math Log Message: Test for math.* exceptional behavior only in verbose mode, so that the oddball platforms (where, e.g., math.exp(+huge) still fails to raise OverflowError) don't fail the std test suite when run normally. Index: test_math =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_math,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_math 2000/10/12 06:10:25 1.4 --- test_math 2000/10/16 17:35:13 1.5 *************** *** 25,27 **** tan tanh - exceptions --- 25,26 ---- From python-dev@python.org Mon Oct 16 18:42:44 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 10:42:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 test_mat.py,1.5,1.6 Message-ID: <200010161742.KAA26367@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv26217 Modified Files: test_mat.py Log Message: the usual (part II) Index: test_mat.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_mat.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_mat.py 2000/10/16 17:33:50 1.5 --- test_mat.py 2000/10/16 17:42:40 1.6 *************** *** 154,185 **** testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) ! print 'exceptions' # oooooh, *this* is a x-platform gamble! good luck ! try: ! x = math.exp(-1000000000) ! except: ! # mathmodule.c is failing to weed out underflows from libm, or ! # we've got an fp format with huge dynamic range ! raise TestFailed("underflowing exp() should not have rasied an exception") ! if x != 0: ! raise TestFailed("underflowing exp() should have returned 0") ! # If this fails, probably using a strict IEEE-754 conforming libm, and x ! # is +Inf afterwards. But Python wants overflows detected by default. ! try: ! x = math.exp(1000000000) ! except OverflowError: ! pass ! else: ! raise TestFailed("overflowing exp() didn't trigger OverflowError") ! # If this fails, it could be a puzzle. One odd possibility is that ! # mathmodule.c's CHECK() macro is getting confused while comparing ! # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE ! # as a result (and so raising OverflowError instead). ! try: ! x = math.sqrt(-1.0) ! except ValueError: ! pass ! else: ! raise TestFailed("sqrt(-1) didn't raise ValueError") --- 154,195 ---- testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) ! # RED_FLAG 16-Oct-2000 Tim ! # While 2.0 is more consistent about exceptions than previous releases, it ! # still fails this part of the test on some platforms. For now, we only ! # *run* test_exceptions() in verbose mode, so that this isn't normally ! # tested. ! def test_exceptions(): ! print 'exceptions' ! try: ! x = math.exp(-1000000000) ! except: ! # mathmodule.c is failing to weed out underflows from libm, or ! # we've got an fp format with huge dynamic range ! raise TestFailed("underflowing exp() should not have raised " ! "an exception") ! if x != 0: ! raise TestFailed("underflowing exp() should have returned 0") ! # If this fails, probably using a strict IEEE-754 conforming libm, and x ! # is +Inf afterwards. But Python wants overflows detected by default. ! try: ! x = math.exp(1000000000) ! except OverflowError: ! pass ! else: ! raise TestFailed("overflowing exp() didn't trigger OverflowError") ! # If this fails, it could be a puzzle. One odd possibility is that ! # mathmodule.c's CHECK() macro is getting confused while comparing ! # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE ! # as a result (and so raising OverflowError instead). ! try: ! x = math.sqrt(-1.0) ! except ValueError: ! pass ! else: ! raise TestFailed("sqrt(-1) didn't raise ValueError") ! ! if verbose: ! test_exceptions() From python-dev@python.org Mon Oct 16 18:53:39 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 10:53:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM/src - New directory Message-ID: <200010161753.KAA02946@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv2893/src Log Message: Directory /cvsroot/python/python/dist/src/Misc/RPM/src added to the repository From python-dev@python.org Mon Oct 16 19:26:46 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 11:26:46 -0700 Subject: [Python-checkins] CVS: python/dist/src README,1.103,1.104 Message-ID: <200010161826.LAA12600@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv12297 Modified Files: README Log Message: the usual Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -r1.103 -r1.104 *** README 2000/10/09 21:34:51 1.103 --- README 2000/10/16 18:26:42 1.104 *************** *** 1,4 **** ! This is Python version 2.0 release candidate 1 ! ============================================== Copyright (c) 2000 BeOpen.com. --- 1,4 ---- ! This is Python version 2.0 ! ========================== Copyright (c) 2000 BeOpen.com. From python-dev@python.org Mon Oct 16 21:08:50 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 13:08:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.76,1.77 Message-ID: <200010162008.NAA25314@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv24484/Misc Modified Files: NEWS Log Message: Add NEWS for 2.0 final (there are a few XXX comments that must be addressed). Fix a few nits in 2.0c1 news. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -r1.76 -r1.77 *** NEWS 2000/10/09 21:27:22 1.76 --- NEWS 2000/10/16 20:08:38 1.77 *************** *** 1,3 **** ! What's New in Python 2.0c1? =========================== --- 1,3 ---- ! What's New in Python 2.0? =========================== *************** *** 15,18 **** --- 15,88 ---- ====================================================================== + What's new in 2.0 (since release candidate 1)? + ============================================== + + Standard library + + - The copy_reg module was modified to clarify its intended use: to + register pickle support for extension types, not for classes. + pickle() will raise a TypeError if it is passed a class. + + - Fixed a bug in gettext's "normalize and expand" code that prevented + it from finding an existing .mo file. + + - Restored support for HTTP/0.9 servers in httplib. + + - XXX The math module was changed to suppress underflow errors and + just return 0. + + - Fixed a bug in StringIO that occurred when the file position was not + at the end of the file and write() was called with enough data to + extend past the end of the file. + + - Fixed a bug that caused Tkinter error messages to get lost on + Windows. The bug was fixed by replacing direct use of + interp->result with Tcl_GetStringResult(interp). + + - Fixed bug in urllib2 that caused it to fail when it received an HTTP + redirect response. + + - Several changes were made to distutils: Some debugging code was + removed from util. Fixed the installer used when an external zip + program (like WinZip) is not found; the source code for this + installer is in Misc/distutils. check_lib() was modified to behave + more like AC_CHECK_LIB by add other_libraries() as a parameter. The + test for whether installed modules are on sys.path was changed to + use both normcase() and normpath(). + + - XXX xml minidom, pulldom, expatreader, and saxutils changes (can't + tell what happened from the CVS logs) + + - The regression test driver (regrtest.py) behavior when invoked with + -l changed: It now reports a count of objects that are recognized as + garbage but not freed by the garbage collector. + + - The regression test for the math module was changed to report + exceptional behavior when the test is run in verbose mode. + + Internals + + - PyOS_CheckStack() has been disabled on Win64, where it caused + test_sre to fail. + + Build issues + + - Changed compiler flags, so that gcc is always invoked with -Wall and + -Wstrict-prototypes. Users compiling Python with GCC should see + exactly one warning, except if they have passed configure the + --with-pydebug flag. The expect warning is for getopt() in + Modules/main.c. + + - Fixed configure to add -threads argument during linking on OSF1. + + Tools and other miscellany + + - The compiler in Tools/compiler was updated to support the new + language features introduced in 2.0: extended print statement, list + comprehensions, and augmented assignments. The new compiler should + also be backwards compatible with Python 1.5.2; the compiler will + always generate code for the version of the interpreter it runs + under. + What's new in 2.0 release candidate 1 (since beta 2)? ===================================================== *************** *** 29,33 **** All the changes since the last beta release are bug fixes or changes ! to build support for specific platforms. Core language, builtins, and interpreter --- 99,103 ---- All the changes since the last beta release are bug fixes or changes ! to support building Python for specific platforms. Core language, builtins, and interpreter *************** *** 56,64 **** methods in SRE, the standard regular expression engine. ! - In SRE, fix error with negative lookahead and lookbehind that manifested itself as a runtime error in patterns like "(? Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv6607/python/dist/src/misc Modified Files: NEWS Log Message: Filled in math-module info; fixed a typo or two. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -r1.77 -r1.78 *** NEWS 2000/10/16 20:08:38 1.77 --- NEWS 2000/10/16 20:24:53 1.78 *************** *** 29,34 **** - Restored support for HTTP/0.9 servers in httplib. ! - XXX The math module was changed to suppress underflow errors and ! just return 0. - Fixed a bug in StringIO that occurred when the file position was not --- 29,37 ---- - Restored support for HTTP/0.9 servers in httplib. ! - The math module was changed to stop raising OverflowError in case of ! underflow, and return 0 instead in underflow cases. Whether Python ! used to raise OverflowError in case of underflow was platform- ! dependent (it did when the platform math library set errno to ERANGE ! on underflow). - Fixed a bug in StringIO that occurred when the file position was not *************** *** 58,63 **** garbage but not freed by the garbage collector. ! - The regression test for the math module was changed to report ! exceptional behavior when the test is run in verbose mode. Internals --- 61,69 ---- garbage but not freed by the garbage collector. ! - The regression test for the math module was changed to test ! exceptional behavior when the test is run in verbose mode. Python ! cannot yet guarantee consistent exception behavior across platforms, ! so the exception part of test_math is run only in verbose mode, and ! may fail on your platform. Internals *************** *** 71,76 **** -Wstrict-prototypes. Users compiling Python with GCC should see exactly one warning, except if they have passed configure the ! --with-pydebug flag. The expect warning is for getopt() in ! Modules/main.c. - Fixed configure to add -threads argument during linking on OSF1. --- 77,82 ---- -Wstrict-prototypes. Users compiling Python with GCC should see exactly one warning, except if they have passed configure the ! --with-pydebug flag. The expected warning is for getopt() in ! Modules/main.c. This will warning will be fixed for Python 2.1. - Fixed configure to add -threads argument during linking on OSF1. From python-dev@python.org Mon Oct 16 21:27:28 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 16 Oct 2000 13:27:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.78,1.79 Message-ID: <200010162027.NAA10309@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv10236/Misc Modified Files: NEWS Log Message: Updated the XML package comment. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -r1.78 -r1.79 *** NEWS 2000/10/16 20:24:53 1.78 --- NEWS 2000/10/16 20:27:25 1.79 *************** *** 1,4 **** What's New in Python 2.0? ! =========================== Below is a list of all relevant changes since release 1.6. Older --- 1,4 ---- What's New in Python 2.0? ! ========================= Below is a list of all relevant changes since release 1.6. Older *************** *** 54,59 **** use both normcase() and normpath(). ! - XXX xml minidom, pulldom, expatreader, and saxutils changes (can't ! tell what happened from the CVS logs) - The regression test driver (regrtest.py) behavior when invoked with --- 54,59 ---- use both normcase() and normpath(). ! - xml minidom, pulldom, expatreader, and saxutils had some minor bug ! fixes. - The regression test driver (regrtest.py) behavior when invoked with From python-dev@python.org Mon Oct 16 21:32:32 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 13:32:32 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0001.txt,1.11,1.12 Message-ID: <200010162032.NAA14882@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv14259 Modified Files: pep-0001.txt Log Message: Revise guidelines for discussion of PEP before draft exists. The goal is to limit needless and uninformed discussion of an issue, not to prevent all discussion. Index: pep-0001.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0001.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** pep-0001.txt 2000/08/23 15:58:05 1.11 --- pep-0001.txt 2000/10/16 20:32:29 1.12 *************** *** 62,69 **** final arbitrator of the latter. ! Discussion concerning a PEP should initially be kept out of the ! python-dev and python-list mailing lists. Instead, comments ! should be sent to, and collected by, the PEP owner, who has the ! responsibility to incorporate these comments into the document. The authors of the PEP are then responsible for writing the PEP --- 62,69 ---- final arbitrator of the latter. ! In general, an initial draft of the PEP should be prepared before ! discussion occurs on the python-dev and pyton-list mailing lists. ! The author should incorporate comments and feedback into this ! initial draft when possible. The authors of the PEP are then responsible for writing the PEP From python-dev@python.org Mon Oct 16 21:41:41 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 13:41:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.79,1.80 Message-ID: <200010162041.NAA22943@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv22757/Misc Modified Files: NEWS Log Message: revise xml comment Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -r1.79 -r1.80 *** NEWS 2000/10/16 20:27:25 1.79 --- NEWS 2000/10/16 20:41:38 1.80 *************** *** 54,59 **** use both normcase() and normpath(). ! - xml minidom, pulldom, expatreader, and saxutils had some minor bug ! fixes. - The regression test driver (regrtest.py) behavior when invoked with --- 54,59 ---- use both normcase() and normpath(). ! - Several minor bugs were fixed in the xml package (the minidom, ! pulldom, expatreader, and saxutils modules). - The regression test driver (regrtest.py) behavior when invoked with From python-dev@python.org Mon Oct 16 21:51:37 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 16 Oct 2000 13:51:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.80,1.81 Message-ID: <200010162051.NAA29535@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv29324/python/dist/src/misc Modified Files: NEWS Log Message: Typo repair. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -r1.80 -r1.81 *** NEWS 2000/10/16 20:41:38 1.80 --- NEWS 2000/10/16 20:51:33 1.81 *************** *** 78,82 **** exactly one warning, except if they have passed configure the --with-pydebug flag. The expected warning is for getopt() in ! Modules/main.c. This will warning will be fixed for Python 2.1. - Fixed configure to add -threads argument during linking on OSF1. --- 78,82 ---- exactly one warning, except if they have passed configure the --with-pydebug flag. The expected warning is for getopt() in ! Modules/main.c. This warning will be fixed for Python 2.1. - Fixed configure to add -threads argument during linking on OSF1. From python-dev@python.org Mon Oct 16 22:24:53 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 16 Oct 2000 14:24:53 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0226.txt,NONE,1.1 Message-ID: <200010162124.OAA24850@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv24816 Added Files: pep-0226.txt Log Message: PEP 226, Python 2.1 Release Schedule, Jeremy Hylton --- NEW FILE --- PEP: 226 Title: Python 2.1 Release Schedule Version: $Revision: 1.1 $ Author: Jeremy Hylton Status: Incomplete Type: Informational Created: 16-Oct-2000 Python-Version: 2.1 Post-History: Abstract This document describes the post Python 2.0 development and release schedule. According to this schedule, Python 2.1 will be released in mid-March of 2001. The schedule primarily concerns itself with PEP-size items. Small bug fixes and changes will occur up until the first beta release. Tentative Release Schedule 16-Oct-2000: Python 2.0 final release These dates represent goals, not commitments. 16-Dec-2000: 2.1 PEPs ready for review 01-Feb-2001: First 2.1 beta release 16-Mar-2001: 2.1 final release Guidelines for making changes for Python 2.1 The guidelines and schedule will be revised based on discussion in the python-dev@python.org mailing list. The PEP system was instituted late in the Python 2.0 development cycle and many changes did not follow the process described in PEP 1. The development process for 2.1, however, will follow the PEP process as documented. The first eight weeks following 2.0 final will be the design and review phase. By the end of this period, any PEP that is proposed for 2.1 should be ready for review. This means that the PEP is written and discussion has occurred on the python-dev@python.org and python-list@python.org mailing lists. The next six weeks will be spent reviewing the PEPs and implementing and testing the accepted PEPs. When this period stops, we will end consideration of any incomplete PEPs. Near the end of this period, there will be a feature freeze where any small features not worthy of a PEP will not be accepted. Before the final release, we will have six weeks of beta testing and a release candidate or two. Bug fix releases before 2.1 We may have to issue Python 2.0.1 for critical bug fixes. If we need to issue a bug fix release, we will use a CVS branch. General guidelines for submitting patches and making changes Use good sense when committing changes. You should know what we mean by good sense or we wouldn't have given you commit privileges <0.5 wink>. Some specific examples of good sense include: - Do whatever the dictator tells you. - Discuss any controversial changes on python-dev first. If you get a lot of +1 votes and no -1 votes, make the change. If you get a some -1 votes, think twice; consider asking Guido what he thinks. - If the change is to code you contributed, it probably makes sense for you to fix it. - If the change affects code someone else wrote, it probably makes sense to ask him or her first. - You can use the SourceForge (SF) Patch Manager to submit a patch and assign it to someone for review. Any significant new feature must be described in a PEP and approved before it is checked in. Any significant code addition, such as a new module or large patch, must include test cases for the regression test and documentation. A patch should not be checked in until the tests and documentation are ready. If you fix a bug, you should write a test case that would have caught the bug. If you commit a patch from the SF Patch Manager or fix a bug from the Jitterbug database, be sure to reference the patch/bug number in the CVS log message. Also be sure to change the status in the patch manager or bug database (if you have access to the bug database). It is not acceptable for any checked in code to cause the regression test to fail. If a checkin causes a failure, it must be fixed within 24 hours or it will be backed out. All contributed C code must be ANSI C. If possible check it with two different compilers, e.g. gcc and MSVC. All contributed Python code must follow Guido's Python style guide. http://www.python.org/doc/essays/styleguide.html It is understood that any code contributed will be released under an Open Source license. Do not contribute code if it can't be released this way. Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Mon Oct 16 22:25:38 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 16 Oct 2000 14:25:38 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.36,1.37 Message-ID: <200010162125.OAA24930@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv24917 Modified Files: pep-0000.txt Log Message: PEP 226, Python 2.1 Release Schedule, Jeremy Hylton Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** pep-0000.txt 2000/10/04 22:40:04 1.36 --- pep-0000.txt 2000/10/16 21:25:34 1.37 *************** *** 54,57 **** --- 54,59 ---- S 224 pep-0224.txt Attribute Docstrings Lemburg SD 225 pep-0225.txt Elementwise/Objectwise Operators Zhu, Lielens + I 226 pep-0226.txt Python 2.1 Release Schedule Hylton + Key From python-dev@python.org Tue Oct 17 05:58:04 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 16 Oct 2000 21:58:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libarray.tex,1.25,1.26 Message-ID: <200010170458.VAA20943@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20934/lib Modified Files: libarray.tex Log Message: Update the links to the NumPy website and documentation, based on a comment from Janko Hauser . Index: libarray.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libarray.tex,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** libarray.tex 2000/07/31 20:52:21 1.25 --- libarray.tex 2000/10/17 04:58:01 1.26 *************** *** 188,196 **** \seemodule{struct}{packing and unpacking of heterogeneous binary data} \seemodule{xdrlib}{packing and unpacking of XDR data} ! \seetext{The Numeric Python extension (NumPy) defines another array ! type; see \emph{The Numerical Python Manual} for additional ! information (available online at ! \url{ftp://ftp-icf.llnl.gov/pub/python/numericalpython.pdf}). ! Further information about NumPy is available at ! \url{http://www.python.org/topics/scicomp/numpy.html}.} \end{seealso} --- 188,195 ---- \seemodule{struct}{packing and unpacking of heterogeneous binary data} \seemodule{xdrlib}{packing and unpacking of XDR data} ! \seetitle[http://numpy.sourceforge.net/numdoc/numdoc.pdf]{The ! Numerical Python Manual}{The Numeric Python extension ! (NumPy) defines another array type; see ! \url{http://numpy.sourceforge.net/} for further information ! about Numerical Python.} \end{seealso} From python-dev@python.org Wed Oct 18 02:21:43 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 17 Oct 2000 18:21:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_fcntl.py,1.11,1.12 Message-ID: <200010180121.SAA21358@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv21348/Lib/test Modified Files: test_fcntl.py Log Message: Use test_support.TESTFN as the temporary filename. Fix a minor stylistic nit. This closes SourceForge bug #117032. Index: test_fcntl.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_fcntl.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** test_fcntl.py 2000/10/12 16:01:55 1.11 --- test_fcntl.py 2000/10/18 01:21:38 1.12 *************** *** 7,16 **** import FCNTL import os, sys ! from test_support import verbose ! filename = '/tmp/delete-me' # the example from the library docs ! f = open(filename,'w') rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETFL, os.O_NONBLOCK) if verbose: --- 7,16 ---- import FCNTL import os, sys ! from test_support import verbose, TESTFN ! filename = TESTFN # the example from the library docs ! f = open(filename, 'w') rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETFL, os.O_NONBLOCK) if verbose: From python-dev@python.org Wed Oct 18 17:00:46 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 09:00:46 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html index.html,1.6,1.7 Message-ID: <200010181600.JAA30662@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv30651 Modified Files: index.html Log Message: Point link to development version of the docs to python.sourceforge.net. Clean up the presentation a little bit. Index: index.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/index.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** index.html 2000/10/09 19:21:06 1.6 --- index.html 2000/10/18 16:00:44 1.7 *************** *** 4,8 **** ! Python Sites --- 4,8 ---- ! Python @ SourceForge *************** *** 11,32 **** alink="#FF0000">

    PythonatSourceForge

    ! Python Project Page - ! CVS repository,  Python Developers and the Patch Manager.
    ! Python Enhancement Proposals - Information on new language ! features
    ! Python at SourceForge FAQ - Tips on CVS, SSH and ! patch submission

    External links

    Python Language Website - Documentation, Downloads, News and lots of other resources for the Python language.
    ! Development ! version of the documentation - Straight from Fred's working files.
    PythonLabs.com - Python's core development team and its plans for Python development.
    !   --- 11,48 ---- alink="#FF0000">

    Python at SourceForge

    ! +

    External links

    + +
      +
    • Python Language Website - Documentation, Downloads, News and lots of other resources for the Python language.
      ! !
    • PythonLabs.com - Python's core development team and its plans for Python development.
      !
    ! ! From python-dev@python.org Wed Oct 18 17:48:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 09:48:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libpickle.tex,1.27,1.28 Message-ID: <200010181648.JAA02589@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2574/lib Modified Files: libpickle.tex Log Message: Capitalize & use periods for \seemodule explanation parameter. Index: libpickle.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** libpickle.tex 2000/07/16 19:01:10 1.27 --- libpickle.tex 2000/10/18 16:47:52 1.28 *************** *** 283,294 **** \begin{seealso} ! \seemodule[copyreg]{copy_reg}{pickle interface constructor ! registration} ! \seemodule{shelve}{indexed databases of objects; uses \module{pickle}} ! \seemodule{copy}{shallow and deep object copying} ! \seemodule{marshal}{high-performance serialization of built-in types} \end{seealso} --- 283,294 ---- \begin{seealso} ! \seemodule[copyreg]{copy_reg}{Pickle interface constructor ! registration for extension types.} ! \seemodule{shelve}{Indexed databases of objects; uses \module{pickle}.} ! \seemodule{copy}{Shallow and deep object copying.} ! \seemodule{marshal}{High-performance serialization of built-in types.} \end{seealso} From python-dev@python.org Wed Oct 18 18:43:09 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 10:43:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libarray.tex,1.26,1.27 libbase64.tex,1.15,1.16 libbinhex.tex,1.7,1.8 libgzip.tex,1.12,1.13 librand.tex,1.10,1.11 libsymbol.tex,1.7,1.8 libtoken.tex,1.7,1.8 libuser.tex,1.15,1.16 libuu.tex,1.9,1.10 libzlib.tex,1.22,1.23 Message-ID: <200010181743.KAA23015@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv22844 Modified Files: libarray.tex libbase64.tex libbinhex.tex libgzip.tex librand.tex libsymbol.tex libtoken.tex libuser.tex libuu.tex libzlib.tex Log Message: Make all the \seemodule explanations consistent: start with a capitalized letter and end with proper punctuation. "Documenting Python" will be updated accordingly so that this will be editorial policy for the Python documentation. Index: libarray.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libarray.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** libarray.tex 2000/10/17 04:58:01 1.26 --- libarray.tex 2000/10/18 17:43:06 1.27 *************** *** 186,191 **** \begin{seealso} ! \seemodule{struct}{packing and unpacking of heterogeneous binary data} ! \seemodule{xdrlib}{packing and unpacking of XDR data} \seetitle[http://numpy.sourceforge.net/numdoc/numdoc.pdf]{The Numerical Python Manual}{The Numeric Python extension --- 186,193 ---- \begin{seealso} ! \seemodule{struct}{Packing and unpacking of heterogeneous binary data.} ! \seemodule{xdrlib}{Packing and unpacking of External Data ! Representation (XDR) data as used in some remote ! procedure call systems.} \seetitle[http://numpy.sourceforge.net/numdoc/numdoc.pdf]{The Numerical Python Manual}{The Numeric Python extension Index: libbase64.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbase64.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libbase64.tex 2000/04/03 20:13:52 1.15 --- libbase64.tex 2000/10/18 17:43:06 1.16 *************** *** 51,56 **** \begin{seealso} ! \seemodule{binascii}{support module containing \ASCII{}-to-binary ! and binary-to-\ASCII{} conversions} \seetext{Internet \rfc{1521}, \emph{MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and --- 51,56 ---- \begin{seealso} ! \seemodule{binascii}{Support module containing \ASCII{}-to-binary ! and binary-to-\ASCII{} conversions.} \seetext{Internet \rfc{1521}, \emph{MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Index: libbinhex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbinhex.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libbinhex.tex 1999/04/23 15:41:53 1.7 --- libbinhex.tex 2000/10/18 17:43:06 1.8 *************** *** 30,35 **** \begin{seealso} ! \seemodule{binascii}{support module containing \ASCII{}-to-binary ! and binary-to-\ASCII{} conversions} \end{seealso} --- 30,35 ---- \begin{seealso} ! \seemodule{binascii}{Support module containing \ASCII-to-binary ! and binary-to-\ASCII{} conversions.} \end{seealso} Index: libgzip.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgzip.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libgzip.tex 1999/04/05 19:00:54 1.12 --- libgzip.tex 2000/10/18 17:43:06 1.13 *************** *** 66,69 **** \begin{seealso} ! \seemodule{zlib}{the basic data compression module} \end{seealso} --- 66,70 ---- \begin{seealso} ! \seemodule{zlib}{The basic data compression module needed to support ! the \program{gzip} file format.} \end{seealso} Index: librand.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librand.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** librand.tex 1998/08/10 19:42:10 1.10 --- librand.tex 2000/10/18 17:43:06 1.11 *************** *** 27,31 **** \begin{seealso} ! \seemodule{whrandom}{the standard Python random number generator} \end{seealso} - --- 27,31 ---- \begin{seealso} ! \seemodule{random}{Python's interface to random number generators.} ! \seemodule{whrandom}{The random number generator used by default.} \end{seealso} Index: libsymbol.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsymbol.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libsymbol.tex 2000/07/16 19:01:10 1.7 --- libsymbol.tex 2000/10/18 17:43:06 1.8 *************** *** 17,28 **** - \begin{datadesc}{sym_name} ! Dictionary mapping the numeric values of the constants defined in this ! module back to name strings, allowing more human-readable ! representation of parse trees to be generated. \end{datadesc} \begin{seealso} ! \seemodule{parser}{second example uses this module} \end{seealso} --- 17,30 ---- \begin{datadesc}{sym_name} ! Dictionary mapping the numeric values of the constants defined in ! this module back to name strings, allowing more human-readable ! representation of parse trees to be generated. \end{datadesc} + \begin{seealso} ! \seemodule{parser}{The second example for the \refmodule{parser} ! module shows how to use the \module{symbol} ! module.} \end{seealso} Index: libtoken.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtoken.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libtoken.tex 2000/07/16 19:01:10 1.7 --- libtoken.tex 2000/10/18 17:43:06 1.8 *************** *** 37,41 **** \end{funcdesc} \begin{seealso} ! \seemodule{parser}{second example uses this module} \end{seealso} --- 37,44 ---- \end{funcdesc} + \begin{seealso} ! \seemodule{parser}{The second example for the \refmodule{parser} ! module shows how to use the \module{symbol} ! module.} \end{seealso} Index: libuser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuser.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libuser.tex 2000/07/16 19:01:10 1.15 --- libuser.tex 2000/10/18 17:43:06 1.16 *************** *** 66,70 **** \begin{seealso} ! \seemodule{site}{site-wide customization mechanism} ! \refstmodindex{site} \end{seealso} --- 66,69 ---- \begin{seealso} ! \seemodule{site}{Site-wide customization mechanism.} \end{seealso} Index: libuu.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuu.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** libuu.tex 1999/04/23 15:57:23 1.9 --- libuu.tex 2000/10/18 17:43:06 1.10 *************** *** 40,44 **** \begin{seealso} ! \seemodule{binascii}{support module containing \ASCII{}-to-binary ! and binary-to-\ASCII{} conversions} \end{seealso} --- 40,44 ---- \begin{seealso} ! \seemodule{binascii}{Support module containing \ASCII-to-binary ! and binary-to-\ASCII{} conversions.} \end{seealso} Index: libzlib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzlib.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** libzlib.tex 2000/09/16 06:18:26 1.22 --- libzlib.tex 2000/10/18 17:43:06 1.23 *************** *** 149,153 **** \begin{seealso} ! \seemodule{gzip}{reading and writing \program{gzip}-format files} \seeurl{http://www.info-zip.org/pub/infozip/zlib/}{The zlib library home page.} --- 149,153 ---- \begin{seealso} ! \seemodule{gzip}{Reading and writing \program{gzip}-format files.} \seeurl{http://www.info-zip.org/pub/infozip/zlib/}{The zlib library home page.} From python-dev@python.org Thu Oct 19 00:08:16 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 18 Oct 2000 16:08:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.58,1.59 Message-ID: <200010182308.QAA01012@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv961 Modified Files: libre.tex Log Message: Document the .lastindex and .lastgroup attributes of MatchObject Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -r1.58 -r1.59 *** libre.tex 2000/10/10 22:00:03 1.58 --- libre.tex 2000/10/18 23:08:13 1.59 *************** *** 734,737 **** --- 734,747 ---- \end{memberdesc} + \begin{memberdesc}[MatchObject]{lastgroup} + The name of the last matched capturing group, or \code{None} if the + group didn't have a name, or if no group was matched at all. + \end{memberdesc} + + \begin{memberdesc}[MatchObject]{lastindex} + The integer index of the last matched capturing group, or \code{None} + if no group was matched at all. + \end{memberdesc} + \begin{memberdesc}[MatchObject]{re} The regular expression object whose \method{match()} or From python-dev@python.org Thu Oct 19 06:33:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 22:33:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.52,1.53 Message-ID: <200010190533.WAA32191@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv32098/lib Modified Files: libos.tex Log Message: Capitalize first letter of an explanation for a \versionchanged annotation. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** libos.tex 2000/10/14 05:46:11 1.52 --- libos.tex 2000/10/19 05:33:46 1.53 *************** *** 786,790 **** 2-tuple of numbers, of the form \code{(\var{atime}, \var{mtime})} which is used to set the access and modified times, respectively. ! \versionchanged[added support for \code{None} for \var{times}]{2.0} Availability: Macintosh, \UNIX{}, Windows. \end{funcdesc} --- 786,790 ---- 2-tuple of numbers, of the form \code{(\var{atime}, \var{mtime})} which is used to set the access and modified times, respectively. ! \versionchanged[Added support for \code{None} for \var{times}]{2.0} Availability: Macintosh, \UNIX{}, Windows. \end{funcdesc} From python-dev@python.org Thu Oct 19 06:36:13 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 22:36:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/doc doc.tex,1.33,1.34 Message-ID: <200010190536.WAA32261@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv32251/doc Modified Files: doc.tex Log Message: Revise the capitalization policy of \versionchanged explanation; the explanation must now be capitalized. This is more consistent with the \see* explanation fields. Added a lot of material to the "LaTeX Primer" section. Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** doc.tex 2000/09/21 15:58:01 1.33 --- doc.tex 2000/10/19 05:36:10 1.34 *************** *** 192,201 **** The document body follows the preamble. This contains all the ! printed components of the document marked up structurally. ! XXX This section will discuss what the markup looks like, and ! explain the difference between an environment and a macro. \section{Document Classes \label{classes}} --- 192,318 ---- The document body follows the preamble. This contains all the ! printed components of the document marked up structurally. Generic ! \LaTeX{} structures include hierarchical sections ! \subsection{Syntax} + There are only a things that an author of Python documentation + needs to know about \LaTeX{} syntax. + A \dfn{comment} is started by the ``percent'' character + (\character{\%}) and continues through the end of the line and all + leading whitespace on the following line. This is a little + different from any programming language I know of, so an example + is in order: + + \begin{verbatim} + This is text.% comment + This is more text. % another comment + Still more text. + \end{verbatim} + + The first non-comment character following the first comment is the + letter \character{T} on the second line; the leading whitespace on + that line is consumed as part of the first comment. This means + that there is no space between the first and second sentences, so + the period and letter \character{T} will be directly adjacent in + the typeset document. + + Note also that though the first non-comment character after the + second comment is the letter \character{S}, there is whitespace + preceding the comment, so the two sentences are separated as + expected. + + A \dfn{group} is an enclosure for a collection of text and + commands which encloses the formatting context and constrains the + scope of any changes to that context made by commands within the + group. Groups can be nested hierarchically. The formatting + context includes the font and the definition of additional macros + (or overrides of macros defined in outer groups). Syntactically, + groups are enclosed in braces: + + \begin{verbatim} + {text in a group} + \end{verbatim} + + An alternate syntax for a group using brackets (\code{\{...\}}) is + used by macros and environment constructors which take optional + parameters; brackets do not normally hold syntactic significance. + A degenerate group, containing only one atomic bit of content, + does not need to have an explicit group, unless it is required to + avoid ambiguity. Since Python tends toward the explicit, groups + are also made explicit in the documentation markup. + + Groups are used only sparingly in the Python documentation, except + for their use in marking parameters to macros and environments. + + A \dfn{macro} is usually simple construct which is identified by + name and can take some number of parameters. In normal \LaTeX{} + usage, one of these can be optional. The markup is introduced + using the backslash character (\character{\e}), and the name is + given by alphabetic characters (no digits, hyphens, or + underscores). Required parameters should be marked as a group, + and optional parameters should be marked using the alternate + syntax for a group. + + For example, a macro named ``foo'' which takes a single parameter + would appear like this: + + \begin{verbatim} + \name{parameter} + \end{verbatim} + + A macro which takes an optional parameter would be typed like this + when the optional paramter is given: + + \begin{verbatim} + \name[optional] + \end{verbatim} + + If both optional and required parameters are to be required, it + looks like this: + + \begin{verbatim} + \name[optional]{required} + \end{verbatim} + + A macro name may be followed by a space or newline; a space + between the macro name and any parameters will be consumed, but + this usage is not practiced in the Python documentation. Such a + space is still consumed if there are no parameters to the marco, + in which case inserting an empty group (\code{\{\}}) or explicit + word space (\samp{\e\ }) immediately after the macro name helps to + avoid running the expansion of the macro into the following text. + Macros which take no parameters but which should not be followed + by a word space do not need special treatment if the following + character in the document source if not a name character (such as + puctuation). + + Each line of this example shows an appropriate way to write text + which includes a macro which takes no parameters: + + \begin{verbatim} + This \UNIX{} is followed by a space. + This \UNIX\ is also followed by a space. + \UNIX, followed by a comma, needs no additional markup. + \end{verbatim} + + An \dfn{environment} is ... + + There are a number of less-used marks in \LaTeX{} are used to + enter non-\ASCII{} characters, especially those used in European + names. Some which are found in the Python documentation are: + + XXX Table of Latin-1 characters that we've actually used in the + Python documentation, pointer to other, more complete + documentation elsewhere. + + + \subsection{Hierarchical Structure} + + XXX Talk about the traditional sectional hierarchy and how it's + marked in \LaTeX. + + \section{Document Classes \label{classes}} *************** *** 391,395 **** Representing an interactive session requires including the prompts and output along with the Python code. No special markup is ! required for interactive sessions. Within the \env{verbatim} environment, characters special to --- 508,520 ---- Representing an interactive session requires including the prompts and output along with the Python code. No special markup is ! required for interactive sessions. After the last line of input ! or output presented, there should not be an ``unused'' primary ! prompt; this is an example of what \emph{not} to do: ! ! \begin{verbatim} ! >>> 1 + 1 ! 2 ! >>> ! \end{verbatim} Within the \env{verbatim} environment, characters special to *************** *** 397,401 **** example will be presented in a monospaced font; no attempt at ``pretty-printing'' is made, as the environment must work for ! non-Python code and non-code displays. The Python Documentation Special Interest Group has discussed a --- 522,527 ---- example will be presented in a monospaced font; no attempt at ``pretty-printing'' is made, as the environment must work for ! non-Python code and non-code displays. There should be no blank ! lines at the top or bottom of any \env{verbatim} display. The Python Documentation Special Interest Group has discussed a *************** *** 657,661 **** some way (new parameters, changed side effects, etc.). \var{explanation} should be a \emph{brief} explanation of the ! change consisting of a non-capitalized sentence fragment; a period will be appended by the formatting process. This is typically added to the end of the first paragraph of the --- 783,787 ---- some way (new parameters, changed side effects, etc.). \var{explanation} should be a \emph{brief} explanation of the ! change consisting of a capitalized sentence fragment; a period will be appended by the formatting process. This is typically added to the end of the first paragraph of the From python-dev@python.org Thu Oct 19 06:54:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 22:54:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools push-docs.sh,NONE,1.1 update-docs.sh,NONE,1.1 Message-ID: <200010190554.WAA00911@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv902 Added Files: push-docs.sh update-docs.sh Log Message: Helper scripts used in published the "development" snapshots of the Python documentation. --- NEW FILE --- #! /bin/sh # Script to push docs from my development area to SourceForge, where the # update-docs.sh script unpacks them into their final destination. START="`pwd`" MYDIR="`dirname $0`" cd "$MYDIR" MYDIR="`pwd`" HTMLDIR="${HTMLDIR:-html}" cd "../$HTMLDIR" make --no-print-directory || exit $? RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'` make --no-print-directory HTMLDIR="$HTMLDIR" bziphtml scp "html-$RELEASE.tar.bz2" python.sourceforge.net:/home/users/fdrake/python-docs-update.tar.bz2 --- NEW FILE --- #! /bin/sh # Script which determines if a new development snapshot of the # documentation is available, and unpacks it into the "Python @ # SourceForge" website. # # A copy of this script is run periodically via cron. if [ -z "$HOME" ] ; then HOME=`grep fdrake /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'` export HOME fi UPDATES=/home/users/fdrake/python-docs-update.tar.bz2 if [ -f "$UPDATES" ] ; then cd /home/groups/python/htdocs rm -rf devel-docs || exit $? mkdir devel-docs || exit $? cd devel-docs || exit $? (bzip2 -dc "$UPDATES" | tar xf -) || exit $? rm "$UPDATES" || exit $? Mail -s '[online doc updates]' fdrake@acm.org < Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv1052 Modified Files: ACKS Log Message: Two more names. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ACKS 2000/10/14 04:47:53 1.5 --- ACKS 2000/10/19 05:58:03 1.6 *************** *** 53,56 **** --- 53,57 ---- Manus Hand Travis B. Hartwell + Janko Hauser Bernhard Herzog Magnus L. Hetland *************** *** 93,96 **** --- 94,98 ---- Vincent Marchetti Aahz Maruch + Laura Matson Doug Mennella Paolo Milani From python-dev@python.org Thu Oct 19 08:36:31 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Thu, 19 Oct 2000 00:36:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.18,1.19 Message-ID: <200010190736.AAA07087@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv7072 Modified Files: expatreader.py Log Message: Fixed a bug that caused namespace names to be reported as lists rather than tuples. Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** expatreader.py 2000/10/14 10:28:01 1.18 --- expatreader.py 2000/10/19 07:36:29 1.19 *************** *** 146,149 **** --- 146,151 ---- if len(pair) == 1: pair = (None, name) + else: + pair = tuple(pair) newattrs = {} From python-dev@python.org Thu Oct 19 14:25:18 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 19 Oct 2000 06:25:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.203,1.204 Message-ID: <200010191325.GAA12639@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv12516 Modified Files: Makefile Log Message: Remove the bzip2 archives from the "distfiles" target. There are not enough downloads to keep this around. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.203 retrieving revision 1.204 diff -C2 -r1.203 -r1.204 *** Makefile 2000/10/13 15:35:26 1.203 --- Makefile 2000/10/19 13:25:15 1.204 *************** *** 328,333 **** bzips: bzippdf bzipps bziphtml ! distfiles: tarballs zips bzips ! $(TOOLSDIR)/mksourcepkg --all $(RELEASE) --- 328,333 ---- bzips: bzippdf bzipps bziphtml ! distfiles: tarballs zips ! $(TOOLSDIR)/mksourcepkg --zip --gzip $(RELEASE) From python-dev@python.org Fri Oct 20 04:03:21 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 19 Oct 2000 20:03:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.118,1.119 Message-ID: <200010200303.UAA14056@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory slayer.i.sourceforge.net:/tmp/cvs-serv13833/tut Modified Files: tut.tex Log Message: Update the display of some floating point values at the interactive prompt to reflect current behavior. This closes SourceForge bug #117305. Made a reference to the library reference a hyperlink. Fixed some minor markup nits. Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -r1.118 -r1.119 *** tut.tex 2000/09/29 15:17:36 1.118 --- tut.tex 2000/10/20 03:03:18 1.119 *************** *** 1047,1052 **** % Weird spacings happen here if the wrapping of the source text % gets changed in the wrong way. ! is a substitute for the \emph{switch} or ! \emph{case} statements found in other languages. --- 1047,1052 ---- % Weird spacings happen here if the wrapping of the source text % gets changed in the wrong way. ! is a substitute for the \keyword{switch} or ! \keyword{case} statements found in other languages. *************** *** 2601,2605 **** >>> ps = repr(p) >>> ps ! '[31.4, 40000]' >>> # Converting a string adds string quotes and backslashes: ... hello = 'hello, world\n' --- 2601,2605 ---- >>> ps = repr(p) >>> ps ! '[31.400000000000002, 40000]' >>> # Converting a string adds string quotes and backslashes: ... hello = 'hello, world\n' *************** *** 2609,2613 **** >>> # The argument of reverse quotes may be a tuple: ... `x, y, ('spam', 'eggs')` ! "(31.4, 40000, ('spam', 'eggs'))" \end{verbatim} --- 2609,2613 ---- >>> # The argument of reverse quotes may be a tuple: ... `x, y, ('spam', 'eggs')` ! "(31.400000000000002, 40000, ('spam', 'eggs'))" \end{verbatim} *************** *** 2968,2973 **** it will not display lines read from standard input. ! The \emph{Python Library Reference} lists the built-in exceptions and ! their meanings. --- 2968,2973 ---- it will not display lines read from standard input. ! The \citetitle[../lib/module-exceptions.html]{Python Library ! Reference} lists the built-in exceptions and their meanings. From python-dev@python.org Fri Oct 20 21:02:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 20 Oct 2000 13:02:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules threadmodule.c,2.39,2.40 Message-ID: <200010202002.NAA28215@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28124 Modified Files: threadmodule.c Log Message: t_bootstram(): Use PySys_WriteStderr() instead of fprintf(stderr,...). This closes bug #117324. Index: threadmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** threadmodule.c 2000/09/01 23:29:27 2.39 --- threadmodule.c 2000/10/20 20:02:37 2.40 *************** *** 198,202 **** PyErr_Clear(); else { ! fprintf(stderr, "Unhandled exception in thread:\n"); PyErr_PrintEx(0); } --- 198,202 ---- PyErr_Clear(); else { ! PySys_WriteStderr("Unhandled exception in thread:\n"); PyErr_PrintEx(0); } From python-dev@python.org Fri Oct 20 21:51:34 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 20 Oct 2000 13:51:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/doc doc.tex,1.34,1.35 Message-ID: <200010202051.NAA21980@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv21845/doc Modified Files: doc.tex Log Message: Flesh out the "LaTeX Primer" some more. Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** doc.tex 2000/10/19 05:36:10 1.34 --- doc.tex 2000/10/20 20:51:31 1.35 *************** *** 298,316 **** \end{verbatim} ! An \dfn{environment} is ... There are a number of less-used marks in \LaTeX{} are used to enter non-\ASCII{} characters, especially those used in European ! names. Some which are found in the Python documentation are: ! XXX Table of Latin-1 characters that we've actually used in the ! Python documentation, pointer to other, more complete ! documentation elsewhere. \subsection{Hierarchical Structure} ! XXX Talk about the traditional sectional hierarchy and how it's ! marked in \LaTeX. --- 298,383 ---- \end{verbatim} ! An \dfn{environment} is a larger construct than a macro, and can ! be used for things with more content that would conveniently fit ! in a macro parameter. They are primarily used when formatting ! parameters need to be changed before and after a large chunk of ! content, but the content itself needs to be highly flexible. Code ! samples are presented using an environment, and descriptions of ! functions, methods, and classes are also marked using envionments. + Since the content of an environment is free-form and can consist + of several paragraphs, they are actually marked using a pair of + macros: \macro{begin} and \macro{end}. These macros both take the + name of the environment as a parameter. An example is the + environment used to mark the abstract of a document: + + \begin{verbatim} + \begin{abstract} + This is the text of the abstract. It concisely explains what + information is found in the document. + + It can consist of multiple paragraphs. + \end{abstract} + \end{verbatim} + + An environment can also have required and optional parameters of + its own. These follow the parameter of the \macro{begin} macro. + This example shows an environment which takes a single required + parameter: + + \begin{verbatim} + \begin{datadesc}{datadesc}{controlnames} + A 33-element string array that contains the \ASCII{} mnemonics for + the thirty-two \ASCII{} control characters from 0 (NUL) to 0x1f + (US), in order, plus the mnemonic \samp{SP} for the space character. + \end{datadesc} + \end{verbatim} + There are a number of less-used marks in \LaTeX{} are used to enter non-\ASCII{} characters, especially those used in European ! names. Given that these are often used adjacent to other ! characters, the markup required to produce the proper character ! may need to be followed by a space or an empty group, or the the ! markup can be enclosed in a group. Some which are found in Python ! documentation are: ! \begin{tableii}{c|l}{textrm}{Character}{Markup} ! \lineii{\c c}{\code{\e c c}} ! \lineii{\"o}{\code{\e"o}} ! \lineii{\o}{\code{\e o}} ! \end{tableii} \subsection{Hierarchical Structure} + + \LaTeX{} expects documents to be arranged in a conventional, + hierarchical way, with chapters, sections, sub-sections, + appendixes, and the like. These are marked using macros rather + than environments, probably because the end of a section can be + safely inferred when a section of equal or higher level starts. + + There are six ``levels'' of sectioning in the document classes + used for Python documentation, and the lowest two levels are not + used. The levels are: + + \begin{tableiii}{c|l|c}{textrm}{Level}{Macro Name}{Notes} + \lineiii{1}{\macro{chapter}}{(1)} + \lineiii{2}{\macro{section}}{} + \lineiii{3}{\macro{subsection}}{} + \lineiii{4}{\macro{subsubsections}}{} + \lineiii{5}{\macro{paragraph}}{(2)} + \lineiii{6}{\macro{subparagraph}}{} + \end{tableiii} + + \noindent + Notes: ! \begin{description} ! \item[(1)] ! Only used for the \code{manual} documents, as described in ! section \ref{classes}, ``Document Classes.'' ! \item[(2)] ! Not the same as a paragraph of text; nobody seems to use this. ! \end{description} From python-dev@python.org Thu Oct 26 00:08:51 2000 From: python-dev@python.org (Fred L. Drake, Jr.) Date: Wed, 25 Oct 2000 19:08:51 -0400 (EDT) Subject: [Python-checkins] SourceForge problems Message-ID: <14839.26627.968974.44752@cj42289-a.reston1.va.home.com> Presumably everyone on this list has noticed that its been quiet lately. ;) SourceForge is having some problems with mail delivery, and we're not entirely sure what the problem is. But check-in messages don't seem to be getting sent for some reason; they might be queued up somewhere or they may be lost. At any rate, there has been activity in the source tree; you just might want to do a CVS update to see what's changed. There have been a number of bug fixes, a fair number of documentation updates, and many of the modules in the standard library have been passed through Tim Peter's reindent.py script (look in Tools/scripts/). -Fred -- Fred L. Drake, Jr. PythonLabs Team Member From python-dev@python.org Sat Oct 28 11:43:05 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 28 Oct 2000 12:43:05 +0200 Subject: [Python-checkins] SourceForge problems References: <14839.26627.968974.44752@cj42289-a.reston1.va.home.com> Message-ID: <012e01c040cb$dc501b30$3c6340d5@hagrid> fred wrote: > At any rate, there has been activity in the source tree; you just > might want to do a CVS update to see what's changed. There have been > a number of bug fixes, a fair number of documentation updates, and > many of the modules in the standard library have been passed through > Tim Peter's reindent.py script (look in Tools/scripts/). now that this has been done, emacs users might want to add something like the following to their local configuration (based on code by jwz, so it should work...) ::: (defun python-mode-untabify () (save-excursion (goto-char (point-min)) (while (re-search-forward "[ \t]+$" nil t) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) (if (search-forward "\t" nil t) (untabify (1- (point)) (point-max)))) nil) (add-hook 'python-mode-hook '(lambda () (make-local-variable 'write-contents-hooks) (add-hook 'write-contents-hooks 'python-mode-untabify))) From python-dev@python.org Mon Oct 30 17:15:22 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 30 Oct 2000 09:15:22 -0800 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.212,2.213 Message-ID: <200010301715.JAA32564@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv32349/Python Modified Files: ceval.c Log Message: Fix for SF bug #117241 When a method is called with no regular arguments and * args, defer the first arg is subclass check until after the * args have been expanded. N.B. The CALL_FUNCTION implementation is getting really hairy; should review it to see if it can be simplified. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.212 retrieving revision 2.213 diff -C2 -r2.212 -r2.213 *** ceval.c 2000/10/24 19:57:45 2.212 --- ceval.c 2000/10/30 17:15:19 2.213 *************** *** 1823,1827 **** n++; } ! else { /* Unbound methods must be called with an instance of the class (or a derived --- 1823,1827 ---- n++; } ! else if (!((flags & 1) && na == 0)) { /* Unbound methods must be called with an instance of the class (or a derived *************** *** 1895,1898 **** --- 1895,1912 ---- if (nstar < 0) { goto extcall_fail; + } + if (class && self == NULL && na == 0) { + /* * arg is first argument of method, + so check it is isinstance of class */ + self = PyTuple_GET_ITEM(stararg, 0); + if (!(PyInstance_Check(self) && + PyClass_IsSubclass((PyObject *) + (((PyInstanceObject *)self)->in_class), + class))) { + PyErr_SetString(PyExc_TypeError, + "unbound method must be called with instance as first argument"); + x = NULL; + break; + } } } From python-dev@python.org Mon Oct 30 17:15:22 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 30 Oct 2000 09:15:22 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_extcall.py,1.6,1.7 Message-ID: <200010301715.JAA32568@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv32349/Lib/test Modified Files: test_extcall.py Log Message: Fix for SF bug #117241 When a method is called with no regular arguments and * args, defer the first arg is subclass check until after the * args have been expanded. N.B. The CALL_FUNCTION implementation is getting really hairy; should review it to see if it can be simplified. Index: test_extcall.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_extcall.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_extcall.py 2000/10/23 17:22:07 1.6 --- test_extcall.py 2000/10/30 17:15:20 1.7 *************** *** 145,146 **** --- 145,164 ---- a, b = f2(1, *(2, 3), **d) print len(a), len(b), b == d + + class Foo: + def method(self, arg1, arg2): + return arg1 + arg2 + + x = Foo() + print Foo.method(*(x, 1, 2)) + print Foo.method(x, *(1, 2)) + try: + print Foo.method(*(1, 2, 3)) + except TypeError, err: + print err + try: + print Foo.method(1, *(2, 3)) + except TypeError, err: + print err + + From python-dev@python.org Mon Oct 30 17:35:25 2000 From: python-dev@python.org (Barry A. Warsaw) Date: Mon, 30 Oct 2000 12:35:25 -0500 (EST) Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.212,2.213 References: <200010301715.JAA32564@slayer.i.sourceforge.net> Message-ID: <14845.45405.867829.722598@anthem.concentric.net> Well, it looks like checkin messages are flowing again. Yay! From python-dev@python.org Mon Oct 30 17:45:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 30 Oct 2000 09:45:10 -0800 Subject: [Python-checkins] CVS: python/dist/src configure,1.166,1.167 configure.in,1.174,1.175 Message-ID: <200010301745.JAA02424@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv2362 Modified Files: configure configure.in Log Message: Hack to force -lpthread instead instead of -lcma on HPUX, by Philipp Jocham. Philipp asks: "Are there any success stories with HP-UX 11.00 and -lcma? Maybe libcma is broken." Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -r1.166 -r1.167 *** configure 2000/10/26 17:09:35 1.166 --- configure 2000/10/30 17:45:07 1.167 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.173 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...4187 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) --- 6073,6077 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6353,6356 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 --- 6377,6380 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.174 retrieving revision 1.175 diff -C2 -r1.174 -r1.175 *** configure.in 2000/10/26 17:09:35 1.174 --- configure.in 2000/10/30 17:45:07 1.175 *************** *** 791,794 **** --- 791,798 ---- LIBS="$LIBS -lthread" LIBOBJS="$LIBOBJS thread.o"], [ + AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD) + AC_DEFINE(_POSIX_THREADS) + LIBS="$LIBS -lpthread" + LIBOBJS="$LIBOBJS thread.o"], [ AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) *************** *** 796,800 **** LIBOBJS="$LIBOBJS thread.o"],[ USE_THREAD_MODULE="#"]) ! ])])])])])])])]) AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD) --- 800,804 ---- LIBOBJS="$LIBOBJS thread.o"],[ USE_THREAD_MODULE="#"]) ! ])])])])])])])])]) AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD) From python-dev@python.org Mon Oct 30 19:41:36 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 30 Oct 2000 11:41:36 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_extcall,1.4,1.5 Message-ID: <200010301941.LAA18619@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv18593 Modified Files: test_extcall Log Message: track recent change to test_extcall.py Index: test_extcall =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_extcall,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_extcall 2000/10/24 19:57:44 1.4 --- test_extcall 2000/10/30 19:41:33 1.5 *************** *** 28,29 **** --- 28,33 ---- ** argument must be a dictionary 3 512 1 + 3 + 3 + unbound method must be called with instance as first argument + unbound method must be called with instance as first argument From python-dev@python.org Mon Oct 30 20:48:46 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 30 Oct 2000 12:48:46 -0800 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.38,1.39 pep-0001.txt,1.12,1.13 pep-0003.txt,1.1,1.2 pep-0042.txt,1.39,1.40 pep-0160.txt,1.6,1.7 pep-0200.txt,1.44,1.45 pep-0201.txt,1.16,1.17 pep-0202.txt,1.5,1.6 pep-0205.txt,1.1,1.2 pep-0214.txt,1.9,1.10 pep-0223.txt,1.5,1.6 pep-0226.txt,1.1,1.2 Message-ID: <200010302048.MAA12741@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv12719 Modified Files: pep-0000.txt pep-0001.txt pep-0003.txt pep-0042.txt pep-0160.txt pep-0200.txt pep-0201.txt pep-0202.txt pep-0205.txt pep-0214.txt pep-0223.txt pep-0226.txt Log Message: Update a few email addresses. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** pep-0000.txt 2000/10/26 21:22:48 1.38 --- pep-0000.txt 2000/10/30 20:48:44 1.39 *************** *** 2,6 **** Title: Index of Python Enhancement Proposals (PEPs) Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw) Status: Active Type: Informational --- 2,6 ---- Title: Index of Python Enhancement Proposals (PEPs) Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Status: Active Type: Informational *************** *** 73,78 **** ---------------- ------------- Ascher, David davida@activestate.com ! Drake, Fred fdrake@beopen.com ! Hylton, Jeremy jeremy@beopen.com Kuchling, Andrew akuchlin@mems-exchange.org Lemburg, Marc-Andre mal@lemburg.com --- 73,78 ---- ---------------- ------------- Ascher, David davida@activestate.com ! Drake, Fred fdrake@acm.org ! Hylton, Jeremy jeremy@digicool.com Kuchling, Andrew akuchlin@mems-exchange.org Lemburg, Marc-Andre mal@lemburg.com *************** *** 80,88 **** von Loewis, Martin loewis@informatik.hu-berlin.de McMillan, Gordon gmcm@hypernet.com ! Peters, Tim tpeters@beopen.com Prescod, Paul paul@prescod.net Raymond, Eric esr@snark.thyrsus.com Schneider-Kamp, Peter nownder@nowonder.de ! Warsaw, Barry bwarsaw@beopen.com Wilson, Greg gvwilson@nevex.com Wouters, Thomas thomas@xs4all.net --- 80,88 ---- von Loewis, Martin loewis@informatik.hu-berlin.de McMillan, Gordon gmcm@hypernet.com ! Peters, Tim tim@digicool.com Prescod, Paul paul@prescod.net Raymond, Eric esr@snark.thyrsus.com Schneider-Kamp, Peter nownder@nowonder.de ! Warsaw, Barry bwarsaw@digicool.com Wilson, Greg gvwilson@nevex.com Wouters, Thomas thomas@xs4all.net Index: pep-0001.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0001.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** pep-0001.txt 2000/10/16 20:32:29 1.12 --- pep-0001.txt 2000/10/30 20:48:44 1.13 *************** *** 2,7 **** Title: PEP Purpose and Guidelines Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw), ! jeremy@beopen.com (Jeremy Hylton) Status: Draft Type: Informational --- 2,7 ---- Title: PEP Purpose and Guidelines Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw), ! jeremy@digicool.com (Jeremy Hylton) Status: Draft Type: Informational *************** *** 40,44 **** PEP Workflow ! The PEP editor, Barry Warsaw , assigns numbers for each PEP and changes its status. --- 40,44 ---- PEP Workflow ! The PEP editor, Barry Warsaw , assigns numbers for each PEP and changes its status. *************** *** 59,63 **** status include duplication of effort, being technically unsound, or not in keeping with the Python philosophy; the BDFL (Benevolent ! Dictator for Life, Guido van Rossum ) is the final arbitrator of the latter. --- 59,63 ---- status include duplication of effort, being technically unsound, or not in keeping with the Python philosophy; the BDFL (Benevolent ! Dictator for Life, Guido van Rossum ) is the final arbitrator of the latter. Index: pep-0003.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0003.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0003.txt 2000/09/25 16:08:03 1.1 --- pep-0003.txt 2000/10/30 20:48:44 1.2 *************** *** 2,6 **** Title: Guidelines for Handling Bug Reports Version: $Revision$ ! Author: jeremy@beopen.com (Jeremy Hylton) Status: Active Type: Informational --- 2,6 ---- Title: Guidelines for Handling Bug Reports Version: $Revision$ ! Author: jeremy@alum.mit.edu (Jeremy Hylton) Status: Active Type: Informational Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** pep-0042.txt 2000/10/25 20:58:27 1.39 --- pep-0042.txt 2000/10/30 20:48:44 1.40 *************** *** 2,6 **** Title: Feature Requests Version: $Revision$ ! Author: Jeremy Hylton Status: Active Type: Informational --- 2,6 ---- Title: Feature Requests Version: $Revision$ ! Author: Jeremy Hylton Status: Active Type: Informational Index: pep-0160.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0160.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** pep-0160.txt 2000/09/07 04:30:29 1.6 --- pep-0160.txt 2000/10/30 20:48:44 1.7 *************** *** 2,6 **** Title: Python 1.6 Release Schedule Version: $Revision$ ! Owner: Fred L. Drake, Jr. Python-Version: 1.6 Status: Complete --- 2,6 ---- Title: Python 1.6 Release Schedule Version: $Revision$ ! Owner: Fred L. Drake, Jr. Python-Version: 1.6 Status: Complete Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 *** pep-0200.txt 2000/10/05 14:35:13 1.44 --- pep-0200.txt 2000/10/30 20:48:44 1.45 *************** *** 2,6 **** Title: Python 2.0 Release Schedule Version: $Revision$ ! Owner: Jeremy Hylton Python-Version: 2.0 Status: Incomplete --- 2,6 ---- Title: Python 2.0 Release Schedule Version: $Revision$ ! Owner: Jeremy Hylton Python-Version: 2.0 Status: Incomplete Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** pep-0201.txt 2000/09/23 08:18:32 1.16 --- pep-0201.txt 2000/10/30 20:48:44 1.17 *************** *** 2,6 **** Title: Lockstep Iteration Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw) Status: Final Type: Standards Track --- 2,6 ---- Title: Lockstep Iteration Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Status: Final Type: Standards Track Index: pep-0202.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0202.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep-0202.txt 2000/08/23 05:19:21 1.5 --- pep-0202.txt 2000/10/30 20:48:44 1.6 *************** *** 2,6 **** Title: List Comprehensions Version: $Revision$ ! Author: tpeters@beopen.com (Tim Peters) Status: Draft Type: Standards Track --- 2,6 ---- Title: List Comprehensions Version: $Revision$ ! Author: tim@digicool.com (Tim Peters) Status: Draft Type: Standards Track Index: pep-0205.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0205.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0205.txt 2000/07/14 03:44:01 1.1 --- pep-0205.txt 2000/10/30 20:48:44 1.2 *************** *** 2,6 **** Title: Weak References Version: $Revision$ ! Owner: fdrake@beopen.com (Fred Drake) Python-Version: 2.1 Status: Incomplete --- 2,6 ---- Title: Weak References Version: $Revision$ ! Owner: fdrake@acm.org (Fred Drake) Python-Version: 2.1 Status: Incomplete Index: pep-0214.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0214.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** pep-0214.txt 2000/10/27 10:25:44 1.9 --- pep-0214.txt 2000/10/30 20:48:44 1.10 *************** *** 2,6 **** Title: Extended Print Statement Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Final --- 2,6 ---- Title: Extended Print Statement Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Python-Version: 2.0 Status: Final Index: pep-0223.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0223.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep-0223.txt 2000/09/23 08:16:25 1.5 --- pep-0223.txt 2000/10/30 20:48:44 1.6 *************** *** 2,6 **** Title: Change the Meaning of \x Escapes Version: $Revision$ ! Author: tpeters@beopen.com (Tim Peters) Status: Final Type: Standards Track --- 2,6 ---- Title: Change the Meaning of \x Escapes Version: $Revision$ ! Author: tim@digicool.com (Tim Peters) Status: Final Type: Standards Track Index: pep-0226.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0226.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0226.txt 2000/10/16 21:24:49 1.1 --- pep-0226.txt 2000/10/30 20:48:44 1.2 *************** *** 2,6 **** Title: Python 2.1 Release Schedule Version: $Revision$ ! Author: Jeremy Hylton Status: Incomplete Type: Informational --- 2,6 ---- Title: Python 2.1 Release Schedule Version: $Revision$ ! Author: Jeremy Hylton Status: Incomplete Type: Informational From python-dev@python.org Mon Oct 30 21:16:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 30 Oct 2000 13:16:40 -0800 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.39,1.40 pep-0001.txt,1.13,1.14 pep-0201.txt,1.17,1.18 pep-0214.txt,1.10,1.11 Message-ID: <200010302116.NAA16491@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv16479 Modified Files: pep-0000.txt pep-0001.txt pep-0201.txt pep-0214.txt Log Message: It's "barry" now, not "bwarsaw"... Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** pep-0000.txt 2000/10/30 20:48:44 1.39 --- pep-0000.txt 2000/10/30 21:16:38 1.40 *************** *** 2,6 **** Title: Index of Python Enhancement Proposals (PEPs) Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Status: Active Type: Informational --- 2,6 ---- Title: Index of Python Enhancement Proposals (PEPs) Version: $Revision$ ! Author: barry@digicool.com (Barry A. Warsaw) Status: Active Type: Informational *************** *** 84,88 **** Raymond, Eric esr@snark.thyrsus.com Schneider-Kamp, Peter nownder@nowonder.de ! Warsaw, Barry bwarsaw@digicool.com Wilson, Greg gvwilson@nevex.com Wouters, Thomas thomas@xs4all.net --- 84,88 ---- Raymond, Eric esr@snark.thyrsus.com Schneider-Kamp, Peter nownder@nowonder.de ! Warsaw, Barry barry@digicool.com Wilson, Greg gvwilson@nevex.com Wouters, Thomas thomas@xs4all.net Index: pep-0001.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0001.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** pep-0001.txt 2000/10/30 20:48:44 1.13 --- pep-0001.txt 2000/10/30 21:16:38 1.14 *************** *** 2,6 **** Title: PEP Purpose and Guidelines Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw), jeremy@digicool.com (Jeremy Hylton) Status: Draft --- 2,6 ---- Title: PEP Purpose and Guidelines Version: $Revision$ ! Author: barry@digicool.com (Barry A. Warsaw), jeremy@digicool.com (Jeremy Hylton) Status: Draft *************** *** 40,44 **** PEP Workflow ! The PEP editor, Barry Warsaw , assigns numbers for each PEP and changes its status. --- 40,44 ---- PEP Workflow ! The PEP editor, Barry Warsaw , assigns numbers for each PEP and changes its status. Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** pep-0201.txt 2000/10/30 20:48:44 1.17 --- pep-0201.txt 2000/10/30 21:16:38 1.18 *************** *** 2,6 **** Title: Lockstep Iteration Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Status: Final Type: Standards Track --- 2,6 ---- Title: Lockstep Iteration Version: $Revision$ ! Author: barry@digicool.com (Barry A. Warsaw) Status: Final Type: Standards Track Index: pep-0214.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0214.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** pep-0214.txt 2000/10/30 20:48:44 1.10 --- pep-0214.txt 2000/10/30 21:16:38 1.11 *************** *** 2,6 **** Title: Extended Print Statement Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Python-Version: 2.0 Status: Final --- 2,6 ---- Title: Extended Print Statement Version: $Revision$ ! Author: barry@digicool.com (Barry A. Warsaw) Python-Version: 2.0 Status: Final From python-dev@python.org Sun Oct 1 00:59:07 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 30 Sep 2000 16:59:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib mailbox.py,1.24,1.25 Message-ID: <200009302359.QAA26443@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26396/Lib Modified Files: mailbox.py Log Message: Add missing "s" from format string. This closes SourceForge patch #101714. Index: mailbox.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/mailbox.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** mailbox.py 2000/09/22 18:41:50 1.24 --- mailbox.py 2000/09/30 23:59:04 1.25 *************** *** 273,277 **** s = msg.getheader('subject') or "" d = msg.getheader('date') or "" ! print '-%20.20s %20.20 %-30.30s'%(f, d[5:], s) --- 273,277 ---- s = msg.getheader('subject') or "" d = msg.getheader('date') or "" ! print '-%20.20s %20.20s %-30.30s'%(f, d[5:], s) From python-dev@python.org Sun Oct 1 05:28:48 2000 From: python-dev@python.org (Barry Warsaw) Date: Sat, 30 Sep 2000 21:28:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_b2.py,1.17,1.18 Message-ID: <200010010428.VAA06763@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv6740 Modified Files: test_b2.py Log Message: Added a zip() test where one of the arguments is an instance whose class has no __getitem__(). This raises an AttributeError. Index: test_b2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b2.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** test_b2.py 2000/09/19 14:42:09 1.17 --- test_b2.py 2000/10/01 04:28:43 1.18 *************** *** 291,294 **** --- 291,306 ---- if not exc: raise TestFailed, 'zip(None) - missing expected TypeError' + class G: + pass + exc = 0 + try: + zip(a, G()) + except AttributeError: + exc = 1 + except: + e = sys.exc_info()[0] + raise TestFailed, 'zip(a, b) - b instance w/o __getitem__' + if not exc: + raise TestFailed, 'zip(a, b) - missing expected AttributeError' From python-dev@python.org Sun Oct 1 18:50:50 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 1 Oct 2000 10:50:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.23,2.24 Message-ID: <200010011750.KAA15187@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv15121/Modules Modified Files: mmapmodule.c Log Message: my_getpagesize(): New function; returns the size of a page of memory. Versions are defined for Windows and Unix; the Unix flavor uses sysconf() to get the page size; this avoids the use of getpagesize(), which is deprecated and requires an additional library on some platforms (specifically, Reliant UNIX). This partially closes SourceForge bug #113797. Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.23 retrieving revision 2.24 diff -C2 -r2.23 -r2.24 *** mmapmodule.c 2000/09/25 13:16:15 2.23 --- mmapmodule.c 2000/10/01 17:50:46 2.24 *************** *** 27,30 **** --- 27,37 ---- #ifdef MS_WIN32 #include + static int + my_getpagesize(void) + { + SYSTEM_INFO si; + GetSystemInfo(&si); + return si.dwPageSize; + } #endif *************** *** 39,42 **** --- 46,59 ---- #endif + #if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) + static int + my_getpagesize(void) + { + return sysconf(_SC_PAGESIZE); + } + #else + #define my_getpagesize getpagesize + #endif + #endif /* UNIX */ *************** *** 982,998 **** #endif - #ifdef UNIX PyDict_SetItemString (dict, "PAGESIZE", ! PyInt_FromLong( (long)getpagesize() ) ); ! #endif ! #ifdef MS_WIN32 ! { ! SYSTEM_INFO si; ! GetSystemInfo(&si); ! PyDict_SetItemString (dict, "PAGESIZE", ! PyInt_FromLong( si.dwPageSize ) ); ! } ! #endif /* MS_WIN32 */ ! } --- 999,1004 ---- #endif PyDict_SetItemString (dict, "PAGESIZE", ! PyInt_FromLong( (long)my_getpagesize() ) ); } From python-dev@python.org Sun Oct 1 18:52:04 2000 From: python-dev@python.org (Martin v. Löwis) Date: Sun, 1 Oct 2000 10:52:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-tk turtle.py,1.1,1.2 Message-ID: <200010011752.KAA16178@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory slayer.i.sourceforge.net:/tmp/cvs-serv15647 Modified Files: turtle.py Log Message: Don't rename Tkinter to Tk; closes bug 115714 Subclass Error from Exception. Index: turtle.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/turtle.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** turtle.py 1998/12/04 16:42:46 1.1 --- turtle.py 2000/10/01 17:52:01 1.2 *************** *** 3,8 **** from math import * # Also for export import Tkinter ! Tk = Tkinter ! Error = Exception class RawPen: --- 3,8 ---- from math import * # Also for export import Tkinter ! class Error(Exception): ! pass class RawPen: *************** *** 86,90 **** try: id = self._canvas.create_line(0, 0, 0, 0, fill=color) ! except Tk.TclError: raise Error, "bad color string: %s" % `color` self._color = color --- 86,90 ---- try: id = self._canvas.create_line(0, 0, 0, 0, fill=color) ! except Tkinter.TclError: raise Error, "bad color string: %s" % `color` self._color = color *************** *** 223,227 **** self._canvas.after(10) self._canvas.itemconfigure(item, arrow="none") ! except Tk.TclError: # Probably the window was closed! return --- 223,227 ---- self._canvas.after(10) self._canvas.itemconfigure(item, arrow="none") ! except Tkinter.TclError: # Probably the window was closed! return *************** *** 243,251 **** global _root, _canvas if _root is None: ! _root = Tk.Tk() _root.wm_protocol("WM_DELETE_WINDOW", self._destroy) if _canvas is None: # XXX Should have scroll bars ! _canvas = Tk.Canvas(_root, background="white") _canvas.pack(expand=1, fill="both") RawPen.__init__(self, _canvas) --- 243,251 ---- global _root, _canvas if _root is None: ! _root = Tkinter.Tk() _root.wm_protocol("WM_DELETE_WINDOW", self._destroy) if _canvas is None: # XXX Should have scroll bars ! _canvas = Tkinter.Canvas(_root, background="white") _canvas.pack(expand=1, fill="both") RawPen.__init__(self, _canvas) From python-dev@python.org Mon Oct 2 00:49:34 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 16:49:34 -0700 Subject: [Python-checkins] CVS: distutils/distutils util.py,1.52,1.53 Message-ID: <200010012349.QAA19410@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv19333 Modified Files: util.py Log Message: Tweaked 'byte_compile()' so it silently skips non-Python files, rather than blowing up. Index: util.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/util.py,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** util.py 2000/09/30 20:37:56 1.52 --- util.py 2000/10/01 23:49:30 1.53 *************** *** 298,304 **** verbose=1, dry_run=0, direct=None): ! """Byte-compile a collection of Python source files to either ! .pyc or .pyo files in the same directory. 'optimize' must be ! one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") --- 298,305 ---- verbose=1, dry_run=0, direct=None): ! """Byte-compile a collection of Python source files to either .pyc ! or .pyo files in the same directory. 'py_files' is a list of files ! to compile; any files that don't end in ".py" are silently skipped. ! 'optimize' must be one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") *************** *** 379,384 **** for file in py_files: if file[-3:] != ".py": ! raise ValueError, \ ! "invalid filename: %s doesn't end with '.py'" % `file` # Terminology from the py_compile module: --- 380,386 ---- for file in py_files: if file[-3:] != ".py": ! # This lets us be lazy and not filter filenames in ! # the "install_lib" command. ! continue # Terminology from the py_compile module: From python-dev@python.org Mon Oct 2 00:50:18 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 16:50:18 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install_lib.py,1.33,1.34 Message-ID: <200010012350.QAA19946@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv19830 Modified Files: install_lib.py Log Message: From 'run()', only call 'bytecompile()' if we actually have pure Python modules to compile. Index: install_lib.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_lib.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** install_lib.py 2000/09/30 20:39:09 1.33 --- install_lib.py 2000/10/01 23:50:13 1.34 *************** *** 58,62 **** # (Optionally) compile .py to .pyc ! if outfiles is not None: self.bytecompile(outfiles) --- 58,62 ---- # (Optionally) compile .py to .pyc ! if outfiles is not None and self.distribution.has_pure_modules(): self.bytecompile(outfiles) From python-dev@python.org Mon Oct 2 03:09:59 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 19:09:59 -0700 Subject: [Python-checkins] CVS: distutils/distutils util.py,1.53,1.54 Message-ID: <200010020209.TAA29860@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv29745 Modified Files: util.py Log Message: Remove the temporary byte-compilation script when we're done with it. Index: util.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/util.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -r1.53 -r1.54 *** util.py 2000/10/01 23:49:30 1.53 --- util.py 2000/10/02 02:09:55 1.54 *************** *** 370,373 **** --- 370,374 ---- cmd.insert(1, "-OO") spawn(cmd, verbose=verbose, dry_run=dry_run) + os.remove(script_name) # "Direct" byte-compilation: use the py_compile module to compile From python-dev@python.org Mon Oct 2 03:15:12 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 19:15:12 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install_lib.py,1.34,1.35 Message-ID: <200010020215.TAA02999@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv31207 Modified Files: install_lib.py Log Message: Finished the overhaul of byte-compilation options: there's now a 6-way choice between (compile, no-compile) * (optimize=0, optimize=1, optimize=2). Details: - added --no-compile option to complement --compile, which has been there for ages - changed --optimize (which never worked) to a value option, which expects 0, 1, or 2 - renamed 'bytecompile()' method to 'byte_compile()', and beefed it up to handle both 'compile' and 'optimize' options - fix '_bytecode_filenames()' to respect the new options Index: install_lib.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_lib.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** install_lib.py 2000/10/01 23:50:13 1.34 --- install_lib.py 2000/10/02 02:15:08 1.35 *************** *** 4,10 **** import sys, os, string from distutils.core import Command from distutils.dir_util import copy_tree - from distutils.util import byte_compile class install_lib (Command): --- 4,11 ---- import sys, os, string + from types import IntType from distutils.core import Command + from distutils.errors import DistutilsOptionError from distutils.dir_util import copy_tree class install_lib (Command): *************** *** 12,25 **** description = "install all Python modules (extensions and pure Python)" user_options = [ ('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ('force', 'f', "force installation (overwrite existing files)"), ! ('compile', 'c', "compile .py to .pyc"), ! ('optimize', 'o', "compile .py to .pyo (optimized)"), ('skip-build', None, "skip the build steps"), ] ! boolean_options = ['force', 'compile', 'optimize', 'skip-build'] --- 13,45 ---- description = "install all Python modules (extensions and pure Python)" + # The byte-compilation options are a tad confusing. Here are the + # possible scenarios: + # 1) no compilation at all (--no-compile --no-optimize) + # 2) compile .pyc only (--compile --no-optimize; default) + # 3) compile .pyc and "level 1" .pyo (--compile --optimize) + # 4) compile "level 1" .pyo only (--no-compile --optimize) + # 5) compile .pyc and "level 2" .pyo (--compile --optimize-more) + # 6) compile "level 2" .pyo only (--no-compile --optimize-more) + # + # The UI for this is two option, 'compile' and 'optimize'. + # 'compile' is strictly boolean, and only decides whether to + # generate .pyc files. 'optimize' is three-way (0, 1, or 2), and + # decides both whether to generate .pyo files and what level of + # optimization to use. + user_options = [ ('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ('force', 'f', "force installation (overwrite existing files)"), ! ('compile', 'c', "compile .py to .pyc [default]"), ! ('no-compile', None, "don't compile .py files"), ! ('optimize=', 'O', ! "also compile with optimization: -O1 for \"python -O\", " ! "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), ('skip-build', None, "skip the build steps"), ] ! boolean_options = ['force', 'compile', 'skip-build'] ! negative_opt = {'no-compile' : 'compile'} *************** *** 29,34 **** self.build_dir = None self.force = 0 ! self.compile = 1 ! self.optimize = 1 self.skip_build = None --- 49,54 ---- self.build_dir = None self.force = 0 ! self.compile = None ! self.optimize = None self.skip_build = None *************** *** 42,50 **** ('install_lib', 'install_dir'), ('force', 'force'), ! ('compile_py', 'compile'), ! ('optimize_py', 'optimize'), ('skip_build', 'skip_build'), ) def run (self): --- 62,84 ---- ('install_lib', 'install_dir'), ('force', 'force'), ! ('compile', 'compile'), ! ('optimize', 'optimize'), ('skip_build', 'skip_build'), ) + if self.compile is None: + self.compile = 1 + if self.optimize is None: + self.optimize = 0 + + print "install_lib: compile=%s, optimize=%s" % \ + (`self.compile`, `self.optimize`) + if type(self.optimize) is not IntType: + try: + self.optimize = int(self.optimize) + assert 0 <= self.optimize <= 2 + except (ValueError, AssertionError): + raise DistutilsOptionError, "optimize must be 0, 1, or 2" + def run (self): *************** *** 59,63 **** # (Optionally) compile .py to .pyc if outfiles is not None and self.distribution.has_pure_modules(): ! self.bytecompile(outfiles) # run () --- 93,97 ---- # (Optionally) compile .py to .pyc if outfiles is not None and self.distribution.has_pure_modules(): ! self.byte_compile(outfiles) # run () *************** *** 82,90 **** return return outfiles ! def bytecompile (self, files): ! byte_compile(files, ! force=self.force, ! verbose=self.verbose, dry_run=self.dry_run) --- 116,139 ---- return return outfiles + + def byte_compile (self, files): + from distutils.util import byte_compile ! # Get the "--root" directory supplied to the "install" command, ! # and use it as a prefix to strip off the purported filename ! # encoded in bytecode files. This is far from complete, but it ! # should at least generate usable bytecode in RPM distributions. ! install_root = self.get_finalized_command('install').root ! ! if self.compile: ! byte_compile(files, optimize=0, ! force=self.force, ! prefix=install_root, ! verbose=self.verbose, dry_run=self.dry_run) ! if self.optimize > 0: ! byte_compile(files, optimize=self.optimize, ! force=self.force, ! prefix=install_root, ! verbose=self.verbose, dry_run=self.dry_run) *************** *** 112,117 **** bytecode_files = [] for py_file in py_filenames: ! bytecode = py_file + (__debug__ and "c" or "o") ! bytecode_files.append(bytecode) return bytecode_files --- 161,168 ---- bytecode_files = [] for py_file in py_filenames: ! if self.compile: ! bytecode_files.append(py_file + "c") ! if self.optmize > 0: ! bytecode_files.append(py_file + "o") return bytecode_files From python-dev@python.org Mon Oct 2 03:16:10 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 19:16:10 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install.py,1.50,1.51 Message-ID: <200010020216.TAA03928@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv3827 Modified Files: install.py Log Message: Added --compile, --optimize options so users have an easy way to instruct the "install_lib" command from the command-line. Index: install.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install.py,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** install.py 2000/09/30 18:27:54 1.50 --- install.py 2000/10/02 02:16:04 1.51 *************** *** 91,94 **** --- 91,103 ---- "installation directory for data files"), + # Byte-compilation options -- see install_lib.py for details, as + # these are duplicated from there (but only install_lib does + # anything with them). + ('compile', 'c', "compile .py to .pyc [default]"), + ('no-compile', None, "don't compile .py files"), + ('optimize=', 'O', + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), + # Miscellaneous control options ('force', 'f', *************** *** 135,138 **** --- 144,150 ---- self.install_scripts = None self.install_data = None + + self.compile = None + self.optimize = None # These two are for putting non-packagized distributions into their From python-dev@python.org Mon Oct 2 03:19:07 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 19:19:07 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command build_py.py,1.32,1.33 Message-ID: <200010020219.TAA06707@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv5068 Modified Files: build_py.py Log Message: Added the ability to do byte-compilation at build time, currently off by default (since compiling at install time works just fine). Details: - added 'compile' and 'optimize' options - added 'byte_compile()' method - changed 'get_outputs()' so it includes bytecode files A lot of the code added is very similar to code in install_lib.py; would be nice to factor it out further. Index: build_py.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build_py.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** build_py.py 2000/09/30 18:27:54 1.32 --- build_py.py 2000/10/02 02:19:04 1.33 *************** *** 21,28 **** user_options = [ ('build-lib=', 'd', "directory to \"build\" (copy) to"), ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] ! boolean_options = ['force'] --- 21,34 ---- user_options = [ ('build-lib=', 'd', "directory to \"build\" (copy) to"), + ('compile', 'c', "compile .py to .pyc"), + ('no-compile', None, "don't compile .py files [default]"), + ('optimize=', 'O', + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] ! boolean_options = ['compile', 'force'] ! negative_opt = {'no-compile' : 'compile'} *************** *** 32,35 **** --- 38,43 ---- self.package = None self.package_dir = None + self.compile = 0 + self.optimize = 0 self.force = None *************** *** 45,48 **** --- 53,64 ---- self.package_dir = self.distribution.package_dir + # Ick, copied straight from install_lib.py (fancy_getopt needs a + # type system! Hell, *everything* needs a type system!!!) + if type(self.optimize) is not IntType: + try: + self.optimize = int(self.optimize) + assert 0 <= self.optimize <= 2 + except (ValueError, AssertionError): + raise DistutilsOptionError, "optimize must be 0, 1, or 2" def run (self): *************** *** 88,91 **** --- 104,109 ---- self.build_packages() + self.byte_compile(self.get_outputs(include_bytecode=0)) + # run () *************** *** 285,295 **** ! def get_outputs (self): modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: package = string.split(package, '.') ! outputs.append(self.get_module_outfile(self.build_lib, ! package, module)) return outputs --- 303,319 ---- ! def get_outputs (self, include_bytecode=1): modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: package = string.split(package, '.') ! filename = self.get_module_outfile(self.build_lib, package, module) ! outputs.append(filename) ! if include_bytecode: ! if self.compile: ! outputs.append(filename + "c") ! if self.optimize > 0: ! outputs.append(filename + "o") ! return outputs *************** *** 348,351 **** # build_packages () ! # class build_py --- 372,397 ---- # build_packages () ! ! ! def byte_compile (self, files): ! from distutils.util import byte_compile ! prefix = self.build_lib ! if prefix[-1] != os.sep: ! prefix = prefix + os.sep ! ! # XXX this code is essentially the same as the 'byte_compile() ! # method of the "install_lib" command, except for the determination ! # of the 'prefix' string. Hmmm. ! ! if self.compile: ! byte_compile(files, optimize=0, ! force=self.force, ! prefix=prefix, ! verbose=self.verbose, dry_run=self.dry_run) ! if self.optimize > 0: ! byte_compile(files, optimize=self.optimize, ! force=self.force, ! prefix=prefix, ! verbose=self.verbose, dry_run=self.dry_run) ! # class build_py From python-dev@python.org Mon Oct 2 03:25:53 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 1 Oct 2000 19:25:53 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install_lib.py,1.35,1.36 Message-ID: <200010020225.TAA13911@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv13852 Modified Files: install_lib.py Log Message: Typo fix. Index: install_lib.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_lib.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** install_lib.py 2000/10/02 02:15:08 1.35 --- install_lib.py 2000/10/02 02:25:51 1.36 *************** *** 163,167 **** if self.compile: bytecode_files.append(py_file + "c") ! if self.optmize > 0: bytecode_files.append(py_file + "o") --- 163,167 ---- if self.compile: bytecode_files.append(py_file + "c") ! if self.optimize > 0: bytecode_files.append(py_file + "o") From python-dev@python.org Mon Oct 2 04:36:22 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 1 Oct 2000 20:36:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib liboperator.tex,1.15,1.16 Message-ID: <200010020336.UAA24093@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24071/lib Modified Files: liboperator.tex Log Message: Add documentation and warnings for the isCallable(), isMappingType(), isNumberType(), and isSequenceType() functions. This closes SourceForge bug #115789. Index: liboperator.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liboperator.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** liboperator.tex 2000/09/17 16:10:25 1.15 --- liboperator.tex 2000/10/02 03:36:18 1.16 *************** *** 160,163 **** --- 160,213 ---- \end{funcdesc} + The \module{operator} also defines a few predicates to test the type + of objects. \strong{Note:} Be careful not to misinterpret the + results of these functions; only \function{isCallable()} has any + measure of reliability with instance objects. For example: + + \begin{verbatim} + >>> class C: + ... pass + ... + >>> import operator + >>> o = C() + >>> operator.isMappingType(o) + 1 + \end{verbatim} + + \begin{funcdesc}{isCallable}{o} + \deprecated{2.0}{Use the \function{callable()} built-in function instead.} + Returns true if the object \var{o} can be called like a function, + otherwise it returns false. True is returned for functions, bound and + unbound methods, class objects, and instance objects which support the + \method{__call__()} method. + \end{funcdesc} + + \begin{funcdesc}{isMappingType}{o} + Returns true if the object \var{o} supports the mapping interface. + This is true for dictionaries and all instance objects. + \strong{Warning:} There is no reliable way to test if an instance + supports the complete mapping protocol since the interface itself is + ill-defined. This makes this test less useful than it otherwise might + be. + \end{funcdesc} + + \begin{funcdesc}{isNumberType}{o} + Returns true if the object \var{o} represents a number. This is true + for all numeric types implemented in C, and for all instance objects. + \strong{Warning:} There is no reliable way to test if an instance + supports the complete numeric interface since the interface itself is + ill-defined. This makes this test less useful than it otherwise might + be. + \end{funcdesc} + + \begin{funcdesc}{isSequenceType}{o} + Returns true if the object \var{o} supports the sequence protocol. + This returns true for all objects which define sequence methods in C, + and for all instance objects. \strong{Warning:} There is no reliable + way to test if an instance supports the complete sequence interface + since the interface itself is ill-defined. This makes this test less + useful than it otherwise might be. + \end{funcdesc} + Example: Build a dictionary that maps the ordinals from \code{0} to From python-dev@python.org Mon Oct 2 04:40:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 1 Oct 2000 20:40:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib webbrowser.py,1.3,1.4 Message-ID: <200010020340.UAA26110@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26061/Lib Modified Files: webbrowser.py Log Message: Do not set Konquerer to be the default browser if $KDEDIR is set -- some Linux distributions which provide both KDE and Gnome set this environment variable even if the user is not using KDE. We do *not* want to start Konquerer if KDE is not running unless the user actually tells us to! Index: webbrowser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/webbrowser.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** webbrowser.py 2000/09/22 10:05:52 1.3 --- webbrowser.py 2000/10/02 03:40:51 1.4 *************** *** 197,203 **** DEFAULT_BROWSER = "windows-default" elif os.environ.get("DISPLAY"): ! if os.environ.get("KDEDIR"): ! DEFAULT_BROWSER = "kfm" ! elif _iscommand("netscape"): DEFAULT_BROWSER = "netscape" --- 197,201 ---- DEFAULT_BROWSER = "windows-default" elif os.environ.get("DISPLAY"): ! if _iscommand("netscape"): DEFAULT_BROWSER = "netscape" From python-dev@python.org Mon Oct 2 04:42:46 2000 From: python-dev@python.org (Fred L. Drake) Date: Sun, 1 Oct 2000 20:42:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libwebbrowser.tex,1.2,1.3 Message-ID: <200010020342.UAA26740@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26715/Doc/lib Modified Files: libwebbrowser.tex Log Message: Minor usage fix. Add a note that some way of reliably detecting the use of KDE would be really nice. Index: libwebbrowser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwebbrowser.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libwebbrowser.tex 2000/07/07 17:08:40 1.2 --- libwebbrowser.tex 2000/10/02 03:42:43 1.3 *************** *** 12,16 **** Under \UNIX, graphical browsers are preferred under X11, but text-mode ! browser will be used if graphical browsers are not available or an X11 display isn't available. If text-mode browsers are used, the calling process will block until the user exits the browser. --- 12,16 ---- Under \UNIX, graphical browsers are preferred under X11, but text-mode ! browsers will be used if graphical browsers are not available or an X11 display isn't available. If text-mode browsers are used, the calling process will block until the user exits the browser. *************** *** 70,75 **** \begin{description} \item[(1)] ! ``Konquerer'' is the file manager for the KDE desktop environment, and ! only makes sense to use if KDE is running. \item[(2)] --- 70,77 ---- \begin{description} \item[(1)] ! ``Konquerer'' is the file manager for the KDE desktop environment for ! UNIX, and only makes sense to use if KDE is running. Some way of ! reliably detecting KDE would be nice; the \envvar{KDEDIR} variable is ! not sufficient. \item[(2)] From python-dev@python.org Mon Oct 2 11:22:02 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 2 Oct 2000 03:22:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Parser parser.c,2.17,2.18 Message-ID: <200010021022.DAA29796@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Parser In directory slayer.i.sourceforge.net:/tmp/cvs-serv29765 Modified Files: parser.c Log Message: Fix a bug in stack overflow error handling. This fixes half of Bug #115555. The error from s_push() on stack overflow was -1, which was passed through unchanged by push(), but not tested for by push()'s caller -- which only expected positive error codes. Fixed by changing s_push() to return E_NOMEM on stack overflow. (Not quite the proper error code either, but I can't be bothered adding a new E_STACKOVERFLOW error code in all the right places.) Index: parser.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/parser.c,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -r2.17 -r2.18 *** parser.c 2000/09/01 23:29:28 2.17 --- parser.c 2000/10/02 10:21:59 2.18 *************** *** 41,45 **** if (s->s_top == s->s_base) { fprintf(stderr, "s_push: parser stack overflow\n"); ! return -1; } top = --s->s_top; --- 41,45 ---- if (s->s_top == s->s_base) { fprintf(stderr, "s_push: parser stack overflow\n"); ! return E_NOMEM; } top = --s->s_top; From python-dev@python.org Mon Oct 2 14:43:36 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 2 Oct 2000 06:43:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.70,1.71 Message-ID: <200010021343.GAA00805@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv661/Misc Modified Files: NEWS Log Message: typo Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -r1.70 -r1.71 *** NEWS 2000/09/29 17:54:40 1.70 --- NEWS 2000/10/02 13:43:33 1.71 *************** *** 126,130 **** - sre: Added experimental expand() method to match objects. Does not ! user buffer interface on Unicode strings. Does not hang if group id is followed by whitespace. --- 126,130 ---- - sre: Added experimental expand() method to match objects. Does not ! use buffer interface on Unicode strings. Does not hang if group id is followed by whitespace. From python-dev@python.org Mon Oct 2 15:43:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 07:43:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/perl python.perl,1.86,1.87 Message-ID: <200010021443.HAA14082@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory slayer.i.sourceforge.net:/tmp/cvs-serv14028/perl Modified Files: python.perl Log Message: make_icon_filename(): Convenience function to turn a partial filename into a usable filename using $ICONSERVER and $IMAGE_TYPE as needed. get_link_icon(): Function to examine a URL and return the string to use to insert an icon if the link points off-site, if needed and $OFF_SITE_LINK_ICON is set. Adjusted appropriate places to use these new functions. Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -r1.86 -r1.87 *** python.perl 2000/09/22 17:05:04 1.86 --- python.perl 2000/10/02 14:43:38 1.87 *************** *** 9,12 **** --- 9,14 ---- package main; + use File::Basename; + sub next_argument{ *************** *** 24,28 **** --- 26,54 ---- } + sub make_icon_filename($){ + my($myname, $mydir, $myext) = fileparse(@_[0], '\..*'); + chop $mydir; + if ($mydir eq '.') { + $mydir = $ICONSERVER; + } + $myext = ".$IMAGE_TYPE" + unless $myext; + return "$mydir$dd$myname$myext"; + } + $OFF_SITE_LINK_ICON = ''; + + sub get_link_icon($){ + my $url = @_[0]; + if ($OFF_SITE_LINK_ICON && ($url =~ /^[-a-zA-Z0-9.]+:/)) { + # absolute URL; assume it points off-site + my $icon = make_icon_filename($OFF_SITE_LINK_ICON); + return (" [off-site link]"); + } + return ''; + } + # This is a fairly simple hack; it supports \let when it is used to create # (or redefine) a macro to exactly be some other macro: \let\newname=\oldname. *************** *** 212,217 **** local($_) = @_; my $newsgroup = next_argument(); my $stuff = "" ! . "$newsgroup"; return $stuff . $_; } --- 238,244 ---- local($_) = @_; my $newsgroup = next_argument(); + my $icon = get_link_icon("news:$newsgroup"); my $stuff = "" ! . "$newsgroup$icon"; return $stuff . $_; } *************** *** 234,239 **** local($_) = @_; my $url = next_argument(); $url =~ s/~/~/g; ! return "$url" . $_; } --- 261,267 ---- local($_) = @_; my $url = next_argument(); + my $icon = get_link_icon($url); $url =~ s/~/~/g; ! return "$url$icon" . $_; } *************** *** 256,264 **** my $id = "rfcref-" . ++$global{'max_id'}; my $href = get_pep_url($rfcnumber); # Save the reference my $nstr = gen_index_id("Python Enhancement Proposals!PEP $rfcnumber", ''); $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); ! return ("PEP $rfcnumber" ! . $_); } --- 284,293 ---- my $id = "rfcref-" . ++$global{'max_id'}; my $href = get_pep_url($rfcnumber); + my $icon = get_link_icon($href); # Save the reference my $nstr = gen_index_id("Python Enhancement Proposals!PEP $rfcnumber", ''); $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); ! return ("PEP $rfcnumber" ! . "$icon" . $_); } *************** *** 273,281 **** my $id = "rfcref-" . ++$global{'max_id'}; my $href = get_rfc_url($rfcnumber); # Save the reference my $nstr = gen_index_id("RFC!RFC $rfcnumber", ''); $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); ! return ("RFC $rfcnumber" ! . $_); } --- 302,311 ---- my $id = "rfcref-" . ++$global{'max_id'}; my $href = get_rfc_url($rfcnumber); + my $icon = get_link_icon($href); # Save the reference my $nstr = gen_index_id("RFC!RFC $rfcnumber", ''); $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); ! return ("RFC $rfcnumber" ! . "$icon" . $_); } *************** *** 284,287 **** --- 314,318 ---- my $url = next_optional_argument(); my $title = next_argument(); + my $icon = get_link_icon($url); my $repl = ''; if ($url) { *************** *** 289,293 **** . " href='$url'\n" . " title='$title'\n" ! . " >$title
    "); } else { --- 320,324 ---- . " href='$url'\n" . " title='$title'\n" ! . " >$title$icon
    "); } else { *************** *** 633,637 **** $REFCOUNTS_LOADED = 1; - use File::Basename; my $myname, $mydir, $myext; ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*'); --- 664,667 ---- *************** *** 1254,1267 **** } - use File::Basename; - sub make_my_titlegraphic() { ! my($myname, $mydir, $myext) = fileparse($TITLE_PAGE_GRAPHIC, '\..*'); ! chop $mydir; ! if ($mydir eq '.') { ! $mydir = $ICONSERVER; ! } ! $myext = ".$IMAGE_TYPE" ! unless $myext; my $graphic = "' . "\n
    $what $rfcnum, $title:" . "\n
    $text\n
" . $_; --- 1477,1485 ---- my $text = next_argument(); my $url = get_rfc_url($rfcnum); + my $icon = get_link_icon($url); return '
' . "\n
$what $rfcnum, $title$icon:" . "\n
$text\n
" . $_; *************** *** 1476,1483 **** my $title = next_argument(); my $text = next_argument(); if ($url) { return '
' . "\n
$title" . "\n
$text\n
" . $_; --- 1499,1507 ---- my $title = next_argument(); my $text = next_argument(); + my $icon = get_link_icon($url); if ($url) { return '
' . "\n
$title$icon" . "\n
$text\n
" . $_; *************** *** 1494,1500 **** my $url = next_argument(); my $text = next_argument(); return '
' . "\n
$url" . "\n
$text\n
" . $_; --- 1518,1525 ---- my $url = next_argument(); my $text = next_argument(); + my $icon = get_link_icon($url); return '
' . "\n
$url$icon" . "\n
$text\n
" . $_; From python-dev@python.org Mon Oct 2 15:52:42 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 07:52:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.63,1.64 Message-ID: <200010021452.HAA20300@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv20148/Misc Modified Files: ACKS Log Message: Added Daniel Dittmar, for helping get the configuration working for Reliant UNIX. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -r1.63 -r1.64 *** ACKS 2000/09/25 14:46:26 1.63 --- ACKS 2000/10/02 14:52:31 1.64 *************** *** 81,84 **** --- 81,85 ---- Roger Dev Toby Dickenson + Daniel Dittmar Jaromir Dolecek Fred Drake From python-dev@python.org Mon Oct 2 16:53:12 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 2 Oct 2000 08:53:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.32,2.33 Message-ID: <200010021553.IAA01251@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv1200 Modified Files: readline.c Log Message: Supporting rl_library_version is more trouble than it's worth -- readline doesn't have it before readline 2.2 and there's no compile-time way to find out which readline version is in use. Sigh. GNU readline sucks. Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** readline.c 2000/09/20 20:24:21 2.32 --- readline.c 2000/10/02 15:53:08 2.33 *************** *** 39,43 **** extern int history_truncate_file(char *, int); extern Function *rl_event_hook; - extern char *rl_library_version; #endif --- 39,42 ---- *************** *** 496,509 **** initreadline(void) { ! PyObject *m, *d, *v; m = Py_InitModule4("readline", readline_methods, doc_module, (PyObject *)NULL, PYTHON_API_VERSION); - - d = PyModule_GetDict(m); - v = PyString_FromString(rl_library_version); - PyDict_SetItemString(d, "library_version", v); - Py_XDECREF(v); - if (isatty(fileno(stdin))) { PyOS_ReadlineFunctionPointer = call_readline; --- 495,502 ---- initreadline(void) { ! PyObject *m; m = Py_InitModule4("readline", readline_methods, doc_module, (PyObject *)NULL, PYTHON_API_VERSION); if (isatty(fileno(stdin))) { PyOS_ReadlineFunctionPointer = call_readline; From python-dev@python.org Mon Oct 2 18:23:19 2000 From: python-dev@python.org (Thomas Wouters) Date: Mon, 2 Oct 2000 19:23:19 +0200 Subject: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.32,2.33 In-Reply-To: <200010021553.IAA01251@slayer.i.sourceforge.net>; from gvanrossum@users.sourceforge.net on Mon, Oct 02, 2000 at 08:53:12AM -0700 References: <200010021553.IAA01251@slayer.i.sourceforge.net> Message-ID: <20001002192319.C12812@xs4all.nl> On Mon, Oct 02, 2000 at 08:53:12AM -0700, Guido van Rossum wrote: > Update of /cvsroot/python/python/dist/src/Modules > In directory slayer.i.sourceforge.net:/tmp/cvs-serv1200 > Modified Files: > readline.c > Log Message: > Supporting rl_library_version is more trouble than it's worth -- > readline doesn't have it before readline 2.2 and there's no > compile-time way to find out which readline version is in use. But we can detect whether readline has rl_library_version during runtime, and #ifdef it ;) I think the readline version info is useful enough to warrant the extra #define and #ifdef... I can whip it up tonight, if the autoconf check is desired ;P -- Thomas Wouters Hi! I'm a .signature virus! copy me into your .signature file to help me spread! From python-dev@python.org Mon Oct 2 18:36:30 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 10:36:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html style.css,1.10,1.11 Message-ID: <200010021736.KAA19014@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv18971 Modified Files: style.css Log Message: Minor stylesheet nit. Index: style.css =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/style.css,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** style.css 2000/09/28 20:41:16 1.10 --- style.css 2000/10/02 17:36:27 1.11 *************** *** 63,67 **** .tableheader td { background-color: #99ccff; } ! .tableheader th { background-color: #99ccff; } .refcount-info { font-style: italic } --- 63,68 ---- .tableheader td { background-color: #99ccff; } ! .tableheader th { background-color: #99ccff; ! font-family: avantgarde, sans-serif; } .refcount-info { font-style: italic } From python-dev@python.org Mon Oct 2 21:56:33 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 13:56:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libzipfile.tex,1.4,1.5 Message-ID: <200010022056.NAA15622@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15558/lib Modified Files: libzipfile.tex Log Message: Substantially revised documentation for the zipfile module, partially based on revised text from Jim Ahlstrom . This closes SourceForge bug #115681. Index: libzipfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzipfile.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libzipfile.tex 2000/09/30 00:11:45 1.4 --- libzipfile.tex 2000/10/02 20:56:30 1.5 *************** *** 12,17 **** The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ! ZIP file. The available attributes of this module are: --- 12,23 ---- The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ! ZIP file. Any advanced use of this module will require an ! understanding of the format, as defined in ! \citetitle[http://www.pkware.com/appnote.html]{PKZIP Application ! Note}. + This module does not currently handle ZIP files which have appended + comments, or multi-disk ZIP files. + The available attributes of this module are: *************** *** 24,28 **** \end{datadesc} ! \begin{classdesc}{ZipFile}{...} The class for reading and writing ZIP files. See ``\citetitle{ZipFile Objects}'' (section \ref{zipfile-objects}) for --- 30,34 ---- \end{datadesc} ! \begin{classdesc}{ZipFile}{\unspecified} The class for reading and writing ZIP files. See ``\citetitle{ZipFile Objects}'' (section \ref{zipfile-objects}) for *************** *** 30,33 **** --- 36,55 ---- \end{classdesc} + \begin{classdesc}{PyZipFile}{\unspecified} + Class for creating ZIP archives containing Python libraries. + \end{classdesc} + + \begin{classdesc}{ZipInfo}{\optional{filename\optional{, date_time}}} + Class used the represent infomation about a member of an archive. + Instances of this class are returned by the \method{getinfo()} and + \method{listinfo()} methods of \class{ZipFile} objects. Most users + of the \module{zipfile} module will not need to create these, but + only use those created by this module. + \var{filename} should be the full name of the archive member, and + \var{date_time} should be a tuple containing six fields which + describe the time of the last modification to the file; the fields + are described in section \ref{zipinfo-objects}, ``ZipInfo Objects.'' + \end{classdesc} + \begin{funcdesc}{is_zipfile}{path} Returns true if \var{path} is a valid ZIP file based on its magic *************** *** 36,57 **** \end{funcdesc} - \begin{funcdesc}{zip2date}{zdate} - Return \code{(\var{year}, \var{month}, \var{day})} for a ZIP date - code. - \end{funcdesc} - - \begin{funcdesc}{zip2time}{ztime} - Return \code{(\var{hour}, \var{minute}, \var{second})} for a ZIP - time code. - \end{funcdesc} - - \begin{funcdesc}{date2zip}{year, month, day} - Return a ZIP date code. - \end{funcdesc} - - \begin{funcdesc}{time2zip}{hour, minute, second} - Return a ZIP time code. - \end{funcdesc} - \begin{datadesc}{ZIP_STORED} The numeric constant (\code{0}) for an uncompressed archive member. --- 58,61 ---- *************** *** 87,93 **** --- 91,99 ---- archive is appended to the file. This is meant for adding a ZIP archive to another file, such as \file{python.exe}. Using + \begin{verbatim} cat myzip.zip >> python.exe \end{verbatim} + also works, and at least \program{WinZip} can read such files. \var{compression} is the ZIP compression method to use when writing *************** *** 98,129 **** \end{classdesc} ! XXX explain the "extra" string for the ZIP format ! ! \begin{memberdesc}{TOC} ! A read-only dictionary whose keys are the names in the archive, and ! whose values are tuples as follows: ! ! \begin{tableii}{c|l}{code}{Index}{Meaning} ! \lineii{0}{File data seek offset} ! \lineii{1}{ZIP file "extra" data as a string} ! \lineii{2}{ZIP file bit flags} ! \lineii{3}{ZIP file compression type} ! \lineii{4}{File modification time in DOS format} ! \lineii{5}{File modification date in DOS format} ! \lineii{6}{The CRC-32 of the uncompressed data} ! \lineii{7}{The compressed size of the file} ! \lineii{8}{The uncompressed size of the file} ! \end{tableii} ! \end{memberdesc} ! ! The class ZipFile has these methods: ! \begin{methoddesc}{listdir}{} ! Return a list of names in the archive. Equivalent to ! \code{\var{zipfile}.TOC.keys()}. \end{methoddesc} \begin{methoddesc}{printdir}{} ! Print a table of contents for the archive to stdout. \end{methoddesc} --- 104,119 ---- \end{classdesc} ! \begin{methoddesc}{namelist}{} ! Return a list of archive members by name. ! \end{methoddesc} ! \begin{methoddesc}{infolist}{} ! Return a list containing a \class{ZipInfo} object for each member of ! the archive. The objects are in the same order as their entries in ! the actual ZIP file on disk if an existing archive was opened. \end{methoddesc} \begin{methoddesc}{printdir}{} ! Print a table of contents for the archive to \code{sys.stdout}. \end{methoddesc} *************** *** 133,159 **** \end{methoddesc} ! \begin{methoddesc}{writestr}{bytes, arcname, year, month, day, hour, ! minute, second\optional{, extra}} Write the string \var{bytes} and the other data to the archive, and ! give the archive member the name \var{arcname}. \var{extra} is the ! ZIP extra data string. The archive must be opened with mode ! \code{'w'} or \code{'a'}. \end{methoddesc} ! \begin{methoddesc}{write}{filename, arcname\optional{, extra}} Write the file named \var{filename} to the archive, giving it the ! archive name \var{arcname}. \var{extra} is the ZIP extra data ! string. The archive must be open with mode \code{'w'} or ! \code{'a'}. \end{methoddesc} ! \begin{methoddesc}{writepy}{pathname\optional{, basename}} Search for files \file{*.py} and add the corresponding file to the archive. The corresponding file is a \file{*.pyo} file if available, else a \file{*.pyc} file, compiling if necessary. If the pathname is a file, the filename must end with \file{.py}, and just ! the (corresponding \file{*.py[oc]}) file is added at the top level (no path information). If it is a directory, and the directory is ! not a package directory, then all the files \file{*.py[oc]} are added at the top level. If the directory is a package directory, then all \file{*.py[oc]} are added under the package name as a file --- 123,173 ---- \end{methoddesc} ! \begin{methoddesc}{testzip}{} ! Read all the files in the archive and check their CRC's. Return the ! name of the first bad file, or else return \code{None}. ! \end{methoddesc} ! ! \begin{methoddesc}{writestr}{bytes, arcname, year, month, day, ! hour, minute, second} Write the string \var{bytes} and the other data to the archive, and ! give the archive member the name \var{arcname}. The archive must be ! opened with mode \code{'w'} or \code{'a'}. \end{methoddesc} ! \begin{methoddesc}{write}{filename, arcname} Write the file named \var{filename} to the archive, giving it the ! archive name \var{arcname}. The archive must be open with mode ! \code{'w'} or \code{'a'}. ! \end{methoddesc} ! ! \begin{methoddesc}{close}{} ! Close the archive file. You must call \method{close()} before ! exiting your program or essential records will not be written. \end{methoddesc} + ! The following data attribute is also available: ! ! \begin{memberdesc}{debug} ! The level of debug output to use. This may be set from \code{0} ! (the default, no output) to \code{3} (the most output). Debugging ! information is written to \code{sys.stdout}. ! \end{memberdesc} ! ! ! \subsection{PyZipFile Objects \label{pyzipfile-objects}} ! ! The \class{PyZipFile} constructor takes the same parameters as the ! \class{ZipFile} constructor. Instances have one method in addition to ! those of \class{ZipFile} objects. ! ! \begin{methoddesc}[PyZipFile]{writepy}{pathname\optional{, basename}} Search for files \file{*.py} and add the corresponding file to the archive. The corresponding file is a \file{*.pyo} file if available, else a \file{*.pyc} file, compiling if necessary. If the pathname is a file, the filename must end with \file{.py}, and just ! the (corresponding \file{*.py[co]}) file is added at the top level (no path information). If it is a directory, and the directory is ! not a package directory, then all the files \file{*.py[co]} are added at the top level. If the directory is a package directory, then all \file{*.py[oc]} are added under the package name as a file *************** *** 172,177 **** \end{methoddesc} ! \begin{methoddesc}{close}{} ! Close the archive file. You must call \method{close()} before ! exiting your program or essential records will not be written. ! \end{methoddesc} --- 186,281 ---- \end{methoddesc} ! ! \subsection{ZipInfo Objects \label{zipinfo-objects}} ! ! Instances of the \class{ZipInfo} class are returned by the ! \method{getinfo()} and \method{listinfo()} methods of ! \class{ZipFile} objects. Each object stores information about a ! single member of the ZIP archive. ! ! Instances have the following attributes: ! ! \begin{memberdesc}[ZipInfo]{filename} ! Name of the file in the archive. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{date_time} ! The time and date of the last modification to to the archive ! member. This is a tuple of six values: ! ! \begin{tableii}{c|l}{code}{Index}{Value} ! \lineii{0}{Year} ! \lineii{1}{Month (one-based)} ! \lineii{2}{Day of month (one-based)} ! \lineii{3}{Hours (zero-based)} ! \lineii{4}{Minutes (zero-based)} ! \lineii{5}{Seconds (zero-based)} ! \end{tableii} ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{compress_type} ! Type of compression for the archive member. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{comment} ! Comment for the individual archive member. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{extra} ! Expansion field data. The ! \citetitle[http://www.pkware.com/appnote.html]{PKZIP Application ! Note} contains some comments on the internal structure of the data ! contained in this string. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{create_system} ! System which created ZIP archive. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{create_version} ! PKZIP version which created ZIP archive. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{extract_version} ! PKZIP version needed to extract archive. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{reserved} ! Must be zero. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{flag_bits} ! ZIP flag bits. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{volume} ! Volume number of file header. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{internal_attr} ! Internal attributes. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{external_attr} ! External file attributes. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{header_offset} ! Byte offset to the file header. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{file_offset} ! Byte offset to the start of the file data. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{CRC} ! CRC-32 of the uncompressed file. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{compress_size} ! Size of the compressed data. ! \end{memberdesc} ! ! \begin{memberdesc}[ZipInfo]{file_size} ! Size of the uncompressed file. ! \end{memberdesc} From python-dev@python.org Mon Oct 2 22:14:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 14:14:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib zipfile.py,1.3,1.4 Message-ID: <200010022114.OAA30971@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30928 Modified Files: zipfile.py Log Message: Delay import of py_compile until needed, since is is only used by the PyZipFile class. End sentences in docstrings with periods. Reformat docstrings to be more similar to those of other modules. Index: zipfile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/zipfile.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** zipfile.py 2000/09/29 20:44:48 1.3 --- zipfile.py 2000/10/02 21:14:52 1.4 *************** *** 1,8 **** ! "Read and write ZIP files" # Written by James C. Ahlstrom jim@interet.com # All rights transferred to CNRI pursuant to the Python contribution agreement import struct, os, time ! import binascii, py_compile try: --- 1,8 ---- ! "Read and write ZIP files." # Written by James C. Ahlstrom jim@interet.com # All rights transferred to CNRI pursuant to the Python contribution agreement import struct, os, time ! import binascii try: *************** *** 28,35 **** stringFileHeader = "PK\003\004" # magic number for file header def is_zipfile(filename): """Quickly see if file is a ZIP file by checking the magic number. ! Will not accept a ZIP archive with an ending comment.""" try: fpin = open(filename, "rb") --- 28,37 ---- stringFileHeader = "PK\003\004" # magic number for file header + def is_zipfile(filename): """Quickly see if file is a ZIP file by checking the magic number. ! Will not accept a ZIP archive with an ending comment. ! """ try: fpin = open(filename, "rb") *************** *** 42,47 **** pass class ZipInfo: ! "Class with attributes describing each file in the ZIP archive" def __init__(self, filename="NoName", date_time=(1980,1,1,0,0,0)): self.filename = filename # Name of the file in the archive --- 44,51 ---- pass + class ZipInfo: ! """Class with attributes describing each file in the ZIP archive.""" ! def __init__(self, filename="NoName", date_time=(1980,1,1,0,0,0)): self.filename = filename # Name of the file in the archive *************** *** 67,71 **** def FileHeader(self): ! 'Return the per-file header as a string' dt = self.date_time dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] --- 71,75 ---- def FileHeader(self): ! """Return the per-file header as a string.""" dt = self.date_time dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] *************** *** 87,93 **** class ZipFile: ! "Class with methods to open, read, write, close, list zip files" def __init__(self, filename, mode="r", compression=ZIP_STORED): ! 'Open the ZIP file with mode read "r", write "w" or append "a".' if compression == ZIP_STORED: pass --- 91,98 ---- class ZipFile: ! """Class with methods to open, read, write, close, list zip files.""" ! def __init__(self, filename, mode="r", compression=ZIP_STORED): ! """Open the ZIP file with mode read "r", write "w" or append "a".""" if compression == ZIP_STORED: pass *************** *** 124,128 **** def _GetContents(self): ! "Read in the table of contents for the zip file" fp = self.fp fp.seek(-22, 2) # Start of end-of-archive record --- 129,133 ---- def _GetContents(self): ! """Read in the table of contents for the ZIP file.""" fp = self.fp fp.seek(-22, 2) # Start of end-of-archive record *************** *** 185,189 **** def namelist(self): ! "Return a list of file names in the archive" l = [] for data in self.filelist: --- 190,194 ---- def namelist(self): ! """Return a list of file names in the archive.""" l = [] for data in self.filelist: *************** *** 192,200 **** def infolist(self): ! "Return a list of class ZipInfo instances for files in the archive" return self.filelist def printdir(self): ! "Print a table of contents for the zip file" print "%-46s %19s %12s" % ("File Name", "Modified ", "Size") for zinfo in self.filelist: --- 197,206 ---- def infolist(self): ! """Return a list of class ZipInfo instances for files in the ! archive.""" return self.filelist def printdir(self): ! """Print a table of contents for the zip file.""" print "%-46s %19s %12s" % ("File Name", "Modified ", "Size") for zinfo in self.filelist: *************** *** 203,207 **** def testzip(self): ! "Read all the files and check the CRC" for zinfo in self.filelist: try: --- 209,213 ---- def testzip(self): ! """Read all the files and check the CRC.""" for zinfo in self.filelist: try: *************** *** 211,219 **** def getinfo(self, name): ! 'Return the instance of ZipInfo given "name"' return self.NameToInfo[name] def read(self, name): ! "Return file bytes (as a string) for name" if self.mode not in ("r", "a"): raise RuntimeError, 'read() requires mode "r" or "a"' --- 217,225 ---- def getinfo(self, name): ! """Return the instance of ZipInfo given 'name'.""" return self.NameToInfo[name] def read(self, name): ! """Return file bytes (as a string) for name.""" if self.mode not in ("r", "a"): raise RuntimeError, 'read() requires mode "r" or "a"' *************** *** 249,253 **** def _writecheck(self, zinfo): ! 'Check for errors before writing a file to the archive' if self.NameToInfo.has_key(zinfo.filename): if self.debug: # Warning for duplicate names --- 255,259 ---- def _writecheck(self, zinfo): ! """Check for errors before writing a file to the archive.""" if self.NameToInfo.has_key(zinfo.filename): if self.debug: # Warning for duplicate names *************** *** 266,270 **** def write(self, filename, arcname=None, compress_type=None): ! 'Put the bytes from filename into the archive under the name arcname.' st = os.stat(filename) mtime = time.localtime(st[8]) --- 272,277 ---- def write(self, filename, arcname=None, compress_type=None): ! """Put the bytes from filename into the archive under the name ! arcname.""" st = os.stat(filename) mtime = time.localtime(st[8]) *************** *** 321,325 **** def writestr(self, zinfo, bytes): ! 'Write a file into the archive. The contents is the string "bytes"' self._writecheck(zinfo) zinfo.file_size = len(bytes) # Uncompressed size --- 328,333 ---- def writestr(self, zinfo, bytes): ! """Write a file into the archive. The contents is the string ! 'bytes'.""" self._writecheck(zinfo) zinfo.file_size = len(bytes) # Uncompressed size *************** *** 344,348 **** def __del__(self): ! 'Call the "close()" method in case the user forgot' if self.fp: self.fp.close() --- 352,356 ---- def __del__(self): ! """Call the "close()" method in case the user forgot.""" if self.fp: self.fp.close() *************** *** 350,354 **** def close(self): ! 'Close the file, and for mode "w" and "a" write the ending records' if self.mode in ("w", "a"): # write ending records count = 0 --- 358,363 ---- def close(self): ! """Close the file, and for mode "w" and "a" write the ending ! records.""" if self.mode in ("w", "a"): # write ending records count = 0 *************** *** 381,394 **** class PyZipFile(ZipFile): ! "Class to create ZIP archives with Python library files and packages" def writepy(self, pathname, basename = ""): """Add all files from "pathname" to the ZIP archive. ! If pathname is a package directory, search the directory and all ! package subdirectories recursively for all *.py and enter the modules into ! the archive. If pathname is a plain directory, listdir *.py and enter all ! modules. Else, pathname must be a Python *.py file and the module will be ! put into the archive. Added modules are always module.pyo or module.pyc. ! This method will compile the module.py into module.pyc if necessary.""" dir, name = os.path.split(pathname) if os.path.isdir(pathname): --- 390,407 ---- class PyZipFile(ZipFile): ! """Class to create ZIP archives with Python library files and packages.""" ! def writepy(self, pathname, basename = ""): """Add all files from "pathname" to the ZIP archive. ! If pathname is a package directory, search the directory and ! all package subdirectories recursively for all *.py and enter ! the modules into the archive. If pathname is a plain ! directory, listdir *.py and enter all modules. Else, pathname ! must be a Python *.py file and the module will be put into the ! archive. Added modules are always module.pyo or module.pyc. ! This method will compile the module.py into module.pyc if ! necessary. ! """ dir, name = os.path.split(pathname) if os.path.isdir(pathname): *************** *** 447,453 **** """Return (filename, archivename) for the path. ! Given a module name path, return the correct file path and archive name, ! compiling if necessary. For example, given /python/lib/string, ! return (/python/lib/string.pyc, string)""" file_py = pathname + ".py" file_pyc = pathname + ".pyc" --- 460,467 ---- """Return (filename, archivename) for the path. ! Given a module name path, return the correct file path and ! archive name, compiling if necessary. For example, given ! /python/lib/string, return (/python/lib/string.pyc, string). ! """ file_py = pathname + ".py" file_pyc = pathname + ".pyc" *************** *** 457,461 **** fname = file_pyo # Use .pyo file elif not os.path.isfile(file_pyc) or \ ! os.stat(file_pyc)[8] < os.stat(file_py)[8]: if self.debug: print "Compiling", file_py --- 471,476 ---- fname = file_pyo # Use .pyo file elif not os.path.isfile(file_pyc) or \ ! os.stat(file_pyc)[8] < os.stat(file_py)[8]: ! import py_compile if self.debug: print "Compiling", file_py *************** *** 468,470 **** archivename = "%s/%s" % (basename, archivename) return (fname, archivename) - --- 483,484 ---- From python-dev@python.org Mon Oct 2 22:20:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 14:20:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules Setup.in,1.110,1.111 Message-ID: <200010022120.OAA02677@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2611/Modules Modified Files: Setup.in Log Message: Remove comment about -lucb for the mmap module -- the module has been changed so that this is no longer needed on the only platform this is known to have been needed on. Fixed on indentation-related consistency nit. Index: Setup.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/Setup.in,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -r1.110 -r1.111 *** Setup.in 2000/09/15 18:55:58 1.110 --- Setup.in 2000/10/02 21:20:22 1.111 *************** *** 155,160 **** # Memory-mapped files (also works on Win32). ! # Some platforms require -lucb. ! mmap mmapmodule.c # -lucb # Socket module compiled with SSL support; you must edit the SSL variable: --- 155,159 ---- # Memory-mapped files (also works on Win32). ! mmap mmapmodule.c # Socket module compiled with SSL support; you must edit the SSL variable: *************** *** 183,187 **** #audioop audioop.c # Operations on audio samples #imageop imageop.c # Operations on images ! #rgbimg rgbimgmodule.c # Read SGI RGB image files (but coded portably) --- 182,186 ---- #audioop audioop.c # Operations on audio samples #imageop imageop.c # Operations on images ! #rgbimg rgbimgmodule.c # Read SGI RGB image files (but coded portably) From python-dev@python.org Mon Oct 2 22:26:31 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 14:26:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html index.html.in,1.10,1.11 Message-ID: <200010022126.OAA06983@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv6934/html Modified Files: index.html.in Log Message: Minor change to attributes so that the stylesheets can have better control. Index: index.html.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/index.html.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** index.html.in 2000/09/16 21:31:33 1.10 --- index.html.in 2000/10/02 21:26:28 1.11 *************** *** 31,35 ****
!

Python Documentation

--- 31,35 ----
!

Python Documentation

From python-dev@python.org Mon Oct 2 23:11:50 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 15:11:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib codecs.py,1.11,1.12 Message-ID: <200010022211.PAA09845@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9794/Lib Modified Files: codecs.py Log Message: Remove redundent information from a docstring. Index: codecs.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/codecs.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** codecs.py 2000/07/16 12:04:30 1.11 --- codecs.py 2000/10/02 22:11:47 1.12 *************** *** 522,528 **** encoding error occurs. - data_encoding and file_encoding are added to the wrapped file - object as attributes .data_encoding and .file_encoding resp. - The returned wrapped file object provides two extra attributes .data_encoding and .file_encoding which reflect the given --- 522,525 ---- From python-dev@python.org Mon Oct 2 23:14:12 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 15:14:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libxmllib.tex,1.27,1.28 Message-ID: <200010022214.PAA11974@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv11922/Doc/lib Modified Files: libxmllib.tex Log Message: Add deprecation note since the XML support is shaping up. Index: libxmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxmllib.tex,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** libxmllib.tex 2000/09/12 17:53:48 1.27 --- libxmllib.tex 2000/10/02 22:14:09 1.28 *************** *** 11,14 **** --- 11,17 ---- \index{Extensible Markup Language} + \deprecated{2.0}{Use \refmodule{xml.sax} instead. The newer XML + package includes full support for XML 1.0.} + \versionchanged{1.5.2} From python-dev@python.org Mon Oct 2 23:38:12 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 15:38:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/ext ext.tex,1.85,1.86 Message-ID: <200010022238.PAA29734@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/ext In directory slayer.i.sourceforge.net:/tmp/cvs-serv29667/ext Modified Files: ext.tex Log Message: Added some comments on the interaction of reload() and extension modules. Based on comments from Chris Barker . Index: ext.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/ext.tex,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -r1.85 -r1.86 *** ext.tex 2000/09/21 21:35:21 1.85 --- ext.tex 2000/10/02 22:38:09 1.86 *************** *** 436,440 **** \end{verbatim} ! And example may be found in the file \file{Demo/embed/demo.c} in the Python source distribution. --- 436,440 ---- \end{verbatim} ! An example may be found in the file \file{Demo/embed/demo.c} in the Python source distribution. *************** *** 445,448 **** --- 445,453 ---- Extension module authors should exercise caution when initializing internal data structures. + Note also that the \function{reload()} function can be used with + extension modules, and will call the module initialization function + (\cfunction{initspam()} in the example), but will not load the module + again if it was loaded from a dynamically loadable object file + (\file{.so} on \UNIX, \file{.dll} on Windows). A more substantial example module is included in the Python source From python-dev@python.org Tue Oct 3 00:04:05 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 2 Oct 2000 16:04:05 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.23,1.24 Message-ID: <200010022304.QAA19045@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv17756/nondist/peps Modified Files: pep-0042.txt Log Message: Provide a clearer error message when urlopen fails because of an invalid proxy setting. Minor change to call of unknown_url; always pass data argument explicitly since data defaults to None. PEP 42: Add as a feature that urllib handle proxy setting that contain only the host and port of the proxy. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** pep-0042.txt 2000/09/25 22:07:45 1.23 --- pep-0042.txt 2000/10/02 23:04:02 1.24 *************** *** 138,147 **** be parsed correctly. ! https://sourceforge.net/bugs/?func=detailbug&bug_id=110678&group_id=5470 - cgi.py's FieldStorage class should be more conservative with memory in the face of large binary file uploads. ! https://sourceforge.net/bugs/?func=detailbug&bug_id=110674&group_id=5470 There are two issues here: first, because --- 138,147 ---- be parsed correctly. ! http://sourceforge.net/bugs/?func=detailbug&bug_id=110678&group_id=5470 - cgi.py's FieldStorage class should be more conservative with memory in the face of large binary file uploads. ! http://sourceforge.net/bugs/?func=detailbug&bug_id=110674&group_id=5470 There are two issues here: first, because *************** *** 157,160 **** --- 157,165 ---- interface it /might/ be safe to remove it. OTOH, removing it will break code clever and nosy code. + + - urllib should support proxy definitions that contain just the + host and port + + http://sourceforge.net/bugs/?func=detailbug&bug_id=110849&group_id=5470 Tools From python-dev@python.org Tue Oct 3 00:04:05 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 2 Oct 2000 16:04:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.106,1.107 Message-ID: <200010022304.QAA19046@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv17756/dist/src/Lib Modified Files: urllib.py Log Message: Provide a clearer error message when urlopen fails because of an invalid proxy setting. Minor change to call of unknown_url; always pass data argument explicitly since data defaults to None. PEP 42: Add as a feature that urllib handle proxy setting that contain only the host and port of the proxy. Index: urllib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -r1.106 -r1.107 *** urllib.py 2000/09/24 18:51:25 1.106 --- urllib.py 2000/10/02 23:04:02 1.107 *************** *** 143,152 **** return addinfourl(fp, headers, fullurl) type, url = splittype(fullurl) ! if not type: type = 'file' if self.proxies.has_key(type): proxy = self.proxies[type] ! type, proxy = splittype(proxy) ! host, selector = splithost(proxy) url = (host, fullurl) # Signal special case to open_*() name = 'open_' + type self.type = type --- 143,155 ---- return addinfourl(fp, headers, fullurl) type, url = splittype(fullurl) ! if not type: ! type = 'file' if self.proxies.has_key(type): proxy = self.proxies[type] ! type, proxyhost = splittype(proxy) ! host, selector = splithost(proxyhost) url = (host, fullurl) # Signal special case to open_*() + else: + proxy = None name = 'open_' + type self.type = type *************** *** 155,160 **** name = string.join(string.split(name, '-'), '_') if not hasattr(self, name): ! if data is None: ! return self.open_unknown(fullurl) else: return self.open_unknown(fullurl, data) --- 158,163 ---- name = string.join(string.split(name, '-'), '_') if not hasattr(self, name): ! if proxy: ! return self.open_unknown_proxy(proxy, fullurl, data) else: return self.open_unknown(fullurl, data) *************** *** 171,174 **** --- 174,182 ---- type, url = splittype(fullurl) raise IOError, ('url error', 'unknown url type', type) + + def open_unknown_proxy(self, proxy, fullurl, data=None): + """Overridable interface to open unknown URL type.""" + type, url = splittype(fullurl) + raise IOError, ('url error', 'invalid proxy for %s' % type, proxy) # External interface From python-dev@python.org Tue Oct 3 01:09:27 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 2 Oct 2000 17:09:27 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.24,1.25 Message-ID: <200010030009.RAA07209@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv7141 Modified Files: pep-0042.txt Log Message: CGIHTTPServer has been ported to Windows (and possibly even Mac), so this request can go. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** pep-0042.txt 2000/10/02 23:04:02 1.24 --- pep-0042.txt 2000/10/03 00:09:23 1.25 *************** *** 106,113 **** http://sourceforge.net/bugs/?func=detailbug&bug_id=114245&group_id=5470 - - Port CGIHTTPServer to Windows. - - http://sourceforge.net/bugs/?func=detailbug&bug_id=110839&group_id=5470 - - cStringIO.StringIO class should be given a readlines() method for compatibility with StringIO.StringIO class. --- 106,109 ---- From python-dev@python.org Tue Oct 3 04:31:09 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:31:09 -0700 Subject: [Python-checkins] CVS: distutils/distutils util.py,1.54,1.55 Message-ID: <200010030331.UAA22705@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv21795 Modified Files: util.py Log Message: Added a long-winded comment (and commented-out comment to go with out) about how it would be nice to write absolute paths to the temporary byte-compilation script, but this doesn't work because it screws up the trailing-slash trickery done to 'prefix' in build_py's 'byte_compile()' method. Fixed to use 'execute()' instead of 'os.remove()' to remove the temporary script: now it doesn't blow up in dry-run mode! Index: util.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/util.py,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** util.py 2000/10/02 02:09:55 1.54 --- util.py 2000/10/03 03:31:05 1.55 *************** *** 354,357 **** --- 354,372 ---- files = [ """) + + # XXX would be nice to write absolute filenames, just for + # safety's sake (script should be more robust in the face of + # chdir'ing before running it). But this requires abspath'ing + # 'prefix' as well, and that breaks the hack in build_lib's + # 'byte_compile()' method that carefully tacks on a trailing + # slash (os.sep really) to make sure the prefix here is "just + # right". This whole prefix business is rather delicate -- the + # problem is that it's really a directory, but I'm treating it + # as a dumb string, so trailing slashes and so forth matter. + + #py_files = map(os.path.abspath, py_files) + #if prefix: + # prefix = os.path.abspath(prefix) + script.write(string.join(map(repr, py_files), ",\n") + "]\n") script.write(""" *************** *** 370,374 **** cmd.insert(1, "-OO") spawn(cmd, verbose=verbose, dry_run=dry_run) ! os.remove(script_name) # "Direct" byte-compilation: use the py_compile module to compile --- 385,390 ---- cmd.insert(1, "-OO") spawn(cmd, verbose=verbose, dry_run=dry_run) ! execute(os.remove, (script_name,), "removing %s" % script_name, ! verbose=verbose, dry_run=dry_run) # "Direct" byte-compilation: use the py_compile module to compile From python-dev@python.org Tue Oct 3 04:31:55 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:31:55 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install.py,1.51,1.52 Message-ID: <200010030331.UAA23148@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv23078 Modified Files: install.py Log Message: Fixed so --no-compile is a negative alias for --compile. Index: install.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install.py,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -r1.51 -r1.52 *** install.py 2000/10/02 02:16:04 1.51 --- install.py 2000/10/03 03:31:52 1.52 *************** *** 117,120 **** --- 117,121 ---- boolean_options = ['force', 'skip-build'] + negative_opt = {'no-compile' : 'compile'} From python-dev@python.org Tue Oct 3 04:32:39 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:32:39 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install_lib.py,1.36,1.37 Message-ID: <200010030332.UAA23547@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv23476 Modified Files: install_lib.py Log Message: Remove some debugging prints. Index: install_lib.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_lib.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** install_lib.py 2000/10/02 02:25:51 1.36 --- install_lib.py 2000/10/03 03:32:37 1.37 *************** *** 72,77 **** self.optimize = 0 - print "install_lib: compile=%s, optimize=%s" % \ - (`self.compile`, `self.optimize`) if type(self.optimize) is not IntType: try: --- 72,75 ---- From python-dev@python.org Tue Oct 3 04:33:05 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:33:05 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample4 - New directory Message-ID: <200010030333.UAA23775@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample4 In directory slayer.i.sourceforge.net:/tmp/cvs-serv23699/sample4 Log Message: Directory /cvsroot/python/distutils/examples/sample4 added to the repository From python-dev@python.org Tue Oct 3 04:33:05 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:33:05 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample5 - New directory Message-ID: <200010030333.UAA23777@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv23699/sample5 Log Message: Directory /cvsroot/python/distutils/examples/sample5 added to the repository From python-dev@python.org Tue Oct 3 04:33:05 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:33:05 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6 - New directory Message-ID: <200010030333.UAA23776@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6 In directory slayer.i.sourceforge.net:/tmp/cvs-serv23699/sample6 Log Message: Directory /cvsroot/python/distutils/examples/sample6 added to the repository From python-dev@python.org Tue Oct 3 04:36:33 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:36:33 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample4 script1,NONE,1.1 script2,NONE,1.1 script3,NONE,1.1 script4,NONE,1.1 setup.py,NONE,1.1 Message-ID: <200010030336.UAA24765@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample4 In directory slayer.i.sourceforge.net:/tmp/cvs-serv24745 Added Files: script1 script2 script3 script4 setup.py Log Message: Sample Distribution #4: demonstrate building/installing scripts. --- NEW FILE --- #!python print "hello!" --- NEW FILE --- #!/usr/bin/env python print "hello again" --- NEW FILE --- #! /usr/local/bin/python -u import sys sys.stdout.write("un") sys.stderr.write("buf") sys.stdout.write("fer") sys.stderr.write("ed") sys.stdout.write("\n") --- NEW FILE --- #!/bin/sh echo "FOO" --- NEW FILE --- #!/usr/bin/env python # # sample4 -- try out the "build_script" and "install_script" commands # from distutils.core import setup setup (name = "sample4", version = "0", description = "Distutils Sample #4", scripts = ['script1', 'script2', 'script3', 'script4'], ) From python-dev@python.org Tue Oct 3 04:37:33 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:37:33 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample5 config,NONE,1.1 data,NONE,1.1 setup.py,NONE,1.1 sys_config,NONE,1.1 Message-ID: <200010030337.UAA25036@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv25014 Added Files: config data setup.py sys_config Log Message: Sample Distribution #5: demonstrate installing data files. --- NEW FILE --- this goes in /etc --- NEW FILE --- this goes in /share --- NEW FILE --- #!/usr/bin/env python # # sample5 -- try out the "install_data" command # from distutils.core import setup setup (name = "sample5", description = "Distutils Sample #5", data_files = [("share", ["data"]), ("etc", ["config"]), ("/etc", ["sys_config"])]) --- NEW FILE --- this goes in /etc From python-dev@python.org Tue Oct 3 04:38:33 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:38:33 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6/lib/pkg - New directory Message-ID: <200010030338.UAA25288@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6/lib/pkg In directory slayer.i.sourceforge.net:/tmp/cvs-serv25256/lib/pkg Log Message: Directory /cvsroot/python/distutils/examples/sample6/lib/pkg added to the repository From python-dev@python.org Tue Oct 3 04:38:33 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:38:33 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6/lib - New directory Message-ID: <200010030338.UAA25289@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv25256/lib Log Message: Directory /cvsroot/python/distutils/examples/sample6/lib added to the repository From python-dev@python.org Tue Oct 3 04:40:00 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:40:00 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6 setup1.py,NONE,1.1 setup2.py,NONE,1.1 Message-ID: <200010030340.UAA25873@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6 In directory slayer.i.sourceforge.net:/tmp/cvs-serv25802 Added Files: setup1.py setup2.py Log Message: Sample Distribution #6: demonstrate/test the 'package_dir' option, both with listing modules one-at-a-time and by whole packages. --- NEW FILE --- # # sample6, setup1 # # test that 'package_dir' works with individual module names and the # root package # from distutils.core import setup setup (name = "sample 6", description = "Distutils Sample #6", py_modules = ['mod1', 'pkg.mod2'], package_dir = {'': 'lib'}, options = {'build': {'build_base': 'build1'}}, ) --- NEW FILE --- # # sample6, setup2 # # test that 'package_dir' works with package names and the root package # from distutils.core import setup setup (name = "sample 6", description = "Distutils Sample #6", packages = ['', 'pkg'], package_dir = {'': 'lib'}, options = {'build': {'build_base': 'build2'}}, ) From python-dev@python.org Tue Oct 3 04:40:01 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:40:01 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6/lib mod1.py,NONE,1.1 Message-ID: <200010030340.UAA25872@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv25802/lib Added Files: mod1.py Log Message: Sample Distribution #6: demonstrate/test the 'package_dir' option, both with listing modules one-at-a-time and by whole packages. --- NEW FILE --- print "importing mod1" From python-dev@python.org Tue Oct 3 04:40:01 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:40:01 -0700 Subject: [Python-checkins] CVS: distutils/examples/sample6/lib/pkg __init__.py,NONE,1.1 mod2.py,NONE,1.1 Message-ID: <200010030340.UAA25876@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/examples/sample6/lib/pkg In directory slayer.i.sourceforge.net:/tmp/cvs-serv25802/lib/pkg Added Files: __init__.py mod2.py Log Message: Sample Distribution #6: demonstrate/test the 'package_dir' option, both with listing modules one-at-a-time and by whole packages. --- NEW FILE --- --- NEW FILE --- print "importing pkg.mod2" From python-dev@python.org Tue Oct 3 04:46:19 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:46:19 -0700 Subject: [Python-checkins] CVS: distutils/doc README.txt,1.2,1.3 Message-ID: <200010030346.UAA27574@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv27553/doc Modified Files: README.txt Log Message: Brought up-to-date. Index: README.txt =================================================================== RCS file: /cvsroot/python/distutils/doc/README.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** README.txt 2000/06/28 03:51:45 1.2 --- README.txt 2000/10/03 03:46:11 1.3 *************** *** 7,12 **** the rest of the world in the standard way) ! These manuals will be a standard part of the Python 1.6 documentation ! set, and are tightly integrated with the standard Python documentation tools. That means that you won't be able to process the LaTeX files here without downloading the latest Python documentation tools. --- 7,12 ---- the rest of the world in the standard way) ! These manuals are a standard part of the Python 2.0 documentation set, ! and are tightly integrated with the standard Python documentation tools. That means that you won't be able to process the LaTeX files here without downloading the latest Python documentation tools. From python-dev@python.org Tue Oct 3 04:47:31 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:47:31 -0700 Subject: [Python-checkins] CVS: distutils MANIFEST.in,1.10,1.11 Message-ID: <200010030347.UAA27880@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv27829 Modified Files: MANIFEST.in Log Message: Include everything in the examples/ tree (except sample?/build), not just *.txt and *.py. Include doc/*.txt too. Don't include test/ tree -- still no working test suite, and the old test scripts have bit-rotted badly. ;-( Index: MANIFEST.in =================================================================== RCS file: /cvsroot/python/distutils/MANIFEST.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** MANIFEST.in 2000/09/01 01:07:33 1.10 --- MANIFEST.in 2000/10/03 03:47:29 1.11 *************** *** 11,18 **** include *.txt TODO include MANIFEST.in ! recursive-include examples *.txt *.py prune examples/sample*/build ! include doc/dist/*.tex doc/inst/*.tex graft misc exclude misc/*.zip global-exclude *~ --- 11,19 ---- include *.txt TODO include MANIFEST.in ! graft examples prune examples/sample*/build ! include doc/*.txt doc/dist/*.tex doc/inst/*.tex graft misc exclude misc/*.zip + prune test global-exclude *~ From python-dev@python.org Tue Oct 3 04:47:49 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:47:49 -0700 Subject: [Python-checkins] CVS: distutils README.txt,1.21,1.22 CHANGES.txt,1.15,1.16 Message-ID: <200010030347.UAA27990@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv27932 Modified Files: README.txt CHANGES.txt Log Message: Updated for release 1.0. Index: README.txt =================================================================== RCS file: /cvsroot/python/distutils/README.txt,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** README.txt 2000/09/27 00:18:33 1.21 --- README.txt 2000/10/03 03:47:46 1.22 *************** *** 1,5 **** Python Distribution Utilities ! release 0.9.4 ! September 26, 2000 --- 1,5 ---- Python Distribution Utilities ! release 1.0 ! October 2, 2000 *************** *** 15,22 **** The Distutils are a standard part of Python 1.6/2.0; if you are running ! 1.6/2.0, you don't need to install the Distutils separately. This ! release is primarily so that you can add the Distutils to a Python 1.5.2 ! installation -- you will then be able to install modules that require ! the Distutils, or use the Distutils to distribute your own modules. More information is available at the Distutils web page: --- 15,24 ---- The Distutils are a standard part of Python 1.6/2.0; if you are running ! 1.6/2.0, you don't need to install the Distutils separately. (But you ! might want to upgrade to Distutils 1.0 if you are using Python 1.6; see ! below.) This release is primarily so that you can add the Distutils to ! a Python 1.5.2 installation -- you will then be able to install modules ! that require the Distutils, or use the Distutils to distribute your own ! modules. More information is available at the Distutils web page: *************** *** 42,50 **** ------------ ! This release of the Distutils requires Python 1.5.2 or later. (If you ! absolutely must use Python 1.5.1, Distutils 0.1.5 is backwards ! compatible. However, I have dropped plans to port the current Distutils ! code back to Python 1.5.1, as I have received exactly zero complaints ! about requiring Python 1.5.2 since releasing Distutils 0.8 in April.) To use the Distutils under Unix, you must have a *complete* Python --- 44,48 ---- ------------ ! This release of the Distutils requires Python 1.5.2 or later. To use the Distutils under Unix, you must have a *complete* Python *************** *** 112,121 **** --------------------------------- ! The Distutils have been included with Python since 1.6a1, and Distutils ! 0.9.4 is the same as the code included with Python 2.0b2. Thus, there's ! generally no need to install the Distutils under Python 1.6/2.0. ! However, Distutils releases may occasionally get ahead of Python ! releases, so if you really like life on the bleeding edge, you might ! want to install this Distutils release into your Python 1.6/2.0 library. To do this, you'll need to hide the original Distutils package directory --- 110,131 ---- --------------------------------- ! The Distutils have been included with Python since 1.6a1; the ! correspondence between Python releases and Distutils releases is as ! follows: ! ! Python release: Distutils release: ! 1.6a1 pre 0.8 ! 1.6a2 0.8 ! 1.6b1 0.9 ! 1.6 0.9.1 ! 2.0b1 0.9.2 ! 2.0b2 0.9.3 ! 2.0 (planned) 1.0 ! ! There's generally no need to install the Distutils under Python 1.6/2.0. ! However, if you'd like to upgrade the Distutils in your Python 1.6 ! installation, or if future Distutils releases get ahead of the Distutils ! included with Python 2.0, you might want to install a newer Distutils ! release into your Python 1.6/2.0 library. To do this, you'll need to hide the original Distutils package directory *************** *** 159,166 **** http://www.python.org/sigs/distutils-sig/doc/ ! These two manuals will soon be included in the standard Python ! documentation set. If you are an installer (system administrator or end-user) and you'd like to try out the Distutils, you've already done so by installing the --- 169,182 ---- http://www.python.org/sigs/distutils-sig/doc/ + + These two manuals are also part of the standard Python documentation + set; Fred Drake maintains a copy of the complete Python documentation at ! http://www.pythonlabs.com/doc/manuals/ + Sometimes Fred's version is more recent, and sometimes my version is. + Join both doc-sig@python.org and distutils-sig@python.org if you really + want to follow the latest documentation developments. + If you are an installer (system administrator or end-user) and you'd like to try out the Distutils, you've already done so by installing the *************** *** 174,209 **** - BACKWARDS INCOMPATIBILITY NOTE - ------------------------------ - - There were a couple of small incompatibilities introduced with Distutils - 0.8 (the previous major release) that affected setup scripts. - Unfortunately, two of the major module distributions currently using the - Distutils -- Numerical Python and PyXML -- stumble across these - incompatibilities. If you need to build and install either of these - (or, in theory, any module distribution that used Distutils 0.1.x -- - although most will not be affected), you have two options: - - * stick with Distutils 0.1.x (to be avoided, especially if you are - running Python 1.6/2.0) - - * replace the setup script provided by the module distribution with - the Distutils 0.8-compatible version provided here (recommended) - - For example, if you want to build Numerical Python 15.2 using Distutils - 0.8.x or 0.9, you would: - - * rename the setup.py provided with Numerical Python 15.2, eg. to - "setup.py.orig" - - * copy "examples/numpy_setup.py" into the Numerical Python source - tree as "setup.py" - - * run "python setup.py install" for Numerical Python as usual - - Note that Numerical Python 15.3 (the current release as I write this) - works fine with Distutils 0.8.x and 0.9.x. - - EXAMPLES -------- --- 190,193 ---- *************** *** 302,313 **** - FUTURE PLANS - ------------ - - Distutils 1.0 will, if all goes well, be the version included with - Python 2.0 (final). (If all does not go well, that version will be - 1.0.1 or 1.0.2 or so.) - - CONTRIBUTING ------------ --- 286,289 ---- *************** *** 355,359 **** format; the "bdist_rpm" command * Rene Liebscher: smarter extension-building; Cygwin/Mingw32 support; ! more help options [spiritual, in roughly chronological order since the birth of the project] --- 331,336 ---- format; the "bdist_rpm" command * Rene Liebscher: smarter extension-building; Cygwin/Mingw32 support; ! more help options; general improvement to the CCompiler classes; ! lots of other patches and bug reports [spiritual, in roughly chronological order since the birth of the project] Index: CHANGES.txt =================================================================== RCS file: /cvsroot/python/distutils/CHANGES.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** CHANGES.txt 2000/09/27 00:18:33 1.15 --- CHANGES.txt 2000/10/03 03:47:46 1.16 *************** *** 1,2 **** --- 1,17 ---- + Release 1.0 (2 October, 2000): + ------------------------------ + * code cleanup: got rid of a lot of redundant code in the various + implementations of the abstract C compiler interface + (Rene Liebscher) + + * overhauled the byte-compilation options: you can now choose to + compile at either build-time or install-time (the default), and + compiling with or without optimization (at either optimization + level) works + + * cleaned up some cruft in the bdist_wininst command (both the + Python module and C source) (Thomas Heller) + + Release 0.9.4 (26 September, 2000): ----------------------------------- *************** *** 18,22 **** * more improvements to the bdist_wininst command and the ! installers it generates: ....... (Thomas Heller) * fix the "sdist" command so it deals better with missing, empty, --- 33,37 ---- * more improvements to the bdist_wininst command and the ! installers it generates: (Thomas Heller) * fix the "sdist" command so it deals better with missing, empty, From python-dev@python.org Tue Oct 3 04:48:45 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:48:45 -0700 Subject: [Python-checkins] CVS: distutils setup.py,1.25,1.26 Message-ID: <200010030348.UAA28265@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv28252 Modified Files: setup.py Log Message: Bump version to 1.0. Index: setup.py =================================================================== RCS file: /cvsroot/python/distutils/setup.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** setup.py 2000/09/27 02:26:56 1.25 --- setup.py 2000/10/03 03:48:43 1.26 *************** *** 12,16 **** setup (name = "Distutils", ! version = "1.0pre", description = "Python Distribution Utilities", author = "Greg Ward", --- 12,16 ---- setup (name = "Distutils", ! version = "1.0", description = "Python Distribution Utilities", author = "Greg Ward", From python-dev@python.org Tue Oct 3 04:48:45 2000 From: python-dev@python.org (Greg Ward) Date: Mon, 2 Oct 2000 20:48:45 -0700 Subject: [Python-checkins] CVS: distutils/distutils __init__.py,1.16,1.17 Message-ID: <200010030348.UAA28269@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv28252/distutils Modified Files: __init__.py Log Message: Bump version to 1.0. Index: __init__.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/__init__.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** __init__.py 2000/09/27 02:26:57 1.16 --- __init__.py 2000/10/03 03:48:43 1.17 *************** *** 11,13 **** __revision__ = "$Id$" ! __version__ = "1.0pre" --- 11,13 ---- __revision__ = "$Id$" ! __version__ = "1.0" From python-dev@python.org Tue Oct 3 06:56:58 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 22:56:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsmtplib.tex,1.15,1.16 Message-ID: <200010030556.WAA28891@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv28884/lib Modified Files: libsmtplib.tex Log Message: Replace minimal \seetext references with better annotated \seerfc references, telling the reader more about what to expect at the other end of the links. Index: libsmtplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsmtplib.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libsmtplib.tex 2000/07/16 19:01:10 1.15 --- libsmtplib.tex 2000/10/03 05:56:55 1.16 *************** *** 76,86 **** \begin{seealso} ! \seetext{Internet \rfc{821}, \emph{Simple Mail Transfer Protocol}. ! Available online at ! \url{http://info.internet.isi.edu/in-notes/rfc/files/rfc821.txt}.} ! ! \seetext{Internet \rfc{1869}, \emph{SMTP Service Extensions}. ! Available online at ! \url{http://info.internet.isi.edu/in-notes/rfc/files/rfc1869.txt}.} \end{seealso} --- 76,87 ---- \begin{seealso} ! \seerfc{821}{Simple Mail Transfer Protocol}{Protocol definition for ! SMTP. This document covers the model, operating procedure, ! and protocol details for SMTP.} ! \seerfc{1869}{SMTP Service Extensions}{Definition of the ESMTP ! extensions for SMTP. This describes a framework for ! extending SMTP with new commands, supporting dynamic ! discovery of the commands provided by the server, and ! defines a few additional commands.} \end{seealso} From python-dev@python.org Tue Oct 3 07:05:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 2 Oct 2000 23:05:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/perl python.perl,1.87,1.88 Message-ID: <200010030605.XAA30330@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/perl In directory slayer.i.sourceforge.net:/tmp/cvs-serv30299/perl Modified Files: python.perl Log Message: $OFF_SITE_LINK_ICON: Don't define here; simply defining it overrides a definition provided by previously loaded configuration code, and testing whether it's defined isn't needed since the default was false anyway. get_link_icon(): Add support for $OFF_SITE_LINK_ICON_HEIGHT and $OFF_SITE_LINK_ICON_WIDTH, giving the dimensions of the icon being used. This can make for faster page display. Both are optional. make_my_titlegraphic(): Fix insertion of the off-site icon link. do_env_funcdesc(): Remove debugging print. handle_rfclike_reference(): Remove trailing colon from first line; it doesn't really make sense and looks bad if we add an icon to mark off-site links. Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -r1.87 -r1.88 *** python.perl 2000/10/02 14:43:38 1.87 --- python.perl 2000/10/03 06:05:25 1.88 *************** *** 37,42 **** } - $OFF_SITE_LINK_ICON = ''; - sub get_link_icon($){ my $url = @_[0]; --- 37,40 ---- *************** *** 45,49 **** my $icon = make_icon_filename($OFF_SITE_LINK_ICON); return (" [off-site link]"); } --- 43,54 ---- my $icon = make_icon_filename($OFF_SITE_LINK_ICON); return (" [off-site link]"); } *************** *** 770,774 **** my $idx = make_str_index_entry("$function_name()" . get_indexsubitem()); - print "\n--- funcdesc arg_list:\n$arg_list\n==="; $idx =~ s/ \(.*\)//; $idx =~ s/\(\)<\/tt>/<\/tt>/; --- 775,778 ---- *************** *** 1294,1298 **** $graphic .= " height=\"$TITLE_PAGE_GRAPHIC_HEIGHT\"" if ($TITLE_PAGE_GRAPHIC_HEIGHT); ! $graphic .= "\n src=\"$mydir/$myname$myext\">\n"; return $graphic; } --- 1298,1302 ---- $graphic .= " height=\"$TITLE_PAGE_GRAPHIC_HEIGHT\"" if ($TITLE_PAGE_GRAPHIC_HEIGHT); ! $graphic .= "\n src=\"$filename\">\n"; return $graphic; } *************** *** 1481,1485 **** . "\n
$what $rfcnum, $title$icon:" . "\n
$text\n " . $_; --- 1485,1489 ---- . "\n
$what $rfcnum, $title$icon" . "\n
$text\n " . $_; *************** *** 1499,1504 **** my $title = next_argument(); my $text = next_argument(); - my $icon = get_link_icon($url); if ($url) { return '
' . "\n
' . "\n
Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5482 Modified Files: cgi.py Log Message: Change first line to #!/usr/bin/env python (really just to test check-in). Index: cgi.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -r1.53 -r1.54 *** cgi.py 2000/09/19 04:11:46 1.53 --- cgi.py 2000/10/03 08:32:00 1.54 *************** *** 1,3 **** ! #! /usr/local/bin/python """Support module for CGI (Common Gateway Interface) scripts. --- 1,3 ---- ! #!/usr/bin/env python """Support module for CGI (Common Gateway Interface) scripts. From python-dev@python.org Tue Oct 3 09:52:37 2000 From: python-dev@python.org (Fredrik Lundh) Date: Tue, 3 Oct 2000 10:52:37 +0200 Subject: [Python-checkins] CVS: python/dist/src/Lib cgi.py,1.53,1.54 References: <200010030832.BAA05615@slayer.i.sourceforge.net> Message-ID: <011801c02d17$48659b10$0900a8c0@SPIFF> > Change first line to #!/usr/bin/env python (really just to test check-in). hmm. cgi.py is a CGI script. according to the Python FAQ, CGI scripts should use an explicit path, not /usr/bin/env: "Note -- *don't* do this for CGI scripts. The $PATH variable for CGI scripts is often very minimal, so you need to use the actual absolute pathname of the interpreter." (since this comes up over and over again, maybe someone should add a comment to the file?) From python-dev@python.org Tue Oct 3 14:51:12 2000 From: python-dev@python.org (Guido van Rossum) Date: Tue, 3 Oct 2000 06:51:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib cgi.py,1.54,1.55 Message-ID: <200010031351.GAA29689@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv29633 Modified Files: cgi.py Log Message: Undo Ping's change. CGI scripts should *not* use /usr/bin/env, since on systems that don't come standard with Python installed, Python isn't on the default $PATH. Too bad that this breaks on Linux, where Python is in /usr/bin which is on the default path -- the point is that you must manually edit your CGI scripts when you install them. Index: cgi.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** cgi.py 2000/10/03 08:32:00 1.54 --- cgi.py 2000/10/03 13:51:09 1.55 *************** *** 1,3 **** ! #!/usr/bin/env python """Support module for CGI (Common Gateway Interface) scripts. --- 1,3 ---- ! #! /usr/local/bin/python """Support module for CGI (Common Gateway Interface) scripts. From python-dev@python.org Tue Oct 3 15:18:22 2000 From: python-dev@python.org (Jeremy Hylton) Date: Tue, 3 Oct 2000 07:18:22 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.25,1.26 Message-ID: <200010031418.HAA18986@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv16651 Modified Files: pep-0042.txt Log Message: remove cStringIO.readlines request; it's done add urlparse request; handle RFC 2396 urls Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** pep-0042.txt 2000/10/03 00:09:23 1.25 --- pep-0042.txt 2000/10/03 14:18:13 1.26 *************** *** 106,114 **** http://sourceforge.net/bugs/?func=detailbug&bug_id=114245&group_id=5470 - - cStringIO.StringIO class should be given a readlines() method - for compatibility with StringIO.StringIO class. - - http://sourceforge.net/bugs/?func=detailbug&bug_id=110686&group_id=5470 - - Extend copy.py to class, module & function types. --- 106,109 ---- *************** *** 158,161 **** --- 153,161 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110849&group_id=5470 + + - urlparse should be updated to comply with RFC 2396, which + defines optional parameters for each segment of the page. + + http://sourceforge.net/bugs/?func=detailbug&bug_id=110834&group_id=5470 Tools From python-dev@python.org Tue Oct 3 16:16:34 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 08:16:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libzipfile.tex,1.5,1.6 Message-ID: <200010031516.IAA30198@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv29713/lib Modified Files: libzipfile.tex Log Message: Jim Ahlstrom sent a few corrections to my changes. (Thanks!) Index: libzipfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzipfile.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** libzipfile.tex 2000/10/02 20:56:30 1.5 --- libzipfile.tex 2000/10/03 15:16:31 1.6 *************** *** 26,33 **** \end{excdesc} - \begin{datadesc}{_debug} - Level of printing, defaults to \code{1}. - \end{datadesc} - \begin{classdesc}{ZipFile}{\unspecified} The class for reading and writing ZIP files. See --- 26,29 ---- *************** *** 43,47 **** Class used the represent infomation about a member of an archive. Instances of this class are returned by the \method{getinfo()} and ! \method{listinfo()} methods of \class{ZipFile} objects. Most users of the \module{zipfile} module will not need to create these, but only use those created by this module. --- 39,43 ---- Class used the represent infomation about a member of an archive. Instances of this class are returned by the \method{getinfo()} and ! \method{infolist()} methods of \class{ZipFile} objects. Most users of the \module{zipfile} module will not need to create these, but only use those created by this module. *************** *** 100,107 **** the archive, and should be \constant{ZIP_STORED} or \constant{ZIP_DEFLATED}; unrecognized values will cause ! \exception{ValueError} to be raised. The default is \constant{ZIP_STORED}. \end{classdesc} \begin{methoddesc}{namelist}{} Return a list of archive members by name. --- 96,115 ---- the archive, and should be \constant{ZIP_STORED} or \constant{ZIP_DEFLATED}; unrecognized values will cause ! \exception{RuntimeError} to be raised. If \constant{ZIP_DEFLATED} ! is specified but the \refmodule{zlib} module is not avaialble, ! \exception{RuntimeError} is also raised. The default is \constant{ZIP_STORED}. \end{classdesc} + \begin{methoddesc}{close}{} + Close the archive file. You must call \method{close()} before + exiting your program or essential records will not be written. + \end{methoddesc} + + \begin{methoddesc}{getinfo}{name} + Return a \class{ZipInfo} object with information about the archive + member \var{name}. + \end{methoddesc} + \begin{methoddesc}{namelist}{} Return a list of archive members by name. *************** *** 127,147 **** name of the first bad file, or else return \code{None}. \end{methoddesc} - - \begin{methoddesc}{writestr}{bytes, arcname, year, month, day, - hour, minute, second} - Write the string \var{bytes} and the other data to the archive, and - give the archive member the name \var{arcname}. The archive must be - opened with mode \code{'w'} or \code{'a'}. - \end{methoddesc} ! \begin{methoddesc}{write}{filename, arcname} Write the file named \var{filename} to the archive, giving it the ! archive name \var{arcname}. The archive must be open with mode ! \code{'w'} or \code{'a'}. \end{methoddesc} ! \begin{methoddesc}{close}{} ! Close the archive file. You must call \method{close()} before ! exiting your program or essential records will not be written. \end{methoddesc} --- 135,154 ---- name of the first bad file, or else return \code{None}. \end{methoddesc} ! \begin{methoddesc}{write}{filename\optional{, arcname\optional{, ! compress_type}}} Write the file named \var{filename} to the archive, giving it the ! archive name \var{arcname} (by default, this will be the same as ! \var{filename}). If given, \var{compress_type} overrides the value ! given for the \var{compression} parameter to the constructor for ! the new entry. The archive must be open with mode \code{'w'} or ! \code{'a'}. \end{methoddesc} ! \begin{methoddesc}{writestr}{zinfo, bytes} ! Write the string \var{bytes} to the archive; meta-information is ! given as the \class{ZipInfo} instance \var{zinfo}. At least the ! filename, date, and time must be given by \var{zinfo}. The archive ! must be opened with mode \code{'w'} or \code{'a'}. \end{methoddesc} *************** *** 190,194 **** Instances of the \class{ZipInfo} class are returned by the ! \method{getinfo()} and \method{listinfo()} methods of \class{ZipFile} objects. Each object stores information about a single member of the ZIP archive. --- 197,201 ---- Instances of the \class{ZipInfo} class are returned by the ! \method{getinfo()} and \method{infolist()} methods of \class{ZipFile} objects. Each object stores information about a single member of the ZIP archive. From python-dev@python.org Tue Oct 3 16:45:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 08:45:01 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.26,1.27 Message-ID: <200010031545.IAA18349@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv18309 Modified Files: pep-0042.txt Log Message: Added item that "continue" inside "try" should be fixed; the current behavior has been described as an implementation limitation. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** pep-0042.txt 2000/10/03 14:18:13 1.26 --- pep-0042.txt 2000/10/03 15:44:58 1.27 *************** *** 45,48 **** --- 45,60 ---- build with MSVC. + - "continue" inside "try" should work as expect instead of raising + SyntaxError. The current behavior is considered an implementation + limit. + + while 1: + try: + continue + except: + pass + + http://sourceforge.net/bugs/?func=detailbug&bug_id=110830&group_id=5470 + Standard Library From python-dev@python.org Tue Oct 3 17:02:09 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 3 Oct 2000 09:02:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python import.c,2.152,2.153 Message-ID: <200010031602.JAA32617@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv32538 Modified Files: import.c Log Message: _PyImport_Fini(): Closed small memory leak when an embedded app calls Py_Initialize()/Py_Finalize() in a loop. _PyImport_Filetab needed to be deallocated. Partial closure of SF #110681, Jitterbug PR#398. Index: import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.152 retrieving revision 2.153 diff -C2 -r2.152 -r2.153 *** import.c 2000/09/29 04:03:10 2.152 --- import.c 2000/10/03 16:02:05 2.153 *************** *** 133,136 **** --- 133,138 ---- Py_XDECREF(extensions); extensions = NULL; + PyMem_DEL(_PyImport_Filetab); + _PyImport_Filetab = NULL; } From python-dev@python.org Tue Oct 3 17:29:26 2000 From: python-dev@python.org (Fredrik Lundh) Date: Tue, 3 Oct 2000 09:29:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.43,2.44 Message-ID: <200010031629.JAA22095@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv21244/Modules Modified Files: _sre.c Log Message: Fixed negative lookahead/lookbehind. Closes bug #115618. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.43 retrieving revision 2.44 diff -C2 -r2.43 -r2.44 *** _sre.c 2000/09/26 05:46:01 2.43 --- _sre.c 2000/10/03 16:29:22 2.44 *************** *** 21,24 **** --- 21,25 ---- * 2000-09-20 fl added expand method * 2000-09-21 fl don't use the buffer interface for unicode strings + * 2000-10-03 fl fixed assert_not primitive * * Copyright (c) 1997-2000 by Secret Labs AB. All rights reserved. *************** *** 775,780 **** if (i <= 0) return i; - if (pattern[1] > 0 && state->ptr != ptr) - return SRE_ERROR_STATE; pattern += pattern[0]; break; --- 776,779 ---- *************** *** 792,797 **** if (i) return 0; - if (pattern[1] > 0 && state->ptr != ptr) - return SRE_ERROR_STATE; pattern += pattern[0]; break; --- 791,794 ---- From python-dev@python.org Tue Oct 3 17:29:26 2000 From: python-dev@python.org (Fredrik Lundh) Date: Tue, 3 Oct 2000 09:29:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test re_tests.py,1.21,1.22 Message-ID: <200010031629.JAA22101@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv21244/Lib/test Modified Files: re_tests.py Log Message: Fixed negative lookahead/lookbehind. Closes bug #115618. Index: re_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** re_tests.py 2000/09/24 14:46:23 1.21 --- re_tests.py 2000/10/03 16:29:23 1.22 *************** *** 616,618 **** --- 616,620 ---- ('(', '', SYNTAX_ERROR), ('[\\41]', '!', SUCCEED, 'found', '!'), + # bug 115618 + (r'(? Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv25917 Modified Files: pep-0042.txt Log Message: added reference to another "continue inside try" bug/feature request, but didn't close it. It's similar, but not exactly the same as the normal implementation limit. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** pep-0042.txt 2000/10/03 15:44:58 1.27 --- pep-0042.txt 2000/10/03 16:34:55 1.28 *************** *** 57,60 **** --- 57,65 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110830&group_id=5470 + though still open as of this change, the following bug report is + similar, though not quite the same, and should be checked for closure + when this feature request is addressed. + + http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115143 Standard Library From python-dev@python.org Tue Oct 3 17:50:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 09:50:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.201,1.202 Message-ID: <200010031650.JAA06580@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv6527 Modified Files: Makefile Log Message: Bump the release number for the upcoming candidate. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.201 retrieving revision 1.202 diff -C2 -r1.201 -r1.202 *** Makefile 2000/09/22 16:18:19 1.201 --- Makefile 2000/10/03 16:50:48 1.202 *************** *** 65,69 **** # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.0b2 --- 65,69 ---- # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.0c1 From python-dev@python.org Tue Oct 3 17:51:11 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 3 Oct 2000 09:51:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_pty.py,1.4,1.5 Message-ID: <200010031651.JAA06853@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv4948/Lib/test Modified Files: test_pty.py Log Message: On some systems (like Solaris), the master end of a tty/pty pair is apparently not considered a terminal, and so isatty(3) returns false. So we skip the test for ttyness of the master side and just check the slave side, which should really be a terminal. Index: test_pty.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pty.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_pty.py 2000/08/04 13:34:43 1.4 --- test_pty.py 2000/10/03 16:51:08 1.5 *************** *** 28,33 **** raise TestSkipped, "Pseudo-terminals (seemingly) not functional." - if not os.isatty(master_fd): - raise TestFailed, "master_fd is not a tty" if not os.isatty(slave_fd): raise TestFailed, "slave_fd is not a tty" --- 28,31 ---- From python-dev@python.org Tue Oct 3 17:54:29 2000 From: python-dev@python.org (Thomas Wouters) Date: Tue, 3 Oct 2000 09:54:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.174,2.175 Message-ID: <200010031654.JAA09301@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv8699/Modules Modified Files: posixmodule.c Log Message: Clarify that isatty is only guaranteed to return true for slave ends of terminals, not the master end (though it does, on most systems.) Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.174 retrieving revision 2.175 diff -C2 -r2.174 -r2.175 *** posixmodule.c 2000/09/25 13:22:00 2.174 --- posixmodule.c 2000/10/03 16:54:24 2.175 *************** *** 3469,3473 **** "isatty(fd) -> Boolean\n\ Return true if the file descriptor 'fd' is an open file descriptor\n\ ! connected to a terminal."; static PyObject * --- 3469,3473 ---- "isatty(fd) -> Boolean\n\ Return true if the file descriptor 'fd' is an open file descriptor\n\ ! connected to the slave end of a terminal."; static PyObject * From python-dev@python.org Tue Oct 3 18:11:40 2000 From: python-dev@python.org (Guido van Rossum) Date: Tue, 3 Oct 2000 10:11:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib site.py,1.19,1.20 Message-ID: <200010031711.KAA22580@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv22509 Modified Files: site.py Log Message: Fix a few problems with the _Printer class and the license variable. 1. repr(license) will no longer print to stdout and read from stdin; you have to use license(). `license` is a short message explaining this. 2. Use lazy initialization so that startup isn't slowed down by the search for the LICENSE file. 3. repr(license) actually returns the desired string, rather than printing to stdout and returning ''. (Why didn't we think of this before?) 4. Use the pythonlabs license URL as the license fallback instead of the CNRI license handle. Index: site.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** site.py 2000/09/28 16:52:36 1.19 --- site.py 2000/10/03 17:11:37 1.20 *************** *** 146,154 **** MAXLINES = 23 ! def __init__(self, s): ! self.__lines = s.split('\n') self.__linecnt = len(self.__lines) def __repr__(self): prompt = 'Hit Return for more, or q (and Return) to quit: ' lineno = 0 --- 146,186 ---- MAXLINES = 23 ! def __init__(self, name, data, files=(), dirs=()): ! self.__name = name ! self.__data = data ! self.__files = files ! self.__dirs = dirs ! self.__lines = None ! ! def __setup(self): ! if self.__lines: ! return ! data = None ! for dir in self.__dirs: ! for file in self.__files: ! file = os.path.join(dir, file) ! try: ! fp = open(file) ! data = fp.read() ! fp.close() ! break ! except IOError: ! pass ! if data: ! break ! if not data: ! data = self.__data ! self.__lines = data.split('\n') self.__linecnt = len(self.__lines) def __repr__(self): + self.__setup() + if len(self.__lines) <= self.MAXLINES: + return "\n".join(self.__lines) + else: + return "Type %s() to see the full %s text" % ((self.__name,)*2) + + def __call__(self): + self.__setup() prompt = 'Hit Return for more, or q (and Return) to quit: ' lineno = 0 *************** *** 168,194 **** if key == 'q': break - return '' - - __builtin__.copyright = _Printer(sys.copyright) - __builtin__.credits = _Printer( - '''Python development is led by BeOpen PythonLabs (www.pythonlabs.com).''') - - def make_license(filename): - try: - return _Printer(open(filename).read()) - except IOError: - return None here = os.path.dirname(os.__file__) ! for dir in here, os.path.join(here, os.pardir), os.curdir: ! for file in "LICENSE.txt", "LICENSE": ! lic = make_license(os.path.join(dir, file)) ! if lic: ! break ! if lic: ! __builtin__.license = lic ! break ! else: ! __builtin__.license = _Printer('See http://hdl.handle.net/1895.22/1012') --- 200,212 ---- if key == 'q': break + __builtin__.copyright = _Printer("copyright", sys.copyright) + __builtin__.credits = _Printer("credits", + "Python development is led by BeOpen PythonLabs (www.pythonlabs.com).") here = os.path.dirname(os.__file__) ! __builtin__.license = _Printer( ! "license", "See http://www.pythonlabs.com/products/python2.0/license.html", ! ["LICENSE.txt", "LICENSE"], ! [here, os.path.join(here, os.pardir), os.curdir]) From python-dev@python.org Tue Oct 3 18:14:30 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 10:14:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.49,1.50 Message-ID: <200010031714.KAA24748@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24705/lib Modified Files: libos.tex Log Message: Remove old note that os.popen() on Windows is unreliable; this is no longer true. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** libos.tex 2000/09/29 04:15:19 1.49 --- libos.tex 2000/10/03 17:14:27 1.50 *************** *** 283,289 **** available as the return value of the \method{close()} method of the file object, except that when the exit status is zero (termination without ! errors), \code{None} is returned. \strong{Note:} This function ! behaves unreliably under Windows due to the native implementation of ! \cfunction{popen()}. Availability: \UNIX{}, Windows. \end{funcdesc} --- 283,287 ---- available as the return value of the \method{close()} method of the file object, except that when the exit status is zero (termination without ! errors), \code{None} is returned. Availability: \UNIX{}, Windows. \end{funcdesc} From python-dev@python.org Tue Oct 3 19:09:07 2000 From: python-dev@python.org (Guido van Rossum) Date: Tue, 3 Oct 2000 11:09:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.64,2.65 Message-ID: <200010031809.LAA05513@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv5377 Modified Files: unicodeobject.c Log Message: In _PyUnicode_Fini(), decref unicode_empty before tearng down the free list. Discovered by Barry, fix approved by MAL. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.64 retrieving revision 2.65 diff -C2 -r2.64 -r2.65 *** unicodeobject.c 2000/09/26 05:46:01 2.64 --- unicodeobject.c 2000/10/03 18:09:04 2.65 *************** *** 5226,5229 **** --- 5226,5231 ---- PyUnicodeObject *u = unicode_freelist; + Py_XDECREF(unicode_empty); + unicode_empty = NULL; while (u != NULL) { PyUnicodeObject *v = u; *************** *** 5236,5240 **** unicode_freelist = NULL; unicode_freelist_size = 0; - Py_XDECREF(unicode_empty); - unicode_empty = NULL; } --- 5238,5240 ---- From python-dev@python.org Tue Oct 3 20:22:30 2000 From: python-dev@python.org (Fredrik Lundh) Date: Tue, 3 Oct 2000 12:22:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test re_tests.py,1.22,1.23 Message-ID: <200010031922.MAA06202@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv3131/Lib/test Modified Files: re_tests.py Log Message: Recompile pattern if (?x) flag was found inside the pattern during the first scan. Closes bug #115040. Index: re_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** re_tests.py 2000/10/03 16:29:23 1.22 --- re_tests.py 2000/10/03 19:22:26 1.23 *************** *** 613,620 **** # bug 111869 (PRE/PCRE fails on this one, SRE doesn't) (r'.*d', 'abc\nabd', SUCCEED, 'found', 'abd'), ! # bug 112468 ('(', '', SYNTAX_ERROR), ('[\\41]', '!', SUCCEED, 'found', '!'), ! # bug 115618 (r'(? Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3131/Lib Modified Files: sre_parse.py Log Message: Recompile pattern if (?x) flag was found inside the pattern during the first scan. Closes bug #115040. Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** sre_parse.py 2000/09/24 14:46:19 1.34 --- sre_parse.py 2000/10/03 19:22:26 1.35 *************** *** 594,597 **** --- 594,602 ---- # p.dump() + if not (flags & SRE_FLAG_VERBOSE) and p.pattern.flags & SRE_FLAG_VERBOSE: + # the VERBOSE flag was switched on inside the pattern. to be + # on the safe side, we'll parse the whole thing again... + return parse(str, p.pattern.flags) + return p From python-dev@python.org Tue Oct 3 21:37:42 2000 From: python-dev@python.org (Guido van Rossum) Date: Tue, 3 Oct 2000 13:37:42 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.28,1.29 Message-ID: <200010032037.NAA32006@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv31973 Modified Files: pep-0042.txt Log Message: Properly record Skip's gripe, which was really that the compiler *appeared to* accept the first continue but complained about the second. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** pep-0042.txt 2000/10/03 16:34:55 1.28 --- pep-0042.txt 2000/10/03 20:37:39 1.29 *************** *** 57,63 **** http://sourceforge.net/bugs/?func=detailbug&bug_id=110830&group_id=5470 ! though still open as of this change, the following bug report is ! similar, though not quite the same, and should be checked for closure ! when this feature request is addressed. http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115143 --- 57,63 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110830&group_id=5470 ! - When the compiler pass complains about something, ! e.g. "continue" inside "try", it should complain about the ! *first* error, not the second or last. http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115143 From python-dev@python.org Tue Oct 3 21:43:38 2000 From: python-dev@python.org (Fredrik Lundh) Date: Tue, 3 Oct 2000 13:43:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.44,2.45 Message-ID: <200010032043.NAA04246@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2745/Modules Modified Files: _sre.c Log Message: Accept keyword arguments for (most) pattern and match object methods. Closes buglet #115845. Index: _sre.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** _sre.c 2000/10/03 16:29:22 2.44 --- _sre.c 2000/10/03 20:43:34 2.45 *************** *** 21,25 **** * 2000-09-20 fl added expand method * 2000-09-21 fl don't use the buffer interface for unicode strings ! * 2000-10-03 fl fixed assert_not primitive * * Copyright (c) 1997-2000 by Secret Labs AB. All rights reserved. --- 21,25 ---- * 2000-09-20 fl added expand method * 2000-09-21 fl don't use the buffer interface for unicode strings ! * 2000-10-03 fl fixed assert_not primitive; support keyword arguments * * Copyright (c) 1997-2000 by Secret Labs AB. All rights reserved. *************** *** 1515,1519 **** static PyObject* ! pattern_match(PatternObject* self, PyObject* args) { SRE_STATE state; --- 1515,1519 ---- static PyObject* ! pattern_match(PatternObject* self, PyObject* args, PyObject* kw) { SRE_STATE state; *************** *** 1523,1527 **** int start = 0; int end = INT_MAX; ! if (!PyArg_ParseTuple(args, "O|ii:match", &string, &start, &end)) return NULL; --- 1523,1529 ---- int start = 0; int end = INT_MAX; ! static char* kwlist[] = { "pattern", "pos", "endpos", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "O|ii:match", kwlist, ! &string, &start, &end)) return NULL; *************** *** 1550,1554 **** static PyObject* ! pattern_search(PatternObject* self, PyObject* args) { SRE_STATE state; --- 1552,1556 ---- static PyObject* ! pattern_search(PatternObject* self, PyObject* args, PyObject* kw) { SRE_STATE state; *************** *** 1558,1562 **** int start = 0; int end = INT_MAX; ! if (!PyArg_ParseTuple(args, "O|ii:search", &string, &start, &end)) return NULL; --- 1560,1566 ---- int start = 0; int end = INT_MAX; ! static char* kwlist[] = { "pattern", "pos", "endpos", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "O|ii:search", kwlist, ! &string, &start, &end)) return NULL; *************** *** 1608,1617 **** static PyObject* ! pattern_sub(PatternObject* self, PyObject* args) { PyObject* template; PyObject* string; PyObject* count = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "OO|O:sub", &template, &string, &count)) return NULL; --- 1612,1623 ---- static PyObject* ! pattern_sub(PatternObject* self, PyObject* args, PyObject* kw) { PyObject* template; PyObject* string; PyObject* count = Py_False; /* zero */ ! static char* kwlist[] = { "repl", "string", "count", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|O:sub", kwlist, ! &template, &string, &count)) return NULL; *************** *** 1621,1630 **** static PyObject* ! pattern_subn(PatternObject* self, PyObject* args) { PyObject* template; PyObject* string; PyObject* count = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "OO|O:subn", &template, &string, &count)) return NULL; --- 1627,1638 ---- static PyObject* ! pattern_subn(PatternObject* self, PyObject* args, PyObject* kw) { PyObject* template; PyObject* string; PyObject* count = Py_False; /* zero */ ! static char* kwlist[] = { "repl", "string", "count", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|O:subn", kwlist, ! &template, &string, &count)) return NULL; *************** *** 1634,1642 **** static PyObject* ! pattern_split(PatternObject* self, PyObject* args) { PyObject* string; PyObject* maxsplit = Py_False; /* zero */ ! if (!PyArg_ParseTuple(args, "O|O:split", &string, &maxsplit)) return NULL; --- 1642,1652 ---- static PyObject* ! pattern_split(PatternObject* self, PyObject* args, PyObject* kw) { PyObject* string; PyObject* maxsplit = Py_False; /* zero */ ! static char* kwlist[] = { "source", "maxsplit", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "O|O:split", kwlist, ! &string, &maxsplit)) return NULL; *************** *** 1646,1650 **** static PyObject* ! pattern_findall(PatternObject* self, PyObject* args) { SRE_STATE state; --- 1656,1660 ---- static PyObject* ! pattern_findall(PatternObject* self, PyObject* args, PyObject* kw) { SRE_STATE state; *************** *** 1656,1660 **** int start = 0; int end = INT_MAX; ! if (!PyArg_ParseTuple(args, "O|ii:findall", &string, &start, &end)) return NULL; --- 1666,1672 ---- int start = 0; int end = INT_MAX; ! static char* kwlist[] = { "source", "pos", "endpos", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "O|ii:findall", kwlist, ! &string, &start, &end)) return NULL; *************** *** 1746,1757 **** static PyMethodDef pattern_methods[] = { ! {"match", (PyCFunction) pattern_match, 1}, ! {"search", (PyCFunction) pattern_search, 1}, ! {"sub", (PyCFunction) pattern_sub, 1}, ! {"subn", (PyCFunction) pattern_subn, 1}, ! {"split", (PyCFunction) pattern_split, 1}, ! {"findall", (PyCFunction) pattern_findall, 1}, /* experimental */ ! {"scanner", (PyCFunction) pattern_scanner, 1}, {NULL, NULL} }; --- 1758,1769 ---- static PyMethodDef pattern_methods[] = { ! {"match", (PyCFunction) pattern_match, METH_VARARGS|METH_KEYWORDS}, ! {"search", (PyCFunction) pattern_search, METH_VARARGS|METH_KEYWORDS}, ! {"sub", (PyCFunction) pattern_sub, METH_VARARGS|METH_KEYWORDS}, ! {"subn", (PyCFunction) pattern_subn, METH_VARARGS|METH_KEYWORDS}, ! {"split", (PyCFunction) pattern_split, METH_VARARGS|METH_KEYWORDS}, ! {"findall", (PyCFunction) pattern_findall, METH_VARARGS|METH_KEYWORDS}, /* experimental */ ! {"scanner", (PyCFunction) pattern_scanner, METH_VARARGS}, {NULL, NULL} }; *************** *** 1915,1919 **** static PyObject* ! match_groups(MatchObject* self, PyObject* args) { PyObject* result; --- 1927,1931 ---- static PyObject* ! match_groups(MatchObject* self, PyObject* args, PyObject* kw) { PyObject* result; *************** *** 1921,1925 **** PyObject* def = Py_None; ! if (!PyArg_ParseTuple(args, "|O:groups", &def)) return NULL; --- 1933,1938 ---- PyObject* def = Py_None; ! static char* kwlist[] = { "default", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:groups", kwlist, &def)) return NULL; *************** *** 1942,1946 **** static PyObject* ! match_groupdict(MatchObject* self, PyObject* args) { PyObject* result; --- 1955,1959 ---- static PyObject* ! match_groupdict(MatchObject* self, PyObject* args, PyObject* kw) { PyObject* result; *************** *** 1949,1953 **** PyObject* def = Py_None; ! if (!PyArg_ParseTuple(args, "|O:groupdict", &def)) return NULL; --- 1962,1967 ---- PyObject* def = Py_None; ! static char* kwlist[] = { "default", NULL }; ! if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:groups", kwlist, &def)) return NULL; *************** *** 2110,2120 **** static PyMethodDef match_methods[] = { ! {"group", (PyCFunction) match_group, 1}, ! {"start", (PyCFunction) match_start, 1}, ! {"end", (PyCFunction) match_end, 1}, ! {"span", (PyCFunction) match_span, 1}, ! {"groups", (PyCFunction) match_groups, 1}, ! {"groupdict", (PyCFunction) match_groupdict, 1}, ! {"expand", (PyCFunction) match_expand, 1}, {NULL, NULL} }; --- 2124,2134 ---- static PyMethodDef match_methods[] = { ! {"group", (PyCFunction) match_group, METH_VARARGS}, ! {"start", (PyCFunction) match_start, METH_VARARGS}, ! {"end", (PyCFunction) match_end, METH_VARARGS}, ! {"span", (PyCFunction) match_span, METH_VARARGS}, ! {"groups", (PyCFunction) match_groups, METH_VARARGS|METH_KEYWORDS}, ! {"groupdict", (PyCFunction) match_groupdict, METH_VARARGS|METH_KEYWORDS}, ! {"expand", (PyCFunction) match_expand, METH_VARARGS}, {NULL, NULL} }; From python-dev@python.org Tue Oct 3 21:45:29 2000 From: python-dev@python.org (Barry Warsaw) Date: Tue, 3 Oct 2000 13:45:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.65,2.66 Message-ID: <200010032045.NAA05812@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv5729 Modified Files: unicodeobject.c Log Message: _PyUnicode_Fini(): Initialize the local freelist walking variable `u' after unicode_empty has been freed, otherwise it might not point to the real start of the unicode_freelist. Final closure for SF bug #110681, Jitterbug PR#398. Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.65 retrieving revision 2.66 diff -C2 -r2.65 -r2.66 *** unicodeobject.c 2000/10/03 18:09:04 2.65 --- unicodeobject.c 2000/10/03 20:45:26 2.66 *************** *** 5224,5232 **** _PyUnicode_Fini(void) { ! PyUnicodeObject *u = unicode_freelist; Py_XDECREF(unicode_empty); unicode_empty = NULL; ! while (u != NULL) { PyUnicodeObject *v = u; u = *(PyUnicodeObject **)u; --- 5224,5233 ---- _PyUnicode_Fini(void) { ! PyUnicodeObject *u; Py_XDECREF(unicode_empty); unicode_empty = NULL; ! ! for (u = unicode_freelist; u != NULL;) { PyUnicodeObject *v = u; u = *(PyUnicodeObject **)u; From python-dev@python.org Tue Oct 3 23:10:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 15:10:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools findacks,NONE,1.1 Message-ID: <200010032210.PAA09324@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv9286 Added Files: findacks Log Message: Preliminary tool to troll through the CVS logs and LaTeX sources for the names of people that should be in the ACKS file. This relies on some personal code that is not yet available, but should be by the time we release 2.0c1. --- NEW FILE --- #!/usr/bin/env python """Script to locate email addresses in the CVS logs.""" __version__ = '$Revision: 1.1 $' import os import re import sys import UserDict import fdrake.cvstools.info cvstools = fdrake.cvstools class Acknowledgements(UserDict.UserDict): def add(self, email, name, path): d = self.data d.setdefault(email, {})[path] = name def open_cvs_log(info, paths=None): cvsroot = info.get_cvsroot() cmd = "cvs -q -d%s log " % cvsroot if paths: cmd += " ".join(paths) return os.popen(cmd, "r") email_rx = re.compile("<([a-z][-a-z0-9._]*@[-a-z0-9.]+)>", re.IGNORECASE) def find_acks(f, acks): prev = '' filename = None MAGIC_WORDS = ('van', 'von') while 1: line = f.readline() if not line: break if line.startswith("Working file: "): filename = line.split(None, 2)[2].strip() prev = line continue m = email_rx.search(line) if m: words = prev.split() + line[:m.start()].split() L = [] while words \ and (words[-1][0].isupper() or words[-1] in MAGIC_WORDS): L.insert(0, words.pop()) name = " ".join(L) email = m.group(1).lower() acks.add(email, name, filename) prev = line def load_cvs_log_acks(acks, args): repolist = cvstools.info.get_repository_list(args or [""]) for info, paths in repolist: print >>sys.stderr, "Repository:", info.get_cvsroot() f = open_cvs_log(info, paths) find_acks(f, acks) f.close() def load_tex_source_acks(acks, args): for path in args: path = path or os.curdir if os.path.isfile(path): read_acks_from_tex_file(acks, path) else: read_acks_from_tex_dir(acks, path) def read_acks_from_tex_file(acks, path): f = open(path) while 1: line = f.readline() if not line: break if line.startswith(r"\sectionauthor{"): line = line[len(r"\sectionauthor"):] name, line = extract_tex_group(line) email, line = extract_tex_group(line) acks.add(email, name, path) def read_acks_from_tex_dir(acks, path): stack = [path] while stack: p = stack.pop() for n in os.listdir(p): n = os.path.join(p, n) if os.path.isdir(n): stack.insert(0, n) elif os.path.normpath(n).endswith(".tex"): read_acks_from_tex_file(acks, n) def extract_tex_group(s): c = 0 for i in range(len(s)): if s[i] == '{': c += 1 elif s[i] == '}': c -= 1 if c == 0: return s[1:i], s[i+1:] def print_acks(acks): first = 1 for email, D in acks.items(): if first: first = 0 else: print L = D.items() L.sort() prefname = L[0][1] for file, name in L[1:]: if name != prefname: prefname = "" break if prefname: print prefname, "<%s>:" % email else: print email + ":" for file, name in L: if name == prefname: print " " + file else: print " %s (as %s)" % (file, name) def print_ack_names(acks): names = [] for email, D in acks.items(): L = D.items() L.sort() prefname = L[0][1] for file, name in L[1:]: prefname = prefname or name names.append(prefname or email) def f(s1, s2): s1 = s1.lower() s2 = s2.lower() return cmp((s1.split()[-1], s1), (s2.split()[-1], s2)) names.sort(f) for name in names: print name def main(): args = sys.argv[1:] acks = Acknowledgements() load_cvs_log_acks(acks, args) load_tex_source_acks(acks, args) print_ack_names(acks) if __name__ == "__main__": main() From python-dev@python.org Tue Oct 3 23:35:31 2000 From: python-dev@python.org (Martin v. Löwis) Date: Tue, 3 Oct 2000 15:35:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax saxutils.py,1.8,1.9 Message-ID: <200010032235.PAA30562@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv29759/xml/sax Modified Files: saxutils.py Log Message: Support non-namespace elements in *ElementNS of XMLGenerator. Index: saxutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/saxutils.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** saxutils.py 2000/09/26 17:23:09 1.8 --- saxutils.py 2000/10/03 22:35:26 1.9 *************** *** 63,67 **** def startElementNS(self, name, qname, attrs): ! name = self._current_context[name[0]] + ":" + name[1] self._out.write('<' + name) --- 63,72 ---- def startElementNS(self, name, qname, attrs): ! if name[0] is None: ! # if the name was not namespace-scoped, use the unqualified part ! name = name[1] ! else: ! # else try to restore the original prefix from the namespace ! name = self._current_context[name[0]] + ":" + name[1] self._out.write('<' + name) *************** *** 76,80 **** def endElementNS(self, name, qname): ! name = self._current_context[name[0]] + ":" + name[1] self._out.write('' % name) --- 81,88 ---- def endElementNS(self, name, qname): ! if name[0] is None: ! name = name[1] ! else: ! name = self._current_context[name[0]] + ":" + name[1] self._out.write('' % name) From python-dev@python.org Tue Oct 3 23:35:31 2000 From: python-dev@python.org (Martin v. Löwis) Date: Tue, 3 Oct 2000 15:35:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_sax.py,1.7,1.8 Message-ID: <200010032235.PAA30567@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv29759/test Modified Files: test_sax.py Log Message: Support non-namespace elements in *ElementNS of XMLGenerator. Index: test_sax.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sax.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** test_sax.py 2000/09/27 08:12:17 1.7 --- test_sax.py 2000/10/03 22:35:29 1.8 *************** *** 113,121 **** gen.startPrefixMapping("ns1", ns_uri) gen.startElementNS((ns_uri, "doc"), "ns1:doc", {}) gen.endElementNS((ns_uri, "doc"), "ns1:doc") gen.endPrefixMapping("ns1") gen.endDocument() ! return result.getvalue() == start + ('' % ns_uri) --- 113,125 ---- gen.startPrefixMapping("ns1", ns_uri) gen.startElementNS((ns_uri, "doc"), "ns1:doc", {}) + # add an unqualified name + gen.startElementNS((None, "udoc"), None, {}) + gen.endElementNS((None, "udoc"), None) gen.endElementNS((ns_uri, "doc"), "ns1:doc") gen.endPrefixMapping("ns1") gen.endDocument() ! return result.getvalue() == start + \ ! ('' % ns_uri) From python-dev@python.org Wed Oct 4 00:07:19 2000 From: python-dev@python.org (Tim Peters) Date: Tue, 3 Oct 2000 16:07:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib popen2.py,1.16,1.17 Message-ID: <200010032307.QAA23758@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv23182/python/dist/src/lib Modified Files: popen2.py Log Message: test_popen2 broke on Windows shortly after 2.0b2 was released. Fixed it. Index: popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/popen2.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** popen2.py 2000/09/28 19:07:53 1.16 --- popen2.py 2000/10/03 23:07:13 1.17 *************** *** 112,116 **** if sys.platform[:3] == "win": # Some things don't make sense on non-Unix platforms. ! del Popen3, Popen4, _active, _cleanup def popen2(cmd, bufsize=-1, mode='t'): --- 112,116 ---- if sys.platform[:3] == "win": # Some things don't make sense on non-Unix platforms. ! del Popen3, Popen4 def popen2(cmd, bufsize=-1, mode='t'): From python-dev@python.org Wed Oct 4 05:21:22 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 3 Oct 2000 21:21:22 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libstdtypes.tex,1.38,1.39 Message-ID: <200010040421.VAA07839@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv7812/lib Modified Files: libstdtypes.tex Log Message: Use \obindex{...} instead of \indexii{...}{type} in many places; this is more consistent with other index entries in the documentation. Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** libstdtypes.tex 2000/09/21 05:25:30 1.38 --- libstdtypes.tex 2000/10/04 04:21:19 1.39 *************** *** 167,176 **** their precision are off unless you happen to know the machine you are working with. ! \indexii{numeric}{types} ! \indexii{integer}{types} ! \indexii{integer}{type} ! \indexiii{long}{integer}{type} ! \indexii{floating point}{type} ! \indexii{complex number}{type} \indexii{C}{language} --- 167,175 ---- their precision are off unless you happen to know the machine you are working with. ! \obindex{numeric} ! \obindex{integer} ! \obindex{long integer} ! \obindex{floating point} ! \obindex{complex number} \indexii{C}{language} *************** *** 333,343 **** create them, but they are created using the \function{xrange()} function.\bifuncindex{xrange} ! \indexii{sequence}{types} ! \indexii{string}{type} ! \indexii{Unicode}{type} ! \indexii{buffer}{type} ! \indexii{tuple}{type} ! \indexii{list}{type} ! \indexii{xrange}{type} Sequence types support the following operations. The \samp{in} and --- 332,342 ---- create them, but they are created using the \function{xrange()} function.\bifuncindex{xrange} ! \obindex{sequence} ! \obindex{string} ! \obindex{Unicode} ! \obindex{buffer} ! \obindex{tuple} ! \obindex{list} ! \obindex{xrange} Sequence types support the following operations. The \samp{in} and *************** *** 648,652 **** \subsubsection{XRange Type \label{typesseq-xrange}} ! The xrange\indexii{xrange}{type} type is an immutable sequence which is commonly used for looping. The advantage of the xrange type is that an xrange object will always take the same amount of memory, no matter the --- 647,651 ---- \subsubsection{XRange Type \label{typesseq-xrange}} ! The xrange\obindex{xrange} type is an immutable sequence which is commonly used for looping. The advantage of the xrange type is that an xrange object will always take the same amount of memory, no matter the *************** *** 673,677 **** \var{x} is an arbitrary object): \indexiii{mutable}{sequence}{types} ! \indexii{list}{type} \begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes} --- 672,676 ---- \var{x} is an arbitrary object): \indexiii{mutable}{sequence}{types} ! \obindex{list} \begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes} *************** *** 750,755 **** \subsection{Mapping Types \label{typesmapping}} ! \indexii{mapping}{types} ! \indexii{dictionary}{type} A \dfn{mapping} object maps values of one type (the key type) to --- 749,754 ---- \subsection{Mapping Types \label{typesmapping}} ! \obindex{mapping} ! \obindex{dictionary} A \dfn{mapping} object maps values of one type (the key type) to From python-dev@python.org Wed Oct 4 14:39:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 06:39:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html about.html,1.1,1.2 index.html.in,1.11,1.12 Message-ID: <200010041339.GAA23569@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv23499/html Modified Files: about.html index.html.in Log Message: Remove styling information that conflicts with or duplicates the stylesheet; different browsers resolve the conflicts differently, and the "proper" resolution is not what we actually want. Reported by Peter Funk . Index: about.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/about.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** about.html 2000/09/08 21:53:22 1.1 --- about.html 2000/10/04 13:39:23 1.2 *************** *** 8,12 **** ! ''' HEAD = '''\ %(title)s ''' + NAVIGATION + '''\

%(title)s

''' TAIL = "
\n" + NAVIGATION + '''\ %(address)s ''' From python-dev@python.org Thu Oct 5 06:14:29 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:14:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools mkmodindex,1.7,1.8 Message-ID: <200010050514.WAA29448@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv29398/tools Modified Files: mkmodindex Log Message: Use the new support module instead of including all the getopt processing and style information directly. Index: mkmodindex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkmodindex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** mkmodindex 2000/10/04 13:39:24 1.7 --- mkmodindex 2000/10/05 05:14:26 1.8 *************** *** 27,50 **** """ import buildindex - import getopt import os import re import string import sys ! def usage(): ! program = os.path.basename(sys.argv[0]) ! print __doc__ % {"program": program} ! - def error(msg, rc=2): - sys.stdout = sys.stderr - print msg - print - usage() - sys.exit(rc) - _rx = re.compile( "
" --- 27,52 ---- """ import buildindex import os import re import string + import support import sys ! class IndexOptions(support.Options): ! def __init__(self): ! support.Options.__init__(self) ! self.add_args("l", ["letters"]) ! self.letters = 0 ! ! def handle_option(self, opt, val): ! if opt in ("-l", "--letters"): ! self.letters = 1 ! ! def usage(self): ! program = os.path.basename(sys.argv[0]) ! print __doc__ % {"program": program} _rx = re.compile( "
" *************** *** 53,106 **** def main(): ! outputfile = "-" ! columns = 1 ! letters = 0 ! uplink = "./" ! uptitle = "Python Documentation Index" ! variables = {"address": "", ! "iconserver": "icons", ! "imgtype": "gif", ! "title": "Global Module Index", ! "uplinkalt": "up", ! "uplinkicon": "up", ! } ! try: ! opts, args = getopt.getopt(sys.argv[1:], "a:c:hlo:", ! [# script controls: ! "columns=", "help", "letters", "output=", ! # content components: ! "address=", "iconserver=", ! "title=", "uplink=", "uptitle="]) ! except getopt.error, msg: ! error(msg) ! for opt, val in opts: ! if opt in ("-a", "--address"): ! val = string.strip(val) ! variables["address"] = val and "
\n%s\n
\n" % val ! elif opt in ("-h", "--help"): ! usage() ! sys.exit() ! elif opt in ("-o", "--output"): ! outputfile = val ! elif opt in ("-c", "--columns"): ! columns = string.atoi(val) ! elif opt in ("-l", "--letters"): ! letters = 1 ! elif opt == "--title": ! variables["title"] = string.strip(val) ! elif opt == "--uplink": ! uplink = string.strip(val) ! elif opt == "--uptitle": ! uptitle = string.strip(val) ! elif opt == "--iconserver": ! variables["iconserver"] = string.strip(val) or "." ! if uplink and uptitle: ! variables["uplinkalt"] = "up" ! variables["uplinkicon"] = "up" ! else: ! variables["uplinkalt"] = "" ! variables["uplinkicon"] = "blank" ! variables["uplink"] = uplink ! variables["uptitle"] = uptitle if not args: args = ["-"] --- 55,62 ---- def main(): ! options = IndexOptions() ! options.variables["title"] = "Global Module Index" ! options.parse(sys.argv[1:]) ! args = options.args if not args: args = ["-"] *************** *** 139,145 **** num_nodes = len(nodes) # Here's the HTML generation: ! parts = [HEAD % variables, ! buildindex.process_nodes(nodes, columns, letters), ! TAIL % variables, ] if has_plat_flag: --- 95,101 ---- num_nodes = len(nodes) # Here's the HTML generation: ! parts = [options.get_header(), ! buildindex.process_nodes(nodes, options.columns, options.letters), ! options.get_footer(), ] if has_plat_flag: *************** *** 147,155 **** html = string.join(parts, '') program = os.path.basename(sys.argv[0]) ! if outputfile == "-": ! sys.stdout.write(html) ! sys.stderr.write("%s: %d index nodes\n" % (program, num_nodes)) else: - open(outputfile, "w").write(html) print print "%s: %d index nodes" % (program, num_nodes) --- 103,111 ---- html = string.join(parts, '') program = os.path.basename(sys.argv[0]) ! fp = options.get_output_file() ! print >>fp, html.rstrip() ! if options.outputfile == "-": ! print >>sys.stderr, "%s: %d index nodes" % (program, num_nodes) else: print print "%s: %d index nodes" % (program, num_nodes) *************** *** 162,211 **** """ - NAVIGATION = '''\ -
- ''' - - HEAD = '''\ - - - - Global Module Index - - - - - - ''' + NAVIGATION + '''\ -
- -

%(title)s

- - ''' - - TAIL = "
\n" + NAVIGATION + '''\ - %(address)s - - ''' if __name__ == "__main__": --- 118,121 ---- From python-dev@python.org Thu Oct 5 06:15:31 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:15:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools mkackshtml,NONE,1.1 Message-ID: <200010050515.WAA29938@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv29910/tools Added Files: mkackshtml Log Message: New script to convert the ACKS file to a nicely formatted HTML file. Uses the new support module. --- NEW FILE --- #! /usr/bin/env python # -*- Python -*- import support import sys def collect(fp): names = [] while 1: line = fp.readline() if not line: break line = line.strip() if line: names.append(line) else: names = [] return names def main(): options = support.Options() options.columns = 4 options.variables["title"] = "Acknowledgements" options.parse(sys.argv[1:]) names = collect(sys.stdin) percol = (len(names) + options.columns - 1) / options.columns colnums = [percol*i for i in range(options.columns)] fp = options.get_output_file() print >>fp, options.get_header().rstrip() print >>fp, THANKS print >>fp, '' for i in range(percol): print >>fp, " " for j in colnums: try: print >>fp, " " % names[i + j] except IndexError: print >>fp, " " print >>fp, " " print >>fp, "
%s 
" print >>fp, options.get_footer().rstrip() THANKS = '''\

These people have contributed in some way to the Python documentation. This list is probably not complete -- if you feel that you or anyone else should be on this list, please let us know (send email to python-docs@python.org), and we will be glad to correct the problem.

It is only with the input and contributions of the Python community that Python has such wonderful documentation -- Thank You!

''' if __name__ == "__main__": main() From python-dev@python.org Thu Oct 5 06:16:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:16:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html .cvsignore,1.8,1.9 Message-ID: <200010050516.WAA30328@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv30299/html Modified Files: .cvsignore Log Message: Ignore the acks.html file, since it is generated. Index: .cvsignore =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/.cvsignore,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** .cvsignore 2000/04/28 17:45:27 1.8 --- .cvsignore 2000/10/05 05:16:12 1.9 *************** *** 8,11 **** --- 8,12 ---- dist inst + acks.html index.html modindex.html From python-dev@python.org Thu Oct 5 06:16:58 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:16:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html Makefile,1.37,1.38 Message-ID: <200010050516.WAA30756@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv30730/html Modified Files: Makefile Log Message: Add rules for generating the acks.html file at the top of the document tree. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/Makefile,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** Makefile 2000/09/12 19:53:18 1.37 --- Makefile 2000/10/05 05:16:56 1.38 *************** *** 60,64 **** # The index.html target is at the end since it screws up font-lock. ! modindex.html: lib/lib.html mac/mac.html $(TOOLSDIR)/mkmodindex $(TOOLSDIR)/mkmodindex --columns 4 --output modindex.html \ --address $(PYTHONDOCS) \ --- 60,69 ---- # The index.html target is at the end since it screws up font-lock. ! acks.html: ../ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml ! $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) --output acks.html \ ! <../ACKS ! ! modindex.html: $(TOOLSDIR)/support.py $(TOOLSDIR)/mkmodindex ! modindex.html: lib/lib.html mac/mac.html $(TOOLSDIR)/mkmodindex --columns 4 --output modindex.html \ --address $(PYTHONDOCS) \ *************** *** 108,112 **** distclean realclean clobber: clean ! rm -rf index.html modindex.html rm -rf api/ doc/ ext/ lib/ mac/ ref/ tut/ inst/ dist/ --- 113,117 ---- distclean realclean clobber: clean ! rm -rf index.html modindex.html acks.html rm -rf api/ doc/ ext/ lib/ mac/ ref/ tut/ inst/ dist/ From python-dev@python.org Thu Oct 5 06:17:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:17:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html about.html,1.2,1.3 Message-ID: <200010050517.WAA31055@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv31014/html Modified Files: about.html Log Message: Add a link to the new acks.html file. Index: about.html =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/about.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** about.html 2000/10/04 13:39:23 1.2 --- about.html 2000/10/05 05:17:29 1.3 *************** *** 46,49 **** --- 46,51 ---- href="http://www.python.org/">Python Web site. +

A list of contributors is available. +

Comments and Questions

From python-dev@python.org Thu Oct 5 06:20:57 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 4 Oct 2000 22:20:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools support.py,1.1,1.2 Message-ID: <200010050520.WAA32367@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv32343/tools Modified Files: support.py Log Message: Better add at least a short docstring to the module! Index: support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/support.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** support.py 2000/10/05 05:11:57 1.1 --- support.py 2000/10/05 05:20:55 1.2 *************** *** 1,3 **** ! """ """ __version__ = '$Revision$' --- 1,7 ---- ! """Miscellaneous support code shared by some of the tool scripts. ! ! This includes option parsing code, HTML formatting code, and a couple of ! useful helpers. ! """ __version__ = '$Revision$' From python-dev@python.org Thu Oct 5 11:54:48 2000 From: python-dev@python.org (Mark Hammond) Date: Thu, 5 Oct 2000 03:54:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python dynload_win.c,2.6,2.7 Message-ID: <200010051054.DAA21558@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv21547 Modified Files: dynload_win.c Log Message: Detect conflicting Python DLL on module import under Windows - as per [ Patch #101676 ] Index: dynload_win.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_win.c,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** dynload_win.c 2000/09/01 23:29:28 2.6 --- dynload_win.c 2000/10/05 10:54:45 2.7 *************** *** 4,7 **** --- 4,8 ---- #include #include + #include #include "Python.h" *************** *** 20,28 **** dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, const char *pathname, FILE *fp) { dl_funcptr p; ! char funcname[258]; sprintf(funcname, "init%.200s", shortname); --- 21,162 ---- + #ifdef MS_WIN32 + + /* Case insensitive string compare, to avoid any dependencies on particular + C RTL implementations */ + + static int strcasecmp (char *string1, char *string2) + { + int first, second; + + do { + first = tolower(*string1); + second = tolower(*string2); + string1++; + string2++; + } while (first && first == second); + + return (first - second); + } + + + /* Function to return the name of the "python" DLL that the supplied module + directly imports. Looks through the list of imported modules and + returns the first entry that starts with "python" (case sensitive) and + is followed by nothing but numbers until the separator (period). + + Returns a pointer to the import name, or NULL if no matching name was + located. + + This function parses through the PE header for the module as loaded in + memory by the system loader. The PE header is accessed as documented by + Microsoft in the MSDN PE and COFF specification (2/99), and handles + both PE32 and PE32+. It only worries about the direct import table and + not the delay load import table since it's unlikely an extension is + going to be delay loading Python (after all, it's already loaded). + + If any magic values are not found (e.g., the PE header or optional + header magic), then this function simply returns NULL. */ + + #define DWORD_AT(mem) (*(DWORD *)(mem)) + #define WORD_AT(mem) (*(WORD *)(mem)) + + static char *GetPythonImport (HINSTANCE hModule) + { + unsigned char *dllbase, *import_data, *import_name; + DWORD pe_offset, opt_offset; + WORD opt_magic; + int num_dict_off, import_off; + + /* Safety check input */ + if (hModule == NULL) { + return NULL; + } + + /* Module instance is also the base load address. First portion of + memory is the MS-DOS loader, which holds the offset to the PE + header (from the load base) at 0x3C */ + dllbase = (unsigned char *)hModule; + pe_offset = DWORD_AT(dllbase + 0x3C); + + /* The PE signature must be "PE\0\0" */ + if (memcmp(dllbase+pe_offset,"PE\0\0",4)) { + return NULL; + } + + /* Following the PE signature is the standard COFF header (20 + bytes) and then the optional header. The optional header starts + with a magic value of 0x10B for PE32 or 0x20B for PE32+ (PE32+ + uses 64-bits for some fields). It might also be 0x107 for a ROM + image, but we don't process that here. + + The optional header ends with a data dictionary that directly + points to certain types of data, among them the import entries + (in the second table entry). Based on the header type, we + determine offsets for the data dictionary count and the entry + within the dictionary pointing to the imports. */ + + opt_offset = pe_offset + 4 + 20; + opt_magic = WORD_AT(dllbase+opt_offset); + if (opt_magic == 0x10B) { + /* PE32 */ + num_dict_off = 92; + import_off = 104; + } else if (opt_magic == 0x20B) { + /* PE32+ */ + num_dict_off = 108; + import_off = 120; + } else { + /* Unsupported */ + return NULL; + } + + /* Now if an import table exists, offset to it and walk the list of + imports. The import table is an array (ending when an entry has + empty values) of structures (20 bytes each), which contains (at + offset 12) a relative address (to the module base) at which a + string constant holding the import name is located. */ + + if (DWORD_AT(dllbase + opt_offset + num_dict_off) >= 2) { + import_data = dllbase + DWORD_AT(dllbase + + opt_offset + + import_off); + while (DWORD_AT(import_data)) { + import_name = dllbase + DWORD_AT(import_data+12); + if (strlen(import_name) >= 6 && + !strncmp(import_name,"python",6)) { + char *pch; + + /* Ensure python prefix is followed only + by numbers to the end of the basename */ + pch = import_name + 6; + while (*pch && *pch != '.') { + if (*pch >= '0' && *pch <= '9') { + pch++; + } else { + pch = NULL; + break; + } + } + + if (pch) { + /* Found it - return the name */ + return import_name; + } + } + import_data += 20; + } + } + + return NULL; + } + #endif /* MS_WIN32 */ + + dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, const char *pathname, FILE *fp) { dl_funcptr p; ! char funcname[258], *import_python; sprintf(funcname, "init%.200s", shortname); *************** *** 92,95 **** --- 226,246 ---- PyErr_SetString(PyExc_ImportError, errBuf); return NULL; + } else { + char buffer[256]; + + sprintf(buffer,"python%d%d.dll", + PY_MAJOR_VERSION,PY_MINOR_VERSION); + import_python = GetPythonImport(hDLL); + + if (import_python && + strcasecmp(buffer,import_python)) { + sprintf(buffer, + "Module use of %s conflicts " + "with this version of Python.", + import_python); + PyErr_SetString(PyExc_ImportError,buffer); + FreeLibrary(hDLL); + return NULL; + } } p = GetProcAddress(hDLL, funcname); From python-dev@python.org Thu Oct 5 13:35:33 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 5 Oct 2000 05:35:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.54,1.55 Message-ID: <200010051235.FAA06638@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6488 Modified Files: libre.tex Log Message: Document expand() method of MatchObjects Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** libre.tex 2000/09/25 17:52:40 1.54 --- libre.tex 2000/10/05 12:35:29 1.55 *************** *** 598,601 **** --- 598,610 ---- \class{MatchObject} instances support the following methods and attributes: + \begin{methoddesc}[MatchObject]{expand}{template} + Return the string obtained by doing backslash substitution on the + template string \var{template}, as done by the \method{sub()} method. + Escapes such as \samp{\e n} are converted to the appropriate + characters, and numeric backreferences (\samp{\e 1}, \samp{\e 2}) and named + backreferences (\samp{\e g<1>}, \samp{\e g}) are replaced by the contents of the + corresponding group. + \end{methoddesc} + \begin{methoddesc}[MatchObject]{group}{\optional{group1, \moreargs}} Returns one or more subgroups of the match. If there is a single From python-dev@python.org Thu Oct 5 13:43:27 2000 From: python-dev@python.org (Thomas Wouters) Date: Thu, 5 Oct 2000 05:43:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.54,2.55 Message-ID: <200010051243.FAA13743@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv11586/Objects Modified Files: abstract.c Log Message: Fix for SF bug #115987: PyInstance_HalfBinOp does not initialize the result-object-pointer that is passed in, when an exception occurs during coercion. The pointer has to be explicitly initialized in the caller to avoid putting trash on the Python stack. Index: abstract.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v retrieving revision 2.54 retrieving revision 2.55 diff -C2 -r2.54 -r2.55 *** abstract.c 2000/09/02 08:34:40 2.54 --- abstract.c 2000/10/05 12:43:25 2.55 *************** *** 652,656 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 652,656 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 684,688 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 684,688 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 716,720 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 716,720 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 748,752 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 748,752 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 780,784 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 780,784 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 812,816 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 812,816 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 856,860 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 856,860 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 889,893 **** PyObject * (*f)(PyObject *, PyObject *) = NULL; PyObject * (*g)(PyObject *, int) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 889,893 ---- PyObject * (*f)(PyObject *, PyObject *) = NULL; PyObject * (*g)(PyObject *, int) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 956,960 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 956,960 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 988,992 **** { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 988,992 ---- { PyObject * (*f)(PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { *************** *** 1027,1031 **** { PyObject * (*f)(PyObject *, PyObject *, PyObject *) = NULL; ! PyObject *x; if (PyInstance_Check(v)) { --- 1027,1031 ---- { PyObject * (*f)(PyObject *, PyObject *, PyObject *) = NULL; ! PyObject *x = NULL; if (PyInstance_Check(v)) { From python-dev@python.org Thu Oct 5 15:35:18 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 5 Oct 2000 07:35:18 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0200.txt,1.43,1.44 Message-ID: <200010051435.HAA11846@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv11392 Modified Files: pep-0200.txt Log Message: update schedule for 2.0c1; add explanation of release candidate Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** pep-0200.txt 2000/09/14 20:53:48 1.43 --- pep-0200.txt 2000/10/05 14:35:13 1.44 *************** *** 17,24 **** Tentative Release Schedule ! [revised 14 Sep 2000] 26-Sep-2000: 2.0 beta 2 ! 10-Oct-2000: 2.0 final Previous milestones --- 17,25 ---- Tentative Release Schedule ! [revised 5 Oct 2000] 26-Sep-2000: 2.0 beta 2 ! 9-Oct-2000: 2.0 release candidate 1 (2.0c1) ! 16-Oct-2000: 2.0 final Previous milestones *************** *** 26,29 **** --- 27,39 ---- 5-Sep-2000: 2.0 beta 1 + What is release candidate 1? + + We believe that release candidate 1 will fix all known bugs that + we intend to fix for the 2.0 final release. This release should + be a bit more stable than the previous betas. We would like to + see even more widespread testing before the final release, so we + are producing this release candidate. The final release will be + exactly the same unless any show-stopping (or brown bag) bugs are + found by testers of the release candidate. Guidelines for submitting patches and making changes From python-dev@python.org Thu Oct 5 16:22:32 2000 From: python-dev@python.org (A.M. Kuchling) Date: Thu, 5 Oct 2000 08:22:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.55,1.56 Message-ID: <200010051522.IAA18447@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18041 Modified Files: libre.tex Log Message: Document the lookbehind assertions (closing bug#115119) Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -r1.55 -r1.56 *** libre.tex 2000/10/05 12:35:29 1.55 --- libre.tex 2000/10/05 15:22:28 1.56 *************** *** 220,223 **** --- 220,238 ---- followed by \code{'Asimov'}. + \item[\code{(?<=...)}] Matches if the current position in the string + is preceded by a match for \regexp{...} that ends at the current + position. This is called a positive lookbehind assertion. + \regexp{(?<=abc)def} will match \samp{abcdef}, since the lookbehind + will back up 3 characters and check if the contained pattern matches. + The contained pattern must only match strings of some fixed length, + meaning that \regexp{abc} or \regexp{a|b} are allowed, but \regexp{a*} + isn't. + + \item[\code{(? Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv29107 Modified Files: pep-0042.txt Log Message: Added a section on Building and Installing; first entry: SF bug #110836 for configuring and building Python with a cross compiler. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** pep-0042.txt 2000/10/03 20:37:39 1.29 --- pep-0042.txt 2000/10/05 15:36:34 1.30 *************** *** 63,66 **** --- 63,67 ---- http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115143 + Standard Library *************** *** 187,190 **** --- 188,199 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110820&group_id=5470 + + + Building and Installing + + - You should be able to configure and build Python with a + cross-compiler. + + https://sourceforge.net/bugs/?func=detailbug&bug_id=110836&group_id=5470 From python-dev@python.org Thu Oct 5 18:24:37 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 5 Oct 2000 10:24:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib quopri.py,1.6,1.7 Message-ID: <200010051724.KAA17612@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv17268 Modified Files: quopri.py Log Message: Fix Bug #115907: encode '=' as '=3D' and not '==' Index: quopri.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/quopri.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** quopri.py 2000/02/04 15:28:40 1.6 --- quopri.py 2000/10/05 17:24:33 1.7 *************** *** 10,149 **** def needsquoting(c, quotetabs): ! """Decide whether a particular character needs to be quoted. ! The 'quotetabs' flag indicates whether tabs should be quoted.""" ! if c == '\t': ! return not quotetabs ! return c == ESCAPE or not(' ' <= c <= '~') def quote(c): ! """Quote a single character.""" ! if c == ESCAPE: ! return ESCAPE * 2 ! else: ! i = ord(c) ! return ESCAPE + HEX[i/16] + HEX[i%16] def encode(input, output, quotetabs): ! """Read 'input', apply quoted-printable encoding, and write to 'output'. ! 'input' and 'output' are files with readline() and write() methods. ! The 'quotetabs' flag indicates whether tabs should be quoted.""" ! while 1: ! line = input.readline() ! if not line: break ! new = '' ! last = line[-1:] ! if last == '\n': line = line[:-1] ! else: last = '' ! prev = '' ! for c in line: ! if needsquoting(c, quotetabs): ! c = quote(c) ! if len(new) + len(c) >= MAXLINESIZE: ! output.write(new + ESCAPE + '\n') ! new = '' ! new = new + c ! prev = c ! if prev in (' ', '\t'): ! output.write(new + ESCAPE + '\n\n') ! else: ! output.write(new + '\n') def decode(input, output): ! """Read 'input', apply quoted-printable decoding, and write to 'output'. ! 'input' and 'output' are files with readline() and write() methods.""" ! new = '' ! while 1: ! line = input.readline() ! if not line: break ! i, n = 0, len(line) ! if n > 0 and line[n-1] == '\n': ! partial = 0; n = n-1 ! # Strip trailing whitespace ! while n > 0 and line[n-1] in (' ', '\t'): ! n = n-1 ! else: ! partial = 1 ! while i < n: ! c = line[i] ! if c <> ESCAPE: ! new = new + c; i = i+1 ! elif i+1 == n and not partial: ! partial = 1; break ! elif i+1 < n and line[i+1] == ESCAPE: ! new = new + ESCAPE; i = i+2 ! elif i+2 < n and ishex(line[i+1]) and ishex(line[i+2]): ! new = new + chr(unhex(line[i+1:i+3])); i = i+3 ! else: # Bad escape sequence -- leave it in ! new = new + c; i = i+1 ! if not partial: ! output.write(new + '\n') ! new = '' ! if new: ! output.write(new) def ishex(c): ! """Return true if the character 'c' is a hexadecimal digit.""" ! return '0' <= c <= '9' or 'a' <= c <= 'f' or 'A' <= c <= 'F' def unhex(s): ! """Get the integer value of a hexadecimal number.""" ! bits = 0 ! for c in s: ! if '0' <= c <= '9': ! i = ord('0') ! elif 'a' <= c <= 'f': ! i = ord('a')-10 ! elif 'A' <= c <= 'F': ! i = ord('A')-10 ! else: ! break ! bits = bits*16 + (ord(c) - i) ! return bits def test(): ! import sys ! import getopt ! try: ! opts, args = getopt.getopt(sys.argv[1:], 'td') ! except getopt.error, msg: ! sys.stdout = sys.stderr ! print msg ! print "usage: quopri [-t | -d] [file] ..." ! print "-t: quote tabs" ! print "-d: decode; default encode" ! sys.exit(2) ! deco = 0 ! tabs = 0 ! for o, a in opts: ! if o == '-t': tabs = 1 ! if o == '-d': deco = 1 ! if tabs and deco: ! sys.stdout = sys.stderr ! print "-t and -d are mutually exclusive" ! sys.exit(2) ! if not args: args = ['-'] ! sts = 0 ! for file in args: ! if file == '-': ! fp = sys.stdin ! else: ! try: ! fp = open(file) ! except IOError, msg: ! sys.stderr.write("%s: can't open (%s)\n" % (file, msg)) ! sts = 1 ! continue ! if deco: ! decode(fp, sys.stdout) ! else: ! encode(fp, sys.stdout, tabs) ! if fp is not sys.stdin: ! fp.close() ! if sts: ! sys.exit(sts) if __name__ == '__main__': ! test() --- 10,150 ---- def needsquoting(c, quotetabs): ! """Decide whether a particular character needs to be quoted. ! The 'quotetabs' flag indicates whether tabs should be quoted.""" ! if c == '\t': ! return not quotetabs ! return c == ESCAPE or not(' ' <= c <= '~') def quote(c): ! """Quote a single character.""" ! i = ord(c) ! return ESCAPE + HEX[i/16] + HEX[i%16] def encode(input, output, quotetabs): ! """Read 'input', apply quoted-printable encoding, and write to 'output'. ! 'input' and 'output' are files with readline() and write() methods. ! The 'quotetabs' flag indicates whether tabs should be quoted. ! """ ! while 1: ! line = input.readline() ! if not line: ! break ! new = '' ! last = line[-1:] ! if last == '\n': ! line = line[:-1] ! else: ! last = '' ! prev = '' ! for c in line: ! if needsquoting(c, quotetabs): ! c = quote(c) ! if len(new) + len(c) >= MAXLINESIZE: ! output.write(new + ESCAPE + '\n') ! new = '' ! new = new + c ! prev = c ! if prev in (' ', '\t'): ! output.write(new + ESCAPE + '\n\n') ! else: ! output.write(new + '\n') def decode(input, output): ! """Read 'input', apply quoted-printable decoding, and write to 'output'. ! 'input' and 'output' are files with readline() and write() methods.""" ! new = '' ! while 1: ! line = input.readline() ! if not line: break ! i, n = 0, len(line) ! if n > 0 and line[n-1] == '\n': ! partial = 0; n = n-1 ! # Strip trailing whitespace ! while n > 0 and line[n-1] in (' ', '\t'): ! n = n-1 ! else: ! partial = 1 ! while i < n: ! c = line[i] ! if c <> ESCAPE: ! new = new + c; i = i+1 ! elif i+1 == n and not partial: ! partial = 1; break ! elif i+1 < n and line[i+1] == ESCAPE: ! new = new + ESCAPE; i = i+2 ! elif i+2 < n and ishex(line[i+1]) and ishex(line[i+2]): ! new = new + chr(unhex(line[i+1:i+3])); i = i+3 ! else: # Bad escape sequence -- leave it in ! new = new + c; i = i+1 ! if not partial: ! output.write(new + '\n') ! new = '' ! if new: ! output.write(new) def ishex(c): ! """Return true if the character 'c' is a hexadecimal digit.""" ! return '0' <= c <= '9' or 'a' <= c <= 'f' or 'A' <= c <= 'F' def unhex(s): ! """Get the integer value of a hexadecimal number.""" ! bits = 0 ! for c in s: ! if '0' <= c <= '9': ! i = ord('0') ! elif 'a' <= c <= 'f': ! i = ord('a')-10 ! elif 'A' <= c <= 'F': ! i = ord('A')-10 ! else: ! break ! bits = bits*16 + (ord(c) - i) ! return bits def test(): ! import sys ! import getopt ! try: ! opts, args = getopt.getopt(sys.argv[1:], 'td') ! except getopt.error, msg: ! sys.stdout = sys.stderr ! print msg ! print "usage: quopri [-t | -d] [file] ..." ! print "-t: quote tabs" ! print "-d: decode; default encode" ! sys.exit(2) ! deco = 0 ! tabs = 0 ! for o, a in opts: ! if o == '-t': tabs = 1 ! if o == '-d': deco = 1 ! if tabs and deco: ! sys.stdout = sys.stderr ! print "-t and -d are mutually exclusive" ! sys.exit(2) ! if not args: args = ['-'] ! sts = 0 ! for file in args: ! if file == '-': ! fp = sys.stdin ! else: ! try: ! fp = open(file) ! except IOError, msg: ! sys.stderr.write("%s: can't open (%s)\n" % (file, msg)) ! sts = 1 ! continue ! if deco: ! decode(fp, sys.stdout) ! else: ! encode(fp, sys.stdout, tabs) ! if fp is not sys.stdin: ! fp.close() ! if sts: ! sys.exit(sts) if __name__ == '__main__': ! test() From python-dev@python.org Thu Oct 5 18:25:53 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Thu, 5 Oct 2000 10:25:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.21,2.22 Message-ID: <200010051725.KAA18603@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv18477/Include Modified Files: pyport.h Log Message: Added Py_FPROTO macro which was available in Python 1.5.x and below. This should not be used for new code, but will probably make porting old extensions to 2.0 a lot easier. Also see Bug #116011. Index: pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -r2.21 -r2.22 *** pyport.h 2000/10/05 01:42:23 2.21 --- pyport.h 2000/10/05 17:25:45 2.22 *************** *** 40,43 **** --- 40,46 ---- #define Py_PROTO(x) () #endif + #ifndef Py_FPROTO + #define Py_FPROTO(x) Py_PROTO(x) + #endif /* typedefs for some C9X-defined synonyms for integral types. From python-dev@python.org Thu Oct 5 19:00:11 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 5 Oct 2000 11:00:11 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.156,1.157 configure.in,1.165,1.166 Message-ID: <200010051800.LAA16367@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv15671 Modified Files: configure configure.in Log Message: [ Patch #101730 ] Add initial static support for Darwin/MacOSX. By D.K. Wolfe. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -r1.156 -r1.157 *** configure 2000/09/26 16:57:37 1.156 --- configure 2000/10/05 18:00:05 1.157 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.165 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.166 [...4025 lines suppressed...] echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5885: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5888,5897 ---- EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 ! echo "configure:5891: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -r1.165 -r1.166 *** configure.in 2000/09/25 15:08:45 1.165 --- configure.in 2000/10/05 18:00:06 1.166 *************** *** 9,13 **** VERSION=2.0 ! # NEXTSTEP stuff if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then --- 9,13 ---- VERSION=2.0 ! # NEXTSTEP|MacOSX|Darwin stuff if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then *************** *** 25,40 **** if test -z "$MACHDEP" then set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \ ! sed -e 's/://' -e 's/\./_/'` && \ ! ac_sys_system=next && ac_sys_release=$4 ! MACHDEP="$ac_sys_system$ac_sys_release" fi fi AC_ARG_WITH(next-framework, ! [ --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework],,) AC_ARG_WITH(dyld, ! [ --with-dyld Use (OpenStep|Rhapsody|MacOSX) dynamic linker],,) # Set name for machine-dependent library files --- 25,45 ---- if test -z "$MACHDEP" then + ac_sys_system=`uname -s` + if test "$ac_sys_system" = "Darwin" ; then + ac_sys_release=`uname -r` + else set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \ ! sed -e 's/://' -e 's/\./_/'` && \ ! ac_sys_system=next && ac_sys_release=$4 ! fi ! MACHDEP="$ac_sys_system$ac_sys_release" fi fi AC_ARG_WITH(next-framework, ! [ --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework],,) AC_ARG_WITH(dyld, ! [ --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) dynamic linker],,) # Set name for machine-dependent library files *************** *** 575,584 **** OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; DYNIX/ptx*) LDSHARED="ld -G";; ! next/*) if test "$ns_dyld" then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi ! if test "$with_next_framework" ; then LDSHARED="$LDSHARED \$(LDLIBRARY)" fi ;; --- 580,589 ---- OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; DYNIX/ptx*) LDSHARED="ld -G";; ! Darwin/*|next/*) if test "$ns_dyld" then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi ! if test "$with_next_framework" ; then LDSHARED="$LDSHARED \$(LDLIBRARY)" fi ;; *************** *** 1151,1154 **** --- 1156,1160 ---- AC_SUBST(LIBM) case $ac_sys_system in + Darwin) ;; next) ;; BeOS) ;; From python-dev@python.org Thu Oct 5 19:45:55 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 5 Oct 2000 11:45:55 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.157,1.158 configure.in,1.166,1.167 Message-ID: <200010051845.LAA16072@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv14007 Modified Files: configure configure.in Log Message: Change all occurances of test -d "$directory" to test ! -z "directory" -a -d "directory" Apparently, on SunOS 4.1.4_JL (and other?) OSes, -d on an empty string always returns true. This closes SF bug #115392. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.157 retrieving revision 1.158 diff -C2 -r1.157 -r1.158 *** configure 2000/10/05 18:00:05 1.157 --- configure 2000/10/05 18:45:52 1.158 *************** *** 3103,3110 **** USE_THREAD_MODULE="#" else ! if test -d "$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test -d "$withval" then LDFLAGS="$LDFLAGS -L$withval" fi --- 3103,3110 ---- USE_THREAD_MODULE="#" else ! if test ! -z $with_threads -a -d $with_threads then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z $withval -a -d $withval then LDFLAGS="$LDFLAGS -L$withval" fi *************** *** 3783,3787 **** DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test -d "$dldir" then LDFLAGS="$LDFLAGS -L$dldir" else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; } --- 3783,3787 ---- DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z $dldir -a -d $dldir then LDFLAGS="$LDFLAGS -L$dldir" else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; } *************** *** 3808,3812 **** dldir=`echo "$withval" | sed 's/,.*//'` dlddir=`echo "$withval" | sed 's/.*,//'` ! if test -d "$dldir" -a -d "$dlddir" then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; } --- 3808,3812 ---- dldir=`echo "$withval" | sed 's/,.*//'` dlddir=`echo "$withval" | sed 's/.*,//'` ! if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir" then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; } Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -r1.166 -r1.167 *** configure.in 2000/10/05 18:00:06 1.166 --- configure.in 2000/10/05 18:45:53 1.167 *************** *** 751,758 **** USE_THREAD_MODULE="#" else ! if test -d "$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test -d "$withval" then LDFLAGS="$LDFLAGS -L$withval" fi --- 751,758 ---- USE_THREAD_MODULE="#" else ! if test ! -z $with_threads -a -d $with_threads then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z $withval -a -d $withval then LDFLAGS="$LDFLAGS -L$withval" fi *************** *** 890,894 **** DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test -d "$dldir" then LDFLAGS="$LDFLAGS -L$dldir" else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY) --- 890,894 ---- DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z $dldir -a -d $dldir then LDFLAGS="$LDFLAGS -L$dldir" else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY) *************** *** 904,908 **** dldir=`echo "$withval" | sed 's/,.*//'` dlddir=`echo "$withval" | sed 's/.*,//'` ! if test -d "$dldir" -a -d "$dlddir" then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" else AC_ERROR(proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY) --- 904,908 ---- dldir=`echo "$withval" | sed 's/,.*//'` dlddir=`echo "$withval" | sed 's/.*,//'` ! if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir" then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" else AC_ERROR(proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY) From python-dev@python.org Thu Oct 5 19:48:16 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 5 Oct 2000 11:48:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib gettext.py,1.7,1.8 Message-ID: <200010051848.LAA19047@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18967 Modified Files: gettext.py Log Message: translation(): Minor optimization patch which avoids instantiating the default value's instance unless it's absolutely necessary. Index: gettext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/gettext.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** gettext.py 2000/09/01 02:20:20 1.7 --- gettext.py 2000/10/05 18:48:12 1.8 *************** *** 236,240 **** key = os.path.abspath(mofile) # TBD: do we need to worry about the file pointer getting collected? ! t = _translations.setdefault(key, class_(open(mofile, 'rb'))) return t --- 236,244 ---- key = os.path.abspath(mofile) # TBD: do we need to worry about the file pointer getting collected? ! # Avoid opening, reading, and parsing the .mo file after it's been done ! # once. ! t = _translations.get(key) ! if t is None: ! t = _translations.setdefault(key, class_(open(mofile, 'rb'))) return t From python-dev@python.org Thu Oct 5 20:24:28 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 5 Oct 2000 12:24:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.111,1.112 Message-ID: <200010051924.MAA29161@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27047/python/dist/src/Modules Modified Files: _tkinter.c Log Message: SF "bug" 115973: patches from Norman Vine so that shared libraries and Tkinter work under Cygwin. Accepted on faith & reasonableness. Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -r1.111 -r1.112 *** _tkinter.c 2000/09/01 23:29:26 1.111 --- _tkinter.c 2000/10/05 19:24:25 1.112 *************** *** 58,62 **** #endif ! #if !defined(MS_WINDOWS) #define HAVE_CREATEFILEHANDLER #endif --- 58,62 ---- #endif ! #if !(defined(MS_WINDOWS) || defined(__CYGWIN__)) #define HAVE_CREATEFILEHANDLER #endif From python-dev@python.org Thu Oct 5 20:24:28 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 5 Oct 2000 12:24:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python dynload_shlib.c,2.5,2.6 Message-ID: <200010051924.MAA29166@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv27047/python/dist/src/Python Modified Files: dynload_shlib.c Log Message: SF "bug" 115973: patches from Norman Vine so that shared libraries and Tkinter work under Cygwin. Accepted on faith & reasonableness. Index: dynload_shlib.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/dynload_shlib.c,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** dynload_shlib.c 2000/09/01 23:29:28 2.5 --- dynload_shlib.c 2000/10/05 19:24:26 2.6 *************** *** 23,28 **** --- 23,33 ---- const struct filedescr _PyImport_DynLoadFiletab[] = { + #ifdef __CYGWIN__ + {".pyd", "rb", C_EXTENSION}, + {".dll", "rb", C_EXTENSION}, + #else {".so", "rb", C_EXTENSION}, {"module.so", "rb", C_EXTENSION}, + #endif {0, 0} }; From python-dev@python.org Thu Oct 5 20:36:52 2000 From: python-dev@python.org (Neil Schemenauer) Date: Thu, 5 Oct 2000 12:36:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects tupleobject.c,2.46,2.47 Message-ID: <200010051936.MAA08993@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv6491/Objects Modified Files: tupleobject.c Log Message: Simplify _PyTuple_Resize by not using the tuple free list and dropping support for the last_is_sticky flag. A few hard to find bugs may be fixed by this patch since the old code was buggy. Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.46 retrieving revision 2.47 diff -C2 -r2.46 -r2.47 *** tupleobject.c 2000/09/15 07:32:39 2.46 --- tupleobject.c 2000/10/05 19:36:49 2.47 *************** *** 425,433 **** it changes the size of a tuple. We get away with this only if there is only one module referencing the object. You can also think of it ! as creating a new tuple object and destroying the old one, only ! more efficiently. In any case, don't use this if the tuple may ! already be known to some other part of the code... ! If last_is_sticky is set, the tuple will grow or shrink at the ! front, otherwise it will grow or shrink at the end. */ int --- 425,432 ---- it changes the size of a tuple. We get away with this only if there is only one module referencing the object. You can also think of it ! as creating a new tuple object and destroying the old one, only more ! efficiently. In any case, don't use this if the tuple may already be ! known to some other part of the code. The last_is_sticky is not used ! and must always be false. */ int *************** *** 440,446 **** v = (PyTupleObject *) *pv; ! if (v == NULL || !PyTuple_Check(v) || v->ob_refcnt != 1) { *pv = 0; ! Py_DECREF(v); PyErr_BadInternalCall(); return -1; --- 439,446 ---- v = (PyTupleObject *) *pv; ! if (v == NULL || !PyTuple_Check(v) || v->ob_refcnt != 1 || ! last_is_sticky) { *pv = 0; ! Py_XDECREF(v); PyErr_BadInternalCall(); return -1; *************** *** 449,543 **** if (sizediff == 0) return 0; /* XXX UNREF/NEWREF interface should be more symmetrical */ #ifdef Py_REF_DEBUG --_Py_RefTotal; #endif ! _Py_ForgetReference((PyObject *)v); ! if (last_is_sticky && sizediff < 0) { ! /* shrinking: ! move entries to the front and zero moved entries */ ! for (i = 0; i < newsize; i++) { ! Py_XDECREF(v->ob_item[i]); ! v->ob_item[i] = v->ob_item[i - sizediff]; ! v->ob_item[i - sizediff] = NULL; ! } ! } for (i = newsize; i < v->ob_size; i++) { Py_XDECREF(v->ob_item[i]); v->ob_item[i] = NULL; - } - #if MAXSAVESIZE > 0 - if (newsize == 0 && free_tuples[0]) { - num_free_tuples[0]--; - sv = free_tuples[0]; - sv->ob_size = 0; - Py_INCREF(sv); - #ifdef COUNT_ALLOCS - tuple_zero_allocs++; - #endif - tupledealloc(v); - *pv = (PyObject*) sv; - return 0; } ! if (0 < newsize && newsize < MAXSAVESIZE && ! (sv = free_tuples[newsize]) != NULL) ! { ! free_tuples[newsize] = (PyTupleObject *) sv->ob_item[0]; ! num_free_tuples[newsize]--; ! #ifdef COUNT_ALLOCS ! fast_tuple_allocs++; ! #endif ! #ifdef Py_TRACE_REFS ! sv->ob_type = &PyTuple_Type; ! #endif ! for (i = 0; i < newsize; ++i){ ! sv->ob_item[i] = v->ob_item[i]; ! v->ob_item[i] = NULL; ! } ! sv->ob_size = v->ob_size; ! tupledealloc(v); ! *pv = (PyObject *) sv; ! } else ! #endif ! { ! #ifdef WITH_CYCLE_GC ! PyGC_Head *g = PyObject_AS_GC((PyObject *)v); ! PyObject_GC_Fini((PyObject *)v); ! g = (PyGC_Head *) ! PyObject_REALLOC((char *)g, sizeof(PyTupleObject) ! + PyGC_HEAD_SIZE ! + newsize * sizeof(PyObject *)); ! if (g == NULL) { ! sv = NULL; ! } else { ! sv = (PyTupleObject *)PyObject_FROM_GC(g); ! } ! #else ! sv = (PyTupleObject *) ! PyObject_REALLOC((char *)v, sizeof(PyTupleObject) ! + PyGC_HEAD_SIZE ! + newsize * sizeof(PyObject *)); ! #endif ! *pv = (PyObject *) sv; ! if (sv == NULL) { ! PyObject_GC_Init((PyObject *)v); ! v = (PyTupleObject *) PyObject_AS_GC(v); ! PyObject_DEL(v); ! PyErr_NoMemory(); ! return -1; ! } } ! _Py_NewReference((PyObject *)sv); for (i = sv->ob_size; i < newsize; i++) sv->ob_item[i] = NULL; - if (last_is_sticky && sizediff > 0) { - /* growing: move entries to the end and zero moved entries */ - for (i = newsize - 1; i >= sizediff; i--) { - sv->ob_item[i] = sv->ob_item[i - sizediff]; - sv->ob_item[i - sizediff] = NULL; - } - } - PyObject_GC_Init(sv); sv->ob_size = newsize; return 0; } --- 449,481 ---- if (sizediff == 0) return 0; + /* XXX UNREF/NEWREF interface should be more symmetrical */ #ifdef Py_REF_DEBUG --_Py_RefTotal; #endif ! _Py_ForgetReference((PyObject *) v); for (i = newsize; i < v->ob_size; i++) { Py_XDECREF(v->ob_item[i]); v->ob_item[i] = NULL; } ! PyObject_GC_Fini(v); ! v = (PyTupleObject *) PyObject_AS_GC(v); ! sv = (PyTupleObject *) PyObject_REALLOC((char *)v, ! sizeof(PyTupleObject) ! + PyGC_HEAD_SIZE ! + newsize * sizeof(PyObject *)); ! if (sv == NULL) { ! *pv = NULL; ! PyObject_DEL(v); ! PyErr_NoMemory(); ! return -1; } ! sv = (PyTupleObject *) PyObject_FROM_GC(sv); ! _Py_NewReference((PyObject *) sv); for (i = sv->ob_size; i < newsize; i++) sv->ob_item[i] = NULL; sv->ob_size = newsize; + *pv = (PyObject *) sv; + PyObject_GC_Init(sv); return 0; } From python-dev@python.org Thu Oct 5 20:38:28 2000 From: python-dev@python.org (Neil Schemenauer) Date: Thu, 5 Oct 2000 12:38:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.93,1.94 Message-ID: <200010051938.MAA10874@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv9591/Doc/api Modified Files: api.tex Log Message: The _PyTuple_Resize() last_is_sticky flag must now always be false. Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -r1.93 -r1.94 *** api.tex 2000/09/29 17:31:54 1.93 --- api.tex 2000/10/05 19:38:24 1.94 *************** *** 3071,3080 **** this should only be used if there is only one reference to the object. Do \emph{not} use this if the tuple may already be known to some other ! part of the code. \var{last_is_sticky} is a flag --- if true, the ! tuple will grow or shrink at the front, otherwise it will grow or ! shrink at the end. Think of this as destroying the old tuple and ! creating a new one, only more efficiently. Returns \code{0} on ! success and \code{-1} on failure (in which case a ! \exception{MemoryError} or \exception{SystemError} will be raised). \end{cfuncdesc} --- 3071,3080 ---- this should only be used if there is only one reference to the object. Do \emph{not} use this if the tuple may already be known to some other ! part of the code. The tuple will always grow or shrink at the end. The ! \var{last_is_sticky} flag is not used and should always be false. Think ! of this as destroying the old tuple and creating a new one, only more ! efficiently. Returns \code{0} on success and \code{-1} on failure (in ! which case a \exception{MemoryError} or \exception{SystemError} will be ! raised). \end{cfuncdesc} From python-dev@python.org Thu Oct 5 21:42:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 5 Oct 2000 13:42:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib rexec.py,1.25,1.26 Message-ID: <200010052042.NAA28447@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv28409 Modified Files: rexec.py Log Message: Add support for "import re" -- it uses pre, but user code does not need to. Index: rexec.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/rexec.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** rexec.py 1998/09/21 14:53:26 1.25 --- rexec.py 2000/10/05 20:42:44 1.26 *************** *** 154,157 **** --- 154,160 ---- self.loader = RModuleLoader(self.hooks, verbose) self.importer = RModuleImporter(self.loader, verbose) + # but since re isn't normally built-in, we can add it at the end; + # we need the imported to be set before this can be imported. + self.make_re() def set_trusted_path(self): *************** *** 198,201 **** --- 201,211 ---- for key, value in os.environ.items(): e[key] = value + + def make_re(self): + dst = self.add_module("re") + src = self.r_import("pre") + for name in dir(src): + if name != "__name__": + setattr(dst, name, getattr(src, name)) def make_sys(self): From python-dev@python.org Thu Oct 5 23:10:37 2000 From: python-dev@python.org (Mark Hammond) Date: Thu, 5 Oct 2000 15:10:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC frozen_dllmain.c,1.2,1.3 Message-ID: <200010052210.PAA02642@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv2564 Modified Files: frozen_dllmain.c Log Message: Remove some debugging messages - although this code is a complete hack, we dont need to announce it to the world every time they use freeze! Index: frozen_dllmain.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/frozen_dllmain.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** frozen_dllmain.c 2000/07/22 19:25:51 1.2 --- frozen_dllmain.c 2000/10/05 22:10:33 1.3 *************** *** 65,69 **** char **modName; for (modName = possibleModules;*modName;*modName++) { ! printf("Initialising '%s'\n", *modName); CallModuleDllMain(*modName, DLL_PROCESS_ATTACH); } --- 65,69 ---- char **modName; for (modName = possibleModules;*modName;*modName++) { ! /* printf("Initialising '%s'\n", *modName); */ CallModuleDllMain(*modName, DLL_PROCESS_ATTACH); } *************** *** 81,85 **** modName >= possibleModules; *modName--) { ! printf("Terminating '%s'\n", *modName); CallModuleDllMain(*modName, DLL_PROCESS_DETACH); } --- 81,85 ---- modName >= possibleModules; *modName--) { ! /* printf("Terminating '%s'\n", *modName);*/ CallModuleDllMain(*modName, DLL_PROCESS_DETACH); } From python-dev@python.org Fri Oct 6 01:10:58 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 5 Oct 2000 17:10:58 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.30,1.31 Message-ID: <200010060010.RAA05070@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv5035 Modified Files: pep-0042.txt Log Message: Add pickle/cPickle exception wish. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** pep-0042.txt 2000/10/05 15:36:34 1.30 --- pep-0042.txt 2000/10/06 00:10:56 1.31 *************** *** 177,180 **** --- 177,185 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110834&group_id=5470 + - The exceptions raised by pickle and cPickle are currently + different; these should be unified (probably the exceptions + should be defined in a helper module that's imported by both). + [No bug report; I just thought of this.] + Tools From python-dev@python.org Fri Oct 6 01:36:12 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 5 Oct 2000 17:36:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_pow.py,1.4,1.5 Message-ID: <200010060036.RAA30217@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv24366/python/dist/src/Lib/test Modified Files: test_pow.py Log Message: SF bug 115831 and Ping's SF patch 101751, 0.0**-2.0 returns inf rather than raise ValueError. Checked in the patch as far as it went, but also changed all of ints, longs and floats to raise ZeroDivisionError instead when raising 0 to a negative number. This is what 754-inspired stds require, as the "true result" is an infinity obtained from finite operands, i.e. it's a singularity. Also changed float pow to not be so timid about using its square-and-multiply algorithm. Note that what math.pow does is unrelated to what builtin pow does, and will still vary by platform. Index: test_pow.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pow.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_pow.py 1999/12/23 15:36:42 1.4 --- test_pow.py 2000/10/06 00:36:08 1.5 *************** *** 3,27 **** def powtest(type): ! if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): ! if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' ! if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) ! if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+str(i)+') != 0' ! if (pow(type(1),1)!=type(1)): raise ValueError, 'pow(1,'+str(i)+') != 1' ! for i in range(-100, 100): ! if (pow(type(i),3)!=i*i*i): raise ValueError, 'pow('+str(i)+',3) != '+str(i*i*i) ! pow2=1 for i in range(0,31): ! if (pow(2,i)!=pow2): raise ValueError, 'pow(2,'+str(i)+') != '+str(pow2) ! if (i!=30): pow2=pow2*2 print " Testing 3-argument pow() function..." --- 3,52 ---- def powtest(type): ! if type != float: print " Testing 2-argument pow() function..." for i in range(-1000, 1000): ! if pow(type(i), 0) != 1: raise ValueError, 'pow('+str(i)+',0) != 1' ! if pow(type(i), 1) != type(i): raise ValueError, 'pow('+str(i)+',1) != '+str(i) ! if pow(type(0), 1) != type(0): raise ValueError, 'pow(0,'+str(i)+') != 0' ! if pow(type(1), 1) != type(1): raise ValueError, 'pow(1,'+str(i)+') != 1' ! for i in range(-100, 100): ! if pow(type(i), 3) != i*i*i: raise ValueError, 'pow('+str(i)+',3) != '+str(i*i*i) ! pow2 = 1 for i in range(0,31): ! if pow(2, i) != pow2: raise ValueError, 'pow(2,'+str(i)+') != '+str(pow2) ! if i != 30 : pow2 = pow2*2 ! ! for othertype in int, long: ! for i in range(-10, 0) + range(1, 10): ! ii = type(i) ! for j in range(1, 11): ! jj = -othertype(j) ! try: ! pow(ii, jj) ! except ValueError: ! pass # taking an int to a neg int power should fail ! else: ! raise ValueError, "pow(%s, %s) did not fail" % (ii, jj) ! ! for othertype in int, long, float: ! for i in range(1, 100): ! zero = type(0) ! exp = -othertype(i/10.0) ! if exp == 0: ! continue ! try: ! pow(zero, exp) ! except ZeroDivisionError: ! pass # taking zero to any negative exponent should fail ! else: ! raise ValueError, "pow(%s, %s) did not fail" % (zero, exp) print " Testing 3-argument pow() function..." *************** *** 30,44 **** kl, kh = -10, 10 compare = cmp ! if (type==float): ! il=1 compare = test_support.fcmp ! elif (type==int): ! jl=0 ! elif (type==long): ! jl,jh = 0, 15 for i in range(il, ih+1): ! for j in range(jl,jh+1): for k in range(kl, kh+1): ! if (k!=0): if compare(pow(type(i),j,k), pow(type(i),j)% type(k)): raise ValueError, "pow(" +str(i)+ "," +str(j)+ \ --- 55,69 ---- kl, kh = -10, 10 compare = cmp ! if type == float: ! il = 1 compare = test_support.fcmp ! elif type == int: ! jl = 0 ! elif type == long: ! jl, jh = 0, 15 for i in range(il, ih+1): ! for j in range(jl, jh+1): for k in range(kl, kh+1): ! if k != 0: if compare(pow(type(i),j,k), pow(type(i),j)% type(k)): raise ValueError, "pow(" +str(i)+ "," +str(j)+ \ *************** *** 82,95 **** for j in range(0, 6): for k in range(-7, 11): ! if (j>=0 and k!=0): ! o=pow(i,j) % k ! n=pow(i,j,k) ! if (o!=n): print 'Integer mismatch:', i,j,k ! if (j>=0 and k<>0): ! o=pow(long(i),j) % k ! n=pow(long(i),j,k) ! if (o!=n): print 'Long mismatch:', i,j,k ! if (i>=0 and k<>0): ! o=pow(float(i),j) % k ! n=pow(float(i),j,k) ! if (o!=n): print 'Float mismatch:', i,j,k --- 107,120 ---- for j in range(0, 6): for k in range(-7, 11): ! if j >= 0 and k != 0: ! o = pow(i,j) % k ! n = pow(i,j,k) ! if o != n: print 'Integer mismatch:', i,j,k ! if j >= 0 and k <> 0: ! o = pow(long(i),j) % k ! n = pow(long(i),j,k) ! if o != n: print 'Long mismatch:', i,j,k ! if i >= 0 and k <> 0: ! o = pow(float(i),j) % k ! n = pow(float(i),j,k) ! if o != n: print 'Float mismatch:', i,j,k From python-dev@python.org Fri Oct 6 01:36:12 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 5 Oct 2000 17:36:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.73,2.74 intobject.c,2.51,2.52 longobject.c,1.67,1.68 Message-ID: <200010060036.RAA30230@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv24366/python/dist/src/Objects Modified Files: floatobject.c intobject.c longobject.c Log Message: SF bug 115831 and Ping's SF patch 101751, 0.0**-2.0 returns inf rather than raise ValueError. Checked in the patch as far as it went, but also changed all of ints, longs and floats to raise ZeroDivisionError instead when raising 0 to a negative number. This is what 754-inspired stds require, as the "true result" is an infinity obtained from finite operands, i.e. it's a singularity. Also changed float pow to not be so timid about using its square-and-multiply algorithm. Note that what math.pow does is unrelated to what builtin pow does, and will still vary by platform. Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.73 retrieving revision 2.74 diff -C2 -r2.73 -r2.74 *** floatobject.c 2000/09/26 05:46:01 2.73 --- floatobject.c 2000/10/06 00:36:09 2.74 *************** *** 450,467 **** iw = ((PyFloatObject *)w)->ob_fval; intw = (long)iw; ! if (iw == intw && -10000 < intw && intw < 10000) { ! /* Sort out special cases here instead of relying on pow() */ ! if (intw == 0) { /* x**0 is 1, even 0**0 */ ! PyFPE_START_PROTECT("pow", return 0) ! if ((PyObject *)z!=Py_None) { ! ix=fmod(1.0, z->ob_fval); ! if (ix!=0 && z->ob_fval<0) ix+=z->ob_fval; ! } ! else ix=1.0; ! PyFPE_END_PROTECT(ix) ! return PyFloat_FromDouble(ix); } errno = 0; ! PyFPE_START_PROTECT("pow", return 0) if (intw > 0) ix = powu(iv, intw); --- 450,480 ---- iw = ((PyFloatObject *)w)->ob_fval; intw = (long)iw; ! ! /* Sort out special cases here instead of relying on pow() */ ! if (iw == 0) { /* x**0 is 1, even 0**0 */ ! PyFPE_START_PROTECT("pow", return NULL) ! if ((PyObject *)z != Py_None) { ! ix = fmod(1.0, z->ob_fval); ! if (ix != 0 && z->ob_fval < 0) ! ix += z->ob_fval; } + else + ix = 1.0; + PyFPE_END_PROTECT(ix) + return PyFloat_FromDouble(ix); + } + if (iv == 0.0) { + if (iw < 0.0) { + PyErr_SetString(PyExc_ZeroDivisionError, + "0.0 to a negative power"); + return NULL; + } + return PyFloat_FromDouble(0.0); + } + + if (iw == intw && intw > LONG_MIN) { + /* ruled out LONG_MIN because -LONG_MIN isn't representable */ errno = 0; ! PyFPE_START_PROTECT("pow", return NULL) if (intw > 0) ix = powu(iv, intw); *************** *** 472,483 **** else { /* Sort out special cases here instead of relying on pow() */ - if (iv == 0.0) { - if (iw < 0.0) { - PyErr_SetString(PyExc_ValueError, - "0.0 to a negative power"); - return NULL; - } - return PyFloat_FromDouble(0.0); - } if (iv < 0.0) { PyErr_SetString(PyExc_ValueError, --- 485,488 ---- *************** *** 486,490 **** } errno = 0; ! PyFPE_START_PROTECT("pow", return 0) ix = pow(iv, iw); PyFPE_END_PROTECT(ix) --- 491,495 ---- } errno = 0; ! PyFPE_START_PROTECT("pow", return NULL) ix = pow(iv, iw); PyFPE_END_PROTECT(ix) *************** *** 496,506 **** return NULL; } ! if ((PyObject *)z!=Py_None) { ! PyFPE_START_PROTECT("pow", return 0) ! ix=fmod(ix, z->ob_fval); /* XXX To Be Rewritten */ ! if ( ix!=0 && ! ((iv<0 && z->ob_fval>0) || (iv>0 && z->ob_fval<0) )) { ! ix+=z->ob_fval; ! } PyFPE_END_PROTECT(ix) } --- 501,513 ---- return NULL; } ! if ((PyObject *)z != Py_None) { ! PyFPE_START_PROTECT("pow", return NULL) ! ix = fmod(ix, z->ob_fval); /* XXX To Be Rewritten */ ! if (ix != 0 && ! ((iv < 0 && z->ob_fval > 0) || ! (iv > 0 && z->ob_fval < 0) ! )) { ! ix += z->ob_fval; ! } PyFPE_END_PROTECT(ix) } Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.51 retrieving revision 2.52 diff -C2 -r2.51 -r2.52 *** intobject.c 2000/10/05 01:42:25 2.51 --- intobject.c 2000/10/06 00:36:09 2.52 *************** *** 484,489 **** iw = w->ob_ival; if (iw < 0) { ! PyErr_SetString(PyExc_ValueError, ! "integer to the negative power"); return NULL; } --- 484,493 ---- iw = w->ob_ival; if (iw < 0) { ! if (iv) ! PyErr_SetString(PyExc_ValueError, ! "integer to a negative power"); ! else ! PyErr_SetString(PyExc_ZeroDivisionError, ! "0 to a negative power"); return NULL; } Index: longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -r1.67 -r1.68 *** longobject.c 2000/09/01 23:29:27 1.67 --- longobject.c 2000/10/06 00:36:09 1.68 *************** *** 1245,1250 **** size_b = b->ob_size; if (size_b < 0) { ! PyErr_SetString(PyExc_ValueError, ! "long integer to the negative power"); return NULL; } --- 1245,1254 ---- size_b = b->ob_size; if (size_b < 0) { ! if (a->ob_size) ! PyErr_SetString(PyExc_ValueError, ! "long integer to a negative power"); ! else ! PyErr_SetString(PyExc_ZeroDivisionError, ! "zero to a negative power"); return NULL; } From python-dev@python.org Fri Oct 6 01:38:55 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 5 Oct 2000 17:38:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-tk Canvas.py,1.14,1.15 Message-ID: <200010060038.RAA32463@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory slayer.i.sourceforge.net:/tmp/cvs-serv32398 Modified Files: Canvas.py Log Message: [ Bug #110677 ] PRIVATE: various minor Tkinter things (PR#388) http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=110677 Canvas.CanvasItem & Canvas.Group: - bind lacks an optional "add" param - unbind lacks an optional "funcid" param - tkraise/lower should call self.canvas.tag_XXXX (markus.oberhumer@jk.uni-linz.ac.at) Note: I'm *not* fixing "bbox() return value is inconsistent with Canvas.bbox()" -- it might break existing code. Index: Canvas.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Canvas.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** Canvas.py 1998/07/16 13:43:05 1.14 --- Canvas.py 2000/10/06 00:38:51 1.15 *************** *** 1,4 **** --- 1,7 ---- # This module exports classes for the various canvas item types + # NOTE: This module was an experiment and is now obsolete. + # It's best to use the Tkinter.Canvas class directly. + from Tkinter import Canvas, _cnfmerge, _flatten *************** *** 42,49 **** x1, y1, x2, y2 = self.canvas.bbox(self.id) return (x1, y1), (x2, y2) ! def bind(self, sequence=None, command=None): ! return self.canvas.tag_bind(self.id, sequence, command) ! def unbind(self, sequence): ! self.canvas.tag_bind(self.id, sequence, '') def config(self, cnf={}, **kw): return self.canvas.itemconfig(self.id, _cnfmerge((cnf, kw))) --- 45,52 ---- x1, y1, x2, y2 = self.canvas.bbox(self.id) return (x1, y1), (x2, y2) ! def bind(self, sequence=None, command=None, add=None): ! return self.canvas.tag_bind(self.id, sequence, command, add) ! def unbind(self, sequence, funcid=None): ! self.canvas.tag_unbind(self.id, sequence, funcid) def config(self, cnf={}, **kw): return self.canvas.itemconfig(self.id, _cnfmerge((cnf, kw))) *************** *** 67,75 **** self.canvas.insert(self.id, beforethis, string) def lower(self, belowthis=None): ! self.canvas.lower(self.id, belowthis) def move(self, xamount, yamount): self.canvas.move(self.id, xamount, yamount) def tkraise(self, abovethis=None): ! self.canvas.tkraise(self.id, abovethis) raise_ = tkraise # BW compat def scale(self, xorigin, yorigin, xscale, yscale): --- 70,78 ---- self.canvas.insert(self.id, beforethis, string) def lower(self, belowthis=None): ! self.canvas.tag_lower(self.id, belowthis) def move(self, xamount, yamount): self.canvas.move(self.id, xamount, yamount) def tkraise(self, abovethis=None): ! self.canvas.tag_raise(self.id, abovethis) raise_ = tkraise # BW compat def scale(self, xorigin, yorigin, xscale, yscale): *************** *** 143,150 **** def bbox(self): return self.canvas._getints(self._do('bbox')) ! def bind(self, sequence=None, command=None): ! return self.canvas.tag_bind(self.id, sequence, command) ! def unbind(self, sequence): ! self.canvas.tag_bind(self.id, sequence, '') def coords(self, *pts): return self._do('coords', pts) --- 146,153 ---- def bbox(self): return self.canvas._getints(self._do('bbox')) ! def bind(self, sequence=None, command=None, add=None): ! return self.canvas.tag_bind(self.id, sequence, command, add) ! def unbind(self, sequence, funcid=None): ! self.canvas.tag_unbind(self.id, sequence, funcid) def coords(self, *pts): return self._do('coords', pts) *************** *** 168,176 **** return self.canvas.itemconfigure(self.tag, _cnfmerge((cnf,kw))) def lower(self, belowThis=None): ! self._do('lower', belowThis) def move(self, xAmount, yAmount): self._do('move', xAmount, yAmount) def tkraise(self, aboveThis=None): ! self._do('raise', aboveThis) lift = tkraise def scale(self, xOrigin, yOrigin, xScale, yScale): --- 171,179 ---- return self.canvas.itemconfigure(self.tag, _cnfmerge((cnf,kw))) def lower(self, belowThis=None): ! self._do('tag_lower', belowThis) def move(self, xAmount, yAmount): self._do('move', xAmount, yAmount) def tkraise(self, aboveThis=None): ! self._do('tag_raise', aboveThis) lift = tkraise def scale(self, xOrigin, yOrigin, xScale, yScale): From python-dev@python.org Fri Oct 6 02:58:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 5 Oct 2000 18:58:51 -0700 Subject: [Python-checkins] CVS: python/dist/src README,1.101,1.102 Message-ID: <200010060158.SAA11960@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv11901 Modified Files: README Log Message: Added section on threads problems on Reliant UNIX; this relates to bug #113797. We should be able to resolve this for the next release. Reflowed the comments on Monterey (64-bit AIX) to match the flow of the other platform-specific sections. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -r1.101 -r1.102 *** README 2000/09/29 17:45:05 1.101 --- README 2000/10/06 01:58:48 1.102 *************** *** 387,397 **** in the resulting binaries of PYTHON15.DLL and PYTHON.EXE. ! Monterey (64-bit AIX): ! The current Monterey C compiler (Visual Age) uses the OBJECT_MODE={32|64} ! environment variable to set the compilation mode to either 32-bit or ! 64-bit (32-bit mode is the default). Presumably you want 64-bit ! compilation mode for this 64-bit OS. As a result you must first set ! OBJECT_MODE=64 in your environment before configuring (./configure) or ! building (make) Python on Monterey. --- 387,402 ---- in the resulting binaries of PYTHON15.DLL and PYTHON.EXE. ! Monterey (64-bit AIX): The current Monterey C compiler (Visual Age) ! uses the OBJECT_MODE={32|64} environment variable to set the ! compilation mode to either 32-bit or 64-bit (32-bit mode is ! the default). Presumably you want 64-bit compilation mode for ! this 64-bit OS. As a result you must first set OBJECT_MODE=64 ! in your environment before configuring (./configure) or ! building (make) Python on Monterey. ! ! Reliant UNIX: The thread support does not compile on Reliant UNIX, and ! there is a (minor) problem in the configure script for that ! platform as well. This should be resolved in time for a ! future release. From python-dev@python.org Fri Oct 6 16:25:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 08:25:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.1,1.2 Message-ID: <200010061525.IAA05234@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv5180 Modified Files: ACKS Log Message: Added a name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ACKS 2000/10/05 04:05:30 1.1 --- ACKS 2000/10/06 15:25:01 1.2 *************** *** 99,102 **** --- 99,103 ---- Koray Oner Denis S. Otkidach + Tim Peters Christopher Petrilli Justin D. Pettit From python-dev@python.org Fri Oct 6 16:29:59 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 08:29:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libzipfile.tex,1.6,1.7 Message-ID: <200010061529.IAA09414@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9354/lib Modified Files: libzipfile.tex Log Message: is_zipfile() description: Use the same name for the parameter as the code, in case someone wants to use it as a keyword paramter. ZIP_DEFLATED description: Do not reveal the specific value of the constant, since code should only use the symbolic name. Index: libzipfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzipfile.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libzipfile.tex 2000/10/03 15:16:31 1.6 --- libzipfile.tex 2000/10/06 15:29:56 1.7 *************** *** 48,53 **** \end{classdesc} ! \begin{funcdesc}{is_zipfile}{path} ! Returns true if \var{path} is a valid ZIP file based on its magic number, otherwise returns false. This module does not currently handle ZIP files which have appended comments. --- 48,53 ---- \end{classdesc} ! \begin{funcdesc}{is_zipfile}{filename} ! Returns true if \var{filename} is a valid ZIP file based on its magic number, otherwise returns false. This module does not currently handle ZIP files which have appended comments. *************** *** 55,59 **** \begin{datadesc}{ZIP_STORED} ! The numeric constant (\code{0}) for an uncompressed archive member. \end{datadesc} --- 55,59 ---- \begin{datadesc}{ZIP_STORED} ! The numeric constant for an uncompressed archive member. \end{datadesc} From python-dev@python.org Fri Oct 6 16:37:10 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 08:37:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.127,1.128 Message-ID: <200010061537.IAA14814@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv14760 Modified Files: socketmodule.c Log Message: Norman Vine : tcp.h is not available on CygWin, so do not try to include it there. This closes SourceForge patch #101802. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -r1.127 -r1.128 *** socketmodule.c 2000/08/16 14:18:30 1.127 --- socketmodule.c 2000/10/06 15:37:06 1.128 *************** *** 123,127 **** #include #include ! #ifndef __BEOS__ #include #endif --- 123,127 ---- #include #include ! #if !(defined(__BEOS__) || defined(__CYGWIN__)) #include #endif From python-dev@python.org Fri Oct 6 16:48:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 08:48:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python thread.c,2.35,2.36 Message-ID: <200010061548.IAA22669@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv22617 Modified Files: thread.c Log Message: Donn Cave : Do not assume that all platforms using a MetroWorks compiler can use POSIX threads; the assumption breaks on BeOS. This fix only helps for BeOS. This closes SourceForge patch #101772. Index: thread.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** thread.c 2000/09/19 00:46:46 2.35 --- thread.c 2000/10/06 15:48:38 2.36 *************** *** 59,63 **** #endif ! #ifdef __MWERKS__ #define _POSIX_THREADS #endif --- 59,63 ---- #endif ! #if defined(__MWERKS__) && !defined(__BEOS__) #define _POSIX_THREADS #endif From python-dev@python.org Fri Oct 6 16:56:31 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 6 Oct 2000 08:56:31 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.31,1.32 Message-ID: <200010061556.IAA28995@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv28830 Modified Files: pep-0042.txt Log Message: add request to support parsing of deeply nested expressions Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** pep-0042.txt 2000/10/06 00:10:56 1.31 --- pep-0042.txt 2000/10/06 15:56:27 1.32 *************** *** 63,66 **** --- 63,75 ---- http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115143 + - The parser should handle more deeply nested parse trees. + + The following will fail -- eval("["*50 + "]"*50) -- because the + parser has a hard-coded limit on stack size. This limit should + be raised or removed. Removal would be hard because the + current compiler can overflow the C stack if the nesting is too + deep. + + http://sourceforge.net/bugs/?func=detailbug&bug_id=115555&group_id=5470 Standard Library From python-dev@python.org Fri Oct 6 16:57:48 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 08:57:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/BeOS linkmodule,1.4,1.5 Message-ID: <200010061557.IAA29893@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/BeOS In directory slayer.i.sourceforge.net:/tmp/cvs-serv29856 Modified Files: linkmodule Log Message: Donn Cave : Added definition of VERSION so this works as expected. Index: linkmodule =================================================================== RCS file: /cvsroot/python/python/dist/src/BeOS/linkmodule,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** linkmodule 2000/08/15 18:52:33 1.4 --- linkmodule 2000/10/06 15:57:45 1.5 *************** *** 25,28 **** --- 25,29 ---- TARGET="" ARGS="" + VERSION=2.0 while [ "$#" != "0" ]; do From python-dev@python.org Fri Oct 6 17:07:39 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 09:07:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-beos5 - New directory Message-ID: <200010061607.JAA03354@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-beos5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv3320/plat-beos5 Log Message: Directory /cvsroot/python/python/dist/src/Lib/plat-beos5 added to the repository From python-dev@python.org Fri Oct 6 17:11:24 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 09:11:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-beos5 regen,NONE,1.1 Message-ID: <200010061611.JAA05900@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-beos5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv5847 Added Files: regen Log Message: Donn Cave : Script to regenerate platform-specific modules of constants. [I moved common paths to variables for easier reading by humans. -- FLD] This closes SourceForge patch #101781. --- NEW FILE --- #! /bin/sh H2PY=../../Tools/scripts/h2py.py HEADERS=/boot/develop/headers set -v python $H2PY $HEADERS/posix/fcntl.h python $H2PY $HEADERS/be/net/socket.h python $H2PY -i '(u_long)' $HEADERS/be/net/netinet/in.h python $H2PY $HEADERS/posix/termios.h From python-dev@python.org Fri Oct 6 17:17:24 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 09:17:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/BeOS README,1.9,1.10 Message-ID: <200010061617.JAA10856@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/BeOS In directory slayer.i.sourceforge.net:/tmp/cvs-serv10812 Modified Files: README Log Message: Donn Cave : New README for BeOS R5. This closes SourceForge patch #101779. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/BeOS/README,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** README 2000/08/15 18:52:33 1.9 --- README 2000/10/06 16:17:21 1.10 *************** *** 6,18 **** What's Here? ! ar-fake - A shell script used by the build process to emulate a "real" ! POSIX ar command; helps to build the Python shared library. - dl_export.h - A header defining the evil magic declaration decorations - required for dynamic loading. - - linkcc - A shell script used by the build process to build the Python - shared library. - linkmodule - A shell script used by the build process to build the shared library versions of the standard modules; you'll --- 6,14 ---- What's Here? ! ar-fake - A shell script that copies around .o files, for the as much ! of the general effect of ar as we need but more fool-proof. ! It also has an "so" command to build the shared library ! that we actually install and use. linkmodule - A shell script used by the build process to build the shared library versions of the standard modules; you'll *************** *** 23,27 **** README.readline-2.2 - Instructions for compiling/installing GNU readline 2.2. ! You'll have to grab the GNU readline source code from prep.ai.mit.edu:/pub/GNU or any other GNU mirror. --- 19,23 ---- README.readline-2.2 - Instructions for compiling/installing GNU readline 2.2. ! You'll have to grab the GNU readline source code from prep.ai.mit.edu:/pub/GNU or any other GNU mirror. *************** *** 29,85 **** interactively if you've got readline installed. Highly recommended. - - Compiling Your Own Version - - To compile your own version of Python 1.5.x for BeOS (with any luck, - Python 1.5.2 and later will compile "out of the box" on BeOS), try this: - - 1) Get the latest Python source code from ftp.python.org. - - 2) Configure with: - - ./configure --verbose --prefix=/boot/home/config --with-thread - - 3) Copy Modules/Setup.in to Modules/Setup. ! 4) Edit Modules/Setup to turn on all the modules you want built. ! Make sure you use _socket instead of socket for the name of the ! socketmodule on BeOS (at least, until we get the new BONE networking). ! If you want the modules to be built as shared libraries, instead of as ! part of the Python shared library, be sure to uncomment the #*shared* ! line. I haven't done much testing with static linking, it's not as ! interesting. ! I've tried the following modules: - array audioop binascii cmath _codecs cPickle crypt cStringIO _curses - errno fcntl gdbm grp imageop _locale math md5 new operator parser - pcre posix pwd pyexpat readline regex rgbimg rotor select sha signal - _socket soundex _sre strop struct syslog termios time timing ucnhash - unicodedata zlib - - Note that some of these require extra libraries that aren't supplied - with Python. If you don't have the extra libs (you can probably get - them from GeekGadgets), don't try to use these modules; they won't - compile. - - 5) Make: - - make - - 6) Test: - make test test_popen2 will probably hang; it's deadlocked on a semaphore. I should probably disable popen2 support... it uses fork(), and fork() doesn't mix with threads on BeOS. In *THEORY* you could use it in a single-threaded program, but I haven't tried. ! If test_popen2 does hang, you can find the semaphore it's hung on via the "ps" command. Look for python and you'll find something like this: ! ./python -tt ../src/Lib/test/regrtest.py (team 26922) (uid 0) (gid 0) 39472 python sem 10 3785 1500 piperd(360526) --- 25,53 ---- interactively if you've got readline installed. Highly recommended. ! To build, ! 1) ./configure --prefix=/boot/home/config ! 2) cp Modules/Setup.in Modules/Setup ! edit Modules/Setup ! comment out grp and mmap, and pwd on 4.5 or earlier ! uncomment any modules you want to include in python ! (you can also add them later as shared libraries.) ! 3) make ! Test: make test + [Chris Herborth writes:] test_popen2 will probably hang; it's deadlocked on a semaphore. I should probably disable popen2 support... it uses fork(), and fork() doesn't mix with threads on BeOS. In *THEORY* you could use it in a single-threaded program, but I haven't tried. ! If test_popen2 does hang, you can find the semaphore it's hung on via the "ps" command. Look for python and you'll find something like this: ! ./python -tt ../src/Lib/test/regrtest.py (team 26922) (uid 0) (gid 0) 39472 python sem 10 3785 1500 piperd(360526) *************** *** 101,108 **** test test_fork1 skipped -- can't mix os.fork with threads on BeOS ! test test_re failed -- Writing: '=== Failed incorrectly', expected: ! "('abc', 'abc', 0, 'fou" ! ! test test_select crashed -- select.error : (-2147459072, 'Bad file descriptor') --- 69,73 ---- test test_fork1 skipped -- can't mix os.fork with threads on BeOS ! test test_select crashed -- select.error : (-2147459072, 'Bad file descriptor') *************** *** 112,123 **** sockets), or valid differences between systems. ! That test_re failure is a little worrysome though. ! 7) Install: make install ! 8) Enjoy! - Chris Herborth (chrish@pobox.com) July 21, 2000 --- 77,94 ---- sockets), or valid differences between systems. ! test test_pickle crashed. This is apparently a serious problem, ! "complex" number objects reconstructed from a ! pickle don't compare equal to their ancestors. ! But it happens on BeOS PPC only, not Intel. ! Install: make install ! Enjoy! - Chris Herborth (chrish@pobox.com) July 21, 2000 + + - Donn Cave (donn@oz.net) + October 4, 2000 From python-dev@python.org Fri Oct 6 17:36:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 09:36:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools cvsinfo.py,NONE,1.1 Message-ID: <200010061636.JAA26358@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv26293 Added Files: cvsinfo.py Log Message: Support module to help work with checked-out CVS trees. --- NEW FILE --- """Utility class and function to get information about the CVS repository based on checked-out files. """ import os def get_repository_list(paths): d = {} for name in paths: if os.path.isfile(name): dir = os.path.dirname(name) else: dir = name rootfile = os.path.join(name, "CVS", "Root") root = open(rootfile).readline().strip() if not d.has_key(root): d[root] = RepositoryInfo(dir), [name] else: d[root][1].append(name) return d.values() class RepositoryInfo: """Record holding information about the repository we want to talk to.""" cvsroot_path = None branch = None # type is '', ':ext', or ':pserver:' type = "" def __init__(self, dir=None): if dir is None: dir = os.getcwd() dir = os.path.join(dir, "CVS") root = open(os.path.join(dir, "Root")).readline().strip() if root.startswith(":pserver:"): self.type = ":pserver:" root = root[len(":pserver:"):] elif ":" in root: if root.startswith(":ext:"): root = root[len(":ext:"):] self.type = ":ext:" self.repository = root if ":" in root: host, path = root.split(":", 1) self.cvsroot_path = path else: self.cvsroot_path = root fn = os.path.join(dir, "Tag") if os.path.isfile(fn): self.branch = open(fn).readline().strip()[1:] def get_cvsroot(self): return self.type + self.repository _repository_dir_cache = {} def get_repository_file(self, path): filename = os.path.abspath(path) if os.path.isdir(path): dir = path join = 0 else: dir = os.path.dirname(path) join = 1 try: repodir = self._repository_dir_cache[dir] except KeyError: repofn = os.path.join(dir, "CVS", "Repository") repodir = open(repofn).readline().strip() repodir = os.path.join(self.cvsroot_path, repodir) self._repository_dir_cache[dir] = repodir if join: fn = os.path.join(repodir, os.path.basename(path)) else: fn = repodir return fn[len(self.cvsroot_path)+1:] def __repr__(self): return "" % `self.get_cvsroot()` From python-dev@python.org Fri Oct 6 17:37:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 09:37:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools findacks,1.1,1.2 Message-ID: <200010061637.JAA27011@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv26967 Modified Files: findacks Log Message: Use the cvsinfo module instead of a module stuff off in my personal collection. Index: findacks =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/findacks,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** findacks 2000/10/03 22:10:25 1.1 --- findacks 2000/10/06 16:37:47 1.2 *************** *** 8,13 **** import UserDict ! import fdrake.cvstools.info ! cvstools = fdrake.cvstools --- 8,12 ---- import UserDict ! import cvsinfo *************** *** 54,58 **** def load_cvs_log_acks(acks, args): ! repolist = cvstools.info.get_repository_list(args or [""]) for info, paths in repolist: print >>sys.stderr, "Repository:", info.get_cvsroot() --- 53,57 ---- def load_cvs_log_acks(acks, args): ! repolist = cvsinfo.get_repository_list(args or [""]) for info, paths in repolist: print >>sys.stderr, "Repository:", info.get_cvsroot() From python-dev@python.org Fri Oct 6 17:58:29 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 6 Oct 2000 09:58:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.112,1.113 Message-ID: <200010061658.JAA09524@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv9460 Modified Files: _tkinter.c Log Message: [ Bug #113803 ] [2.0b1 NT4.0] printing non asci char causes idle to abort http://sourceforge.net/bugs/?func=detailbug&bug_id=113803&group_id=5470 Add Unicode support and error handling to AsString(). Both AsString() and Merge() now return NULL and set a proper Python exception condition when an error happens; Merge() and other callers of AsString() check for errors from AsString(). Also fixed cleanup in Merge() and Tkapp_Call() return cleanup code; the fv array was not necessarily completely initialized, causing calls to ckfree() with garbage arguments! (Also reindented some lines that were longer than 80 chars and reformatted some code that used an alien coding standard.) Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -r1.112 -r1.113 *** _tkinter.c 2000/10/05 19:24:25 1.112 --- _tkinter.c 2000/10/06 16:58:26 1.113 *************** *** 138,142 **** #define LEAVE_TCL \ ! tcl_tstate = NULL; PyThread_release_lock(tcl_lock); Py_END_ALLOW_THREADS} #define ENTER_OVERLAP \ --- 138,142 ---- #define LEAVE_TCL \ ! tcl_tstate = NULL; PyThread_release_lock(tcl_lock); Py_END_ALLOW_THREADS} #define ENTER_OVERLAP \ *************** *** 178,185 **** typedef int (*TclMacConvertEventPtr) (EventRecord *eventPtr); ! void Tcl_MacSetEventProc (TclMacConvertEventPtr procPtr); ! int TkMacConvertEvent (EventRecord *eventPtr); ! staticforward int PyMacConvertEvent (EventRecord *eventPtr); #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) --- 178,185 ---- typedef int (*TclMacConvertEventPtr) (EventRecord *eventPtr); ! void Tcl_MacSetEventProc(TclMacConvertEventPtr procPtr); ! int TkMacConvertEvent(EventRecord *eventPtr); ! staticforward int PyMacConvertEvent(EventRecord *eventPtr); #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) *************** *** 262,268 **** if (PyString_Check(value)) return PyString_AsString(value); else { PyObject *v = PyObject_Str(value); ! PyList_Append(tmp, v); Py_DECREF(v); return PyString_AsString(v); --- 262,284 ---- if (PyString_Check(value)) return PyString_AsString(value); + else if (PyUnicode_Check(value)) { + PyObject *v = PyUnicode_AsUTF8String(value); + if (v == NULL) + return NULL; + if (PyList_Append(tmp, v) != 0) { + Py_DECREF(v); + return NULL; + } + Py_DECREF(v); + return PyString_AsString(v); + } else { PyObject *v = PyObject_Str(value); ! if (v == NULL) ! return NULL; ! if (PyList_Append(tmp, v) != 0) { ! Py_DECREF(v); ! return NULL; ! } Py_DECREF(v); return PyString_AsString(v); *************** *** 282,286 **** int fvStore[ARGSZ]; int *fv = NULL; ! int argc = 0, i; char *res = NULL; --- 298,302 ---- int fvStore[ARGSZ]; int *fv = NULL; ! int argc = 0, fvc = 0, i; char *res = NULL; *************** *** 297,301 **** argc = 1; fv[0] = 0; ! argv[0] = AsString(args, tmp); } else { --- 313,318 ---- argc = 1; fv[0] = 0; ! if (!(argv[0] = AsString(args, tmp))) ! goto finally; } else { *************** *** 317,320 **** --- 334,338 ---- if (!(argv[i] = Merge(v))) goto finally; + fvc++; } else if (v == Py_None) { *************** *** 324,335 **** else { fv[i] = 0; ! argv[i] = AsString(v, tmp); } } } res = Tcl_Merge(argc, argv); finally: ! for (i = 0; i < argc; i++) if (fv[i]) { ckfree(argv[i]); --- 342,357 ---- else { fv[i] = 0; ! if (!(argv[i] = AsString(v, tmp))) ! goto finally; ! fvc++; } } } res = Tcl_Merge(argc, argv); + if (res == NULL) + PyErr_SetString(Tkinter_TclError, "merge failed"); finally: ! for (i = 0; i < fvc; i++) if (fv[i]) { ckfree(argv[i]); *************** *** 508,516 **** #if TKMAJORMINOR <= 8001 /* In Tcl 8.1 we must use UTF-8 */ ! PyObject* utf8 = PyUnicode_AsUTF8String (value); if (!utf8) return 0; ! result = Tcl_NewStringObj (PyString_AS_STRING (utf8), ! PyString_GET_SIZE (utf8)); Py_DECREF(utf8); return result; --- 530,538 ---- #if TKMAJORMINOR <= 8001 /* In Tcl 8.1 we must use UTF-8 */ ! PyObject* utf8 = PyUnicode_AsUTF8String(value); if (!utf8) return 0; ! result = Tcl_NewStringObj(PyString_AS_STRING(utf8), ! PyString_GET_SIZE(utf8)); Py_DECREF(utf8); return result; *************** *** 520,524 **** /* XXX Should really test this at compile time */ PyErr_SetString(PyExc_SystemError, ! "Py_UNICODE and Tcl_UniChar differ in size"); return 0; } --- 542,546 ---- /* XXX Should really test this at compile time */ PyErr_SetString(PyExc_SystemError, ! "Py_UNICODE and Tcl_UniChar differ in size"); return 0; } *************** *** 610,615 **** res = PyUnicode_DecodeUTF8(s, (int)(p-s), "strict"); if (res == NULL) { ! PyErr_Clear(); ! res = PyString_FromStringAndSize(s, (int)(p-s)); } } --- 632,637 ---- res = PyUnicode_DecodeUTF8(s, (int)(p-s), "strict"); if (res == NULL) { ! PyErr_Clear(); ! res = PyString_FromStringAndSize(s, (int)(p-s)); } } *************** *** 637,641 **** int fvStore[ARGSZ]; int *fv = NULL; ! int argc = 0, i; PyObject *res = NULL; /* except this has a different type */ Tcl_CmdInfo info; /* and this is added */ --- 659,663 ---- int fvStore[ARGSZ]; int *fv = NULL; ! int argc = 0, fvc = 0, i; PyObject *res = NULL; /* except this has a different type */ Tcl_CmdInfo info; /* and this is added */ *************** *** 654,658 **** argc = 1; fv[0] = 0; ! argv[0] = AsString(args, tmp); } else { --- 676,681 ---- argc = 1; fv[0] = 0; ! if (!(argv[0] = AsString(args, tmp))) ! goto finally; } else { *************** *** 674,677 **** --- 697,701 ---- if (!(argv[i] = Merge(v))) goto finally; + fvc++; } else if (v == Py_None) { *************** *** 681,685 **** else { fv[i] = 0; ! argv[i] = AsString(v, tmp); } } --- 705,711 ---- else { fv[i] = 0; ! if (!(argv[i] = AsString(v, tmp))) ! goto finally; ! fvc++; } } *************** *** 726,730 **** /* Copied from Merge() again */ finally: ! for (i = 0; i < argc; i++) if (fv[i]) { ckfree(argv[i]); --- 752,756 ---- /* Copied from Merge() again */ finally: ! for (i = 0; i < fvc; i++) if (fv[i]) { ckfree(argv[i]); *************** *** 754,761 **** cmd = Merge(args); ! if (!cmd) ! PyErr_SetString(Tkinter_TclError, "merge failed"); ! ! else { int err; ENTER_TCL --- 780,784 ---- cmd = Merge(args); ! if (cmd) { int err; ENTER_TCL *************** *** 767,774 **** res = PyString_FromString(Tkapp_Result(self)); LEAVE_OVERLAP_TCL - } - - if (cmd) ckfree(cmd); return res; --- 790,795 ---- res = PyString_FromString(Tkapp_Result(self)); LEAVE_OVERLAP_TCL ckfree(cmd); + } return res; *************** *** 893,896 **** --- 914,919 ---- /* XXX Merge? */ s = AsString(newValue, tmp); + if (s == NULL) + return NULL; ENTER_TCL ok = Tcl_SetVar(Tkapp_Interp(self), name1, s, flags); *************** *** 899,904 **** else { PyErr_Clear(); ! if (PyArg_ParseTuple(args, "ssO:setvar", &name1, &name2, &newValue)) { ! s = AsString (newValue, tmp); ENTER_TCL ok = Tcl_SetVar2(Tkapp_Interp(self), name1, name2, --- 922,930 ---- else { PyErr_Clear(); ! if (PyArg_ParseTuple(args, "ssO:setvar", ! &name1, &name2, &newValue)) { ! s = AsString(newValue, tmp); ! if (s == NULL) ! return NULL; ENTER_TCL ok = Tcl_SetVar2(Tkapp_Interp(self), name1, name2, *************** *** 1193,1198 **** ckfree(s); } - else - PyErr_SetString(Tkinter_TclError, "merge failed"); return res; --- 1219,1222 ---- *************** *** 1226,1230 **** PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; PyObject *self, *func, *arg, *res, *tmp; ! int i; ENTER_PYTHON --- 1250,1255 ---- PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData; PyObject *self, *func, *arg, *res, *tmp; ! int i, rv; ! char *s; ENTER_PYTHON *************** *** 1257,1262 **** return PythonCmd_Error(interp); } - Tcl_SetResult(Tkapp_Interp(self), AsString(res, tmp), TCL_VOLATILE); Py_DECREF(res); Py_DECREF(tmp); --- 1282,1295 ---- return PythonCmd_Error(interp); } + + s = AsString(res, tmp); + if (s == NULL) { + rv = PythonCmd_Error(interp); + } + else { + Tcl_SetResult(Tkapp_Interp(self), s, TCL_VOLATILE); + rv = TCL_OK; + } Py_DECREF(res); Py_DECREF(tmp); *************** *** 1264,1268 **** LEAVE_PYTHON ! return TCL_OK; } --- 1297,1301 ---- LEAVE_PYTHON ! return rv; } *************** *** 1418,1422 **** int mask, tfile; ! if (!PyArg_ParseTuple(args, "OiO:createfilehandler", &file, &mask, &func)) return NULL; tfile = PyObject_AsFileDescriptor(file); --- 1451,1456 ---- int mask, tfile; ! if (!PyArg_ParseTuple(args, "OiO:createfilehandler", ! &file, &mask, &func)) return NULL; tfile = PyObject_AsFileDescriptor(file); *************** *** 1605,1609 **** TkttObject *v; ! if (!PyArg_ParseTuple(args, "iO:createtimerhandler", &milliseconds, &func)) return NULL; if (!PyCallable_Check(func)) { --- 1639,1644 ---- TkttObject *v; ! if (!PyArg_ParseTuple(args, "iO:createtimerhandler", ! &milliseconds, &func)) return NULL; if (!PyCallable_Check(func)) { *************** *** 1802,1807 **** _bump(FlattenContext* context, int size) { ! /* expand tuple to hold (at least) size new items. return true if ! successful, false if an exception was raised*/ int maxsize = context->maxsize * 2; --- 1837,1842 ---- _bump(FlattenContext* context, int size) { ! /* expand tuple to hold (at least) size new items. ! return true if successful, false if an exception was raised */ int maxsize = context->maxsize * 2; *************** *** 1823,1832 **** if (depth > 1000) { ! PyErr_SetString(PyExc_ValueError,"nesting too deep in _flatten"); return 0; } else if (PyList_Check(item)) { size = PyList_GET_SIZE(item); /* preallocate (assume no nesting) */ ! if (context->size + size > context->maxsize && !_bump(context, size)) return 0; /* copy items to output tuple */ --- 1858,1869 ---- if (depth > 1000) { ! PyErr_SetString(PyExc_ValueError, ! "nesting too deep in _flatten"); return 0; } else if (PyList_Check(item)) { size = PyList_GET_SIZE(item); /* preallocate (assume no nesting) */ ! if (context->size + size > context->maxsize && ! !_bump(context, size)) return 0; /* copy items to output tuple */ *************** *** 1837,1844 **** return 0; } else if (o != Py_None) { ! if (context->size + 1 > context->maxsize && !_bump(context, 1)) return 0; Py_INCREF(o); ! PyTuple_SET_ITEM(context->tuple, context->size++, o); } } --- 1874,1883 ---- return 0; } else if (o != Py_None) { ! if (context->size + 1 > context->maxsize && ! !_bump(context, 1)) return 0; Py_INCREF(o); ! PyTuple_SET_ITEM(context->tuple, ! context->size++, o); } } *************** *** 1846,1850 **** /* same, for tuples */ size = PyTuple_GET_SIZE(item); ! if (context->size + size > context->maxsize && !_bump(context, size)) return 0; for (i = 0; i < size; i++) { --- 1885,1890 ---- /* same, for tuples */ size = PyTuple_GET_SIZE(item); ! if (context->size + size > context->maxsize && ! !_bump(context, size)) return 0; for (i = 0; i < size; i++) { *************** *** 1854,1861 **** return 0; } else if (o != Py_None) { ! if (context->size + 1 > context->maxsize && !_bump(context, 1)) return 0; Py_INCREF(o); ! PyTuple_SET_ITEM(context->tuple, context->size++, o); } } --- 1894,1903 ---- return 0; } else if (o != Py_None) { ! if (context->size + 1 > context->maxsize && ! !_bump(context, 1)) return 0; Py_INCREF(o); ! PyTuple_SET_ITEM(context->tuple, ! context->size++, o); } } From python-dev@python.org Fri Oct 6 18:19:05 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 6 Oct 2000 10:19:05 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.32,1.33 Message-ID: <200010061719.KAA25719@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv25620 Modified Files: pep-0042.txt Log Message: Add another IDLE wish. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** pep-0042.txt 2000/10/06 15:56:27 1.32 --- pep-0042.txt 2000/10/06 17:18:55 1.33 *************** *** 203,207 **** --- 203,212 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110820&group_id=5470 + - IDLE's key bindings should be revised. Some of the advertised + bindings don't even work! + http://sourceforge.net/bugs/?func=detailbug&bug_id=110659&group_id=5470 + + Building and Installing *************** *** 209,213 **** cross-compiler. ! https://sourceforge.net/bugs/?func=detailbug&bug_id=110836&group_id=5470 --- 214,218 ---- cross-compiler. ! http://sourceforge.net/bugs/?func=detailbug&bug_id=110836&group_id=5470 From python-dev@python.org Fri Oct 6 18:37:17 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 6 Oct 2000 10:37:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/scripts redemo.py,NONE,1.1 Message-ID: <200010061737.KAA03103@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/scripts In directory slayer.i.sourceforge.net:/tmp/cvs-serv3050 Added Files: redemo.py Log Message: I'm moving redemo.py here from Demo/tkinter/guido, since it is somewhat useful to learn regular expressions, and this way it'll be installed on Windows. This closes bug report 115609. --- NEW FILE --- """Basic regular expression demostration facility (Perl style syntax).""" from Tkinter import * import re class ReDemo: def __init__(self, master): self.master = master self.promptdisplay = Label(self.master, anchor=W, text="Enter a Perl-style regular expression:") self.promptdisplay.pack(side=TOP, fill=X) self.regexdisplay = Entry(self.master) self.regexdisplay.pack(fill=X) self.regexdisplay.focus_set() self.addoptions() self.statusdisplay = Label(self.master, text="", anchor=W) self.statusdisplay.pack(side=TOP, fill=X) self.labeldisplay = Label(self.master, anchor=W, text="Enter a string to search:") self.labeldisplay.pack(fill=X) self.labeldisplay.pack(fill=X) self.showframe = Frame(master) self.showframe.pack(fill=X, anchor=W) self.showvar = StringVar(master) self.showvar.set("first") self.showfirstradio = Radiobutton(self.showframe, text="Highlight first match", variable=self.showvar, value="first", command=self.recompile) self.showfirstradio.pack(side=LEFT) self.showallradio = Radiobutton(self.showframe, text="Highlight all matches", variable=self.showvar, value="all", command=self.recompile) self.showallradio.pack(side=LEFT) self.stringdisplay = Text(self.master, width=60, height=4) self.stringdisplay.pack(fill=BOTH, expand=1) self.stringdisplay.tag_configure("hit", background="yellow") self.grouplabel = Label(self.master, text="Groups:", anchor=W) self.grouplabel.pack(fill=X) self.grouplist = Listbox(self.master) self.grouplist.pack(expand=1, fill=BOTH) self.regexdisplay.bind('', self.recompile) self.stringdisplay.bind('', self.reevaluate) self.compiled = None self.recompile() btags = self.regexdisplay.bindtags() self.regexdisplay.bindtags(btags[1:] + btags[:1]) btags = self.stringdisplay.bindtags() self.stringdisplay.bindtags(btags[1:] + btags[:1]) def addoptions(self): self.frames = [] self.boxes = [] self.vars = [] for name in ('IGNORECASE', 'LOCALE', 'MULTILINE', 'DOTALL', 'VERBOSE'): if len(self.boxes) % 3 == 0: frame = Frame(self.master) frame.pack(fill=X) self.frames.append(frame) val = getattr(re, name) var = IntVar() box = Checkbutton(frame, variable=var, text=name, offvalue=0, onvalue=val, command=self.recompile) box.pack(side=LEFT) self.boxes.append(box) self.vars.append(var) def getflags(self): flags = 0 for var in self.vars: flags = flags | var.get() flags = flags return flags def recompile(self, event=None): try: self.compiled = re.compile(self.regexdisplay.get(), self.getflags()) bg = self.promptdisplay['background'] self.statusdisplay.config(text="", background=bg) except re.error, msg: self.compiled = None self.statusdisplay.config( text="re.error: %s" % str(msg), background="red") self.reevaluate() def reevaluate(self, event=None): try: self.stringdisplay.tag_remove("hit", "1.0", END) except TclError: pass try: self.stringdisplay.tag_remove("hit0", "1.0", END) except TclError: pass self.grouplist.delete(0, END) if not self.compiled: return self.stringdisplay.tag_configure("hit", background="yellow") self.stringdisplay.tag_configure("hit0", background="orange") text = self.stringdisplay.get("1.0", END) last = 0 nmatches = 0 while last <= len(text): m = self.compiled.search(text, last) if m is None: break first, last = m.span() if last == first: last = first+1 tag = "hit0" else: tag = "hit" pfirst = "1.0 + %d chars" % first plast = "1.0 + %d chars" % last self.stringdisplay.tag_add(tag, pfirst, plast) if nmatches == 0: self.stringdisplay.yview_pickplace(pfirst) groups = list(m.groups()) groups.insert(0, m.group()) for i in range(len(groups)): g = "%2d: %s" % (i, `groups[i]`) self.grouplist.insert(END, g) nmatches = nmatches + 1 if self.showvar.get() == "first": break if nmatches == 0: self.statusdisplay.config(text="(no match)", background="yellow") else: self.statusdisplay.config(text="") # Main function, run when invoked as a stand-alone Python program. def main(): root = Tk() demo = ReDemo(root) root.protocol('WM_DELETE_WINDOW', root.quit) root.mainloop() if __name__ == '__main__': main() From python-dev@python.org Fri Oct 6 18:38:46 2000 From: python-dev@python.org (Guido van Rossum) Date: Fri, 6 Oct 2000 10:38:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/tkinter/guido redemo.py,1.2,NONE regexdemo.py,1.2,NONE Message-ID: <200010061738.KAA03979@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/tkinter/guido In directory slayer.i.sourceforge.net:/tmp/cvs-serv3667 Removed Files: redemo.py regexdemo.py Log Message: Removing these scripts. redemo.py lives on in Tools/scripts/. regexdemo.py is obsolete with the regex module. --- redemo.py DELETED --- --- regexdemo.py DELETED --- From python-dev@python.org Fri Oct 6 18:41:54 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 10:41:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_sax.py,1.8,1.9 Message-ID: <200010061741.KAA05574@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv4893/test Modified Files: test_sax.py Log Message: Add SAXReaderNotAvailable, and use it to distinguish between an ImportError, and a missing driver. Index: test_sax.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sax.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_sax.py 2000/10/03 22:35:29 1.8 --- test_sax.py 2000/10/06 17:41:50 1.9 *************** *** 3,10 **** # $Id$ from xml.sax.saxutils import XMLGenerator, escape, XMLFilterBase from xml.sax.expatreader import create_parser from xml.sax.xmlreader import InputSource, AttributesImpl, AttributesNSImpl - from xml.sax.handler import ContentHandler from cStringIO import StringIO from test_support import verbose, TestFailed, findfile --- 3,15 ---- # $Id$ + from xml.sax import make_parser, ContentHandler + try: + make_parser() + except xml.sax.SAXReaderNotAvailable: + # don't try to test this module if we cannot create a parser + raise ImportError("no XML parsers available") from xml.sax.saxutils import XMLGenerator, escape, XMLFilterBase from xml.sax.expatreader import create_parser from xml.sax.xmlreader import InputSource, AttributesImpl, AttributesNSImpl from cStringIO import StringIO from test_support import verbose, TestFailed, findfile *************** *** 41,44 **** --- 46,60 ---- def test_escape_extra(): return escape("Hei pĺ deg", {"ĺ" : "å"}) == "Hei på deg" + + def test_make_parser(): + try: + # Creating a parser should succeed - it should fall back + # to the expatreader + p = make_parser(['xml.parsers.no_such_parser']) + except: + return 0 + else: + return p + # ===== XMLGenerator From python-dev@python.org Fri Oct 6 18:41:54 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 10:41:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_sax,1.4,1.5 Message-ID: <200010061741.KAA05573@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv4893/test/output Modified Files: test_sax Log Message: Add SAXReaderNotAvailable, and use it to distinguish between an ImportError, and a missing driver. Index: test_sax =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_sax,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_sax 2000/09/24 20:19:44 1.4 --- test_sax 2000/10/06 17:41:51 1.5 *************** *** 15,18 **** --- 15,19 ---- Passed test_expat_nsattrs_wattr Passed test_filter_basic + Passed test_make_parser Passed test_nsattrs_empty Passed test_nsattrs_wattr *************** *** 23,25 **** Passed test_xmlgen_ns Passed test_xmlgen_pi ! 23 tests, 0 failures --- 24,26 ---- Passed test_xmlgen_ns Passed test_xmlgen_pi ! 24 tests, 0 failures From python-dev@python.org Fri Oct 6 18:41:55 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 10:41:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax __init__.py,1.12,1.13 _exceptions.py,1.4,1.5 expatreader.py,1.13,1.14 Message-ID: <200010061741.KAA05587@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv4893/xml/sax Modified Files: __init__.py _exceptions.py expatreader.py Log Message: Add SAXReaderNotAvailable, and use it to distinguish between an ImportError, and a missing driver. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/__init__.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** __init__.py 2000/09/24 21:31:06 1.12 --- __init__.py 2000/10/06 17:41:51 1.13 *************** *** 23,27 **** from handler import ContentHandler, ErrorHandler from _exceptions import SAXException, SAXNotRecognizedException, \ ! SAXParseException, SAXNotSupportedException --- 23,28 ---- from handler import ContentHandler, ErrorHandler from _exceptions import SAXException, SAXNotRecognizedException, \ ! SAXParseException, SAXNotSupportedException, \ ! SAXReaderNotAvailable *************** *** 75,81 **** return _create_parser(parser_name) except ImportError,e: pass ! raise SAXException("No parsers found", None) # --- Internal utility methods used by make_parser --- 76,90 ---- return _create_parser(parser_name) except ImportError,e: + import sys + if sys.modules.has_key(parser_name): + # The parser module was found, but importing it + # failed unexpectedly, pass this exception through + raise + except SAXReaderNotAvailable: + # The parser module detected that it won't work properly, + # so try the next one pass ! raise SAXReaderNotAvailable("No parsers found", None) # --- Internal utility methods used by make_parser Index: _exceptions.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/_exceptions.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** _exceptions.py 2000/09/21 16:32:28 1.4 --- _exceptions.py 2000/10/06 17:41:52 1.5 *************** *** 105,106 **** --- 105,116 ---- applications and extensions may use this class for similar purposes.""" + + # ===== SAXNOTSUPPORTEDEXCEPTION ===== + + class SAXReaderNotAvailable(SAXNotSupportedException): + """Exception class for a missing driver. + + An XMLReader module (driver) should raise this exception when it + is first imported, e.g. when a support module cannot be imported. + It also may be raised during parsing, e.g. if executing an external + program is not permitted.""" Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** expatreader.py 2000/09/29 19:00:40 1.13 --- expatreader.py 2000/10/06 17:41:52 1.14 *************** *** 7,11 **** from xml.sax._exceptions import * ! from xml.parsers import expat from xml.sax import xmlreader, saxutils, handler --- 7,14 ---- from xml.sax._exceptions import * ! try: ! from xml.parsers import expat ! except ImportError: ! raise SAXReaderNotAvailable("expat not supported",None) from xml.sax import xmlreader, saxutils, handler From python-dev@python.org Fri Oct 6 19:46:24 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 6 Oct 2000 11:46:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_import.py,NONE,1.1 Message-ID: <200010061846.LAA12970@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv11958 Added Files: test_import.py Log Message: Adding Jeremy's new test_import (SF patch 101709). --- NEW FILE --- from test_support import TESTFN import os import random source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print >> f, "a =", a print >> f, "b =", b f.close() try: try: mod = __import__(TESTFN) except ImportError, err: raise ValueError, "import from .py failed: %s" % err if mod.a != a or mod.b != b: print a, "!=", mod.a print b, "!=", mod.b raise ValueError, "module loaded (%s) but contents invalid" % mod finally: os.unlink(source) try: try: reload(mod) except ImportError, err: raise ValueError, "import from .pyc/.pyo failed: %s" % err finally: try: os.unlink(pyc) except os.error: pass try: os.unlink(pyo) except os.error: pass From python-dev@python.org Fri Oct 6 19:46:24 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 6 Oct 2000 11:46:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_import,NONE,1.1 Message-ID: <200010061846.LAA12980@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv11958/output Added Files: test_import Log Message: Adding Jeremy's new test_import (SF patch 101709). --- NEW FILE --- test_import From python-dev@python.org Fri Oct 6 20:21:36 2000 From: python-dev@python.org (Jim Fulton) Date: Fri, 6 Oct 2000 12:21:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_StringIO.py,1.2,1.3 Message-ID: <200010061921.MAA22593@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv21804 Modified Files: test_StringIO.py Log Message: Uncommented tests that failed for cStringIO, Added missing clode to make the clode test test a close. ;) Index: test_StringIO.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_StringIO.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_StringIO.py 2000/09/28 04:25:33 1.2 --- test_StringIO.py 2000/10/06 19:21:32 1.3 *************** *** 15,35 **** f.truncate() print `f.getvalue()` ! # This test fails for cStringIO; reported as SourceForge bug #115531; ! # please uncomment this test when that bug is fixed. ! # http://sourceforge.net/bugs/?func=detailbug&bug_id=115531&group_id=5470 ! ## f.seek(0) ! ## f.truncate(5) ! ## print `f.getvalue()` ! ! # This test fails for cStringIO; reported as SourceForge bug #115530; ! # please uncomment this test when that bug is fixed. ! # http://sourceforge.net/bugs/?func=detailbug&bug_id=115530&group_id=5470 ! ## try: ! ## f.write("frobnitz") ! ## except ValueError, e: ! ## print "Caught expected ValueError writing to closed StringIO:" ! ## print e ! ## else: ! ## print "Failed to catch ValueError writing to closed StringIO." # Don't bother testing cStringIO without --- 15,29 ---- f.truncate() print `f.getvalue()` ! f.seek(0) ! f.truncate(5) ! print `f.getvalue()` ! f.close() ! try: ! f.write("frobnitz") ! except ValueError, e: ! print "Caught expected ValueError writing to closed StringIO:" ! print e ! else: ! print "Failed to catch ValueError writing to closed StringIO." # Don't bother testing cStringIO without From python-dev@python.org Fri Oct 6 20:24:27 2000 From: python-dev@python.org (Jim Fulton) Date: Fri, 6 Oct 2000 12:24:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules cStringIO.c,2.26,2.27 Message-ID: <200010061924.MAA25998@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv24871 Modified Files: cStringIO.c Log Message: Added a new "base" type, IOobject for which most of the operations are defined. This will, hopefully clarify some of the logic. Added close test to raise proper error when operations are performed on closed StringIOs. Added a position argument to the truncate method. Added a size argument to readline. Added PyArg_Parse calls for methods that don't take arguments to make sure they don't take arguments. Index: cStringIO.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cStringIO.c,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** cStringIO.c 2000/09/19 11:06:46 2.26 --- cStringIO.c 2000/10/06 19:24:23 2.27 *************** *** 86,234 **** #include "cStringIO.h" ! #define UNLESS(E) if(!(E)) ! /* Declarations for objects of type StringO */ typedef struct { PyObject_HEAD char *buf; ! int pos, string_size, buf_size, softspace; [...992 lines suppressed...] --- 733,740 ---- static struct PycStringIO_CAPI CAPI = { ! IO_cread, ! IO_creadline, O_cwrite, ! IO_cgetval, newOobject, newIobject, *************** *** 701,704 **** /* Maybe make certain warnings go away */ ! if(0) PycString_IMPORT; } --- 771,774 ---- /* Maybe make certain warnings go away */ ! if (0) PycString_IMPORT; } From python-dev@python.org Fri Oct 6 20:26:08 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 12:26:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib UserList.py,1.12,1.13 Message-ID: <200010061926.MAA27867@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv27739 Modified Files: UserList.py Log Message: __getslice__(): Make this use the constructor form that gets a sequence as a parameter; this was the only use of the base constructor or surgical alteration of another object's data attribute. This change simplifies the constructor requirements for subclasses. This relates to SourceForge bug #115928. Index: UserList.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/UserList.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** UserList.py 2000/09/19 20:29:03 1.12 --- UserList.py 2000/10/06 19:26:01 1.13 *************** *** 25,31 **** def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) ! userlist = self.__class__() ! userlist.data[:] = self.data[i:j] ! return userlist def __setslice__(self, i, j, other): i = max(i, 0); j = max(j, 0) --- 25,29 ---- def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) ! return self.__class__(self.data[i:j]) def __setslice__(self, i, j, other): i = max(i, 0); j = max(j, 0) From python-dev@python.org Fri Oct 6 20:39:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 12:39:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcopy.tex,1.14,1.15 liboperator.tex,1.16,1.17 Message-ID: <200010061939.MAA06619@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6529/lib Modified Files: libcopy.tex liboperator.tex Log Message: It turns out that Guido does not like or encourage the use of the term "disciplines" for the __*__() methods, so they should be referred to as "methods" or "special methods", as appropriate in context. Index: libcopy.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcopy.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libcopy.tex 1999/06/29 16:02:12 1.14 --- libcopy.tex 2000/10/06 19:39:47 1.15 *************** *** 94,98 **** \begin{seealso} ! \seemodule{pickle}{Discussion of the special disciplines used to support object state retrieval and restoration.} \end{seealso} --- 94,98 ---- \begin{seealso} ! \seemodule{pickle}{Discussion of the special mmethds used to support object state retrieval and restoration.} \end{seealso} Index: liboperator.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liboperator.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** liboperator.tex 2000/10/02 03:36:18 1.16 --- liboperator.tex 2000/10/06 19:39:47 1.17 *************** *** 90,95 **** \funcline{__not__}{o} Return the outcome of \keyword{not} \var{o}. (Note that there is no ! \method{__not__()} discipline for object instances; only the ! interpreter core defines this operation.) \end{funcdesc} --- 90,95 ---- \funcline{__not__}{o} Return the outcome of \keyword{not} \var{o}. (Note that there is no ! \method{__not__()} method for object instances; only the interpreter ! core defines this operation.) \end{funcdesc} From python-dev@python.org Fri Oct 6 20:39:57 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 6 Oct 2000 12:39:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_linuxaudiodev.py,1.4,1.5 Message-ID: <200010061939.MAA06695@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv2679/Lib/test Modified Files: test_linuxaudiodev.py Log Message: test_linuxaudio: read the header from the .au file and do a sanity check pass only the data to the audio device call flush() so that program does not exit until playback is complete call all the other methods to verify that they work minimally call setparameters with a bunch of bugs arguments linuxaudiodev.c: use explicit O_WRONLY and O_RDONLY instead of 1 and 0 add a string name to each of the entries in audio_types[] add AFMT_A_LAW to the list of known formats add x_mode attribute to lad object, stores imode from open call test ioctl return value as == -1, not < 0 in read() method, resize string before return add getptr() method, that calls does ioctl on GETIPTR or GETOPTR depending on x_mode in setparameters() method, do better error checking and raise ValueErrors; also use ioctl calls recommended by Open Sound System Programmer's Guido (www.opensound.com) use PyModule_AddXXX to define names in module Index: test_linuxaudiodev.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_linuxaudiodev.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_linuxaudiodev.py 2000/08/04 15:25:58 1.4 --- test_linuxaudiodev.py 2000/10/06 19:39:55 1.5 *************** *** 1,11 **** from test_support import verbose, findfile, TestFailed, TestSkipped ! import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') --- 1,24 ---- from test_support import verbose, findfile, TestFailed, TestSkipped ! import errno + import fcntl + import linuxaudiodev import os + import select + import sunaudio + import time + + SND_FORMAT_MULAW_8 = 1 def play_sound_file(path): fp = open(path, 'r') + size, enc, rate, nchannels, extra = sunaudio.gethdr(fp) data = fp.read() fp.close() + + if enc != SND_FORMAT_MULAW_8: + print "Expect .au file with 8-bit mu-law samples" + return + try: a = linuxaudiodev.open('w') *************** *** 14,23 **** raise TestSkipped, msg raise TestFailed, msg ! else: ! a.write(data) ! a.close() def test(): play_sound_file(findfile('audiotest.au')) test() --- 27,78 ---- raise TestSkipped, msg raise TestFailed, msg ! ! # at least check that these methods can be invoked ! a.bufsize() ! a.obufcount() ! a.obuffree() ! a.getptr() ! a.fileno() ! ! # set parameters based on .au file headers ! a.setparameters(rate, 8, nchannels, linuxaudiodev.AFMT_MU_LAW, 1) ! a.write(data) ! a.flush() ! a.close() ! ! def test_errors(): ! a = linuxaudiodev.open("w") ! size = 8 ! fmt = linuxaudiodev.AFMT_U8 ! rate = 8000 ! nchannels = 1 ! try: ! a.setparameters(-1, size, nchannels, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, -2, nchannels, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, 3, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, nchannels, 177) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, nchannels, linuxaudiodev.AFMT_U16_LE) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, 16, nchannels, fmt) ! except ValueError, msg: ! print msg def test(): play_sound_file(findfile('audiotest.au')) + test_errors() test() From python-dev@python.org Fri Oct 6 20:39:58 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 6 Oct 2000 12:39:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_linuxaudiodev,1.1,1.2 Message-ID: <200010061939.MAA06704@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv2679/Lib/test/output Modified Files: test_linuxaudiodev Log Message: test_linuxaudio: read the header from the .au file and do a sanity check pass only the data to the audio device call flush() so that program does not exit until playback is complete call all the other methods to verify that they work minimally call setparameters with a bunch of bugs arguments linuxaudiodev.c: use explicit O_WRONLY and O_RDONLY instead of 1 and 0 add a string name to each of the entries in audio_types[] add AFMT_A_LAW to the list of known formats add x_mode attribute to lad object, stores imode from open call test ioctl return value as == -1, not < 0 in read() method, resize string before return add getptr() method, that calls does ioctl on GETIPTR or GETOPTR depending on x_mode in setparameters() method, do better error checking and raise ValueErrors; also use ioctl calls recommended by Open Sound System Programmer's Guido (www.opensound.com) use PyModule_AddXXX to define names in module Index: test_linuxaudiodev =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_linuxaudiodev,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_linuxaudiodev 2000/06/10 04:22:57 1.1 --- test_linuxaudiodev 2000/10/06 19:39:55 1.2 *************** *** 1 **** --- 1,7 ---- test_linuxaudiodev + expected rate >= 0, not -1 + expected sample size >= 0, not -2 + nchannels must be 1 or 2, not 3 + unknown audio encoding: 177 + sample size 16 expected for Little-endian 16-bit unsigned format: 8 received + sample size 8 expected for Logarithmic mu-law audio: 16 received From python-dev@python.org Fri Oct 6 20:39:58 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 6 Oct 2000 12:39:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules linuxaudiodev.c,2.9,2.10 Message-ID: <200010061939.MAA06705@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2679/Modules Modified Files: linuxaudiodev.c Log Message: test_linuxaudio: read the header from the .au file and do a sanity check pass only the data to the audio device call flush() so that program does not exit until playback is complete call all the other methods to verify that they work minimally call setparameters with a bunch of bugs arguments linuxaudiodev.c: use explicit O_WRONLY and O_RDONLY instead of 1 and 0 add a string name to each of the entries in audio_types[] add AFMT_A_LAW to the list of known formats add x_mode attribute to lad object, stores imode from open call test ioctl return value as == -1, not < 0 in read() method, resize string before return add getptr() method, that calls does ioctl on GETIPTR or GETOPTR depending on x_mode in setparameters() method, do better error checking and raise ValueErrors; also use ioctl calls recommended by Open Sound System Programmer's Guido (www.opensound.com) use PyModule_AddXXX to define names in module Index: linuxaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** linuxaudiodev.c 2000/09/01 15:35:12 2.9 --- linuxaudiodev.c 2000/10/06 19:39:55 2.10 *************** *** 25,30 **** --- 25,34 ---- #ifdef HAVE_FCNTL_H #include + #else + #define O_RDONLY 00 + #define O_WRONLY 01 #endif + #include #if defined(linux) *************** *** 45,66 **** PyObject_HEAD; int x_fd; /* The open file */ int x_icount; /* Input count */ int x_ocount; /* Output count */ ! uint32_t x_afmts; /* Supported audio formats */ } lad_t; static struct { int a_bps; uint32_t a_fmt; } audio_types[] = { ! { 8, AFMT_MU_LAW }, ! { 8, AFMT_U8 }, ! { 8, AFMT_S8 }, ! { 16, AFMT_U16_BE }, ! { 16, AFMT_U16_LE }, ! { 16, AFMT_S16_BE }, ! { 16, AFMT_S16_LE }, }; staticforward PyTypeObject Ladtype; --- 49,78 ---- PyObject_HEAD; int x_fd; /* The open file */ + int x_mode; /* file mode */ int x_icount; /* Input count */ int x_ocount; /* Output count */ ! uint32_t x_afmts; /* Audio formats supported by hardware*/ } lad_t; + /* XXX several format defined in soundcard.h are not supported, + including _NE (native endian) options and S32 options + */ + static struct { int a_bps; uint32_t a_fmt; + char *a_name; } audio_types[] = { ! { 8, AFMT_MU_LAW, "Logarithmic mu-law audio" }, ! { 8, AFMT_A_LAW, "Logarithmic A-law audio" }, ! { 8, AFMT_U8, "Standard unsigned 8-bit audio" }, ! { 8, AFMT_S8, "Standard signed 8-bit audio" }, ! { 16, AFMT_U16_BE, "Big-endian 16-bit unsigned format" }, ! { 16, AFMT_U16_LE, "Little-endian 16-bit unsigned format" }, ! { 16, AFMT_S16_BE, "Big-endian 16-bit signed format" }, ! { 16, AFMT_S16_LE, "Little-endian 16-bit signed format" }, }; + static int n_audio_types = sizeof(audio_types) / sizeof(audio_types[0]); staticforward PyTypeObject Ladtype; *************** *** 79,85 **** if (!PyArg_ParseTuple(arg, "s:open", &mode)) return NULL; if (strcmp(mode, "r") == 0) ! imode = 0; else if (strcmp(mode, "w") == 0) ! imode = 1; else { PyErr_SetString(LinuxAudioError, "Mode should be one of 'r', or 'w'"); --- 91,97 ---- if (!PyArg_ParseTuple(arg, "s:open", &mode)) return NULL; if (strcmp(mode, "r") == 0) ! imode = O_RDONLY; else if (strcmp(mode, "w") == 0) ! imode = O_WRONLY; else { PyErr_SetString(LinuxAudioError, "Mode should be one of 'r', or 'w'"); *************** *** 88,107 **** /* Open the correct device. The base device name comes from the ! * AUDIODEV environment variable first, then /dev/audio. The * control device tacks "ctl" onto the base device name. */ basedev = getenv("AUDIODEV"); if (!basedev) basedev = "/dev/dsp"; ! if ((fd = open(basedev, imode)) < 0) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; } ! if (imode && ioctl(fd, SNDCTL_DSP_NONBLOCK, NULL) < 0) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; } ! if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) < 0) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; --- 100,124 ---- /* Open the correct device. The base device name comes from the ! * AUDIODEV environment variable first, then /dev/dsp. The * control device tacks "ctl" onto the base device name. + * + * Note that the only difference between /dev/audio and /dev/dsp + * is that the former uses logarithmic mu-law encoding and the + * latter uses 8-bit unsigned encoding. */ + basedev = getenv("AUDIODEV"); if (!basedev) basedev = "/dev/dsp"; ! if ((fd = open(basedev, imode)) == -1) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; } ! if (imode == O_WRONLY && ioctl(fd, SNDCTL_DSP_NONBLOCK, NULL) == -1) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; } ! if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) { PyErr_SetFromErrnoWithFilename(LinuxAudioError, basedev); return NULL; *************** *** 112,116 **** return NULL; } ! xp->x_fd = fd; xp->x_icount = xp->x_ocount = 0; xp->x_afmts = afmts; --- 129,134 ---- return NULL; } ! xp->x_fd = fd; ! xp->x_mode = imode; xp->x_icount = xp->x_ocount = 0; xp->x_afmts = afmts; *************** *** 139,147 **** if (rv == NULL) return NULL; ! ! if (!(cp = PyString_AsString(rv))) { ! Py_DECREF(rv); ! return NULL; ! } if ((count = read(self->x_fd, cp, size)) < 0) { PyErr_SetFromErrno(LinuxAudioError); --- 157,161 ---- if (rv == NULL) return NULL; ! cp = PyString_AS_STRING(rv); if ((count = read(self->x_fd, cp, size)) < 0) { PyErr_SetFromErrno(LinuxAudioError); *************** *** 150,153 **** --- 164,169 ---- } self->x_icount += count; + if (_PyString_Resize(&rv, count) == -1) + return NULL; return rv; } *************** *** 159,172 **** int rv, size; ! if (!PyArg_ParseTuple(args, "s#:write", &cp, &size)) return NULL; while (size > 0) { ! if ((rv = write(self->x_fd, cp, size)) < 0) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } self->x_ocount += rv; ! size -= rv; ! cp += rv; } Py_INCREF(Py_None); --- 175,189 ---- int rv, size; ! if (!PyArg_ParseTuple(args, "s#:write", &cp, &size)) ! return NULL; while (size > 0) { ! if ((rv = write(self->x_fd, cp, size)) == -1) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } self->x_ocount += rv; ! size -= rv; ! cp += rv; } Py_INCREF(Py_None); *************** *** 177,181 **** lad_close(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":close")) return NULL; if (self->x_fd >= 0) { close(self->x_fd); --- 194,200 ---- lad_close(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":close")) ! return NULL; ! if (self->x_fd >= 0) { close(self->x_fd); *************** *** 189,193 **** lad_fileno(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":fileno")) return NULL; return PyInt_FromLong(self->x_fd); } --- 208,213 ---- lad_fileno(lad_t *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":fileno")) ! return NULL; return PyInt_FromLong(self->x_fd); } *************** *** 196,236 **** lad_setparameters(lad_t *self, PyObject *args) { ! int rate, ssize, nchannels, stereo, n, fmt; ! if (!PyArg_ParseTuple(args, "iiii:setparameters", ! &rate, &ssize, &nchannels, &fmt)) return NULL; ! if (rate < 0 || ssize < 0 || (nchannels != 1 && nchannels != 2)) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; } ! if (ioctl(self->x_fd, SOUND_PCM_WRITE_RATE, &rate) < 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; } ! if (ioctl(self->x_fd, SNDCTL_DSP_SAMPLESIZE, &ssize) < 0) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } ! stereo = (nchannels == 1)? 0: (nchannels == 2)? 1: -1; ! if (ioctl(self->x_fd, SNDCTL_DSP_STEREO, &stereo) < 0) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } ! for (n = 0; n != sizeof(audio_types) / sizeof(audio_types[0]); n++) if (fmt == audio_types[n].a_fmt) break; ! ! if (n == sizeof(audio_types) / sizeof(audio_types[0]) || ! audio_types[n].a_bps != ssize || ! (self->x_afmts & audio_types[n].a_fmt) == 0) { ! PyErr_SetFromErrno(LinuxAudioError); ! return NULL; } ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, &audio_types[n].a_fmt) < 0) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } Py_INCREF(Py_None); return Py_None; --- 216,278 ---- lad_setparameters(lad_t *self, PyObject *args) { ! int rate, ssize, nchannels, n, fmt, emulate=0; ! if (!PyArg_ParseTuple(args, "iiii|i:setparameters", ! &rate, &ssize, &nchannels, &fmt, &emulate)) return NULL; ! if (rate < 0) { ! PyErr_Format(PyExc_ValueError, "expected rate >= 0, not %d", ! rate); ! return NULL; } ! if (ssize < 0) { ! PyErr_Format(PyExc_ValueError, "expected sample size >= 0, not %d", ! ssize); ! return NULL; ! } ! if (nchannels != 1 && nchannels != 2) { ! PyErr_Format(PyExc_ValueError, "nchannels must be 1 or 2, not %d", ! nchannels); ! return NULL; } ! ! if (ioctl(self->x_fd, SNDCTL_DSP_SPEED, &rate) == -1) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } ! if (ioctl(self->x_fd, SNDCTL_DSP_CHANNELS, &nchannels) == -1) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } ! ! for (n = 0; n < n_audio_types; n++) if (fmt == audio_types[n].a_fmt) break; ! if (n == n_audio_types) { ! PyErr_Format(PyExc_ValueError, "unknown audio encoding: %d", fmt); ! return NULL; ! } ! if (audio_types[n].a_bps != ssize) { ! PyErr_Format(PyExc_ValueError, ! "sample size %d expected for %s: %d received", ! audio_types[n].a_bps, audio_types[n].a_name, ssize); ! return NULL; ! } ! ! if (emulate == 0) { ! if ((self->x_afmts & audio_types[n].a_fmt) == 0) { ! PyErr_Format(PyExc_ValueError, ! "format not supported by device: %s", ! audio_types[n].a_name); ! return NULL; ! } } ! if (ioctl(self->x_fd, SNDCTL_DSP_SETFMT, ! &audio_types[n].a_fmt) == -1) { PyErr_SetFromErrno(LinuxAudioError); return NULL; } + Py_INCREF(Py_None); return Py_None; *************** *** 343,347 **** if (!PyArg_ParseTuple(args, ":flush")) return NULL; ! if (ioctl(self->x_fd, SNDCTL_DSP_SYNC, NULL) < 0) { PyErr_SetFromErrno(LinuxAudioError); return NULL; --- 385,389 ---- if (!PyArg_ParseTuple(args, ":flush")) return NULL; ! if (ioctl(self->x_fd, SNDCTL_DSP_SYNC, NULL) == -1) { PyErr_SetFromErrno(LinuxAudioError); return NULL; *************** *** 351,354 **** --- 393,416 ---- } + static PyObject * + lad_getptr(lad_t *self, PyObject *args) + { + count_info info; + int req; + + if (!PyArg_ParseTuple(args, ":getptr")) + return NULL; + + if (self->x_mode == O_RDONLY) + req = SNDCTL_DSP_GETIPTR; + else + req = SNDCTL_DSP_GETOPTR; + if (ioctl(self->x_fd, req, &info) == -1) { + PyErr_SetFromErrno(LinuxAudioError); + return NULL; + } + return Py_BuildValue("iii", info.bytes, info.blocks, info.ptr); + } + static PyMethodDef lad_methods[] = { { "read", (PyCFunction)lad_read, METH_VARARGS }, *************** *** 361,364 **** --- 423,427 ---- { "close", (PyCFunction)lad_close, METH_VARARGS }, { "fileno", (PyCFunction)lad_fileno, METH_VARARGS }, + { "getptr", (PyCFunction)lad_getptr, METH_VARARGS }, { NULL, NULL} /* sentinel */ }; *************** *** 399,447 **** initlinuxaudiodev(void) { ! PyObject *m, *d, *x; m = Py_InitModule("linuxaudiodev", linuxaudiodev_methods); - d = PyModule_GetDict(m); LinuxAudioError = PyErr_NewException("linuxaudiodev.error", NULL, NULL); if (LinuxAudioError) ! PyDict_SetItemString(d, "error", LinuxAudioError); ! x = PyInt_FromLong((long) AFMT_MU_LAW); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_MU_LAW", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S8); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S8", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_U16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_U16_LE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_BE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_BE", x) < 0) ! goto error; ! Py_DECREF(x); ! ! x = PyInt_FromLong((long) AFMT_S16_LE); ! if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_LE", x) < 0) ! goto error; - error: - Py_DECREF(x); return; } --- 462,490 ---- initlinuxaudiodev(void) { ! PyObject *m; m = Py_InitModule("linuxaudiodev", linuxaudiodev_methods); LinuxAudioError = PyErr_NewException("linuxaudiodev.error", NULL, NULL); if (LinuxAudioError) ! PyModule_AddObject(m, "error", LinuxAudioError); ! if (PyModule_AddIntConstant(m, "AFMT_MU_LAW", (long)AFMT_MU_LAW) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_A_LAW", (long)AFMT_A_LAW) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_U8", (long)AFMT_U8) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_S8", (long)AFMT_S8) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_U16_BE", (long)AFMT_U16_BE) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_U16_LE", (long)AFMT_U16_LE) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_S16_BE", (long)AFMT_S16_BE) == -1) ! return; ! if (PyModule_AddIntConstant(m, "AFMT_S16_LE", (long)AFMT_S16_LE) == -1) ! return; return; } From python-dev@python.org Fri Oct 6 20:59:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 12:59:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.56,1.57 Message-ID: <200010061959.MAA19695@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv19636 Modified Files: libre.tex Log Message: Made a number of revisions suggested by Fredrik Lundh. Revised the first paragraph so it doesn't sound like it was written when 7-bit strings were assumed; note that Unicode strings can be used. Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -r1.56 -r1.57 *** libre.tex 2000/10/05 15:22:28 1.56 --- libre.tex 2000/10/06 19:59:22 1.57 *************** *** 1,20 **** \section{\module{re} --- ! Perl-style regular expression operations.} \declaremodule{standard}{re} \moduleauthor{Andrew M. Kuchling}{amk1@bigfoot.com} \sectionauthor{Andrew M. Kuchling}{amk1@bigfoot.com} ! \modulesynopsis{Perl-style regular expression search and match ! operations.} This module provides regular expression matching operations similar to ! those found in Perl. It's 8-bit clean: the strings being processed ! may contain both null bytes and characters whose high bit is set. Regular ! expression pattern strings may not contain null bytes, but can specify ! the null byte using the \code{\e\var{number}} notation. ! Characters with the high bit set may be included. The \module{re} ! module is always available. Regular expressions use the backslash character (\character{\e}) to --- 1,20 ---- \section{\module{re} --- ! Regular expression operations} \declaremodule{standard}{re} \moduleauthor{Andrew M. Kuchling}{amk1@bigfoot.com} + \moduleauthor{Fredrik Lundh}{effbot@telia.com} \sectionauthor{Andrew M. Kuchling}{amk1@bigfoot.com} ! \modulesynopsis{Regular expression search and match operations with a ! Perl-style expression syntax.} This module provides regular expression matching operations similar to ! those found in Perl. Regular expression pattern strings may not ! contain null bytes, but can specify the null byte using the ! \code{\e\var{number}} notation. Both patterns and strings to be ! searched can be Unicode strings as well as 8-bit strings. The ! \module{re} module is always available. Regular expressions use the backslash character (\character{\e}) to *************** *** 35,38 **** --- 35,47 ---- string notation. + \strong{Implementation note:} + The \module{re}\refstmodindex{pre} module has two distinct + implementations: \module{sre} is the default implementation and + includes Unicode support, but may run into stack limitations for some + patterns. Though this will be fixed for a future release of Python, + the older implementation (without Unicode support) is still available + as the \module{pre}\refstmodindex{pre} module. + + \subsection{Regular Expression Syntax \label{re-syntax}} *************** *** 156,162 **** \item[\character{|}]\code{A|B}, where A and B can be arbitrary REs, ! creates a regular expression that will match either A or B. This can ! be used inside groups (see below) as well. To match a literal \character{|}, ! use \regexp{\e|}, or enclose it inside a character class, as in \regexp{[|]}. \item[\code{(...)}] Matches whatever regular expression is inside the --- 165,178 ---- \item[\character{|}]\code{A|B}, where A and B can be arbitrary REs, ! creates a regular expression that will match either A or B. An ! arbitrary number of REs can be separated by the \character{|} in this ! way. This can be used inside groups (see below) as well. REs ! separated by \character{|} are tried from left to right, and the first ! one that allows the complete pattern to match is considered the ! accepted branch. This means that if \code{A} matches, \code{B} will ! never be tested, even if it would produce a longer overall match. In ! other words, the \character{|} operator is never greedy. To match a ! literal \character{|}, use \regexp{\e|}, or enclose it inside a ! character class, as in \regexp{[|]}. \item[\code{(...)}] Matches whatever regular expression is inside the *************** *** 184,187 **** --- 200,208 ---- include the flags as part of the regular expression, instead of passing a \var{flag} argument to the \function{compile()} function. + + Note that the \regexp{(?x)} flag changes how the expression is parsed. + It should be used first in the expression string, or after one or more + whitespace characters. If there are non-whitespace characters before + the flag, the results are undefined. \item[\code{(?:...)}] A non-grouping version of regular parentheses. From python-dev@python.org Fri Oct 6 21:01:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 13:01:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.18,1.19 Message-ID: <200010062001.NAA21022@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20962 Modified Files: libcurses.tex Log Message: Revise the versioning information to say that this was revised in 1.6, not added then, and note what the change was (ncurses, change to a package). Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libcurses.tex 2000/09/25 14:14:30 1.18 --- libcurses.tex 2000/10/06 20:01:23 1.19 *************** *** 6,10 **** \sectionauthor{Eric Raymond}{esr@thyrsus.com} \modulesynopsis{An interface to the curses library.} ! \versionadded{1.6} The \module{curses} module provides an interface to the curses --- 6,12 ---- \sectionauthor{Eric Raymond}{esr@thyrsus.com} \modulesynopsis{An interface to the curses library.} ! ! \versionchanged[Added support for the \code{ncurses} library and ! converted to a package]{1.6} The \module{curses} module provides an interface to the curses From python-dev@python.org Fri Oct 6 21:04:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 13:04:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libuserdict.tex,1.16,1.17 Message-ID: <200010062004.NAA23709@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv23626 Modified Files: libuserdict.tex Log Message: Add notes on the requirements for subclasses. This closes SourceForge bug #115928. Index: libuserdict.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuserdict.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** libuserdict.tex 2000/09/09 03:23:50 1.16 --- libuserdict.tex 2000/10/06 20:04:48 1.17 *************** *** 65,68 **** --- 65,87 ---- \end{memberdesc} + \strong{Subclassing requirements:} + Subclasses of \class{UserList} are expect to offer a constructor which + can be called with either no arguments or one argument. List + operations which return a new sequence attempt to create an instance + of the actual implementation class. To do so, it assumes that the + constructor can be called with a single parameter, which is a sequence + object used as a data source. + + If a derived class does not wish to comply with this requirement, all + of the special methods supported by this class will need to be + overridden; please consult the sources for information about the + methods which need to be provided in that case. + + \versionchanged[Python versions 1.5.2 and 1.6 also required that the + constructor be callable with no parameters, and offer + a mutable \member{data} attribute. Earlier versions + of Python did not attempt to create instances of the + derived class]{2.0} + \section{\module{UserString} --- From python-dev@python.org Fri Oct 6 21:17:04 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 13:17:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcopy.tex,1.15,1.16 Message-ID: <200010062017.NAA00499@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv367 Modified Files: libcopy.tex Log Message: Fix really bad typo, noted by Neil Schemenauer . Index: libcopy.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcopy.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libcopy.tex 2000/10/06 19:39:47 1.15 --- libcopy.tex 2000/10/06 20:16:50 1.16 *************** *** 94,98 **** \begin{seealso} ! \seemodule{pickle}{Discussion of the special mmethds used to support object state retrieval and restoration.} \end{seealso} --- 94,98 ---- \begin{seealso} ! \seemodule{pickle}{Discussion of the special methods used to support object state retrieval and restoration.} \end{seealso} From python-dev@python.org Fri Oct 6 21:28:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 13:28:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sunau.py,1.17,1.18 Message-ID: <200010062028.NAA10036@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9980 Modified Files: sunau.py Log Message: Fix a couple of typos in docstrings. Index: sunau.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sunau.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** sunau.py 2000/08/17 04:45:13 1.17 --- sunau.py 2000/10/06 20:28:46 1.18 *************** *** 1,5 **** """Stuff to parse Sun and NeXT audio files. ! An audio consists of a header followed by the data. The structure of the header is as follows. --- 1,5 ---- """Stuff to parse Sun and NeXT audio files. ! An audio file consists of a header followed by the data. The structure of the header is as follows. *************** *** 27,31 **** The header size really gives the start of the data. The data size is the physical size of the data. From the other ! parameter the number of frames can be calculated. The encoding gives the way in which audio samples are encoded. Possible values are listed below. --- 27,31 ---- The header size really gives the start of the data. The data size is the physical size of the data. From the other ! parameters the number of frames can be calculated. The encoding gives the way in which audio samples are encoded. Possible values are listed below. From python-dev@python.org Fri Oct 6 21:42:36 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 13:42:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects fileobject.c,2.89,2.90 Message-ID: <200010062042.NAA20597@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv20549/Objects Modified Files: fileobject.c Log Message: Donn Cave : Fix large file support for BeOS. This closes SourceForge patch #101773. Refer to the patch discussion for information on possible alternate fixes. Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.89 retrieving revision 2.90 diff -C2 -r2.89 -r2.90 *** fileobject.c 2000/09/26 05:46:01 2.89 --- fileobject.c 2000/10/06 20:42:33 2.90 *************** *** 255,258 **** --- 255,260 ---- #elif defined(HAVE_FSEEK64) return fseek64(fp, offset, whence); + #elif defined(__BEOS__) + return _fseek(fp, offset, whence); #elif defined(HAVE_LARGEFILE_SUPPORT) && SIZEOF_FPOS_T >= 8 /* lacking a 64-bit capable fseek() (as Win64 does) use a 64-bit capable From python-dev@python.org Fri Oct 6 22:00:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 14:00:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.2,1.3 Message-ID: <200010062100.OAA00437@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv319 Modified Files: ACKS Log Message: Another name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ACKS 2000/10/06 15:25:01 1.2 --- ACKS 2000/10/06 21:00:40 1.3 *************** *** 76,79 **** --- 76,80 ---- Peter A. Koren Daniel Kozan + Andrew M. Kuchling Erno Kuusela Detlef Lannert From python-dev@python.org Fri Oct 6 22:07:17 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 6 Oct 2000 14:07:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsunau.tex,1.2,1.3 Message-ID: <200010062107.OAA05506@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5458/lib Modified Files: libsunau.tex Log Message: Include more information from the docstrings. Index: libsunau.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsunau.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libsunau.tex 2000/07/16 19:01:10 1.2 --- libsunau.tex 2000/10/06 21:07:14 1.3 *************** *** 6,13 **** \modulesynopsis{Provide an interface to the Sun AU sound format.} ! The \module{sunau} module provides a convenient interface to the Sun AU sound ! format. Note that this module is interface-compatible with the modules ! \refmodule{aifc} and \refmodule{wave}. The \module{sunau} module defines the following functions: --- 6,32 ---- \modulesynopsis{Provide an interface to the Sun AU sound format.} ! The \module{sunau} module provides a convenient interface to the Sun ! AU sound format. Note that this module is interface-compatible with ! the modules \refmodule{aifc} and \refmodule{wave}. ! ! An audio file consists of a header followed by the data. The fields ! of the header are: ! ! \begin{tableii}{l|l}{textrm}{Field}{Contents} ! \lineii{magic word}{The four bytes \samp{.snd}.} ! \lineii{header size}{Size of the header, including info, in bytes.} ! \lineii{data size}{Physical size of the data, in bytes.} ! \lineii{encoding}{Indicates how the audio samples are encoded.} ! \lineii{sample rate}{The sampling rate.} ! \lineii{\# of channels}{The number of channels in the samples.} ! \lineii{info}{\ASCII{} string giving a description of the audio ! file (padded with null bytes).} ! \end{tableii} ! ! Apart from the info field, all header fields are 4 bytes in size. ! They are all 32-bit unsigned integers encoded in big-endian byte ! order. + The \module{sunau} module defines the following functions: *************** *** 37,44 **** \end{excdesc} ! The \module{sunau} module defines the following data item: \begin{datadesc}{AUDIO_FILE_MAGIC} ! An integer every valid Sun AU file begins with a big-endian encoding of. \end{datadesc} --- 56,84 ---- \end{excdesc} ! The \module{sunau} module defines the following data items: \begin{datadesc}{AUDIO_FILE_MAGIC} ! An integer every valid Sun AU file begins with, stored in big-endian ! form. This is the string \samp{.snd} interpreted as an integer. ! \end{datadesc} ! ! \begin{datadesc}{AUDIO_FILE_ENCODING_MULAW_8} ! \dataline{AUDIO_FILE_ENCODING_LINEAR_8} ! \dataline{AUDIO_FILE_ENCODING_LINEAR_16} ! \dataline{AUDIO_FILE_ENCODING_LINEAR_24} ! \dataline{AUDIO_FILE_ENCODING_LINEAR_32} ! \dataline{AUDIO_FILE_ENCODING_ALAW_8} ! Values of the encoding field from the AU header which are supported by ! this module. ! \end{datadesc} ! ! \begin{datadesc}{AUDIO_FILE_ENCODING_FLOAT} ! \dataline{AUDIO_FILE_ENCODING_DOUBLE} ! \dataline{AUDIO_FILE_ENCODING_ADPCM_G721} ! \dataline{AUDIO_FILE_ENCODING_ADPCM_G722} ! \dataline{AUDIO_FILE_ENCODING_ADPCM_G723_3} ! \dataline{AUDIO_FILE_ENCODING_ADPCM_G723_5} ! Additional known values of the encoding field from the AU header, but ! which are not supported by this module. \end{datadesc} *************** *** 99,107 **** \begin{methoddesc}[AU_read]{setpos}{pos} ! Set the file pointer to the specified position. \end{methoddesc} \begin{methoddesc}[AU_read]{tell}{} ! Return current file pointer position. \end{methoddesc} --- 139,149 ---- \begin{methoddesc}[AU_read]{setpos}{pos} ! Set the file pointer to the specified position. Only values returned ! from \method{tell()} should be used for \var{pos}. \end{methoddesc} \begin{methoddesc}[AU_read]{tell}{} ! Return current file pointer position. Note that the returned value ! has nothing to do with the actual position in the file. \end{methoddesc} From python-dev@python.org Fri Oct 6 22:09:02 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:09:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.14,1.15 Message-ID: <200010062109.OAA07104@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv2763 Modified Files: expatreader.py Log Message: Move translation from expat.error to SAXParseException into feed, so that callers of feed will get a SAXException. In close, feed the last chunk first before calling endDocument, so that the parser may report errors before the end of the document. Don't do anything in a nested parser. Don't call endDocument in parse; that will be called in close. Use self._source for finding the SystemID; XML_GetBase will be cleared in case of an error. Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** expatreader.py 2000/10/06 17:41:52 1.14 --- expatreader.py 2000/10/06 21:08:59 1.15 *************** *** 40,50 **** self.reset() self._cont_handler.setDocumentLocator(self) ! try: ! xmlreader.IncrementalParser.parse(self, source) ! except expat.error: ! error_code = self._parser.ErrorCode ! raise SAXParseException(expat.ErrorString(error_code), None, self) ! ! self._cont_handler.endDocument() def prepareParser(self, source): --- 40,44 ---- self.reset() self._cont_handler.setDocumentLocator(self) ! xmlreader.IncrementalParser.parse(self, source) def prepareParser(self, source): *************** *** 74,78 **** # IncrementalParser methods ! def feed(self, data): if not self._parsing: self._parsing = 1 --- 68,72 ---- # IncrementalParser methods ! def feed(self, data, isFinal = 0): if not self._parsing: self._parsing = 1 *************** *** 80,92 **** self._cont_handler.startDocument() ! if not self._parser.Parse(data, 0): ! msg = pyexpat.ErrorString(self._parser.ErrorCode) ! raise SAXParseException(msg, None, self) def close(self): ! if self._parsing: ! self._cont_handler.endDocument() ! self._parsing = 0 ! self._parser.Parse("", 1) def reset(self): --- 74,94 ---- self._cont_handler.startDocument() ! try: ! # The isFinal parameter is internal to the expat reader. ! # If it is set to true, expat will check validity of the entire ! # document. When feeding chunks, they are not normally final - ! # except when invoked from close. ! self._parser.Parse(data, isFinal) ! except expat.error: ! error_code = self._parser.ErrorCode ! raise SAXParseException(expat.ErrorString(error_code), None, self) def close(self): ! if self._entity_stack: ! # If we are completing an external entity, do nothing here ! return ! self.feed("", isFinal = 1) ! self._cont_handler.endDocument() ! self._parsing = 0 def reset(self): *************** *** 129,133 **** def getSystemId(self): ! return self._parser.GetBase() # event handlers --- 131,135 ---- def getSystemId(self): ! return self._source.getSystemId() # event handlers *************** *** 195,199 **** try: xmlreader.IncrementalParser.parse(self, source) ! self.close() except: return 0 # FIXME: save error info here? --- 197,201 ---- try: xmlreader.IncrementalParser.parse(self, source) ! self._parser.Parse("",1) except: return 0 # FIXME: save error info here? From python-dev@python.org Fri Oct 6 22:10:37 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:10:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.15,1.16 Message-ID: <200010062110.OAA08697@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv8144 Modified Files: expatreader.py Log Message: Don't report a final chunk for an external entity parser. Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** expatreader.py 2000/10/06 21:08:59 1.15 --- expatreader.py 2000/10/06 21:10:34 1.16 *************** *** 197,201 **** try: xmlreader.IncrementalParser.parse(self, source) - self._parser.Parse("",1) except: return 0 # FIXME: save error info here? --- 197,200 ---- From python-dev@python.org Fri Oct 6 22:11:26 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:11:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax saxutils.py,1.9,1.10 Message-ID: <200010062111.OAA09288@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv8906 Modified Files: saxutils.py Log Message: Don't use a file object as system id; try to propagate the file name to the InputSource. Index: saxutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/saxutils.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** saxutils.py 2000/10/03 22:35:26 1.9 --- saxutils.py 2000/10/06 21:11:20 1.10 *************** *** 204,209 **** elif hasattr(source, "read"): f = source ! source = xmlreader.InputSource(source) source.setByteStream(f) if source.getByteStream() is None: --- 204,211 ---- elif hasattr(source, "read"): f = source ! source = xmlreader.InputSource() source.setByteStream(f) + if hasattr(f, "name"): + f.setSystemId(f.name) if source.getByteStream() is None: From python-dev@python.org Fri Oct 6 22:12:19 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:12:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax xmlreader.py,1.9,1.10 Message-ID: <200010062112.OAA09780@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv9458 Modified Files: xmlreader.py Log Message: In an incremental parser, close the parser after feeding everything. Index: xmlreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/xmlreader.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** xmlreader.py 2000/09/29 18:59:50 1.9 --- xmlreader.py 2000/10/06 21:12:12 1.10 *************** *** 120,123 **** --- 120,124 ---- self.feed(buffer) buffer = file.read(self._bufsize) + self.close() def feed(self, data): From python-dev@python.org Fri Oct 6 22:13:25 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:13:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_sax.py,1.9,1.10 Message-ID: <200010062113.OAA10743@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv10001 Modified Files: test_sax.py Log Message: Add a test case for reporting the file name, and for reporting an error for incomplete input. Index: test_sax.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sax.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** test_sax.py 2000/10/06 17:41:50 1.9 --- test_sax.py 2000/10/06 21:13:22 1.10 *************** *** 3,10 **** # $Id$ ! from xml.sax import make_parser, ContentHandler try: make_parser() ! except xml.sax.SAXReaderNotAvailable: # don't try to test this module if we cannot create a parser raise ImportError("no XML parsers available") --- 3,11 ---- # $Id$ ! from xml.sax import make_parser, ContentHandler, \ ! SAXException, SAXReaderNotAvailable, SAXParseException try: make_parser() ! except SAXReaderNotAvailable: # don't try to test this module if we cannot create a parser raise ImportError("no XML parsers available") *************** *** 313,316 **** --- 314,347 ---- return result.getvalue() == xml_test_out + + + # =========================================================================== + # + # error reporting + # + # =========================================================================== + + def test_expat_inpsource_location(): + parser = create_parser() + parser.setContentHandler(ContentHandler()) # do nothing + source = InputSource() + source.setByteStream(StringIO("")) #ill-formed + name = "a file name" + source.setSystemId(name) + try: + parser.parse(source) + except SAXException, e: + return e.getSystemId() == name + + def test_expat_incomplete(): + parser = create_parser() + parser.setContentHandler(ContentHandler()) # do nothing + try: + parser.parse(StringIO("")) + except SAXParseException: + return 1 # ok, error found + else: + return 0 + # =========================================================================== From python-dev@python.org Fri Oct 6 22:13:25 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 14:13:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_sax,1.5,1.6 Message-ID: <200010062113.OAA10749@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv10001/output Modified Files: test_sax Log Message: Add a test case for reporting the file name, and for reporting an error for incomplete input. Index: test_sax =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_sax,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_sax 2000/10/06 17:41:51 1.5 --- test_sax 2000/10/06 21:13:23 1.6 *************** *** 9,13 **** --- 9,15 ---- Passed test_expat_dtdhandler Passed test_expat_entityresolver + Passed test_expat_incomplete Passed test_expat_inpsource_filename + Passed test_expat_inpsource_location Passed test_expat_inpsource_stream Passed test_expat_inpsource_sysid *************** *** 24,26 **** Passed test_xmlgen_ns Passed test_xmlgen_pi ! 24 tests, 0 failures --- 26,28 ---- Passed test_xmlgen_ns Passed test_xmlgen_pi ! 26 tests, 0 failures From python-dev@python.org Fri Oct 6 23:36:08 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 15:36:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.7,1.8 pulldom.py,1.7,1.8 Message-ID: <200010062236.PAA04070@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv2065 Modified Files: minidom.py pulldom.py Log Message: minidom: access attribute value before printing it correct order of constructor args in createAttributeNS pulldom: use symbolic names for uri and localnames correct usage of createAttribute and setAttributeNode signatures. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** minidom.py 2000/09/24 05:21:58 1.7 --- minidom.py 2000/10/06 22:36:02 1.8 *************** *** 332,336 **** for a_name in a_names: writer.write(" %s=\"" % a_name) ! _write_data(writer, self._get_attributes()[a_name]) writer.write("\"") if self.childNodes: --- 332,336 ---- for a_name in a_names: writer.write(" %s=\"" % a_name) ! _write_data(writer, self._get_attributes()[a_name].value) writer.write("\"") if self.childNodes: *************** *** 430,434 **** def createAttributeNS(self, namespaceURI, qualifiedName): prefix,localName = _nssplit(qualifiedName) ! return Attr(namespaceURI, qualifiedName, localName, prefix) def getElementsByTagNameNS(self, namespaceURI, localName): --- 430,434 ---- def createAttributeNS(self, namespaceURI, qualifiedName): prefix,localName = _nssplit(qualifiedName) ! return Attr(qualifiedName, namespaceURI, localName, prefix) def getElementsByTagNameNS(self, namespaceURI, localName): Index: pulldom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** pulldom.py 2000/09/24 21:54:14 1.7 --- pulldom.py 2000/10/06 22:36:03 1.8 *************** *** 28,51 **** def startElementNS(self, name, tagName , attrs): ! if name[0]: # When using namespaces, the reader may or may not # provide us with the original name. If not, create # *a* valid tagName from the current context. if tagName is None: ! tagName = self._current_context[name[0]] + ":" + name[1] ! node = self.document.createElementNS(name[0], tagName) else: # When the tagname is not prefixed, it just appears as ! # name[1] ! node = self.document.createElement(name[1]) for aname,value in attrs.items(): ! if aname[0]: ! qname = self._current_context[name[0]] + ":" + aname[1] ! attr = self.document.createAttributeNS(name[0], qname) else: ! attr = self.document.createAttribute(name[0], name[1]) attr.value = value ! node.setAttributeNode(qname, attr) parent = self.curNode --- 28,53 ---- def startElementNS(self, name, tagName , attrs): ! uri,localname = name ! if uri: # When using namespaces, the reader may or may not # provide us with the original name. If not, create # *a* valid tagName from the current context. if tagName is None: ! tagName = self._current_context[uri] + ":" + localname ! node = self.document.createElementNS(uri, tagName) else: # When the tagname is not prefixed, it just appears as ! # localname ! node = self.document.createElement(localname) for aname,value in attrs.items(): ! a_uri, a_localname = aname ! if a_uri: ! qname = self._current_context[a_uri] + ":" + a_localname ! attr = self.document.createAttributeNS(a_uri, qname) else: ! attr = self.document.createAttribute(a_localname) attr.value = value ! node.setAttributeNode(attr) parent = self.curNode From python-dev@python.org Fri Oct 6 23:42:57 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 15:42:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,1.5,1.6 Message-ID: <200010062242.PAA09945@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv8524/output Modified Files: test_minidom Log Message: Add .toxml test case, as proposed by Alex Martelli in bug report #116244. Index: test_minidom =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_minidom,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_minidom 2000/09/19 19:33:02 1.5 --- test_minidom 2000/10/06 22:42:55 1.6 *************** *** 104,107 **** --- 104,108 ---- Test Succeeded testUnlink Test Succeeded testWriteText + Passed Test Test Succeeded testWriteXML All tests succeeded From python-dev@python.org Fri Oct 6 23:42:58 2000 From: python-dev@python.org (Martin v. Löwis) Date: Fri, 6 Oct 2000 15:42:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.8,1.9 Message-ID: <200010062242.PAA09940@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv8524 Modified Files: test_minidom.py Log Message: Add .toxml test case, as proposed by Alex Martelli in bug report #116244. Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_minidom.py 2000/09/26 18:00:20 1.8 --- test_minidom.py 2000/10/06 22:42:54 1.9 *************** *** 247,251 **** def testTextNodeRepr(): pass ! def testWriteXML(): pass def testProcessingInstruction(): pass --- 247,256 ---- def testTextNodeRepr(): pass ! def testWriteXML(): ! str = '' ! dom = parseString(str) ! domstr = dom.toxml() ! dom.unlink() ! confirm(str == domstr) def testProcessingInstruction(): pass From python-dev@python.org Sat Oct 7 00:09:03 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 6 Oct 2000 16:09:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/idle PyParse.py,1.6,1.7 Message-ID: <200010062309.QAA32052@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/idle In directory slayer.i.sourceforge.net:/tmp/cvs-serv26651/python/dist/src/tools/idle Modified Files: PyParse.py Log Message: Fix for next iteration of SF bug 115690 (Unicode headaches in IDLE). The parsing functions in support of auto-indent weren't expecting Unicode strings, but text.get() can now return them (although it remains muddy as to exactly when or why that can happen). Fixed that with a Big Hammer. Index: PyParse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/idle/PyParse.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** PyParse.py 2000/03/13 14:50:24 1.6 --- PyParse.py 2000/10/06 23:09:00 1.7 *************** *** 114,117 **** --- 114,130 ---- def set_str(self, str): assert len(str) == 0 or str[-1] == '\n' + if type(str) == type(u""): + # The parse functions have no idea what to do with Unicode, so + # replace all Unicode characters with "x". This is "safe" + # so long as the only characters germane to parsing the structure + # of Python are 7-bit ASCII. It's *necessary* because Unicode + # strings don't have a .translate() method that supports + # deletechars. + uniphooey = str + str = [] + push = str.append + for raw in map(ord, uniphooey): + push(raw < 127 and chr(raw) or "x") + str = "".join(str) self.str = str self.study_level = 0 From python-dev@python.org Sat Oct 7 05:04:14 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 6 Oct 2000 21:04:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild BUILDno.txt,1.2,1.3 python20.dsp,1.12,1.13 python20.wse,1.19,1.20 Message-ID: <200010070404.VAA26370@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv26141/python/dist/src/pcbuild Modified Files: BUILDno.txt python20.dsp python20.wse Log Message: Prep Windows installer for 2.0c1: title and build number. Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** BUILDno.txt 2000/09/25 21:55:28 1.2 --- BUILDno.txt 2000/10/07 04:04:07 1.3 *************** *** 34,37 **** --- 34,39 ---- Windows Python BUILD numbers ---------------------------- + 7 2.0c1 + 07-Oct-2000 6 2.0b2 26-Sep-2000 Index: python20.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.dsp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** python20.dsp 2000/09/25 21:55:28 1.12 --- python20.dsp 2000/10/07 04:04:07 1.13 *************** *** 695,703 **** !IF "$(CFG)" == "python20 - Win32 Release" ! # ADD CPP /D BUILD=6 !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! # ADD CPP /D BUILD=6 !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" --- 695,703 ---- !IF "$(CFG)" == "python20 - Win32 Release" ! # ADD CPP /D BUILD=7 !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! # ADD CPP /D BUILD=7 !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" Index: python20.wse =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.wse,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** python20.wse 2000/09/26 02:37:53 1.19 --- python20.wse 2000/10/07 04:04:07 1.20 *************** *** 2,6 **** item: Global Version=5.0 ! Title=Python 2.0 beta 2 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 --- 2,6 ---- item: Global Version=5.0 ! Title=Python 2.0 Release Candidate 1 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 *************** *** 65,69 **** item: Set Variable Variable=APPTITLE ! Value=Python 2.0 beta 2 end item: Set Variable --- 65,69 ---- item: Set Variable Variable=APPTITLE ! Value=Python 2.0 Release Candidate 1 end item: Set Variable From python-dev@python.org Sat Oct 7 06:09:42 2000 From: python-dev@python.org (Tim Peters) Date: Fri, 6 Oct 2000 22:09:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib tokenize.py,1.14,1.15 Message-ID: <200010070509.WAA10987@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv7373/python/dist/src/lib Modified Files: tokenize.py Log Message: Possible fix for Skip's bug 116136 (sre recursion limit hit in tokenize.py). tokenize.py has always used naive regexps for matching string literals, and that appears to trigger the sre recursion limit on Skip's platform (he has very long single-line string literals). Replaced all of tokenize.py's string regexps with the "unrolled" forms used in IDLE, where they're known to handle even absurd (multi-megabyte!) string literals without trouble. See Friedl's book for explanation (at heart, the naive regexps create a backtracking choice point for each character in the literal, while the unrolled forms create none). Index: tokenize.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/tokenize.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** tokenize.py 2000/08/24 21:44:52 1.14 --- tokenize.py 2000/10/07 05:09:39 1.15 *************** *** 47,62 **** Number = group(Imagnumber, Floatnumber, Intnumber) ! Single = any(r"[^'\\]", r'\\.') + "'" ! Double = any(r'[^"\\]', r'\\.') + '"' ! Single3 = any(r"[^'\\]",r'\\.',r"'[^'\\]",r"'\\.",r"''[^'\\]",r"''\\.") + "'''" ! Double3 = any(r'[^"\\]',r'\\.',r'"[^"\\]',r'"\\.',r'""[^"\\]',r'""\\.') + '"""' Triple = group("[rR]?'''", '[rR]?"""') ! String = group("[rR]?'" + any(r"[^\n'\\]", r'\\.') + "'", ! '[rR]?"' + any(r'[^\n"\\]', r'\\.') + '"') ! Operator = group('\+=', '\-=', '\*=', '%=', '/=', '\*\*=', '&=', '\|=', ! '\^=', '>>=', '<<=', '\+', '\-', '\*\*', '\*', '\^', '~', ! '/', '%', '&', '\|', '<<', '>>', '==', '<=', '<>', '!=', ! '>=', '=', '<', '>') Bracket = '[][(){}]' --- 47,69 ---- Number = group(Imagnumber, Floatnumber, Intnumber) ! # Tail end of ' string. ! Single = r"[^'\\]*(?:\\.[^'\\]*)*'" ! # Tail end of " string. ! Double = r'[^"\\]*(?:\\.[^"\\]*)*"' ! # Tail end of ''' string. ! Single3 = r"[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*'''" ! # Tail end of """ string. ! Double3 = r'[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""' Triple = group("[rR]?'''", '[rR]?"""') ! # Single-line ' or " string. ! String = group(r"[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*'", ! r'[rR]?"[^\n"\\]*(?:\\.[^\n"\\]*)*"') ! # Because of leftmost-then-longest match semantics, be sure to put the ! # longest operators first (e.g., if = came before ==, == would get ! # recognized as two instances of =). ! Operator = group(r"\*\*=?", r">>=?", r"<<=?", r"<>", r"!=", ! r"[+\-*/%&|^=<>]=?", ! r"~") Bracket = '[][(){}]' *************** *** 67,72 **** Token = Ignore + PlainToken ! ContStr = group("[rR]?'" + any(r'\\.', r"[^\n'\\]") + group("'", r'\\\r?\n'), ! '[rR]?"' + any(r'\\.', r'[^\n"\\]') + group('"', r'\\\r?\n')) PseudoExtras = group(r'\\\r?\n', Comment, Triple) PseudoToken = Whitespace + group(PseudoExtras, Number, Funny, ContStr, Name) --- 74,80 ---- Token = Ignore + PlainToken ! # First (or only) line of ' or " string. ! ContStr = group(r"[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*" + group("'", r'\\\r?\n'), ! r'[rR]?"[^\n"\\]*(?:\\.[^\n"\\]*)*' + group('"', r'\\\r?\n')) PseudoExtras = group(r'\\\r?\n', Comment, Triple) PseudoToken = Whitespace + group(PseudoExtras, Number, Funny, ContStr, Name) From python-dev@python.org Sat Oct 7 09:52:49 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Sat, 7 Oct 2000 01:52:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.20,1.21 Message-ID: <200010070852.BAA30101@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv30093/Lib/test Modified Files: test_unicode.py Log Message: Updated test with a case which checks for the bug reported in Index: test_unicode.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** test_unicode.py 2000/08/08 08:03:46 1.20 --- test_unicode.py 2000/10/07 08:52:45 1.21 *************** *** 342,345 **** --- 342,346 ---- assert '...%(foo)s...' % {u'foo':u"abc",u'def':123} == u'...abc...' assert '...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...1...2...3...abc...' + assert '...%%...%%s...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...%...%s...1...2...3...abc...' assert '...%s...' % u"abc" == u'...abc...' print 'done.' From python-dev@python.org Sat Oct 7 09:54:12 2000 From: python-dev@python.org (M.-A. Lemburg) Date: Sat, 7 Oct 2000 01:54:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.90,2.91 Message-ID: <200010070854.BAA30183@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Objects In directory slayer.i.sourceforge.net:/tmp/cvs-serv30166/Objects Modified Files: stringobject.c Log Message: [ Bug #116174 ] using %% in cstrings sometimes fails with unicode paramsFix for the bug reported in Bug #116174: "%% %s" % u"abc" failed due to the way string formatting delegated work to the Unicode formatting function. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.90 retrieving revision 2.91 diff -C2 -r2.90 -r2.91 *** stringobject.c 2000/09/26 05:46:01 2.90 --- stringobject.c 2000/10/07 08:54:09 2.91 *************** *** 2667,2671 **** int fmtcnt, rescnt, reslen, arglen, argidx; int args_owned = 0; ! PyObject *result, *orig_args; PyObject *dict = NULL; if (format == NULL || !PyString_Check(format) || args == NULL) { --- 2667,2671 ---- int fmtcnt, rescnt, reslen, arglen, argidx; int args_owned = 0; ! PyObject *result, *orig_args, *v, *w; PyObject *dict = NULL; if (format == NULL || !PyString_Check(format) || args == NULL) { *************** *** 3056,3075 **** args = orig_args; } ! /* Paste rest of format string to what we have of the result ! string; we reuse result for this */ rescnt = res - PyString_AS_STRING(result); fmtcnt = PyString_GET_SIZE(format) - \ (fmt - PyString_AS_STRING(format)); ! if (_PyString_Resize(&result, rescnt + fmtcnt)) { ! Py_DECREF(args); goto error; ! } ! memcpy(PyString_AS_STRING(result) + rescnt, fmt, fmtcnt); ! format = result; ! /* Let Unicode do its magic */ ! result = PyUnicode_Format(format, args); Py_DECREF(format); Py_DECREF(args); ! return result; error: --- 3056,3081 ---- args = orig_args; } ! args_owned = 1; ! /* Take what we have of the result and let the Unicode formatting ! function format the rest of the input. */ rescnt = res - PyString_AS_STRING(result); + if (_PyString_Resize(&result, rescnt)) + goto error; fmtcnt = PyString_GET_SIZE(format) - \ (fmt - PyString_AS_STRING(format)); ! format = PyUnicode_Decode(fmt, fmtcnt, NULL, NULL); ! if (format == NULL) goto error; ! v = PyUnicode_Format(format, args); Py_DECREF(format); + if (v == NULL) + goto error; + /* Paste what we have (result) to what the Unicode formatting + function returned (v) and return the result (or error) */ + w = PyUnicode_Concat(result, v); + Py_DECREF(result); + Py_DECREF(v); Py_DECREF(args); ! return w; error: From python-dev@python.org Sat Oct 7 11:16:21 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 7 Oct 2000 03:16:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test re_tests.py,1.23,1.24 Message-ID: <200010071016.DAA16830@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv15855/Lib/test Modified Files: re_tests.py Log Message: SRE didn't handle character category followed by hyphen inside a character class. Fix provided by Andrew Kuchling. Closes bug #116251. Index: re_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** re_tests.py 2000/10/03 19:22:26 1.23 --- re_tests.py 2000/10/07 10:16:19 1.24 *************** *** 620,622 **** --- 620,624 ---- # bug 115618: negative lookahead (r'(? Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15855/Lib Modified Files: sre_parse.py Log Message: SRE didn't handle character category followed by hyphen inside a character class. Fix provided by Andrew Kuchling. Closes bug #116251. Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** sre_parse.py 2000/10/03 19:22:26 1.35 --- sre_parse.py 2000/10/07 10:16:14 1.36 *************** *** 394,397 **** --- 394,399 ---- this = source.get() if this == "]": + if code1[0] is IN: + code1 = code1[1][0] set.append(code1) set.append((LITERAL, ord("-"))) From python-dev@python.org Sat Oct 7 12:10:53 2000 From: python-dev@python.org (Mark Hammond) Date: Sat, 7 Oct 2000 04:10:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/PC getpathp.c,1.21,1.22 Message-ID: <200010071110.EAA30476@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PC In directory slayer.i.sourceforge.net:/tmp/cvs-serv30457 Modified Files: getpathp.c Log Message: Prevent possible buffer overflow exploits under Windows. As per (the very quick) patch Patch #101801. Index: getpathp.c =================================================================== RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** getpathp.c 2000/09/10 09:14:53 1.21 --- getpathp.c 2000/10/07 11:10:50 1.22 *************** *** 99,103 **** } ! static void reduce(char *dir) --- 99,105 ---- } ! /* assumes 'dir' null terminated in bounds. Never writes ! beyond existing terminator. ! */ static void reduce(char *dir) *************** *** 116,121 **** return stat(filename, &buf) == 0; } - static int ismodule(char *filename) /* Is module -- check for .pyc/.pyo too */ --- 118,125 ---- return stat(filename, &buf) == 0; } + /* Assumes 'filename' MAXPATHLEN+1 bytes long - + may extend 'filename' by one character. + */ static int ismodule(char *filename) /* Is module -- check for .pyc/.pyo too */ *************** *** 132,137 **** return 0; } - static void join(char *buffer, char *stuff) --- 136,141 ---- return 0; } + /* guarantees buffer will never overflow MAXPATHLEN+1 bytes */ static void join(char *buffer, char *stuff) *************** *** 152,156 **** } ! static int gotlandmark(char *landmark) --- 156,163 ---- } ! /* gotlandmark only called by search_for_prefix, which ensures ! 'prefix' is null terminated in bounds. join() ensures ! 'landmark' can not overflow prefix if too long. ! */ static int gotlandmark(char *landmark) *************** *** 165,169 **** } ! static int search_for_prefix(char *argv0_path, char *landmark) --- 172,177 ---- } ! /* assumes argv0_path is MAXPATHLEN+1 bytes long, already \0 term'd. ! assumption provided by only caller, calculate_path() */ static int search_for_prefix(char *argv0_path, char *landmark) *************** *** 341,349 **** #ifdef UNICODE WCHAR wprogpath[MAXPATHLEN+1]; if (GetModuleFileName(NULL, wprogpath, MAXPATHLEN)) { ! WideCharToMultiByte(CP_ACP, 0, wprogpath, -1, progpath, MAXPATHLEN+1, NULL, NULL); return; } #else if (GetModuleFileName(NULL, progpath, MAXPATHLEN)) return; --- 349,366 ---- #ifdef UNICODE WCHAR wprogpath[MAXPATHLEN+1]; + /* Windows documents that GetModuleFileName() will "truncate", + but makes no mention of the null terminator. Play it safe. + PLUS Windows itself defines MAX_PATH as the same, but anyway... + */ + wprogpath[MAXPATHLEN]=_T('\0')'; if (GetModuleFileName(NULL, wprogpath, MAXPATHLEN)) { ! WideCharToMultiByte(CP_ACP, 0, ! wprogpath, -1, ! progpath, MAXPATHLEN+1, ! NULL, NULL); return; } #else + /* static init of progpath ensures final char remains \0 */ if (GetModuleFileName(NULL, progpath, MAXPATHLEN)) return; *************** *** 363,367 **** if (strchr(prog, SEP)) #endif ! strcpy(progpath, prog); else if (path) { while (1) { --- 380,384 ---- if (strchr(prog, SEP)) #endif ! strncpy(progpath, prog, MAXPATHLEN); else if (path) { while (1) { *************** *** 370,379 **** if (delim) { size_t len = delim - path; strncpy(progpath, path, len); *(progpath + len) = '\0'; } else ! strcpy(progpath, path); join(progpath, prog); if (exists(progpath)) --- 387,399 ---- if (delim) { size_t len = delim - path; + /* ensure we can't overwrite buffer */ + len = min(MAXPATHLEN,len); strncpy(progpath, path, len); *(progpath + len) = '\0'; } else ! strncpy(progpath, path, MAXPATHLEN); + /* join() is safe for MAXPATHLEN+1 size buffer */ join(progpath, prog); if (exists(progpath)) *************** *** 407,410 **** --- 427,431 ---- get_progpath(); + /* progpath guaranteed \0 terminated in MAXPATH+1 bytes. */ strcpy(argv0_path, progpath); reduce(argv0_path); *************** *** 416,420 **** } else ! strcpy(prefix, pythonhome); if (envpath && *envpath == '\0') --- 437,441 ---- } else ! strncpy(prefix, pythonhome, MAXPATHLEN); if (envpath && *envpath == '\0') From python-dev@python.org Sat Oct 7 13:10:31 2000 From: python-dev@python.org (Martin v. Löwis) Date: Sat, 7 Oct 2000 05:10:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.8,1.9 Message-ID: <200010071210.FAA22013@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv21665 Modified Files: minidom.py Log Message: Record bugs found when comparing the module with DOM Core Level 2. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** minidom.py 2000/10/06 22:36:02 1.8 --- minidom.py 2000/10/07 12:10:28 1.9 *************** *** 251,255 **** del self._attrsNS[(node.namespaceURI, node.localName)] ! class Element( Node ): nodeType = Node.ELEMENT_NODE --- 251,255 ---- del self._attrsNS[(node.namespaceURI, node.localName)] ! class Element(Node): nodeType = Node.ELEMENT_NODE *************** *** 288,291 **** --- 288,292 ---- attr.__dict__["value"] = attr.__dict__["nodeValue"] = value self.setAttributeNode(attr) + # FIXME: return original node if something changed. def getAttributeNode(self, attrname): *************** *** 301,304 **** --- 302,306 ---- self._attrs[attr.name] = attr self._attrsNS[(attr.namespaceURI, attr.localName)] = attr + # FIXME: return old value if something changed def removeAttribute(self, name): *************** *** 324,327 **** --- 326,330 ---- return "" % (self.tagName, id(self)) + # undocumented def writexml(self, writer): writer.write("<" + self.tagName) From python-dev@python.org Sat Oct 7 13:25:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 7 Oct 2000 05:25:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-beos5 FCNTL.py,NONE,1.1 IN.py,NONE,1.1 SOCKET.py,NONE,1.1 TERMIOS.py,NONE,1.1 Message-ID: <200010071225.FAA04005@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-beos5 In directory slayer.i.sourceforge.net:/tmp/cvs-serv3884 Added Files: FCNTL.py IN.py SOCKET.py TERMIOS.py Log Message: Donn Cave : Generated files for BeOS R5. --- NEW FILE --- # Generated by h2py from /boot/develop/headers/posix/fcntl.h # Included from be_setup.h def __std(ref): return ref __be_os = 2 __dest_os = __be_os __MSL__ = 0x4011 __GLIBC__ = -2 __GLIBC_MINOR__ = 1 # Included from BeBuild.h B_BEOS_VERSION_4 = 0x0400 B_BEOS_VERSION_4_5 = 0x0450 B_BEOS_VERSION_5 = 0x0500 B_BEOS_VERSION = B_BEOS_VERSION_5 B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 _PR2_COMPATIBLE_ = 1 _PR3_COMPATIBLE_ = 1 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 _PR2_COMPATIBLE_ = 0 _PR3_COMPATIBLE_ = 0 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 def _UNUSED(x): return x # Included from sys/types.h # Included from time.h # Included from null.h NULL = (0) NULL = 0L # Included from size_t.h # Included from stddef.h # Included from wchar_t.h CLOCKS_PER_SEC = 1000 CLK_TCK = CLOCKS_PER_SEC MAX_TIMESTR = 70 # Included from sys/stat.h S_ATTR_DIR = 01000000000 S_ATTR = 02000000000 S_INDEX_DIR = 04000000000 S_STR_INDEX = 00100000000 S_INT_INDEX = 00200000000 S_UINT_INDEX = 00400000000 S_LONG_LONG_INDEX = 00010000000 S_ULONG_LONG_INDEX = 00020000000 S_FLOAT_INDEX = 00040000000 S_DOUBLE_INDEX = 00001000000 S_ALLOW_DUPS = 00002000000 S_IFMT = 00000170000 S_IFLNK = 00000120000 S_IFREG = 00000100000 S_IFBLK = 00000060000 S_IFDIR = 00000040000 S_IFCHR = 00000020000 S_IFIFO = 00000010000 def S_ISREG(m): return (((m) & S_IFMT) == S_IFREG) def S_ISLNK(m): return (((m) & S_IFMT) == S_IFLNK) def S_ISBLK(m): return (((m) & S_IFMT) == S_IFBLK) def S_ISDIR(m): return (((m) & S_IFMT) == S_IFDIR) def S_ISCHR(m): return (((m) & S_IFMT) == S_IFCHR) def S_ISFIFO(m): return (((m) & S_IFMT) == S_IFIFO) def S_ISINDEX(m): return (((m) & S_INDEX_DIR) == S_INDEX_DIR) S_IUMSK = 07777 S_ISUID = 04000 S_ISGID = 02000 S_ISVTX = 01000 S_IRWXU = 00700 S_IRUSR = 00400 S_IWUSR = 00200 S_IXUSR = 00100 S_IRWXG = 00070 S_IRGRP = 00040 S_IWGRP = 00020 S_IXGRP = 00010 S_IRWXO = 00007 S_IROTH = 00004 S_IWOTH = 00002 S_IXOTH = 00001 F_DUPFD = 0x0001 F_GETFD = 0x0002 F_SETFD = 0x0004 F_GETFL = 0x0008 F_SETFL = 0x0010 F_GETLK = 0x0020 F_RDLCK = 0x0040 F_SETLK = 0x0080 F_SETLKW = 0x0100 F_UNLCK = 0x0200 F_WRLCK = 0x0400 FD_CLOEXEC = 1 FD_CLOEXEC = 0x0800 O_RDONLY = 0 O_WRONLY = 1 O_RDWR = 2 O_RWMASK = 3 O_CLOEXEC = 0x0040 O_NONBLOCK = 0x0080 O_EXCL = 0x0100 O_CREAT = 0x0200 O_TRUNC = 0x0400 O_APPEND = 0x0800 O_NOCTTY = 0x1000 O_NOTRAVERSE = 0x2000 O_ACCMODE = 0x0003 O_TEXT = 0x4000 O_BINARY = 0x8000 S_IREAD = 0x0100 S_IWRITE = 0x0080 --- NEW FILE --- # Generated by h2py from /boot/develop/headers/be/net/netinet/in.h # Included from socket.h # Included from BeBuild.h B_BEOS_VERSION_4 = 0x0400 B_BEOS_VERSION_4_5 = 0x0450 B_BEOS_VERSION_5 = 0x0500 B_BEOS_VERSION = B_BEOS_VERSION_5 B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 _PR2_COMPATIBLE_ = 1 _PR3_COMPATIBLE_ = 1 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 _PR2_COMPATIBLE_ = 0 _PR3_COMPATIBLE_ = 0 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 def _UNUSED(x): return x # Included from sys/types.h # Included from time.h # Included from be_setup.h def __std(ref): return ref __be_os = 2 __dest_os = __be_os __MSL__ = 0x4011 __GLIBC__ = -2 __GLIBC_MINOR__ = 1 # Included from null.h NULL = (0) NULL = 0L # Included from size_t.h # Included from stddef.h # Included from wchar_t.h CLOCKS_PER_SEC = 1000 CLK_TCK = CLOCKS_PER_SEC MAX_TIMESTR = 70 # Included from sys/time.h # Included from ByteOrder.h # Included from endian.h __LITTLE_ENDIAN = 1234 LITTLE_ENDIAN = __LITTLE_ENDIAN __BYTE_ORDER = __LITTLE_ENDIAN BYTE_ORDER = __BYTE_ORDER __BIG_ENDIAN = 0 BIG_ENDIAN = 0 __BIG_ENDIAN = 4321 BIG_ENDIAN = __BIG_ENDIAN __BYTE_ORDER = __BIG_ENDIAN BYTE_ORDER = __BYTE_ORDER __LITTLE_ENDIAN = 0 LITTLE_ENDIAN = 0 __PDP_ENDIAN = 3412 PDP_ENDIAN = __PDP_ENDIAN # Included from SupportDefs.h # Included from Errors.h # Included from limits.h # Included from float.h FLT_ROUNDS = 1 FLT_RADIX = 2 FLT_MANT_DIG = 24 FLT_DIG = 6 FLT_MIN_EXP = (-125) FLT_MIN_10_EXP = (-37) FLT_MAX_EXP = 128 FLT_MAX_10_EXP = 38 DBL_MANT_DIG = 53 DBL_DIG = 15 DBL_MIN_EXP = (-1021) DBL_MIN_10_EXP = (-308) DBL_MAX_EXP = 1024 DBL_MAX_10_EXP = 308 LDBL_MANT_DIG = DBL_MANT_DIG LDBL_DIG = DBL_DIG LDBL_MIN_EXP = DBL_MIN_EXP LDBL_MIN_10_EXP = DBL_MIN_10_EXP LDBL_MAX_EXP = DBL_MAX_EXP LDBL_MAX_10_EXP = DBL_MAX_10_EXP CHAR_BIT = (8) SCHAR_MIN = (-127-1) SCHAR_MAX = (127) CHAR_MIN = SCHAR_MIN CHAR_MAX = SCHAR_MAX MB_LEN_MAX = (1) SHRT_MIN = (-32767-1) SHRT_MAX = (32767) LONG_MIN = (-2147483647L-1) LONG_MAX = (2147483647L) INT_MIN = LONG_MIN INT_MAX = LONG_MAX ARG_MAX = (32768) ATEXIT_MAX = (32) CHILD_MAX = (1024) IOV_MAX = (256) FILESIZEBITS = (64) LINK_MAX = (1) LOGIN_NAME_MAX = (32) MAX_CANON = (255) MAX_INPUT = (255) NAME_MAX = (256) NGROUPS_MAX = (32) OPEN_MAX = (128) PATH_MAX = (1024) PIPE_MAX = (512) SSIZE_MAX = (2147483647L) TTY_NAME_MAX = (256) TZNAME_MAX = (32) SYMLINKS_MAX = (16) _POSIX_ARG_MAX = (32768) _POSIX_CHILD_MAX = (1024) _POSIX_LINK_MAX = (1) _POSIX_LOGIN_NAME_MAX = (9) _POSIX_MAX_CANON = (255) _POSIX_MAX_INPUT = (255) _POSIX_NAME_MAX = (255) _POSIX_NGROUPS_MAX = (0) _POSIX_OPEN_MAX = (128) _POSIX_PATH_MAX = (1024) _POSIX_PIPE_BUF = (512) _POSIX_SSIZE_MAX = (2147483647L) _POSIX_STREAM_MAX = (8) _POSIX_TTY_NAME_MAX = (256) _POSIX_TZNAME_MAX = (3) B_GENERAL_ERROR_BASE = LONG_MIN B_OS_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x1000 B_APP_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x2000 B_INTERFACE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x3000 B_MEDIA_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4000 B_TRANSLATION_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4800 B_MIDI_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x5000 B_STORAGE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x6000 B_POSIX_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x7000 B_MAIL_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x8000 B_PRINT_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x9000 B_DEVICE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0xa000 B_ERRORS_END = (B_GENERAL_ERROR_BASE + 0xffff) E2BIG = (B_POSIX_ERROR_BASE + 1) ECHILD = (B_POSIX_ERROR_BASE + 2) EDEADLK = (B_POSIX_ERROR_BASE + 3) EFBIG = (B_POSIX_ERROR_BASE + 4) EMLINK = (B_POSIX_ERROR_BASE + 5) ENFILE = (B_POSIX_ERROR_BASE + 6) ENODEV = (B_POSIX_ERROR_BASE + 7) ENOLCK = (B_POSIX_ERROR_BASE + 8) ENOSYS = (B_POSIX_ERROR_BASE + 9) ENOTTY = (B_POSIX_ERROR_BASE + 10) ENXIO = (B_POSIX_ERROR_BASE + 11) ESPIPE = (B_POSIX_ERROR_BASE + 12) ESRCH = (B_POSIX_ERROR_BASE + 13) EFPOS = (B_POSIX_ERROR_BASE + 14) ESIGPARM = (B_POSIX_ERROR_BASE + 15) EDOM = (B_POSIX_ERROR_BASE + 16) ERANGE = (B_POSIX_ERROR_BASE + 17) EPROTOTYPE = (B_POSIX_ERROR_BASE + 18) EPROTONOSUPPORT = (B_POSIX_ERROR_BASE + 19) EPFNOSUPPORT = (B_POSIX_ERROR_BASE + 20) EAFNOSUPPORT = (B_POSIX_ERROR_BASE + 21) EADDRINUSE = (B_POSIX_ERROR_BASE + 22) EADDRNOTAVAIL = (B_POSIX_ERROR_BASE + 23) ENETDOWN = (B_POSIX_ERROR_BASE + 24) ENETUNREACH = (B_POSIX_ERROR_BASE + 25) ENETRESET = (B_POSIX_ERROR_BASE + 26) ECONNABORTED = (B_POSIX_ERROR_BASE + 27) ECONNRESET = (B_POSIX_ERROR_BASE + 28) EISCONN = (B_POSIX_ERROR_BASE + 29) ENOTCONN = (B_POSIX_ERROR_BASE + 30) ESHUTDOWN = (B_POSIX_ERROR_BASE + 31) ECONNREFUSED = (B_POSIX_ERROR_BASE + 32) EHOSTUNREACH = (B_POSIX_ERROR_BASE + 33) ENOPROTOOPT = (B_POSIX_ERROR_BASE + 34) ENOBUFS = (B_POSIX_ERROR_BASE + 35) EINPROGRESS = (B_POSIX_ERROR_BASE + 36) EALREADY = (B_POSIX_ERROR_BASE + 37) EILSEQ = (B_POSIX_ERROR_BASE + 38) ENOMSG = (B_POSIX_ERROR_BASE + 39) ESTALE = (B_POSIX_ERROR_BASE + 40) EOVERFLOW = (B_POSIX_ERROR_BASE + 41) EMSGSIZE = (B_POSIX_ERROR_BASE + 42) EOPNOTSUPP = (B_POSIX_ERROR_BASE + 43) ENOTSOCK = (B_POSIX_ERROR_BASE + 44) false = 0 true = 1 NULL = (0) FALSE = 0 TRUE = 1 # Included from TypeConstants.h B_HOST_IS_LENDIAN = 1 B_HOST_IS_BENDIAN = 0 def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg) def B_HOST_TO_LENDIAN_FLOAT(arg): return (float)(arg) def B_HOST_TO_LENDIAN_INT64(arg): return (uint64)(arg) def B_HOST_TO_LENDIAN_INT32(arg): return (uint32)(arg) def B_HOST_TO_LENDIAN_INT16(arg): return (uint16)(arg) def B_HOST_TO_BENDIAN_DOUBLE(arg): return __swap_double(arg) def B_HOST_TO_BENDIAN_FLOAT(arg): return __swap_float(arg) def B_HOST_TO_BENDIAN_INT64(arg): return __swap_int64(arg) def B_HOST_TO_BENDIAN_INT32(arg): return __swap_int32(arg) def B_HOST_TO_BENDIAN_INT16(arg): return __swap_int16(arg) def B_LENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) def B_LENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) def B_LENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) def B_LENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) def B_LENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) def B_BENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) def B_BENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) def B_BENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) def B_BENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) def B_BENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) B_HOST_IS_LENDIAN = 0 B_HOST_IS_BENDIAN = 1 def B_HOST_TO_LENDIAN_DOUBLE(arg): return __swap_double(arg) def B_HOST_TO_LENDIAN_FLOAT(arg): return __swap_float(arg) def B_HOST_TO_LENDIAN_INT64(arg): return __swap_int64(arg) def B_HOST_TO_LENDIAN_INT32(arg): return __swap_int32(arg) def B_HOST_TO_LENDIAN_INT16(arg): return __swap_int16(arg) def B_HOST_TO_BENDIAN_DOUBLE(arg): return (double)(arg) def B_HOST_TO_BENDIAN_FLOAT(arg): return (float)(arg) def B_HOST_TO_BENDIAN_INT64(arg): return (uint64)(arg) def B_HOST_TO_BENDIAN_INT32(arg): return (uint32)(arg) def B_HOST_TO_BENDIAN_INT16(arg): return (uint16)(arg) def B_LENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) def B_LENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) def B_LENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) def B_LENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) def B_LENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) def B_BENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) def B_BENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) def B_BENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) def B_BENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) def B_BENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) def B_SWAP_DOUBLE(arg): return __swap_double(arg) def B_SWAP_FLOAT(arg): return __swap_float(arg) def B_SWAP_INT64(arg): return __swap_int64(arg) def B_SWAP_INT32(arg): return __swap_int32(arg) def B_SWAP_INT16(arg): return __swap_int16(arg) def htonl(x): return B_HOST_TO_BENDIAN_INT32(x) def ntohl(x): return B_BENDIAN_TO_HOST_INT32(x) def htons(x): return B_HOST_TO_BENDIAN_INT16(x) def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x) AF_INET = 1 INADDR_ANY = 0x00000000 INADDR_BROADCAST = 0xffffffff INADDR_LOOPBACK = 0x7f000001 SOL_SOCKET = 1 SO_DEBUG = 1 SO_REUSEADDR = 2 SO_NONBLOCK = 3 SO_REUSEPORT = 4 MSG_OOB = 0x1 SOCK_DGRAM = 1 SOCK_STREAM = 2 IPPROTO_UDP = 1 IPPROTO_TCP = 2 IPPROTO_ICMP = 3 B_UDP_MAX_SIZE = (65536 - 1024) FD_SETSIZE = 256 FDSETSIZE = FD_SETSIZE NFDBITS = 32 def _FDMSKNO(fd): return ((fd) / NFDBITS) def _FDBITNO(fd): return ((fd) % NFDBITS) --- NEW FILE --- # Generated by h2py from /boot/develop/headers/be/net/socket.h # Included from BeBuild.h B_BEOS_VERSION_4 = 0x0400 B_BEOS_VERSION_4_5 = 0x0450 B_BEOS_VERSION_5 = 0x0500 B_BEOS_VERSION = B_BEOS_VERSION_5 B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 _PR2_COMPATIBLE_ = 1 _PR3_COMPATIBLE_ = 1 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 _PR2_COMPATIBLE_ = 0 _PR3_COMPATIBLE_ = 0 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 def _UNUSED(x): return x # Included from sys/types.h # Included from time.h # Included from be_setup.h def __std(ref): return ref __be_os = 2 __dest_os = __be_os __MSL__ = 0x4011 __GLIBC__ = -2 __GLIBC_MINOR__ = 1 # Included from null.h NULL = (0) NULL = 0L # Included from size_t.h # Included from stddef.h # Included from wchar_t.h CLOCKS_PER_SEC = 1000 CLK_TCK = CLOCKS_PER_SEC MAX_TIMESTR = 70 # Included from sys/time.h # Included from ByteOrder.h # Included from endian.h __LITTLE_ENDIAN = 1234 LITTLE_ENDIAN = __LITTLE_ENDIAN __BYTE_ORDER = __LITTLE_ENDIAN BYTE_ORDER = __BYTE_ORDER __BIG_ENDIAN = 0 BIG_ENDIAN = 0 __BIG_ENDIAN = 4321 BIG_ENDIAN = __BIG_ENDIAN __BYTE_ORDER = __BIG_ENDIAN BYTE_ORDER = __BYTE_ORDER __LITTLE_ENDIAN = 0 LITTLE_ENDIAN = 0 __PDP_ENDIAN = 3412 PDP_ENDIAN = __PDP_ENDIAN # Included from SupportDefs.h # Included from Errors.h # Included from limits.h # Included from float.h FLT_ROUNDS = 1 FLT_RADIX = 2 FLT_MANT_DIG = 24 FLT_DIG = 6 FLT_MIN_EXP = (-125) FLT_MIN_10_EXP = (-37) FLT_MAX_EXP = 128 FLT_MAX_10_EXP = 38 DBL_MANT_DIG = 53 DBL_DIG = 15 DBL_MIN_EXP = (-1021) DBL_MIN_10_EXP = (-308) DBL_MAX_EXP = 1024 DBL_MAX_10_EXP = 308 LDBL_MANT_DIG = DBL_MANT_DIG LDBL_DIG = DBL_DIG LDBL_MIN_EXP = DBL_MIN_EXP LDBL_MIN_10_EXP = DBL_MIN_10_EXP LDBL_MAX_EXP = DBL_MAX_EXP LDBL_MAX_10_EXP = DBL_MAX_10_EXP CHAR_BIT = (8) SCHAR_MIN = (-127-1) SCHAR_MAX = (127) CHAR_MIN = SCHAR_MIN CHAR_MAX = SCHAR_MAX MB_LEN_MAX = (1) SHRT_MIN = (-32767-1) SHRT_MAX = (32767) LONG_MIN = (-2147483647L-1) LONG_MAX = (2147483647L) INT_MIN = LONG_MIN INT_MAX = LONG_MAX ARG_MAX = (32768) ATEXIT_MAX = (32) CHILD_MAX = (1024) IOV_MAX = (256) FILESIZEBITS = (64) LINK_MAX = (1) LOGIN_NAME_MAX = (32) MAX_CANON = (255) MAX_INPUT = (255) NAME_MAX = (256) NGROUPS_MAX = (32) OPEN_MAX = (128) PATH_MAX = (1024) PIPE_MAX = (512) SSIZE_MAX = (2147483647L) TTY_NAME_MAX = (256) TZNAME_MAX = (32) SYMLINKS_MAX = (16) _POSIX_ARG_MAX = (32768) _POSIX_CHILD_MAX = (1024) _POSIX_LINK_MAX = (1) _POSIX_LOGIN_NAME_MAX = (9) _POSIX_MAX_CANON = (255) _POSIX_MAX_INPUT = (255) _POSIX_NAME_MAX = (255) _POSIX_NGROUPS_MAX = (0) _POSIX_OPEN_MAX = (128) _POSIX_PATH_MAX = (1024) _POSIX_PIPE_BUF = (512) _POSIX_SSIZE_MAX = (2147483647L) _POSIX_STREAM_MAX = (8) _POSIX_TTY_NAME_MAX = (256) _POSIX_TZNAME_MAX = (3) B_GENERAL_ERROR_BASE = LONG_MIN B_OS_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x1000 B_APP_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x2000 B_INTERFACE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x3000 B_MEDIA_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4000 B_TRANSLATION_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4800 B_MIDI_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x5000 B_STORAGE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x6000 B_POSIX_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x7000 B_MAIL_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x8000 B_PRINT_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x9000 B_DEVICE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0xa000 B_ERRORS_END = (B_GENERAL_ERROR_BASE + 0xffff) E2BIG = (B_POSIX_ERROR_BASE + 1) ECHILD = (B_POSIX_ERROR_BASE + 2) EDEADLK = (B_POSIX_ERROR_BASE + 3) EFBIG = (B_POSIX_ERROR_BASE + 4) EMLINK = (B_POSIX_ERROR_BASE + 5) ENFILE = (B_POSIX_ERROR_BASE + 6) ENODEV = (B_POSIX_ERROR_BASE + 7) ENOLCK = (B_POSIX_ERROR_BASE + 8) ENOSYS = (B_POSIX_ERROR_BASE + 9) ENOTTY = (B_POSIX_ERROR_BASE + 10) ENXIO = (B_POSIX_ERROR_BASE + 11) ESPIPE = (B_POSIX_ERROR_BASE + 12) ESRCH = (B_POSIX_ERROR_BASE + 13) EFPOS = (B_POSIX_ERROR_BASE + 14) ESIGPARM = (B_POSIX_ERROR_BASE + 15) EDOM = (B_POSIX_ERROR_BASE + 16) ERANGE = (B_POSIX_ERROR_BASE + 17) EPROTOTYPE = (B_POSIX_ERROR_BASE + 18) EPROTONOSUPPORT = (B_POSIX_ERROR_BASE + 19) EPFNOSUPPORT = (B_POSIX_ERROR_BASE + 20) EAFNOSUPPORT = (B_POSIX_ERROR_BASE + 21) EADDRINUSE = (B_POSIX_ERROR_BASE + 22) EADDRNOTAVAIL = (B_POSIX_ERROR_BASE + 23) ENETDOWN = (B_POSIX_ERROR_BASE + 24) ENETUNREACH = (B_POSIX_ERROR_BASE + 25) ENETRESET = (B_POSIX_ERROR_BASE + 26) ECONNABORTED = (B_POSIX_ERROR_BASE + 27) ECONNRESET = (B_POSIX_ERROR_BASE + 28) EISCONN = (B_POSIX_ERROR_BASE + 29) ENOTCONN = (B_POSIX_ERROR_BASE + 30) ESHUTDOWN = (B_POSIX_ERROR_BASE + 31) ECONNREFUSED = (B_POSIX_ERROR_BASE + 32) EHOSTUNREACH = (B_POSIX_ERROR_BASE + 33) ENOPROTOOPT = (B_POSIX_ERROR_BASE + 34) ENOBUFS = (B_POSIX_ERROR_BASE + 35) EINPROGRESS = (B_POSIX_ERROR_BASE + 36) EALREADY = (B_POSIX_ERROR_BASE + 37) EILSEQ = (B_POSIX_ERROR_BASE + 38) ENOMSG = (B_POSIX_ERROR_BASE + 39) ESTALE = (B_POSIX_ERROR_BASE + 40) EOVERFLOW = (B_POSIX_ERROR_BASE + 41) EMSGSIZE = (B_POSIX_ERROR_BASE + 42) EOPNOTSUPP = (B_POSIX_ERROR_BASE + 43) ENOTSOCK = (B_POSIX_ERROR_BASE + 44) false = 0 true = 1 NULL = (0) FALSE = 0 TRUE = 1 # Included from TypeConstants.h B_HOST_IS_LENDIAN = 1 B_HOST_IS_BENDIAN = 0 def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg) def B_HOST_TO_LENDIAN_FLOAT(arg): return (float)(arg) def B_HOST_TO_LENDIAN_INT64(arg): return (uint64)(arg) def B_HOST_TO_LENDIAN_INT32(arg): return (uint32)(arg) def B_HOST_TO_LENDIAN_INT16(arg): return (uint16)(arg) def B_HOST_TO_BENDIAN_DOUBLE(arg): return __swap_double(arg) def B_HOST_TO_BENDIAN_FLOAT(arg): return __swap_float(arg) def B_HOST_TO_BENDIAN_INT64(arg): return __swap_int64(arg) def B_HOST_TO_BENDIAN_INT32(arg): return __swap_int32(arg) def B_HOST_TO_BENDIAN_INT16(arg): return __swap_int16(arg) def B_LENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) def B_LENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) def B_LENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) def B_LENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) def B_LENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) def B_BENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) def B_BENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) def B_BENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) def B_BENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) def B_BENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) B_HOST_IS_LENDIAN = 0 B_HOST_IS_BENDIAN = 1 def B_HOST_TO_LENDIAN_DOUBLE(arg): return __swap_double(arg) def B_HOST_TO_LENDIAN_FLOAT(arg): return __swap_float(arg) def B_HOST_TO_LENDIAN_INT64(arg): return __swap_int64(arg) def B_HOST_TO_LENDIAN_INT32(arg): return __swap_int32(arg) def B_HOST_TO_LENDIAN_INT16(arg): return __swap_int16(arg) def B_HOST_TO_BENDIAN_DOUBLE(arg): return (double)(arg) def B_HOST_TO_BENDIAN_FLOAT(arg): return (float)(arg) def B_HOST_TO_BENDIAN_INT64(arg): return (uint64)(arg) def B_HOST_TO_BENDIAN_INT32(arg): return (uint32)(arg) def B_HOST_TO_BENDIAN_INT16(arg): return (uint16)(arg) def B_LENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) def B_LENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) def B_LENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) def B_LENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) def B_LENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) def B_BENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) def B_BENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) def B_BENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) def B_BENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) def B_BENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) def B_SWAP_DOUBLE(arg): return __swap_double(arg) def B_SWAP_FLOAT(arg): return __swap_float(arg) def B_SWAP_INT64(arg): return __swap_int64(arg) def B_SWAP_INT32(arg): return __swap_int32(arg) def B_SWAP_INT16(arg): return __swap_int16(arg) def htonl(x): return B_HOST_TO_BENDIAN_INT32(x) def ntohl(x): return B_BENDIAN_TO_HOST_INT32(x) def htons(x): return B_HOST_TO_BENDIAN_INT16(x) def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x) AF_INET = 1 INADDR_ANY = 0x00000000 INADDR_BROADCAST = 0xffffffff INADDR_LOOPBACK = 0x7f000001 SOL_SOCKET = 1 SO_DEBUG = 1 SO_REUSEADDR = 2 SO_NONBLOCK = 3 SO_REUSEPORT = 4 MSG_OOB = 0x1 SOCK_DGRAM = 1 SOCK_STREAM = 2 IPPROTO_UDP = 1 IPPROTO_TCP = 2 IPPROTO_ICMP = 3 B_UDP_MAX_SIZE = (65536 - 1024) FD_SETSIZE = 256 FDSETSIZE = FD_SETSIZE NFDBITS = 32 def _FDMSKNO(fd): return ((fd) / NFDBITS) def _FDBITNO(fd): return ((fd) % NFDBITS) --- NEW FILE --- # Generated by h2py from /boot/develop/headers/posix/termios.h # Included from be_setup.h def __std(ref): return ref __be_os = 2 __dest_os = __be_os __MSL__ = 0x4011 __GLIBC__ = -2 __GLIBC_MINOR__ = 1 # Included from BeBuild.h B_BEOS_VERSION_4 = 0x0400 B_BEOS_VERSION_4_5 = 0x0450 B_BEOS_VERSION_5 = 0x0500 B_BEOS_VERSION = B_BEOS_VERSION_5 B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 _PR2_COMPATIBLE_ = 1 _PR3_COMPATIBLE_ = 1 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 _PR2_COMPATIBLE_ = 0 _PR3_COMPATIBLE_ = 0 _R4_COMPATIBLE_ = 1 _R4_5_COMPATIBLE_ = 1 def _UNUSED(x): return x # Included from sys/types.h # Included from time.h # Included from null.h NULL = (0) NULL = 0L # Included from size_t.h # Included from stddef.h # Included from wchar_t.h CLOCKS_PER_SEC = 1000 CLK_TCK = CLOCKS_PER_SEC MAX_TIMESTR = 70 # Included from unistd.h B_MOUNT_READ_ONLY = 1 R_OK = 4 W_OK = 2 X_OK = 1 F_OK = 0 STDIN_FILENO = 0 STDOUT_FILENO = 1 STDERR_FILENO = 2 _PC_CHOWN_RESTRICTED = 1 _PC_MAX_CANON = 2 _PC_MAX_INPUT = 3 _PC_NAME_MAX = 4 _PC_NO_TRUNC = 5 _PC_PATH_MAX = 6 _PC_PIPE_BUF = 7 _PC_VDISABLE = 8 _POSIX_CHOWN_RESTRICTED = 9 _POSIX_JOB_CONTROL = 10 _POSIX_NO_TRUNC = 11 _POSIX_SAVED_IDS = 12 _POSIX_VERSION = (199009L) _SC_ARG_MAX = 15 _SC_CHILD_MAX = 16 _SC_CLK_TCK = 17 _SC_JOB_CONTROL = 18 _SC_NGROUPS_MAX = 19 _SC_OPEN_MAX = 20 _SC_SAVED_IDS = 21 _SC_STREAM_MAX = 22 _SC_TZNAME_MAX = 23 _SC_VERSION = 24 _PC_LINK_MAX = 25 SEEK_SET = 0 SEEK_CUR = 1 SEEK_END = 2 NCC = 11 NCCS = NCC VINTR = 0 VQUIT = 1 VERASE = 2 VKILL = 3 VEOF = 4 VEOL = 5 VMIN = 4 VTIME = 5 VEOL2 = 6 VSWTCH = 7 VSTART = 8 VSTOP = 9 VSUSP = 10 IGNBRK = 0x01 BRKINT = 0x02 IGNPAR = 0x04 PARMRK = 0x08 INPCK = 0x10 ISTRIP = 0x20 INLCR = 0x40 IGNCR = 0x80 ICRNL = 0x100 IUCLC = 0x200 IXON = 0x400 IXANY = 0x800 IXOFF = 0x1000 OPOST = 0x01 OLCUC = 0x02 ONLCR = 0x04 OCRNL = 0x08 ONOCR = 0x10 ONLRET = 0x20 OFILL = 0x40 OFDEL = 0x80 NLDLY = 0x100 NL0 = 0x000 NL1 = 0x100 CRDLY = 0x600 CR0 = 0x000 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 TABDLY = 0x1800 TAB0 = 0x0000 TAB1 = 0x0800 TAB2 = 0x1000 TAB3 = 0x1800 BSDLY = 0x2000 BS0 = 0x0000 BS1 = 0x2000 VTDLY = 0x4000 VT0 = 0x0000 VT1 = 0x4000 FFDLY = 0x8000 FF0 = 0x0000 FF1 = 0x8000 CBAUD = 0x1F B0 = 0x00 B50 = 0x01 B75 = 0x02 B110 = 0x03 B134 = 0x04 B150 = 0x05 B200 = 0x06 B300 = 0x07 B600 = 0x08 B1200 = 0x09 B1800 = 0x0A B2400 = 0x0B B4800 = 0x0C B9600 = 0x0D B19200 = 0x0E B38400 = 0x0F B57600 = 0x10 B115200 = 0x11 B230400 = 0x12 B31250 = 0x13 CSIZE = 0x20 CS5 = 0x00 CS6 = 0x00 CS7 = 0x00 CS8 = 0x20 CSTOPB = 0x40 CREAD = 0x80 PARENB = 0x100 PARODD = 0x200 HUPCL = 0x400 CLOCAL = 0x800 XLOBLK = 0x1000 CTSFLOW = 0x2000 RTSFLOW = 0x4000 CRTSCTS = (RTSFLOW | CTSFLOW) ISIG = (0x01) ICANON = (0x02) XCASE = (0x04) ECHO = (0x08) ECHOE = (0x10) ECHOK = (0x20) ECHONL = (0x40) NOFLSH = (0x80) TOSTOP = (0x100) IEXTEN = (0x200) EV_RING = 0x0001 EV_BREAK = 0x0002 EV_CARRIER = 0x0004 EV_CARRIERLOST = 0x0008 TCGETA = (0x8000) TCSETA = (TCGETA+1) TCSETAF = (TCGETA+2) TCSETAW = (TCGETA+3) TCWAITEVENT = (TCGETA+4) TCSBRK = (TCGETA+5) TCFLSH = (TCGETA+6) TCXONC = (TCGETA+7) TCQUERYCONNECTED = (TCGETA+8) TCGETBITS = (TCGETA+9) TCSETDTR = (TCGETA+10) TCSETRTS = (TCGETA+11) TIOCGWINSZ = (TCGETA+12) TIOCSWINSZ = (TCGETA+13) TCVTIME = (TCGETA+14) TCGB_CTS = 0x01 TCGB_DSR = 0x02 TCGB_RI = 0x04 TCGB_DCD = 0x08 TCSANOW = 0x01 TCSADRAIN = 0x02 TCSAFLUSH = 0x04 TCOOFF = 0x01 TCOON = 0x02 TCIOFF = 0x04 TCION = 0x08 TCIFLUSH = 0x01 TCOFLUSH = 0x02 TCIOFLUSH = (TCIFLUSH | TCOFLUSH) From python-dev@python.org Sat Oct 7 13:31:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 7 Oct 2000 05:31:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.94,1.95 Message-ID: <200010071231.FAA09982@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv9858/Doc/api Modified Files: api.tex Log Message: Fix a couple of places where the descriptions of *_GET_SIZE() macros said they were similar to *_GetSize(); should be similar to *_Size(). Error noted by William Park . Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -r1.94 -r1.95 *** api.tex 2000/10/05 19:38:24 1.94 --- api.tex 2000/10/07 12:31:50 1.95 *************** *** 2090,2094 **** \begin{cfuncdesc}{int}{PyString_GET_SIZE}{PyObject *string} ! Macro form of \cfunction{PyString_GetSize()} but without error checking. \end{cfuncdesc} --- 2090,2094 ---- \begin{cfuncdesc}{int}{PyString_GET_SIZE}{PyObject *string} ! Macro form of \cfunction{PyString_Size()} but without error checking. \end{cfuncdesc} *************** *** 3109,3113 **** \begin{cfuncdesc}{int}{PyList_GET_SIZE}{PyObject *list} ! Macro form of \cfunction{PyList_GetSize()} without error checking. \end{cfuncdesc} --- 3109,3113 ---- \begin{cfuncdesc}{int}{PyList_GET_SIZE}{PyObject *list} ! Macro form of \cfunction{PyList_Size()} without error checking. \end{cfuncdesc} From python-dev@python.org Sat Oct 7 13:50:08 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 7 Oct 2000 05:50:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools indfix.py,1.4,1.5 toc2bkm.py,1.9,1.10 custlib.py,1.1,1.2 Message-ID: <200010071250.FAA26822@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv26754 Modified Files: indfix.py toc2bkm.py custlib.py Log Message: Hush the nanny. Index: indfix.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/indfix.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** indfix.py 1999/03/03 19:36:23 1.4 --- indfix.py 2000/10/07 12:50:04 1.5 *************** *** 31,42 **** def dump_entries(write, entries): if len(entries) == 1: ! write(" \\item %s (%s)%s\n" % entries[0]) ! return write(" \item %s\n" % entries[0][0]) # now sort these in a case insensitive manner: if len(entries) > 0: ! entries.sort(cmp_entries) for xxx, subitem, pages in entries: ! write(" \subitem %s%s\n" % (subitem, pages)) --- 31,42 ---- def dump_entries(write, entries): if len(entries) == 1: ! write(" \\item %s (%s)%s\n" % entries[0]) ! return write(" \item %s\n" % entries[0][0]) # now sort these in a case insensitive manner: if len(entries) > 0: ! entries.sort(cmp_entries) for xxx, subitem, pages in entries: ! write(" \subitem %s%s\n" % (subitem, pages)) *************** *** 57,76 **** write = ofp.write while 1: ! line = ifp.readline() ! if not line: ! break ! m = match(line) ! if m: ! entry = m.group(1, 2, 3) ! if entries and entries[-1][0] != entry[0]: ! dump_entries(write, entries) ! entries = [] ! entries.append(entry) ! elif entries: ! dump_entries(write, entries) ! entries = [] ! write(line) ! else: ! write(line) del write del match --- 57,76 ---- write = ofp.write while 1: ! line = ifp.readline() ! if not line: ! break ! m = match(line) ! if m: ! entry = m.group(1, 2, 3) ! if entries and entries[-1][0] != entry[0]: ! dump_entries(write, entries) ! entries = [] ! entries.append(entry) ! elif entries: ! dump_entries(write, entries) ! entries = [] ! write(line) ! else: ! write(line) del write del match *************** *** 79,85 **** ofp.close() if ofn == "-": ! ofp = sys.stdout else: ! ofp = open(ofn, "w") ofp.write(data) ofp.close() --- 79,85 ---- ofp.close() if ofn == "-": ! ofp = sys.stdout else: ! ofp = open(ofn, "w") ofp.write(data) ofp.close() *************** *** 91,96 **** opts, args = getopt.getopt(sys.argv[1:], "o:") for opt, val in opts: ! if opt in ("-o", "--output"): ! outfile = val filename = args[0] outfile = outfile or filename --- 91,96 ---- opts, args = getopt.getopt(sys.argv[1:], "o:") for opt, val in opts: ! if opt in ("-o", "--output"): ! outfile = val filename = args[0] outfile = outfile or filename Index: toc2bkm.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/toc2bkm.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** toc2bkm.py 1999/03/03 19:25:56 1.9 --- toc2bkm.py 2000/10/07 12:50:05 1.10 *************** *** 24,28 **** \{(?:\\numberline\ \{([0-9.A-Z]+)})? # section number (.*)} # title string ! \{(\d+)}$""" # page number cline_rx = re.compile(cline_re, re.VERBOSE) --- 24,28 ---- \{(?:\\numberline\ \{([0-9.A-Z]+)})? # section number (.*)} # title string ! \{(\d+)}$""" # page number cline_rx = re.compile(cline_re, re.VERBOSE) *************** *** 51,82 **** lineno = 0 while 1: ! line = fp.readline() ! if not line: ! break ! lineno = lineno + 1 ! m = cline_rx.match(line) ! if m: ! stype, snum, title, pageno = m.group(1, 2, 3, 4) ! title = clean_title(title) ! entry = (stype, snum, title, string.atoi(pageno), []) ! if stype == level: ! toc.append(entry) ! else: if stype not in INCLUDED_LEVELS: # we don't want paragraphs & subparagraphs continue ! direction = _transition_map[(level, stype)] ! if direction == OUTER_TO_INNER: ! toc = toc[-1][-1] ! stack.insert(0, toc) ! toc.append(entry) ! else: ! for i in range(direction): ! del stack[0] ! toc = stack[0] ! toc.append(entry) ! level = stype ! else: ! sys.stderr.write("l.%s: " + line) return top --- 51,82 ---- lineno = 0 while 1: ! line = fp.readline() ! if not line: ! break ! lineno = lineno + 1 ! m = cline_rx.match(line) ! if m: ! stype, snum, title, pageno = m.group(1, 2, 3, 4) ! title = clean_title(title) ! entry = (stype, snum, title, string.atoi(pageno), []) ! if stype == level: ! toc.append(entry) ! else: if stype not in INCLUDED_LEVELS: # we don't want paragraphs & subparagraphs continue ! direction = _transition_map[(level, stype)] ! if direction == OUTER_TO_INNER: ! toc = toc[-1][-1] ! stack.insert(0, toc) ! toc.append(entry) ! else: ! for i in range(direction): ! del stack[0] ! toc = stack[0] ! toc.append(entry) ! level = stype ! else: ! sys.stderr.write("l.%s: " + line) return top *************** *** 92,103 **** pos = 0 while 1: ! m = title_rx.search(title, pos) ! if m: ! start = m.start() ! if title[start:start+15] != "\\textunderscore": ! title = title[:start] + title[m.end():] ! pos = start + 1 ! else: ! break title = string.translate(title, title_trans, "{}") return title --- 92,103 ---- pos = 0 while 1: ! m = title_rx.search(title, pos) ! if m: ! start = m.start() ! if title[start:start+15] != "\\textunderscore": ! title = title[:start] + title[m.end():] ! pos = start + 1 ! else: ! break title = string.translate(title, title_trans, "{}") return title *************** *** 106,110 **** def write_toc(toc, fp): for entry in toc: ! write_toc_entry(entry, fp, 0) def write_toc_entry(entry, fp, layer): --- 106,110 ---- def write_toc(toc, fp): for entry in toc: ! write_toc_entry(entry, fp, 0) def write_toc_entry(entry, fp, layer): *************** *** 112,122 **** s = "\\pdfoutline goto name{page%03d}" % pageno if toc: ! s = "%s count -%d" % (s, len(toc)) if snum: ! title = "%s %s" % (snum, title) s = "%s {%s}\n" % (s, title) fp.write(s) for entry in toc: ! write_toc_entry(entry, fp, layer + 1) --- 112,122 ---- s = "\\pdfoutline goto name{page%03d}" % pageno if toc: ! s = "%s count -%d" % (s, len(toc)) if snum: ! title = "%s %s" % (snum, title) s = "%s {%s}\n" % (s, title) fp.write(s) for entry in toc: ! write_toc_entry(entry, fp, layer + 1) *************** *** 130,140 **** opts, args = getopt.getopt(sys.argv[1:], "c:") if opts: ! bigpart = opts[0][1] if not args: ! usage() ! sys.exit(2) for filename in args: ! base, ext = os.path.splitext(filename) ! ext = ext or ".toc" process(base + ext, base + ".bkm", bigpart) --- 130,140 ---- opts, args = getopt.getopt(sys.argv[1:], "c:") if opts: ! bigpart = opts[0][1] if not args: ! usage() ! sys.exit(2) for filename in args: ! base, ext = os.path.splitext(filename) ! ext = ext or ".toc" process(base + ext, base + ".bkm", bigpart) Index: custlib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/custlib.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** custlib.py 1997/06/02 17:57:10 1.1 --- custlib.py 2000/10/07 12:50:05 1.2 *************** *** 13,29 **** filelist=glob.glob(os.path.join(dir, '*.py')) for file in filelist: ! path, file = os.path.split(file) ! base, ext=os.path.splitext(file) ! modules[string.lower(base)]=base # Look for shared library files filelist=(glob.glob(os.path.join(dir, '*.so')) + ! glob.glob(os.path.join(dir, '*.sl')) + ! glob.glob(os.path.join(dir, '*.o')) ) for file in filelist: ! path, file = os.path.split(file) ! base, ext=os.path.splitext(file) ! if base[-6:]=='module': base=base[:-6] ! modules[string.lower(base)]=base # Minor oddity: the types module is documented in libtypes2.tex --- 13,29 ---- filelist=glob.glob(os.path.join(dir, '*.py')) for file in filelist: ! path, file = os.path.split(file) ! base, ext=os.path.splitext(file) ! modules[string.lower(base)]=base # Look for shared library files filelist=(glob.glob(os.path.join(dir, '*.so')) + ! glob.glob(os.path.join(dir, '*.sl')) + ! glob.glob(os.path.join(dir, '*.o')) ) for file in filelist: ! path, file = os.path.split(file) ! base, ext=os.path.splitext(file) ! if base[-6:]=='module': base=base[:-6] ! modules[string.lower(base)]=base # Minor oddity: the types module is documented in libtypes2.tex *************** *** 54,58 **** \\title{Python Library Reference} \\input{boilerplate} ! \\makeindex % tell \\index to actually write the .idx file \\begin{document} \\pagenumbering{roman} --- 54,58 ---- \\title{Python Library Reference} \\input{boilerplate} ! \\makeindex % tell \\index to actually write the .idx file \\begin{document} \\pagenumbering{roman} *************** *** 70,73 **** # Write the end ! print """\\input{custlib.ind} % Index \\end{document}""" --- 70,73 ---- # Write the end ! print """\\input{custlib.ind} % Index \\end{document}""" From python-dev@python.org Sat Oct 7 16:53:47 2000 From: python-dev@python.org (Thomas Wouters) Date: Sat, 7 Oct 2000 08:53:47 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.33,1.34 Message-ID: <200010071553.IAA15358@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv14620 Modified Files: pep-0042.txt Log Message: Add request for syntax checking in makesetup, which would prevent confusing errors in config.c during build. (Derived from SF bug #116326) Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** pep-0042.txt 2000/10/06 17:18:55 1.33 --- pep-0042.txt 2000/10/07 15:53:43 1.34 *************** *** 216,219 **** --- 216,226 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=110836&group_id=5470 + - Modules/makesetup should make sure the 'config.c' file it + generates from the various Setup files, is valid C. It currently + accepts module names with characters that are not allowable in + Python or C identifiers. + + http://sourceforge.net/bugs/?func=detailbug&bug_id=116326&group_id=5470 + From python-dev@python.org Sat Oct 7 17:21:30 2000 From: python-dev@python.org (Guido van Rossum) Date: Sat, 7 Oct 2000 09:21:30 -0700 Subject: [Python-checkins] CVS: python/dist/src configure,1.158,1.159 configure.in,1.167,1.168 Message-ID: <200010071621.JAA04181@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv4081 Modified Files: configure configure.in Log Message: Put arguments to test -z in double quotes. Fixes Bug #116325. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.158 retrieving revision 1.159 diff -C2 -r1.158 -r1.159 *** configure 2000/10/05 18:45:52 1.158 --- configure 2000/10/07 16:21:27 1.159 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.166 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.168 # Guess values for system-dependent variables and create Makefiles. *************** *** 3103,3110 **** USE_THREAD_MODULE="#" else ! if test ! -z $with_threads -a -d $with_threads then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z $withval -a -d $withval then LDFLAGS="$LDFLAGS -L$withval" fi --- 3103,3110 ---- USE_THREAD_MODULE="#" else ! if test ! -z "$with_threads" -a -d "$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z "$withval" -a -d "$withval" then LDFLAGS="$LDFLAGS -L$withval" fi *************** *** 3783,3787 **** DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z $dldir -a -d $dldir then LDFLAGS="$LDFLAGS -L$dldir" else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; } --- 3783,3787 ---- DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z "$dldir" -a -d "$dldir" then LDFLAGS="$LDFLAGS -L$dldir" else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; } Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -r1.167 -r1.168 *** configure.in 2000/10/05 18:45:53 1.167 --- configure.in 2000/10/07 16:21:27 1.168 *************** *** 751,758 **** USE_THREAD_MODULE="#" else ! if test ! -z $with_threads -a -d $with_threads then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z $withval -a -d $withval then LDFLAGS="$LDFLAGS -L$withval" fi --- 751,758 ---- USE_THREAD_MODULE="#" else ! if test ! -z "$with_threads" -a -d "$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads" fi ! if test ! -z "$withval" -a -d "$withval" then LDFLAGS="$LDFLAGS -L$withval" fi *************** *** 890,894 **** DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z $dldir -a -d $dldir then LDFLAGS="$LDFLAGS -L$dldir" else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY) --- 890,894 ---- DYNLOADFILE="dynload_dl.o" dldir=$withval ! if test ! -z "$dldir" -a -d "$dldir" then LDFLAGS="$LDFLAGS -L$dldir" else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY) From python-dev@python.org Sat Oct 7 17:58:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Sat, 7 Oct 2000 09:58:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_StringIO,1.2,1.3 Message-ID: <200010071658.JAA02253@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv2195 Modified Files: test_StringIO Log Message: The test is good, but Jim forgot to check in the updated output. Index: test_StringIO =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_StringIO,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_StringIO 2000/09/28 04:25:33 1.2 --- test_StringIO 2000/10/07 16:58:11 1.3 *************** *** 5,8 **** --- 5,11 ---- 2 'abcdefghij' + 'abcde' + Caught expected ValueError writing to closed StringIO: + I/O operation on closed file abcdefghij klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ *************** *** 10,11 **** --- 13,17 ---- 2 'abcdefghij' + 'abcde' + Caught expected ValueError writing to closed StringIO: + I/O operation on closed file From python-dev@python.org Sat Oct 7 18:38:26 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 7 Oct 2000 10:38:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib sre_compile.py,1.30,1.31 sre_constants.py,1.20,1.21 sre_parse.py,1.36,1.37 Message-ID: <200010071738.KAA04559@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2906/Lib Modified Files: sre_compile.py sre_constants.py sre_parse.py Log Message: Fixed too ambitious "nothing to repeat" check. Closes bug #114033. Index: sre_compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** sre_compile.py 2000/08/07 20:59:04 1.30 --- sre_compile.py 2000/10/07 17:38:22 1.31 *************** *** 223,227 **** # check if av is a "simple" operator lo, hi = av[2].getwidth() ! if lo == 0: raise error, "nothing to repeat" return lo == hi == 1 and av[2][0][0] != SUBPATTERN --- 223,227 ---- # check if av is a "simple" operator lo, hi = av[2].getwidth() ! if lo == 0 and hi == MAXREPEAT: raise error, "nothing to repeat" return lo == hi == 1 and av[2][0][0] != SUBPATTERN Index: sre_constants.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_constants.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** sre_constants.py 2000/08/01 22:47:48 1.20 --- sre_constants.py 2000/10/07 17:38:22 1.21 *************** *** 10,13 **** --- 10,15 ---- # + MAXREPEAT = 65535 + # should this really be here? Index: sre_parse.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** sre_parse.py 2000/10/07 10:16:14 1.36 --- sre_parse.py 2000/10/07 17:38:22 1.37 *************** *** 13,18 **** from sre_constants import * - MAXREPEAT = 65535 - SPECIAL_CHARS = ".\\[{()*+?^$|" REPEAT_CHARS = "*+?{" --- 13,16 ---- From python-dev@python.org Sat Oct 7 18:38:26 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 7 Oct 2000 10:38:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test re_tests.py,1.24,1.25 Message-ID: <200010071738.KAA04553@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv2906/Lib/test Modified Files: re_tests.py Log Message: Fixed too ambitious "nothing to repeat" check. Closes bug #114033. Index: re_tests.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** re_tests.py 2000/10/07 10:16:19 1.24 --- re_tests.py 2000/10/07 17:38:23 1.25 *************** *** 616,619 **** --- 616,621 ---- ('(', '', SYNTAX_ERROR), ('[\\41]', '!', SUCCEED, 'found', '!'), + # bug 114033: nothing to repeat + (r'(x?)?', 'x', SUCCEED, 'found', 'x'), # bug 115040: rescan if flags are modified inside pattern (r' (?x)foo ', 'foo', SUCCEED, 'found', 'foo'), *************** *** 622,624 **** --- 624,627 ---- # bug 116251: character class bug (r'[\w-]+', 'laser_beam', SUCCEED, 'found', 'laser_beam'), + ] From python-dev@python.org Sat Oct 7 20:03:32 2000 From: python-dev@python.org (Martin v. Löwis) Date: Sat, 7 Oct 2000 12:03:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.9,1.10 Message-ID: <200010071903.MAA20917@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv20342 Modified Files: minidom.py Log Message: Don't use string methods to allow sharing this code with PyXML. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** minidom.py 2000/10/07 12:10:28 1.9 --- minidom.py 2000/10/07 19:03:20 1.10 *************** *** 392,396 **** def _nssplit(qualifiedName): ! fields = qualifiedName.split(':', 1) if len(fields) == 2: return fields --- 392,397 ---- def _nssplit(qualifiedName): ! import string ! fields = string.split(qualifiedName,':', 1) if len(fields) == 2: return fields From python-dev@python.org Sun Oct 8 01:20:24 2000 From: python-dev@python.org (Guido van Rossum) Date: Sat, 7 Oct 2000 17:20:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_linuxaudiodev.py,1.5,1.6 Message-ID: <200010080020.RAA05888@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv5835 Modified Files: test_linuxaudiodev.py Log Message: It seems our sound cards can't play mulaw data. Use native-format 16-bit signed data instead. Hope this works for you; it works for me. Index: test_linuxaudiodev.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_linuxaudiodev.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_linuxaudiodev.py 2000/10/06 19:39:55 1.5 --- test_linuxaudiodev.py 2000/10/08 00:20:20 1.6 *************** *** 5,11 **** --- 5,13 ---- import linuxaudiodev import os + import sys import select import sunaudio import time + import audioop SND_FORMAT_MULAW_8 = 1 *************** *** 28,31 **** --- 30,42 ---- raise TestFailed, msg + # convert the data to 16-bit signed + data = audioop.ulaw2lin(data, 2) + + # set the data format + if sys.byteorder == 'little': + fmt = linuxaudiodev.AFMT_S16_LE + else: + fmt = linuxaudiodev.AFMT_S16_BE + # at least check that these methods can be invoked a.bufsize() *************** *** 36,40 **** # set parameters based on .au file headers ! a.setparameters(rate, 8, nchannels, linuxaudiodev.AFMT_MU_LAW, 1) a.write(data) a.flush() --- 47,51 ---- # set parameters based on .au file headers ! a.setparameters(rate, 16, nchannels, fmt) a.write(data) a.flush() From python-dev@python.org Sun Oct 8 01:21:46 2000 From: python-dev@python.org (Guido van Rossum) Date: Sat, 7 Oct 2000 17:21:46 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_linuxaudiodev,1.2,1.3 Message-ID: <200010080021.RAA07502@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv7443 Modified Files: test_linuxaudiodev Log Message: Correct output. Index: test_linuxaudiodev =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_linuxaudiodev,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_linuxaudiodev 2000/10/06 19:39:55 1.2 --- test_linuxaudiodev 2000/10/08 00:21:43 1.3 *************** *** 5,7 **** unknown audio encoding: 177 sample size 16 expected for Little-endian 16-bit unsigned format: 8 received ! sample size 8 expected for Logarithmic mu-law audio: 16 received --- 5,7 ---- unknown audio encoding: 177 sample size 16 expected for Little-endian 16-bit unsigned format: 8 received ! sample size 8 expected for Standard unsigned 8-bit audio: 16 received From python-dev@python.org Sun Oct 8 20:47:50 2000 From: python-dev@python.org (Guido van Rossum) Date: Sun, 8 Oct 2000 12:47:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules linuxaudiodev.c,2.10,2.11 Message-ID: <200010081947.MAA26812@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv26755 Modified Files: linuxaudiodev.c Log Message: Be consistent in the description of audio formats: "audio". Also add AFMT_S16_NE ("native-endian"). (Somehow there's no AFMT_U16_NE.) Index: linuxaudiodev.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** linuxaudiodev.c 2000/10/06 19:39:55 2.10 --- linuxaudiodev.c 2000/10/08 19:47:47 2.11 *************** *** 68,75 **** { 8, AFMT_U8, "Standard unsigned 8-bit audio" }, { 8, AFMT_S8, "Standard signed 8-bit audio" }, ! { 16, AFMT_U16_BE, "Big-endian 16-bit unsigned format" }, ! { 16, AFMT_U16_LE, "Little-endian 16-bit unsigned format" }, ! { 16, AFMT_S16_BE, "Big-endian 16-bit signed format" }, ! { 16, AFMT_S16_LE, "Little-endian 16-bit signed format" }, }; --- 68,76 ---- { 8, AFMT_U8, "Standard unsigned 8-bit audio" }, { 8, AFMT_S8, "Standard signed 8-bit audio" }, ! { 16, AFMT_U16_BE, "Big-endian 16-bit unsigned audio" }, ! { 16, AFMT_U16_LE, "Little-endian 16-bit unsigned audio" }, ! { 16, AFMT_S16_BE, "Big-endian 16-bit signed audio" }, ! { 16, AFMT_S16_LE, "Little-endian 16-bit signed audio" }, ! { 16, AFMT_S16_NE, "Native-endian 16-bit signed audio" }, }; *************** *** 485,488 **** --- 486,491 ---- return; if (PyModule_AddIntConstant(m, "AFMT_S16_LE", (long)AFMT_S16_LE) == -1) + return; + if (PyModule_AddIntConstant(m, "AFMT_S16_NE", (long)AFMT_S16_NE) == -1) return; From python-dev@python.org Sun Oct 8 20:48:48 2000 From: python-dev@python.org (Guido van Rossum) Date: Sun, 8 Oct 2000 12:48:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_linuxaudiodev,1.3,1.4 Message-ID: <200010081948.MAA27681@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv27639 Modified Files: test_linuxaudiodev Log Message: Adapt test output to changed error message. Index: test_linuxaudiodev =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_linuxaudiodev,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_linuxaudiodev 2000/10/08 00:21:43 1.3 --- test_linuxaudiodev 2000/10/08 19:48:46 1.4 *************** *** 4,7 **** nchannels must be 1 or 2, not 3 unknown audio encoding: 177 ! sample size 16 expected for Little-endian 16-bit unsigned format: 8 received sample size 8 expected for Standard unsigned 8-bit audio: 16 received --- 4,7 ---- nchannels must be 1 or 2, not 3 unknown audio encoding: 177 ! sample size 16 expected for Little-endian 16-bit unsigned audio: 8 received sample size 8 expected for Standard unsigned 8-bit audio: 16 received From python-dev@python.org Mon Oct 9 13:42:07 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 05:42:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib calendar.py,1.17,1.18 Message-ID: <200010091242.FAA02671@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2609 Modified Files: calendar.py Log Message: Fixed leapdays(). From Patch #101841, by Denis S. Otkidach. Index: calendar.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/calendar.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** calendar.py 2000/08/30 14:01:28 1.17 --- calendar.py 2000/10/09 12:42:04 1.18 *************** *** 55,60 **** def leapdays(y1, y2): """Return number of leap years in range [y1, y2). ! Assume y1 <= y2 and no funny (non-leap century) years.""" ! return (y2+3)/4 - (y1+3)/4 def weekday(year, month, day): --- 55,62 ---- def leapdays(y1, y2): """Return number of leap years in range [y1, y2). ! Assume y1 <= y2.""" ! y1 -= 1 ! y2 -= 1 ! return (y2/4 - y1/4) - (y2/100 - y1/100) + (y2/400 - y1/400) def weekday(year, month, day): From python-dev@python.org Mon Oct 9 15:18:16 2000 From: python-dev@python.org (A.M. Kuchling) Date: Mon, 9 Oct 2000 07:18:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules zlibmodule.c,2.35,2.36 Message-ID: <200010091418.HAA08765@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv6858 Modified Files: zlibmodule.c Log Message: Patch #101810: check whether zst.avail_out is non-zero when getting a Z_BUF_ERROR while decompressing. If it is, assume that this means the data being decompressed is bad and raise an exception, instead of just assuming that Z_BUF_ERROR always means that more space is required. Index: zlibmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/zlibmodule.c,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -r2.35 -r2.36 *** zlibmodule.c 2000/08/03 02:04:05 2.35 --- zlibmodule.c 2000/10/09 14:18:10 2.36 *************** *** 215,219 **** break; case(Z_BUF_ERROR): ! case(Z_OK): /* need more memory */ if (_PyString_Resize(&result_str, r_strlen << 1) == -1) --- 215,233 ---- break; case(Z_BUF_ERROR): ! /* ! * If there is at least 1 byte of room according to zst.avail_out ! * and we get this error, assume that it means zlib cannot ! * process the inflate call() due to an error in the data. ! */ ! if (zst.avail_out > 0) ! { ! PyErr_Format(ZlibError, "Error %i while decompressing data", ! err); ! inflateEnd(&zst); ! Py_DECREF(result_str); ! return NULL; ! } ! /* fall through */ ! case(Z_OK): /* need more memory */ if (_PyString_Resize(&result_str, r_strlen << 1) == -1) From python-dev@python.org Mon Oct 9 15:35:27 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 07:35:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler dumppyc.py,NONE,1.1 Message-ID: <200010091435.HAA21426@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv21101 Added Files: dumppyc.py Log Message: read in a .pyc file and disassemble the code objects --- NEW FILE --- #! /usr/bin/env python import marshal import dis import types def dump(obj): print obj for attr in dir(obj): print "\t", attr, repr(getattr(obj, attr)) def loadCode(path): f = open(path) f.read(8) co = marshal.load(f) f.close() return co def walk(co, match=None): if match is None or co.co_name == match: dump(co) print dis.dis(co) for obj in co.co_consts: if type(obj) == types.CodeType: walk(obj, match) def main(filename, codename=None): co = loadCode(filename) walk(co, codename) if __name__ == "__main__": import sys if len(sys.argv) == 3: filename, codename = sys.argv[1:] else: filename = sys.argv[1] codename = None main(filename, codename) From python-dev@python.org Mon Oct 9 16:13:51 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 08:13:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.40,2.41 Message-ID: <200010091513.IAA22787@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv22465/Include Modified Files: patchlevel.h Log Message: bump patchlevel to 2.0c1 Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** patchlevel.h 2000/09/26 00:36:03 2.40 --- patchlevel.h 2000/10/09 15:13:47 2.41 *************** *** 23,34 **** #define PY_MINOR_VERSION 0 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA ! #define PY_RELEASE_SERIAL 2 /* Version as a string */ ! #define PY_VERSION "2.0b2" /* Historic */ ! #define PATCHLEVEL "2.0b2" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. --- 23,34 ---- #define PY_MINOR_VERSION 0 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA ! #define PY_RELEASE_SERIAL 1 /* Version as a string */ ! #define PY_VERSION "2.0c1" /* Historic */ ! #define PATCHLEVEL "2.0c1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. From python-dev@python.org Mon Oct 9 16:27:34 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 08:27:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcalendar.tex,1.8,1.9 Message-ID: <200010091527.IAA32670@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv32626/lib Modified Files: libcalendar.tex Log Message: Denis S. Otkidach : Correct description of leapdays() function. This closes SourceForge patch #101840. Index: libcalendar.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcalendar.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libcalendar.tex 2000/08/30 14:02:25 1.8 --- libcalendar.tex 2000/10/09 15:27:31 1.9 *************** *** 38,42 **** \begin{funcdesc}{leapdays}{y1, y2} Returns the number of leap years in the range ! [\var{y1}\ldots\var{y2}]. \end{funcdesc} --- 38,42 ---- \begin{funcdesc}{leapdays}{y1, y2} Returns the number of leap years in the range ! [\var{y1}\ldots\var{y2}). \end{funcdesc} From python-dev@python.org Mon Oct 9 17:45:58 2000 From: python-dev@python.org (Martin v. Löwis) Date: Mon, 9 Oct 2000 09:45:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax _exceptions.py,1.5,1.6 expatreader.py,1.16,1.17 Message-ID: <200010091645.JAA00377@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv31777 Modified Files: _exceptions.py expatreader.py Log Message: _exceptions: Format a missing system id as . expatreader: Use the error handler instead of raising exception directly. Index: _exceptions.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/_exceptions.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** _exceptions.py 2000/10/06 17:41:52 1.5 --- _exceptions.py 2000/10/09 16:45:54 1.6 *************** *** 80,87 **** def __str__(self): "Create a string representation of the exception." ! return "%s at %s:%d:%d" % (self._msg, ! self.getSystemId(), ! self.getLineNumber(), ! self.getColumnNumber()) --- 80,88 ---- def __str__(self): "Create a string representation of the exception." ! sysid = self.getSystemId() ! if sysid is None: ! sysid = "" ! return "%s:%d:%d: %s" % (sysid, self.getLineNumber(), ! self.getColumnNumber(), self._msg) Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** expatreader.py 2000/10/06 21:10:34 1.16 --- expatreader.py 2000/10/09 16:45:54 1.17 *************** *** 82,86 **** except expat.error: error_code = self._parser.ErrorCode ! raise SAXParseException(expat.ErrorString(error_code), None, self) def close(self): --- 82,87 ---- except expat.error: error_code = self._parser.ErrorCode ! exc = SAXParseException(expat.ErrorString(error_code), None, self) ! self._err_handler.fatalError(exc) def close(self): From python-dev@python.org Mon Oct 9 17:46:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 09:46:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/BeOS ar-fake,1.3,1.4 Message-ID: <200010091646.JAA00476@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/BeOS In directory slayer.i.sourceforge.net:/tmp/cvs-serv433/BeOS Modified Files: ar-fake Log Message: Updated version from Donn Cave . This closes SourceForge patch #101778. Index: ar-fake =================================================================== RCS file: /cvsroot/python/python/dist/src/BeOS/ar-fake,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ar-fake 1999/03/24 17:46:39 1.3 --- ar-fake 2000/10/09 16:46:02 1.4 *************** *** 1,157 **** ! #! /bin/sh # ! # Fake "ar" to build the Python shared library on BeOS. This "ar" ! # manipulates a .ar-libname file listing all the objects and regenerates ! # the shared lib every time it's called. This is probably only suitable ! # for things that get built like Python, and you'll probably have to make ! # some small modifications here and there. # ! # This stupid hackery is necessary due to the brain-damaged __declspec() ! # semantics on x86; on PowerPC, we could just build a static library ! # and turn that into a shared library using an exports list. On x86, you'd ! # need to use a fake table of pointers to every symbol you wanted to ! # export, otherwise you'd end up with an empty shared lib. This is ! # progress? ! # ! # Called via: ! # ! # ar-fake cr lib-name objects ! # ar-fake d lib-name objects ! # ! # This fake "ar" DOES NOT support any other POSIX "ar" commands! DO NOT ! # expect it to behave very intelligently, it's designed to build Python, ! # not any old shared lib. ! ! AR_COMMAND=$1 ; shift ! AR_LIB=$1 ; shift ! AR_LIB_NAME=$(basename $AR_LIB) ! AR_SO_LIB_NAME=${AR_LIB_NAME/.a/.so} ! AR_LIB_PATH=${AR_LIB/$AR_LIB_NAME/} ! if [ "$AR_LIB_PATH" = "" ] ; then ! AR_LIB_PATH="." ! fi ! AR_CRUD=${AR_LIB_PATH}/.ar-${AR_LIB_NAME} ! ! AR_CWD=$(pwd) ! ! # Function to tell is if the arg is an absolute path. Use it like this: ! # ! # if is_abs pathname ; then ... ! is_abs() { ! if [ "$1" != "$(echo $1 | sed -e "s,^/,,")" ] ; then ! return 0 ! fi ! return 1 ! } ! ! # Function to build the shared library. It does the right thing for ! # PowerPC or x86 systems running BeOS. ! build_lib() { ! LIB=$1 ; shift ! SO_LIB=${LIB/.a/.so} ! SO_NAME=$1 ; shift ! CRUD_NAME=$1 ; shift ! ! # maybe too much... ! EXTRA_LIBS="-lroot -lbe -lnet" ! ! case $BE_HOST_CPU in ! ppc) ! case $(uname -r) in ! 4.0*) AR_CC="mwcc -xms -export pragma -nodup" ;; ! *) AR_CC="mwcc -shared -export pragma -nodup" ;; ! esac ! GLUE_LOC=/boot/develop/lib/ppc ! AR_GLUE="${GLUE_LOC}/glue-noinit.a ${GLUE_LOC}/init_term_dyn.o ${GLUE_LOC}/start_dyn.o" ! ;; ! ! x86) ! AR_CC="gcc -nostart -Wl,-soname=${SO_NAME}" ! AR_GLUE= ! ;; ! *) ! # Send me the mystery system (soo-pah aitch!), then we'll talk... ! echo "No, no, no... $0 doesn't support $BE_HOST_CPU" ! exit 2 ! ;; ! esac ! # Build a list of the objects... ! PARTS="" ! while read OBJ_FILE OBJ_PATH ; do ! PARTS="$PARTS ${OBJ_PATH}${OBJ_FILE}" ! done < $CRUD_NAME ! ! $AR_CC -o $SO_LIB $PARTS $AR_GLUE $EXTRA_LIBS > /dev/null 2>&1 ! ! return 0 ! } ! ! # Make a backup of the old AR_CRUD file, just to be nice, and clean up ! # any of our temp files that may be laying around. ! if [ -e $AR_CRUD ] ; then ! mv -f $AR_CRUD ${AR_CRUD}.old ! cp ${AR_CRUD}.old $AR_CRUD ! else ! touch $AR_CRUD ! fi ! ! if [ -e ${AR_CRUD}.grepper ] ; then ! rm -f ${AR_CRUD}.grepper ! fi ! ! case $AR_COMMAND in ! cr) ! # Add the extra bits to the $AR_CRUD file. ! for OBJECT in "$@" ; do ! OBJ_NAME=$(basename $OBJECT) ! OBJ_PATH=${OBJECT%$OBJ_NAME} ! if ! is_abs $OBJ_PATH ; then ! OBJ_PATH=${AR_CWD}/${OBJECT} ! OBJ_PATH=${OBJ_PATH%$OBJ_NAME} ! fi ! ! # If this is already in there, we have to blow it away so ! # we can replace it with the new one. ! if egrep -q "^$OBJ_NAME " $AR_CRUD ; then ! egrep -v "^$OBJ_NAME " < $AR_CRUD > ${AR_CRUD}.grepper ! mv -f ${AR_CRUD}.grepper $AR_CRUD ! fi ! ! echo $OBJ_NAME $OBJ_PATH >> $AR_CRUD ! done ! ! # Now build a library from the files. ! build_lib $AR_LIB $AR_SO_LIB_NAME $AR_CRUD ! ;; ! ! d) ! # Remove files from the $AR_CRUD file. This isn't terribly ! # efficient. ! for OBJECT in "$@" ; do ! OBJ_NAME=$(basename $OBJECT) ! OBJ_PATH=${OBJECT%$OBJ_NAME} ! if ! is_abs $OBJ_PATH ; then ! OBJ_PATH=${AR_CWD}/${OBJECT} ! OBJ_PATH=${OBJ_PATH%$OBJ_NAME} ! fi ! ! # Strip the objects from the list, if they're in there. ! egrep -v "^$OBJ_NAME " < $AR_CRUD > ${AR_CRUD}.grepper ! mv -f ${AR_CRUD}.grepper $AR_CRUD ! done ! ! # Now build a library from the remaining objects. ! build_lib $AR_LIB $AR_SO_LIB_NAME $AR_CRUD ! ;; ! ! *) ! echo "$0 error:" ! echo " Unsupported command: $AR_COMMAND" ! exit 1 ! ;; esac ! # If we make it here, all went well. Hopefully. ! exit 0 --- 1,64 ---- ! #!/bin/sh # ! # Truly fake ar, using a directory to store object files. # ! # Donn Cave, donn@oz.net ! usage='Usage: ar-fake cr libpython.dir obj.o ... ! ar-fake d libpython.dir obj.o ... ! ar-fake so libpython.dir libpython.so' ! case $# in ! 0|1|2) ! echo "$usage" >&2 ! exit 1 ! ;; esac ! command=$1 ! library=$2 ! shift 2 ! ! case $command in ! cr) ! if test -d $library ! then : ! else ! mkdir $library ! fi ! if cp -p $* $library ! then ! # To force directory modify date, create or delete a file. ! if test -e $library/.tch ! then rm $library/.tch ! else echo tch > $library/.tch ! fi ! exit 0 ! fi ! ;; ! d) ! if test -d $library ! then ! cd $library ! rm -f $* ! fi ! ;; ! so) ! case $BE_HOST_CPU in ! ppc) ! mwld -xms -export pragma -nodup -o $1 $library/* ! ;; ! x86) ! gcc -nostart -Wl,-soname=$(basename $1) -o $1 $library/* ! ;; ! esac ! status=$? ! cd $(dirname $1) ! ln -sf $PWD lib ! exit $status ! ;; ! *) ! echo "$usage" >&2 ! exit 1 ! ;; ! esac From python-dev@python.org Mon Oct 9 17:48:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 09:48:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules Makefile.pre.in,1.67,1.68 Message-ID: <200010091648.JAA02601@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2529/Modules Modified Files: Makefile.pre.in Log Message: Donn Cave : Updated to work better with BeOS. This closes SourceForge patch #101777. Index: Makefile.pre.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/Makefile.pre.in,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -r1.67 -r1.68 *** Makefile.pre.in 2000/09/22 15:38:21 1.67 --- Makefile.pre.in 2000/10/09 16:48:09 1.68 *************** *** 150,154 **** config.c Makefile: Setup.config Setup Setup.local config.c Makefile: ! -rm -f $(LIBRARY) $(SHELL) $(MAKESETUP) Setup.config Setup.local Setup --- 150,154 ---- config.c Makefile: Setup.config Setup Setup.local config.c Makefile: ! -rm -rf $(LIBRARY) $(SHELL) $(MAKESETUP) Setup.config Setup.local Setup From python-dev@python.org Mon Oct 9 17:51:52 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 09:51:52 -0700 Subject: [Python-checkins] CVS: python/dist/src Makefile.in,1.104,1.105 Message-ID: <200010091651.JAA05703@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv5657 Modified Files: Makefile.in Log Message: Donn Cave : Revise BeOS support. This closes SourceForge patch #101776. Index: Makefile.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.in,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -r1.104 -r1.105 *** Makefile.in 2000/09/24 19:57:18 1.104 --- Makefile.in 2000/10/09 16:51:49 1.105 *************** *** 169,173 **** (cd $$i; $(MAKE) VERSION="$(VERSION)" add2lib); done ! # This rule is only here for DG/UX!!! libpython$(VERSION).so: $(LIBRARY) case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \ --- 169,173 ---- (cd $$i; $(MAKE) VERSION="$(VERSION)" add2lib); done ! # This rule is only here for DG/UX and BeOS!!! libpython$(VERSION).so: $(LIBRARY) case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \ *************** *** 177,180 **** --- 177,183 ---- /bin/rm -rf ./dgux \ ;; \ + beos) \ + $(srcdir)/BeOS/ar-fake so $(LIBRARY) $@ \ + ;; \ esac *************** *** 368,372 **** fi; \ done ! @if [ "$(MACHDEP)" != "beos" ] ; then \ $(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) ; \ $(RANLIB) $(LIBPL)/$(LIBRARY) ; \ --- 371,375 ---- fi; \ done ! @if test -d $(LIBRARY); then :; else \ $(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) ; \ $(RANLIB) $(LIBPL)/$(LIBRARY) ; \ *************** *** 397,401 **** else true; \ fi ! @if [ "$(MACHDEP)" = "beos" ] ; then \ echo; echo "Installing support files for building shared extension modules on BeOS:"; \ $(INSTALL_DATA) BeOS/README $(LIBPL)/README; \ --- 400,404 ---- else true; \ fi ! @case "$(MACHDEP)" in beos*) \ echo; echo "Installing support files for building shared extension modules on BeOS:"; \ $(INSTALL_DATA) BeOS/README $(LIBPL)/README; \ *************** *** 403,417 **** $(INSTALL_DATA) BeOS/README.readline-2.2 $(LIBPL)/README.readline-2.2; \ echo "$(LIBPL)/README.readline-2.2"; \ - $(INSTALL_DATA) BeOS/dl_export.h $(LIBPL)/dl_export.h; \ - echo "$(LIBPL)/dl_export.h"; \ $(INSTALL_PROGRAM) BeOS/ar-fake $(LIBPL)/ar-fake; \ echo "$(LIBPL)/ar-fake"; \ - $(INSTALL_PROGRAM) BeOS/linkcc $(LIBPL)/linkcc; \ - echo "$(LIBPL)/linkcc"; \ $(INSTALL_PROGRAM) BeOS/linkmodule $(LIBPL)/linkmodule; \ echo "$(LIBPL)/linkmodule"; \ echo; echo "See BeOS/README for details."; \ ! else true; \ ! fi # Install the dynamically loadable modules --- 406,416 ---- $(INSTALL_DATA) BeOS/README.readline-2.2 $(LIBPL)/README.readline-2.2; \ echo "$(LIBPL)/README.readline-2.2"; \ $(INSTALL_PROGRAM) BeOS/ar-fake $(LIBPL)/ar-fake; \ echo "$(LIBPL)/ar-fake"; \ $(INSTALL_PROGRAM) BeOS/linkmodule $(LIBPL)/linkmodule; \ echo "$(LIBPL)/linkmodule"; \ echo; echo "See BeOS/README for details."; \ ! ;; \ ! esac # Install the dynamically loadable modules From python-dev@python.org Mon Oct 9 18:01:07 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 10:01:07 -0700 Subject: [Python-checkins] CVS: python/dist/src config.h.in,2.75,2.76 acconfig.h,1.38,1.39 Message-ID: <200010091701.KAA12919@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv12856 Modified Files: config.h.in acconfig.h Log Message: Donn Cave : Removed DL_EXPORT_HEADER -- only needed on BeOS, and not needed there anymore. This closes SourceForge patch #101775. Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.75 retrieving revision 2.76 diff -C2 -r2.75 -r2.76 *** config.h.in 2000/09/19 00:46:45 2.75 --- config.h.in 2000/10/09 17:01:03 2.76 *************** *** 91,100 **** #undef clock_t - /* Used for BeOS configuration */ - #undef DL_EXPORT_HEADER - #ifdef DL_EXPORT_HEADER - #include DL_EXPORT_HEADER - #endif - /* Define if getpgrp() must be called as getpgrp(0). */ #undef GETPGRP_HAVE_ARG --- 91,94 ---- Index: acconfig.h =================================================================== RCS file: /cvsroot/python/python/dist/src/acconfig.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** acconfig.h 2000/09/19 00:46:45 1.38 --- acconfig.h 2000/10/09 17:01:03 1.39 *************** *** 23,32 **** #undef clock_t - /* Used for BeOS configuration */ - #undef DL_EXPORT_HEADER - #ifdef DL_EXPORT_HEADER - #include DL_EXPORT_HEADER - #endif - /* Define if getpgrp() must be called as getpgrp(0). */ #undef GETPGRP_HAVE_ARG --- 23,26 ---- From python-dev@python.org Mon Oct 9 18:06:17 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 10:06:17 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.168,1.169 configure,1.159,1.160 Message-ID: <200010091706.KAA17002@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv16929 Modified Files: configure.in configure Log Message: Donn Cave : Update for BeOS. This closes SourceForge patch #101774. Also fix typo in a comment. Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -r1.168 -r1.169 *** configure.in 2000/10/07 16:21:27 1.168 --- configure.in 2000/10/09 17:06:13 1.169 *************** *** 118,134 **** without_gcc=;; BeOS*) - # Dunno if it's a good idea to get this over with all at once, or - # to handle it in with the other goodies. - MACHDEP=beos - case $BE_HOST_CPU in ppc) ! CC="mwcc -I$PWD/BeOS -nodup" without_gcc=yes ! case `uname -r` in ! 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;; ! *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;; ! esac ! CCSHARED=-UUSE_DL_EXPORT LDFLAGS="$LDFLAGS -nodup" --- 118,127 ---- without_gcc=;; BeOS*) case $BE_HOST_CPU in ppc) ! CC=mwcc without_gcc=yes ! OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma" ! CCSHARED="UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" LDFLAGS="$LDFLAGS -nodup" *************** *** 139,154 **** ;; x86) ! CC="gcc -I$PWD/BeOS" without_gcc=no ! OPT="-DUSE_DL_EXPORT -O" ! CCSHARED=-UUSE_DL_EXPORT ! AR="$PWD/BeOS/ar-fake" RANLIB=: - - AC_DEFINE(DL_EXPORT_HEADER,"dl_export.h") ;; *) ! AC_ERROR(Your BeOS system isn't PowerPC or x86... neat, but this won't work...) ;; esac --- 132,144 ---- ;; x86) ! CC=gcc without_gcc=no ! OPT=-O ! # Really should use srcdir instead of PWD AR="$PWD/BeOS/ar-fake" RANLIB=: ;; *) ! AC_ERROR(Unknown BeOS platform \"$BE_HOST_CPU\") ;; esac *************** *** 221,228 **** cc|*/cc) CC="$CC -Ae";; esac;; - BeOS*) - case $CC in - cc) CC=cc;; - esac;; Monterey*) case $CC in --- 211,214 ---- *************** *** 240,244 **** # LINKCC is the command that links the python executable -- default is $(CC). ! # This is altered for AIX and BeOS in order to build the export list before # linking. AC_SUBST(LINKCC) --- 226,230 ---- # LINKCC is the command that links the python executable -- default is $(CC). ! # This is altered for AIX in order to build the export list before # linking. AC_SUBST(LINKCC) *************** *** 253,259 **** AIX*) LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; - BeOS*) - LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)" - LDLIBRARY='libpython$(VERSION).so';; dgux*) LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; --- 239,242 ---- *************** *** 275,283 **** # DG/UX requires some fancy ld contortions to produce a .so from an .a ! if test "$MACHDEP" = "dguxR4" ! then ! LDLIBRARY='libpython$(VERSION).so' ! OPT="$OPT -pic" ! fi AC_MSG_RESULT($LDLIBRARY) --- 258,270 ---- # DG/UX requires some fancy ld contortions to produce a .so from an .a ! case $MACHDEP in ! dguxR4) ! LDLIBRARY='libpython$(VERSION).so' ! OPT="$OPT -pic" ! ;; ! beos*) ! LDLIBRARY='libpython$(VERSION).so' ! ;; ! esac AC_MSG_RESULT($LDLIBRARY) *************** *** 842,846 **** fi else ! # make sure user knows why bsddb support wasn't enabled event # though s/he requested it if test "$with_libdb" = "yes" --- 829,833 ---- fi else ! # make sure user knows why bsddb support wasn't enabled even # though s/he requested it if test "$with_libdb" = "yes" Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.159 retrieving revision 1.160 diff -C2 -r1.159 -r1.160 *** configure 2000/10/07 16:21:27 1.159 --- configure 2000/10/09 17:06:13 1.160 *************** *** 4,8 **** # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 4,8 ---- # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. [...4700 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) --- 6022,6026 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6316,6319 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 6326,6329 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 From python-dev@python.org Mon Oct 9 19:08:59 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 11:08:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.3,1.4 Message-ID: <200010091808.LAA09166@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv9070 Modified Files: ACKS Log Message: Another name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ACKS 2000/10/06 21:00:40 1.3 --- ACKS 2000/10/09 18:08:56 1.4 *************** *** 100,103 **** --- 100,104 ---- Koray Oner Denis S. Otkidach + William Park Tim Peters Christopher Petrilli From python-dev@python.org Mon Oct 9 19:11:27 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 11:11:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib lib.tex,1.166,1.167 Message-ID: <200010091811.LAA12565@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12474/lib Modified Files: lib.tex Log Message: Push xmllib to the end of the markup chapter since it is deprecated. Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -r1.166 -r1.167 *** lib.tex 2000/09/25 18:25:46 1.166 --- lib.tex 2000/10/09 18:11:24 1.167 *************** *** 234,240 **** \input{libsgmllib} \input{libhtmllib} - \input{libxmllib} \input{libpyexpat} \input{xmlsax} \input{libmm} % Multimedia Services --- 234,240 ---- \input{libsgmllib} \input{libhtmllib} \input{libpyexpat} \input{xmlsax} + \input{libxmllib} \input{libmm} % Multimedia Services From python-dev@python.org Mon Oct 9 19:12:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 11:12:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libfnmatch.tex,1.16,1.17 libglob.tex,1.11,1.12 Message-ID: <200010091812.LAA14513@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv14415/lib Modified Files: libfnmatch.tex libglob.tex Log Message: Work around annoyances in LaTeX2HTML. Index: libfnmatch.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfnmatch.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** libfnmatch.tex 2000/04/03 20:13:53 1.16 --- libfnmatch.tex 2000/10/09 18:12:29 1.17 *************** *** 3,7 **** \declaremodule{standard}{fnmatch} ! \modulesynopsis{\UNIX{} shell style filename pattern matching.} --- 3,7 ---- \declaremodule{standard}{fnmatch} ! \modulesynopsis{\UNIX\ shell style filename pattern matching.} Index: libglob.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libglob.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** libglob.tex 1999/03/16 16:40:01 1.11 --- libglob.tex 2000/10/09 18:12:29 1.12 *************** *** 3,7 **** \declaremodule{standard}{glob} ! \modulesynopsis{\UNIX{} shell style pathname pattern expansion.} --- 3,7 ---- \declaremodule{standard}{glob} ! \modulesynopsis{\UNIX\ shell style pathname pattern expansion.} From python-dev@python.org Mon Oct 9 19:26:45 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 11:26:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.71,1.72 Message-ID: <200010091826.LAA03029@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv2615 Modified Files: NEWS Log Message: Summary of changes between 2.0b2 and 2.0c1 Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -r1.71 -r1.72 *** NEWS 2000/10/02 13:43:33 1.71 --- NEWS 2000/10/09 18:26:42 1.72 *************** *** 1,3 **** ! What's New in Python 2.0b2? =========================== --- 1,3 ---- ! What's New in Python 2.0c1? =========================== *************** *** 15,18 **** --- 15,141 ---- ====================================================================== + What's new in 2.0 release candidate 1 (since beta 2)? + ===================================================== + + All the changes since the last beta release are bug fixes or changes + to build support for specific platforms. + + Core language, builtins, and interpreter + + - A bug that caused crashes when __coerce__ was used with augmented + assignment, e.g. +=, was fixed. + + - Raise ZeroDivisionError when raising zero to a negative number, + e.g. 0.0 ** -2.0. Note that math.pow is unrelated to the builtin + power operator and the result of math.pow(0.0, -2.0) will vary by + platform. On Linux, it raises a ValueError. + + - A bug in Unicode string interpolation was fixed that occasionally + caused errors with formats including "%%". For example, the + following expression "%% %s" % u"abc" no longer raises a TypeError. + + - Compilation of deeply nested expressions raises MemoryError instead + of SyntaxError, e.g. eval("[" * 50 + "]" * 50). + + - In 2.0b2 on Windows, the interpreter wrote .pyc files in text mode, + rendering them useless. They are now written in binary mode again. + + Standard library + + - Keyword arguments are now accepted for most pattern and match object + methods in SRE, the standard regular expression engine. + + - In SRE, fix error with negative lookahead and lookbehind that + manifested itself as a runtime error in patterns like "? Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv1974 Modified Files: ACKS Log Message: new name Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -r1.64 -r1.65 *** ACKS 2000/10/02 14:52:31 1.64 --- ACKS 2000/10/09 18:26:16 1.65 *************** *** 48,51 **** --- 48,52 ---- Gary S. Brown Oleg Broytmann + Stan Bubrouski Erik de Bueger Jan-Hein B"uhrman From python-dev@python.org Mon Oct 9 19:34:16 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 11:34:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.72,1.73 Message-ID: <200010091834.LAA14398@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv13883 Modified Files: NEWS Log Message: added better description of BeOS changes from Donn Cave Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -r1.72 -r1.73 *** NEWS 2000/10/09 18:26:42 1.72 --- NEWS 2000/10/09 18:34:12 1.73 *************** *** 125,130 **** platform. ! - BeOS: Many changes were made to support compilation on BeOS 4.5 and ! 5.0. - Cygwin: Support for shared libraries, Tkinter, and sockets. --- 125,135 ---- platform. ! - BeOS: A number of changes were made to the build and installation ! process. ar-fake now operates on a directory of object files. ! dl_export.h is gone, and its macros now appear on the mwcc command ! line during build on PPC BeOS. ! ! Platform directory in lib/python2.0 is "plat-beos5" (or ! "plat-beos4", if building on BeOS 4.5), rather than "plat-beos". - Cygwin: Support for shared libraries, Tkinter, and sockets. From python-dev@python.org Mon Oct 9 19:56:29 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 11:56:29 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/html Makefile,1.38,1.39 Message-ID: <200010091856.LAA12363@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/html In directory slayer.i.sourceforge.net:/tmp/cvs-serv12235 Modified Files: Makefile Log Message: Do not forget to build the acks.html file when building "all"! Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/html/Makefile,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** Makefile 2000/10/05 05:16:56 1.38 --- Makefile 2000/10/09 18:56:23 1.39 *************** *** 38,42 **** ! all: $(INDEXFILES) index.html modindex.html .PHONY: api ext lib mac ref tut inst dist --- 38,42 ---- ! all: $(INDEXFILES) index.html modindex.html acks.html .PHONY: api ext lib mac ref tut inst dist From python-dev@python.org Mon Oct 9 20:19:06 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 12:19:06 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html index.html,1.4,1.5 Message-ID: <200010091919.MAA00997@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv884 Modified Files: index.html Log Message: Add pointer to development version of the documenatation. Index: index.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/index.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** index.html 2000/07/24 19:19:43 1.4 --- index.html 2000/10/09 19:18:55 1.5 *************** *** 25,28 **** --- 25,30 ---- Python Language Website - Documentation, Downloads, News and lots of other resources for the Python language.
+ Development + version of the documentation - Straight from Fred's working files.
PythonLabs.com - Python's core development team and its plans for Python development.
From python-dev@python.org Mon Oct 9 20:21:09 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 12:21:09 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html index.html,1.5,1.6 Message-ID: <200010091921.MAA02836@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv2771 Modified Files: index.html Log Message: And let us not include typos! Index: index.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/index.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** index.html 2000/10/09 19:18:55 1.5 --- index.html 2000/10/09 19:21:06 1.6 *************** *** 25,29 **** Python Language Website - Documentation, Downloads, News and lots of other resources for the Python language.
! Development version of the documentation - Straight from Fred's working files.
PythonLabs.com - Python's core development --- 25,29 ---- Python Language Website - Documentation, Downloads, News and lots of other resources for the Python language.
! Development version of the documentation - Straight from Fred's working files.
PythonLabs.com - Python's core development From python-dev@python.org Mon Oct 9 20:29:38 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 12:29:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.65,1.66 Message-ID: <200010091929.MAA11318@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv11258 Modified Files: ACKS Log Message: One more name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -r1.65 -r1.66 *** ACKS 2000/10/09 18:26:16 1.65 --- ACKS 2000/10/09 19:29:35 1.66 *************** *** 266,269 **** --- 266,270 ---- Nigel O'Brian Tim O'Malley + Denis S. Otkidach Piet van Oostrum Jason Orendorff From python-dev@python.org Mon Oct 9 20:31:48 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 12:31:48 -0700 Subject: [Python-checkins] CVS: python/dist/src Makefile.in,1.105,1.106 Message-ID: <200010091931.MAA13265@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv13186 Modified Files: Makefile.in Log Message: For Darwin, export EXE (needed by Lib/plat-generic/regen checkin, to follow). Adapted from a patch by Tony Lownds. (#101816) Index: Makefile.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.in,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -r1.105 -r1.106 *** Makefile.in 2000/10/09 16:51:49 1.105 --- Makefile.in 2000/10/09 19:31:40 1.106 *************** *** 337,340 **** --- 337,341 ---- export PATH; PATH="`pwd`:$$PATH"; \ export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ + export EXE; EXE="$(EXE)"; \ cd $(srcdir)/Lib/$(PLATDIR); ./regen From python-dev@python.org Mon Oct 9 20:34:19 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 12:34:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-generic regen,1.2,1.3 Message-ID: <200010091934.MAA14589@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/plat-generic In directory slayer.i.sourceforge.net:/tmp/cvs-serv14512 Modified Files: regen Log Message: Use python$EXE instead of python, for Darwin. (Patch by Tony Lownds. (#101816) [Note: I'm not sure that this is really the right fix. Surely Darwin doesn't require you to say "python.exe" everywhere??? Even Windows doesn't! Or am I misunderstanding the point?] Index: regen =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-generic/regen,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** regen 1996/08/08 18:25:40 1.2 --- regen 2000/10/09 19:34:12 1.3 *************** *** 1,6 **** #! /bin/sh set -v ! python ../../Tools/scripts/h2py.py /usr/include/fcntl.h ! python ../../Tools/scripts/h2py.py /usr/include/sys/socket.h ! python ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h ! python ../../Tools/scripts/h2py.py /usr/include/termios.h --- 1,6 ---- #! /bin/sh set -v ! python$EXE ../../Tools/scripts/h2py.py /usr/include/fcntl.h ! python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/socket.h ! python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h ! python$EXE ../../Tools/scripts/h2py.py /usr/include/termios.h From python-dev@python.org Mon Oct 9 20:48:14 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 12:48:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.73,1.74 Message-ID: <200010091948.MAA27959@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv27872 Modified Files: NEWS Log Message: typo Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -r1.73 -r1.74 *** NEWS 2000/10/09 18:34:12 1.73 --- NEWS 2000/10/09 19:48:11 1.74 *************** *** 47,51 **** - In SRE, fix error with negative lookahead and lookbehind that ! manifested itself as a runtime error in patterns like "? Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv30998 Modified Files: ACKS Log Message: And another. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -r1.66 -r1.67 *** ACKS 2000/10/09 19:29:35 1.66 --- ACKS 2000/10/09 19:52:41 1.67 *************** *** 222,225 **** --- 222,226 ---- Martin von Löwis Anne Lord + Tony Lownds Ray Loyzaga Fredrik Lundh From python-dev@python.org Mon Oct 9 20:52:38 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 12:52:38 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.169,1.170 configure,1.160,1.161 Message-ID: <200010091952.MAA30973@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv27449 Modified Files: configure.in configure Log Message: Checking in three Darwin-specific patches. Tony Lownds: [ Patch #101816 ] Fixes shared modules on Mac OS X 1. Mac OS X is recognized by the Next-ish host recognition code as "Darwin/1.2" 2. When specifying just --with-dyld, modules can compile as shared 3. --with-dyld and --with-next-framework, modules can compile as shared 4. --with-suffix=.exe, and Lib/plat-darwin1.2 is being made, the regen script invokes python as python.exe [I had to reformat this patch a bit to make it work. Please test!] Dan Wolfe: [ Patch #101823 ] Fix Darwin POSIX Thread redefinition The patch below fixes the redefinition problem in Darwin with _POSIX_THREADS. I'm not sure if this is the correct long term fix but for now it fixes the problem and the fix is specific to Darwin. Dan Wolfe: [ Patch #101824 ] On Darwin, remove unrecognized option `-OPT:Olimit=0' After many, many, many compiles, I finally got itchy of this warning cluttering up the output... so I scratched (Darwin configs only) and it's gone! :-) Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.169 retrieving revision 1.170 diff -C2 -r1.169 -r1.170 *** configure.in 2000/10/09 17:06:13 1.169 --- configure.in 2000/10/09 19:52:35 1.170 *************** *** 342,346 **** AC_MSG_RESULT($ac_cv_opt_olimit_ok) if test $ac_cv_opt_olimit_ok = yes; then ! OPT="$OPT -OPT:Olimit=0" else AC_MSG_CHECKING(whether $CC accepts -Olimit 1500) --- 342,349 ---- AC_MSG_RESULT($ac_cv_opt_olimit_ok) if test $ac_cv_opt_olimit_ok = yes; then ! case $ac_sys_system in ! Darwin*) OPT="$OPT" ;; ! *) OPT="$OPT -OPT:Olimit=0";; ! esac else AC_MSG_CHECKING(whether $CC accepts -Olimit 1500) *************** *** 494,497 **** --- 497,503 ---- AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in + Darwin/*) + ns_undef_sym='_environ' + LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;; next/4*) ns_undef_sym='__environ' *************** *** 569,573 **** Darwin/*|next/*) if test "$ns_dyld" ! then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi --- 575,583 ---- Darwin/*|next/*) if test "$ns_dyld" ! then ! if test "$ac_sys_system" = Darwin ! then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress' ! else LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' ! fi else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi *************** *** 640,643 **** --- 650,654 ---- # loading of any modules which reference it in System.framework next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;; + Darwin/*) LINKFORSHARED="-framework System" ;; SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; *************** *** 762,766 **** LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD) ! AC_DEFINE(_POSIX_THREADS) LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD) --- 773,780 ---- LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD) ! case $ac_sys_system in ! Darwin*) ;; ! *) AC_DEFINE(_POSIX_THREADS);; ! esac LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD) *************** *** 912,916 **** BeOS*) DYNLOADFILE="dynload_beos.o";; hp*|HP*) DYNLOADFILE="dynload_hpux.o";; ! next/*) DYNLOADFILE="dynload_next.o";; *) # use dynload_shlib.c and dlopen() if we have it; otherwise stub --- 926,930 ---- BeOS*) DYNLOADFILE="dynload_beos.o";; hp*|HP*) DYNLOADFILE="dynload_hpux.o";; ! Darwin/*|next/*) DYNLOADFILE="dynload_next.o";; *) # use dynload_shlib.c and dlopen() if we have it; otherwise stub Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.160 retrieving revision 1.161 diff -C2 -r1.160 -r1.161 *** configure 2000/10/09 17:06:13 1.160 --- configure 2000/10/09 19:52:35 1.161 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.168 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...4375 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) --- 6010,6014 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6326,6329 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 --- 6314,6317 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 From python-dev@python.org Mon Oct 9 20:57:42 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 12:57:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.9,1.10 Message-ID: <200010091957.MAA02566@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv2487 Modified Files: test_minidom.py Log Message: Move the test for confirmation that all nodes have been freed into the driver code, so that each test gets this; it had been done inconsistently. Remove the lines that set the variables holding dom objects to None; not needed since the interpreter cleans up locals on function return. Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** test_minidom.py 2000/10/06 22:42:54 1.9 --- test_minidom.py 2000/10/09 19:57:38 1.10 *************** *** 36,41 **** dom.documentElement.getElementsByTagName( "LI" ) ) dom.unlink() - dom=None - confirm (len( Node.allnodes )==0) def testInsertBefore( ): --- 36,39 ---- *************** *** 51,57 **** #confirm( docel.childNodes[2].tet=="a" ) dom.unlink() - del dom - del docel - confirm( len( Node.allnodes )==0) def testAppendChild(): --- 49,52 ---- *************** *** 61,66 **** confirm( dom.documentElement.childNodes[-1].data=="Hello" ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testNonZero(): --- 56,59 ---- *************** *** 70,81 **** confirm( not dom.childNodes[-1].childNodes ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testUnlink(): dom=parse( tstfile ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testElement(): --- 63,70 ---- *************** *** 84,89 **** confirm( dom.documentElement ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testAAA(): --- 73,76 ---- *************** *** 92,96 **** el.setAttribute( "spam", "jam2" ) dom.unlink() - dom=None def testAAB(): --- 79,82 ---- *************** *** 100,104 **** el.setAttribute( "spam", "jam2" ) dom.unlink() - dom=None def testAddAttr(): --- 86,89 ---- *************** *** 121,128 **** confirm( len( child.attributes )==2 ) - dom.unlink() - dom=None - child=None def testDeleteAttr(): --- 106,110 ---- *************** *** 136,140 **** confirm( len( child.attributes)==0 ) dom.unlink() - confirm( len( Node.allnodes )==0 ) def testRemoveAttr(): --- 118,121 ---- *************** *** 161,165 **** dom.unlink() - dom=None def testRemoveAttributeNode(): --- 142,145 ---- *************** *** 173,178 **** dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testChangeAttr(): --- 153,156 ---- *************** *** 190,195 **** confirm( len( el.attributes )==2 ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testGetAttrList(): --- 168,171 ---- *************** *** 237,240 **** --- 213,217 ---- confirm( string1.find("slash:abc" )!=-1 ) dom.unlink() + confirm( len( Node.allnodes )==0 ) def testAttributeRepr(): *************** *** 244,247 **** --- 221,225 ---- confirm( str( node ) == repr( node ) ) dom.unlink() + confirm( len( Node.allnodes )==0 ) def testTextNodeRepr(): pass *************** *** 253,256 **** --- 231,235 ---- dom.unlink() confirm(str == domstr) + confirm( len( Node.allnodes )==0 ) def testProcessingInstruction(): pass *************** *** 342,345 **** --- 321,326 ---- func() print "Test Succeeded", name + confirm(len(Node.allnodes) == 0, + "assertion: len(Node.allnodes) == 0") if len( Node.allnodes ): print "Garbage left over:" From python-dev@python.org Mon Oct 9 20:57:42 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 12:57:42 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,1.6,1.7 Message-ID: <200010091957.MAA02570@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv2487/output Modified Files: test_minidom Log Message: Move the test for confirmation that all nodes have been freed into the driver code, so that each test gets this; it had been done inconsistently. Remove the lines that set the variables holding dom objects to None; not needed since the interpreter cleans up locals on function return. Index: test_minidom =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_minidom,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_minidom 2000/10/06 22:42:55 1.6 --- test_minidom 2000/10/09 19:57:39 1.7 *************** *** 1,5 **** --- 1,7 ---- test_minidom Test Succeeded testAAA + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAAB + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test *************** *** 11,30 **** Passed Test Test Succeeded testAddAttr Passed Test Passed Test - Passed Test Test Succeeded testAppendChild Test Succeeded testAttrListItem Test Succeeded testAttrListItemNS Test Succeeded testAttrListItems Test Succeeded testAttrListKeys Test Succeeded testAttrListKeysNS Test Succeeded testAttrListLength Test Succeeded testAttrListValues Test Succeeded testAttrList__getitem__ Test Succeeded testAttrList__setitem__ Passed Test - Test Succeeded testAttributeRepr Passed Test Passed Test Passed Test --- 13,43 ---- Passed Test Test Succeeded testAddAttr + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testAppendChild + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListItem + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListItemNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListItems + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListKeys + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListKeysNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListLength + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrListValues + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrList__getitem__ + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testAttrList__setitem__ + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test + Test Succeeded testAttributeRepr + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test *************** *** 33,108 **** Passed Test Test Succeeded testChangeAttr Test Succeeded testChildNodes Test Succeeded testCloneAttributeDeep Test Succeeded testCloneAttributeShallow Test Succeeded testCloneDocumentDeep Test Succeeded testCloneDocumentShallow Test Succeeded testCloneElementDeep Test Succeeded testCloneElementShallow Test Succeeded testCloneElementShallowCopiesAttributes Test Succeeded testClonePIDeep Test Succeeded testClonePIShallow Test Succeeded testComment Test Succeeded testCreatAttributeNS Test Succeeded testCreateElementNS Passed Test Passed Test Passed Test - Passed Test Test Succeeded testDeleteAttr Test Succeeded testDocumentElement ! Passed Test Passed Test Test Succeeded testElement Passed Test Test Succeeded testElementReprAndStr Test Succeeded testFirstChild Test Succeeded testGetAttrLength Test Succeeded testGetAttrList Test Succeeded testGetAttrValues Test Succeeded testGetAttribute Test Succeeded testGetAttributeNS Test Succeeded testGetAttributeNode ! Passed Test Passed Test Test Succeeded testGetElementsByTagName Test Succeeded testGetElementsByTagNameNS Test Succeeded testGetEmptyNodeListFromElementsByTagNameNS Test Succeeded testHasChildNodes ! Passed Test Test Succeeded testInsertBefore ! Passed Test Passed Test Passed Test Test Succeeded testNonZero Test Succeeded testParse Test Succeeded testParseAttributeNamespaces Test Succeeded testParseAttributes Test Succeeded testParseElement Test Succeeded testParseElementNamespaces Passed Test Test Succeeded testParseFromFile Test Succeeded testParseProcessingInstructions Test Succeeded testParseString Test Succeeded testProcessingInstruction Test Succeeded testProcessingInstructionRepr Passed Test Passed Test Test Succeeded testRemoveAttr Passed Test Passed Test Test Succeeded testRemoveAttrNS ! Passed Test Passed Test Passed Test Test Succeeded testRemoveAttributeNode Test Succeeded testSetAttrValueandNodeValue Test Succeeded testTextNodeRepr Test Succeeded testTextRepr Test Succeeded testTooManyDocumentElements ! Passed Test Test Succeeded testUnlink Test Succeeded testWriteText Passed Test Test Succeeded testWriteXML All tests succeeded --- 46,166 ---- Passed Test Test Succeeded testChangeAttr + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testChildNodes + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneAttributeDeep + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneAttributeShallow + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneDocumentDeep + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneDocumentShallow + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneElementDeep + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneElementShallow + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCloneElementShallowCopiesAttributes + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testClonePIDeep + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testClonePIShallow + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testComment + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCreatAttributeNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testCreateElementNS + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Passed Test Test Succeeded testDeleteAttr + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testDocumentElement ! Passed assertion: len(Node.allnodes) == 0 Passed Test Test Succeeded testElement + Passed assertion: len(Node.allnodes) == 0 Passed Test Test Succeeded testElementReprAndStr + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testFirstChild + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttrLength + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttrList + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttrValues + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttribute + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttributeNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetAttributeNode ! Passed assertion: len(Node.allnodes) == 0 Passed Test Test Succeeded testGetElementsByTagName + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetElementsByTagNameNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testGetEmptyNodeListFromElementsByTagNameNS + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testHasChildNodes ! Passed assertion: len(Node.allnodes) == 0 Test Succeeded testInsertBefore ! Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testNonZero + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParse + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseAttributeNamespaces + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseAttributes + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseElement + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseElementNamespaces + Passed assertion: len(Node.allnodes) == 0 Passed Test Test Succeeded testParseFromFile + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseProcessingInstructions + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParseString + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testProcessingInstruction + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testProcessingInstructionRepr + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testRemoveAttr + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testRemoveAttrNS ! Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testRemoveAttributeNode + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testSetAttrValueandNodeValue + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testTextNodeRepr + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testTextRepr + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testTooManyDocumentElements ! Passed assertion: len(Node.allnodes) == 0 Test Succeeded testUnlink + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testWriteText + Passed assertion: len(Node.allnodes) == 0 + Passed Test Passed Test Test Succeeded testWriteXML + Passed assertion: len(Node.allnodes) == 0 All tests succeeded From python-dev@python.org Mon Oct 9 21:01:56 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 13:01:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib wave.py,1.11,1.12 Message-ID: <200010092001.NAA05652@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv5581 Modified Files: wave.py Log Message: Fix by Jean-Claude Rimbault [ Bug #116271 ] -- the WAVE header was never written properly because the '4' length indicators for the 's' format characters were missing. Index: wave.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/wave.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** wave.py 2000/08/17 04:45:13 1.11 --- wave.py 2000/10/09 20:01:53 1.12 *************** *** 440,444 **** self._datalength = self._nframes * self._nchannels * self._sampwidth self._form_length_pos = self._file.tell() ! self._file.write(struct.pack(' Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv7792/Lib/xml/dom Modified Files: minidom.py Log Message: Paul Prescod : Correct the chaining between siblings. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** minidom.py 2000/10/07 19:03:20 1.10 --- minidom.py 2000/10/09 20:04:16 1.11 *************** *** 103,106 **** --- 103,113 ---- def appendChild(self, node): + if self.childNodes: + last = self.lastChild + node.previousSibling = last + last.nextSibling = node + else: + node.previousSibling = None + node.nextSibling = None self.childNodes.append(node) return node From python-dev@python.org Mon Oct 9 21:06:04 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 13:06:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_wave.py,NONE,1.1 Message-ID: <200010092006.NAA09391@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv9355 Added Files: test_wave.py Log Message: Simple test suite for wave.py by Jean-Claude Rimbault (with some changes to avoid using assert). --- NEW FILE --- from test_support import TestFailed import os, tempfile import wave def check(t, msg=None): if not t: raise TestFailed, msg nchannels = 2 sampwidth = 2 framerate = 8000 nframes = 100 testfile = tempfile.mktemp() f = wave.open(testfile, 'w') f.setnchannels(nchannels) f.setsampwidth(sampwidth) f.setframerate(framerate) f.setnframes(nframes) output = '\0' * nframes * nchannels * sampwidth f.writeframes(output) f.close() f = wave.open(testfile, 'r') check(nchannels == f.getnchannels(), "nchannels") check(sampwidth == f.getsampwidth(), "sampwidth") check(framerate == f.getframerate(), "framerate") check(nframes == f.getnframes(), "nframes") input = f.readframes(nframes) check(input == output, "data") f.close() os.remove(testfile) From python-dev@python.org Mon Oct 9 21:06:53 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 13:06:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_wave,NONE,1.1 Message-ID: <200010092006.NAA10271@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv10211 Added Files: test_wave Log Message: wave test output --- NEW FILE --- test_wave From python-dev@python.org Mon Oct 9 21:07:02 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 13:07:02 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.67,1.68 Message-ID: <200010092007.NAA10443@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv10369 Modified Files: ACKS Log Message: WAVE test + bugfix contributor. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -r1.67 -r1.68 *** ACKS 2000/10/09 19:52:41 1.67 --- ACKS 2000/10/09 20:07:00 1.68 *************** *** 295,298 **** --- 295,299 ---- Jan Pieter Riegel Nicholas Riley + Jean-Claude Rimbault Andy Robinson Jim Robinson From python-dev@python.org Mon Oct 9 21:18:36 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 13:18:36 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.170,1.171 configure,1.161,1.162 Message-ID: <200010092018.NAA19234@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv19170 Modified Files: configure.in configure Log Message: Remove macro that mentions DL_EXPORT_HEADER; it caused a spurious warning from autoheader and is not useful anymore. (Approved by Donn Cave.) Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.170 retrieving revision 1.171 diff -C2 -r1.170 -r1.171 *** configure.in 2000/10/09 19:52:35 1.170 --- configure.in 2000/10/09 20:18:32 1.171 *************** *** 128,133 **** AR="$PWD/BeOS/ar-fake" RANLIB=: - - AC_DEFINE(DL_EXPORT_HEADER,"dl_export.h") ;; x86) --- 128,131 ---- Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.161 retrieving revision 1.162 diff -C2 -r1.161 -r1.162 *** configure 2000/10/09 19:52:35 1.161 --- configure 2000/10/09 20:18:32 1.162 *************** *** 4,8 **** # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 4,8 ---- # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. [...4600 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) --- 6031,6035 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6314,6317 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 6335,6338 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 From python-dev@python.org Mon Oct 9 21:22:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 13:22:32 -0700 Subject: [Python-checkins] CVS: python/dist/src config.h.in,2.76,2.77 Message-ID: <200010092022.NAA22175@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv22097 Modified Files: config.h.in Log Message: Another generated file... Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.76 retrieving revision 2.77 diff -C2 -r2.76 -r2.77 *** config.h.in 2000/10/09 17:01:03 2.76 --- config.h.in 2000/10/09 20:22:28 2.77 *************** *** 267,273 **** #undef SIZEOF_VOID_P - /* Define if you have the _getpty function. */ - #undef HAVE__GETPTY - /* Define if you have the alarm function. */ #undef HAVE_ALARM --- 267,270 ---- *************** *** 357,360 **** --- 354,360 ---- #undef HAVE_GETPID + /* Define if you have the _getpty function. */ + #undef HAVE__GETPTY + /* Define if you have the getpwent function. */ #undef HAVE_GETPWENT *************** *** 516,527 **** #undef HAVE_WAITPID ! /* Define if you have the header file. */ ! #undef HAVE_DB_H /* Define if you have the header file. */ #undef HAVE_DB1_NDBM_H ! /* Define if you have the header file. */ ! #undef HAVE_DB_185_H /* Define if you have the header file. */ --- 516,527 ---- #undef HAVE_WAITPID ! /* Define if you have the header file. */ ! #undef HAVE_DB_185_H /* Define if you have the header file. */ #undef HAVE_DB1_NDBM_H ! /* Define if you have the header file. */ ! #undef HAVE_DB_H /* Define if you have the header file. */ From python-dev@python.org Mon Oct 9 22:19:35 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 9 Oct 2000 14:19:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.74,1.75 Message-ID: <200010092119.OAA06892@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv6317/python/dist/src/misc Modified Files: NEWS Log Message: Repaired IDLE Unicode bug description. Added tokenize.py bugfix info. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -r1.74 -r1.75 *** NEWS 2000/10/09 19:48:11 1.74 --- NEWS 2000/10/09 21:19:31 1.75 *************** *** 80,83 **** --- 80,86 ---- - The binascii module is now enabled on Win64. + - tokenize.py no longer suffers "recursion depth" errors when parsing + programs with very long string literals. + Internals *************** *** 141,146 **** - Removed debugging prints from main used with freeze. ! - IDLE auto-indent internals no longer crashes when it encounters ! Unicode characters in the range 128 to 255. What's new in 2.0 beta 2 (since beta 1)? --- 144,149 ---- - Removed debugging prints from main used with freeze. ! - IDLE auto-indent no longer crashes when it encounters Unicode ! characters. What's new in 2.0 beta 2 (since beta 1)? From python-dev@python.org Mon Oct 9 22:26:16 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 9 Oct 2000 14:26:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/BeOS dl_export.h,1.3,NONE Message-ID: <200010092126.OAA12625@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/BeOS In directory slayer.i.sourceforge.net:/tmp/cvs-serv12571 Removed Files: dl_export.h Log Message: This file is no longer used. --- dl_export.h DELETED --- From python-dev@python.org Mon Oct 9 22:27:25 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 14:27:25 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.75,1.76 Message-ID: <200010092127.OAA13565@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv13332/Misc Modified Files: NEWS Log Message: add note explaining what a release candidate is Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -r1.75 -r1.76 *** NEWS 2000/10/09 21:19:31 1.75 --- NEWS 2000/10/09 21:27:22 1.76 *************** *** 18,21 **** --- 18,31 ---- ===================================================== + What is release candidate 1? + + We believe that release candidate 1 will fix all known bugs that we + intend to fix for the 2.0 final release. This release should be a bit + more stable than the previous betas. We would like to see even more + widespread testing before the final release, so we are producing this + release candidate. The final release will be exactly the same unless + any show-stopping (or brown bag) bugs are found by testers of the + release candidate. + All the changes since the last beta release are bug fixes or changes to build support for specific platforms. From python-dev@python.org Mon Oct 9 22:34:54 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 14:34:54 -0700 Subject: [Python-checkins] CVS: python/dist/src README,1.102,1.103 Message-ID: <200010092134.OAA19556@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv19406 Modified Files: README Log Message: the usual Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -r1.102 -r1.103 *** README 2000/10/06 01:58:48 1.102 --- README 2000/10/09 21:34:51 1.103 *************** *** 1,4 **** ! This is Python version 2.0 beta 2 ! ================================= Copyright (c) 2000 BeOpen.com. --- 1,4 ---- ! This is Python version 2.0 release candidate 1 ! ============================================== Copyright (c) 2000 BeOpen.com. From python-dev@python.org Mon Oct 9 22:48:07 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 9 Oct 2000 14:48:07 -0700 Subject: [Python-checkins] CVS: python/dist/src config.h.in,2.77,2.78 configure,1.162,1.163 Message-ID: <200010092148.OAA30728@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv30575 Modified Files: config.h.in configure Log Message: The Usual. Index: config.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/config.h.in,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -r2.77 -r2.78 *** config.h.in 2000/10/09 20:22:28 2.77 --- config.h.in 2000/10/09 21:48:02 2.78 *************** *** 267,270 **** --- 267,273 ---- #undef SIZEOF_VOID_P + /* Define if you have the _getpty function. */ + #undef HAVE__GETPTY + /* Define if you have the alarm function. */ #undef HAVE_ALARM *************** *** 354,360 **** #undef HAVE_GETPID - /* Define if you have the _getpty function. */ - #undef HAVE__GETPTY - /* Define if you have the getpwent function. */ #undef HAVE_GETPWENT --- 357,360 ---- *************** *** 516,527 **** #undef HAVE_WAITPID ! /* Define if you have the header file. */ ! #undef HAVE_DB_185_H /* Define if you have the header file. */ #undef HAVE_DB1_NDBM_H ! /* Define if you have the header file. */ ! #undef HAVE_DB_H /* Define if you have the header file. */ --- 516,527 ---- #undef HAVE_WAITPID ! /* Define if you have the header file. */ ! #undef HAVE_DB_H /* Define if you have the header file. */ #undef HAVE_DB1_NDBM_H ! /* Define if you have the header file. */ ! #undef HAVE_DB_185_H /* Define if you have the header file. */ Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.162 retrieving revision 1.163 diff -C2 -r1.162 -r1.163 *** configure 2000/10/09 20:18:32 1.162 --- configure 2000/10/09 21:48:02 1.163 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.170 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...4118 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) --- 6005,6009 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6335,6338 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 --- 6309,6312 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 From python-dev@python.org Mon Oct 9 23:14:48 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 9 Oct 2000 15:14:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 test_cfg.py,NONE,1.1 test_imp.py,NONE,1.1 test_wav.py,NONE,1.1 configpa.py,1.9,1.10 mimetool.py,1.7,1.8 posixpat.py,1.12,1.13 sre_comp.py,1.6,1.7 sre_cons.py,1.4,1.5 sre_pars.py,1.7,1.8 stringio.py,1.5,1.6 test_cla.py,1.1,1.2 test_lin.py,1.2,1.3 test_min.py,1.2,1.3 test_str.py,1.11,1.12 test_uni.py,1.3,1.4 test_url.py,1.2,1.3 test_win.py,1.4,1.5 userlist.py,1.9,1.10 webbrows.py,1.3,1.4 Message-ID: <200010092214.PAA16993@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv16830 Modified Files: configpa.py mimetool.py posixpat.py sre_comp.py sre_cons.py sre_pars.py stringio.py test_cla.py test_lin.py test_min.py test_str.py test_uni.py test_url.py test_win.py userlist.py webbrows.py Added Files: test_cfg.py test_imp.py test_wav.py Log Message: The usual. --- NEW FILE --- import ConfigParser import StringIO def basic(src): print print "Testing basic accessors..." cf = ConfigParser.ConfigParser() sio = StringIO.StringIO(src) cf.readfp(sio) L = cf.sections() L.sort() print L for s in L: print "%s: %s" % (s, cf.options(s)) # The use of spaces in the section names serves as a regression test for # SourceForge bug #115357. # http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115357 print `cf.get('Foo Bar', 'foo', raw=1)` print `cf.get('Spacey Bar', 'foo', raw=1)` print `cf.get('Commented Bar', 'foo', raw=1)` if '__name__' in cf.options("Foo Bar"): print '__name__ "option" should not be exposed by the API!' else: print '__name__ "option" properly hidden by the API.' def interpolation(src): print print "Testing value interpolation..." cf = ConfigParser.ConfigParser({"getname": "%(__name__)s"}) sio = StringIO.StringIO(src) cf.readfp(sio) print `cf.get("Foo", "getname")` print `cf.get("Foo", "bar")` print `cf.get("Foo", "bar9")` print `cf.get("Foo", "bar10")` expect_get_error(cf, ConfigParser.InterpolationDepthError, "Foo", "bar11") def parse_errors(): print print "Testing for parsing errors..." expect_parse_error(ConfigParser.ParsingError, """[Foo]\n extra-spaces: splat\n""") expect_parse_error(ConfigParser.ParsingError, """[Foo]\n extra-spaces= splat\n""") expect_parse_error(ConfigParser.ParsingError, """[Foo]\noption-without-value\n""") expect_parse_error(ConfigParser.ParsingError, """[Foo]\n:value-without-option-name\n""") expect_parse_error(ConfigParser.ParsingError, """[Foo]\n=value-without-option-name\n""") expect_parse_error(ConfigParser.MissingSectionHeaderError, """No Section!\n""") def query_errors(): print print "Testing query interface..." cf = ConfigParser.ConfigParser() print cf.sections() print "Has section 'Foo'?", cf.has_section("Foo") try: cf.options("Foo") except ConfigParser.NoSectionError, e: print "Caught expected NoSectionError:", e else: print "Failed to catch expected NoSectionError from options()" try: cf.set("foo", "bar", "value") except ConfigParser.NoSectionError, e: print "Caught expected NoSectionError:", e else: print "Failed to catch expected NoSectionError from set()" expect_get_error(cf, ConfigParser.NoSectionError, "foo", "bar") cf.add_section("foo") expect_get_error(cf, ConfigParser.NoOptionError, "foo", "bar") def weird_errors(): print print "Testing miscellaneous error conditions..." cf = ConfigParser.ConfigParser() cf.add_section("Foo") try: cf.add_section("Foo") except ConfigParser.DuplicateSectionError, e: print "Caught expected DuplicateSectionError:", e else: print "Failed to catch expected DuplicateSectionError" def expect_get_error(cf, exctype, section, option, raw=0): try: cf.get(section, option, raw=raw) except exctype, e: print "Caught expected", exctype.__name__, ":" print e else: print "Failed to catch expected", exctype.__name__ def expect_parse_error(exctype, src): cf = ConfigParser.ConfigParser() sio = StringIO.StringIO(src) try: cf.readfp(sio) except exctype, e: print "Caught expected exception:", e else: print "Failed to catch expected", exctype.__name__ basic(r""" [Foo Bar] foo=bar [Spacey Bar] foo = bar [Commented Bar] foo: bar ; comment """) interpolation(r""" [Foo] bar=something %(with1)s interpolation (1 step) bar9=something %(with9)s lots of interpolation (9 steps) bar10=something %(with10)s lots of interpolation (10 steps) bar11=something %(with11)s lots of interpolation (11 steps) with11=%(with10)s with10=%(with9)s with9=%(with8)s with8=%(with7)s with7=%(with6)s with6=%(with5)s with5=%(with4)s with4=%(with3)s with3=%(with2)s with2=%(with1)s with1=with [Mutual Recursion] foo=%(bar)s bar=%(foo)s """) parse_errors() query_errors() weird_errors() --- NEW FILE --- from test_support import TESTFN import os import random source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print >> f, "a =", a print >> f, "b =", b f.close() try: try: mod = __import__(TESTFN) except ImportError, err: raise ValueError, "import from .py failed: %s" % err if mod.a != a or mod.b != b: print a, "!=", mod.a print b, "!=", mod.b raise ValueError, "module loaded (%s) but contents invalid" % mod finally: os.unlink(source) try: try: reload(mod) except ImportError, err: raise ValueError, "import from .pyc/.pyo failed: %s" % err finally: try: os.unlink(pyc) except os.error: pass try: os.unlink(pyo) except os.error: pass --- NEW FILE --- from test_support import TestFailed import os, tempfile import wave def check(t, msg=None): if not t: raise TestFailed, msg nchannels = 2 sampwidth = 2 framerate = 8000 nframes = 100 testfile = tempfile.mktemp() f = wave.open(testfile, 'w') f.setnchannels(nchannels) f.setsampwidth(sampwidth) f.setframerate(framerate) f.setnframes(nframes) output = '\0' * nframes * nchannels * sampwidth f.writeframes(output) f.close() f = wave.open(testfile, 'r') check(nchannels == f.getnchannels(), "nchannels") check(sampwidth == f.getsampwidth(), "sampwidth") check(framerate == f.getframerate(), "framerate") check(nframes == f.getnframes(), "nframes") input = f.readframes(nframes) check(input == output, "data") f.close() os.remove(testfile) Index: configpa.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/configpa.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** configpa.py 2000/09/26 17:32:27 1.9 --- configpa.py 2000/10/09 22:14:43 1.10 *************** *** 92,96 **** --- 92,98 ---- DEFAULTSECT = "DEFAULT" + MAX_INTERPOLATION_DEPTH = 10 + # exception classes *************** *** 131,143 **** self.section = section ! class MissingSectionHeaderError(Error): ! def __init__(self, filename, lineno, line): ! Error.__init__( ! self, ! 'File contains no section headers.\nfile: %s, line: %d\n%s' % ! (filename, lineno, line)) ! self.filename = filename ! self.lineno = lineno ! self.line = line class ParsingError(Error): --- 133,146 ---- self.section = section ! class InterpolationDepthError(Error): ! def __init__(self, option, section, rawval): ! Error.__init__(self, ! "Value interpolation too deeply recursive:\n" ! "\tsection: [%s]\n" ! "\toption : %s\n" ! "\trawval : %s\n" ! % (section, option, rawval)) ! self.option = option ! self.section = section class ParsingError(Error): *************** *** 151,155 **** --- 154,168 ---- self._msg = self._msg + '\n\t[line %2d]: %s' % (lineno, line) + class MissingSectionHeaderError(ParsingError): + def __init__(self, filename, lineno, line): + Error.__init__( + self, + 'File contains no section headers.\nfile: %s, line: %d\n%s' % + (filename, lineno, line)) + self.filename = filename + self.lineno = lineno + self.line = line + class ConfigParser: *************** *** 184,188 **** The DEFAULT section is not acknowledged. """ ! return self.__sections.has_key(section) def options(self, section): --- 197,201 ---- The DEFAULT section is not acknowledged. """ ! return section in self.sections() def options(self, section): *************** *** 193,205 **** raise NoSectionError(section) opts.update(self.__defaults) return opts.keys() def has_option(self, section, option): """Return whether the given section has the given option.""" ! try: ! opts = self.__sections[section] ! except KeyError: ! raise NoSectionError(section) ! return opts.has_key(option) def read(self, filenames): --- 206,216 ---- raise NoSectionError(section) opts.update(self.__defaults) + if opts.has_key('__name__'): + del opts['__name__'] return opts.keys() def has_option(self, section, option): """Return whether the given section has the given option.""" ! return option in self.options(section) def read(self, filenames): *************** *** 267,274 **** except KeyError: raise NoOptionError(option, section) ! # do the string interpolation if raw: return rawval value = rawval # Make it a pretty variable name depth = 0 --- 278,286 ---- except KeyError: raise NoOptionError(option, section) ! if raw: return rawval + # do the string interpolation value = rawval # Make it a pretty variable name depth = 0 *************** *** 281,285 **** raise InterpolationError(key, option, section, rawval) else: ! return value def __get(self, section, conv, option): --- 293,300 ---- raise InterpolationError(key, option, section, rawval) else: ! break ! if value.find("%(") >= 0: ! raise InterpolationDepthError(option, section, rawval) ! return value def __get(self, section, conv, option): *************** *** 366,370 **** SECTCRE = re.compile( r'\[' # [ ! r'(?P
[-\w_.*,(){}]+)' # a lot of stuff found by IvL r'\]' # ] ) --- 381,385 ---- SECTCRE = re.compile( r'\[' # [ ! r'(?P
[-\w_.*,(){} ]+)' # a lot of stuff found by IvL r'\]' # ] ) Index: mimetool.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/mimetool.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** mimetool.py 2000/05/08 17:31:00 1.7 --- mimetool.py 2000/10/09 22:14:43 1.8 *************** *** 142,146 **** return uu.decode(input, output) if encoding in ('7bit', '8bit'): ! output.write(input.read()) if decodetab.has_key(encoding): pipethrough(input, decodetab[encoding], output) --- 142,146 ---- return uu.decode(input, output) if encoding in ('7bit', '8bit'): ! return output.write(input.read()) if decodetab.has_key(encoding): pipethrough(input, decodetab[encoding], output) *************** *** 161,165 **** return uu.encode(input, output) if encoding in ('7bit', '8bit'): ! output.write(input.read()) if encodetab.has_key(encoding): pipethrough(input, encodetab[encoding], output) --- 161,165 ---- return uu.encode(input, output) if encoding in ('7bit', '8bit'): ! return output.write(input.read()) if encodetab.has_key(encoding): pipethrough(input, encodetab[encoding], output) Index: posixpat.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/posixpat.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** posixpat.py 2000/09/01 19:25:51 1.12 --- posixpat.py 2000/10/09 22:14:43 1.13 *************** *** 57,63 **** def split(p): """Split a pathname. Returns tuple "(head, tail)" where "tail" is ! everything after the final slash. Either part may be empty""" ! import string ! i = string.rfind(p, '/') + 1 head, tail = p[:i], p[i:] if head and head <> '/'*len(head): --- 57,62 ---- def split(p): """Split a pathname. Returns tuple "(head, tail)" where "tail" is ! everything after the final slash. Either part may be empty.""" ! i = p.rfind('/') + 1 head, tail = p[:i], p[i:] if head and head <> '/'*len(head): *************** *** 74,78 **** def splitext(p): """Split the extension from a pathname. Extension is everything from the ! last dot to the end. Returns "(root, ext)", either part may be empty""" root, ext = '', '' for c in p: --- 73,77 ---- def splitext(p): """Split the extension from a pathname. Extension is everything from the ! last dot to the end. Returns "(root, ext)", either part may be empty.""" root, ext = '', '' for c in p: *************** *** 96,100 **** def splitdrive(p): """Split a pathname into drive and path. On Posix, drive is always ! empty""" return '', p --- 95,99 ---- def splitdrive(p): """Split a pathname into drive and path. On Posix, drive is always ! empty.""" return '', p *************** *** 256,262 **** def walk(top, func, arg): """walk(top,func,arg) calls func(arg, d, files) for each directory "d" ! in the tree rooted at "top" (including "top" itself). "files" is a list ! of all the files and subdirs in directory "d". ! """ try: names = os.listdir(top) --- 255,261 ---- def walk(top, func, arg): """walk(top,func,arg) calls func(arg, d, files) for each directory "d" ! in the tree rooted at "top" (including "top" itself). "files" is a list ! of all the files and subdirs in directory "d". ! """ try: names = os.listdir(top) *************** *** 282,291 **** def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, ! do nothing""" if path[:1] <> '~': return path i, n = 1, len(path) while i < n and path[i] <> '/': ! i = i+1 if i == 1: if not os.environ.has_key('HOME'): --- 281,290 ---- def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, ! do nothing.""" if path[:1] <> '~': return path i, n = 1, len(path) while i < n and path[i] <> '/': ! i = i + 1 if i == 1: if not os.environ.has_key('HOME'): *************** *** 299,303 **** return path userhome = pwent[5] ! if userhome[-1:] == '/': i = i+1 return userhome + path[i:] --- 298,302 ---- return path userhome = pwent[5] ! if userhome[-1:] == '/': i = i + 1 return userhome + path[i:] *************** *** 311,315 **** def expandvars(path): """Expand shell variables of form $var and ${var}. Unknown variables ! are left unchanged""" global _varprog if '$' not in path: --- 310,314 ---- def expandvars(path): """Expand shell variables of form $var and ${var}. Unknown variables ! are left unchanged.""" global _varprog if '$' not in path: *************** *** 345,351 **** if path == '': return '.' - import string initial_slash = (path[0] == '/') ! comps = string.split(path, '/') new_comps = [] for comp in comps: --- 344,349 ---- if path == '': return '.' initial_slash = (path[0] == '/') ! comps = path.split('/') new_comps = [] for comp in comps: *************** *** 358,362 **** new_comps.pop() comps = new_comps ! path = string.join(comps, '/') if initial_slash: path = '/' + path --- 356,360 ---- new_comps.pop() comps = new_comps ! path = '/'.join(comps) if initial_slash: path = '/' + path Index: sre_comp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/sre_comp.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** sre_comp.py 2000/09/01 19:25:51 1.6 --- sre_comp.py 2000/10/09 22:14:43 1.7 *************** *** 223,227 **** # check if av is a "simple" operator lo, hi = av[2].getwidth() ! if lo == 0: raise error, "nothing to repeat" return lo == hi == 1 and av[2][0][0] != SUBPATTERN --- 223,227 ---- # check if av is a "simple" operator lo, hi = av[2].getwidth() ! if lo == 0 and hi == MAXREPEAT: raise error, "nothing to repeat" return lo == hi == 1 and av[2][0][0] != SUBPATTERN Index: sre_cons.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/sre_cons.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** sre_cons.py 2000/09/01 19:25:51 1.4 --- sre_cons.py 2000/10/09 22:14:43 1.5 *************** *** 10,13 **** --- 10,15 ---- # + MAXREPEAT = 65535 + # should this really be here? Index: sre_pars.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/sre_pars.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** sre_pars.py 2000/09/26 17:32:27 1.7 --- sre_pars.py 2000/10/09 22:14:43 1.8 *************** *** 13,18 **** from sre_constants import * - MAXREPEAT = 65535 - SPECIAL_CHARS = ".\\[{()*+?^$|" REPEAT_CHARS = "*+?{" --- 13,16 ---- *************** *** 394,397 **** --- 392,397 ---- this = source.get() if this == "]": + if code1[0] is IN: + code1 = code1[1][0] set.append(code1) set.append((LITERAL, ord("-"))) *************** *** 593,596 **** --- 593,601 ---- # p.dump() + + if not (flags & SRE_FLAG_VERBOSE) and p.pattern.flags & SRE_FLAG_VERBOSE: + # the VERBOSE flag was switched on inside the pattern. to be + # on the safe side, we'll parse the whole thing again... + return parse(str, p.pattern.flags) return p Index: stringio.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/stringio.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** stringio.py 2000/09/26 17:32:27 1.5 --- stringio.py 2000/10/09 22:14:43 1.6 *************** *** 14,17 **** --- 14,18 ---- buf = f.readline() # read until end of line ('\n') or EOF list = f.readlines()# list of f.readline() results until EOF + f.truncate([size]) # truncate file at to at most size (default: current pos) f.write(buf) # write at current position f.writelines(list) # for line in list: f.write(line) *************** *** 29,32 **** --- 30,34 ---- """ + import errno import string *************** *** 103,106 **** --- 105,119 ---- line = self.readline() return lines + def truncate(self, size=None): + if self.closed: + raise ValueError, "I/O operation on closed file" + if size is None: + size = self.pos + elif size < 0: + raise IOError(errno.EINVAL, + "Negative size not allowed") + elif size < self.pos: + self.pos = size + self.buf = self.getvalue()[:size] def write(self, s): if self.closed: Index: test_cla.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_cla.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_cla.py 2000/09/01 19:27:34 1.1 --- test_cla.py 2000/10/09 22:14:43 1.2 *************** *** 72,76 **** def __hash__(self, *args): print "__hash__:", args ! return id(self) def __str__(self, *args): --- 72,76 ---- def __hash__(self, *args): print "__hash__:", args ! return hash(id(self)) def __str__(self, *args): Index: test_lin.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_lin.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_lin.py 2000/09/01 19:25:51 1.2 --- test_lin.py 2000/10/09 22:14:43 1.3 *************** *** 1,11 **** from test_support import verbose, findfile, TestFailed, TestSkipped ! import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') --- 1,26 ---- from test_support import verbose, findfile, TestFailed, TestSkipped ! import errno + import fcntl + import linuxaudiodev import os + import sys + import select + import sunaudio + import time + import audioop + SND_FORMAT_MULAW_8 = 1 + def play_sound_file(path): fp = open(path, 'r') + size, enc, rate, nchannels, extra = sunaudio.gethdr(fp) data = fp.read() fp.close() + + if enc != SND_FORMAT_MULAW_8: + print "Expect .au file with 8-bit mu-law samples" + return + try: a = linuxaudiodev.open('w') *************** *** 14,23 **** raise TestSkipped, msg raise TestFailed, msg else: ! a.write(data) ! a.close() def test(): play_sound_file(findfile('audiotest.au')) test() --- 29,89 ---- raise TestSkipped, msg raise TestFailed, msg + + # convert the data to 16-bit signed + data = audioop.ulaw2lin(data, 2) + + # set the data format + if sys.byteorder == 'little': + fmt = linuxaudiodev.AFMT_S16_LE else: ! fmt = linuxaudiodev.AFMT_S16_BE ! ! # at least check that these methods can be invoked ! a.bufsize() ! a.obufcount() ! a.obuffree() ! a.getptr() ! a.fileno() ! ! # set parameters based on .au file headers ! a.setparameters(rate, 16, nchannels, fmt) ! a.write(data) ! a.flush() ! a.close() ! ! def test_errors(): ! a = linuxaudiodev.open("w") ! size = 8 ! fmt = linuxaudiodev.AFMT_U8 ! rate = 8000 ! nchannels = 1 ! try: ! a.setparameters(-1, size, nchannels, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, -2, nchannels, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, 3, fmt) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, nchannels, 177) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, size, nchannels, linuxaudiodev.AFMT_U16_LE) ! except ValueError, msg: ! print msg ! try: ! a.setparameters(rate, 16, nchannels, fmt) ! except ValueError, msg: ! print msg def test(): play_sound_file(findfile('audiotest.au')) + test_errors() test() Index: test_min.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_min.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_min.py 2000/09/26 17:32:27 1.2 --- test_min.py 2000/10/09 22:14:43 1.3 *************** *** 2,5 **** --- 2,6 ---- from xml.dom.minidom import parse, Node, Document, parseString + import xml.parsers.expat import os.path *************** *** 35,40 **** dom.documentElement.getElementsByTagName( "LI" ) ) dom.unlink() - dom=None - confirm (len( Node.allnodes )==0) def testInsertBefore( ): --- 36,39 ---- *************** *** 50,56 **** #confirm( docel.childNodes[2].tet=="a" ) dom.unlink() - del dom - del docel - confirm( len( Node.allnodes )==0) def testAppendChild(): --- 49,52 ---- *************** *** 60,65 **** confirm( dom.documentElement.childNodes[-1].data=="Hello" ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testNonZero(): --- 56,59 ---- *************** *** 69,80 **** confirm( not dom.childNodes[-1].childNodes ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testUnlink(): dom=parse( tstfile ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testElement(): --- 63,70 ---- *************** *** 83,88 **** confirm( dom.documentElement ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testAAA(): --- 73,76 ---- *************** *** 91,95 **** el.setAttribute( "spam", "jam2" ) dom.unlink() - dom=None def testAAB(): --- 79,82 ---- *************** *** 99,103 **** el.setAttribute( "spam", "jam2" ) dom.unlink() - dom=None def testAddAttr(): --- 86,89 ---- *************** *** 120,127 **** confirm( len( child.attributes )==2 ) - dom.unlink() - dom=None - child=None def testDeleteAttr(): --- 106,110 ---- *************** *** 135,139 **** confirm( len( child.attributes)==0 ) dom.unlink() - confirm( len( Node.allnodes )==0 ) def testRemoveAttr(): --- 118,121 ---- *************** *** 160,164 **** dom.unlink() - dom=None def testRemoveAttributeNode(): --- 142,145 ---- *************** *** 172,177 **** dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testChangeAttr(): --- 153,156 ---- *************** *** 189,194 **** confirm( len( el.attributes )==2 ) dom.unlink() - dom=None - confirm( len( Node.allnodes )==0 ) def testGetAttrList(): --- 168,171 ---- *************** *** 236,239 **** --- 213,217 ---- confirm( string1.find("slash:abc" )!=-1 ) dom.unlink() + confirm( len( Node.allnodes )==0 ) def testAttributeRepr(): *************** *** 243,250 **** confirm( str( node ) == repr( node ) ) dom.unlink() def testTextNodeRepr(): pass ! def testWriteXML(): pass def testProcessingInstruction(): pass --- 221,235 ---- confirm( str( node ) == repr( node ) ) dom.unlink() + confirm( len( Node.allnodes )==0 ) def testTextNodeRepr(): pass ! def testWriteXML(): ! str = '' ! dom = parseString(str) ! domstr = dom.toxml() ! dom.unlink() ! confirm(str == domstr) ! confirm( len( Node.allnodes )==0 ) def testProcessingInstruction(): pass *************** *** 336,339 **** --- 321,326 ---- func() print "Test Succeeded", name + confirm(len(Node.allnodes) == 0, + "assertion: len(Node.allnodes) == 0") if len( Node.allnodes ): print "Garbage left over:" Index: test_str.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_str.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** test_str.py 2000/09/26 17:32:27 1.11 --- test_str.py 2000/10/09 22:14:43 1.12 *************** *** 1,15 **** ! # Tests StringIO and cStringIO ! import string ! def do_test(module): ! s = (string.letters+'\n')*5 ! f = module.StringIO(s) ! print f.read(10) ! print f.readline() ! print len(f.readlines(60)) ! ! # Don't bother testing cStringIO without ! import StringIO, cStringIO ! do_test(StringIO) ! do_test(cStringIO) --- 1,134 ---- ! #! /usr/bin/env python ! # Sanity checker for time.strftime ! import time, calendar, sys, string, os, re ! from test_support import verbose ! ! def main(): ! global verbose ! now = time.time() ! strftest(now) ! verbose = 0 ! # Try a bunch of dates and times, chosen to vary through time of ! # day and daylight saving time ! for j in range(-5, 5): ! for i in range(25): ! strftest(now + (i + j*100)*23*3603) ! ! def strftest(now): ! if verbose: ! print "strftime test for", time.ctime(now) ! nowsecs = str(long(now))[:-1] ! gmt = time.gmtime(now) ! now = time.localtime(now) ! ! if now[3] < 12: ampm='(AM|am)' ! else: ampm='(PM|pm)' ! ! jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) ! ! try: ! if now[8]: tz = time.tzname[1] ! else: tz = time.tzname[0] ! except AttributeError: ! tz = '' ! ! if now[3] > 12: clock12 = now[3] - 12 ! elif now[3] > 0: clock12 = now[3] ! else: clock12 = 12 ! ! expectations = ( ! ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ! ('%A', calendar.day_name[now[6]], 'full weekday name'), ! ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ! ('%B', calendar.month_name[now[1]], 'full month name'), ! # %c see below ! ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ! ('%H', '%02d' % now[3], 'hour (00-23)'), ! ('%I', '%02d' % clock12, 'hour (01-12)'), ! ('%j', '%03d' % now[7], 'julian day (001-366)'), ! ('%m', '%02d' % now[1], 'month as number (01-12)'), ! ('%M', '%02d' % now[4], 'minute, (00-59)'), ! ('%p', ampm, 'AM or PM as appropriate'), ! ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ! ('%U', '%02d' % ((now[7] + jan1[6])/7), ! 'week number of the year (Sun 1st)'), ! ('%w', '0?%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ! ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), ! 'week number of the year (Mon 1st)'), ! # %x see below ! ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ! ('%y', '%02d' % (now[0]%100), 'year without century'), ! ('%Y', '%d' % now[0], 'year with century'), ! # %Z see below ! ('%%', '%', 'single percent sign'), ! ) ! ! nonstandard_expectations = ( ! # These are standard but don't have predictable output ! ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ! ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), ! '%m/%d/%y %H:%M:%S'), ! ('%Z', '%s' % tz, 'time zone name'), ! ! # These are some platform specific extensions ! ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ! ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ! ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ! ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ! ('%n', '\n', 'newline character'), ! ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), ! '%I:%M:%S %p'), ! ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ! ('%s', nowsecs, 'seconds since the Epoch in UCT'), ! ('%t', '\t', 'tab character'), ! ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ! ('%3y', '%03d' % (now[0]%100), ! 'year without century rendered using fieldwidth'), ! ) ! ! if verbose: ! print "Strftime test, platform: %s, Python version: %s" % \ ! (sys.platform, string.split(sys.version)[0]) ! ! for e in expectations: ! try: ! result = time.strftime(e[0], now) ! except ValueError, error: ! print "Standard '%s' format gave error:" % e[0], error ! continue ! if re.match(e[1], result): continue ! if not result or result[0] == '%': ! print "Does not support standard '%s' format (%s)" % (e[0], e[2]) ! else: ! print "Conflict for %s (%s):" % (e[0], e[2]) ! print " Expected %s, but got %s" % (e[1], result) ! ! for e in nonstandard_expectations: ! try: ! result = time.strftime(e[0], now) ! except ValueError, result: ! if verbose: ! print "Error for nonstandard '%s' format (%s): %s" % \ ! (e[0], e[2], str(result)) ! continue ! if re.match(e[1], result): ! if verbose: ! print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) ! elif not result or result[0] == '%': ! if verbose: ! print "Does not appear to support '%s' format (%s)" % (e[0], ! e[2]) ! else: ! if verbose: ! print "Conflict for nonstandard '%s' format (%s):" % (e[0], ! e[2]) ! print " Expected %s, but got %s" % (e[1], result) ! ! def fixasctime(s): ! if s[8] == ' ': ! s = s[:8] + '0' + s[9:] ! return s ! ! main() Index: test_uni.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_uni.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_uni.py 2000/09/01 19:25:51 1.3 --- test_uni.py 2000/10/09 22:14:43 1.4 *************** *** 342,345 **** --- 342,346 ---- assert '...%(foo)s...' % {u'foo':u"abc",u'def':123} == u'...abc...' assert '...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...1...2...3...abc...' + assert '...%%...%%s...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...%...%s...1...2...3...abc...' assert '...%s...' % u"abc" == u'...abc...' print 'done.' Index: test_url.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_url.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_url.py 2000/09/26 17:32:27 1.2 --- test_url.py 2000/10/09 22:14:43 1.3 *************** *** 1,32 **** - # Minimal test of the quote function - import urllib - - chars = 'abcdefghijklmnopqrstuvwxyz'\ - '\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356' \ - '\357\360\361\362\363\364\365\366\370\371\372\373\374\375\376\377' \ - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' \ - '\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317' \ - '\320\321\322\323\324\325\326\330\331\332\333\334\335\336' - - expected = 'abcdefghijklmnopqrstuvwxyz%df%e0%e1%e2%e3%e4%e5%e6%e7%e8%e9%ea%eb%ec%ed%ee%ef%f0%f1%f2%f3%f4%f5%f6%f8%f9%fa%fb%fc%fd%fe%ffABCDEFGHIJKLMNOPQRSTUVWXYZ%c0%c1%c2%c3%c4%c5%c6%c7%c8%c9%ca%cb%cc%cd%ce%cf%d0%d1%d2%d3%d4%d5%d6%d8%d9%da%db%dc%dd%de' - - test = urllib.quote(chars) - assert test == expected, "urllib.quote problem" - test2 = urllib.unquote(expected) - assert test2 == chars - - in1 = "abc/def" - out1_1 = "abc/def" - out1_2 = "abc%2fdef" - - assert urllib.quote(in1) == out1_1, "urllib.quote problem" - assert urllib.quote(in1, '') == out1_2, "urllib.quote problem" - - in2 = "abc?def" - out2_1 = "abc%3fdef" - out2_2 = "abc?def" - - assert urllib.quote(in2) == out2_1, "urllib.quote problem" - assert urllib.quote(in2, '?') == out2_2, "urllib.quote problem" - - --- 0 ---- Index: test_win.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_win.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_win.py 2000/09/26 17:32:27 1.4 --- test_win.py 2000/10/09 22:14:43 1.5 *************** *** 1,147 **** ! # Test the windows specific win32reg module. ! # Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey ! from _winreg import * ! import os, sys ! ! test_key_name = "SOFTWARE\\Python Registry Test Key - Delete Me" ! ! test_data = [ ! ("Int Value", 45, REG_DWORD), ! ("String Val", "A string value", REG_SZ,), ! (u"Unicode Val", u"A Unicode value", REG_SZ,), ! ("StringExpand", "The path is %path%", REG_EXPAND_SZ), ! ("UnicodeExpand", u"The path is %path%", REG_EXPAND_SZ), ! ("Multi-string", ["Lots", "of", "string", "values"], REG_MULTI_SZ), ! ("Multi-unicode", [u"Lots", u"of", u"unicode", u"values"], REG_MULTI_SZ), ! ("Multi-mixed", [u"Unicode", u"and", "string", "values"],REG_MULTI_SZ), ! ("Raw Data", ("binary"+chr(0)+"data"), REG_BINARY), ! ] ! ! def WriteTestData(root_key): ! # Set the default value for this key. ! SetValue(root_key, test_key_name, REG_SZ, "Default value") ! key = CreateKey(root_key, test_key_name) ! # Create a sub-key ! sub_key = CreateKey(key, "sub_key") ! # Give the sub-key some named values ! ! for value_name, value_data, value_type in test_data: ! SetValueEx(sub_key, value_name, 0, value_type, value_data) ! ! # Check we wrote as many items as we thought. ! nkeys, nvalues, since_mod = QueryInfoKey(key) ! assert nkeys==1, "Not the correct number of sub keys" ! assert nvalues==1, "Not the correct number of values" ! nkeys, nvalues, since_mod = QueryInfoKey(sub_key) ! assert nkeys==0, "Not the correct number of sub keys" ! assert nvalues==len(test_data), "Not the correct number of values" ! # Close this key this way... ! # (but before we do, copy the key as an integer - this allows ! # us to test that the key really gets closed). ! int_sub_key = int(sub_key) ! CloseKey(sub_key) ! try: ! QueryInfoKey(int_sub_key) ! raise RuntimeError, "It appears the CloseKey() function does not close the actual key!" ! except EnvironmentError: ! pass ! # ... and close that key that way :-) ! int_key = int(key) ! key.Close() ! try: ! QueryInfoKey(int_key) ! raise RuntimeError, "It appears the key.Close() function does not close the actual key!" ! except EnvironmentError: ! pass ! ! def ReadTestData(root_key): ! # Check we can get default value for this key. ! val = QueryValue(root_key, test_key_name) ! assert val=="Default value", "Registry didn't give back the correct value" ! ! key = OpenKey(root_key, test_key_name) ! # Read the sub-keys ! sub_key = OpenKey(key, "sub_key") ! # Check I can enumerate over the values. ! index = 0 ! while 1: ! try: ! data = EnumValue(sub_key, index) ! except EnvironmentError: ! break ! assert data in test_data, "Didn't read back the correct test data" ! index = index + 1 ! assert index==len(test_data), "Didn't read the correct number of items" ! # Check I can directly access each item ! for value_name, value_data, value_type in test_data: ! read_val, read_typ = QueryValueEx(sub_key, value_name) ! assert read_val==value_data and read_typ == value_type, \ ! "Could not directly read the value" ! sub_key.Close() ! # Enumerate our main key. ! read_val = EnumKey(key, 0) ! assert read_val == "sub_key", "Read subkey value wrong" ! try: ! EnumKey(key, 1) ! assert 0, "Was able to get a second key when I only have one!" ! except EnvironmentError: ! pass ! ! key.Close() ! ! def DeleteTestData(root_key): ! key = OpenKey(root_key, test_key_name, 0, KEY_ALL_ACCESS) ! sub_key = OpenKey(key, "sub_key", 0, KEY_ALL_ACCESS) ! # It is not necessary to delete the values before deleting ! # the key (although subkeys must not exist). We delete them ! # manually just to prove we can :-) ! for value_name, value_data, value_type in test_data: ! DeleteValue(sub_key, value_name) ! ! nkeys, nvalues, since_mod = QueryInfoKey(sub_key) ! assert nkeys==0 and nvalues==0, "subkey not empty before delete" ! sub_key.Close() ! DeleteKey(key, "sub_key") ! ! try: ! # Shouldnt be able to delete it twice! ! DeleteKey(key, "sub_key") ! assert 0, "Deleting the key twice succeeded" ! except EnvironmentError: ! pass ! key.Close() ! DeleteKey(root_key, test_key_name) ! # Opening should now fail! ! try: ! key = OpenKey(root_key, test_key_name) ! assert 0, "Could open the non-existent key" ! except WindowsError: # Use this error name this time ! pass ! ! def TestAll(root_key): ! WriteTestData(root_key) ! ReadTestData(root_key) ! DeleteTestData(root_key) ! ! # Test on my local machine. ! TestAll(HKEY_CURRENT_USER) ! print "Local registry tests worked" ! try: ! remote_name = sys.argv[sys.argv.index("--remote")+1] ! except (IndexError, ValueError): ! remote_name = None ! ! if remote_name is not None: ! try: ! remote_key = ConnectRegistry(remote_name, HKEY_CURRENT_USER) ! except EnvironmentError, exc: ! print "Could not connect to the remote machine -", exc.strerror ! remote_key = None ! if remote_key is not None: ! TestAll(remote_key) ! print "Remote registry tests worked" ! else: ! print "Remote registry calls can be tested using", ! print "'test_winreg.py --remote \\\\machine_name'" --- 1,7 ---- ! # Ridiculously simple test of the winsound module for Windows. ! import winsound ! for i in range(100, 2000, 100): ! winsound.Beep(i, 75) ! print "Hopefully you heard some sounds increasing in frequency!" Index: userlist.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/userlist.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** userlist.py 2000/09/26 17:32:27 1.9 --- userlist.py 2000/10/09 22:14:43 1.10 *************** *** 25,31 **** def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) ! userlist = self.__class__() ! userlist.data[:] = self.data[i:j] ! return userlist def __setslice__(self, i, j, other): i = max(i, 0); j = max(j, 0) --- 25,29 ---- def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) ! return self.__class__(self.data[i:j]) def __setslice__(self, i, j, other): i = max(i, 0); j = max(j, 0) Index: webbrows.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/webbrows.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** webbrows.py 2000/09/26 17:32:27 1.3 --- webbrows.py 2000/10/09 22:14:43 1.4 *************** *** 197,203 **** DEFAULT_BROWSER = "windows-default" elif os.environ.get("DISPLAY"): ! if os.environ.get("KDEDIR"): ! DEFAULT_BROWSER = "kfm" ! elif _iscommand("netscape"): DEFAULT_BROWSER = "netscape" --- 197,201 ---- DEFAULT_BROWSER = "windows-default" elif os.environ.get("DISPLAY"): ! if _iscommand("netscape"): DEFAULT_BROWSER = "netscape" From python-dev@python.org Tue Oct 10 00:43:58 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 9 Oct 2000 16:43:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib wave.py,1.12,1.13 Message-ID: <200010092343.QAA19489@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv16460/python/dist/src/lib Modified Files: wave.py Log Message: When the classes in wave.py opened files themselves, their .close() methods didn't bother to close the files. This caused the new test_wave test to fail under Windows, as Windows won't let you delete a file that's open. Fixed that by ensuring the wave read & write classes' .close() and __del__ methods close files that were opened by their constructors. Index: wave.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/wave.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** wave.py 2000/10/09 20:01:53 1.12 --- wave.py 2000/10/09 23:43:55 1.13 *************** *** 153,161 **** --- 153,165 ---- def __init__(self, f): + self._i_opened_the_file = None if type(f) == type(''): f = __builtin__.open(f, 'rb') + self._i_opened_the_file = f # else, assume it is an open file object already self.initfp(f) + def __del__(self): + self.close() # # User visible methods. *************** *** 169,172 **** --- 173,179 ---- def close(self): + if self._i_opened_the_file: + self._i_opened_the_file.close() + self._i_opened_the_file = None self._file = None *************** *** 285,290 **** --- 292,299 ---- def __init__(self, f): + self._i_opened_the_file = None if type(f) == type(''): f = __builtin__.open(f, 'wb') + self._i_opened_the_file = f self.initfp(f) *************** *** 301,306 **** def __del__(self): ! if self._file: ! self.close() # --- 310,314 ---- def __del__(self): ! self.close() # *************** *** 414,422 **** def close(self): ! self._ensure_header_written(0) ! if self._datalength != self._datawritten: ! self._patchheader() ! self._file.flush() ! self._file = None # --- 422,434 ---- def close(self): ! if self._file: ! self._ensure_header_written(0) ! if self._datalength != self._datawritten: ! self._patchheader() ! self._file.flush() ! self._file = None ! if self._i_opened_the_file: ! self._i_opened_the_file.close() ! self._i_opened_the_file = None # From python-dev@python.org Tue Oct 10 15:49:51 2000 From: python-dev@python.org (Guido van Rossum) Date: Tue, 10 Oct 2000 07:49:51 -0700 Subject: [Python-checkins] CVS: python/dist/src LICENSE,1.6,1.7 Message-ID: <200010101449.HAA21537@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv21456 Modified Files: LICENSE Log Message: Place the full text of the CNRI license verbatim in the LICENSE file. Who know where the handle will point to tomorrow? Index: LICENSE =================================================================== RCS file: /cvsroot/python/python/dist/src/LICENSE,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** LICENSE 2000/09/05 03:05:07 1.6 --- LICENSE 2000/10/10 14:49:44 1.7 *************** *** 71,80 **** ---------------------------------- ! Python 1.6 is made available subject to the terms and conditions in ! CNRI's License Agreement. This Agreement together with Python 1.6 may ! be located on the Internet using the following unique, persistent ! identifier (known as a handle): 1895.22/1012. This Agreement may also be obtained from a proxy server on the Internet using the following ! URL: http://hdl.handle.net/1895.22/1012. --- 71,142 ---- ---------------------------------- ! Python 1.6 CNRI OPEN SOURCE LICENSE AGREEMENT ! ! IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY. BY CLICKING ! ON "ACCEPT" WHERE INDICATED BELOW, OR BY COPYING, INSTALLING OR ! OTHERWISE USING PYTHON 1.6 SOFTWARE, YOU ARE DEEMED TO HAVE AGREED TO ! THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. ! ! 1. This LICENSE AGREEMENT is between the Corporation for National ! Research Initiatives, having an office at 1895 Preston White Drive, ! Reston, VA 20191 ("CNRI"), and the Individual or Organization ! ("Licensee") accessing and otherwise using Python 1.6 software in ! source or binary form and its associated documentation, as released at ! the www.python.org Internet site on September 5, 2000 ("Python 1.6"). ! ! 2. Subject to the terms and conditions of this License Agreement, CNRI ! hereby grants Licensee a nonexclusive, royalty-free, world-wide ! license to reproduce, analyze, test, perform and/or display publicly, ! prepare derivative works, distribute, and otherwise use Python 1.6 ! alone or in any derivative version, provided, however, that CNRI's ! License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) ! 1995-2000 Corporation for National Research Initiatives; All Rights ! Reserved" are retained in Python 1.6 alone or in any derivative ! version prepared by ! ! Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee ! may substitute the following text (omitting the quotes): "Python 1.6 ! is made available subject to the terms and conditions in CNRI's ! License Agreement. This Agreement together with Python 1.6 may be ! located on the Internet using the following unique, persistent ! identifier (known as a handle): 1895.22/1012. This Agreement may also be obtained from a proxy server on the Internet using the following ! URL: http://hdl.handle.net/1895.22/1012". ! ! 3. In the event Licensee prepares a derivative work that is based on ! or incorporates Python 1.6 or any part thereof, and wants to make the ! derivative work available to others as provided herein, then Licensee ! hereby agrees to include in any such work a brief summary of the ! changes made to Python 1.6. ! ! 4. CNRI is making Python 1.6 available to Licensee on an "AS IS" ! basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR ! IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND ! DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS ! FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6 WILL NOT ! INFRINGE ANY THIRD PARTY RIGHTS. ! ! 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON ! 1.6 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A ! RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6, OR ! ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. ! ! 6. This License Agreement will automatically terminate upon a material ! breach of its terms and conditions. ! ! 7. This License Agreement shall be governed by and interpreted in all ! respects by the law of the State of Virginia, excluding conflict of ! law provisions. Nothing in this License Agreement shall be deemed to ! create any relationship of agency, partnership, or joint venture ! between CNRI and Licensee. This License Agreement does not grant ! permission to use CNRI trademarks or trade name in a trademark sense ! to endorse or promote products or services of Licensee, or any third ! party. ! ! 8. By clicking on the "ACCEPT" button where indicated, or by copying, ! installing or otherwise using Python 1.6, Licensee agrees to be bound ! by the terms and conditions of this License Agreement. ! ! ACCEPT From python-dev@python.org Tue Oct 10 17:46:39 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 09:46:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib lib.tex,1.167,1.168 Message-ID: <200010101646.JAA11172@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv11142 Modified Files: lib.tex Log Message: Move the documentation for the mutex module to be with the threading and queue-management modules, since that is where the general context for use in most cases. Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -r1.167 -r1.168 *** lib.tex 2000/10/09 18:11:24 1.167 --- lib.tex 2000/10/10 16:46:36 1.168 *************** *** 148,152 **** \input{liblocale} \input{libgettext} - \input{libmutex} \input{libsomeos} % Optional Operating System Services --- 148,151 ---- *************** *** 156,159 **** --- 155,159 ---- \input{libthread} \input{libthreading} + \input{libmutex} \input{libqueue} \input{libmmap} From python-dev@python.org Tue Oct 10 17:56:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 09:56:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libbasehttp.tex,1.11,1.12 libcgihttp.tex,1.3,1.4 Message-ID: <200010101656.JAA18565@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18517 Modified Files: libbasehttp.tex libcgihttp.tex Log Message: Better synopses based on suggestions from Ka-Ping Yee . Index: libbasehttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbasehttp.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** libbasehttp.tex 2000/07/16 19:01:09 1.11 --- libbasehttp.tex 2000/10/10 16:56:41 1.12 *************** *** 1,8 **** \section{\module{BaseHTTPServer} --- ! Basic HTTP server.} ! \declaremodule{standard}{BaseHTTPServer} \modulesynopsis{Basic HTTP server (base class for ! \class{SimpleHTTPServer} and \class{CGIHTTPServer}).} --- 1,8 ---- \section{\module{BaseHTTPServer} --- ! Basic HTTP server} + \declaremodule{standard}{BaseHTTPServer} \modulesynopsis{Basic HTTP server (base class for ! \class{SimpleHTTPServer} and \class{CGIHTTPServer}).} *************** *** 11,15 **** \index{URL} \index{httpd} - This module defines two classes for implementing HTTP servers --- 11,14 ---- Index: libcgihttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgihttp.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libcgihttp.tex 2000/07/16 19:01:09 1.3 --- libcgihttp.tex 2000/10/10 16:56:41 1.4 *************** *** 1,4 **** \section{\module{CGIHTTPServer} --- ! A Do-Something Request Handler} --- 1,4 ---- \section{\module{CGIHTTPServer} --- ! CGI-capable HTTP request handler} From python-dev@python.org Tue Oct 10 17:59:56 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 09:59:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsimplehttp.tex,1.1,1.2 Message-ID: <200010101659.JAA21378@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv21341 Modified Files: libsimplehttp.tex Log Message: Better synopsis based on suggestion from Ka-Ping Yee . Index: libsimplehttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsimplehttp.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libsimplehttp.tex 1999/06/14 19:47:47 1.1 --- libsimplehttp.tex 2000/10/10 16:59:53 1.2 *************** *** 1,8 **** \section{\module{SimpleHTTPServer} --- ! A Do-Something Request Handler} \declaremodule{standard}{SimpleHTTPServer} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} ! \modulesynopsis{This module provides a request handler for HTTP servers.} --- 1,9 ---- \section{\module{SimpleHTTPServer} --- ! Simple HTTP request handler} \declaremodule{standard}{SimpleHTTPServer} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} ! \modulesynopsis{This module provides a basic request handler for HTTP ! servers.} From python-dev@python.org Tue Oct 10 18:02:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 10:02:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libxdrlib.tex,1.22,1.23 Message-ID: <200010101702.KAA23632@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv23588 Modified Files: libxdrlib.tex Log Message: Minor nit fixes based on suggestions from Ka-Ping Yee . Added "See also" section with relevant RFC references. Index: libxdrlib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxdrlib.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** libxdrlib.tex 1999/04/20 13:41:14 1.22 --- libxdrlib.tex 2000/10/10 17:02:34 1.23 *************** *** 1,13 **** \section{\module{xdrlib} --- ! Encode and decode XDR data.} ! \declaremodule{standard}{xdrlib} \modulesynopsis{Encoders and decoders for the External Data ! Representation (XDR).} \index{XDR} \index{External Data Representation} - The \module{xdrlib} module supports the External Data Representation Standard as described in \rfc{1014}, written by Sun Microsystems, --- 1,12 ---- \section{\module{xdrlib} --- ! Encode and decode XDR data} + \declaremodule{standard}{xdrlib} \modulesynopsis{Encoders and decoders for the External Data ! Representation (XDR).} \index{XDR} \index{External Data Representation} The \module{xdrlib} module supports the External Data Representation Standard as described in \rfc{1014}, written by Sun Microsystems, *************** *** 29,32 **** --- 28,42 ---- \var{data}. \end{classdesc} + + + \begin{seealso} + \seerfc{1014}{XDR: External Data Representation Standard}{This RFC + defined the encoding of data which was XDR at the time + this module was originally written. It has + appearantly been obsoleted by \rfc{1832}.} + + \seerfc{1832}{XDR: External Data Representation Standard}{Newer RFC + that provides a revised definition of XDR.} + \end{seealso} From python-dev@python.org Tue Oct 10 18:03:48 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 10:03:48 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcmd.tex,1.5,1.6 libcurses.tex,1.19,1.20 libdis.tex,1.28,1.29 liberrno.tex,1.10,1.11 libgetopt.tex,1.14,1.15 libimghdr.tex,1.12,1.13 libnew.tex,1.4,1.5 libpprint.tex,1.13,1.14 libqueue.tex,1.10,1.11 libreadline.tex,1.4,1.5 librepr.tex,1.2,1.3 librlcompleter.tex,1.3,1.4 librotor.tex,1.15,1.16 libsignal.tex,1.18,1.19 libsndhdr.tex,1.2,1.3 libsocksvr.tex,1.12,1.13 Message-ID: <200010101703.KAA24890@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24805 Modified Files: libcmd.tex libcurses.tex libdis.tex liberrno.tex libgetopt.tex libimghdr.tex libnew.tex libpprint.tex libqueue.tex libreadline.tex librepr.tex librlcompleter.tex librotor.tex libsignal.tex libsndhdr.tex libsocksvr.tex Log Message: Fixed lots of small nits caught by Ka-Ping Yee . Index: libcmd.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcmd.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** libcmd.tex 2000/07/12 02:56:15 1.5 --- libcmd.tex 2000/10/10 17:03:45 1.6 *************** *** 1,9 **** \section{\module{cmd} --- ! Build line-oriented command interpreters.} \declaremodule{standard}{cmd} \sectionauthor{Eric S. Raymond}{esr@snark.thyrsus.com} ! ! \modulesynopsis{Build line-oriented command interpreters; this is used ! by module \module{pdb}.} --- 1,8 ---- \section{\module{cmd} --- ! Support for line-oriented command interpreters} ! \declaremodule{standard}{cmd} \sectionauthor{Eric S. Raymond}{esr@snark.thyrsus.com} ! \modulesynopsis{Build line-oriented command interpreters.} Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** libcurses.tex 2000/10/06 20:01:23 1.19 --- libcurses.tex 2000/10/10 17:03:45 1.20 *************** *** 1,9 **** \section{\module{curses} --- ! Screen painting and input handling for character-cell terminals} \declaremodule{standard}{curses} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} \sectionauthor{Eric Raymond}{esr@thyrsus.com} ! \modulesynopsis{An interface to the curses library.} \versionchanged[Added support for the \code{ncurses} library and --- 1,10 ---- \section{\module{curses} --- ! Terminal handling for character-cell displays} \declaremodule{standard}{curses} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} \sectionauthor{Eric Raymond}{esr@thyrsus.com} ! \modulesynopsis{An interface to the curses library, providing portable ! terminal handling.} \versionchanged[Added support for the \code{ncurses} library and Index: libdis.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdis.tex,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** libdis.tex 2000/09/12 16:23:48 1.28 --- libdis.tex 2000/10/10 17:03:45 1.29 *************** *** 1,7 **** \section{\module{dis} --- ! Disassembler.} ! \declaremodule{standard}{dis} ! \modulesynopsis{Disassembler.} --- 1,8 ---- \section{\module{dis} --- ! Disassembler for Python byte code} ! \declaremodule{standard}{dis} ! \modulesynopsis{Disassembler for Python byte code, as stored in code ! objects and \file{.pyc}/\file{.pyo} files.} Index: liberrno.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liberrno.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** liberrno.tex 1998/08/10 19:41:43 1.10 --- liberrno.tex 2000/10/10 17:03:45 1.11 *************** *** 1,11 **** \section{\module{errno} --- ! Standard errno system symbols.} ! \declaremodule{standard}{errno} \modulesynopsis{Standard errno system symbols.} - ! This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from \file{linux/include/errno.h}, --- 1,10 ---- \section{\module{errno} --- ! Standard errno system symbols} + \declaremodule{standard}{errno} \modulesynopsis{Standard errno system symbols.} ! This module makes available standard \code{errno} system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from \file{linux/include/errno.h}, *************** *** 22,27 **** Of the following list, symbols that are not used on the current ! platform are not defined by the module. Symbols available can ! include: \begin{datadesc}{EPERM} Operation not permitted \end{datadesc} --- 21,27 ---- Of the following list, symbols that are not used on the current ! platform are not defined by the module. The specific list of defined ! symbols is available as \code{errno.errorcode.keys()}. Symbols ! available can include: \begin{datadesc}{EPERM} Operation not permitted \end{datadesc} Index: libgetopt.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgetopt.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libgetopt.tex 2000/08/11 19:55:06 1.14 --- libgetopt.tex 2000/10/10 17:03:45 1.15 *************** *** 1,7 **** \section{\module{getopt} --- ! Parser for command line options.} ! \declaremodule{standard}{getopt} ! \modulesynopsis{Parser for command line options.} --- 1,8 ---- \section{\module{getopt} --- ! Parser for command line options} ! \declaremodule{standard}{getopt} ! \modulesynopsis{Portable parser for command line options; support both ! short and long option names.} Index: libimghdr.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimghdr.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libimghdr.tex 1999/01/05 22:54:49 1.12 --- libimghdr.tex 2000/10/10 17:03:45 1.13 *************** *** 1,7 **** \section{\module{imghdr} --- ! Determine the type of an image.} ! \declaremodule{standard}{imghdr} ! \modulesynopsis{Determine the type of image contained in a file or byte stream.} --- 1,8 ---- \section{\module{imghdr} --- ! Determine the type of an image} ! \declaremodule{standard}{imghdr} ! \modulesynopsis{Determine the type of image contained in a file or ! byte stream.} Index: libnew.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnew.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libnew.tex 1999/06/29 15:45:09 1.4 --- libnew.tex 2000/10/10 17:03:45 1.5 *************** *** 1,4 **** \section{\module{new} --- ! Runtime implementation object creation} \declaremodule{builtin}{new} --- 1,4 ---- \section{\module{new} --- ! Creation of runtime internal objects} \declaremodule{builtin}{new} Index: libpprint.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpprint.tex,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** libpprint.tex 1999/02/18 21:10:32 1.13 --- libpprint.tex 2000/10/10 17:03:45 1.14 *************** *** 1,4 **** \section{\module{pprint} --- ! Data pretty printer.} \declaremodule{standard}{pprint} --- 1,4 ---- \section{\module{pprint} --- ! Data pretty printer} \declaremodule{standard}{pprint} Index: libqueue.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libqueue.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** libqueue.tex 2000/04/03 20:13:54 1.10 --- libqueue.tex 2000/10/10 17:03:45 1.11 *************** *** 1,8 **** \section{\module{Queue} --- ! A synchronized queue class.} ! \declaremodule{standard}{Queue} \modulesynopsis{A synchronized queue class.} - --- 1,7 ---- \section{\module{Queue} --- ! A synchronized queue class} + \declaremodule{standard}{Queue} \modulesynopsis{A synchronized queue class.} Index: libreadline.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libreadline.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** libreadline.tex 2000/08/09 14:37:05 1.4 --- libreadline.tex 2000/10/10 17:03:45 1.5 *************** *** 5,9 **** \platform{Unix} \sectionauthor{Skip Montanaro}{skip@mojam.com} ! \modulesynopsis{GNU Readline in Python.} --- 5,9 ---- \platform{Unix} \sectionauthor{Skip Montanaro}{skip@mojam.com} ! \modulesynopsis{GNU readline support for Python.} Index: librepr.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librepr.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** librepr.tex 1999/01/28 19:30:49 1.2 --- librepr.tex 2000/10/10 17:03:45 1.3 *************** *** 1,4 **** \section{\module{repr} --- ! Alternate \function{repr()} implementation.} \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} --- 1,4 ---- \section{\module{repr} --- ! Alternate \function{repr()} implementation} \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} Index: librlcompleter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librlcompleter.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** librlcompleter.tex 2000/07/06 04:51:04 1.3 --- librlcompleter.tex 2000/10/10 17:03:45 1.4 *************** *** 1,9 **** \section{\module{rlcompleter} --- ! Completion function for readline} \declaremodule{standard}{rlcompleter} \platform{Unix} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} ! \modulesynopsis{Python identifier completion in the readline library.} The \module{rlcompleter} module defines a completion function for --- 1,9 ---- \section{\module{rlcompleter} --- ! Completion function for GNU readline} \declaremodule{standard}{rlcompleter} \platform{Unix} \sectionauthor{Moshe Zadka}{mzadka@geocities.com} ! \modulesynopsis{Python identifier completion for the GNU readline library.} The \module{rlcompleter} module defines a completion function for Index: librotor.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librotor.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** librotor.tex 2000/07/16 19:01:10 1.15 --- librotor.tex 2000/10/10 17:03:45 1.16 *************** *** 1,6 **** \section{\module{rotor} --- ! Enigma-like encryption and decryption.} ! \declaremodule{builtin}{rotor} \modulesynopsis{Enigma-like encryption and decryption.} --- 1,6 ---- \section{\module{rotor} --- ! Enigma-like encryption and decryption} + \declaremodule{builtin}{rotor} \modulesynopsis{Enigma-like encryption and decryption.} Index: libsignal.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsignal.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libsignal.tex 2000/07/16 19:01:10 1.18 --- libsignal.tex 2000/10/10 17:03:45 1.19 *************** *** 1,8 **** \section{\module{signal} --- ! Set handlers for asynchronous events.} ! \declaremodule{builtin}{signal} ! \modulesynopsis{Set handlers for asynchronous events.} This module provides mechanisms to use signal handlers in Python. --- 1,8 ---- \section{\module{signal} --- ! Set handlers for asynchronous events} + \declaremodule{builtin}{signal} \modulesynopsis{Set handlers for asynchronous events.} + This module provides mechanisms to use signal handlers in Python. Index: libsndhdr.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsndhdr.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** libsndhdr.tex 1999/01/06 15:21:19 1.2 --- libsndhdr.tex 2000/10/10 17:03:45 1.3 *************** *** 1,4 **** \section{\module{sndhdr} --- ! Determine type of sound file.} \declaremodule{standard}{sndhdr} --- 1,4 ---- \section{\module{sndhdr} --- ! Determine type of sound file} \declaremodule{standard}{sndhdr} Index: libsocksvr.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocksvr.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libsocksvr.tex 1999/11/10 16:21:37 1.12 --- libsocksvr.tex 2000/10/10 17:03:45 1.13 *************** *** 1,6 **** \section{\module{SocketServer} --- ! A framework for network servers.} ! \declaremodule{standard}{SocketServer} \modulesynopsis{A framework for network servers.} --- 1,6 ---- \section{\module{SocketServer} --- ! A framework for network servers} + \declaremodule{standard}{SocketServer} \modulesynopsis{A framework for network servers.} From python-dev@python.org Tue Oct 10 19:36:06 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 11:36:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcopyreg.tex,1.7,1.8 Message-ID: <200010101836.LAA19983@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv19896 Modified Files: libcopyreg.tex Log Message: Make it clear that copy_reg.pickle() should not be used for classes, but only for extension types. This partially fixes SourceForge bug #116295. Index: libcopyreg.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcopyreg.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libcopyreg.tex 1999/04/22 21:23:21 1.7 --- libcopyreg.tex 2000/10/10 18:36:02 1.8 *************** *** 21,28 **** \begin{funcdesc}{pickle}{type, function\optional{, constructor}} Declares that \var{function} should be used as a ``reduction'' ! function for objects of type or class \var{type}. \var{function} ! should return either a string or a tuple. The optional ! \var{constructor} parameter, if provided, is a callable object which ! can be used to reconstruct the object when called with the tuple of ! arguments returned by \var{function} at pickling time. \end{funcdesc} --- 21,29 ---- \begin{funcdesc}{pickle}{type, function\optional{, constructor}} Declares that \var{function} should be used as a ``reduction'' ! function for objects of type \var{type}; \var{type} should not a ! class object. \var{function} should return either a string or a ! tuple. The optional \var{constructor} parameter, if provided, is a ! callable object which can be used to reconstruct the object when ! called with the tuple of arguments returned by \var{function} at ! pickling time. \end{funcdesc} From python-dev@python.org Tue Oct 10 20:35:50 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 12:35:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools mksourcepkg,1.2,1.3 Message-ID: <200010101935.MAA19646@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv19522 Modified Files: mksourcepkg Log Message: Substantially revise to handle the fact that Python CVS is no longer in a file-system accessible repository. Add a little bit of smarts to convert the cvsroot to an anonymous cvsroot the real one requires an authenticated login to SourceForge; this avoids the SSH startup delay when doing the checkout or export to get a fresh copy of the tree. Index: mksourcepkg =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/mksourcepkg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** mksourcepkg 2000/04/03 04:19:14 1.2 --- mksourcepkg 2000/10/10 19:35:40 1.3 *************** *** 22,31 **** --- 22,36 ---- import glob import os + import re import shutil import sys import tempfile + import cvsinfo + quiet = 0 + rx = re.compile(r":ext:(?:[a-zA-Z0-9]+)@cvs\.([a-zA-Z0-9]+).sourceforge.net:" + r"/cvsroot/\1") *************** *** 71,94 **** tempdir = tempfile.mktemp() os.mkdir(tempdir) ! os.mkdir(os.path.join(tempdir, "Python-%s" % release)) ! docdir = os.path.join(tempdir, "Python-%s" % release, "Doc") ! os.mkdir(docdir) ! mydir = os.getcwd() if cvstag: ! run("cvs export -r %s -d %s/Python-%s/Doc python/dist/src/Doc" ! % (cvstag, tempdir, release)) else: ! run("cvs checkout -d %s/Python-%s/Doc python/dist/src/Doc" ! % (tempdir, release)) # remove CVS directories - os.chdir("%s/Python-%s" % (tempdir, release)) for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'): map(shutil.rmtree, glob.glob(p)) - os.chdir(mydir) if tools: ! archive = "tools-" + release # we don't want the actual documents in this case: ! for d in ("api", "doc", "ext", "lib", "mac", "ref", "tut"): ! shutil.rmtree(os.path.join(docdir, d)) else: archive = "latex-" + release --- 76,113 ---- tempdir = tempfile.mktemp() os.mkdir(tempdir) ! pkgdir = os.path.join(tempdir, "Python-" + release) ! os.mkdir(pkgdir) ! pwd = os.getcwd() ! mydir = os.path.abspath(os.path.dirname(sys.argv[0])) ! info = cvsinfo.RepositoryInfo(mydir) ! cvsroot = info.get_cvsroot() ! m = rx.match(cvsroot) ! if m: ! # If this is an authenticated SourceForge repository, convert to ! # anonymous usage for the export/checkout, since that avoids the ! # SSH overhead. ! group = m.group(1) ! cvsroot = ":pserver:anonymous@cvs.%s.sourceforge.net:/cvsroot/%s" \ ! % (group, group) ! # For some reason, SourceForge/CVS doesn't seem to care that we ! # might not have done a "cvs login" to the anonymous server. ! # That avoids a lot of painful gunk here. ! os.chdir(pkgdir) ! if not quiet: ! print "--- current directory is:", pkgdir if cvstag: ! run("cvs -d%s export -r %s -d Doc python/dist/src/Doc" ! % (cvsroot, cvstag)) else: ! run("cvs -Q -d%s checkout -d Doc python/dist/src/Doc" % cvsroot) # remove CVS directories for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'): map(shutil.rmtree, glob.glob(p)) if tools: ! archive = "doctools-" + release # we don't want the actual documents in this case: ! for d in ("api", "dist", "doc", "ext", "inst", ! "lib", "mac", "ref", "tut"): ! shutil.rmtree(os.path.join(os.path.join(pkgdir, "Doc"), d)) else: archive = "latex-" + release *************** *** 97,101 **** os.chdir(tempdir) ! archive = os.path.join(mydir, archive) for format in formats: if format == "bzip2": --- 116,120 ---- os.chdir(tempdir) ! archive = os.path.join(pwd, archive) for format in formats: if format == "bzip2": *************** *** 112,116 **** # clean up the work area: ! os.chdir(mydir) shutil.rmtree(tempdir) --- 131,135 ---- # clean up the work area: ! os.chdir(pwd) shutil.rmtree(tempdir) *************** *** 120,124 **** print "+++", cmd if quiet: ! cmd = "(%s) >/dev/null" % cmd rc = os.system(cmd) if rc: --- 139,143 ---- print "+++", cmd if quiet: ! cmd = "%s >/dev/null" % cmd rc = os.system(cmd) if rc: From python-dev@python.org Tue Oct 10 21:23:13 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 13:23:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib liburllib.tex,1.29,1.30 Message-ID: <200010102023.NAA30923@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv30867/lib Modified Files: liburllib.tex Log Message: Remove duplicated text from urlopen() description, noted by Ka-Ping Yee and probably others as well. Index: liburllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib.tex,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** liburllib.tex 2000/09/15 04:12:56 1.29 --- liburllib.tex 2000/10/10 20:23:10 1.30 *************** *** 82,101 **** Proxies which require authentication for use are not currently supported; this is considered an implementation limitation. - - The \function{urlopen()} function works transparently with proxies. - In a \UNIX{} or Windows environment, set the \envvar{http_proxy}, - \envvar{ftp_proxy} or \envvar{gopher_proxy} environment variables to a - URL that identifies the proxy server before starting the Python - interpreter, e.g.: - - \begin{verbatim} - % http_proxy="http://www.someproxy.com:3128" - % export http_proxy - % python - ... - \end{verbatim} - - In a Macintosh environment, \function{urlopen()} will retrieve proxy - information from Internet Config. \end{funcdesc} --- 82,85 ---- From python-dev@python.org Tue Oct 10 21:36:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 13:36:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.49,1.50 Message-ID: <200010102036.NAA08947@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv8904/lib Modified Files: libsocket.tex Log Message: Revise the examples not to use the "from socket import *", and adjust one comment in the example for clarity. Index: libsocket.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** libsocket.tex 2000/09/06 02:22:16 1.49 --- libsocket.tex 2000/10/10 20:36:29 1.50 *************** *** 427,434 **** \begin{verbatim} # Echo server program ! from socket import * HOST = '' # Symbolic name meaning the local host ! PORT = 50007 # Arbitrary non-privileged server ! s = socket(AF_INET, SOCK_STREAM) s.bind((HOST, PORT)) s.listen(1) --- 427,435 ---- \begin{verbatim} # Echo server program ! import socket ! HOST = '' # Symbolic name meaning the local host ! PORT = 50007 # Arbitrary non-privileged port ! s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST, PORT)) s.listen(1) *************** *** 444,451 **** \begin{verbatim} # Echo client program ! from socket import * HOST = 'daring.cwi.nl' # The remote host PORT = 50007 # The same port as used by the server ! s = socket(AF_INET, SOCK_STREAM) s.connect((HOST, PORT)) s.send('Hello, world') --- 445,453 ---- \begin{verbatim} # Echo client program ! import socket ! HOST = 'daring.cwi.nl' # The remote host PORT = 50007 # The same port as used by the server ! s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) s.send('Hello, world') From python-dev@python.org Tue Oct 10 21:58:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 13:58:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libuserdict.tex,1.17,1.18 Message-ID: <200010102058.NAA26130@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv26065/lib Modified Files: libuserdict.tex Log Message: Note that the UserString/MutableString classes are far less efficient than the built-in string types (suggested by Moshe Zadka ). Clarified what "can be converted to a string" means. Fixed a few markup nits. Index: libuserdict.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuserdict.tex,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** libuserdict.tex 2000/10/06 20:04:48 1.17 --- libuserdict.tex 2000/10/10 20:58:48 1.18 *************** *** 93,113 **** \sectionauthor{Peter Funk}{pf@artcom-gmbh.de} ! This module defines a class that acts as a wrapper around ! string objects. It is a useful base class for ! your own string-like classes, which can inherit from ! them and override existing methods or add new ones. In this way one ! can add new behaviors to strings. ! The \module{UserString} module defines the \class{UserString} class: \begin{classdesc}{UserString}{\optional{sequence}} ! Return a class instance that simulates a string or a Unicode string object. ! The instance's content is kept in a regular string or Unicode string ! object, which is accessible via the ! \member{data} attribute of \class{UserString} instances. The instance's ! contents are initially set to a copy of \var{sequence}. ! \var{sequence} can be either a regular Python string or Unicode string, ! an instance of \class{UserString} (or a subclass) or an arbitrary sequence ! which can be converted into a string. \end{classdesc} --- 93,116 ---- \sectionauthor{Peter Funk}{pf@artcom-gmbh.de} ! This module defines a class that acts as a wrapper around string ! objects. It is a useful base class for your own string-like classes, ! which can inherit from them and override existing methods or add new ! ones. In this way one can add new behaviors to strings. ! It should be noted that these classes are highly inefficient compared ! to real string or Unicode objects; this is especially the case for ! \class{MutableString}. + The \module{UserString} module defines the following classes: + \begin{classdesc}{UserString}{\optional{sequence}} ! Return a class instance that simulates a string or a Unicode string ! object. The instance's content is kept in a regular string or Unicode ! string object, which is accessible via the \member{data} attribute of ! \class{UserString} instances. The instance's contents are initially ! set to a copy of \var{sequence}. \var{sequence} can be either a ! regular Python string or Unicode string, an instance of ! \class{UserString} (or a subclass) or an arbitrary sequence which can ! be converted into a string using the built-in \function{str()} function. \end{classdesc} *************** *** 118,129 **** keys. The main intention of this class is to serve as an educational example for inheritance and necessity to remove (override) the ! \function{__hash__} method in order to trap attempts to use a mutable object as dictionary key, which would be otherwise very error prone and hard to track down. \end{classdesc} ! In addition to supporting the methods and operations of string or ! Unicode objects (see section \ref{typesseq}), \class{UserString} instances ! provide the following attribute: \begin{memberdesc}{data} --- 121,133 ---- keys. The main intention of this class is to serve as an educational example for inheritance and necessity to remove (override) the ! \method{__hash__()} method in order to trap attempts to use a mutable object as dictionary key, which would be otherwise very error prone and hard to track down. \end{classdesc} ! In addition to supporting the methods and operations of string and ! Unicode objects (see section \ref{string-methods}, ``String ! Methods''), \class{UserString} instances provide the following ! attribute: \begin{memberdesc}{data} From python-dev@python.org Tue Oct 10 22:10:38 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 14:10:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python errors.c,2.56,2.57 Message-ID: <200010102110.OAA03799@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv3759 Modified Files: errors.c Log Message: Avoid a couple of "value computed is not used" warnings from gcc -Wall; these computations are required for their side effects in traversing the variable arguments list. Reported by Marc-Andre Lemburg . Index: errors.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v retrieving revision 2.56 retrieving revision 2.57 diff -C2 -r2.56 -r2.57 *** errors.c 2000/09/01 23:29:28 2.56 --- errors.c 2000/10/10 21:10:35 2.57 *************** *** 407,411 **** switch (*f) { case 'c': ! va_arg(vargs, int); /* fall through... */ case '%': --- 407,411 ---- switch (*f) { case 'c': ! (void) va_arg(vargs, int); /* fall through... */ case '%': *************** *** 413,417 **** break; case 'd': case 'i': case 'x': ! va_arg(vargs, int); /* 20 bytes should be enough to hold a 64-bit integer */ --- 413,417 ---- break; case 'd': case 'i': case 'x': ! (void) va_arg(vargs, int); /* 20 bytes should be enough to hold a 64-bit integer */ From python-dev@python.org Tue Oct 10 23:00:07 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 15:00:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libdis.tex,1.29,1.30 libimp.tex,1.26,1.27 libmailbox.tex,1.14,1.15 libmimetools.tex,1.18,1.19 libnew.tex,1.5,1.6 libre.tex,1.57,1.58 libsite.tex,1.19,1.20 libuserdict.tex,1.18,1.19 libxmllib.tex,1.28,1.29 Message-ID: <200010102200.PAA10947@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv10866 Modified Files: libdis.tex libimp.tex libmailbox.tex libmimetools.tex libnew.tex libre.tex libsite.tex libuserdict.tex libxmllib.tex Log Message: Fixed a large number of small problems, mostly noted by Detlef Lannert . Index: libdis.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdis.tex,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** libdis.tex 2000/10/10 17:03:45 1.29 --- libdis.tex 2000/10/10 22:00:03 1.30 *************** *** 3,8 **** \declaremodule{standard}{dis} ! \modulesynopsis{Disassembler for Python byte code, as stored in code ! objects and \file{.pyc}/\file{.pyo} files.} --- 3,7 ---- \declaremodule{standard}{dis} ! \modulesynopsis{Disassembler for Python byte code.} *************** *** 36,40 **** \end{verbatim} ! The \module{dis} module defines the following functions: \begin{funcdesc}{dis}{\optional{bytesource}} --- 35,39 ---- \end{verbatim} ! The \module{dis} module defines the following functions and constants: \begin{funcdesc}{dis}{\optional{bytesource}} *************** *** 76,80 **** \begin{datadesc}{opname} ! Sequence of a operation names, indexable using the byte code. \end{datadesc} --- 75,79 ---- \begin{datadesc}{opname} ! Sequence of operation names, indexable using the byte code. \end{datadesc} *************** *** 88,92 **** \begin{datadesc}{hasname} ! Sequence of byte codes that access a attribute by name. \end{datadesc} --- 87,91 ---- \begin{datadesc}{hasname} ! Sequence of byte codes that access an attribute by name. \end{datadesc} *************** *** 100,104 **** \begin{datadesc}{haslocal} ! Sequence of byte codes that access a a local variable. \end{datadesc} --- 99,103 ---- \begin{datadesc}{haslocal} ! Sequence of byte codes that access a local variable. \end{datadesc} *************** *** 197,205 **** \begin{opcodedesc}{BINARY_LSHIFT}{} ! Implements \code{TOS = TOS1 << TOS}. \end{opcodedesc} \begin{opcodedesc}{BINARY_RSHIFT}{} ! Implements \code{TOS = TOS1 >> TOS}. \end{opcodedesc} --- 196,204 ---- \begin{opcodedesc}{BINARY_LSHIFT}{} ! Implements \code{TOS = TOS1 <\code{}< TOS}. \end{opcodedesc} \begin{opcodedesc}{BINARY_RSHIFT}{} ! Implements \code{TOS = TOS1 >\code{}> TOS}. \end{opcodedesc} *************** *** 246,254 **** \begin{opcodedesc}{INPLACE_LSHIFT}{} ! Implements in-place \code{TOS = TOS1 << TOS}. \end{opcodedesc} \begin{opcodedesc}{INPLACE_RSHIFT}{} ! Implements in-place \code{TOS = TOS1 >> TOS}. \end{opcodedesc} --- 245,253 ---- \begin{opcodedesc}{INPLACE_LSHIFT}{} ! Implements in-place \code{TOS = TOS1 <\code{}< TOS}. \end{opcodedesc} \begin{opcodedesc}{INPLACE_RSHIFT}{} ! Implements in-place \code{TOS = TOS1 >\code{}> TOS}. \end{opcodedesc} Index: libimp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimp.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** libimp.tex 2000/07/16 19:01:09 1.26 --- libimp.tex 2000/10/10 22:00:03 1.27 *************** *** 71,82 **** function does more than importing the module: if the module was already imported, it is equivalent to a ! \function{reload()}\bifuncindex{reload}! The ! \var{name} argument indicates the full module name (including the ! package name, if this is a submodule of a package). The \var{file} ! argument is an open file, and \var{filename} is the corresponding ! file name; these can be \code{None} and \code{''}, respectively, when ! the module is not being loaded from a file. The \var{description} ! argument is a tuple as returned by \function{find_module()} describing ! what kind of module must be loaded. If the load is successful, the return value is the module object; --- 71,82 ---- function does more than importing the module: if the module was already imported, it is equivalent to a ! \function{reload()}\bifuncindex{reload}! The \var{name} argument ! indicates the full module name (including the package name, if this is ! a submodule of a package). The \var{file} argument is an open file, ! and \var{filename} is the corresponding file name; these can be ! \code{None} and \code{''}, respectively, when the module is not being ! loaded from a file. The \var{description} argument is a tuple, as ! would be returned by \function{get_suffixes()}, describing what kind ! of module must be loaded. If the load is successful, the return value is the module object; Index: libmailbox.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmailbox.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libmailbox.tex 1999/03/27 05:45:46 1.14 --- libmailbox.tex 2000/10/10 22:00:03 1.15 *************** *** 50,53 **** file object or a class instance simulating a file object, taking care of things like message boundaries if multiple mail messages are ! contained in a single file, etc. \end{methoddesc} --- 50,54 ---- file object or a class instance simulating a file object, taking care of things like message boundaries if multiple mail messages are ! contained in a single file, etc. If no more messages are available, ! this method returns \code{None}. \end{methoddesc} Index: libmimetools.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmimetools.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libmimetools.tex 2000/05/09 16:23:23 1.18 --- libmimetools.tex 2000/10/10 22:00:03 1.19 *************** *** 62,67 **** ! \subsection{Additional Methods of Message objects} ! \nodename{mimetools.Message Methods} The \class{Message} class defines the following methods in --- 62,67 ---- ! \subsection{Additional Methods of Message Objects ! \label{mimetools-message-objects}} The \class{Message} class defines the following methods in *************** *** 70,74 **** \begin{methoddesc}{getplist}{} Return the parameter list of the \code{content-type} header. This is ! a list if strings. For parameters of the form \samp{\var{key}=\var{value}}, \var{key} is converted to lower case but \var{value} is not. For example, if the message contains the header --- 70,74 ---- \begin{methoddesc}{getplist}{} Return the parameter list of the \code{content-type} header. This is ! a list of strings. For parameters of the form \samp{\var{key}=\var{value}}, \var{key} is converted to lower case but \var{value} is not. For example, if the message contains the header Index: libnew.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnew.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** libnew.tex 2000/10/10 17:03:45 1.5 --- libnew.tex 2000/10/10 22:00:03 1.6 *************** *** 28,37 **** \end{funcdesc} ! \begin{funcdesc}{function}{code, globals\optional{, name\optional{argdefs}}} Returns a (Python) function with the given code and globals. If \var{name} is given, it must be a string or \code{None}. If it is a string, the function will have the given name, otherwise the function name will be taken from \code{\var{code}.co_name}. If ! \var{argdefs} is given, it must be a tuple and will be used to the determine the default values of parameters. \end{funcdesc} --- 28,37 ---- \end{funcdesc} ! \begin{funcdesc}{function}{code, globals\optional{, name\optional{, argdefs}}} Returns a (Python) function with the given code and globals. If \var{name} is given, it must be a string or \code{None}. If it is a string, the function will have the given name, otherwise the function name will be taken from \code{\var{code}.co_name}. If ! \var{argdefs} is given, it must be a tuple and will be used to determine the default values of parameters. \end{funcdesc} Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -r1.57 -r1.58 *** libre.tex 2000/10/06 19:59:22 1.57 --- libre.tex 2000/10/10 22:00:03 1.58 *************** *** 181,185 **** be matched later in the string with the \regexp{\e \var{number}} special sequence, described below. To match the literals \character{(} or ! \character{')}, use \regexp{\e(} or \regexp{\e)}, or enclose them inside a character class: \regexp{[(] [)]}. --- 181,185 ---- be matched later in the string with the \regexp{\e \var{number}} special sequence, described below. To match the literals \character{(} or ! \character{)}, use \regexp{\e(} or \regexp{\e)}, or enclose them inside a character class: \regexp{[(] [)]}. Index: libsite.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsite.tex,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** libsite.tex 2000/09/14 20:24:16 1.19 --- libsite.tex 2000/10/10 22:00:03 1.20 *************** *** 23,27 **** \file{lib/site-python} (on \UNIX{}). For each of the distinct head-tail combinations, it sees if it refers to an existing directory, ! and if so, adds to \code{sys.path}, and also inspected for path configuration files. \indexii{site-python}{directory} --- 23,27 ---- \file{lib/site-python} (on \UNIX{}). For each of the distinct head-tail combinations, it sees if it refers to an existing directory, ! and if so, adds to \code{sys.path}, and also inspects the path for configuration files. \indexii{site-python}{directory} Index: libuserdict.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuserdict.tex,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** libuserdict.tex 2000/10/10 20:58:48 1.18 --- libuserdict.tex 2000/10/10 22:00:03 1.19 *************** *** 14,18 **** \begin{classdesc}{UserDict}{\optional{initialdata}} ! Return a class instance that simulates a dictionary. The instance's contents are kept in a regular dictionary, which is accessible via the \member{data} attribute of \class{UserDict} instances. If --- 14,18 ---- \begin{classdesc}{UserDict}{\optional{initialdata}} ! Class that simulates a dictionary. The instance's contents are kept in a regular dictionary, which is accessible via the \member{data} attribute of \class{UserDict} instances. If *************** *** 48,52 **** \begin{classdesc}{UserList}{\optional{list}} ! Return a class instance that simulates a list. The instance's contents are kept in a regular list, which is accessible via the \member{data} attribute of \class{UserList} instances. The instance's --- 48,52 ---- \begin{classdesc}{UserList}{\optional{list}} ! Class that simulates a list. The instance's contents are kept in a regular list, which is accessible via the \member{data} attribute of \class{UserList} instances. The instance's *************** *** 105,109 **** \begin{classdesc}{UserString}{\optional{sequence}} ! Return a class instance that simulates a string or a Unicode string object. The instance's content is kept in a regular string or Unicode string object, which is accessible via the \member{data} attribute of --- 105,109 ---- \begin{classdesc}{UserString}{\optional{sequence}} ! Class that simulates a string or a Unicode string object. The instance's content is kept in a regular string or Unicode string object, which is accessible via the \member{data} attribute of Index: libxmllib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxmllib.tex,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** libxmllib.tex 2000/10/02 22:14:09 1.28 --- libxmllib.tex 2000/10/10 22:00:03 1.29 *************** *** 275,279 **** mentioned element is treated as if the tag name were \code{'http://www.w3.org/TR/REC-html40 a'} and the attribute name as ! if it were \code{'http://www.w3.org/TR/REC-html40 src'}. An older draft of the XML Namespaces proposal is also recognized, but --- 275,279 ---- mentioned element is treated as if the tag name were \code{'http://www.w3.org/TR/REC-html40 a'} and the attribute name as ! if it were \code{'http://www.w3.org/TR/REC-html40 href'}. An older draft of the XML Namespaces proposal is also recognized, but From python-dev@python.org Tue Oct 10 23:07:21 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 10 Oct 2000 15:07:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules newmodule.c,2.27,2.28 Message-ID: <200010102207.PAA16712@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv16648 Modified Files: newmodule.c Log Message: Fix the docstring for new.function(). Based on a comment from Detlef Lannert . Index: newmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -r2.27 -r2.28 *** newmodule.c 2000/09/01 23:29:26 2.27 --- newmodule.c 2000/10/10 22:07:18 2.28 *************** *** 60,64 **** static char new_function_doc[] = ! "Create a function object from (CODE, GLOBALS, [NAME, ARGDEFS])."; static PyObject * --- 60,64 ---- static char new_function_doc[] = ! "Create a function object from (CODE, GLOBALS, [NAME [, ARGDEFS]])."; static PyObject * From python-dev@python.org Wed Oct 11 08:04:52 2000 From: python-dev@python.org (Tim Peters) Date: Wed, 11 Oct 2000 00:04:52 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.207,2.208 Message-ID: <200010110704.AAA12861@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv10651/python/dist/src/python Modified Files: ceval.c Log Message: Attempt to fix bogus gcc -Wall warnings reported by Marc-Andre Lemburg, by making the DUP_TOPX code utterly straightforward. This also gets rid of all normal-case internal DUP_TOPX if/branches, and allows replacing one POP() with TOP() in each case, so is a good idea regardless. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.207 retrieving revision 2.208 diff -C2 -r2.207 -r2.208 *** ceval.c 2000/09/26 05:46:01 2.207 --- ceval.c 2000/10/11 07:04:49 2.208 *************** *** 709,727 **** case DUP_TOPX: switch (oparg) { - case 5: - case 4: - case 3: - case 2: case 1: x = POP(); ! if (oparg == 1) break; w = POP(); ! if (oparg == 2) break; v = POP(); ! if (oparg == 3) break; u = POP(); ! if (oparg == 4) break; ! t = POP(); ! break; default: fprintf(stderr, "Invalid argument to DUP_TOPX: %d!\n", oparg); --- 709,777 ---- case DUP_TOPX: switch (oparg) { case 1: + x = TOP(); + Py_INCREF(x); + PUSH(x); + continue; + case 2: x = POP(); ! Py_INCREF(x); ! w = TOP(); ! Py_INCREF(w); ! PUSH(x); ! PUSH(w); ! PUSH(x); ! continue; ! case 3: ! x = POP(); ! Py_INCREF(x); w = POP(); ! Py_INCREF(w); ! v = TOP(); ! Py_INCREF(v); ! PUSH(w); ! PUSH(x); ! PUSH(v); ! PUSH(w); ! PUSH(x); ! continue; ! case 4: ! x = POP(); ! Py_INCREF(x); ! w = POP(); ! Py_INCREF(w); ! v = POP(); ! Py_INCREF(v); ! u = TOP(); ! Py_INCREF(u); ! PUSH(v); ! PUSH(w); ! PUSH(x); ! PUSH(u); ! PUSH(v); ! PUSH(w); ! PUSH(x); ! continue; ! case 5: ! x = POP(); ! Py_INCREF(x); ! w = POP(); ! Py_INCREF(w); v = POP(); ! Py_INCREF(v); u = POP(); ! Py_INCREF(u); ! t = TOP(); ! Py_INCREF(t); ! PUSH(u); ! PUSH(v); ! PUSH(w); ! PUSH(x); ! PUSH(t); ! PUSH(u); ! PUSH(v); ! PUSH(w); ! PUSH(x); ! continue; default: fprintf(stderr, "Invalid argument to DUP_TOPX: %d!\n", oparg); *************** *** 729,755 **** "invalid argument to DUP_TOPX"); x = NULL; - } - if (x == NULL) break; - switch (oparg) { - case 5: PUSH(t); - Py_INCREF(t); /* Fallthrough */ - case 4: PUSH(u); - Py_INCREF(u); /* Fallthrough */ - case 3: PUSH(v); - Py_INCREF(v); /* Fallthrough */ - case 2: PUSH(w); - Py_INCREF(w); /* Fallthrough */ - case 1: PUSH(x); - Py_INCREF(x); /* Fallthrough */ - } - switch (oparg) { - case 5: PUSH(t); /* Fallthrough */ - case 4: PUSH(u); /* Fallthrough */ - case 3: PUSH(v); /* Fallthrough */ - case 2: PUSH(w); /* Fallthrough */ - case 1: PUSH(x); /* Fallthrough */ } ! continue; case UNARY_POSITIVE: --- 779,785 ---- "invalid argument to DUP_TOPX"); x = NULL; break; } ! break; case UNARY_POSITIVE: From python-dev@python.org Wed Oct 11 14:54:10 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 06:54:10 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.208,2.209 Message-ID: <200010111354.GAA24231@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv24175 Modified Files: ceval.c Log Message: Remove the last gcc -Wall warning about possible use of an uninitialized variable. w should be initialized before entering the bytecode interpretation loop since we only need one initialization to satisfy the compiler. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.208 retrieving revision 2.209 diff -C2 -r2.208 -r2.209 *** ceval.c 2000/10/11 07:04:49 2.208 --- ceval.c 2000/10/11 13:54:07 2.209 *************** *** 579,582 **** --- 579,583 ---- err = 0; x = Py_None; /* Not a reference, just anything non-NULL */ + w = NULL; for (;;) { From python-dev@python.org Wed Oct 11 18:18:15 2000 From: python-dev@python.org (Trent Mick) Date: Wed, 11 Oct 2000 10:18:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include pythonrun.h,2.36,2.37 Message-ID: <200010111718.KAA28610@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv27127/Include Modified Files: pythonrun.h Log Message: Use suggested workaround for PyOS_CheckStack causing failure of test_[s]re.py on Win64. This closes bug http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=116516 Index: pythonrun.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pythonrun.h,v retrieving revision 2.36 retrieving revision 2.37 diff -C2 -r2.36 -r2.37 *** pythonrun.h 2000/09/16 16:31:31 2.36 --- pythonrun.h 2000/10/11 17:18:11 2.37 *************** *** 89,93 **** #define PYOS_STACK_MARGIN 2048 ! #if defined(WIN32) && defined(_MSC_VER) /* Enable stack checking under Microsoft C */ #define USE_STACKCHECK --- 89,93 ---- #define PYOS_STACK_MARGIN 2048 ! #if defined(WIN32) && !defined(MS_WIN64) && defined(_MSC_VER) /* Enable stack checking under Microsoft C */ #define USE_STACKCHECK From python-dev@python.org Wed Oct 11 19:56:03 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 11:56:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libzipfile.tex,1.7,1.8 Message-ID: <200010111856.LAA12821@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12719 Modified Files: libzipfile.tex Log Message: Make sure methods of ZipFile objects are in alphabetical order; the logical groupings are still maintained. Based on a comment by Steve Holden . Index: libzipfile.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzipfile.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libzipfile.tex 2000/10/06 15:29:56 1.7 --- libzipfile.tex 2000/10/11 18:56:00 1.8 *************** *** 112,123 **** \end{methoddesc} - \begin{methoddesc}{namelist}{} - Return a list of archive members by name. - \end{methoddesc} - \begin{methoddesc}{infolist}{} Return a list containing a \class{ZipInfo} object for each member of the archive. The objects are in the same order as their entries in the actual ZIP file on disk if an existing archive was opened. \end{methoddesc} --- 112,123 ---- \end{methoddesc} \begin{methoddesc}{infolist}{} Return a list containing a \class{ZipInfo} object for each member of the archive. The objects are in the same order as their entries in the actual ZIP file on disk if an existing archive was opened. + \end{methoddesc} + + \begin{methoddesc}{namelist}{} + Return a list of archive members by name. \end{methoddesc} From python-dev@python.org Wed Oct 11 22:26:06 2000 From: python-dev@python.org (Barry Warsaw) Date: Wed, 11 Oct 2000 14:26:06 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_grammar.py,1.18,1.19 Message-ID: <200010112126.OAA06520@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv6445 Modified Files: test_grammar.py Log Message: Added test cases for extended printing to an instance. This picked up a bug in JPython where the instance had to have a flush() method. Index: test_grammar.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_grammar.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** test_grammar.py 2000/09/19 20:59:05 1.18 --- test_grammar.py 2000/10/11 21:26:03 1.19 *************** *** 269,276 **** print >> sys.stdout, 0 or 1 ! # test print >> None class Gulp: def write(self, msg): pass def driver(): oldstdout = sys.stdout --- 269,284 ---- print >> sys.stdout, 0 or 1 ! # test printing to an instance class Gulp: def write(self, msg): pass + gulp = Gulp() + print >> gulp, 1, 2, 3 + print >> gulp, 1, 2, 3, + print >> gulp + print >> gulp, 0 or 1, 0 or 1, + print >> gulp, 0 or 1 + + # test print >> None def driver(): oldstdout = sys.stdout From python-dev@python.org Wed Oct 11 22:34:56 2000 From: python-dev@python.org (Guido van Rossum) Date: Wed, 11 Oct 2000 14:34:56 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_StringIO.py,1.3,1.4 Message-ID: <200010112134.OAA13930@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv13878 Modified Files: test_StringIO.py Log Message: Jack Jansen reported that the regression test failed on the Mac where string.letters was much more than expected. Solution: explicit is better than implicit; don't rely on string.letters. Index: test_StringIO.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_StringIO.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_StringIO.py 2000/10/06 19:21:32 1.3 --- test_StringIO.py 2000/10/11 21:34:53 1.4 *************** *** 1,8 **** # Tests StringIO and cStringIO - import string - def do_test(module): ! s = (string.letters+'\n')*5 f = module.StringIO(s) print f.read(10) --- 1,6 ---- # Tests StringIO and cStringIO def do_test(module): ! s = ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+'\n')*5 f = module.StringIO(s) print f.read(10) From python-dev@python.org Wed Oct 11 22:44:05 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 14:44:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules dlmodule.c,2.14,2.15 Message-ID: <200010112144.OAA20776@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv20717 Modified Files: dlmodule.c Log Message: Remove one more gcc -Wall warning. Index: dlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -r2.14 -r2.15 *** dlmodule.c 2000/09/13 16:26:10 2.14 --- dlmodule.c 2000/10/11 21:44:02 2.15 *************** *** 71,75 **** { PyObject *name; ! long (*func)(); long alist[10]; long res; --- 71,76 ---- { PyObject *name; ! long (*func)(long, long, long, long, long, ! long, long, long, long, long); long alist[10]; long res; From python-dev@python.org Wed Oct 11 22:53:37 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 14:53:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mpzmodule.c,2.33,2.34 Message-ID: <200010112153.OAA27782@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27710 Modified Files: mpzmodule.c Log Message: Another gcc -Wall warning squashed: MPZ_divm(): Initialize mpzden to NULL, since it could be Py_XDECREF()ed without being initialized. Index: mpzmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** mpzmodule.c 2000/09/01 23:29:26 2.33 --- mpzmodule.c 2000/10/11 21:53:34 2.34 *************** *** 1210,1214 **** { PyObject *num, *den, *mod; ! mpzobject *mpznum, *mpzden, *mpzmod = NULL; mpzobject *z = NULL; --- 1210,1214 ---- { PyObject *num, *den, *mod; ! mpzobject *mpznum, *mpzden = NULL, *mpzmod = NULL; mpzobject *z = NULL; From python-dev@python.org Wed Oct 11 23:16:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 15:16:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib copy_reg.py,1.3,1.4 Message-ID: <200010112216.PAA15388@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15338 Modified Files: copy_reg.py Log Message: In the module docstring, clarify that this is used to register pickle support for extension types, not classes. pickle(): If the type is a class or if the reduction function is not callable, raise a TypeError. constructor(): If the constructor is not callable, raise TypeError. This (partially) closes SourceForge patch #101859. Index: copy_reg.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/copy_reg.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** copy_reg.py 2000/02/02 15:10:13 1.3 --- copy_reg.py 2000/10/11 22:16:45 1.4 *************** *** 1,8 **** ! """Helper to provide extensibility for pickle/cPickle.""" dispatch_table = {} safe_constructors = {} ! def pickle(ob_type, pickle_function, constructor_ob = None): dispatch_table[ob_type] = pickle_function --- 1,19 ---- ! """Helper to provide extensibility for pickle/cPickle. + This is only useful to add pickle support for extension types defined in + C, not for instances of user-defined classes. + """ + + from types import ClassType as _ClassType + dispatch_table = {} safe_constructors = {} ! def pickle(ob_type, pickle_function, constructor_ob=None): ! if type(ob_type) is _ClassType: ! raise TypeError("copy_reg is not intended for use with classes") ! ! if not callable(pickle_function): ! raise TypeError("reduction functions must be callable") dispatch_table[ob_type] = pickle_function *************** *** 11,14 **** --- 22,27 ---- def constructor(object): + if not callable(object): + raise TypeError("constructors must be callable") safe_constructors[object] = 1 *************** *** 19,21 **** pickle(type(1j), pickle_complex, complex) - --- 32,33 ---- From python-dev@python.org Wed Oct 11 23:17:38 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 15:17:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_copy_reg,NONE,1.1 Message-ID: <200010112217.PAA15971@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv15912/test/output Added Files: test_copy_reg Log Message: Test the exception-raising for error cases in copy_reg. --- NEW FILE --- test_copy_reg Caught expected TypeError: copy_reg is not intended for use with classes Caught expected TypeError: reduction functions must be callable Caught expected TypeError: constructors must be callable From python-dev@python.org Wed Oct 11 23:17:38 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 15:17:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_copy_reg.py,NONE,1.1 Message-ID: <200010112217.PAA15966@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv15912/test Added Files: test_copy_reg.py Log Message: Test the exception-raising for error cases in copy_reg. --- NEW FILE --- import copy_reg class C: pass try: copy_reg.pickle(C, None, None) except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch expected TypeError when registering a class type." print try: copy_reg.pickle(type(1), "not a callable") except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch TypeError " \ "when registering a non-callable reduction function." print try: copy_reg.pickle(type(1), int, "not a callable") except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch TypeError " \ "when registering a non-callable constructor." From python-dev@python.org Wed Oct 11 23:27:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 11 Oct 2000 15:27:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcopyreg.tex,1.8,1.9 Message-ID: <200010112227.PAA24446@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24396/lib Modified Files: libcopyreg.tex Log Message: Document the exceptions that now get raised on invalid parameters. Index: libcopyreg.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcopyreg.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libcopyreg.tex 2000/10/10 18:36:02 1.8 --- libcopyreg.tex 2000/10/11 22:27:51 1.9 *************** *** 16,20 **** \begin{funcdesc}{constructor}{object} ! Declares \var{object} to be a valid constructor. \end{funcdesc} --- 16,22 ---- \begin{funcdesc}{constructor}{object} ! Declares \var{object} to be a valid constructor. If \var{object} is ! not callable (and hence not valid as a constructor), raises ! \exception{TypeError}. \end{funcdesc} *************** *** 26,29 **** callable object which can be used to reconstruct the object when called with the tuple of arguments returned by \var{function} at ! pickling time. \end{funcdesc} --- 28,32 ---- callable object which can be used to reconstruct the object when called with the tuple of arguments returned by \var{function} at ! pickling time. \exception{TypeError} will be raised if ! \var{object} is a class or \var{constructor} is not callable. \end{funcdesc} From python-dev@python.org Wed Oct 11 23:34:07 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Wed, 11 Oct 2000 15:34:07 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom pulldom.py,1.8,1.9 Message-ID: <200010112234.PAA29692@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv29462 Modified Files: pulldom.py Log Message: Added non-ns start and end element methods. Moved appendChild calls from DOMEventStream to PullDOM (parser indep). Removed duplicated sibling pointer setting (duplicated in appendChild). Index: pulldom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** pulldom.py 2000/10/06 22:36:03 1.8 --- pulldom.py 2000/10/11 22:34:04 1.9 *************** *** 52,59 **** parent = self.curNode node.parentNode = parent - if parent.childNodes: - node.previousSibling = parent.childNodes[-1] - node.previousSibling.nextSibling = node self.curNode = node --- 52,57 ---- parent = self.curNode + parent.appendChild(node) node.parentNode = parent self.curNode = node *************** *** 69,79 **** self.curNode = node.parentNode def comment(self, s): node = self.document.createComment(s) parent = self.curNode node.parentNode = parent - if parent.childNodes: - node.previousSibling = parent.childNodes[-1] - node.previousSibling.nextSibling = node self.lastEvent[1] = [(COMMENT, node), None] self.lastEvent = self.lastEvent[1] --- 67,99 ---- self.curNode = node.parentNode + def startElement(self, name, attrs): + node = self.document.createElement(name) + + for aname,value in attrs.items(): + attr = self.document.createAttribute(aname) + attr.value = value + node.setAttributeNode(attr) + + parent = self.curNode + parent.appendChild(node) + node.parentNode = parent + self.curNode = node + + self.lastEvent[1] = [(START_ELEMENT, node), None] + self.lastEvent = self.lastEvent[1] + #self.events.append((START_ELEMENT, node)) + + def endElement(self, name): + node = self.curNode + self.lastEvent[1] = [(END_ELEMENT, node), None] + self.lastEvent = self.lastEvent[1] + #self.events.append((END_ELEMENT, node)) + self.curNode = node.parentNode + def comment(self, s): node = self.document.createComment(s) parent = self.curNode + parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(COMMENT, node), None] self.lastEvent = self.lastEvent[1] *************** *** 82,92 **** def processingInstruction(self, target, data): node = self.document.createProcessingInstruction(target, data) - #self.appendChild(node) parent = self.curNode node.parentNode = parent - if parent.childNodes: - node.previousSibling = parent.childNodes[-1] - node.previousSibling.nextSibling = node self.lastEvent[1] = [(PROCESSING_INSTRUCTION, node), None] self.lastEvent = self.lastEvent[1] --- 102,109 ---- def processingInstruction(self, target, data): node = self.document.createProcessingInstruction(target, data) parent = self.curNode + parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(PROCESSING_INSTRUCTION, node), None] self.lastEvent = self.lastEvent[1] *************** *** 96,103 **** node = self.document.createTextNode(chars[start:start + length]) parent = self.curNode node.parentNode = parent - if parent.childNodes: - node.previousSibling = parent.childNodes[-1] - node.previousSibling.nextSibling = node self.lastEvent[1] = [(IGNORABLE_WHITESPACE, node), None] self.lastEvent = self.lastEvent[1] --- 113,118 ---- node = self.document.createTextNode(chars[start:start + length]) parent = self.curNode + parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(IGNORABLE_WHITESPACE, node), None] self.lastEvent = self.lastEvent[1] *************** *** 106,110 **** def characters(self, chars): node = self.document.createTextNode(chars) ! node.parentNode = self.curNode self.lastEvent[1] = [(CHARACTERS, node), None] self.lastEvent = self.lastEvent[1] --- 121,127 ---- def characters(self, chars): node = self.document.createTextNode(chars) ! parent = self.curNode ! parent.appendChild(node) ! node.parentNode = parent self.lastEvent[1] = [(CHARACTERS, node), None] self.lastEvent = self.lastEvent[1] *************** *** 161,166 **** if cur_node is node: return - if token != END_ELEMENT: - cur_node.parentNode.appendChild(cur_node) event = self.getEvent() --- 178,181 ---- From python-dev@python.org Wed Oct 11 23:35:04 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Wed, 11 Oct 2000 15:35:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax saxutils.py,1.10,1.11 Message-ID: <200010112235.PAA30477@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv30249 Modified Files: saxutils.py Log Message: Added parent attribute with getters and setters on XMLFilterBase. Index: saxutils.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/saxutils.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** saxutils.py 2000/10/06 21:11:20 1.10 --- saxutils.py 2000/10/11 22:35:00 1.11 *************** *** 105,108 **** --- 105,112 ---- through.""" + def __init__(self, parent = None): + xmlreader.XMLReader.__init__(self) + self._parent = parent + # ErrorHandler methods *************** *** 193,196 **** --- 197,208 ---- def setProperty(self, name, value): self._parent.setProperty(name, value) + + # XMLFilter methods + + def getParent(self): + return self._parent + + def setParent(self, parent): + self._parent = parent # --- Utility functions From python-dev@python.org Wed Oct 11 23:36:03 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Wed, 11 Oct 2000 15:36:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.10,1.11 Message-ID: <200010112236.PAA31178@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv30818 Modified Files: test_minidom.py Log Message: Added additional test cases for pulldom modifications. Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** test_minidom.py 2000/10/09 19:57:38 1.10 --- test_minidom.py 2000/10/11 22:35:59 1.11 *************** *** 309,313 **** --- 309,379 ---- def testClonePIDeep(): pass + def testSiblings(): + doc = parseString("text?") + root = doc.documentElement + (pi, text, elm) = root.childNodes + confirm(pi.nextSibling is text and + pi.previousSibling is None and + text.nextSibling is elm and + text.previousSibling is pi and + elm.nextSibling is None and + elm.previousSibling is text, "testSiblings") + + doc.unlink() + + def testParents(): + doc = parseString("") + root = doc.documentElement + elm1 = root.childNodes[0] + (elm2a, elm2b) = elm1.childNodes + elm3 = elm2b.childNodes[0] + + confirm(root.parentNode is doc and + elm1.parentNode is root and + elm2a.parentNode is elm1 and + elm2b.parentNode is elm1 and + elm3.parentNode is elm2b, "testParents") + + doc.unlink() + + def testNonNSElements(): + from xml.dom import pulldom + + pulldom = pulldom.PullDOM() + pulldom.startDocument() + pulldom.startElement("doc", {}) + pulldom.characters("text") + pulldom.startElement("subelm", {}) + pulldom.characters("text") + pulldom.endElement("subelm") + pulldom.characters("text") + pulldom.endElement("doc") + pulldom.endDocument() + + doc = pulldom.document + root = doc.documentElement + (text1, elm1, text2) = root.childNodes + text3 = elm1.childNodes[0] + + confirm(text1.previousSibling is None and + text1.nextSibling is elm1 and + elm1.previousSibling is text1 and + elm1.nextSibling is text2 and + text2.previousSibling is elm1 and + text2.nextSibling is None and + text3.previousSibling is None and + text3.nextSibling is None, "testNonNSElements - siblings") + + confirm(root.parentNode is doc and + text1.parentNode is root and + elm1.parentNode is root and + text2.parentNode is root and + text3.parentNode is elm1, "testNonNSElements - parents") + + doc.unlink() + + # --- MAIN PROGRAM + names=globals().keys() names.sort() From python-dev@python.org Wed Oct 11 23:36:03 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Wed, 11 Oct 2000 15:36:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,1.7,1.8 Message-ID: <200010112236.PAA31179@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv30818/output Modified Files: test_minidom Log Message: Added additional test cases for pulldom modifications. Index: test_minidom =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_minidom,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** test_minidom 2000/10/09 19:57:39 1.7 --- test_minidom 2000/10/11 22:36:00 1.8 *************** *** 111,118 **** --- 111,125 ---- Test Succeeded testInsertBefore Passed assertion: len(Node.allnodes) == 0 + Passed testNonNSElements - siblings + Passed testNonNSElements - parents + Test Succeeded testNonNSElements + Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test Test Succeeded testNonZero Passed assertion: len(Node.allnodes) == 0 + Passed testParents + Test Succeeded testParents + Passed assertion: len(Node.allnodes) == 0 Test Succeeded testParse Passed assertion: len(Node.allnodes) == 0 *************** *** 149,152 **** --- 156,162 ---- Passed assertion: len(Node.allnodes) == 0 Test Succeeded testSetAttrValueandNodeValue + Passed assertion: len(Node.allnodes) == 0 + Passed testSiblings + Test Succeeded testSiblings Passed assertion: len(Node.allnodes) == 0 Test Succeeded testTextNodeRepr From python-dev@python.org Thu Oct 12 00:20:26 2000 From: python-dev@python.org (Thomas Wouters) Date: Wed, 11 Oct 2000 16:20:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.209,2.210 Message-ID: <200010112320.QAA00403@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv31960/Python Modified Files: ceval.c Log Message: Adjust debugging code in the implementation of the DUP_TOPX bytecode, use Py_FatalError() instead, and clarify the message somewhat. As discussed on python-dev. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.209 retrieving revision 2.210 diff -C2 -r2.209 -r2.210 *** ceval.c 2000/10/11 13:54:07 2.209 --- ceval.c 2000/10/11 23:20:09 2.210 *************** *** 776,784 **** continue; default: ! fprintf(stderr, "Invalid argument to DUP_TOPX: %d!\n", oparg); ! PyErr_SetString(PyExc_SystemError, ! "invalid argument to DUP_TOPX"); ! x = NULL; ! break; } break; --- 776,780 ---- continue; default: ! Py_FatalError("invalid argument to DUP_TOPX (bytecode corruption?)"); } break; From python-dev@python.org Thu Oct 12 00:26:15 2000 From: python-dev@python.org (Thomas Wouters) Date: Wed, 11 Oct 2000 16:26:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.210,2.211 Message-ID: <200010112326.QAA03041@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv2557/Python Modified Files: ceval.c Log Message: Do a better job at staying on-screen :P (Sorry, it's late here.) I'm assuming here that the ANSI-C adjacent-string-concatenation technique is allowable, now that Python requires an ANSI C compiler. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.210 retrieving revision 2.211 diff -C2 -r2.210 -r2.211 *** ceval.c 2000/10/11 23:20:09 2.210 --- ceval.c 2000/10/11 23:26:11 2.211 *************** *** 776,780 **** continue; default: ! Py_FatalError("invalid argument to DUP_TOPX (bytecode corruption?)"); } break; --- 776,781 ---- continue; default: ! Py_FatalError("invalid argument to DUP_TOPX" ! " (bytecode corruption?)"); } break; From python-dev@python.org Thu Oct 12 07:10:27 2000 From: python-dev@python.org (Tim Peters) Date: Wed, 11 Oct 2000 23:10:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_math.py,1.5,1.6 Message-ID: <200010120610.XAA16919@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv13972/python/dist/src/Lib/test Modified Files: test_math.py Log Message: Stop raising OverflowError on underflows reported by libm (errno==ERANGE and libm result is 0). Cautiously add a few libm exception test cases: 1. That exp(-huge) returns 0 without exception. 2. That exp(+huge) triggers OverflowError. 3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked with -lieee, it was raising OverflowError due to an accident of the way mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc). Index: test_math.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_math.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_math.py 2000/08/10 04:23:30 1.5 --- test_math.py 2000/10/12 06:10:24 1.6 *************** *** 153,154 **** --- 153,183 ---- testit('tanh(0)', math.tanh(0), 0) testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) + + print 'exceptions' # oooooh, *this* is a x-platform gamble! good luck + + try: + x = math.exp(-1000000000) + except: + # mathmodule.c is failing to weed out underflows from libm, or + # we've got an fp format with huge dynamic range + raise TestFailed("underflowing exp() should not have rasied an exception") + if x != 0: + raise TestFailed("underflowing exp() should have returned 0") + + # If this fails, probably using a strict IEEE-754 conforming libm, and x + # is +Inf afterwards. But Python wants overflows detected by default. + try: + x = math.exp(1000000000) + except OverflowError: + pass + else: + raise TestFailed("overflowing exp() didn't trigger OverflowError") + + # If this fails, it could be a puzzle. One odd possibility is that + # mathmodule.c's CHECK() macro is getting confused while comparing + # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE + # as a result (and so raising OverflowError instead). + try: + x = math.sqrt(-1.0) + except ValueError: + pass From python-dev@python.org Thu Oct 12 07:10:27 2000 From: python-dev@python.org (Tim Peters) Date: Wed, 11 Oct 2000 23:10:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_math,1.3,1.4 Message-ID: <200010120610.XAA16923@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv13972/python/dist/src/Lib/test/output Modified Files: test_math Log Message: Stop raising OverflowError on underflows reported by libm (errno==ERANGE and libm result is 0). Cautiously add a few libm exception test cases: 1. That exp(-huge) returns 0 without exception. 2. That exp(+huge) triggers OverflowError. 3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked with -lieee, it was raising OverflowError due to an accident of the way mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc). Index: test_math =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_math,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_math 2000/08/10 04:23:30 1.3 --- test_math 2000/10/12 06:10:25 1.4 *************** *** 25,26 **** --- 25,27 ---- tan tanh + exceptions From python-dev@python.org Thu Oct 12 07:10:28 2000 From: python-dev@python.org (Tim Peters) Date: Wed, 11 Oct 2000 23:10:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.56,2.57 Message-ID: <200010120610.XAA16928@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv13972/python/dist/src/Modules Modified Files: mathmodule.c Log Message: Stop raising OverflowError on underflows reported by libm (errno==ERANGE and libm result is 0). Cautiously add a few libm exception test cases: 1. That exp(-huge) returns 0 without exception. 2. That exp(+huge) triggers OverflowError. 3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked with -lieee, it was raising OverflowError due to an accident of the way mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc). Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.56 retrieving revision 2.57 diff -C2 -r2.56 -r2.57 *** mathmodule.c 2000/09/16 03:54:24 2.56 --- mathmodule.c 2000/10/12 06:10:25 2.57 *************** *** 1,3 **** - /* Math module -- standard C math library functions, pi and e */ --- 1,2 ---- *************** *** 19,22 **** --- 18,26 ---- #endif + /* RED_FLAG 12-Oct-2000 Tim + * What CHECK does if errno != 0 and x is a NaN is a platform-dependent crap + * shoot. Most (but not all!) platforms will end up setting errno to ERANGE + * then, but EDOM is probably better. + */ #ifdef HUGE_VAL #define CHECK(x) if (errno != 0) ; \ *************** *** 27,41 **** #endif ! static PyObject * ! math_error(void) { if (errno == EDOM) PyErr_SetString(PyExc_ValueError, "math domain error"); ! else if (errno == ERANGE) ! PyErr_SetString(PyExc_OverflowError, "math range error"); else /* Unexpected math error */ PyErr_SetFromErrno(PyExc_ValueError); ! return NULL; } --- 31,63 ---- #endif ! /* Call is_error when errno != 0, and where x is the result libm ! * returned. is_error will usually set up an exception and return ! * true (1), but may return false (0) without setting up an exception. ! */ ! static int ! is_error(double x) { + int result = 1; /* presumption of guilt */ if (errno == EDOM) PyErr_SetString(PyExc_ValueError, "math domain error"); ! else if (errno == ERANGE) { ! /* ANSI C generally requires libm functions to set ERANGE ! * on overflow, but also generally *allows* them to set ! * ERANGE on underflow too. There's no consistency about ! * the latter across platforms. Here we suppress the ! * underflow errors (libm functions should return a zero ! * on underflow, and +- HUGE_VAL on overflow, so testing ! * the result for zero suffices to distinguish the cases). ! */ ! if (x) ! PyErr_SetString(PyExc_OverflowError, ! "math range error"); ! else ! result = 0; ! } else /* Unexpected math error */ PyErr_SetFromErrno(PyExc_ValueError); ! return result; } *************** *** 51,56 **** PyFPE_END_PROTECT(x) CHECK(x); ! if (errno != 0) ! return math_error(); else return PyFloat_FromDouble(x); --- 73,78 ---- PyFPE_END_PROTECT(x) CHECK(x); ! if (errno && is_error(x)) ! return NULL; else return PyFloat_FromDouble(x); *************** *** 68,73 **** PyFPE_END_PROTECT(x) CHECK(x); ! if (errno != 0) ! return math_error(); else return PyFloat_FromDouble(x); --- 90,95 ---- PyFPE_END_PROTECT(x) CHECK(x); ! if (errno && is_error(x)) ! return NULL; else return PyFloat_FromDouble(x); *************** *** 144,150 **** x = frexp(x, &i); CHECK(x); ! if (errno != 0) ! return math_error(); ! return Py_BuildValue("(di)", x, i); } --- 166,173 ---- x = frexp(x, &i); CHECK(x); ! if (errno && is_error(x)) ! return NULL; ! else ! return Py_BuildValue("(di)", x, i); } *************** *** 169,174 **** PyFPE_END_PROTECT(x) CHECK(x); ! if (errno != 0) ! return math_error(); else return PyFloat_FromDouble(x); --- 192,197 ---- PyFPE_END_PROTECT(x) CHECK(x); ! if (errno && is_error(x)) ! return NULL; else return PyFloat_FromDouble(x); *************** *** 198,204 **** #endif CHECK(x); ! if (errno != 0) ! return math_error(); ! return Py_BuildValue("(dd)", x, y); } --- 221,228 ---- #endif CHECK(x); ! if (errno && is_error(x)) ! return NULL; ! else ! return Py_BuildValue("(dd)", x, y); } From python-dev@python.org Thu Oct 12 08:15:57 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 12 Oct 2000 00:15:57 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_math.py,1.6,1.7 Message-ID: <200010120715.AAA01500@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv1071/python/dist/src/lib/test Modified Files: test_math.py Log Message: A Mystery: I somehow managed to delete the last two lines of my test_math.py changes. Here restoring them. Index: test_math.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_math.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_math.py 2000/10/12 06:10:24 1.6 --- test_math.py 2000/10/12 07:15:55 1.7 *************** *** 182,183 **** --- 182,185 ---- except ValueError: pass + else: + raise TestFailed("sqrt(-1) didn't raise ValueError") From python-dev@python.org Thu Oct 12 15:46:03 2000 From: python-dev@python.org (Barry Warsaw) Date: Thu, 12 Oct 2000 07:46:03 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unpack.py,1.3,1.4 Message-ID: <200010121446.HAA12554@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv12506 Modified Files: test_unpack.py Log Message: Added some single tuple/list unpacking for JPython regression testing. Index: test_unpack.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unpack.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_unpack.py 2000/08/18 14:50:20 1.3 --- test_unpack.py 2000/10/12 14:45:58 1.4 *************** *** 48,51 **** --- 48,63 ---- raise TestFailed + # single element unpacking, with extra syntax + if verbose: + print 'unpack single tuple/list' + st = (99,) + sl = [100] + a, = st + if a <> 99: + raise TestFailed + b, = sl + if b <> 100: + raise TestFailed + # now for some failures From python-dev@python.org Thu Oct 12 17:01:59 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:01:59 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_fcntl.py,1.10,1.11 Message-ID: <200010121601.JAA09256@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv9194 Modified Files: test_fcntl.py Log Message: Anonymous patch to add Darwin 1.2 to the list of BSDs. Let's hope this is correct (I'm not sure why the sys.platform would be 'Darwin1.2' rather than 'darwin1', which seems to be the convention). Someone with Darwin please test this! Index: test_fcntl.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_fcntl.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** test_fcntl.py 2000/09/26 00:31:18 1.10 --- test_fcntl.py 2000/10/12 16:01:55 1.11 *************** *** 17,21 **** print 'Status from fnctl with O_NONBLOCK: ', rv ! if sys.platform in ('netbsd1', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4', --- 17,21 ---- print 'Status from fnctl with O_NONBLOCK: ', rv ! if sys.platform in ('netbsd1', 'Darwin1.2', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4', From python-dev@python.org Thu Oct 12 17:13:51 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:13:51 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.34,1.35 Message-ID: <200010121613.JAA18502@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv18458 Modified Files: pep-0042.txt Log Message: Pleas for Unicode support in (e.g.) urllib.quote(). Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** pep-0042.txt 2000/10/07 15:53:43 1.34 --- pep-0042.txt 2000/10/12 16:13:48 1.35 *************** *** 191,194 **** --- 191,201 ---- [No bug report; I just thought of this.] + - More standard library routines should support Unicode. For + example, urllib.quote() could convert Unicode strings to UTF-8 + and then do the usual %HH conversion. But this is not the only + one! + + http://sourceforge.net/bugs/?func=detailbug&bug_id=116716&group_id=5470 + Tools From python-dev@python.org Thu Oct 12 17:17:39 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:17:39 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.35,1.36 Message-ID: <200010121617.JAA21606@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv21565 Modified Files: pep-0042.txt Log Message: Wish about dependent buffer objects. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** pep-0042.txt 2000/10/12 16:13:48 1.35 --- pep-0042.txt 2000/10/12 16:17:36 1.36 *************** *** 73,76 **** --- 73,84 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=115555&group_id=5470 + - The buffer interface could be smarter when a buffer object is + created that depends on another buffer object -- if the + original buffer object has no base, the depending object will + have no base either. It could be argued that the depending + object should have the original object as a base. Or not. + + http://sourceforge.net/bugs/?func=detailbug&bug_id=116405&group_id=5470 + Standard Library From python-dev@python.org Thu Oct 12 17:45:40 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:45:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib StringIO.py,1.11,1.12 Message-ID: <200010121645.JAA09960@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9919 Modified Files: StringIO.py Log Message: [ Bug #116636 ] Bug in StringIO.write() http://sourceforge.net/bugs/?func=detailbug&bug_id=116636&group_id=5470 bobalex@rsv.ricoh.com Bug report: If the file position is less than the end of the "file", and a write is performed extending past then end of the file, the data string is corrupted. Solution: in write(), when writing past the end, properly set self.len when newpos is > self.len. Index: StringIO.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/StringIO.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** StringIO.py 2000/09/28 04:21:06 1.11 --- StringIO.py 2000/10/12 16:45:37 1.12 *************** *** 130,133 **** --- 130,135 ---- self.buflist = [self.buf[:self.pos], s, self.buf[newpos:]] self.buf = '' + if newpos > self.len: + self.len = newpos else: self.buflist.append(s) From python-dev@python.org Thu Oct 12 17:46:31 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:46:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_StringIO.py,1.4,1.5 Message-ID: <200010121646.JAA10772@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv10725 Modified Files: test_StringIO.py Log Message: Added a test for the StringIO write() error I just fixed. Index: test_StringIO.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_StringIO.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_StringIO.py 2000/10/11 21:34:53 1.4 --- test_StringIO.py 2000/10/12 16:46:28 1.5 *************** *** 9,12 **** --- 9,19 ---- f = module.StringIO() + f.write('abcdef') + f.seek(3) + f.write('uvwxyz') + f.write('!') + print `f.getvalue()` + f.close() + f = module.StringIO() f.write(s) f.seek(10) From python-dev@python.org Thu Oct 12 17:46:31 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 09:46:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_StringIO,1.3,1.4 Message-ID: <200010121646.JAA10776@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv10725/output Modified Files: test_StringIO Log Message: Added a test for the StringIO write() error I just fixed. Index: test_StringIO =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_StringIO,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_StringIO 2000/10/07 16:58:11 1.3 --- test_StringIO 2000/10/12 16:46:28 1.4 *************** *** 4,7 **** --- 4,8 ---- 2 + 'abcuvwxyz!' 'abcdefghij' 'abcde' *************** *** 12,15 **** --- 13,17 ---- 2 + 'abcuvwxyz!' 'abcdefghij' 'abcde' From python-dev@python.org Thu Oct 12 18:11:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 10:11:41 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.171,1.172 configure,1.163,1.164 Message-ID: <200010121711.KAA00584@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv523 Modified Files: configure.in configure Log Message: When we know the compiler is GCC, always add the -Wall and -Wstrict-prototypes options. This will make it a lot easier to keep warnings under control in the first place in the future. There is one known warning at this time, caught by the -Wstrict-prototypes option. In Modules/main.c, the declaration of getopt() without parameters gets a complaint (rightly) that it is not a proper prototype. The lack of a complete prototype information should be corrected when the right portability conditions have been identified. Approved by the Guido. Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -r1.171 -r1.172 *** configure.in 2000/10/09 20:18:32 1.171 --- configure.in 2000/10/12 17:11:38 1.172 *************** *** 309,314 **** yes) case $ac_cv_prog_cc_g in ! yes) OPT="-g -O2";; ! *) OPT="-O2";; esac ;; --- 309,314 ---- yes) case $ac_cv_prog_cc_g in ! yes) OPT="-g -O2 -Wall -Wstrict-prototypes";; ! *) OPT="-O2 -Wall -Wstrict-prototypes";; esac ;; Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -r1.163 -r1.164 *** configure 2000/10/09 21:48:02 1.163 --- configure 2000/10/12 17:11:38 1.164 *************** *** 4,8 **** # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 4,8 ---- # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. [...4127 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) --- 6031,6035 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6309,6312 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 6335,6338 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 From python-dev@python.org Thu Oct 12 18:14:49 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 10:14:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.113,1.114 Message-ID: <200010121714.KAA03229@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv2266 Modified Files: _tkinter.c Log Message: Fix for Bug #116453. Direct use of interp->result is deprecated; changing this to Tcl_GetStringResult(interp) everywhere fixed the problem of losing the error message with TclError exceptions, on Windows. Index: _tkinter.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -r1.113 -r1.114 *** _tkinter.c 2000/10/06 16:58:26 1.113 --- _tkinter.c 2000/10/12 17:14:46 1.114 *************** *** 210,214 **** #define Tkapp_Check(v) ((v)->ob_type == &Tkapp_Type) #define Tkapp_Interp(v) (((TkappObject *) (v))->interp) ! #define Tkapp_Result(v) (((TkappObject *) (v))->interp->result) #define DEBUG_REFCNT(v) (printf("DEBUG: id=%p, refcnt=%i\n", \ --- 210,214 ---- #define Tkapp_Check(v) ((v)->ob_type == &Tkapp_Type) #define Tkapp_Interp(v) (((TkappObject *) (v))->interp) ! #define Tkapp_Result(v) Tcl_GetStringResult(Tkapp_Interp(v)) #define DEBUG_REFCNT(v) (printf("DEBUG: id=%p, refcnt=%i\n", \ *************** *** 421,429 **** main = Tk_MainWindow(interp); if (Tcl_Init(interp) == TCL_ERROR) { ! PySys_WriteStderr("Tcl_Init error: %s\n", interp->result); return TCL_ERROR; } if (Tk_Init(interp) == TCL_ERROR) { ! PySys_WriteStderr("Tk_Init error: %s\n", interp->result); return TCL_ERROR; } --- 421,429 ---- main = Tk_MainWindow(interp); if (Tcl_Init(interp) == TCL_ERROR) { ! PySys_WriteStderr("Tcl_Init error: %s\n", Tcl_GetStringResult(interp)); return TCL_ERROR; } if (Tk_Init(interp) == TCL_ERROR) { ! PySys_WriteStderr("Tk_Init error: %s\n", Tcl_GetStringResult(interp)); return TCL_ERROR; } *************** *** 740,750 **** if (Py_VerboseFlag >= 2) PySys_WriteStderr("... error: '%s'\n", ! interp->result); Tkinter_Error(self); } else { if (Py_VerboseFlag >= 2) ! PySys_WriteStderr("-> '%s'\n", interp->result); ! res = PyString_FromString(interp->result); } LEAVE_OVERLAP_TCL --- 740,750 ---- if (Py_VerboseFlag >= 2) PySys_WriteStderr("... error: '%s'\n", ! Tcl_GetStringResult(interp)); Tkinter_Error(self); } else { if (Py_VerboseFlag >= 2) ! PySys_WriteStderr("-> '%s'\n", Tcl_GetStringResult(interp)); ! res = PyString_FromString(Tcl_GetStringResult(interp)); } LEAVE_OVERLAP_TCL From python-dev@python.org Thu Oct 12 18:31:41 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 12 Oct 2000 10:31:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.11,1.12 Message-ID: <200010121731.KAA17317@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv16980 Modified Files: test_minidom.py Log Message: cosmetic changes only: use standard Python style for whitespace near = and () Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** test_minidom.py 2000/10/11 22:35:59 1.11 --- test_minidom.py 2000/10/12 17:31:36 1.12 *************** *** 16,20 **** del base ! def confirm( test, testname="Test" ): if test: print "Passed " + testname --- 16,20 ---- del base ! def confirm(test, testname = "Test"): if test: print "Passed " + testname *************** *** 23,43 **** raise Exception ! Node._debug=1 def testParseFromFile(): from StringIO import StringIO ! dom=parse( StringIO( open( tstfile ).read() ) ) dom.unlink() confirm(isinstance(dom,Document)) ! def testGetElementsByTagName( ): ! dom=parse( tstfile ) ! confirm( dom.getElementsByTagName( "LI" )==\ ! dom.documentElement.getElementsByTagName( "LI" ) ) dom.unlink() ! def testInsertBefore( ): ! dom=parse( tstfile ) ! docel=dom.documentElement #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[1]) --- 23,43 ---- raise Exception ! Node._debug = 1 def testParseFromFile(): from StringIO import StringIO ! dom = parse(StringIO(open(tstfile).read())) dom.unlink() confirm(isinstance(dom,Document)) ! def testGetElementsByTagName(): ! dom = parse(tstfile) ! confirm(dom.getElementsByTagName("LI") == \ ! dom.documentElement.getElementsByTagName("LI")) dom.unlink() ! def testInsertBefore(): ! dom = parse(tstfile) ! docel = dom.documentElement #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[1]) *************** *** 46,170 **** # docel.childNodes[0]) ! #confirm( docel.childNodes[0].tet=="a" ) ! #confirm( docel.childNodes[2].tet=="a" ) dom.unlink() def testAppendChild(): ! dom=parse( tstfile ) ! dom.documentElement.appendChild( dom.createComment( u"Hello" )) ! confirm( dom.documentElement.childNodes[-1].nodeName=="#comment" ) ! confirm( dom.documentElement.childNodes[-1].data=="Hello" ) dom.unlink() def testNonZero(): ! dom=parse( tstfile ) ! confirm( dom )# should not be zero ! dom.appendChild( dom.createComment( "foo" ) ) ! confirm( not dom.childNodes[-1].childNodes ) dom.unlink() def testUnlink(): ! dom=parse( tstfile ) dom.unlink() def testElement(): ! dom=Document() ! dom.appendChild( dom.createElement( "abc" ) ) ! confirm( dom.documentElement ) dom.unlink() def testAAA(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam2" ) dom.unlink() def testAAB(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam" ) ! el.setAttribute( "spam", "jam2" ) dom.unlink() def testAddAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! child.setAttribute( "def", "ghi" ) ! confirm( child.getAttribute( "def" )=="ghi" ) ! confirm( child.attributes["def"].value=="ghi" ) ! child.setAttribute( "jkl", "mno" ) ! confirm( child.getAttribute( "jkl" )=="mno" ) ! confirm( child.attributes["jkl"].value=="mno" ) ! confirm( len( child.attributes )==2 ) ! child.setAttribute( "def", "newval" ) ! confirm( child.getAttribute( "def" )=="newval" ) ! confirm( child.attributes["def"].value=="newval" ) ! confirm( len( child.attributes )==2 ) dom.unlink() def testDeleteAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! confirm( len( child.attributes)==0 ) ! child.setAttribute( "def", "ghi" ) ! confirm( len( child.attributes)==1 ) del child.attributes["def"] ! confirm( len( child.attributes)==0 ) dom.unlink() def testRemoveAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! child.setAttribute( "def", "ghi" ) ! confirm( len( child.attributes)==1 ) ! child.removeAttribute("def" ) ! confirm( len( child.attributes)==0 ) dom.unlink() def testRemoveAttrNS(): ! dom=Document() ! child=dom.appendChild( ! dom.createElementNS( "http://www.python.org", "python:abc" ) ) ! child.setAttributeNS( "http://www.w3.org", "xmlns:python", ! "http://www.python.org" ) ! child.setAttributeNS( "http://www.python.org", "python:abcattr", "foo" ) ! confirm( len( child.attributes )==2 ) ! child.removeAttributeNS( "http://www.python.org", "abcattr" ) ! confirm( len( child.attributes )==1 ) dom.unlink() def testRemoveAttributeNode(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "foo" ) ) ! child.setAttribute( "spam", "jam" ) ! confirm( len( child.attributes )==1 ) ! node=child.getAttributeNode( "spam" ) ! child.removeAttributeNode( node ) ! confirm( len( child.attributes )==0 ) dom.unlink() def testChangeAttr(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam" ) ! confirm( len( el.attributes )==1 ) ! el.setAttribute( "spam", "bam" ) ! confirm( len( el.attributes )==1 ) ! el.attributes["spam"]="ham" ! confirm( len( el.attributes )==1 ) ! el.setAttribute( "spam2", "bam" ) ! confirm( len( el.attributes )==2 ) ! el.attributes[ "spam2"]= "bam2" ! confirm( len( el.attributes )==2 ) dom.unlink() --- 46,170 ---- # docel.childNodes[0]) ! #confirm( docel.childNodes[0].tet == "a") ! #confirm( docel.childNodes[2].tet == "a") dom.unlink() def testAppendChild(): ! dom = parse(tstfile) ! dom.documentElement.appendChild(dom.createComment(u"Hello")) ! confirm(dom.documentElement.childNodes[-1].nodeName == "#comment") ! confirm(dom.documentElement.childNodes[-1].data == "Hello") dom.unlink() def testNonZero(): ! dom = parse(tstfile) ! confirm(dom)# should not be zero ! dom.appendChild(dom.createComment("foo")) ! confirm(not dom.childNodes[-1].childNodes) dom.unlink() def testUnlink(): ! dom = parse(tstfile) dom.unlink() def testElement(): ! dom = Document() ! dom.appendChild(dom.createElement("abc")) ! confirm(dom.documentElement) dom.unlink() def testAAA(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam2") dom.unlink() def testAAB(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam") ! el.setAttribute("spam", "jam2") dom.unlink() def testAddAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! child.setAttribute("def", "ghi") ! confirm(child.getAttribute("def") == "ghi") ! confirm(child.attributes["def"].value == "ghi") ! child.setAttribute("jkl", "mno") ! confirm(child.getAttribute("jkl") == "mno") ! confirm(child.attributes["jkl"].value == "mno") ! confirm(len(child.attributes) == 2) ! child.setAttribute("def", "newval") ! confirm(child.getAttribute("def") == "newval") ! confirm(child.attributes["def"].value == "newval") ! confirm(len(child.attributes) == 2) dom.unlink() def testDeleteAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! confirm(len(child.attributes) == 0) ! child.setAttribute("def", "ghi") ! confirm(len(child.attributes) == 1) del child.attributes["def"] ! confirm(len(child.attributes) == 0) dom.unlink() def testRemoveAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! child.setAttribute("def", "ghi") ! confirm(len(child.attributes) == 1) ! child.removeAttribute("def") ! confirm(len(child.attributes) == 0) dom.unlink() def testRemoveAttrNS(): ! dom = Document() ! child = dom.appendChild( ! dom.createElementNS("http://www.python.org", "python:abc")) ! child.setAttributeNS("http://www.w3.org", "xmlns:python", ! "http://www.python.org") ! child.setAttributeNS("http://www.python.org", "python:abcattr", "foo") ! confirm(len(child.attributes) == 2) ! child.removeAttributeNS("http://www.python.org", "abcattr") ! confirm(len(child.attributes) == 1) dom.unlink() def testRemoveAttributeNode(): ! dom = Document() ! child = dom.appendChild(dom.createElement("foo")) ! child.setAttribute("spam", "jam") ! confirm(len(child.attributes) == 1) ! node = child.getAttributeNode("spam") ! child.removeAttributeNode(node) ! confirm(len(child.attributes) == 0) dom.unlink() def testChangeAttr(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam") ! confirm(len(el.attributes) == 1) ! el.setAttribute("spam", "bam") ! confirm(len(el.attributes) == 1) ! el.attributes["spam"] = "ham" ! confirm(len(el.attributes) == 1) ! el.setAttribute("spam2", "bam") ! confirm(len(el.attributes) == 2) ! el.attributes[ "spam2"] = "bam2" ! confirm(len(el.attributes) == 2) dom.unlink() *************** *** 187,225 **** def testElementReprAndStr(): ! dom=Document() ! el=dom.appendChild( dom.createElement( "abc" ) ) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicode(): ! dom=Document() ! el=dom.appendChild( dom.createElement( u"abc" ) ) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicodeNS(): ! dom=Document() ! el=dom.appendChild( ! dom.createElementNS( u"http://www.slashdot.org", u"slash:abc" )) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) ! confirm( string1.find("slash:abc" )!=-1 ) dom.unlink() ! confirm( len( Node.allnodes )==0 ) def testAttributeRepr(): ! dom=Document() ! el=dom.appendChild( dom.createElement( u"abc" ) ) ! node=el.setAttribute( "abc", "def" ) ! confirm( str( node ) == repr( node ) ) dom.unlink() ! confirm( len( Node.allnodes )==0 ) def testTextNodeRepr(): pass --- 187,225 ---- def testElementReprAndStr(): ! dom = Document() ! el = dom.appendChild(dom.createElement("abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicode(): ! dom = Document() ! el = dom.appendChild(dom.createElement(u"abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicodeNS(): ! dom = Document() ! el = dom.appendChild( ! dom.createElementNS(u"http://www.slashdot.org", u"slash:abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) ! confirm(string1.find("slash:abc") != -1) dom.unlink() ! confirm(len(Node.allnodes) == 0) def testAttributeRepr(): ! dom = Document() ! el = dom.appendChild(dom.createElement(u"abc")) ! node = el.setAttribute("abc", "def") ! confirm(str(node) == repr(node)) dom.unlink() ! confirm(len(Node.allnodes) == 0) def testTextNodeRepr(): pass *************** *** 231,235 **** dom.unlink() confirm(str == domstr) ! confirm( len( Node.allnodes )==0 ) def testProcessingInstruction(): pass --- 231,235 ---- dom.unlink() confirm(str == domstr) ! confirm(len(Node.allnodes) == 0) def testProcessingInstruction(): pass *************** *** 376,387 **** # --- MAIN PROGRAM ! names=globals().keys() names.sort() ! works=1 for name in names: ! if name.startswith( "test" ): ! func=globals()[name] try: func() --- 376,387 ---- # --- MAIN PROGRAM ! names = globals().keys() names.sort() ! works = 1 for name in names: ! if name.startswith("test"): ! func = globals()[name] try: func() *************** *** 389,393 **** confirm(len(Node.allnodes) == 0, "assertion: len(Node.allnodes) == 0") ! if len( Node.allnodes ): print "Garbage left over:" if verbose: --- 389,393 ---- confirm(len(Node.allnodes) == 0, "assertion: len(Node.allnodes) == 0") ! if len(Node.allnodes): print "Garbage left over:" if verbose: *************** *** 397,407 **** # are needed print len(Node.allnodes) ! Node.allnodes={} ! except Exception, e : ! works=0 print "Test Failed: ", name ! apply( traceback.print_exception, sys.exc_info() ) print `e` ! Node.allnodes={} if works: --- 397,407 ---- # are needed print len(Node.allnodes) ! Node.allnodes = {} ! except Exception, e: ! works = 0 print "Test Failed: ", name ! traceback.print_exception(*sys.exc_info()) print `e` ! Node.allnodes = {} if works: From python-dev@python.org Thu Oct 12 19:54:21 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 12 Oct 2000 11:54:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib urllib2.py,1.5,1.6 Message-ID: <200010121854.LAA06610@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2932 Modified Files: urllib2.py Log Message: two fixes for redirects: - don't close the fp, since that appears to also close the socket - join the original url with the redirect reponse to deal with relative redirect URL wrap two socket ops in try/except to turn them into URLErrors, so that client code need only catch one exception. in HTTPError.__del__ only close fp if fp is not None style changes: - use f(*args) instead of apply(f, args) - use __super_init instead of super.__init__(self, ...) Index: urllib2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/urllib2.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** urllib2.py 2000/07/16 12:04:30 1.5 --- urllib2.py 2000/10/12 18:54:18 1.6 *************** *** 156,162 **** class HTTPError(URLError, addinfourl): """Raised when HTTP error occurs, but also acts like non-error return""" def __init__(self, url, code, msg, hdrs, fp): ! addinfourl.__init__(self, fp, hdrs, url) self.code = code self.msg = msg --- 156,163 ---- class HTTPError(URLError, addinfourl): """Raised when HTTP error occurs, but also acts like non-error return""" + __super_init = addinfourl.__init__ def __init__(self, url, code, msg, hdrs, fp): ! self.__super_init(fp, hdrs, url) self.code = code self.msg = msg *************** *** 172,176 **** # XXX is this safe? what if user catches exception, then # extracts fp and discards exception? ! self.fp.close() class GopherError(URLError): --- 173,178 ---- # XXX is this safe? what if user catches exception, then # extracts fp and discards exception? ! if self.fp: ! self.fp.close() class GopherError(URLError): *************** *** 216,219 **** --- 218,222 ---- if self.type is None: self.type, self.__r_type = splittype(self.__original) + assert self.type is not None, self.__original return self.type *************** *** 298,302 **** for handler in handlers: func = getattr(handler, meth_name) ! result = apply(func, args) if result is not None: return result --- 301,306 ---- for handler in handlers: func = getattr(handler, meth_name) ! ! result = func(*args) if result is not None: return result *************** *** 319,323 **** type_ = req.get_type() result = self._call_chain(self.handle_open, type_, type_ + \ ! '_open', req) if result: return result --- 323,327 ---- type_ = req.get_type() result = self._call_chain(self.handle_open, type_, type_ + \ ! '_open', req) if result: return result *************** *** 339,343 **** http_err = 0 args = (dict, proto, meth_name) + args ! result = apply(self._call_chain, args) if result: return result --- 343,347 ---- http_err = 0 args = (dict, proto, meth_name) + args ! result = self._call_chain(*args) if result: return result *************** *** 345,349 **** if http_err: args = (dict, 'default', 'http_error_default') + orig_args ! return apply(self._call_chain, args) def is_callable(obj): --- 349,353 ---- if http_err: args = (dict, 'default', 'http_error_default') + orig_args ! return self._call_chain(*args) def is_callable(obj): *************** *** 441,444 **** --- 445,450 ---- fp.close() + newurl = urlparse.urljoin(req.get_full_url(), newurl) + # XXX Probably want to forget about the state of the current # request, although that might interact poorly with other *************** *** 728,744 **** raise URLError('no host given') ! h = httplib.HTTP(host) # will parse host:port ! ## h.set_debuglevel(1) ! if req.has_data(): ! data = req.get_data() ! h.putrequest('POST', req.get_selector()) ! h.putheader('Content-type', 'application/x-www-form-urlencoded') ! h.putheader('Content-length', '%d' % len(data)) ! else: ! h.putrequest('GET', req.get_selector()) # XXX proxies would have different host here h.putheader('Host', host) for args in self.parent.addheaders: ! apply(h.putheader, args) for k, v in req.headers.items(): h.putheader(k, v) --- 734,754 ---- raise URLError('no host given') ! try: ! h = httplib.HTTP(host) # will parse host:port ! if req.has_data(): ! data = req.get_data() ! h.putrequest('POST', req.get_selector()) ! h.putheader('Content-type', ! 'application/x-www-form-urlencoded') ! h.putheader('Content-length', '%d' % len(data)) ! else: ! h.putrequest('GET', req.get_selector()) ! except socket.error, err: ! raise URLError(err) ! # XXX proxies would have different host here h.putheader('Host', host) for args in self.parent.addheaders: ! h.putheader(*args) for k, v in req.headers.items(): h.putheader(k, v) *************** *** 752,761 **** return addinfourl(fp, hdrs, req.get_full_url()) else: - # want to make sure the socket is closed, even if error - # handling doesn't return immediately. the socket won't - # actually be closed until fp is also closed. - if h.sock: - h.sock.close() - h.sock = None return self.parent.error('http', req, fp, code, msg, hdrs) --- 762,765 ---- *************** *** 860,864 **** raise IOError, ('ftp error', 'no host given') # XXX handle custom username & password ! host = socket.gethostbyname(host) host, port = splitport(host) if port is None: --- 864,871 ---- raise IOError, ('ftp error', 'no host given') # XXX handle custom username & password ! try: ! host = socket.gethostbyname(host) ! except socket.error, msg: ! raise URLError(msg) host, port = splitport(host) if port is None: *************** *** 989,993 **** if socket.gethostname() == 'bitdiddle': localhost = 'bitdiddle.cnri.reston.va.us' ! elif socket.gethostname() == 'walden': localhost = 'localhost' else: --- 996,1000 ---- if socket.gethostname() == 'bitdiddle': localhost = 'bitdiddle.cnri.reston.va.us' ! elif socket.gethostname() == 'bitdiddle.concentric.net': localhost = 'localhost' else: From python-dev@python.org Thu Oct 12 20:26:01 2000 From: python-dev@python.org (Thomas Heller) Date: Thu, 12 Oct 2000 12:26:01 -0700 Subject: [Python-checkins] CVS: distutils/misc archive.h,1.2,1.3 extract.c,1.3,1.4 install.c,1.7,1.8 wininst.exe,1.5,1.6 Message-ID: <200010121926.MAA09394@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv6041 Modified Files: archive.h extract.c install.c wininst.exe Log Message: Extracting files did look at fields in the zip-datastructures which are not always valid, now they only look into valid fields. SOme function signatures had to be changed, because we no longer pass structures around, but the fields instead. Recompiled wininst.exe. Index: archive.h =================================================================== RCS file: /cvsroot/python/distutils/misc/archive.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** archive.h 2000/09/07 07:36:40 1.2 --- archive.h 2000/10/12 19:25:58 1.3 *************** *** 60,69 **** typedef int (*NOTIFYPROC)(int code, LPSTR text, ...); ! extern BOOL extract_file (char *dst, struct fhdr *phdr, char *src, ! NOTIFYPROC callback); extern BOOL unzip_archive (char *dirname, char *data, DWORD size, NOTIFYPROC callback); extern char *map_new_file (DWORD flags, char *filename, char ! *pathname_part, struct fhdr *pfhdr, NOTIFYPROC callback); extern BOOL ensure_directory (char *pathname, char *new_part, --- 60,70 ---- typedef int (*NOTIFYPROC)(int code, LPSTR text, ...); ! extern BOOL extract_file (char *dst, char *src, int method, int comp_size, ! int uncomp_size, NOTIFYPROC notify); extern BOOL unzip_archive (char *dirname, char *data, DWORD size, NOTIFYPROC callback); extern char *map_new_file (DWORD flags, char *filename, char ! *pathname_part, int size, ! WORD wFatDate, WORD wFatTime, NOTIFYPROC callback); extern BOOL ensure_directory (char *pathname, char *new_part, Index: extract.c =================================================================== RCS file: /cvsroot/python/distutils/misc/extract.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** extract.c 2000/09/29 11:20:55 1.3 --- extract.c 2000/10/12 19:25:58 1.4 *************** *** 47,56 **** */ char *map_new_file (DWORD flags, char *filename, ! char *pathname_part, struct fhdr *pfhdr, NOTIFYPROC notify) { HANDLE hFile, hFileMapping; char *dst; - int size = pfhdr->uncomp_size; FILETIME ft; --- 47,56 ---- */ char *map_new_file (DWORD flags, char *filename, ! char *pathname_part, int size, ! WORD wFatDate, WORD wFatTime, NOTIFYPROC notify) { HANDLE hFile, hFileMapping; char *dst; FILETIME ft; *************** *** 99,104 **** notify (FILE_CREATED, filename); ! DosDateTimeToFileTime (pfhdr->last_mod_file_date, ! pfhdr->last_mod_file_time, &ft); SetFileTime (hFile, &ft, &ft, &ft); --- 99,103 ---- notify (FILE_CREATED, filename); ! DosDateTimeToFileTime (wFatDate, wFatTime, &ft); SetFileTime (hFile, &ft, &ft, &ft); *************** *** 137,152 **** BOOL ! extract_file (char *dst, struct fhdr *phdr, char *src, NOTIFYPROC notify) { z_stream zstream; int result; ! if (phdr->method == Z_DEFLATED) { int x; memset (&zstream, 0, sizeof (zstream)); zstream.next_in = src; ! zstream.avail_in = phdr->comp_size+1; zstream.next_out = dst; ! zstream.avail_out = phdr->uncomp_size; /* Apparently an undocumented feature of zlib: Set windowsize --- 136,152 ---- BOOL ! extract_file (char *dst, char *src, int method, int comp_size, ! int uncomp_size, NOTIFYPROC notify) { z_stream zstream; int result; ! if (method == Z_DEFLATED) { int x; memset (&zstream, 0, sizeof (zstream)); zstream.next_in = src; ! zstream.avail_in = comp_size+1; zstream.next_out = dst; ! zstream.avail_out = uncomp_size; /* Apparently an undocumented feature of zlib: Set windowsize *************** *** 171,176 **** result = FALSE; } ! } else if (phdr->method == 0) { ! memcpy(dst, src, phdr->uncomp_size); result = TRUE; } else --- 171,176 ---- result = FALSE; } ! } else if (method == 0) { ! memcpy(dst, src, uncomp_size); result = TRUE; } else *************** *** 234,240 **** fixpath (pathname); if (pathname[strlen(pathname)-1] != '\\') { ! dst = map_new_file (0, pathname, new_part, pfhdr, notify); if (dst) { ! if (!extract_file (dst, pfhdr, pcomp, notify)) return FALSE; } /* else ??? */ --- 234,252 ---- fixpath (pathname); if (pathname[strlen(pathname)-1] != '\\') { ! /* ! * The local file header (pfhdr) does not always contain ! * the compressed and uncompressed sizes of the data ! * depending on bit 3 of the flags field. ! * So it seems better to use the data from the ! * central directory (pcdir). ! */ ! dst = map_new_file (0, pathname, new_part, ! pcdir->uncomp_size, ! pcdir->last_mod_file_date, ! pcdir->last_mod_file_time, notify); if (dst) { ! if (!extract_file (dst, pcomp, pfhdr->method, ! pcdir->comp_size, pcdir->uncomp_size, ! notify)) return FALSE; } /* else ??? */ Index: install.c =================================================================== RCS file: /cvsroot/python/distutils/misc/install.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** install.c 2000/09/29 11:28:41 1.7 --- install.c 2000/10/12 19:25:58 1.8 *************** *** 357,361 **** /* read meta_data info */ struct meta_data_hdr *pmd = (struct meta_data_hdr *)&data[ofs]; - struct fhdr fhdr; char *src, *dst; char *ini_file; --- 357,360 ---- *************** *** 382,387 **** } ! fhdr.uncomp_size = pmd->uncomp_size; ! dst = map_new_file (CREATE_ALWAYS, ini_file, NULL, &fhdr, notify); if (!dst) return NULL; --- 381,386 ---- } ! dst = map_new_file (CREATE_ALWAYS, ini_file, NULL, pmd->uncomp_size, ! 0, 0, notify); if (!dst) return NULL; Index: wininst.exe =================================================================== RCS file: /cvsroot/python/distutils/misc/wininst.exe,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 Binary files /tmp/cvsIoCK1k and /tmp/cvsiqHSMv differ From python-dev@python.org Thu Oct 12 20:31:16 2000 From: python-dev@python.org (Thomas Heller) Date: Thu, 12 Oct 2000 12:31:16 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist_wininst.py,1.17,1.18 Message-ID: <200010121931.MAA14705@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv13101 Modified Files: bdist_wininst.py Log Message: Recreated after installer source code changes. This should close SF bug (patch) http://sourceforge.net/patch/?func=detailpatch&patch_id=101844&group_id=5470 Index: bdist_wininst.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_wininst.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** bdist_wininst.py 2000/09/30 18:27:54 1.17 --- bdist_wininst.py 2000/10/12 19:31:13 1.18 *************** *** 219,225 **** TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ! ZGUuDQ0KJAAAAAAAAADqs5WMrtL7367S+9+u0vvf1c7336/S+98tzvXfrNL731Hy/9+s0vvfzM3o ! 36bS+9+u0vrf89L7367S+9+j0vvfUfLx36PS+99p1P3fr9L731JpY2iu0vvfAAAAAAAAAAAAAAAA ! AAAAAAAAAAAAAAAAUEUAAEwBAwD9e9Q5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAADVAAAA oAAAAOAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAA8AAAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAw4QAAcAEAAADgAAAwAQAAAAAAAAAAAAAAAAAAAAAA --- 219,225 ---- TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ! ZGUuDQ0KJAAAAAAAAABwj7aMNO7Y3zTu2N807tjfT/LU3zXu2N+38tbfNu7Y39zx3N827tjfVvHL ! 3zzu2N807tnfae7Y3zTu2N857tjf3PHS3znu2N+M6N7fNe7Y31JpY2g07tjfAAAAAAAAAAAAAAAA ! AAAAAAAAAAAAAAAAUEUAAEwBAwAu6+E5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAPDUAAAA oAAAAOAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAA8AAAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAw4QAAcAEAAADgAAAwAQAAAAAAAAAAAAAAAAAAAAAA *************** *** 234,482 **** IHBhY2tlZCB3aXRoIHRoZSBVUFggZXhlY3V0YWJsZSBwYWNrZXIgaHR0cDovL3VweC50c3gub3Jn ICQKACRJZDogVVBYIDEuMDEgQ29weXJpZ2h0IChDKSAxOTk2LTIwMDAgdGhlIFVQWCBUZWFtLiBB ! bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCmbxMY8TFMU40bYAAPM0AAAAsAAAJgEABP+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcRmP833//Y g/v/dR5qD5SFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJJD/T9itg10cACHGBlxG ! dZNqAVhfXr/7//9dW8NVi+yD7BCLRRRTVleLQBaLPXg0iUX4M/a79u7+d0PAOXUIdQfHRQgBDFZo ! gFYRY9/+9lZWUwUM/9eD+P8p/A+FiG182s23P/gDdRshGP91EOgV/wD2bffmcagPhApB67EfUHQJ ! UJn9sW176y9cGBjxUwxqAv9VGIW12bLxwC5nEGbW8GTsdSUuwmhUMOlTt/ue7wH0OwdZDvwkdAoT ! vb37yAONRfBQ3GaLSAoDQAxRYdj70Ht0Sn38GQNQ4XVvpqQ7+HUJC4idhy+U7psOVmoEVhCghIs9 ! iN/X4CKQhg9oOIk8mu3WNusmrCsCUyqcU8/3W9uuCCV2CDvGdRcnECjChmYwhJURM8B8ti385FvJ ! OFOLXVKLIVeh2B4W/kYIZj0IAFGeADiayG1uu13sUOjWPpJMEDZXyLbLVrgiEkC7CMwWXgbYtvvP ! 3SVoqFgq8VCJXdQtFTze+/7CjVrAdHf/dChQaJCfGUtbutvnBBZclXQTGg18kvLPde4E0JH2IR8U ! 7IXAHrqBHGTcUADGX8M7xrpmfev/dhbpU6GMbrh7cyOXXuvZ04HsGO2LTRC/4e/o2QxWfAv6jUQL ! 6sQrSAwrz4Pd9v+N6WbRA/qBOFBLBQaJVfTuSi6D337c/mUQAGaDeAr9jjMrA4sZi0wfKrbZfv+N ! BB+NNBED8y4BAisegT4L/R2f7QMENxLHLpKNFB8Pv1ge3f3ttk3wBlAgA0AcA9MDx36NPBC31n67 ! DUYcA1YaA8gDdlSKGh5shMYv7I2F6P6dXaQLgi1f92iw7lDMnhAfO9O72fRwjYQFDRdMGlDMbmFz ! GyUDAPAeDGG/DdjJSwRdV5hGFIC8BefCx+R3G1x0MP91FFhQ2JtrMLshAIZuFBsC7KmwM79WfAID ! EzmDxLjdrqNhGPhAwfzSClA4ar7WuY0GQRQhEv8aFTmNw8ntBozPV9KaXF/6buvr94sXBEQRigiE ! yf2A+S912Lcz/gPGAFxAde9zQFwMD3QXdpEaDI+cQd1hUnHsjdYFTgoLwFdQFExhb7aC4/NxSgxI ! agqZWfs2W/73+TPJaLRwUQAeaLwCAA1olkzDLzArOFA3W1PbMtcaDRQVKL6AibSlI2wEVhlZUC4P ! ATu57m4gHSQY/9NoKdco72sHdiBgIwoBFdOpzpzpXgtfLJ+eRK6xtWb08fbCPtrY3n3buAAGAD2s ! 4U50cIEFEOjumGVno4p9CFdBYTR8+E/nBgDHBCQgm78A8P/A5nCf7fJgNVgF0xq7t3ZpCugDPzrW ! aODCaP3ayOZgDKCcAARfhK3duzb9J2uBeAg4zXUZD/O9Z7ZqHXCpdFxUNByYNSmteWrwbBFigzB3 ! YzLWtr3ULjiL+AUE/IvIVPQRf+O28CvQK/JSD/gr4wPBUpkrwswaW8fR+BjwFfjoDXQ0IiMRgAUB ! CKBc4B1mg+hOVzXAAeBAt/BnbjgeLUTbwVvYfkgV7RdCvv7RgTdbq2YYEdvB6BBIJbd7AUcK+4st ! NDBo8OihgYYxI2jmgBLVP5Fsz/AIfiAbFgGgcWf+M+1VVWiLFdM7xYkFW7hlxZFIVUmGFMMLwrda ! LOoDJDweHQjWvf0SiCX8GyMrvKAUdUMPKE9YB4cRPmjvjRWwOiC3SAbO0woAmpbAYqYuzGuViP0G ! +yQYaJltvT5QVTXIZMs2PFVaKYqFz0IplLAc6FlFcoOMtXQyHImNsa1s0NAkV1AdcRzCLDHGFRhN ! EB8CbDF3Z/kDHGgsG6UfYGXvppspBOsQaNrBcRgNt4vrRacgWzjFYYR/PTP/V1cnaJl2YcPBNtsv ! dQQr6wLsJhLG2FfrVnrzYSgnG31bgc1rsN2+f/hTM9uoGQAMU0uSYzHSkur8iQhjdHFrN7QHMD0J ! 1lMAK/RTOpVbNDCYEPRQ3zhLMdeQsSdi9VuuidfAyiw8BqQQW7tmL/w7wy/NOBjrjWwnvtZNmCbV ! 4u42nJ7Npc5TUIRI/4Bx1klbe5F6EGQSAUOS5tnW10noKfj+VGx2ttIGYuzHINtsydqqxjXs8P1O ! 972W7lO18AB3CAwfdtdssxsMvFk36GiadIF1ARv3GPzy4MUK7oQboFISRsKyJmGB1YYCfpI76QxT ! g5meeV4t8QILrmmagD1gamfwAhFmDcoEAPV0ynbmsF3zaOwQWFAO8VmH2+BjjgtrHc0BNRywlkiB ! aNIQci/ZyprMVU1x90KuabceCD0xz3QpPQjr2eJjhMQDw/50gVk1Tla+Mok9AJ0W6j4EtoC4fxFc ! yA3BGmcnUBSewBwaGnifoAC7gXz8wlO7e+E5LIdpaMscBjXgmQWpxcHgcCsC13oZV2C3uzk1bBCj ! CGZ0EoU3dNtfhJ0iC3FZHnBXXrNCslu4aMQaKRtwHwNDbB5Rgz1UQ9lqotScICJ/uHJJh3dCYDW9 ! DY9t2H4wQMT4hUcFb+tTA665T681VBN5NPqMbI7e1AcMCcDorYGu07CtGLdMBaXumraJg9PnEIUM ! AlnPqQi9WnRKQnm5t1y6X1nDgEwBoZRgDZVwreY7LVmfBqaJ/wuMBEHr9g+3wcHgEExh3WyEw1a7 ! 5/FTsf29c12yHzZWVRBBFKlRl7u1lTx0TTb/jYh765LxaARzCA8kCpQkcHyb1Z2FawQmEOBK/Smh ! LTwci3YE66eLjfX9yis6gcS9w0gA12Zp4ZQpW2cQAPyjbqzvxAwZcxAJCGq2DczSSEgGq118Alza ! jmVZQghwSw216ybcy9A7ZDbzqXfYjAJB34HWUrNbslNXJhCF629tNxs4q1B+UCwN41hqMOmMs2cY ! aDj3XLlAIGPlxvo7ai4YJAxxKq5Est5oNCWTuh/LhmB/SrrrtF/DDnfYTGAL04vD4JYI/AjHMjQw ! DNc1iQbIljBC+1mJRgQDgV4bF34LN29WOQG+CnQ1IU0IKAvN0VBRBQUiEU2HcLbzSDcIr/j9ahaR ! YOKNBojtHiWLHe2UpCvwJWn6HJkSVuQUmTi21RBqUUD6NfyfcLq5mPmhvKFQWBfgFXaIdEltFbN0 ! Qzo2LmwEAY1qIyZ042xrvA3mODfWGAZ0FpMG9f79fwcPlcFJg+ECQYvBo0Lrx8cFB7zv2svJ9+xd ! w2okaFA8Gf0nc8dA6AZe99gbwEB5wNHTwRwhdDOv19Fs0b/95NaDHwoyc2Y6xHgJfCLy0Htx69vT ! QdYn7+21DXW3PREIOmgYuQmhEwIu6yWNgkOmkARddLdLd10EagswjX3EjvOrBvSJH1joBiKrqzZM ! 3QyrarFtYxqQE4wbv1BSa25geXbAMIkv621zVICdlxzc4XNrb48UjBvYVhUHIsxrnXu0NeQf8Lcr ! EmwuGbszIGMWQBn0bcklJ0/dGfhudgVo5zcfn09/jDQmNlP3XHyYYwWUC9tvt2wFrIx/kCCbdbQC ! vJmPti2oD6T+bhjBZbpeKYAEDxkxs5leCHAcYBE68I8DhvcSWFmjjDAkGX4YFWiYZmwXcHKZrOor ! 0ASdCF8DrmepEefb4lwyvdx68VcBalC73Wm+kH5oyT2ziAQM13QR8FlE6sTXSz9oP2sti81M/R8N ! I7NJd+pGfyB0FZnZXleKZA+jhBOQku7BozoYVOketXo0YcJHRO97bgldIJs8ozD1lN3jY6ITvFCj ! 2PwPjvRGghmnGaE32VGoNGCFNFyAYMMMs8AmBGGh/1mADf7wl1VPgPlcdUTA8vb2ikgBQAgwfOgE ! M34Wbtey/TevcnXZxgYNRuvTBQr0McGTri1zURj0PAqB39yvwx+IBlIfrYgORkCZ4FNrRCp9JFFT ! dO4J8U1HA1b6CIA0MQZj+HjYg+YrC0oXbCP8+WS9WOCCwqW37OmCJwIvG+EEa7mgBcXg/JdYs6BB ! 5RHsb7341SRQVQj10EwC6k3w1vZXK0EQAgwEHoE57o32JrjFNBBYqQDCeVY0Egu/3YbMnUmMlQe7 ! BD3+K8A5Drx+Zl9GktG5kNkzhr7c/k0zd7KXbFjPFNj0KPBspHTPaBo9i4SPLWixTD3W4NcE7QQd ! jgJx0wUbLNBz24b/zFe4BQuGutxt6x5X4mWU2+PrB9UNTYhgNEDsuAyHIQ/iKGww6SOXviJWpdgD ! 3HsUQHoj146l5OC7AH8rvRnOFpsN7GZkjz6S6cCdOzT/2LswdZjN1OZxIviAJYSV3EJDZBfGJBeg ! 6NhAwATM/djvNseBbOP4dFbCjEi5rTW837ARDP0QBG5F4awLLVZBYGhh05nNYRoKbBFw3wXthMjM ! AD4z0jvCVv/L9v90M4tIHDvKdCyJUBQCCBiLcQz33hv2UsNti+2D5gerMaccIBRRBw1bP2IavNde ! wmO4k/+iK4Z9CJAA7QjlXVvokTqYHNNUTiSFydm1Lmg9/QqTPyjc20psbggeGigcpiQNLoC5pccA ! AFSfNRs7aOhCO8cc94qYjU2xAQ0GOsFR5zNbq1b1awrceZupxb4MO/d1Cj/fiGQgb3hr7Yl+GDoT ! YCBgOn5+KDl+aWduC2QHDiSAgWoYM3Rtc12EINIniYY+/FjohZLaEIl4ZVb3uwZfF8+JegyJtPfZ ! x0AMAXitr3v7+Qh8WQQPf1QfuBHTt/1f2NpKEFLXUTfaG9JQ99KB4jA5TeF+tGVSuRs8GdhBO8W3 ! eE8jehR1D4Nus+7xLQ6cdgtWG5aM8GTJX7j6aRC6Ks8TcVNVEHcEdrcIBvR2CvkDoT4A1L+w2Qjw ! i1QjM9uD+gS/+z20f//ulcNLvQXB4/uJXBmJCPDwJ77IDQ+HxFMkjYAqGQTWNpqttj2ISR6JDRCN ! b63FCA8vBYsOihEc1i02vgQ1FhAEJw9CxHCu9I0uFnQVxzdV3b67ZV5sGJh1ROuiIotQEMHp5MBu ! 3CjBCF12GCSE+VrbwToWnhcFvQTIUIvmEUiKYNvW3hYnQHaLXhwLeQaJvaMXao8fAxODi0MEPebe ! +38IA8H39YXSdCHHA1aU0d2NT54uX2xo9sEgJdiws7mBYykHJhyBjwKO2EPaG7j2vYBh+KQ0/XUY ! owJVNTtRCPNPLGa3rXUqApIiAU9pAnNpobbUoDON6OlSHtaxORcSRFQM+QvYzEu+2Qw54wgtAtbc ! C+Zj5O3hStxbe67xweEYSAvkSTQJhkOhJbs7gxUKY+1IQokGOhwUkGTA/taBSDfiEAPKiUg5Cobk ! Irm+CAu52ZJLhDY/YZnDjTlINBI26yCYzRDlM1npNhACclSkaNmvfsgCdQmLx2zCCKe0g3NuZ3Jq ! Y6TYncksFlBHbscBAzm4JYQHFkhPN4oKkbNlaRtQ4dE+VskkB8gCBA7SRtghhCCJKLOFhJASIR94 ! kew1204w8wa4+DuCYRqWaSxEcArLZrMAJWoAyZbk2/0MQwEp/bv9Ym4GOAu3JkwuJwPbNM1yJCle ! ndgkKhfTNNtmpRIoA0eBuxJ4mWVcKmhbf7g18EDTV78FejyJtY0ocEN04AQPBlujvQQFdQ6+60JS ! mOx668BXynUGdQ0+V1E33pEN6jJ8KMfyAUY0tSCwbQIwDjjuUU244rMIIHQOCbvQath2ax9gRzDA ! w3+dK9Rnp21qCmRjILToqAbNaPaqyNHoHcLDi08oG0mqwAFnMxpf2SRmpZsti1cojJDIbAPcY8Ny ! QLpQKE7noDkoH58rUUhYA+ceLqI2eOtCNAJ8A9geiV4siSExW7w4yARGm0dIFqoyg+wwOFM10Fp0 ! bzg7+ylDoG2tsbJrEkguS/+1hb6VUhAwVjvIglQKwLXl3xVEcwUrwUjrBSwHHgd/Ll+MA4P4CRkM ! hZw4QNgykAn+GIP9A3M8kNzbvuF6lg3G5EiKD8cUTJS67u//i9GLzdPig8UIYwvyRzGJOImBf3vv ! L3LO6wQ3r4PgB4vI0ei1brpvbQFkHksYd5FjxIPtA/ffngUZAc0cB8HuA9PuK+k/d9XBprMcLkFI ! KiBSjWJ3W2iwhI0NMFEOOFKh1zV8zjmMJFwhNPhyAyXerlEPLFIQ3hAzX4HuKowUia6171wsZsae ! WHEGYRR3eEMOA/j9WOfWxVsUziBzLKn6+qAGc9kCDT9MLE/2fBO/g9xAJ0Zy1IvWi86Ct8C7UuEH ! cuoQM9GvojjSrb397YvBO8X6BIlsXEsmAYvbEsMOiQPpTNIXvGe0hHMqx0zJuYuLG75rfBpEO9Z1 ! I7+LeygtCt81fnQZi9c7sRVzByvCSFfrjm0XZCvyc4k1dWe0TEErHXyhSARTiVM0GDkHZt0XW0cw ! atajTDrnaBveMSvKSf9LLAcEPoOMfLdVdSBi99byO9vk5k6LzsKLyKResAsNw4QLBcl2TUP3Bp3C ! O8EFwT4URN0vsUVX0YEC86WLyi0c3eHxC98DK9DzpNpcJUTajba9A1INS10V8CsMFgyd6RaJeBwp ! AWg4TLC5XWQY3UEDeYwhKpYOcziQMa6SMg6S0habo/sl/z8lyCCYH4cdC33LHQbW0DzgCIFbF93c ! +qAFE/IFrQV9H3MO+AZGjYQIAsR3A5+Ns3RIKPlQYQyNBYkTbzwOSA7HQ27wmsbepgTrCK5xU5II ! 04VGNxEKg2Itc2hZMpX8zjK+NAYD0RFpYSwITrGL249PLfyYVEsMxQSRYQiYK7QGCAOGamfs/bB7 ! cpgwuBOhyHMhPDSu8F6bxzFpNaA3vrSdbiBy33AaJG9DEI1T5gwNllFSNFfx464UZ9NQUTKc8PAs ! ZNvMhSH7COYFwfDhK09l0DTiHzc1txNvZwJdD4N70lk76LX349FzM+NKOwXr+kJz77X5Spj29PkH ! S8eaG/ou+c2LyfCuvYO/iLkUI8bmVMEBjeY0drfVihjKVRCXNHMbyVhwre0r6tEMRYQSit9th2tx ! QKQ3IfAjErnNdPF4fKEDM/KD6BLNWbC/5C4rJPgLH8ALO+lzO5nAugXy4AQfMJ259mjk6cnsfHft ! NfrdVYsMjakjziYOFGq812pi1JAb19O5jHAVHOGMCh6517v1A9A7KoepddMqQo0SSzkQ6Znw+OZi ! 7oKTFQ3aHYr86wIevr1UAKgMQUiZj/x19XeJmTiQ0F56goWY9IFuexVAJCZRUECNWsdmzN8JLCRR ! ElI8Afev4TY7P1FCBQE8a6yByEbPFGUJBzjLDvNABg83/CQcddL0HxVMJEjXZh8OyiU0z3c92L6n ! AZ88ICsceVDLc8cQpE6EVwQEBniAbSEpSA9zW7QWFl5rPDCX2ATi61YX0CudOANWTINWc/Dozk3u ! 51ujU19RzEmxe0C7Es08dFZdtlQAB1y8OB0nTc4MEoU+DSMYsSBNHAopzCEYDczXSonSACzGwVyS ! AKGdz4smbbf12mialtrplUxRdyTQmnuF2hewkIbdDrmhMwYww+CbaePQUVxh/cszGNtzs8YUdj9V ! UfLk1yWD/fBq/SvRwwPqUE5LsGxPdkyNMYtpOVHQbhE21ysBZpLqLxVSUbVZAtk6Q4UytWWnvmrH ! QRj0PUtGEOZ+rEBISFGJeQRGRCYcOMIYEUsg6LOzCK7RrPKEp4QksDcIFVLIxmfAxXtUysQAzq3Q ! ic85QQSTioeCewb3K/cD7oNRT9FYaAmmBLhFwoewYBOfz55q/FCUZEMhBHmQ0HWEwjuMjM8rjjcS ! SIEYnf11exhlswZbpU9RqNYx2CI61yJolLBlREgUfJ66VmWMu5FSDMKBy91QBjXPBPcS0rTa/oEw ! xAqZ/V9bSOdCJEwQ7CyRlQEY5T6Rwh6DCTuerZS8XEhQUqYHDLvD6/VApmbnQVBWe2Q5oVN0S1PR ! dDeh9hHa3HvoIDcuiVYEf7ItVf5QK9WLbgjjbn0+4wD5VmYIGDHCtxUZQ3/HTFZVydag1cVjQ0tW ! SHoppJk7nSYEpEOYoJeZBIYQDRiRU7WvJgRPsP5FeAp7jUNIKkP/RCzLZbPdFD0tA7DbLoovcbJZ ! LpcwwDJnN84SOAZslt2oJ8YsKKkzGxvgkmLvDKIMagAHKAQQGJ7ClaJHWGndi3uNcgFYRigYDRgO ! cIDzCFdj6UGqscBPt7t6BtyI7911CuzCDN+9iw2SXPnbD4bvEVWB+7AV3MXvHZnDcgW4CCvYgg+M ! od+iFX+t6MHt22EQihaDs3dRiMYbrFbxA/kIDjnkkPLz9PU55JBD9vf45JBDDvn6+5BDDjn8/f4E ! G2zn/wNNvGS2dSain7kVFhJGE2N3K/VIdfSxDbnx8vfxTFttu2+/CIs19/fri/WHeAHYuhMxXRdb ! M18LwcGPSXAIn5UIUIKFUDZuQEZQvEsDuRx0PgTDD92SanQfHKE3hSKOu0KNik+jRYhQEFoOeiPw ! DIhIEXUAAA/i4TDgSBjD3xR/ICYMLbx2zgNGkm0JGgvwVsjabgyuFjYXwQw0wX7F2D5NE7wQwkYs ! B4luQIE+M0063/4GdMjxK2xYQoMcazsCLRqdzhAKCpJslj8YOShGeiyJfju0wFaujCkrIntSqW21 ! rfmFiQZl3LCjj+JVGNRSIk0RPXUM2E9VEHc67OrI07WS2aN+HLhInSjI2OY6DUCu/BijMMD/NRpy ! pXQTSffZG8n9YqsLBYPB701hKw2ppWrPZmORfk226q2xYkWyRVj4c0TnYsXDQFwEug61AV6xi+0w ! ALKOnPuSe8/T4NAAxwgLyDZ52eiu/eAsQT8KLHK8roVjS3Xf+CMgCFbISRjh0a9ROBTT6LhuCy79 ! GsFFK/hAigHF02yReBaLSY+VCAbR3egxr6gQdLvgD66LSbpYK68FIh8CHLTttkCvRcOoIAfjJ6Rz ! Q84fB4LaQth7nzkar0jcedBH8g0L59gIvnvfzMmLBEy5TQQDyM6tZrrWWpGw1HID1wzNbW3TQBj1 ! RcwiOSQYZV6WA5iEJYxEZAxgaAFpRARWUhCCcLNlDI0MwYhByBAgD9gCDIGBHHIMBW8bcChAfgNr ! FVLvBhzVdQPCKzdAoj1natYf7SNTZuMVlrEJllY+VeLHl9ROLC2OdSHUoLTZPjA7wRFUsD04qS0p ! DPsI6xtx6ogPf2eGFFIy0iRKhXJiPAaSITMMbWKQG+zkXWNhIl4hbonsj2Ke2wGQ9/dJGELzCYhK ! /xFBSDtQPPdFOAg+B04MYGBzdGZJYc8oN4ECG9KwAOPvk/FR4E0KiApCSETAFWFgvfbP0S0DTxSL ! Kwrix0M1AwWOHyvNExcRdCeJkKr0FMNKCUDA1c0wGNjYYpAfgRdQZWr9K81T21xhblZQScDrtJjl ! QRYqiokD/t4PZT6D/wd2FT88g+8IzvBeCZFMiUw31aGwhFC2i7KxYy5o6mKzTiA68JcyvSttbjz5 ! Uyv9i2uNsEJvZO+JC1v+SCYSHhJBARfJRLY7/pAsl93CJDt04QO8PEA9/pvlctl0PpI/Z0HfnUAI ! 8tUI4gT5DAUPPbIgUVNsIJDodCwzE3YQZ9Gx6mbY23UJoVtZqNv+8XUcslZVi2wJjbpT0pWAG+sg ! UlV3ARO2TPSLhTNMotP+11+irTcaW1NSx0cYJLy9S3EiVzRdXkzTLQW/Hvt0BoN90QwfABYWc1G+ ! wjApub8nLM+B7PCijCT0BtRAW1f8tN8B1VdN03QLz0QDSExQVDRN0zRYXGBkaN40TdNscHR4fIms ! JBIbZAhBMgHvXXr7hX5chESNRANDSom67TmVr+4CCHUfcRiBlPAiEf9uwIkpiSobj099MbYanBe5 ! EY2YOwBf2EBDOSg9QYPABPFpg24mdvN2+c1zBv/Yd+OaYroPK7R4OS51CEqD7rZd3OgEO9UFO/ql ! LHYlVP83/m36vlGJO9Pmr3MSjVyMRCszeCWhDXZvU8ME0RFy8m+Vo7fCzRCFHAxEjQMr8WxGvUC6 ! QHkQEaK1wdedA87liCwL9kr3u7m/hzPbA0wcSEnljBwXde/d9BWNTgRvtM0dbo0M/xwVjIQc7VhX ! sD0oQ4wNiVx4m4bC40KJERJ7HAhDO2O3O+LZcsVXi9/3QowUNZQKnGYjiSFdAyi+ZxpxJB5hx/x2 ! OmdHABLEHTwPj4ECEoXGRzM0ZYcNvBd4KLkKO0mF0uzvbXMLKz4g/TtND44HYDeLHGwUONYsLf3/ ! giX4bLo4A98r00UDzzvX3RI9E/AmGtccIP9JQEdJy7iNfQE7x3YnhiWa6YPP//caLcduhYUF3BhB ! BK59vsVta966u+AfByvHEnLuhCQkvzuO+rId54uxfAP4gf+I+nDGRtjvJiArLMJAD/Z+L42UhNg2 ! iTiLuz5147k/dDhDiEygtITE9osILNbLiAUxhV8v0b3G14tK/O+L9dNuLHyrwUMr8IkUO3Sf6wls ! eO/pShgo4PAGj/9vOEJXWoxuitAJHCrTiHjj0209MYsIDJF/cgfGV3QbGw7A6583KQyTu/AfffFz ! FIH+yRvSg+Kg9mCIce+CurLrICAUIuYCihTd2kS4MQyGgMJLNDGLltviIbEE9g6HbG1k4SRHuuK8 ! tDu6oIVNFXMet8WHMAzH+C13iTmNPNWkcQSGTIzQ7R1y5tUUeo3C3P4LrjGBhcJ0CDPQ0egHdfgN ! h9YiWEoOKGCMfTDaCByNBTEkTyP6KPddocs6XxiD6ARPiBzrgv0mK985MwgjddzhiTFOdRXISiAr ! 8TA11NLCHFLx6vTxkEDrwZoe6humt06RG0LXO/V0F9ZClu6RLAF0TfsBFgEXsAwKJA+glRAYX6PS ! wGN5YThoEmQYJ/DOAAtfZjRxkgYOVWQYNFJbAN7q09homGKgGAS9BHbQFVVScIX2CBaYsdfTRT44 ! M9nZW/vGDEwoSDju3E60exZMkGMEfg/sjVYeqFJRS3UkJ4M6MAC/txYIgf1qdxM/TuAtAR2r5E+H ! BaRZUdAe+7IhcMh1H7TjI7EhHzz8dAKQL2fAYGQjS2wSGExgQkxFF0gSzCMP3w34u0G0F/ze0qH8 ! Ck25C8CciQIQlMdwqwRs6nd/XYdA2Dgd8MhR7Qxja201gA3Xe8B2/aNtP07Bd3YDFSwRe2Mj6nrv ! O+hY6CIPMvyRhq0g9wjqIFYUK8UD1YKF2krmMFaWOG5UiF9wDotLPFUFNkM8Uj1uAhLNi/ekpnKp ! PmJZyqYDxWo7x78XSywD/aIKdX5BbtG5rUQoDZF1H3M0ClvYneqaK+6fEIQ5kOXkV0dXVi3UWAdH ! MHzNXviw91qLhHuC5IyKMJx6UWFaKBK+Ul1UiVFyNRheDr14wR/MWQsXbjf5i2mcUSA7cTA3OD8c ! u1EdO+5RQRw5cwkrpboc0PVOxc5JMU0o96rNgTa0S3xJ0w4cLCCD+Dwi1VEnmotJQRGL3ZcosaXI ! GmEIC9ZHHXI3eIu94liiVzAjysiKHHeOG/HOjTTOLISOwjJOAdOaKleA6gRnPzngBwvQBL4jawyd ! 5MBuH2BeBDYDyzhVdMH+AXTHg+MPK8M0MU4kW/sKDavLI6QPljSTTA8gNBFyZMqcMQUBALyZspTP ! O8NzKwc0F/ZZGIP559Ulvmo/h9dBJpdyB2vUlrM8WU76z3DBXFE2R+7H9UhwIQgF15S8SSjYv4Nv ! ETv3cheL90WKDkaITf8GrBENPoPrAusB6yetFfh2cSwfO992E4sdHDODnf0ARUZPdfYYKBBLnn5u ! S7brGb8GBBlwRUnYEQV6gWEScjpd0dWPDnIz+TvrPK8KtXWcEEkEE3QL9TbHK/M+rPCyrTuTdy7i ! 8w+CBy0+R4t0e7tAc9nFZcHrHtlzAt6xeoEeOCv5M40UzZqXYIyNwsQc+hZTRggKhXcQ6s+JPitn ! Vjg1q+QNVulzFSnAXmIgdFZXIBc2m89a29iMfK8dcj8QZv71bWelmohoAytBS2zQrVhAizFBOXdf ! 6Z0O3olBZ5r9Zp+fWwO4/yUAdQWsYAhhAL15PrRgsMzMUT1uKOzAkC0IcodJTr4tty6O/RCFARdz ! 7JjEDIvhke2mEmDPUMPMQwQHv1S4IAUrav9oCGRT3lLfZYBQZKGhUHQlBzReCrYYaMuJZei+dQOg ! UfUEFcTZXGMDgYMN2z8GEEo1FdsUyJsNpB0Z2ZrxCA3MZKHQ3LvC/QwAoxQo6205HUAYO5vbiH1u ! bE7UGPQ+2/1YaAxwgghwJ1KhYD9zC1ETL5QkXAwJLRXNdpxQA5CgTtxgyNcU7QQyAG9B3wVOoeBu ! MAGAPiLk2/7udTpGCIoGOsN0BDwN8hIEptm2ByB28tTQTqSMeyPa4vZF0DMR6NTrDitFi/55IHbY ! 6/VqCliVoCdBW4FMVRCDw1fRlc0z5JHsVHBxBHoJiU2Iy0xZCsZG2F4u/3WIH+yh8AXotbfwRti0 ! VQMELGGFDfMvgqzDkgB0h5EtL8C43QAAsgUAkRU0z4Gq//8QEU3TDdISCAMHCQY0TdM0CgULBAzT ! dE3TAw0CPw4Bv/0/SA8gaW5mbGF0ZSAxLgEzIENvcP/vvv15cmlnaHQPOTk1LQQ4IE1hcmsgQWRs ! ZXL33nuzIEtXY297g997771/e3drX6cTNE3TdLMXGx8jK9M0TdMzO0NTY0/TNE1zg6PD4wEM2UUI ! JQEDApAMyZADBLLTDMkFAHBfW8Is2Ucvf/dN03Tf8xk/ITFBYey60zSBwUCBAwEC0zRN0wMEBggM ! TdM0TRAYIDBAYGQjW2Hn18dCEpZwBqerrwzyLWGzAwsM6Kgggw32KhVStK2nPgOBbsAHVUNyZSVE ! af9f/d8GY3RvcnkgKCVzKRBNYXBWaWV3T2a7Nwv2RmlsZRUrEB1waRkwS9luZxcQesHcf/tFbmQg ! GXR1cm5zICVkUxewHyxhFBNJbml0MhilAxwwtktcfrv99lRpbWUUUm9tYW4LaGkKV2l6YXK5N2Db ! XHdxbOdzdGEH3263v3ggb24geW9AIGMpcHVTci4gQ7bt2v9saWNrIE5leHQg3RdudC51gG3vrbXo ! GUtjZWwVHGnAYN3WHWgVU31wWy52a619H3kWMowBLmRh525Htg9QIFZZc2kHFnb7BjzB529mdHc0 ! ZVwg2c0dbAZDbxGVXEmg7bay21DlaABDtShmswtb1wwpmP5n3HSEKTRnSGRTb9/67fY1PH9mc3PE ! LqtvLgA2ixxhG2OJHHQXwlsUIWKBbtprQzgMVrSli6FwuOCoTUlmX3Y6++DoXiyudiFMY2gSFuFt ! bWczBHkqg0DWdgsXc1p0dnMsKm9AGEI7QmEEnYltb0sYd4P3X09wO20udFujEWBMZw9SLV9Txlxh ! 2xBwwFMrVCNG7OO51ghsIwtLaQ2ECe/bAExvYWTwywbh0W1uADy0dBJfKQl2zAasOwsuB8pyJ9fe ! cNj0J4tAAEVycjML4WHNOX2NHQ9PdsmE5hxtd4bVvfFbtH+FPT8AG3M/CgpQcgZh238vnFlFU/dB ! TFdBWQlvLuy/Yw8sCnAtTk8sTkVWRVIrGI79qUNBTkNFTFxTS4vANlwoA6tkdY95LpcQGuLwb3Ce ! n0mutjbBPWZhS3/qFmTttcLbFWELYg0HDS/ZjNtyZxZfdsMPTLsJww6nD0gxYnWxkZpuBmRf6W/v ! b0McEelrfhoAdC9a616WBGxub3STZYFBt0muNVOyIJTUb2fao9y1cn3IdmFsc5RdFqm1DmV/O2Pr ! ethiifZl4WHOZoCFOWbtfvlHxS9vLMWkcQB3nWRvd1Y4KzRhPCsuWJ97iI1NVx1DHAdld5w7NFp/ ! uytk0zMdHtjqckAgKQ0KK7Rlb2snFxFEZQw2LJgZxXRziHXbODNWa5B3brvZhuFwwYZ7s2Qv1wrN ! dGIezuoVuHZqH1xw6Udvbyd4GG8ndwgZ0lNYeW1idq6W7G9scz8WPkZsb2zZm5l2L89fGERTgXt0 ! eXD49LTrGihK9y+oB5gDN2uapox4aFAb48kwdbixNmIyEX2Tug/zZmbxZSZjc26uVsERMzE82G1v ! cw07GDctIffQjuywbG0vuBtuCm3ZEgvkflm2GVrAwwPOCS/ey0gxbB0TBWA5O9IULAFQAAcQnGy6 ! plRzH1IfAHA03WCDMEDAH1AKNMggg2AgoAYZLAi4H4BAGWywQeA/Bh9YNN1jBhiQf1M7M8ggg3g4 ! 0DLIIE1REWgoyCCDDLAIiCCDDDJI8ARgTTPYVAcUVeN/gwwyyCt0NMgMMsggDWQkMsggg6gEhMkm ! gwxE6J+mGWSwXB8cmFQGGWSQU3w82AYZbBCfF/9sLBlkkEG4DIxkkEEGTPgDkEEGGVISo0EGGWQj ! cjIGGWSQxAtiIhlkkEGkAoJkkEEGQuQHkEEGGVoalEEGGWRDejoGGWSQ1BNqKhlkkEG0CopkkEEG ! SvQFpGkGGVYWwACQQQYZM3Y2QQYZZMwPZgYZZJAmrAaGGWSQQUbsCWSQQQZeHpyQQQYZY34+QQYb ! ZNwbH24GG2yQLrwPDh+OIWmQQU78/5IGGYRR/xGD/5JBBhlxMcKQQQYZYSGiQQYZZAGBQUEGGZLi ! WRlBBhmSknk5QQYZktJpKQYZZJCyCYlJBhmSQfJVFZAL2fQX/wIBdZAhGWQ1ymVBBhlkJaoFIRlk ! kIVF6iEZZJBdHZohGWSQfT3aBhlkkG0tug0ZZJBBjU36GWSQIVMTwxlkkCFzM8YZZJAhYyOmZJBB ! BgODQ2SQIRnmWxtkkCEZlns7ZJAhGdZrK5BBBhm2C4uQIRlkS/ZXZJAhZBd3N2SQIRnOZyeQQQYZ ! rgeHkCEZZEfuX5AhGWQfnn+wIRlkP95vH002G2Qvvg+fj5XEIIMfT/7/UDKUDMGhDCVDyeGR0clQ ! MpSx8SVDyVDJqVAylAzpmQwlQ8nZufkylAyVxaUlQ8lQ5ZVQMpQM1bVDyVDJ9c2tMpQMJe2dJUPJ ! UN29lAyVDP3DQ8lQMqPjkzKUDCXTs8lQyVDzy5QMJUOr60PJUDKb27sMlQwl+8fJUDKUp+eUDCVD ! l9dQyVAyt/cMJUPJz6/vyVAylJ/f9A0lQ7//fwU03eOdn1cH7w8RW+VpOvcQ3w8FWQTu7GmaVUFd ! QD8DDz1N555YAq8PIVwgZnmazp8PCVoIVgY5e5qBwGB/AoHk5JBBGRgHTg45OQZhYATkkJNDAzEw ! LDk55A0MwUthoEOvOyVkWkZcinnQaWNW74rSDS5yZdVcc3Vic7Fshf1jcmliZWQnS0YWCwl2HkeI ! S5HAI6l0eXCleEnNFBcey5YNjJ+zKC9lKXs9Yx8DmqZpmgEDBw8fP2map2l//wEDB4lomqYPHz9/ ! nYFICMSfLUKDqgpNQhZBBGWJDiAo+252JceeLAQnoAn/AC6Xy+UA5wDeANYAvQCE5XK5XABCADkA ! MQApfiuXywAYABAACD/e/wClY5QtyE7uADdzs8IR714GAAUJm7ID/xf/NwuYm3UP/gYIBRdNJnsr ! Dzfvypal7AYAFzfOtdv5/7a/BqamCAwOYO/CZgsXpgY3Y3f/fftSW0r6UkFCWgVZUloLW/ZebHsX ! J+8LEQY3u1XPB/YgJqW4Fa8F7BaCcxQQkMYX/u58YO+NJgUGN/pASn1du937UTFRMVoFAFoLWi3s ! 2IAXWgUQSm91W2uuYLp1BVQVbhRYrLn/BWV1hqYQFjcXCx1vzw3ZFm8R2V0DR0BGsrFucwEFEc1Y ! b/oL3OtGdvlAb7oVXXmZwb3BAQAS6EYLg3yAuR1vQTFYSDPX3MlSWBAFhQ0LfPKn7Er6Ud8UZWQQ ! JRAWpqa6mfuNZHUVlRcLCgA77DDAb0N1SAuyb8g2FzEFMW/zBAcxOrMVpmGFYAbPC1kXxmPIvgUU ! 3/sKI+aYuXNaAws6F4yQsBsFQldPeh3WDeP+kwi/C7aOkC3DBZ9v8MNekqX8cv4NAy3sMHsGBMlv ! zV6wJBEHBQMRsveSdwv3Ny3sDZv5BwXnDbuQkg/v7klmCeGbBwX2Vw+99xb2+ze52QfeLCGcBfrH ! DyF7LUbIb/lqBwUyhnE2AxVDm2XBBthvVW9StozZRwWbb2xmOp2B8gFrabjA3Jd1FudvEZOGNcUT ! 7FpvBVlDyGdvR1ExAFvXS9Jsb3VvA21jjLBv81kCW8AeppVvF5vfFcC+t81yJt824QvsDW9J/Pk9 ! AxLJyRJvWvqy93gRtwn7aYc2SIFs9t/rUteVpYzXEb8vN0dxxqTxhxU4K1sZrVWfN3LujEnx81oL ! DGklEUAPb2aQ2kvS6wsM9zJY2bcL/jfiZTHCXgkLh1pGMBABCeIz2oiRSAk9AbIRS0QENQt0uoNV ! LC9wAAFNEyBE9zrqA2E9cwkhcogXRkuxZjZQfUTQCLZNs5GfWyo+GP+Ck2glMVdrus11B3o/NWQN ! d2wB7Mx9riAHUXQZDyUtus1tbm8VBXkHhXIJY9d9rmttj3UpeS4TQy8213VdaRlrC04VeBspdOc+ ! d2YvbgtddRtRJevGvkdDwWMRbCu27A32OWk7aCv/t9M9YUMu7AQIse8psl02cngA/YEcAgMOGYWi ! 4VAGP2hJZHQX1tyCB30AAkOj4XSvwmgfgp9fiJApBSdsDofudQNj/095AzvCpJsSmWEZaTd+wrpu ! f3M5OmCACIFQw2Gj2Cj5bbXvEwTzZCPvngBCE7NuCjtJZ0QJcp3hIesOv506TQMBoYOJkJEHZAD+ ! gyBjBEkHq8KSpuNigWdueyG5jxT3SW0b6S57p0mLTXI/dj43GZsFd/VjVSVnloz0xVsJeWNm7z0k ! Eu/ndA9D5y6LdQ0sU9FCLQlKJo2klW3mYYU0YUuAD9c0G0+z6219DRvpGrpsB1+XcvNncwEYsg+o ! M9tQFTHI08gqk3OJkS0y3OxTg2NAMlHGOl8DZoRDCFdGr2lgnW6MaGV11XT5IGslQ3fbwCppGCln ! ghgPvJLhjeNkdz43CN11F2N5Zg01eUVVWNWNuCECkErxECVogsRXUDhfU8ENGExpYiVBDWMF/ybq ! YWxGMwFGb3JtYXRN25UKGoNfGkdlDAXx939vZHVsZUhhbmRsEVVube7bsYAdIlByQUFkZHI2HSyY ! c0JIWxxpdgUBYrdSZSNmabZfsL+BWUVOYW1tDVPCWtTZaXpXVCAe25kg3hFMDWxzSgvCvXlsZW5E ! b3NEYSkLor23VG8vCRaZANGeJTtMYTHIlrXuuTFlFBqjZrO2+0ludBZDbFb2jG6tgta50Q4cZm8I ! EQnpT1NI23YvW8pBdO9idRtzEwkRC6FNOFFZGDYbVsCu0a2w/acAUmVnUXVlV1amBvywf+xFeEER ! RW51bUtleQ5PcGVuZnOxgL0PRd7fmpudFG/jKch5U2hl24RNcPflE0Ey63f+7jQg5VRleHRDb2wK ! CA3P2k/LpkJrvmVKTZjMfU9iavrTb0Fz37+NDFM8aWRCcnVzaDdsJixtO802ZvWs7G2s7c5ucD3R ! Y3B5B2EPX2PXcO7NSJtsZnALFC4I647wt4VjZXB0X2iacjMRXz3cq6ChX0Nfvg+NavbeCV9mbZ4L ! QbG1jWAN9mqIK2bHFqwEEjcOZfLCgiu0+ckRhWmxorXyuRAcZxgQa9tvA89zOWNtbm4IfZg7tG9p ! mVioqSuRVoAwvRNEQ712srE2dLMHbs5ocuabEWksD2ZqviZ7m3427XZzbnAddGbtCrlGKyVTHXM9 ! VLHIl15jbXBWtrUZf5YsUQDIrVN0CncYAyK3UmkOwdph+0RsZ0mtbYMXDLBlb0nnFA0JybX2cUJv ! TEUZVYoEaOiIPXlzN9VjFUKsY+aIMh0IZnKBtY/XDVRvKmAWpMewgUUgJ/yss911RHdz6kGXQ3Vy ! czFmyWhtPlPW5G3WGp4IDhxVcGRvXXKXa2Vla1R7bnNstNYFcx4Sm2ljDzHZASst4m92PVJ4gpgF ! CONBGwDLEypQRUwD/XwDxOx71DkRwg8BCwEGE4JiEDu+udlhy+xOEA9ACwPJliwSGgcXwIGdzYoR ! DBAHZ3kZvAYDFGSMdYFAmqASp4xneIVVxy50ngdc2BdskECQ6xBFIMzOiNguchgMU7DmsiUDAkAu ! JlP2TncYLTxwByfA995rbE9zzQzr8yfqgFjZkE/nLAAA2gffK7UDCQAAAP8AAAAAAAAAAAAAAAAA ! YL4AoEAAjb4AcP//V4PN/+sQkJCQkJCQigZGiAdHAdt1B4seg+78Edty7bgBAAAAAdt1B4seg+78 ! EdsRwAHbc+91CYseg+78Edtz5DHJg+gDcg3B4AiKBkaD8P90dInFAdt1B4seg+78EdsRyQHbdQeL ! HoPu/BHbEcl1IEEB23UHix6D7vwR2xHJAdtz73UJix6D7vwR23Pkg8ECgf0A8///g9EBjRQvg/38 ! dg+KAkKIB0dJdffpY////5CLAoPCBIkHg8cEg+kEd/EBz+lM////Xon3uZAAAACKB0cs6DwBd/eA ! PwF18osHil8EZsHoCMHAEIbEKfiA6+gB8IkHg8cFidji2Y2+ALAAAIsHCcB0PItfBI2EMDDRAAAB ! 81CDxwj/lrzRAACVigdHCMB03In5V0jyrlX/lsDRAAAJwHQHiQODwwTr4f+WxNEAAGHpmHj//wAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA --- 234,482 ---- IHBhY2tlZCB3aXRoIHRoZSBVUFggZXhlY3V0YWJsZSBwYWNrZXIgaHR0cDovL3VweC50c3gub3Jn ICQKACRJZDogVVBYIDEuMDEgQ29weXJpZ2h0IChDKSAxOTk2LTIwMDAgdGhlIFVQWCBUZWFtLiBB ! bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCl/uS+s25ddS0bYAAO40AAAAsAAAJgEAkP+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcRmP833//Y g/v/dR5qD5SFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJJD/T9itg10cACHGBlxG ! dZNqAVhfXu/u/v9dW8NVi+yD7AxTVleLPXguM/a7OsA5dQjt7d39dQfHRQgBDFZogE0RVlZTBfsz ! 9v8M/9eD+P+JRfwPhYhkfPgDdRshb67dfCD/dRDoHv8AaJ8PhAO2Z992QeuxH1B0CVCQ6y9cIC3b ! H9sY6lMMagL/VSDowC7GXlibZxBmdSUuu/luDU9oVCfpUwHkOwePfLvvWQ7sJHQKEwONRfT3Wdhu ! bnUcAhg6dH38Et5Mw7ADQKQ0FHUJ3TfD6wuIlncOVmoEVhCgwUVoMBCIdIl2rW2+rw9hOII86yal ! K9u2NdsCUyqcU6cIJYsEO81gnu/GdRcnECh0jv/JhQ0KM8BsW8k4g30QCFOLYfsW2l0IaUOS8jiT ! yNW2ue12UOjIPpJFDC9QyAhu22X5FEBqAcwYXgbYJWioYdv951Eq8VCJXdQtFTzXHDvzfX9hdGn/ ! dChQaJCYGUsE9y3d7RZcjnQTGg18iwTJs+7nOor2IR8U7DouH6O1NpBkQwPFRs1922ESPshTl4wZ ! jeHDHrpe8FAUxs6B7Bjhhr+ju4tNENAMRFQL+o1EC+q4u+3//ytIDCvKg+kWA9GBOFBLBQaJTfTu ! ZSyDZf/bx/8MAGaDeAoAD45OHQY99ItVEItEGiqN22y3/zQajTwIA/uBPjEBAi42gT8LNX/HcgME ! KosPv04gg8IuiW73bbswA9ME8BFWHgPKBRwDEW1fmrfRCE8cicFXGgPQE/QjNH65jRoe7I2F6P6U ! YqRs+bpnC2iw81DbnhAf297NFt5wjYQFDTb4Rszum3tHGlAbJQOudfAeDGG/DdjJSwRhV5hGFIC8 ! BedY9x13D1x0Rkxmi0YMUAQOQV2hZDjwdk4J6S0AGs49lIa6Hie0Ps322+4bdhRRDexLAfMdGDnT ! HUsbKhS8GBNAUItyOrexe79AClBCagZVFLQS/zi53dcaFTkGjLR51t9duHGacOv3USQERBGKCITJ ! csb/WwGA+S91A8YAXEB174dAMExytzR0F4C2VTdaR2rdYV8FUhEmwFcKjtOxUBRMYQeM4mz5v9kM ! SGoKmVn3+TPJaLRwUQAyDe/bHmi8AgANRTBNbaNZPzhQMtcaIRSOsN1sFSi+gIkEVi9ZULq70ZZC ! DwE5HSQY/9NoHdjt5DbkKCBgIwqme72vARXTqRhfLNaaOXOfnkT08fbvvm33whAA2rgABgA9rOFO ! dHCBd8R6bAUQPLCjfQhXPvwndEFh/QYExwQkIJvVAPC4z3Y6FcDyYDVYBVu7NHP4GiXoAz861mRz ! sN1o4MJo/QygnAAE2r3pbV+EXusnuYF4CDjNdRnfe2bbI2odcKl0XFSGhlkzKa2IEGotQmyQ8DB3 ! YzJdl9qF1jiL+AUc/IsO9DRuC28RK9Ar8lIP+Cv5Aq3jb+NSmSvC0fgY8BWARmSE2ccNEYAF3rqD ! jgEIaoPoTmqEwAGwW3hQa244Hi3CwVvYwAyCSBXtFzdbq9tGvv7RZjMR28HoENt9R4FIOQoIeYst ! NDBo8OjQQMOYI2jmgCbVSLZn+D8IgiAbFgHQuDP/M+1VVWiLFdM7xYmCLdwy0qxIVUmGFOEF4dta ! LOoDJDweHgTr3v0SiCUJIyss0KCrQw8ohxE+G09YaO+NFbC3SAYHR87pCgCawGKmIC7Ma/0G+5aV ! JBhomW29PlBVZMs2iDVJVVopz0IpyIqUsBzog4y1hVlFdDIciY1s0FBysfhXUDFxLDHGrRwVGE0Q ! LAIxd2fC/QMcaCwbpe+mm2wfYCkE6xBo2hgNt2XBi+tFpyBbYYR/cThBM/9XVydomWHDwcU62y91 ! BCsSxth26wLsV+tWeignGyb3fVuBsN2+Yc1/+FMz26gZAAxTMdKSa2aS6vyJCGg3tGNndAcwPQna ! UwA6NfObR1NQjUWYxznfOEsx15CxJ2L1W66J18DKQDwGpBD6u2Yv/DvDL804GHQUjU2Yme3E1ybV ! 4vs2nNKzudRTUIRI/4Bx1no6aWsvEGQSAUPXWtI820noKfj+VJvNzlYGYuzHIKp9my1ZxjXs8P1O ! U/a+19K18AB3CAwfG8Pumm0MvFk36GiadD2wLmD3GPzyhBsMvFjBoFISRoEaWNYkGoa/U+knuZOD ! mZ55Xi3xAoC84JqmPWBqZ/ACBADtijC76wN0yvNo7Aa3M4cQWFAO9WOOeso63AtvHc0BNevZaCtr ! csDSEHLM7ru+ZFVNbbeLQAg9Mc/Ws8XjdCk9Y5/EA8PpArMQNU5WvjLUfQj8iT0AnbaAuH8RXDXO ! TizVDWYUnsA08D6DHKAAu4F8/PfCczTCUyyHaWjPHAaLg8F3NeCZBXArAsKRwG53Uxk5NWwQowhm ! dBK2vwivhTedIgt1WR5whWS36Fde82jEGik+BoZmG4AeUYM9VNVEqeFDnCAifw7vhLK4cmA1vQ2w ! /WCSj0DE+IVHBVxzn9pv61OzNVQTeTTZHL0H+tQHIAnAA12nGeiwrRi33TVtW0wFiYPT5xCFDAZZ ! EXq1StN0SkJvuXRTfV9Zw4BMAaGUKuFac2DmOy1ZE/8XGroGjARB6/YPt8HB4BBM2QiHTWFWu+fx ! U7G6ZD+6/b02VlUQQRR3ayvnqVFAdE02/43WJeMviGgEcwgPJAp1TQb3lCRwfFniBCYQSmjLZuBK ! PBx6v3J/i3YE66eLKz6BxL0sLbwzCACUKVtnEPWd+NoA/KMMGXMQgVnajQkIakhIBquxLMu2XXwC ! XEIIcHsZWttLDbnrO2Q285tRwISpQd+BS3bqDtZSVyYQhQNndXbrb21Qi1AscfbsZg3nWGowGGg4 ! 91zcWD+duUAgO2ouGCQMSNZ7rH4qaDQlkxDsz5W6H0q+67RfbGF62cMOe9iLw+CWCFiGhgn8MAzX ! NUZoH+GJBshZiUYEA4Feb+HGEhtvVjkBvgqhufrCdDUhTQhQUXIFIhDOFmUR80g3zSKy6Qiv+GDi ! o2SxX6EGiB3tqk2fo92kK/CvElbkFMe2uiQQalFA+jX8NxczE5/5obyhULzCDk5YiHRJbRXGhe0C ! wHRDBAGNaiMmt8Fcx3TjbDg31hgGdL//b40WkwYHD5XBSYPhAkGLwaNC68dde7nexwUHyffsXcP/ ! ZI73aiRoUDzHQOgGXvfYG8B6OjijQHkcIXQzmi0aOK+//eTWzkznOoMfCsR4CXx6L05mIuvb00G9 ! tkEe1id1tz0RdELgvQg6aBi5LuslzBQyIY0EXXTX5QkLdGoLMI19xIVucLuO86sG9Ikiq6s22zb2 ! gUzdDKsakBOMG7/mBqYWUHl2wDBHBSi1iS/ruJf29tg2HNzhFIwb2FoVB0dbM7cizGvkH/C3sTvT ! uSsSbCBnFkAZcvLkkvRt4Rn4gHaeXG47H58zdW9XaH+MNFx8mGMFdstmYpQLBayMf5AgaNuy/Zt1 ! tAK8qA+k/qbrlfluGCmABJvpFVwPGQhwHGD4OBAzEYb3EsNPBxbKo4wYFWiYZpMVhiRsF+or1PUM ! Ti4EnQipEev+6mvA2+JcMr0BalC7uYdbL91pvpCziAT42g8tDNd0EfRZSz9omYlInT9r/R9OvWWx ! DSNGf+tqNukgdBWKZA89ODPbo4QTozpWD1LSGFQ0YS0h3aPCR0RdfOx9zyCbPKMw9aITu1CjMIOy ! e9j8D5KnlYbeSBmhN2CFFjg7CjRcgGAmBLBhmGFhof7w3v4/C5dVT4D5XHVEikgBQAgwfOj/Blje ! BDN+Fm6vcnXZxgYNRuu15Vq20wUK9DFzUfs1eNIY9DwKwx+IBlKNKPCbH62IDkZAmS4hHnxqfSRR ! U01UYIzOPQNW+giA+HiIjSbG2IPmKyP8UHhBaQ1k0aVEACFcywC0IF3wLxv1BMU0aC0X9PyX5S82 ! AxYRBFUI9by1/VvQTALqVytBEAIMBB6BOd9scRcJjTQQWKSBPnlWNOs2ZLYSC5hJjJAHuz3nOPAe ! /it+Zl9GkudCZgMzgb78/tGJyUaXbOQb6cKsuBam9HTQaBsDQ7E4N0rpsNBO0F4m23bOC7oCTXjb ! gRZX2nELFgzXaOsetcTLKNbe6wfQdJoQwTj358cZDkMe3ShnK9NHLn0dVqDYA9x/FEB1R64dS+Tg ! tgB/JrgznC02DexhZIoePpLpYEU2NPrYuzB1ms3U5nEi+HslhGZKbmEp4RfBJBebQm4g4ATH0d5z ! HMjm2O/4dFa9jChBw2tI2qsRLQpnzTUFBAstVjxsDnMrX2hhFQpscCeczhFww8wAtv//Ljoz0jvC ! VnQzi0gcO8p0LIlQFAIIW2z/XxiLcQz33hv2UoPmB6wxoxz6ERtuIBRRCBq8517CMexr2F+4jf8I ! kABccBdd7QiNOotG9bVuK99UTiSFyT0UDQqUSmxu2T8o3AgeGigYgLml26ckDccAAFQbO2gun+k+ ! O8cY941NsTWKAQ0dOsFNW6tWmOf1ZwrcqcW+M3kMO/d1Cj/ghHhr7ZtkIIl+GDoTYCBgOmduC29/ ! fig5fmUHDiSAgZspXGlqGC+EuieJL5Ska4Y+/NYQiXg1+MJCYVYXz4l6DIXd27/ftPfZx0AMAXj5 ! CHxZBA9/VB+4wtZufRHTs0oQUtdRN/ej7f/aG9JQ99KB4jA5ZVK1GzwZvsVrCu9BTx96FHUPj2/Z ! KZpuDpx3hCebdQtWG8lfuPppeZ6wZBBxU1UQRTDQVXME8HaFzba7CvkDoT4ACPCLVCPfP/VLO4P6 ! BL/76pXDS70FweOJbw/t+4lcGYkIyA0Ph8RPZis8/CSNgCoZBLY9iGuxtY1JHokNEAgLL41v41sF ! iw6KERwENRYQfaN1iwQjD0LALhZ0FceZF5wrOFXdbBiYdRu3725A66Iii1AQwekowQhddnYwObAY ! JIQ2Fp6ieb7WFwW9BBFI2tuu0IaOZghAdoteHAtC7XHbeQaJvR8DE397/2/0i0MEOQgDwff1hdJ0 ! IccDVpTJ08Xc0d1fbGh2Nrfx9sEgJYFjKQcmUcARGxzYPxcwLPDaG7T4pDD9dScKwb4YowJV80u2 ! ta5mLCYCkiIBT9SW2uxpAnOgM43oNuciLeVSHhJEVAzJN9s6+QvYDDnjCHvBnHktAmPk7eHPNd6a ! StzB4RhIC+QotGRrSTQJt2Gs3XA7g0hCiQY6HBTY37pCkIFIN+IQA8qJSDlcJJcMCr4IW3LJkAuE ! NnO4MTc/OUg0EjazGSIs6+UzWUJADgTpVKTVD9kGaAJ1CYvHcM4t+2jCCKdncmozmYV2Y6QWUEdu ! hPAAu8cBAzkWSE8GGQ63N4oKnVMzB8iRsz5WAgQOIYTJJNIgkBJG2IkosyE124WEH3hOMPMGuBqW ! kez4O2ksRGazgmFwACXk2wrLagD9DEMBYm7Jlin9BjjNcrv9C7cmTC4nAyQpXp3bZts02CQqF6US ! KANHmWXTNIG7XCpo8EASeFt/01cocLg1vwV6PIlDdKO9tY3cBA8EBXUOvuvrwAZbQlKZV8p1kQ3s ! egZ1DT5XUeoyfLBtN94ox/IBRjQCMA444rO1IO5RCCB0DnZrHbkFj9AfYEcwwNRnatjDf6NtaqgG ! nSshZGMgzugdtOhx9qbDw4tPKAFnyNEXSS8aX6WbqsDZLYtXKIzcYyRmkMnDckCgOWwDtlAoKB8D ! 507nnytRHi6iQjRIWDYCeDFbeOsD2B6JXiy8OMhIFokhBEeqWnSbRzKD7DA4U284PK2xNdD7KUOy ! axJIvpWgbS5L/04QMFY7yOXftYV+VAoVRHMFK8FI6wUuX8C1LAcejAOD+AkZDAn+B3+FnDhA2BiD ! /QNzPIzhejKQ2JYNxu//277kSIoPxxRMlIvRi83T4oPFCGN777ruC/JHMYk4iS9yzusEN69vbYF/ ! g+AHi8jR6LUBZB5LGHeeBW66kWPEg+0DGQHNwab33xwHwe4D0+4r6T+zHC5baHfVQUgmIFKNsISN ! DTV8YncwUQ44Us45jCRct1uo1yE0+BpRDyxSEKD7QIneECqMFImx58xXrrXvXFhxkAOLmQZhFAPx ! 1h3e+P1YFM4gcyxAw7l1qfr6oAY/TCD3XLYsT/Z8QCeu1MTvQnLUi9aLzoLhB3Jv/y3w6hAz0a+i ! OO2LwTvF+gSJbLCDdGtcSyYBi4kD6ejctsRM0he8KsccfNcOmwWFnRZ8GkQ71nUja/wWN7+Leygt ! dBmL1zuxFdsuFL5zByvCSFdkK/JziTX4QtcddWe0TEFIBFOJUzQvtlY6GDkHRzBqNrzNutajTDox ! K8pJ/0ss+W7P0QcEPlV1IGL3yc0HGdbyTovOwovIhgl3tqResAsF7g0WGsl2ncI7wQVii5qGwT4U ! RFPR4xe6X4EC86WLyi0c3wMr0POk2m17u8NcJUQDUg1LXTrTtRsV8CsMFol4HGBzLRgpAWhdZBgY ! Q3CY2UEqllwlB/IOczgyDkf3IWOS0iX/PyXIIPqWLTaYH4cdBtbQurk7FjzgCIH6oAUT8gXwDbYu ! qQV9H0aNhAgCZ+nmHMB3A0go+VDeeD4bYQyNBQ5IDsdDvU0TJ27wBOsIro1uNI1xU5IIEQqDYvmd ! pwstc2hZMr40BtLCZCoDLAhOn1qiI7GL/JhVSwxoDbYfxQSRYQgIA2H3MFeGamdymDC4E6G9Ntn7 ! yHMhPDTHMWk73VzhNaA3IHLfcBoaLH1pJG9DEI1TUVI0zqbNGVfx41BRMpy2mV0p7PCFIfsI5sNX ! WMgFT2XQNN7OguHiHzc1Al0Pg3vHo28n0lk76HMz40rea2vvOwXr+vlKmPY1N4Tm9PkH+i4Hf5eO ! +c2LyfCIuRQjxuarFV17VMEBjeY0GMZVWtvtbhCXNHMbySvq0QxFDtew4IQSinFApDf4Qr/bIfAj ! ErnNdAMz8oPoEsld4vHNWSsk+AsfC+Rhf8ALO+lzO5ngBNHIgXUfMJ3pyfS7c+3sfHdViwyNqSPO ! r9XaayYOFGLUkBnh1Hgb1xUc4Xfrp3OMCh4D0Dsqh6l1JZZyr9MqORDpxdyFGpnwgpMVDXup8M3a ! HYr86wIAqAxBSJkgoT18j/x19XeJXnrd9jJxgoWYFUAkJlHNmOkDUECN3wksJF/DtY5RElI8Njs/ ! UZGNAu5CBQE8a88UHeZZA2UJB0AGDzek6XGW/CQfFUw+HDjqJETKJTRPA67Nz3c9nzwgjiGwfSsc ! eVCkTttClueEVwQEBilILSzwAA9zXms8MK0utmiX2ATQK53m4MXXOANWTOjOTae+Bq3u51HMSZp5 ! tkaxe0B0VnhxdiVdtlQAHSQKD7gnTT4NIzgUnBkYsSnMr5VAmiEYidK5JBuYACwAoeu1jYOdz4sm ! aJqW2jX32m7plUxRd4XaFx1ySaCwkKEzxqENuwYww+BRXGFmjTfT/cszGBR2P1X74bfnUfLk12r9 ! K9HDA+pQTp7sSgZLTI0xi2lsrmHZOVHQKwFmkuoEst0iLxVSUTpDTn1rs4UyasdBGPQ9/Vhry0tG ! QEhIUYl5BHCEIcxGRBgRSyBco0046LOs8oRvEGYRp4QVUsiL90hgxlTKxBOfz4AAzjlBBJMM7luh ! iocr9wPug1FMCQT3T9FYuGHB0BJFE5/PnkIIhA9q/FCUeXcYyYaQ0HWMz5ACCYUrjhjKZm8knf11 ! BlulsEX2ME9RqDqIkKxj1yJolBTKGGHLfJ67A5d1rZFS3VAGJaQZhDXPtBUyCe7a/oH9zoVgiF8k ! TCsDtpAQ7BjlPQZZIj4JKXkjhTtcSFBS1+s9W6YHDECmZnJCd4fnQVBWU3RLtLn3yFPRdDehe+gg ! qvztIzcuiVYEf1Ar1YtuCPKtZFvjbn0+ZggrMsYBGDFDf0GrhW/HTFZVxWNSSJOtQ0tWmUiHkPQ7 ! nZigDCFMCJcNGE0IMgmRU0/2GmtfsP5FQ0gqQ2a78RT/RCwUPS0DsFwul8vbLoovcTDAMmc3LLtl ! s84SOKgnxiwoJcUM2KkzG+9QCDbADKIMagwrRQEOGEdYaeUCPIXdi1hGKADn9xoYDRgIV2OBHeBj ! 6U+3uBGDVLvv3XUKFxv0DOzCDI5c+d87vnvbD4bvEVWB+7AVmcNyBbgIKyv+uIvYgg+Moa3owe3b ! ohC/RWEQihaDxhvIIWfvrFbxA/kI8vMhhxxy9PX2hxxyyPf4+foccsgh+/z92M4hh/7/A01MRAk2 ! vGSf0FbqbesVFhJGE0h19LENdt/G7rnx8vfxTL8IizX397B1t9rri/WHEzFdF1uT4PACL18LwQif ! oWyCH5UIUG5ARlAGcgULGHTV6HiXPgTDDx8coYUauyU3hSKKT6NG4B13RYhQEFoMiEgRdQBhwB30 ! AA9IGMPfWnjFwxR/IHbOAzQWTBhGkvBWyGwu2hLabgzBDDSaJlwtwX7FvBDCAn2wfUYsB4kzTTrj ! V9yA3/4GbFhCgwRa6JAcGp3OMHLWdhAKCpJsKEatXC1/eiyJfjuMKdtqaYErInut+YWJBpWIpVJl ! 3FU2gA07upRWUiJNEU9VEJndU8d3OuzqyKN+HK4zXSu4SJ0oDUCuAxkrEXqjMAH4v0ZypXQTSffZ ! G8kBuV9sdYPB701hKw1mLLVU7WORek22RVi9NVayRVj4c0RA8VyseFwEug61L8Ardu0wALKOz9Pg ! n3NfctAAxwgLyDZ54Cw7G921QT8KLHK8roX4amyp7iMgCFbISRgjPPo1NBTT6LhuwW/BpV9FK/hA ! igHFFotJZpotEo+VCAavJbobPagQdLvgD66LrzZJF2sFIh8CQK8HLRXdRcOoduMn6dyQMx8HgtpC ! 9t5nDhqvSNx50JF8wwLn2AjeN3PyvosETLlNBAPIzpmutdatkbDUcgPmSkWb19MF9UUcEgyGzGVe ! lgPCEkaRRGS0gDRMDEQEVkG4WTBSZQyNDMGICJAHCEHYAkAOOWQMDAU4FKDAb34DdwOODWsV1XUD ! wis3njM1qUDWH+2z8QrRI5axCZYq8eMpVpfUTiwtUNpsn451IT4wO8ERHpxUalQtKQz7OHVE2Ajr ! D39nhpNoFI0US3KGzMhIYjwMbbCTG0hiXWNhJbJDbiJej2InYYS4ntsBkELzCYgX4dzfSv8RQUg7 ! UAg6zdHx3AdODGZJYc9sSIOBKDewAOPGRwUK4E0KhIG9T4gKQkhEvfYMPAFXzxSLKwoUOEa34sdD ! HyvNEyRC1gwXEar0VzfTnRTDSgkwGNjYBF4AAWJQZYW5QX5q/SvNU1ZQSVmobHPA67SYij+UlQeJ ! Az6D/wd2FXsl+Hs/PIPvCJFMicISOsNMN1C2i7mgVYey6mLK9MaOs04gOittbgq9wV88+VMr/Ytr ! ZO+JC1tIeDTC/hJBE9kimQE7/nYLXySQJDt04QO8PMtls1xAPf50PpI/Z1cjbJZB351A4gT59Mgi ! yAwgUVPTsRQ8bCAvE3YQqptBomfY23UJ+8dHx6FbWXUcslZVi2wJCG6gbo26U+sgUlXRL0rXSwET ! hTNMibbaMqLT/jcaW8WJXH9TUsdHGCS8VxT89i40XV5MHvt0BoN9zEVNt80MHwC+wjCesFhYKc+B ! 7PBtXeX+oowk9Ab8tN8B0y1QA9VXz0QDSE3TNE1MUFRYXGA0TdM0ZGhscHSQIXjTeHyJrCQ97RdK ! bDIB735chESNRAO6C3TpQ0qJuu05CHUfcRhE/Fe+gZRuwIkpiSrF2MKLF48anBe5YQM99RGNmDtD ! OSg9DboBfEGDwAQmdvN2343Hp/nNcwaaYroPK7Rxo/9jeDkudQhKg+4EO9UFO/r4t9l2pSx2JVT6 ! vlGJO9Pm2L39369zEo1cjEQrM3glU8ME0RFy8jdDhDZvlaOFHAxE9QLdCo0DK/G6QHkQX3eyGRGi ! A87liCwL5v7WBvZKhzPbA0wcSEnlNDrd74wcF3Xv3QRvNTLQV7TN/xxdwXa4FYyEHD0oP4wKj7dj ! DYlceEKJERJ77ohvGhwIQzvZcsVXi9/3mo2M3UKMFDWUiSGeaShwXQNxJB7pnKH4YcdDABLEGh/x ! 2x08D4+BAjM0ZeChSBSHDbkKzS3wXjtJhdLsKz4g/XKwvbc7TQ+OB2AUONYLltwsLC34bLr0TPT/ ! OAPfK9NFA8871/AmAR11SxrXHCBJy2im/ye4jX0BO8d2J4PP//caFnAbli3HbhhBBK596+4WFr7F ! beAfByvHEnLuy3aseYQkJL8754uxfAMZGznq+IH/iNjvJtj76cMgKyzCL42UhNg21I0DPYk4i7k/ ! dDgvIuz6Q4hMoLSELNa9RBPby4gFMb3G14tK/PCtFn7vi/XTwUMr8IkUvae7sTt0n+sJShgo4Ahd ! seHwBo//WoxuT7e94YrQCRwq04g9MYsIDG1s4I2Rf3IHxg7A6583f/Rd0SkMk/FzFIH+yRvSg+rK ! 7sLioPZgiHHrICAUE+G+Cx7mAooUMQyCbot3a4DCSzQxIbEE9pGFL1oOhyRHuhY2sbXivLQ7FXMe ! t8Xjt+iCgzB3iTmNPNWkQrczHHEEhh1y5tUUei+4MjGNwjGBhcJ0Wotw+wgz0NHoB3X4WEoOaCM0 ! HChgjByNBXeF9sExJE8j+ss6XxiD6Av2o9wET4gmK985M8Y4cawII3XcdRXI1FCHJ0ogK9LC08fH ! wxxSkEDrwZqY3sarHk6RG0JZuqtv1zv1dBeRLAF0TftcwFoLAQwKQmBYBCQPX4/lgVajYThoEjsD ! SANkGAtfGjicwGY0VWQYeKvHSTRS09homGLYQW8BoBgEFVVSYMb2EnCF9tfTRWdvIVg+OPvGDEwo ! O9HOZEg4exZMsDe6c5BjBFYeqFJRS/ze+j11JCeDOhYIgf1qdxO3BMAAPx2rkGY5geRPUdDAIR8W ! Hvt1H7R88MiG4yP8dAKQg5HFhi8jSzCBnQFsQkxJMEtgRSMP0V5cIN8N+PzeLgDvBs6h/AqciQIS ! sDXlEJTH6nd/dMDDrV2HQMhR7QwANmDjY2vXe/04tdXAdv3Bd3YDqOuNthUsEXvvO+hY6Bq2jo0e ! DzIg9wjqIGor8UdWFCvFA9XmMFYhfgkWljhwDotLPFUFuAm4UTZDPBLNi/f6iEn1pKZZyhz/yqWm ! A8UXSywD/aLntqrtCnV+QUQoDZFhd7pFdR9zNOqaK+6flpMrbBCEV0dXYx3kQFZHMHzNay22UF74 ! hHuC5OpFwd6MimFKdcFwWihUiVFy4gVL+DUYXh+43Tj0zFn5i2mcUSDsRi1cO3EwNzgdO+5RckD/ ! cEEcOXMJK/VOwdyrlurOSTHNgTYlTTehtA4cLJ1oLvEgg/g8IotJQaLEVkcRi6XIGi32dl9hCAvW ! Rx1y4liiV27E3+AwI8rIihzOjTTOLISOXAHeOcIyTgHT6gRnLEBrqj85BL4ju32AH2sMnWBeBDYD ! yzj7B5ADVXTHg+MPK8M07SvQBTFODavLI0wykWykDw8gkSlb0jScMWbKRsgFAZTPXNgD8DvDcytZ ! GIP5qv0c0OfVh9dBJlvOlviXcgc8WU76z9kcrVFwwe7H9SAUcEVI15QOvsGFvEkoETv3cheLNPhg ! //dFig5GiE3/BoPrAusB4NuxRusncSwfO992E3b2t1aLHRwARUZPdfYYKBAt2c4MS57rGb8GFOj5 ! uQQZcEVJgWFXP2JHEnI6DnIz+dTWdUU76zycEEkE2xy/KhN0K/M+rPCyuYgv1K078w+CBwLNTd4t ! PkeLdNnFZQV67O3B6x7ZcwLeOCv5MzE2xuqNFM2awsQc+t5BXIIWU0YI6s+JPiuskisUZ1YNVukA ! e+HUc2IgdFZX2GxWpM9a2712gFzYcj8QlWoy8mb+9YhBt7adaAMrQVhAizE6eC+xQTl3X4lBZ5r9 ! DeCmd2af/yUAdeb5fG4FrGAIYbRgsLADA/TMzFE9jC0Icjj2u6GHSU6+LRCFARdz7JtK3LqYxAyL ! 4WDPUMNS4Ua2zEMEIAUsfZcd/Gr/aAhkU4BQZKGhUCnYekt0JQcYaMuARtF4iWXovvaNDdQNDRXE ! fYMN21RsZ3M/BhAUyGRrKtWcDaTxCA3MCvd3ZGSh0AwAoxQobiNy7+ttOR1AGHlubGz372xO1BhY ! aAxwgghwJ0RN0PtSoWA/K5Q0280tIFwMCZxQA5CgX1O0VE/c6QQyAH0XgCFOoeBuMPu7vwT9gD4i ! dTpGCIoGOsN0BDwN2x6Qb/ISBCB28tTQTmiLm2akjPZF0DMR+uftjeTU6w4rIHbY6/VqClgEbRUt ! lYJMRVeCnlEQh8kz5BHoDV+S7FQJiU2Iy2F7wcVMWQou/3WIH+yhwhsZG/AF6Ni0VTbM194DBCwv ! gqzDRraEFZIAL8C4AETSHd0AAAeqyhYV//83SNM8EBESCANN0zRNBwkGCgULNU3TNAQMAw0C/yBN ! 0z8OAQ8gaW5mbGF0+/b/9mUgMS4BMyBDb3B5cmlnaHQPOTk1LQTvzf6/OCBNYXJrIEFkbGVyIEtX ! Y7333ntve4N/e3dN033va1+nE7MXGx80TdM0IyszO0PTNE3TU2Nzg6MXITxNw+MBJQEkQzJkAwID ! MyRDMgQFALNky05wX0cv031vCX/38xk/IU7TNE0xQWGBwTRNs+tAgQMBAgMEBtM0TdMIDBAYIGyF ! NU0wQGDn11jCkY3HBqe3hAlJq6+zA4IMMsgLDA3RtqKj9iqnPgMfVFVIgUNyZfV/uwElRGkGY3Rv ! cnkgKCVzKSzY/38QTWFwVmlld09mRmlsZRUrLGXv3hAdcGluZxcQ/+1nwHpFbmQgGXR1cm5zICVk ! sIQFc1MXFBNwwMB+SW5pdDIYtvbblw5LXFRpbWUUUm9tYW4LgG377WhpCldpemFyXHdxbN3+5t7n ! c3RhB3ggb24geW9AIGNr/3+7KXB1U3IuIENsaWNrIE5leHQg3Re31tq2bnQudYDoGUtjZXVbt71s ! FRxpHWgVU31wtfYBg1suH3kWMh3Z2q2MAS5kYQ9QIFYb8Jy7WXNpBxbB5293sNntZnR3NGVcIAZD ! bxHKbmc3lVxJoFDlaABDXTO027UoZrMpmP5nIZEtbNx0hClTb9fw0Jzf+n9mc3PEcoS12y6rby4A ! G2MIb9ksiRwUIQ3h0F1igW4MVuGCa6+0pYuoTUlmX6N7hcJ2OiyudiG3te2DTGNoEmczBHkqLVxY ! hINAc1p0CO1Y23ZzLCpvQmEEnS1hAGGJd4Ntjba9919PcDttEWBMZ4Vtu9APUi1fUxBwwFMr51ob ! c1QjRghsIwu8b7OPS2kNAExvYWTwt7kRJssGADy0dBIbsIZHXykJOwsuB8Nh2zHKcif0J4tANedc ! ewBFcnIzC32NHXO0hYcPT3bJd4bVvRX2EJrxWz8AG/+90P5zPwoKUHIGnFlFU/dBTFdBWY49hG0J ! by4sCnAtTk/2p7L/LE5FVkVSK0NBTkNFTFxwoWA4U0uLA6tkdYjDA9uPeS6Xb3CeBPdAaJ9JrmZh ! S38Kb9va6hZkFWELYjNut9cNBw1yZxZfdsMMO7xkD0ynD2q67SZIMWJ1BmRf6W+kr8VG729DfhoA ! dHtZckQvBGxub3STudZorWWBQVOyIHLX3iaU1G9ncn3IdmFspNZqj3OUDmV/YYt1WTtjifZl4Zi1 ! r+thzmaAfvlHFJMW5sUvcazQvLEAd51kb3dhPCs2NlnhLlifVx1DHNBo7SEHZXd/u3hgc+4rZNPq ! ckAglr3NdCkNCmsnF7BgrtARRGUZxW3jMNh0czNWa5CGwyHWd267wYZ7NNNlG7NkL2Iezn1wXSvq ! Fbhw6Udvb9wh2KkneBgZ0lqyv51TWHltYm9scz8Wb2bauT5GbG92L88F7rFlXxh0eXD4oCgRTfS0 ! 92marmsrqAeYA4x4aNTh3qxQG+OxNmLqPiTDMhHzZmbxZVoF900mY3MRMzHsYLi5PNhtbzctIcOy ! zTX30G0vuGVLOLIbbgvkaAErtH5ZwwPFsNlmzgkv3h1IUywjEwVgLAHpmubsUAAHEFRzH1KDDXKy ! HwBwMEDAgwzSdB9QCmAgsCDQIKC4H8EGGWSAQOA/jxlksAYfWBiQgwzSdH9TO3g4gzTNINBREWgM ! MsggKLAIMsggg4hI8M1ggwwEVAcUVcgggzXjfyt0IIMMMjTIDYMMMshkJKgEDDLIIIRE6JDBJpuf ! XB8ckEGaZphUU3ywQRhkPNifF/9BBhlkbCy4BhlkkAyMTPgZZJBBA1ISZJBBBqMjcpBBBhkyxAtB ! BhlkYiKkBhlkkAKCQuQZZJBBB1oaZJBBBpRDepBBBhk61BNBBhlkaiq0BhlkkAqKSvQZZJBBBVYW ! GWSQpsAAM3ZkkEEGNswPkEEGGWYmrEEGGWQGhkYGGWSQ7AleHhlkkEGcY35skEEGPtwbH7BBBhlu ! LrwPQQYZbA4fjk5kEIak/P9R/xEZZEgag/9xMRlkSAbCYSFkkEEGogGBZEgGGUHiWWRIBhkZknlk ! SAYZOdJpkEEGGSmyCUgGGWSJSfJk0xtkVRUX/wIBZJBBLnU1ymSQQYZlJaqQQQYZBYVFkEGGZOpd ! HZBBhmSafT2QQYZk2m0tQQYZZLoNjUGGZJBN+lNBhmSQE8NzQYZkkDPGYwYZZJAjpgODhmSQQUPm ! W4ZkkEEblnuGZJBBO9ZrGWSQQSu2C2SQQQaLS/aGkEGGVxd3hmSQQTfOZxlkkEEnrgdkkEEGh0fu ! ZJBBhl8fnmSQQYZ/P95skMGGbx8vvg+DDDbZn48fT/5QMlQS/8EMJUPJoeGRyVAylNGxJUMlQ/HJ ! UDKUDKnpDCVDyZnZuTJUMpT5xSVDyVCl5VAylAyV1UMlQ8m19c0ylAwlre0lQ8lQnd1UMpQMvf1D ! yVAyw6PjMpQMJZPTJUPJULPzlAwlQ8urQ8lQMuub2zKUDCW7+8lQMlTHp5QMJUPnl0PJUDLXt/cM ! JUMlz6/JUDKU75+UDCVD37+Pd9I3/38Fn1cH7+nc03QPEVsQ3w8Fp2mWp1kEVUFdnXu6s0A/Aw9Y ! Aq8PIWk69zRcIJ8PCVrsaZrlCFaBwGB/QwYZ5AKBGeTkkJMYBwZhTg45OWAEAzHkkJNDMA0MgQ6x ! 5MGvO3EpLoUlZHnQaWNKN2gZVi5yZdUV9r8rXHN1YnNjcmliZWQnLCTEskt2HkUCG1lHI+IlIS6p ! dHnNFDYwwpUXHp+zpewtWyg9Y6ZpvpQfAwEDB56maZoPHz9//wFpmqZpAwcPHz8hECeif52fqioE ! Ii0EEQgNTTqACFkoHHuWJftuLAQnoAkul9uV/wAA5wDeANblcrlcAL0AhABCADlcLpfLADEAKQAY ! ABAACCA7+a0/3v8ApWPuAApHULY3717KDszNBgAF/xdu1iVs/zcP/gYI7K0sYAUXDzeWsjeZ7wYA ! F27nK1s3/7a/BqamC5s51wgMDgsX/feBvaYGN/tSW0r6UkFCWrHtjd0FWVJaC1sXJ+8LPR/YexEG ! N/YgJqUIzu1WuBWvBRQQvTeyW5DGF/7uJgUG7XbzgTf6QEr7UTFRMVoFYwP2dQBaC1oXWgUQrbm2 ! sEpvYLp1Beb+121UFW4UBWV1hqYQFjcXN2RjsQsdFm8R2brNvT1dA0dARgEFEc1YG9nJxm/6C/lA ! b7r3BnOvFV15AQAS6AHmZgZGCx1vcycP8kExWEhSWBAFhZ+yz1wNC0r6Ud8UZWQQ7jfyySUQFqam ! ZHUVlRfDAOtmCwoAb0Mh2+ywdUgLFzEcxMi+BTFvOoIZzBOzFabPCyH7hhVZFwUU3+bOGY/7CiNa ! AwvCbphjOhcFQldPN4wzQnr+kwi2DHdYvwu2BZ9vSZY6QvD8cv7D7A17DQMGBMnBkrSwbxEH3ks2 ! ewUDdwv3N2xGyDf5BwVCSraw5w/vhG827O5JBwX2V1vYmyUP+ze5hHD23tkHBfrHGCF7sw8hb/nG ! 2ey1agcFAxVDG2DLGJtvVTJmlwVvRwWb6XRK2W+B8gFzX7KZa2l1Fudv1hTjAhET7FpvIZ9NGgVv ! R1ExSbNlDQBbb3Uxwl4vbwNvmFa2jfNZAltvF/veAnub381yJt8vsFcADW9J/CdL2IT5PQNvWvrj ! RUgktwn7BbLJ3mmH9t8yXtsg61LXEb8vGZNWljfxh2W0HsUVOFWfMyatbDfx80QAyblaCwwPL0mn ! lW9m6wtl30JqDPcL/jcIe8lg4gkLwUCUxYcBaCNqGQmRSBERiM8JPQGyNVaxRCwLdC9wAOuo6w4B ! TRMgA2E9cwkYLRHdIXKxZjYj2CJeUH1Ns5Gp+BBBFP+CkzbXfW5oJTFXB3o/NWT3ua7pDXdsASAH ! UXQZt7mxMw8lLW8VBXkHua7pNoVyCWNtj3Up13Vd93kuE0MvaRlrC04V3JnZXHgbKXQvbgsb+577 ! XXUbUUdDwWMRN9iXrGwrOWk7aCuEDdmy/7cu7NnITfcECLHvKXgA/YEciobLdgIDDlAGP2hYc2cU ! SWSCB30AvQrTXQJDo2hCpoTTH4KfBbrXfSEnbANj/095bko4HAM7mWEZ67oJk2k3f3M5OmBio/gJ ! gAiBUMP5bZONhI217xPvninsEMwAQhNJZ6w7zLpECXKdv506TUYehIcDAaGDZAD+gxEkJUIHmo6D ! jKtigWduPlIIS3v3SeydhuRtG0mLTWRsprtyP3YFd/XSF/vcY1UlZ1sJeWOQSFgyZu8s1r3353QP ! Qw0sU9E0kp67Qi0JlRXSKJltYdNsmIdLgE+z62voPlxtfQ1sB1+XcvM+oG6kZ3MBM9tQI6tgyBUx ! k8hwI09ziexTg0QZR7ZjOl8OIQDJA1dGujGaEa9paGV11XSVDIF1+XekYYCs2ylngvBKAqvhjSB0 ! YzzjZHd1F2N5YVX73GYNNXmNuEAqFVXxoAmGCMRXUAU3QJQ4GExpYpuof00lQQ1jYWxGMwFGKmgU ! /G9ybWF0TYPf/21XXxpHZQxvZHVsZUhhbmRsEVXHAhbEbm0dIlByYM65b0FBZGRyNkJIW4jddrAc ! aXZSZSNmaf4GFgS2WUVOYW1RZ3/BbQ1TaXpXVIJ4C2sgHhH35m1nTA1sc0psZW5Eb3NEYfbeLggp ! VG8vCRZ7liyImTtMYTHWugNEuTFlFBra7iNbo0ludBZDbFYKWpvN9oy50SSku7UOHGZvT1O9bCFE ! SMpBdCyEbtvvYnUbcxNNONhsJERRVsD2n2ZhrtEAUmVnUXVlV/6xt8JWpgZFeEERRW51bUtlecUC ! 8sMOT3Blbr1udprND0XeFG/jNsF9aynIeVNoZfflE7vTbBNBMusg5VRlPGvf+Xh0Q29sCk/LpkJr ! MvchNL5lSk9iavrT/zY2YW9BDFM8aWRCcnVzaDTbzH03bCYsZvWsu8G17extrD3RY3B5B7k3tzth ! D19jSJtsZnALwt9ewxQuCIVjZXB0X2iagoauO3IzEV89X0Nf2Xtzr74PCV9mbZ4LNoI1qkEN9mqw ! EsTWiCtmEjeu0B5bDmXy+ckRyucKC4VpsRAcZ78NiNYYEM9zOWNt0L6tbW5uCH1pmViowvRi7qkr ! kRNExtpYAUO9dLMHbqSx2MnOaHLmD2Zq+tlsRr4m7XZzbnCtlOxtHXRm7QpTHSJf5hpzPV5jbXBm ! /FHFVpYsUQDIDIjY1q1TdAq3h+3fYVJpDkRsZ0mtbYO9JQVrFwznFNrHwZYNCUJvTEUZI/Yk11WK ! BHlzN9WZI6KhYxVCMh0+XrOOCGZyDVRvHsMG1ipggUXOdluQICd1RHdz6kElo/Gzl0N1cnNtPllr ! xJhT1p4IDsldkrccVXBka2VlaxfMvXVUe25zbB4Smwes0FppYw8t4m92YhbEZD1SCCxP4AnjQSpQ ! RUwQs28AAy7r4TkRikHwDcIPAQsBBjuHLU8IvuxOEA9AskjkZgsDGgc2KyZbF8ARDGXwBnYQBwYD ! Amme5RRkjKASFVbVBaeMx1+wneEudJ4HkECQ6xAjYnNhRSAuchjLljA7DFMDAjvdwZpALiYYLTxw ! B6+xTdknwE9zzQxiZd976/MnkE9oH6gD5yzfK7UDAAAAAAAAJAD/AABgvgCgQACNvgBw//9Xg83/ ! 6xCQkJCQkJCKBkaIB0cB23UHix6D7vwR23LtuAEAAAAB23UHix6D7vwR2xHAAdtz73UJix6D7vwR ! 23PkMcmD6ANyDcHgCIoGRoPw/3R0icUB23UHix6D7vwR2xHJAdt1B4seg+78EdsRyXUgQQHbdQeL ! HoPu/BHbEckB23PvdQmLHoPu/BHbc+SDwQKB/QDz//+D0QGNFC+D/fx2D4oCQogHR0l19+lj//// ! kIsCg8IEiQeDxwSD6QR38QHP6Uz///9eife5kQAAAIoHRyzoPAF394A/AXXyiweKXwRmwegIwcAQ ! hsQp+IDr6AHwiQeDxwWJ2OLZjb4AsAAAiwcJwHQ8i18EjYQwMNEAAAHzUIPHCP+WvNEAAJWKB0cI ! wHTciflXSPKuVf+WwNEAAAnAdAeJA4PDBOvh/5bE0QAAYemoeP//AAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA From python-dev@python.org Thu Oct 12 20:42:05 2000 From: python-dev@python.org (Tim Peters) Date: Thu, 12 Oct 2000 12:42:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.57,2.58 Message-ID: <200010121942.MAA24894@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv24477/python/dist/src/modules Modified Files: mathmodule.c Log Message: Repaired a comment and asserted a precondition. Index: mathmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v retrieving revision 2.57 retrieving revision 2.58 diff -C2 -r2.57 -r2.58 *** mathmodule.c 2000/10/12 06:10:25 2.57 --- mathmodule.c 2000/10/12 19:42:00 2.58 *************** *** 19,23 **** /* RED_FLAG 12-Oct-2000 Tim ! * What CHECK does if errno != 0 and x is a NaN is a platform-dependent crap * shoot. Most (but not all!) platforms will end up setting errno to ERANGE * then, but EDOM is probably better. --- 19,23 ---- /* RED_FLAG 12-Oct-2000 Tim ! * What CHECK does if errno == 0 and x is a NaN is a platform-dependent crap * shoot. Most (but not all!) platforms will end up setting errno to ERANGE * then, but EDOM is probably better. *************** *** 39,42 **** --- 39,43 ---- { int result = 1; /* presumption of guilt */ + assert(errno); /* non-zero errno is a precondition for calling */ if (errno == EDOM) PyErr_SetString(PyExc_ValueError, "math domain error"); From python-dev@python.org Thu Oct 12 20:58:40 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 12 Oct 2000 12:58:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib httplib.py,1.23,1.24 Message-ID: <200010121958.MAA09334@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv8371/Lib Modified Files: httplib.py Log Message: If the status line is invalid, assume it is a pre-1.0 response. The msg/headers are empty and the entire response is treated as the body. Index: httplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** httplib.py 2000/09/21 22:09:47 1.23 --- httplib.py 2000/10/12 19:58:36 1.24 *************** *** 119,124 **** reason = "" except ValueError: ! self.close() ! raise BadStatusLine(line) if version[:5] != 'HTTP/': self.close() --- 119,125 ---- reason = "" except ValueError: ! version = "HTTP/0.9" ! status = "200" ! reason = "" if version[:5] != 'HTTP/': self.close() *************** *** 130,137 **** if version == 'HTTP/1.0': self.version = 10 ! elif version[:7] == 'HTTP/1.': self.version = 11 # use HTTP/1.1 code for HTTP/1.x where x>=1 else: raise UnknownProtocol(version) self.msg = mimetools.Message(self.fp, 0) --- 131,144 ---- if version == 'HTTP/1.0': self.version = 10 ! elif version.startswith('HTTP/1.'): self.version = 11 # use HTTP/1.1 code for HTTP/1.x where x>=1 + elif version == 'HTTP/0.9': + self.version = 9 else: raise UnknownProtocol(version) + + if self.version == 9: + self.msg = mimetools.Message(StringIO()) + return self.msg = mimetools.Message(self.fp, 0) From python-dev@python.org Thu Oct 12 21:05:12 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 13:05:12 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib xmlsaxhandler.tex,NONE,1.1 xmlsaxutils.tex,NONE,1.1 xmlsaxreader.tex,NONE,1.1 xmlsax.tex,1.1,1.2 Message-ID: <200010122005.NAA15982@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv15904 Modified Files: xmlsax.tex Added Files: xmlsaxhandler.tex xmlsaxutils.tex xmlsaxreader.tex Log Message: Massive addition of SAX documentation from Martin von Loewis . Reorganized to be more like other parts of the documentation in its arrangement, but with few content changes. This closes SourceForge patch #101850. --- NEW FILE --- \section{\module{xml.sax.handler} --- Base classes for SAX handlers} \declaremodule{standard}{xml.sax.handler} \modulesynopsis{Base classes for SAX event handlers.} \sectionauthor{Martin v. L\"owis}{loewis@informatik.hu-berlin.de} \moduleauthor{Lars Marius Garshol}{larsga@garshol.priv.no} \versionadded{2.0} The SAX API defines four kinds of handlers: content handlers, DTD handlers, error handlers, and entity resolvers. Applications normally only need to implement those interfaces whose events they are interested in; they can implement the interfaces in a single object or in multiple objects. Handler implementations should inherit from the base classes provided in the module \module{xml.sax}, so that all methods get default implementations. \begin{classdesc}{ContentHandler}{} This is the main callback interface in SAX, and the one most important to applications. The order of events in this interface mirrors the order of the information in the document. \end{classdesc} \begin{classdesc}{DTDHandler}{} Handle DTD events. This interface specifies only those DTD events required for basic parsing (unparsed entities and attributes). \end{classdesc} \begin{classdesc}{EntityResolver}{} Basic interface for resolving entities. If you create an object implementing this interface, then register the object with your Parser, the parser will call the method in your object to resolve all external entities. \end{classdesc} In addition to these classes, \module{xml.sax.handler} provides symbolic constants for the feature and property names. \begin{datadesc}{feature_namespaces} Value: \code{"http://xml.org/sax/features/namespaces"}\\ true: Perform Namespace processing (default).\\ false: Optionally do not perform Namespace processing (implies namespace-prefixes).\\ access: (parsing) read-only; (not parsing) read/write\\ \end{datadesc} \begin{datadesc}{feature_namespace_prefixes} Value: \code{"http://xml.org/sax/features/namespace-prefixes"}\\ true: Report the original prefixed names and attributes used for Namespace declarations.\\ false: Do not report attributes used for Namespace declarations, and optionally do not report original prefixed names (default).\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{feature_string_interning} Value: \code{"http://xml.org/sax/features/string-interning"} true: All element names, prefixes, attribute names, Namespace URIs, and local names are interned using the built-in intern function.\\ false: Names are not necessarily interned, although they may be (default).\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{feature_validation} Value: \code{"http://xml.org/sax/features/validation"}\\ true: Report all validation errors (implies external-general-entities and external-parameter-entities).\\ false: Do not report validation errors.\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{feature_external_ges} Value: \code{"http://xml.org/sax/features/external-general-entities"}\\ true: Include all external general (text) entities.\\ false: Do not include external general entities.\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{feature_external_pes} Value: \code{"http://xml.org/sax/features/external-parameter-entities"}\\ true: Include all external parameter entities, including the external DTD subset.\\ false: Do not include any external parameter entities, even the external DTD subset.\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{all_features} List of all features. \end{datadesc} \begin{datadesc}{property_lexical_handler} Value: \code{"http://xml.org/sax/properties/lexical-handler"}\\ data type: xml.sax.sax2lib.LexicalHandler (not supported in Python 2)\\ description: An optional extension handler for lexical events like comments.\\ access: read/write \end{datadesc} \begin{datadesc}{property_declaration_handler} Value: \code{"http://xml.org/sax/properties/declaration-handler"}\\ data type: xml.sax.sax2lib.DeclHandler (not supported in Python 2)\\ description: An optional extension handler for DTD-related events other than notations and unparsed entities.\\ access: read/write \end{datadesc} \begin{datadesc}{property_dom_node} Value: \code{"http://xml.org/sax/properties/dom-node"}\\ data type: org.w3c.dom.Node (not supported in Python 2) \\ description: When parsing, the current DOM node being visited if this is a DOM iterator; when not parsing, the root DOM node for iteration.\\ access: (parsing) read-only; (not parsing) read/write \end{datadesc} \begin{datadesc}{property_xml_string} Value: \code{"http://xml.org/sax/properties/xml-string"}\\ data type: String\\ description: The literal string of characters that was the source for the current event.\\ access: read-only \end{datadesc} \begin{datadesc}{all_properties} List of all known property names. \end{datadesc} \subsection{ContentHandler Objects \label{content-handler-objects}} Users are expected to subclass \class{ContentHandler} to support their application. The following methods are called by the parser on the appropriate events in the input document: \begin{methoddesc}[ContentHandler]{setDocumentLocator}{locator} Called by the parser to give the application a locator for locating the origin of document events. SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the DocumentHandler interface. The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine. Note that the locator will return correct information only during the invocation of the events in this interface. The application should not attempt to use it at any other time. \end{methoddesc} \begin{methoddesc}[ContentHandler]{startDocument}{} Receive notification of the beginning of a document. The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for \method{setDocumentLocator()}). \end{methoddesc} \begin{methoddesc}[ContentHandler]{endDocument}{} Receive notification of the end of a document. The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input. \end{methoddesc} \begin{methoddesc}[ContentHandler]{startPrefixMapping}{prefix, uri} Begin the scope of a prefix-URI Namespace mapping. The information from this event is not necessary for normal Namespace processing: the SAX XML reader will automatically replace prefixes for element and attribute names when the \code{http://xml.org/sax/features/namespaces} feature is true (the default). %% XXX This is not really the default, is it? MvL There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary. Note that start/endPrefixMapping events are not guaranteed to be properly nested relative to each-other: all \method{startPrefixMapping()} events will occur before the corresponding startElement event, and all \method{endPrefixMapping()} events will occur after the corresponding \method{endElement()} event, but their order is not guaranteed. \end{methoddesc} \begin{methoddesc}[ContentHandler]{endPrefixMapping}{prefix} End the scope of a prefix-URI mapping. See \method{startPrefixMapping()} for details. This event will always occur after the corresponding endElement event, but the order of endPrefixMapping events is not otherwise guaranteed. \end{methoddesc} \begin{methoddesc}[ContentHandler]{startElement}{name, attrs} Signals the start of an element in non-namespace mode. The \var{name} parameter contains the raw XML 1.0 name of the element type as a string and the \var{attrs} parameter holds an instance of the \class{Attributes} class containing the attributes of the element. \end{methoddesc} \begin{methoddesc}[ContentHandler]{endElement}{name} Signals the end of an element in non-namespace mode. The \var{name} parameter contains the name of the element type, just as with the startElement event. \end{methoddesc} \begin{methoddesc}[ContentHandler]{startElementNS}{name, qname, attrs} Signals the start of an element in namespace mode. The \var{name} parameter contains the name of the element type as a (uri, localname) tuple, the \var{qname} parameter the raw XML 1.0 name used in the source document, and the \var{attrs} parameter holds an instance of the \class{AttributesNS} class containing the attributes of the element. Parsers may set the \var{qname} parameter to \code{None}, unless the \code{http://xml.org/sax/features/namespace-prefixes} feature is activated. \end{methoddesc} \begin{methoddesc}[ContentHandler]{endElementNS}{name, qname} Signals the end of an element in namespace mode. The \var{name} parameter contains the name of the element type, just as with the startElementNS event, likewise the \var{qname} parameter. \end{methoddesc} \begin{methoddesc}[ContentHandler]{characters}{content} Receive notification of character data. The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information. \var{content} may be a Unicode string or a byte string; the \code{expat} reader module produces always Unicode strings. \end{methoddesc} \begin{methoddesc}[ContentHandler]{ignorableWhitespace}{} Receive notification of ignorable whitespace in element content. Validating Parsers must use this method to report each chunk of ignorable whitespace (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models. SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information. \end{methoddesc} \begin{methoddesc}[ContentHandler]{processingInstruction}{target, data} Receive notification of a processing instruction. The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element. A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method. \end{methoddesc} \begin{methoddesc}[ContentHandler]{skippedEntity}{name} Receive notification of a skipped entity. The Parser will invoke this method once for each entity skipped. Non-validating processors may skip entities if they have not seen the declarations (because, for example, the entity was declared in an external DTD subset). All processors may skip external entities, depending on the values of the \code{http://xml.org/sax/features/external-general-entities} and the \code{http://xml.org/sax/features/external-parameter-entities} properties. \end{methoddesc} \subsection{DTDHandler Objects \label{dtd-handler-objects}} \class{DTDHandler} instances provide the following methods: \begin{methoddesc}[DTDHandler]{notationDecl}{name, publicId, systemId} Handle a notation declaration event. \end{methoddesc} \begin{methoddesc}[DTDHandler]{unparsedEntityDecl}{name, publicId, systemId, ndata} Handle an unparsed entity declaration event. \end{methoddesc} \subsection{EntityResolver Objects \label{entity-resolver-objects}} \begin{methoddesc}[EntityResolver]{resolveEntity}{publicId, systemId} Resolve the system identifier of an entity and return either the system identifier to read from as a string, or an InputSource to read from. The default implementation returns \var{systemId}. \end{methoddesc} --- NEW FILE --- \section{\module{xml.sax.saxutils} --- SAX Utilities} \declaremodule{standard}{xml.sax.saxutils} \modulesynopsis{Convenience functions and classes for use with SAX.} \sectionauthor{Martin v. L\"owis}{loewis@informatik.hu-berlin.de} \moduleauthor{Lars Marius Garshol}{larsga@garshol.priv.no} \versionadded{2.0} The module \module{xml.sax.saxutils} contains a number of classes and functions that are commonly useful when creating SAX applications, either in direct use, or as base classes. \begin{funcdesc}{escape}{data\optional{, entities}} Escape \&, <, and > in a string of data. You can escape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. \end{funcdesc} \begin{classdesc}{XMLGenerator}{\optional{out\optional{, encoding}}} This class implements the \class{ContentHandler} interface by writing SAX events back into an XML document. In other words, using an \class{XMLGenerator} as the content handler will reproduce the original document being parsed. \var{out} should be a file-like object which will default to \var{sys.stdout}. \var{encoding} is the encoding of the output stream which defaults to \code{'iso-8859-1'}. \end{classdesc} \begin{classdesc}{XMLFilterBase}{base} This class is designed to sit between an \class{XMLReader} and the client application's event handlers. By default, it does nothing but pass requests up to the reader and events on to the handlers unmodified, but subclasses can override specific methods to modify the event stream or the configuration requests as they pass through. \end{classdesc} \begin{funcdesc}{prepare_input_source}{source\optional{, base}} This function takes an input source and an optional base URL and returns a fully resolved \class{InputSource} object ready for reading. The input source can be given as a string, a file-like object, or an \class{InputSource} object; parsers will use this function to implement the polymorphic \var{source} argument to their \method{parse()} method. \end{funcdesc} --- NEW FILE --- \section{\module{xml.sax.xmlreader} --- Interface for XML parsers} \declaremodule{standard}{xml.sax.xmlreader} \modulesynopsis{Interface which SAX-compliant XML parsers must implement.} \sectionauthor{Martin v. L\"owis}{loewis@informatik.hu-berlin.de} \moduleauthor{Lars Marius Garshol}{larsga@garshol.priv.no} \versionadded{2.0} SAX parsers implement the \class{XMLReader} interface. They are implemented in a Python module, which must provide a function \function{create_parser()}. This function is invoked by \function{xml.sax.make_parser()} with no arguments to create a new parser object. \begin{classdesc}{XMLReader}{} Base class which can be inherited by SAX parsers. \end{classdesc} \begin{classdesc}{IncrementalParser}{} In some cases, it is desirable not to parse an input source at once, but to feed chunks of the document as they get available. Note that the reader will normally not read the entire file, but read it in chunks as well; still \method{parse()} won't return until the entire document is processed. So these interfaces should be used if the blocking behaviour of \method{parse()} is not desirable. When the parser is instantiated it is ready to begin accepting data from the feed method immediately. After parsing has been finished with a call to close the reset method must be called to make the parser ready to accept new data, either from feed or using the parse method. Note that these methods must \emph{not} be called during parsing, that is, after parse has been called and before it returns. By default, the class also implements the parse method of the XMLReader interface using the feed, close and reset methods of the IncrementalParser interface as a convenience to SAX 2.0 driver writers. \end{classdesc} \begin{classdesc}{Locator}{} Interface for associating a SAX event with a document location. A locator object will return valid results only during calls to DocumentHandler methods; at any other time, the results are unpredictable. If information is not available, methods may return \code{None}. \end{classdesc} \begin{classdesc}{InputSource}{\optional{systemId}} Encapsulation of the information needed by the \class{XMLReader} to read entities. This class may include information about the public identifier, system identifier, byte stream (possibly with character encoding information) and/or the character stream of an entity. Applications will create objects of this class for use in the \method{XMLReader.parse()} method and for returning from EntityResolver.resolveEntity. An \class{InputSource} belongs to the application, the \class{XMLReader} is not allowed to modify \class{InputSource} objects passed to it from the application, although it may make copies and modify those. \end{classdesc} \begin{classdesc}{AttributesImpl}{attrs} This is a dictionary-like object which represents the element attributes in a \method{startElement()} call. In addition to the most useful dictionary operations, it supports a number of other methods as described below. Objects of this class should be instantiated by readers; \var{attrs} must be a dictionary-like object. \end{classdesc} \begin{classdesc}{AttributesNSImpl}{attrs, qnames} Namespace-aware variant of attributes, which will be passed to \method{startElementNS()}. It is derived from \class{AttributesImpl}, but understands attribute names as two-tuples of \var{namespaceURI} and \var{localname}. In addition, it provides a number of methods expecting qualified names as they appear in the original document. \end{classdesc} \subsection{XMLReader Objects \label{xmlreader-objects}} The \class{XMLReader} interface supports the following methods: \begin{methoddesc}[XMLReader]{parse}{source} Process an input source, producing SAX events. The \var{source} object can be a system identifier (i.e. a string identifying the input source -- typically a file name or an URL), a file-like object, or an \class{InputSource} object. When \method{parse()} returns, the input is completely processed, and the parser object can be discarded or reset. As a limitation, the current implementation only accepts byte streams; processing of character streams is for further study. \end{methoddesc} \begin{methoddesc}[XMLReader]{getContentHandler}{} Return the current \class{ContentHandler}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setContentHandler}{handler} Set the current \class{ContentHandler}. If no \class{ContentHandler} is set, content events will be discarded. \end{methoddesc} \begin{methoddesc}[XMLReader]{getDTDHandler}{} Return the current \class{DTDHandler}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setDTDHandler}{handler} Set the current \class{DTDHandler}. If no \class{DTDHandler} is set, DTD events will be discarded. \end{methoddesc} \begin{methoddesc}[XMLReader]{getEntityResolver}{} Return the current \class{EntityResolver}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setEntityResolver}{handler} Set the current \class{EntityResolver}. If no \class{EntityResolver} is set, attempts to resolve an external entity will result in opening the system identifier for the entity, and fail if it is not available. \end{methoddesc} \begin{methoddesc}[XMLReader]{getErrorHandler}{} Return the current \class{ErrorHandler}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setErrorHandler}{handler} Set the current error handler. If no \class{ErrorHandler} is set, errors will be raised as exceptions, and warnings will be printed. \end{methoddesc} \begin{methoddesc}[XMLReader]{setLocale}{locale} Allow an application to set the locale for errors and warnings. SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, however, they must throw a SAX exception. Applications may request a locale change in the middle of a parse. \end{methoddesc} \begin{methoddesc}[XMLReader]{getFeature}{featurename} Return the current setting for feature \var{featurename}. If the feature is not recognized, \exception{SAXNotRecognizedException} is raised. The well-known featurenames are listed in the module \module{xml.sax.handler}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setFeature}{featurename, value} Set the \var{featurename} to \var{value}. If the feature is not recognized, \exception{SAXNotRecognizedException} is raised. If the feature or its setting is not supported by the parser, \var{SAXNotSupportedException} is raised. \end{methoddesc} \begin{methoddesc}[XMLReader]{getProperty}{propertyname} Return the current setting for property \var{propertyname}. If the property is not recognized, a \exception{SAXNotRecognizedException} is raised. The well-known propertynames are listed in the module \module{xml.sax.handler}. \end{methoddesc} \begin{methoddesc}[XMLReader]{setProperty}{propertyname, value} Set the \var{propertyname} to \var{value}. If the property is not recognized, \exception{SAXNotRecognizedException} is raised. If the property or its setting is not supported by the parser, \var{SAXNotSupportedException} is raised. \end{methoddesc} \subsection{IncrementalParser Objects \label{incremental-parser-objects}} Instances of \class{IncrementalParser} offer the following additional methods: \begin{methoddesc}[IncrementalParser]{feed}{data} Process a chunk of \var{data}. \end{methoddesc} \begin{methoddesc}[IncrementalParser]{close}{} Assume the end of the document. That will check well-formedness conditions that can be checked only at the end, invoke handlers, and may clean up resources allocated during parsing. \end{methoddesc} \begin{methoddesc}[IncrementalParser]{reset}{} This method is called after close has been called to reset the parser so that it is ready to parse new documents. The results of calling parse or feed after close without calling reset are undefined.""" \end{methoddesc} \subsection{Locator Objects \label{locator-objects}} Instances of \class{Locator} provide these methods: \begin{methoddesc}[Locator]{getColumnNumber}{} Return the column number where the current event ends. \end{methoddesc} \begin{methoddesc}[Locator]{getLineNumber}{} Return the line number where the current event ends. \end{methoddesc} \begin{methoddesc}[Locator]{getPublicId}{} Return the public identifier for the current event. \end{methoddesc} \begin{methoddesc}[Locator]{getSystemId}{} Return the system identifier for the current event. \end{methoddesc} \subsection{InputSource Objects \label{input-source-objects}} \begin{methoddesc}[InputSource]{setPublicId}{id} Sets the public identifier of this \class{InputSource}. \end{methoddesc} \begin{methoddesc}[InputSource]{getPublicId}{} Returns the public identifier of this \class{InputSource}. \end{methoddesc} \begin{methoddesc}[InputSource]{setSystemId}{id} Sets the system identifier of this \class{InputSource}. \end{methoddesc} \begin{methoddesc}[InputSource]{getSystemId}{} Returns the system identifier of this \class{InputSource}. \end{methoddesc} \begin{methoddesc}[InputSource]{setEncoding}{encoding} Sets the character encoding of this \class{InputSource}. The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML recommendation). The encoding attribute of the \class{InputSource} is ignored if the \class{InputSource} also contains a character stream. \end{methoddesc} \begin{methoddesc}[InputSource]{getEncoding}{} Get the character encoding of this InputSource. \end{methoddesc} \begin{methoddesc}[InputSource]{setByteStream}{bytefile} Set the byte stream (a Python file-like object which does not perform byte-to-character conversion) for this input source. The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself. If the application knows the character encoding of the byte stream, it should set it with the setEncoding method. \end{methoddesc} \begin{methoddesc}[InputSource]{getByteStream}{} Get the byte stream for this input source. The getEncoding method will return the character encoding for this byte stream, or None if unknown. \end{methoddesc} \begin{methoddesc}[InputSource]{setCharacterStream}{charfile} Set the character stream for this input source. (The stream must be a Python 1.6 Unicode-wrapped file-like that performs conversion to Unicode strings.) If there is a character stream specified, the SAX parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier. \end{methoddesc} \begin{methoddesc}[InputSource]{getCharacterStream}{} Get the character stream for this input source. \end{methoddesc} \subsection{AttributesImpl Objects \label{attributes-impl-objects}} \class{AttributesImpl} objects implement a portion of the mapping protocol, and the methods \method{copy()}, \method{get()}, \method{has_key()}, \method{items()}, \method{keys()}, and \method{values()}. The following methods are also provided: \begin{methoddesc}[AttributesImpl]{getLength}{} Return the number of attributes. \end{methoddesc} \begin{methoddesc}[AttributesImpl]{getNames}{} Return the names of the attributes. \end{methoddesc} \begin{methoddesc}[AttributesImpl]{getType}{name} Returns the type of the attribute \var{name}, which is normally \code{'CDATA'}. \end{methoddesc} \begin{methoddesc}[AttributesImpl]{getValue}{name} Return the value of attribute \var{name}. \end{methoddesc} % getValueByQName, getNameByQName, getQNameByName, getQNames available % here already, but documented only for derived class. \subsection{AttributesNSImpl Objects \label{attributes-ns-impl-objects}} \begin{methoddesc}[AttributesNSImpl]{getValueByQName}{name} Return the value for a qualified name. \end{methoddesc} \begin{methoddesc}[AttributesNSImpl]{getNameByQName}{name} Return the \code{(\var{namespace}, \var{localname})} pair for a qualified \var{name}. \end{methoddesc} \begin{methoddesc}[AttributesNSImpl]{getQNameByName}{name} Return the qualified name for a \code{(\var{namespace}, \var{localname})} pair. \end{methoddesc} \begin{methoddesc}[AttributesNSImpl]{getQNames}{} Return the qualified names of all attributes. \end{methoddesc} Index: xmlsax.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/xmlsax.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** xmlsax.tex 2000/09/20 02:52:20 1.1 --- xmlsax.tex 2000/10/12 20:05:09 1.2 *************** *** 7,10 **** --- 7,11 ---- \moduleauthor{Lars Marius Garshol}{larsga@garshol.priv.no} \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} + \sectionauthor{Martin v. L\"owis}{loewis@informatik.hu-berlin.de} \versionadded{2.0} *************** *** 42,47 **** \end{funcdesc} ! The SAX exceptions are also provided here: \begin{excclassdesc}{SAXException}{msg\optional{, exception}} --- 43,69 ---- \end{funcdesc} + A typical SAX application uses three kinds of objects: readers, + handlers and input sources. ``Reader'' in this context is another term + for parser, ie. some piece of code that reads the bytes or characters + from the input source, and produces a sequence of events. The events + then get distributed to the handler objects, ie. the reader invokes a + method on the handler. A SAX application must therefore obtain a + handler object, create or open the input sources, create the handlers, + and connect these objects all together. As the final step, parsing is + invoked. During parsing + + For these objects, only the interfaces are relevant; they are normally + not instantiated by the application itself. Since Python does not have + an explicit notion of interface, they are formally introduced as + classes. The \class{InputSource}, \class{Locator}, + \class{AttributesImpl}, and \class{XMLReader} interfaces are defined + in the module \refmodule{xml.sax.xmlreader}. The handler interfaces + are defined in \refmodule{xml.sax.handler}. For convenience, + \class{InputSource} (which is often instantiated directly) and the + handler classes are also available from \module{xml.sax}. These + classes are described below. ! In addition to these classes, \module{xml.sax} provides the following ! exception classes. \begin{excclassdesc}{SAXException}{msg\optional{, exception}} *************** *** 95,99 **** ! \subsection{SAXException Objects \label{saxexception-objects}} The \class{SAXException} exception class supports the following --- 117,121 ---- ! \subsection{SAXException Objects \label{sax-exception-objects}} The \class{SAXException} exception class supports the following From python-dev@python.org Thu Oct 12 21:07:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 13:07:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.46,1.47 Message-ID: <200010122007.NAA18340@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv18253 Modified Files: Makefile.deps Log Message: Added entries for new files of SAX documentation. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -r1.46 -r1.47 *** Makefile.deps 2000/09/25 18:26:21 1.46 --- Makefile.deps 2000/10/12 20:07:08 1.47 *************** *** 172,175 **** --- 172,178 ---- ../lib/libpyexpat.tex \ ../lib/xmlsax.tex \ + ../lib/xmlsaxhandler.tex \ + ../lib/xmlsaxutils.tex \ + ../lib/xmlsaxreader.tex \ ../lib/libqueue.tex \ ../lib/liblocale.tex \ From python-dev@python.org Thu Oct 12 21:07:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 13:07:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib lib.tex,1.168,1.169 Message-ID: <200010122007.NAA18349@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv18253/lib Modified Files: lib.tex Log Message: Added entries for new files of SAX documentation. Index: lib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -r1.168 -r1.169 *** lib.tex 2000/10/10 16:46:36 1.168 --- lib.tex 2000/10/12 20:07:09 1.169 *************** *** 236,239 **** --- 236,242 ---- \input{libpyexpat} \input{xmlsax} + \input{xmlsaxhandler} + \input{xmlsaxutils} + \input{xmlsaxreader} \input{libxmllib} From python-dev@python.org Thu Oct 12 21:23:27 2000 From: python-dev@python.org (Jeremy Hylton) Date: Thu, 12 Oct 2000 13:23:27 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler/compiler pyassem.py,1.11,1.12 pycodegen.py,1.24,1.25 transformer.py,1.14,1.15 Message-ID: <200010122023.NAA03254@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/compiler/compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv2177/compiler Modified Files: pyassem.py pycodegen.py transformer.py Log Message: Fix SF bug #116263: support for from .. import * transformer.py: return '*', None from com_import_as_name pycodegen.py: special case for name == '*' pyassem.py: fix stack counting for IMPORT_ opcodes Index: pyassem.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/pyassem.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** pyassem.py 2000/09/01 20:47:37 1.11 --- pyassem.py 2000/10/12 20:23:23 1.12 *************** *** 516,519 **** --- 516,522 ---- 'COMPARE_OP': -1, 'STORE_FAST': -1, + 'IMPORT_STAR': -1, + 'IMPORT_NAME': 0, + 'IMPORT_FROM': 1, } # use pattern match *************** *** 521,525 **** ('BINARY_', -1), ('LOAD_', 1), - ('IMPORT_', 1), ] --- 524,527 ---- Index: pycodegen.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/pycodegen.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** pycodegen.py 2000/09/01 20:47:37 1.24 --- pycodegen.py 2000/10/12 20:23:23 1.25 *************** *** 440,446 **** if name == '*': self.namespace = 0 ! self.emit('IMPORT_FROM', name) ! self._resolveDots(name) ! self.storeName(alias or name) self.emit('POP_TOP') --- 440,451 ---- if name == '*': self.namespace = 0 ! self.emit('IMPORT_STAR') ! # There can only be one name w/ from ... import * ! assert len(node.names) == 1 ! return ! else: ! self.emit('IMPORT_FROM', name) ! self._resolveDots(name) ! self.storeName(alias or name) self.emit('POP_TOP') Index: transformer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/transformer.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** transformer.py 2000/09/20 02:47:28 1.14 --- transformer.py 2000/10/12 20:23:23 1.15 *************** *** 826,829 **** --- 826,831 ---- def com_import_as_name(self, node): + if node == '*': + return '*', None if node[0] == token.NAME: return node[1], None From python-dev@python.org Thu Oct 12 21:50:58 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 13:50:58 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcodecs.tex,1.3,1.4 Message-ID: <200010122050.NAA24919@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24868/lib Modified Files: libcodecs.tex Log Message: Marc-Andre Lemburg : Documentation for the codec base classes. Lots of markup adjustments by FLD. This closes SourceForge bug #115308, patch #101877. Index: libcodecs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** libcodecs.tex 2000/07/24 19:33:49 1.3 --- libcodecs.tex 2000/10/12 20:50:55 1.4 *************** *** 29,40 **** \var{encoder} and \var{decoder}: These must be functions or methods ! which have the same interface as the .encode/.decode methods of ! Codec instances (see Codec Interface). The functions/methods are ! expected to work in a stateless mode. \var{stream_reader} and \var{stream_writer}: These have to be factory functions providing the following interface: ! \code{factory(\var{stream}, \var{errors}='strict')} The factory functions must return objects providing the interfaces --- 29,41 ---- \var{encoder} and \var{decoder}: These must be functions or methods ! which have the same interface as the ! \method{encode()}/\method{decode()} methods of Codec instances (see ! Codec Interface). The functions/methods are expected to work in a ! stateless mode. \var{stream_reader} and \var{stream_writer}: These have to be factory functions providing the following interface: ! \code{factory(\var{stream}, \var{errors}='strict')} The factory functions must return objects providing the interfaces *************** *** 104,113 **** \end{funcdesc} - - - ...XXX document codec base classes... - - - The module also provides the following constants which are useful for reading and writing to platform dependent files: --- 105,108 ---- *************** *** 127,129 **** --- 122,395 ---- (\samp{_LE} suffix) byte order using 32-bit and 64-bit encodings. \end{datadesc} + + \subsection{Codec Base Classes} + + The \module{codecs} defines a set of base classes which define the + interface and can also be used to easily write you own codecs for use + in Python. + + Each codec has to define four interfaces to make it usable as codec in + Python: stateless encoder, stateless decoder, stream reader and stream + writer. The stream reader and writers typically reuse the stateless + encoder/decoder to implement the file protocols. + + The \class{Codec} class defines the interface for stateless + encoders/decoders. + + To simplify and standardize error handling, the \method{encode()} and + \method{decode()} methods may implement different error handling + schemes by providing the \var{errors} string argument. The following + string values are defined and implemented by all standard Python + codecs: + + \begin{itemize} + \item \code{'strict'} Raise \exception{ValueError} (or a subclass); + this is the default. + \item \code{'ignore'} Ignore the character and continue with the next. + \item \code{'replace'} Replace with a suitable replacement character; + Python will use the official U+FFFD REPLACEMENT + CHARACTER for the builtin Unicode codecs. + \end{itemize} + + + \subsubsection{Codec Objects \label{codec-objects}} + + The \class{Codec} class defines these methods which also define the + function interfaces of the stateless encoder and decoder: + + \begin{methoddesc}{encode}{input\optional{, errors}} + Encodes the object \var{input} and returns a tuple (output object, + length consumed). + + \var{errors} defines the error handling to apply. It defaults to + \code{'strict'} handling. + + The method may not store state in the \class{Codec} instance. Use + \class{StreamCodec} for codecs which have to keep state in order to + make encoding/decoding efficient. + + The encoder must be able to handle zero length input and return an + empty object of the output object type in this situation. + \end{methoddesc} + + \begin{methoddesc}{decode}{input\optional{, errors}} + Decodes the object \var{input} and returns a tuple (output object, + length consumed). + + \var{input} must be an object which provides the \code{bf_getreadbuf} + buffer slot. Python strings, buffer objects and memory mapped files + are examples of objects providing this slot. + + \var{errors} defines the error handling to apply. It defaults to + \code{'strict'} handling. + + The method may not store state in the \class{Codec} instance. Use + \class{StreamCodec} for codecs which have to keep state in order to + make encoding/decoding efficient. + + The decoder must be able to handle zero length input and return an + empty object of the output object type in this situation. + \end{methoddesc} + + The \class{StreamWriter} and \class{StreamReader} classes provide + generic working interfaces which can be used to implement new + encodings submodules very easily. See \module{encodings.utf_8} for an + example on how this is done. + + + \subsubsection{StreamWriter Objects \label{stream-writer-objects}} + + The \class{StreamWriter} class is a subclass of \class{Codec} and + defines the following methods which every stream writer must define in + order to be compatible to the Python codec registry. + + \begin{classdesc}{StreamWriter}{stream\optional{, errors}} + Constructor for a \class{StreamWriter} instance. + + All stream writers must provide this constructor interface. They are + free to add additional keyword arguments, but only the ones defined + here are used by the Python codec registry. + + \var{stream} must be a file-like object open for writing (binary) + data. + + The \class{StreamWriter} may implement different error handling + schemes by providing the \var{errors} keyword argument. These + parameters are defined: + + \begin{itemize} + \item \code{'strict'} Raise \exception{ValueError} (or a subclass); + this is the default. + \item \code{'ignore'} Ignore the character and continue with the next. + \item \code{'replace'} Replace with a suitable replacement character + \end{itemize} + \end{classdesc} + + \begin{methoddesc}{write}{object} + Writes the object's contents encoded to the stream. + \end{methoddesc} + + \begin{methoddesc}{writelines}{list} + Writes the concatenated list of strings to the stream (possibly by + reusing the \method{write()} method). + \end{methoddesc} + + \begin{methoddesc}{reset}{} + Flushes and resets the codec buffers used for keeping state. + + Calling this method should ensure that the data on the output is put + into a clean state, that allows appending of new fresh data without + having to rescan the whole stream to recover state. + \end{methoddesc} + + In addition to the above methods, the \class{StreamWriter} must also + inherit all other methods and attribute from the underlying stream. + + + \subsubsection{StreamReader Objects \label{stream-reader-objects}} + + The \class{StreamReader} class is a subclass of \class{Codec} and + defines the following methods which every stream reader must define in + order to be compatible to the Python codec registry. + + \begin{classdesc}{StreamReader}{stream\optional{, errors}} + Constructor for a \class{StreamReader} instance. + + All stream readers must provide this constructor interface. They are + free to add additional keyword arguments, but only the ones defined + here are used by the Python codec registry. + + \var{stream} must be a file-like object open for reading (binary) + data. + + The \class{StreamReader} may implement different error handling + schemes by providing the \var{errors} keyword argument. These + parameters are defined: + + \begin{itemize} + \item \code{'strict'} Raise \exception{ValueError} (or a subclass); + this is the default. + \item \code{'ignore'} Ignore the character and continue with the next. + \item \code{'replace'} Replace with a suitable replacement character. + \end{itemize} + \end{classdesc} + + \begin{methoddesc}{read}{\optional{size}} + Decodes data from the stream and returns the resulting object. + + \var{size} indicates the approximate maximum number of bytes to read + from the stream for decoding purposes. The decoder can modify this + setting as appropriate. The default value -1 indicates to read and + decode as much as possible. \var{size} is intended to prevent having + to decode huge files in one step. + + The method should use a greedy read strategy meaning that it should + read as much data as is allowed within the definition of the encoding + and the given size, e.g. if optional encoding endings or state + markers are available on the stream, these should be read too. + \end{methoddesc} + + \begin{methoddesc}{readline}{[size]} + Read one line from the input stream and return the + decoded data. + + Note: Unlike the \method{readlines()} method, this method inherits + the line breaking knowledge from the underlying stream's + \method{readline()} method -- there is currently no support for line + breaking using the codec decoder due to lack of line buffering. + Sublcasses should however, if possible, try to implement this method + using their own knowledge of line breaking. + + \var{size}, if given, is passed as size argument to the stream's + \method{readline()} method. + \end{methoddesc} + + \begin{methoddesc}{readlines}{[sizehint]} + Read all lines available on the input stream and return them as list + of lines. + + Line breaks are implemented using the codec's decoder method and are + included in the list entries. + + \var{sizehint}, if given, is passed as \var{size} argument to the + stream's \method{read()} method. + \end{methoddesc} + + \begin{methoddesc}{reset}{} + Resets the codec buffers used for keeping state. + + Note that no stream repositioning should take place. This method is + primarily intended to be able to recover from decoding errors. + \end{methoddesc} + + In addition to the above methods, the \class{StreamReader} must also + inherit all other methods and attribute from the underlying stream. + + The next two base classes are included for convenience. They are not + needed by the codec registry, but may provide useful in practice. + + + \subsubsection{StreamReaderWriter Objects \label{stream-reader-writer}} + + The \class{StreamReaderWriter} allows wrapping streams which work in + both read and write modes. + + The design is such that one can use the factory functions returned by + the \function{lookup()} function to construct the instance. + + \begin{classdesc}{StreamReaderWriter}{stream, Reader, Writer, errors} + Creates a \class{StreamReaderWriter} instance. + \var{stream} must be a file-like object. + \var{Reader} and \var{Writer} must be factory functions or classes + providing the \class{StreamReader} and \class{StreamWriter} interface + resp. + Error handling is done in the same way as defined for the + stream readers and writers. + \end{classdesc} + + \class{StreamReaderWriter} instances define the combined interfaces of + \class{StreamReader} and \class{StreamWriter} classes. They inherit + all other methods and attribute from the underlying stream. + + + \subsubsection{StreamRecoder Objects \label{stream-recoder-objects}} + + The \class{StreamRecoder} provide a frontend - backend view of + encoding data which is sometimes useful when dealing with different + encoding environments. + + The design is such that one can use the factory functions returned by + the \function{lookup()} function to construct the instance. + + \begin{classdesc}{StreamRecoder}{stream, encode, decode, + Reader, Writer, errors} + Creates a \class{StreamRecoder} instance which implements a two-way + conversion: \var{encode} and \var{decode} work on the frontend (the + input to \method{read()} and output of \method{write()}) while + \var{Reader} and \var{Writer} work on the backend (reading and + writing to the stream). + + You can use these objects to do transparent direct recodings from + e.g.\ Latin-1 to UTF-8 and back. + + \var{stream} must be a file-like object. + + \var{encode}, \var{decode} must adhere to the \class{Codec} + interface, \var{Reader}, \var{Writer} must be factory functions or + classes providing objects of the the \class{StreamReader} and + \class{StreamWriter} interface respectively. + + \var{encode} and \var{decode} are needed for the frontend + translation, \var{Reader} and \var{Writer} for the backend + translation. The intermediate format used is determined by the two + sets of codecs, e.g. the Unicode codecs will use Unicode as + intermediate encoding. + + Error handling is done in the same way as defined for the + stream readers and writers. + \end{classdesc} + + \class{StreamRecoder} instances define the combined interfaces of + \class{StreamReader} and \class{StreamWriter} classes. They inherit + all other methods and attribute from the underlying stream. From python-dev@python.org Thu Oct 12 21:58:35 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 12 Oct 2000 13:58:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Python thread_pth.h,2.6,2.7 Message-ID: <200010122058.NAA30902@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv30861/Python Modified Files: thread_pth.h Log Message: Andy Dustman : Eliminate unused variables to appease compiler. Index: thread_pth.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** thread_pth.h 2000/09/01 23:29:28 2.6 --- thread_pth.h 2000/10/12 20:58:32 2.7 *************** *** 48,52 **** { pth_t th; - int success; dprintf(("PyThread_start_new_thread called\n")); if (!initialized) --- 48,51 ---- *************** *** 146,150 **** { pth_lock *thelock = (pth_lock *)lock; - int status, error = 0; dprintf(("PyThread_free_lock(%p) called\n", lock)); --- 145,148 ---- *************** *** 247,251 **** void PyThread_free_sema(PyThread_type_sema sema) { - int status, error = 0; struct semaphore *thesema = (struct semaphore *) sema; --- 245,248 ---- From python-dev@python.org Thu Oct 12 23:07:53 2000 From: python-dev@python.org (Guido van Rossum) Date: Thu, 12 Oct 2000 15:07:53 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0042.txt,1.36,1.37 Message-ID: <200010122207.PAA20832@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv20767 Modified Files: pep-0042.txt Log Message: Add Tim's getopt wish. Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** pep-0042.txt 2000/10/12 16:17:36 1.36 --- pep-0042.txt 2000/10/12 22:07:49 1.37 *************** *** 238,241 **** --- 238,246 ---- http://sourceforge.net/bugs/?func=detailbug&bug_id=116326&group_id=5470 + - We should rename and rationalize the API getopt.c provides, and + always use this, instead of trying to rely on the platform + getopt and fighting with its prototype. + + http://www.python.org/pipermail/python-dev/2000-October/016620.html From python-dev@python.org Fri Oct 13 02:32:45 2000 From: python-dev@python.org (Neil Schemenauer) Date: Thu, 12 Oct 2000 18:32:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test regrtest.py,1.25,1.26 Message-ID: <200010130132.SAA19755@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv18685/Lib/test Modified Files: regrtest.py Log Message: Make the regrtest.py -l (findleaks) option considerably less obnoxious. First, only report garbage that the GC cannot free. Second, only report the number of objects found, not their repr(). People can dig deeper on their own if they find a leak. Index: regrtest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** regrtest.py 2000/09/22 15:29:28 1.25 --- regrtest.py 2000/10/13 01:32:42 1.26 *************** *** 15,19 **** -s: single -- run only a single test (see below) -r: random -- randomize test execution order ! -l: findleaks -- if GC is available detect and print cyclic garbage --have-resources -- run tests that require large resources (time/space) --- 15,19 ---- -s: single -- run only a single test (see below) -r: random -- randomize test execution order ! -l: findleaks -- if GC is available detect tests that leak memory --have-resources -- run tests that require large resources (time/space) *************** *** 93,100 **** import gc except ImportError: ! print 'cycle garbage collection not available' findleaks = 0 else: ! gc.set_debug(gc.DEBUG_SAVEALL) found_garbage = [] --- 93,103 ---- import gc except ImportError: ! print 'No GC available, disabling findleaks.' findleaks = 0 else: ! # Uncomment the line below to report garbage that is not ! # freeable by reference counting alone. By default only ! # garbage that is not collectable by the GC is reported. ! #gc.set_debug(gc.DEBUG_SAVEALL) found_garbage = [] *************** *** 142,146 **** gc.collect() if gc.garbage: ! print "garbage:", repr(gc.garbage) found_garbage.extend(gc.garbage) del gc.garbage[:] --- 145,152 ---- gc.collect() if gc.garbage: ! print "Warning: test created", len(gc.garbage), ! print "uncollectable object(s)." ! # move the uncollectable objects somewhere so we don't see ! # them again found_garbage.extend(gc.garbage) del gc.garbage[:] From python-dev@python.org Fri Oct 13 16:35:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 08:35:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.202,1.203 Message-ID: <200010131535.IAA12601@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv12549 Modified Files: Makefile Log Message: Update the release number and date. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.202 retrieving revision 1.203 diff -C2 -r1.202 -r1.203 *** Makefile 2000/10/03 16:50:48 1.202 --- Makefile 2000/10/13 15:35:26 1.203 *************** *** 65,69 **** # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.0c1 --- 65,69 ---- # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.0 From python-dev@python.org Fri Oct 13 16:35:32 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 08:35:32 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.49,1.50 Message-ID: <200010131535.IAA12606@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory slayer.i.sourceforge.net:/tmp/cvs-serv12549/texinputs Modified Files: boilerplate.tex Log Message: Update the release number and date. Index: boilerplate.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** boilerplate.tex 2000/10/05 03:24:00 1.49 --- boilerplate.tex 2000/10/13 15:35:27 1.50 *************** *** 6,10 **** } ! \date{October 9, 2000} % XXX update before release! ! \release{2.0c1} % software release, not documentation \setshortversion{2.0} % major.minor only for software --- 6,10 ---- } ! \date{October 16, 2000} % XXX update before release! ! \release{2.0} % software release, not documentation \setshortversion{2.0} % major.minor only for software From python-dev@python.org Fri Oct 13 21:11:49 2000 From: python-dev@python.org (Paul Prescod) Date: Fri, 13 Oct 2000 13:11:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.11,1.12 Message-ID: <200010132011.NAA30404@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv30000 Modified Files: minidom.py Log Message: Clear siblings, now that they are being set. Index: minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** minidom.py 2000/10/09 20:04:16 1.11 --- minidom.py 2000/10/13 20:11:42 1.12 *************** *** 137,140 **** --- 137,142 ---- del self.childNodes[-1] # probably not most efficient! self.childNodes = None + self.previousSibling = None + self.nextSibling = None if self.attributes: for attr in self._attrs.values(): From python-dev@python.org Fri Oct 13 21:53:30 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Fri, 13 Oct 2000 13:53:30 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/dom pulldom.py,1.9,1.10 Message-ID: <200010132053.NAA29301@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/dom In directory slayer.i.sourceforge.net:/tmp/cvs-serv28660 Modified Files: pulldom.py Log Message: Moved appendChild calls back to DOMEventStream. Added SAX2DOM class. Index: pulldom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** pulldom.py 2000/10/11 22:34:04 1.9 --- pulldom.py 2000/10/13 20:53:27 1.10 *************** *** 52,56 **** parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.curNode = node --- 52,55 ---- *************** *** 76,80 **** parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.curNode = node --- 75,78 ---- *************** *** 94,98 **** node = self.document.createComment(s) parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(COMMENT, node), None] --- 92,95 ---- *************** *** 104,108 **** parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(PROCESSING_INSTRUCTION, node), None] --- 101,104 ---- *************** *** 113,117 **** node = self.document.createTextNode(chars[start:start + length]) parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(IGNORABLE_WHITESPACE, node), None] --- 109,112 ---- *************** *** 122,126 **** node = self.document.createTextNode(chars) parent = self.curNode - parent.appendChild(node) node.parentNode = parent self.lastEvent[1] = [(CHARACTERS, node), None] --- 117,120 ---- *************** *** 178,181 **** --- 172,177 ---- if cur_node is node: return + if token != END_ELEMENT: + cur_node.parentNode.appendChild(cur_node) event = self.getEvent() *************** *** 194,200 **** return rc default_bufsize = (2 ** 14) - 20 - # FIXME: move into sax package for common usage def parse(stream_or_string, parser=None, bufsize=default_bufsize): if type(stream_or_string) is type(""): --- 190,220 ---- return rc + class SAX2DOM(PullDOM): + + def startElementNS(self, name, tagName , attrs): + PullDOM.startElementNS(self, name, tagName, attrs) + self.curNode.parentNode.appendChild(self.curNode) + + def startElement(self, name, attrs): + PullDOM.startElement(self, name, attrs) + self.curNode.parentNode.appendChild(self.curNode) + + def processingInstruction(self, target, data): + PullDOM.processingInstruction(self, target, data) + node = self.lastEvent[0][1] + node.parentNode.appendChild(node) + + def ignorableWhitespace(self, chars): + PullDOM.ignorableWhitespace(self, chars) + node = self.lastEvent[0][1] + node.parentNode.appendChild(node) + + def characters(self, chars): + PullDOM.characters(self, chars) + node = self.lastEvent[0][1] + node.parentNode.appendChild(node) + default_bufsize = (2 ** 14) - 20 def parse(stream_or_string, parser=None, bufsize=default_bufsize): if type(stream_or_string) is type(""): From python-dev@python.org Fri Oct 13 21:54:14 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Fri, 13 Oct 2000 13:54:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_minidom,1.8,1.9 Message-ID: <200010132054.NAA30069@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv29715/output Modified Files: test_minidom Log Message: Updated test suite to latest pulldom changes. Index: test_minidom =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_minidom,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_minidom 2000/10/11 22:36:00 1.8 --- test_minidom 2000/10/13 20:54:10 1.9 *************** *** 111,118 **** Test Succeeded testInsertBefore Passed assertion: len(Node.allnodes) == 0 - Passed testNonNSElements - siblings - Passed testNonNSElements - parents - Test Succeeded testNonNSElements - Passed assertion: len(Node.allnodes) == 0 Passed Test Passed Test --- 111,114 ---- *************** *** 154,157 **** --- 150,157 ---- Passed Test Test Succeeded testRemoveAttributeNode + Passed assertion: len(Node.allnodes) == 0 + Passed testSAX2DOM - siblings + Passed testSAX2DOM - parents + Test Succeeded testSAX2DOM Passed assertion: len(Node.allnodes) == 0 Test Succeeded testSetAttrValueandNodeValue From python-dev@python.org Fri Oct 13 21:54:14 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Fri, 13 Oct 2000 13:54:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.12,1.13 Message-ID: <200010132054.NAA30070@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv29715 Modified Files: test_minidom.py Log Message: Updated test suite to latest pulldom changes. Index: test_minidom.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** test_minidom.py 2000/10/12 17:31:36 1.12 --- test_minidom.py 2000/10/13 20:54:10 1.13 *************** *** 338,356 **** doc.unlink() ! def testNonNSElements(): from xml.dom import pulldom ! pulldom = pulldom.PullDOM() ! pulldom.startDocument() ! pulldom.startElement("doc", {}) ! pulldom.characters("text") ! pulldom.startElement("subelm", {}) ! pulldom.characters("text") ! pulldom.endElement("subelm") ! pulldom.characters("text") ! pulldom.endElement("doc") ! pulldom.endDocument() ! doc = pulldom.document root = doc.documentElement (text1, elm1, text2) = root.childNodes --- 338,356 ---- doc.unlink() ! def testSAX2DOM(): from xml.dom import pulldom ! sax2dom = pulldom.SAX2DOM() ! sax2dom.startDocument() ! sax2dom.startElement("doc", {}) ! sax2dom.characters("text") ! sax2dom.startElement("subelm", {}) ! sax2dom.characters("text") ! sax2dom.endElement("subelm") ! sax2dom.characters("text") ! sax2dom.endElement("doc") ! sax2dom.endDocument() ! doc = sax2dom.document root = doc.documentElement (text1, elm1, text2) = root.childNodes *************** *** 364,368 **** text2.nextSibling is None and text3.previousSibling is None and ! text3.nextSibling is None, "testNonNSElements - siblings") confirm(root.parentNode is doc and --- 364,368 ---- text2.nextSibling is None and text3.previousSibling is None and ! text3.nextSibling is None, "testSAX2DOM - siblings") confirm(root.parentNode is doc and *************** *** 370,374 **** elm1.parentNode is root and text2.parentNode is root and ! text3.parentNode is elm1, "testNonNSElements - parents") doc.unlink() --- 370,374 ---- elm1.parentNode is root and text2.parentNode is root and ! text3.parentNode is elm1, "testSAX2DOM - parents") doc.unlink() From python-dev@python.org Fri Oct 13 22:58:16 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 13 Oct 2000 14:58:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler/compiler ast.py,1.9,1.10 pyassem.py,1.12,1.13 pycodegen.py,1.25,1.26 transformer.py,1.15,1.16 Message-ID: <200010132158.OAA29101@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/compiler/compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv28922 Modified Files: ast.py pyassem.py pycodegen.py transformer.py Log Message: Now supports entire Python 2.0 language and still supports Python 1.5.2. The compiler generates code for the version of the interpreter it is run under. ast.py: Print and Printnl add dest attr for extended print new node AugAssign for augmented assignments new nodes ListComp, ListCompFor, and ListCompIf for list comprehensions pyassem.py: add work around for string-Unicode comparison raising UnicodeError on comparison of two objects in code object's const table pycodegen.py: define VERSION, the Python major version number get magic number using imp.get_magic() instead of hard coding implement list comprehensions, extended print, and augmented assignment; augmented assignment uses Delegator classes (see doc string) fix import and tuple unpacking for 1.5.2 transformer.py: various changes to support new 2.0 grammar and old 1.5 grammar add debug_tree helper than converts and symbol and token numbers to their names Index: ast.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/ast.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** ast.py 2000/05/02 22:32:59 1.9 --- ast.py 2000/10/13 21:58:13 1.10 *************** *** 280,299 **** nodes['print'] = 'Print' ! def __init__(self, nodes): self.nodes = nodes ! self._children = ('print', nodes) def __repr__(self): ! return "Print(%s)" % self._children[1:] class Printnl(Node): nodes['printnl'] = 'Printnl' ! def __init__(self, nodes): self.nodes = nodes ! self._children = ('printnl', nodes) def __repr__(self): ! return "Printnl(%s)" % self._children[1:] class Discard(Node): --- 280,301 ---- nodes['print'] = 'Print' ! def __init__(self, nodes, dest): self.nodes = nodes ! self.dest = dest ! self._children = ('print', nodes, dest) def __repr__(self): ! return "Print(%s, %s)" % (self._children[1:-1], self._children[-1]) class Printnl(Node): nodes['printnl'] = 'Printnl' ! def __init__(self, nodes, dest): self.nodes = nodes ! self.dest = dest ! self._children = ('printnl', nodes, dest) def __repr__(self): ! return "Printnl(%s, %s)" % (self._children[1:-1], self._children[-1]) class Discard(Node): *************** *** 307,310 **** --- 309,324 ---- return "Discard(%s)" % self._children[1:] + class AugAssign(Node): + nodes['augassign'] = 'AugAssign' + + def __init__(self, node, op, expr): + self.node = node + self.op = op + self.expr = expr + self._children = ('augassign', node, op, expr) + + def __repr__(self): + return "AugAssign(%s)" % str(self._children[1:]) + class Assign(Node): nodes['assign'] = 'Assign' *************** *** 360,363 **** --- 374,412 ---- def __repr__(self): return "AssAttr(%s,%s,%s)" % self._children[1:] + + class ListComp(Node): + nodes['listcomp'] = 'ListComp' + + def __init__(self, expr, quals): + self.expr = expr + self.quals = quals + self._children = ('listcomp', expr, quals) + + def __repr__(self): + return "ListComp(%s, %s)" % self._children[1:] + + class ListCompFor(Node): + nodes['listcomp_for'] = 'ListCompFor' + + # transformer fills in ifs after node is created + + def __init__(self, assign, list, ifs): + self.assign = assign + self.list = list + self.ifs = ifs + self._children = ('listcomp_for', assign, list, ifs) + + def __repr__(self): + return "ListCompFor(%s, %s, %s)" % self._children[1:] + + class ListCompIf(Node): + nodes['listcomp_if'] = 'ListCompIf' + + def __init__(self, test): + self.test = test + self._children = ('listcomp_if', test) + + def __repr__(self): + return "ListCompIf(%s)" % self._children[1:] class List(Node): Index: pyassem.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/pyassem.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** pyassem.py 2000/10/12 20:23:23 1.12 --- pyassem.py 2000/10/13 21:58:13 1.13 *************** *** 254,259 **** def _lookupName(self, name, list): """Return index of name in list, appending if necessary""" ! if name in list: ! i = list.index(name) # this is cheap, but incorrect in some cases, e.g 2 vs. 2L if type(name) == type(list[i]): --- 254,265 ---- def _lookupName(self, name, list): """Return index of name in list, appending if necessary""" ! found = None ! t = type(name) ! for i in range(len(list)): ! # must do a comparison on type first to prevent UnicodeErrors ! if t == type(list[i]) and list[i] == name: ! found = 1 ! break ! if found: # this is cheap, but incorrect in some cases, e.g 2 vs. 2L if type(name) == type(list[i]): Index: pycodegen.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/pycodegen.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** pycodegen.py 2000/10/12 20:23:23 1.25 --- pycodegen.py 2000/10/13 21:58:13 1.26 *************** *** 1,2 **** --- 1,3 ---- + import imp import os import marshal *************** *** 4,7 **** --- 5,9 ---- import string import struct + import sys import types from cStringIO import StringIO *************** *** 11,14 **** --- 13,22 ---- from compiler.pyassem import CO_VARARGS, CO_VARKEYWORDS, CO_NEWLOCALS, TupleArg + # Do we have Python 1.x or Python 2.x? + try: + VERSION = sys.version_info[0] + except AttributeError: + VERSION = 1 + callfunc_opcode_info = { # (Have *args, Have **args) : opcode *************** *** 19,28 **** } ! def compile(filename): f = open(filename) buf = f.read() f.close() mod = Module(buf, filename) ! mod.compile() f = open(filename + "c", "wb") mod.dump(f) --- 27,36 ---- } ! def compile(filename, display=0): f = open(filename) buf = f.read() f.close() mod = Module(buf, filename) ! mod.compile(display) f = open(filename + "c", "wb") mod.dump(f) *************** *** 35,43 **** self.code = None ! def compile(self): ast = parse(self.source) root, filename = os.path.split(self.filename) gen = ModuleCodeGenerator(filename) walk(ast, gen, 1) self.code = gen.getCode() --- 43,54 ---- self.code = None ! def compile(self, display=0): ast = parse(self.source) root, filename = os.path.split(self.filename) gen = ModuleCodeGenerator(filename) walk(ast, gen, 1) + if display: + import pprint + print pprint.pprint(ast) self.code = gen.getCode() *************** *** 46,50 **** marshal.dump(self.code, f) ! MAGIC = (50823 | (ord('\r')<<16) | (ord('\n')<<24)) def getPycHeader(self): --- 57,61 ---- marshal.dump(self.code, f) ! MAGIC = imp.get_magic() def getPycHeader(self): *************** *** 53,60 **** # to indicate the type of the value. simplest way to get the # same effect is to call marshal and then skip the code. - magic = marshal.dumps(self.MAGIC)[1:] mtime = os.stat(self.filename)[stat.ST_MTIME] mtime = struct.pack('i', mtime) ! return magic + mtime class CodeGenerator: --- 64,70 ---- # to indicate the type of the value. simplest way to get the # same effect is to call marshal and then skip the code. mtime = os.stat(self.filename)[stat.ST_MTIME] mtime = struct.pack('i', mtime) ! return self.MAGIC + mtime class CodeGenerator: *************** *** 64,68 **** def __init__(self, filename): ## Subclasses must define a constructor that intializes self.graph ! ## before calling this init function ## self.graph = pyassem.PyFlowGraph() self.filename = filename --- 74,78 ---- def __init__(self, filename): ## Subclasses must define a constructor that intializes self.graph ! ## before calling this init function, e.g. ## self.graph = pyassem.PyFlowGraph() self.filename = filename *************** *** 143,147 **** def visitLambda(self, node): self._visitFuncOrLambda(node, isLambda=1) - ## self.storeName("") def _visitFuncOrLambda(self, node, isLambda): --- 153,156 ---- *************** *** 181,188 **** self.set_lineno(test) self.visit(test) - ## if i == numtests - 1 and not node.else_: - ## nextTest = end - ## else: - ## nextTest = self.newBlock() nextTest = self.newBlock() self.emit('JUMP_IF_FALSE', nextTest) --- 190,193 ---- *************** *** 305,308 **** --- 310,377 ---- self.nextBlock(end) + # list comprehensions + __list_count = 0 + + def visitListComp(self, node): + # XXX would it be easier to transform the AST into the form it + # would have if the list comp were expressed as a series of + # for and if stmts and an explicit append? + self.set_lineno(node) + # setup list + append = "$append%d" % self.__list_count + self.__list_count = self.__list_count + 1 + self.emit('BUILD_LIST', 0) + self.emit('DUP_TOP') + self.emit('LOAD_ATTR', 'append') + self.storeName(append) + l = len(node.quals) + stack = [] + for i, for_ in zip(range(l), node.quals): + start, anchor = self.visit(for_) + cont = None + for if_ in for_.ifs: + if cont is None: + cont = self.newBlock() + self.visit(if_, cont) + stack.insert(0, (start, cont, anchor)) + + self.loadName(append) + self.visit(node.expr) + self.emit('CALL_FUNCTION', 1) + self.emit('POP_TOP') + + for start, cont, anchor in stack: + if cont: + skip_one = self.newBlock() + self.emit('JUMP_FORWARD', skip_one) + self.nextBlock(cont) + self.emit('POP_TOP') + self.nextBlock(skip_one) + self.emit('JUMP_ABSOLUTE', start) + self.nextBlock(anchor) + self.delName(append) + + self.__list_count = self.__list_count - 1 + + def visitListCompFor(self, node): + self.set_lineno(node) + start = self.newBlock() + anchor = self.newBlock() + + self.visit(node.list) + self.visit(ast.Const(0)) + self.emit('SET_LINENO', node.lineno) + self.nextBlock(start) + self.emit('FOR_LOOP', anchor) + self.visit(node.assign) + return start, anchor + + def visitListCompIf(self, node, branch): + self.set_lineno(node) + self.visit(node.test) + self.emit('JUMP_IF_FALSE', branch) + self.newBlock() + self.emit('POP_TOP') + # exception related *************** *** 398,405 **** # misc - ## def visitStmt(self, node): - ## # nothing to do except walk the children - ## pass - def visitDiscard(self, node): self.visit(node.expr) --- 467,470 ---- *************** *** 427,451 **** self.set_lineno(node) for name, alias in node.names: ! self.emit('LOAD_CONST', None) self.emit('IMPORT_NAME', name) ! self._resolveDots(name) ! self.storeName(alias or name) def visitFrom(self, node): self.set_lineno(node) fromlist = map(lambda (name, alias): name, node.names) ! self.emit('LOAD_CONST', tuple(fromlist)) self.emit('IMPORT_NAME', node.modname) for name, alias in node.names: ! if name == '*': ! self.namespace = 0 ! self.emit('IMPORT_STAR') ! # There can only be one name w/ from ... import * ! assert len(node.names) == 1 ! return else: self.emit('IMPORT_FROM', name) - self._resolveDots(name) - self.storeName(alias or name) self.emit('POP_TOP') --- 492,521 ---- self.set_lineno(node) for name, alias in node.names: ! if VERSION > 1: ! self.emit('LOAD_CONST', None) self.emit('IMPORT_NAME', name) ! mod = string.split(name, ".")[0] ! self.storeName(alias or mod) def visitFrom(self, node): self.set_lineno(node) fromlist = map(lambda (name, alias): name, node.names) ! if VERSION > 1: ! self.emit('LOAD_CONST', tuple(fromlist)) self.emit('IMPORT_NAME', node.modname) for name, alias in node.names: ! if VERSION > 1: ! if name == '*': ! self.namespace = 0 ! self.emit('IMPORT_STAR') ! # There can only be one name w/ from ... import * ! assert len(node.names) == 1 ! return ! else: ! self.emit('IMPORT_FROM', name) ! self._resolveDots(name) ! self.storeName(alias or name) else: self.emit('IMPORT_FROM', name) self.emit('POP_TOP') *************** *** 492,502 **** print node ! def visitAssTuple(self, node): if findOp(node) != 'OP_DELETE': ! self.emit('UNPACK_SEQUENCE', len(node.nodes)) for child in node.nodes: self.visit(child) ! visitAssList = visitAssTuple def visitExec(self, node): --- 562,644 ---- print node ! def _visitAssSequence(self, node, op='UNPACK_SEQUENCE'): if findOp(node) != 'OP_DELETE': ! self.emit(op, len(node.nodes)) for child in node.nodes: self.visit(child) ! if VERSION > 1: ! visitAssTuple = _visitAssSequence ! visitAssList = _visitAssSequence ! else: ! def visitAssTuple(self, node): ! self._visitAssSequence(node, 'UNPACK_TUPLE') ! ! def visitAssList(self, node): ! self._visitAssSequence(node, 'UNPACK_LIST') ! ! # augmented assignment ! ! def visitAugAssign(self, node): ! aug_node = wrap_aug(node.node) ! self.visit(aug_node, "load") ! self.visit(node.expr) ! self.emit(self._augmented_opcode[node.op]) ! self.visit(aug_node, "store") ! ! _augmented_opcode = { ! '+=' : 'INPLACE_ADD', ! '-=' : 'INPLACE_SUBTRACT', ! '*=' : 'INPLACE_MULTIPLY', ! '/=' : 'INPLACE_DIVIDE', ! '%=' : 'INPLACE_MODULO', ! '**=': 'INPLACE_POWER', ! '>>=': 'INPLACE_RSHIFT', ! '<<=': 'INPLACE_LSHIFT', ! '&=' : 'INPLACE_AND', ! '^=' : 'INPLACE_XOR', ! '|=' : 'INPLACE_OR', ! } ! ! def visitAugName(self, node, mode): ! if mode == "load": ! self.loadName(node.name) ! elif mode == "store": ! self.storeName(node.name) ! ! def visitAugGetattr(self, node, mode): ! if mode == "load": ! self.visit(node.expr) ! self.emit('DUP_TOP') ! self.emit('LOAD_ATTR', node.attrname) ! elif mode == "store": ! self.emit('ROT_TWO') ! self.emit('STORE_ATTR', node.attrname) ! ! def visitAugSlice(self, node, mode): ! if mode == "load": ! self.visitSlice(node, 1) ! elif mode == "store": ! slice = 0 ! if node.lower: ! slice = slice | 1 ! if node.upper: ! slice = slice | 2 ! if slice == 0: ! self.emit('ROT_TWO') ! elif slice == 3: ! self.emit('ROT_FOUR') ! else: ! self.emit('ROT_THREE') ! self.emit('STORE_SLICE+%d' % slice) ! ! def visitAugSubscript(self, node, mode): ! if len(node.subs) > 1: ! raise SyntaxError, "augmented assignment to tuple is not possible" ! if mode == "load": ! self.visitSubscript(node, 1) ! elif mode == "store": ! self.emit('ROT_THREE') ! self.emit('STORE_SUBSCR') def visitExec(self, node): *************** *** 534,544 **** def visitPrint(self, node): self.set_lineno(node) for child in node.nodes: self.visit(child) ! self.emit('PRINT_ITEM') def visitPrintnl(self, node): self.visitPrint(node) ! self.emit('PRINT_NEWLINE') def visitReturn(self, node): --- 676,697 ---- def visitPrint(self, node): self.set_lineno(node) + if node.dest: + self.visit(node.dest) for child in node.nodes: + if node.dest: + self.emit('DUP_TOP') self.visit(child) ! if node.dest: ! self.emit('ROT_TWO') ! self.emit('PRINT_ITEM_TO') ! else: ! self.emit('PRINT_ITEM') def visitPrintnl(self, node): self.visitPrint(node) ! if node.dest: ! self.emit('PRINT_NEWLINE_TO') ! else: ! self.emit('PRINT_NEWLINE') def visitReturn(self, node): *************** *** 549,553 **** # slice and subscript stuff ! def visitSlice(self, node): self.visit(node.expr) slice = 0 --- 702,707 ---- # slice and subscript stuff ! def visitSlice(self, node, aug_flag=None): ! # aug_flag is used by visitAugSlice self.visit(node.expr) slice = 0 *************** *** 558,561 **** --- 712,722 ---- self.visit(node.upper) slice = slice | 2 + if aug_flag: + if slice == 0: + self.emit('DUP_TOP') + elif slice == 3: + self.emit('DUP_TOPX', 3) + else: + self.emit('DUP_TOPX', 2) if node.flags == 'OP_APPLY': self.emit('SLICE+%d' % slice) *************** *** 568,575 **** raise ! def visitSubscript(self, node): self.visit(node.expr) for sub in node.subs: self.visit(sub) if len(node.subs) > 1: self.emit('BUILD_TUPLE', len(node.subs)) --- 729,738 ---- raise ! def visitSubscript(self, node, aug_flag=None): self.visit(node.expr) for sub in node.subs: self.visit(sub) + if aug_flag: + self.emit('DUP_TOPX', 2) if len(node.subs) > 1: self.emit('BUILD_TUPLE', len(node.subs)) *************** *** 741,745 **** def unpackSequence(self, tup): ! self.emit('UNPACK_SEQUENCE', len(tup)) for elt in tup: if type(elt) == types.TupleType: --- 904,911 ---- def unpackSequence(self, tup): ! if VERSION > 1: ! self.emit('UNPACK_SEQUENCE', len(tup)) ! else: ! self.emit('UNPACK_TUPLE', len(tup)) for elt in tup: if type(elt) == types.TupleType: *************** *** 766,770 **** self.emit('RETURN_VALUE') - def generateArgList(arglist): """Generate an arg list marking TupleArgs""" --- 932,935 ---- *************** *** 838,841 **** --- 1003,1045 ---- elif self.op != node.flags: raise ValueError, "mixed ops in stmt" + + class Delegator: + """Base class to support delegation for augmented assignment nodes + + To generator code for augmented assignments, we use the following + wrapper classes. In visitAugAssign, the left-hand expression node + is visited twice. The first time the visit uses the normal method + for that node . The second time the visit uses a different method + that generates the appropriate code to perform the assignment. + These delegator classes wrap the original AST nodes in order to + support the variant visit methods. + """ + def __init__(self, obj): + self.obj = obj + + def __getattr__(self, attr): + return getattr(self.obj, attr) + + class AugGetattr(Delegator): + pass + + class AugName(Delegator): + pass + + class AugSlice(Delegator): + pass + + class AugSubscript(Delegator): + pass + + wrapper = { + ast.Getattr: AugGetattr, + ast.Name: AugName, + ast.Slice: AugSlice, + ast.Subscript: AugSubscript, + } + + def wrap_aug(node): + return wrapper[node.__class__](node) if __name__ == "__main__": Index: transformer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/transformer.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** transformer.py 2000/10/12 20:23:23 1.15 --- transformer.py 2000/10/13 21:58:13 1.16 *************** *** 1,18 **** - # - # Copyright (C) 1997-1998 Greg Stein. All Rights Reserved. - # - # This module is provided under a BSD-ish license. See - # http://www.opensource.org/licenses/bsd-license.html - # and replace OWNER, ORGANIZATION, and YEAR as appropriate. - # - # - # Written by Greg Stein (gstein@lyra.org) - # and Bill Tutt (rassilon@lima.mudlib.org) - # February 1997. - # - # Support for ast.Node subclasses written and other revisions by - # Jeremy Hylton (jeremy@beopen.com) - # - """Parse tree transformation module. --- 1,2 ---- *************** *** 25,29 **** --- 9,27 ---- """ + # Original version written by Greg Stein (gstein@lyra.org) + # and Bill Tutt (rassilon@lima.mudlib.org) + # February 1997. + # + # Modifications and improvements for Python 2.0 by Jeremy Hylton and + # Mark Hammond + + # Portions of this file are: + # Copyright (C) 1997-1998 Greg Stein. All Rights Reserved. # + # This module is provided under a BSD-ish license. See + # http://www.opensource.org/licenses/bsd-license.html + # and replace OWNER, ORGANIZATION, and YEAR as appropriate. + + # The output tree has the following nodes: # *************** *** 50,56 **** # return: valueNode # const: value ! # print: [ node1, ..., nodeN ] ! # printnl: [ node1, ..., nodeN ] # discard: exprNode # assign: [ node1, ..., nodeN ], exprNode # ass_tuple: [ node1, ..., nodeN ] --- 48,55 ---- # return: valueNode # const: value ! # print: [ node1, ..., nodeN ] [, dest] ! # printnl: [ node1, ..., nodeN ] [, dest] # discard: exprNode + # augassign: node, op, expr # assign: [ node1, ..., nodeN ], exprNode # ass_tuple: [ node1, ..., nodeN ] *************** *** 98,107 **** import ast import parser import symbol import token import string - import pprint - error = 'walker.error' --- 97,106 ---- import ast import parser + # Care must be taken to use only symbols and tokens defined in Python + # 1.5.2 for code branches executed in 1.5.2 import symbol import token import string error = 'walker.error' *************** *** 329,353 **** def expr_stmt(self, nodelist): ! # testlist ('=' testlist)* exprNode = self.com_node(nodelist[-1]) if len(nodelist) == 1: return Node('discard', exprNode) ! nodes = [ ] ! for i in range(0, len(nodelist) - 2, 2): ! nodes.append(self.com_assign(nodelist[i], OP_ASSIGN)) ! n = Node('assign', nodes, exprNode) ! n.lineno = nodelist[1][2] return n def print_stmt(self, nodelist): ! # print: (test ',')* [test] items = [ ] ! for i in range(1, len(nodelist), 2): items.append(self.com_node(nodelist[i])) if nodelist[-1][0] == token.COMMA: ! n = Node('print', items) n.lineno = nodelist[0][2] return n ! n = Node('printnl', items) n.lineno = nodelist[0][2] return n --- 328,369 ---- def expr_stmt(self, nodelist): ! # augassign testlist | testlist ('=' testlist)* exprNode = self.com_node(nodelist[-1]) if len(nodelist) == 1: return Node('discard', exprNode) ! if nodelist[1][0] == token.EQUAL: ! nodes = [ ] ! for i in range(0, len(nodelist) - 2, 2): ! nodes.append(self.com_assign(nodelist[i], OP_ASSIGN)) ! n = Node('assign', nodes, exprNode) ! n.lineno = nodelist[1][2] ! else: ! lval = self.com_augassign(nodelist[0]) ! op = self.com_augassign_op(nodelist[1]) ! n = Node('augassign', lval, op[1], exprNode) ! n.lineno = op[2] return n def print_stmt(self, nodelist): ! # print ([ test (',' test)* [','] ] | '>>' test [ (',' test)+ [','] ]) items = [ ] ! if len(nodelist) == 1: ! start = 1 ! dest = None ! elif nodelist[1][0] == token.RIGHTSHIFT: ! assert len(nodelist) == 3 \ ! or nodelist[3][0] == token.COMMA ! dest = self.com_node(nodelist[2]) ! start = 4 ! else: ! dest = None ! start = 1 ! for i in range(start, len(nodelist), 2): items.append(self.com_node(nodelist[i])) if nodelist[-1][0] == token.COMMA: ! n = Node('print', items, dest) n.lineno = nodelist[0][2] return n ! n = Node('printnl', items, dest) n.lineno = nodelist[0][2] return n *************** *** 406,420 **** # from: 'from' dotted_name 'import' # ('*' | import_as_name (',' import_as_name)*) - names = [] - is_as = 0 if nodelist[0][1] == 'from': ! for i in range(3, len(nodelist), 2): ! names.append(self.com_import_as_name(nodelist[i][1])) n = Node('from', self.com_dotted_name(nodelist[1]), names) n.lineno = nodelist[0][2] return n ! for i in range(1, len(nodelist), 2): ! names.append(self.com_dotted_as_name(nodelist[i])) n = Node('import', names) n.lineno = nodelist[0][2] --- 422,443 ---- # from: 'from' dotted_name 'import' # ('*' | import_as_name (',' import_as_name)*) if nodelist[0][1] == 'from': ! names = [] ! if nodelist[3][0] == token.NAME: ! for i in range(3, len(nodelist), 2): ! names.append((nodelist[i][1], None)) ! else: ! for i in range(3, len(nodelist), 2): ! names.append(self.com_import_as_name(nodelist[i][1])) n = Node('from', self.com_dotted_name(nodelist[1]), names) n.lineno = nodelist[0][2] return n ! if nodelist[1][0] == symbol.dotted_name: ! names = [(self.com_dotted_name(nodelist[1][1:]), None)] ! else: ! names = [] ! for i in range(1, len(nodelist), 2): ! names.append(self.com_dotted_as_name(nodelist[i])) n = Node('import', names) n.lineno = nodelist[0][2] *************** *** 738,742 **** if node[0] not in _legal_node_types: ! raise error, 'illegal node passed to com_node: %s' % node[0] # print "dispatch", self._dispatch[node[0]].__name__, node --- 761,765 ---- if node[0] not in _legal_node_types: ! raise error, 'illegal node passed to com_node: %s' % `node` # print "dispatch", self._dispatch[node[0]].__name__, node *************** *** 819,827 **** def com_dotted_as_name(self, node): dot = self.com_dotted_name(node[1]) ! if len(node) == 2: return dot, None ! assert node[2][1] == 'as' ! assert node[3][0] == token.NAME ! return dot, node[3][1] def com_import_as_name(self, node): --- 842,853 ---- def com_dotted_as_name(self, node): dot = self.com_dotted_name(node[1]) ! if len(node) <= 2: return dot, None ! if node[0] == symbol.dotted_name: ! pass ! else: ! assert node[2][1] == 'as' ! assert node[3][0] == token.NAME ! return dot, node[3][1] def com_import_as_name(self, node): *************** *** 873,876 **** --- 899,916 ---- return n + def com_augassign_op(self, node): + assert node[0] == symbol.augassign + return node[1] + + def com_augassign(self, node): + """Return node suitable for lvalue of augmented assignment + + Names, slices, and attributes are the only allowable nodes. + """ + l = self.com_node(node) + if l[0] in ('name', 'slice', 'subscript', 'getattr'): + return l + raise SyntaxError, "can't assign to %s" % l[0] + def com_assign(self, node, assigning): # return a node suitable for use as an "lvalue" *************** *** 956,960 **** def com_stmt(self, node): - #pprint.pprint(node) result = self.com_node(node) try: --- 996,999 ---- *************** *** 977,985 **** stmts.append(result) ! def com_list_constructor(self, nodelist): ! values = [ ] ! for i in range(1, len(nodelist), 2): ! values.append(self.com_node(nodelist[i])) ! return Node('list', values) def com_dictmaker(self, nodelist): --- 1016,1077 ---- stmts.append(result) ! if hasattr(symbol, 'list_for'): ! def com_list_constructor(self, nodelist): ! # listmaker: test ( list_for | (',' test)* [','] ) ! values = [ ] ! for i in range(1, len(nodelist)): ! if nodelist[i][0] == symbol.list_for: ! assert len(nodelist[i:]) == 1 ! return self.com_list_comprehension(values[0], ! nodelist[i]) ! elif nodelist[i][0] == token.COMMA: ! continue ! values.append(self.com_node(nodelist[i])) ! return Node('list', values) ! ! def com_list_comprehension(self, expr, node): ! # list_iter: list_for | list_if ! # list_for: 'for' exprlist 'in' testlist [list_iter] ! # list_if: 'if' test [list_iter] ! lineno = node[1][2] ! fors = [] ! while node: ! if node[1][1] == 'for': ! assignNode = self.com_assign(node[2], OP_ASSIGN) ! listNode = self.com_node(node[4]) ! newfor = Node('listcomp_for', assignNode, ! listNode, []) ! newfor.lineno = node[1][2] ! fors.append(newfor) ! if len(node) == 5: ! node = None ! else: ! node = self.com_list_iter(node[5]) ! elif node[1][1] == 'if': ! test = self.com_node(node[2]) ! newif = Node('listcomp_if', test) ! newif.lineno = node[1][2] ! newfor.ifs.append(newif) ! if len(node) == 3: ! node = None ! else: ! node = self.com_list_iter(node[3]) ! else: ! raise SyntaxError, \ ! ("unexpected list comprehension element: %s %d" ! % (node, lineno)) ! n = Node('listcomp', expr, fors) ! n.lineno = lineno ! return n ! ! def com_list_iter(self, node): ! assert node[0] == symbol.list_iter ! return node[1] ! else: ! def com_list_constructor(self, nodelist): ! values = [ ] ! for i in range(1, len(nodelist), 2): ! values.append(self.com_node(nodelist[i])) ! return Node('list', values) def com_dictmaker(self, nodelist): *************** *** 987,991 **** items = [ ] for i in range(1, len(nodelist), 4): ! items.append((self.com_node(nodelist[i]), self.com_node(nodelist[i+2]))) return Node('dict', items) --- 1079,1084 ---- items = [ ] for i in range(1, len(nodelist), 4): ! items.append((self.com_node(nodelist[i]), ! self.com_node(nodelist[i+2]))) return Node('dict', items) *************** *** 1251,1252 **** --- 1344,1363 ---- symbol.factor, ] + + import types + _names = {} + for k, v in symbol.sym_name.items(): + _names[k] = v + for k, v in token.tok_name.items(): + _names[k] = v + + def debug_tree(tree): + l = [] + for elt in tree: + if type(elt) == types.IntType: + l.append(_names.get(elt, elt)) + elif type(elt) == types.StringType: + l.append(elt) + else: + l.append(debug_tree(elt)) + return l From python-dev@python.org Fri Oct 13 22:59:35 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 13 Oct 2000 14:59:35 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler compile.py,1.2,1.3 Message-ID: <200010132159.OAA29646@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv29555 Modified Files: compile.py Log Message: add -d option that dumps entire AST before compiling Index: compile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compile.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** compile.py 2000/05/02 22:29:46 1.2 --- compile.py 2000/10/13 21:59:32 1.3 *************** *** 6,10 **** def main(): VERBOSE = 0 ! opts, args = getopt.getopt(sys.argv[1:], 'vq') for k, v in opts: if k == '-v': --- 6,11 ---- def main(): VERBOSE = 0 ! DISPLAY = 0 ! opts, args = getopt.getopt(sys.argv[1:], 'vqd') for k, v in opts: if k == '-v': *************** *** 17,20 **** --- 18,23 ---- f = open('/dev/null', 'wb') sys.stdout = f + if k == '-d': + DISPLAY = 1 if not args: print "no files to compile" *************** *** 23,27 **** if VERBOSE: print filename ! compile(filename) if __name__ == "__main__": --- 26,30 ---- if VERBOSE: print filename ! compile(filename, DISPLAY) if __name__ == "__main__": From python-dev@python.org Fri Oct 13 23:00:19 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 13 Oct 2000 15:00:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler regrtest.py,NONE,1.1 Message-ID: <200010132200.PAA30044@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Tools/compiler In directory slayer.i.sourceforge.net:/tmp/cvs-serv29827 Added Files: regrtest.py Log Message: run the std regression test suite using bytecode produced by the compiler --- NEW FILE --- """Run the Python regression test using the compiler This test runs the standard Python test suite using bytecode generated by this compiler instead of by the builtin compiler. The regression test is run with the interpreter in verbose mode so that import problems can be observed easily. """ from compiler import compile import os import sys import test import tempfile def copy_test_suite(): dest = tempfile.mktemp() os.mkdir(dest) os.system("cp -r %s/* %s" % (test.__path__[0], dest)) print "Creating copy of test suite in", dest return dest def compile_files(dir): print "Compiling", line_len = 10 for file in os.listdir(dir): base, ext = os.path.splitext(file) if ext == '.py' and base[:4] == 'test': source = os.path.join(dir, file) line_len = line_len + len(file) + 1 if line_len > 75: print "\n\t", line_len = len(source) + 9 print file, compile(source) # make sure the .pyc file is not over-written os.chmod(source + "c", 444) print def run_regrtest(test_dir): os.chdir(test_dir) os.system("%s -v regrtest.py" % sys.executable) def cleanup(dir): os.system("rm -rf %s" % dir) def main(): test_dir = copy_test_suite() compile_files(test_dir) run_regrtest(test_dir) cleanup(test_dir) if __name__ == "__main__": main() From python-dev@python.org Sat Oct 14 00:05:47 2000 From: python-dev@python.org (Jeremy Hylton) Date: Fri, 13 Oct 2000 16:05:47 -0700 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.41,2.42 Message-ID: <200010132305.QAA17399@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Include In directory slayer.i.sourceforge.net:/tmp/cvs-serv17290/Include Modified Files: patchlevel.h Log Message: getting close Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.41 retrieving revision 2.42 diff -C2 -r2.41 -r2.42 *** patchlevel.h 2000/10/09 15:13:47 2.41 --- patchlevel.h 2000/10/13 23:05:44 2.42 *************** *** 23,34 **** #define PY_MINOR_VERSION 0 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA #define PY_RELEASE_SERIAL 1 /* Version as a string */ ! #define PY_VERSION "2.0c1" /* Historic */ ! #define PATCHLEVEL "2.0c1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. --- 23,34 ---- #define PY_MINOR_VERSION 0 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL #define PY_RELEASE_SERIAL 1 /* Version as a string */ ! #define PY_VERSION "2.0" /* Historic */ ! #define PATCHLEVEL "2.0" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. From python-dev@python.org Sat Oct 14 04:40:23 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 20:40:23 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command config.py,1.4,1.5 Message-ID: <200010140340.UAA03033@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv2997/distutils/command Modified Files: config.py Log Message: Bastian Kleineidam: fix up any supplied command-line options. Index: config.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/config.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** config.py 2000/09/30 18:27:54 1.4 --- config.py 2000/10/14 03:40:20 1.5 *************** *** 15,18 **** --- 15,19 ---- import sys, os, string, re + from types import * from distutils.core import Command from distutils.errors import DistutilsExecError *************** *** 70,74 **** def finalize_options (self): ! pass def run (self): --- 71,89 ---- def finalize_options (self): ! if self.include_dirs is None: ! self.include_dirs = self.distribution.include_dirs or [] ! elif type(self.include_dirs) is StringType: ! self.include_dirs = string.split(self.include_dirs, os.pathsep) ! ! if self.libraries is None: ! self.libraries = [] ! elif type(self.libraries) is StringType: ! self.libraries = [self.libraries] ! ! if self.library_dirs is None: ! self.library_dirs = [] ! elif type(self.library_dirs) is StringType: ! self.library_dirs = string.split(self.library_dirs, os.pathsep) ! def run (self): From python-dev@python.org Sat Oct 14 04:47:10 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 20:47:10 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command install.py,1.52,1.53 Message-ID: <200010140347.UAA04862@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv4851/distutils/command Modified Files: install.py Log Message: Lyle Johnson: use 'normcase()' in addition to 'normpath()' when testing if we actually installed modules to a directory in sys.path. Index: install.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install.py,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** install.py 2000/10/03 03:31:52 1.52 --- install.py 2000/10/14 03:47:07 1.53 *************** *** 498,505 **** self.record) ! normalized_path = map(os.path.normpath, sys.path) if (self.warn_dir and not (self.path_file and self.install_path_file) and ! os.path.normpath(self.install_lib) not in normalized_path): self.warn(("modules installed to '%s', which is not in " + "Python's module search path (sys.path) -- " + --- 498,507 ---- self.record) ! sys_path = map(os.path.normpath, sys.path) ! sys_path = map(os.path.normcase, sys_path) ! install_lib = os.path.normcase(os.path.normpath(self.install_lib)) if (self.warn_dir and not (self.path_file and self.install_path_file) and ! install_lib not in sys_path): self.warn(("modules installed to '%s', which is not in " + "Python's module search path (sys.path) -- " + From python-dev@python.org Sat Oct 14 04:56:44 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 20:56:44 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command config.py,1.5,1.6 Message-ID: <200010140356.UAA05487@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv5479 Modified Files: config.py Log Message: Bastian Kleineidam: make 'check_lib()' more like AC_CHECK_LIB by adding an 'other_libraries()' parameter. Index: config.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/config.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** config.py 2000/10/14 03:40:20 1.5 --- config.py 2000/10/14 03:56:42 1.6 *************** *** 326,339 **** def check_lib (self, library, library_dirs=None, ! headers=None, include_dirs=None): """Determine if 'library' is available to be linked against, without actually checking that any particular symbols are provided by it. 'headers' will be used in constructing the source file to be compiled, but the only effect of this is to check if all the ! header files listed are available. """ self._check_compiler() return self.try_link("int main (void) { }", ! headers, include_dirs, [library], library_dirs) def check_header (self, header, include_dirs=None, --- 326,342 ---- def check_lib (self, library, library_dirs=None, ! headers=None, include_dirs=None, other_libraries=[]): """Determine if 'library' is available to be linked against, without actually checking that any particular symbols are provided by it. 'headers' will be used in constructing the source file to be compiled, but the only effect of this is to check if all the ! header files listed are available. Any libraries listed in ! 'other_libraries' will be included in the link, in case 'library' ! has symbols that depend on other libraries. """ self._check_compiler() return self.try_link("int main (void) { }", ! headers, include_dirs, ! [library]+other_libraries, library_dirs) def check_header (self, header, include_dirs=None, From python-dev@python.org Sat Oct 14 05:06:43 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 21:06:43 -0700 Subject: [Python-checkins] CVS: distutils/distutils dist.py,1.40,1.41 Message-ID: <200010140406.VAA07633@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv7529 Modified Files: dist.py Log Message: Untabified. Index: dist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/dist.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** dist.py 2000/09/27 00:15:37 1.40 --- dist.py 2000/10/14 04:06:40 1.41 *************** *** 285,289 **** else: user_filename = "pydistutils.cfg" ! # And look for the user config file if os.environ.has_key('HOME'): --- 285,289 ---- else: user_filename = "pydistutils.cfg" ! # And look for the user config file if os.environ.has_key('HOME'): *************** *** 462,467 **** negative_opt.update(cmd_class.negative_opt) ! # Check for help_options in command class. They have a different ! # format (tuple of four) so we need to preprocess them here. if (hasattr(cmd_class, 'help_options') and type(cmd_class.help_options) is ListType): --- 462,467 ---- negative_opt.update(cmd_class.negative_opt) ! # Check for help_options in command class. They have a different ! # format (tuple of four) so we need to preprocess them here. if (hasattr(cmd_class, 'help_options') and type(cmd_class.help_options) is ListType): *************** *** 488,492 **** if hasattr(opts, parser.get_attr_name(help_option)): help_option_found=1 ! #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) --- 488,492 ---- if hasattr(opts, parser.get_attr_name(help_option)): help_option_found=1 ! #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) *************** *** 564,568 **** # _show_help () ! def handle_display_options (self, option_order): --- 564,568 ---- # _show_help () ! def handle_display_options (self, option_order): From python-dev@python.org Sat Oct 14 05:06:43 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 21:06:43 -0700 Subject: [Python-checkins] CVS: distutils/distutils/command bdist.py,1.19,1.20 build.py,1.30,1.31 build_clib.py,1.21,1.22 clean.py,1.11,1.12 install.py,1.53,1.54 install_data.py,1.15,1.16 sdist.py,1.50,1.51 Message-ID: <200010140406.VAA07643@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv7529/command Modified Files: bdist.py build.py build_clib.py clean.py install.py install_data.py sdist.py Log Message: Untabified. Index: bdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** bdist.py 2000/09/30 18:27:54 1.19 --- bdist.py 2000/10/14 04:06:40 1.20 *************** *** 46,50 **** ('help-formats', None, "lists available distribution formats", show_formats), ! ] # The following commands do not take a format option from bdist --- 46,50 ---- ('help-formats', None, "lists available distribution formats", show_formats), ! ] # The following commands do not take a format option from bdist Index: build.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** build.py 2000/09/30 18:27:54 1.30 --- build.py 2000/10/14 04:06:40 1.31 *************** *** 48,52 **** ('help-compiler', None, "list available compilers", show_compilers), ! ] def initialize_options (self): --- 48,52 ---- ('help-compiler', None, "list available compilers", show_compilers), ! ] def initialize_options (self): Index: build_clib.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/build_clib.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** build_clib.py 2000/09/30 18:27:54 1.21 --- build_clib.py 2000/10/14 04:06:40 1.22 *************** *** 54,58 **** ('help-compiler', None, "list available compilers", show_compilers), ! ] def initialize_options (self): --- 54,58 ---- ('help-compiler', None, "list available compilers", show_compilers), ! ] def initialize_options (self): Index: clean.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/clean.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** clean.py 2000/09/30 18:27:54 1.11 --- clean.py 2000/10/14 04:06:40 1.12 *************** *** 61,65 **** for directory in (self.build_lib, self.bdist_base, ! self.build_scripts): if os.path.exists(directory): remove_tree(directory, self.verbose, self.dry_run) --- 61,65 ---- for directory in (self.build_lib, self.bdist_base, ! self.build_scripts): if os.path.exists(directory): remove_tree(directory, self.verbose, self.dry_run) Index: install.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -r1.53 -r1.54 *** install.py 2000/10/14 03:47:07 1.53 --- install.py 2000/10/14 04:06:40 1.54 *************** *** 499,503 **** sys_path = map(os.path.normpath, sys.path) ! sys_path = map(os.path.normcase, sys_path) install_lib = os.path.normcase(os.path.normpath(self.install_lib)) if (self.warn_dir and --- 499,503 ---- sys_path = map(os.path.normpath, sys.path) ! sys_path = map(os.path.normcase, sys_path) install_lib = os.path.normcase(os.path.normpath(self.install_lib)) if (self.warn_dir and Index: install_data.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/install_data.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** install_data.py 2000/09/30 17:34:50 1.15 --- install_data.py 2000/10/14 04:06:40 1.16 *************** *** 39,46 **** def finalize_options (self): self.set_undefined_options('install', ! ('install_data', 'install_dir'), ! ('root', 'root'), ('force', 'force'), ! ) def run (self): --- 39,46 ---- def finalize_options (self): self.set_undefined_options('install', ! ('install_data', 'install_dir'), ! ('root', 'root'), ('force', 'force'), ! ) def run (self): Index: sdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** sdist.py 2000/09/30 18:27:54 1.50 --- sdist.py 2000/10/14 04:06:40 1.51 *************** *** 75,79 **** ('help-formats', None, "list available distribution formats", show_formats), ! ] negative_opt = {'no-defaults': 'use-defaults', --- 75,79 ---- ('help-formats', None, "list available distribution formats", show_formats), ! ] negative_opt = {'no-defaults': 'use-defaults', From python-dev@python.org Sat Oct 14 05:07:41 2000 From: python-dev@python.org (Greg Ward) Date: Fri, 13 Oct 2000 21:07:41 -0700 Subject: [Python-checkins] CVS: distutils/distutils util.py,1.55,1.56 Message-ID: <200010140407.VAA08029@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv7982 Modified Files: util.py Log Message: Removed debugging code at bottom. Index: util.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/util.py,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -r1.55 -r1.56 *** util.py 2000/10/03 03:31:05 1.55 --- util.py 2000/10/14 04:07:39 1.56 *************** *** 428,437 **** # byte_compile () - - - if __name__ == "__main__": - import glob - f = glob.glob("command/*.py") - byte_compile(f, optimize=0, prefix="command/", base_dir="/usr/lib/python") - #byte_compile(f, optimize=1) - #byte_compile(f, optimize=2) --- 428,429 ---- From python-dev@python.org Sat Oct 14 05:07:51 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:07:51 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs copyright.tex,1.8,1.9 Message-ID: <200010140407.VAA08088@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory slayer.i.sourceforge.net:/tmp/cvs-serv8067/texinputs Modified Files: copyright.tex Log Message: Center the top line of the license page, to make it look just a little bit cleaner. Index: copyright.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/copyright.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** copyright.tex 2000/09/05 04:32:26 1.8 --- copyright.tex 2000/10/14 04:07:49 1.9 *************** *** 1,3 **** ! \strong{BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0} \centerline{\strong{BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1}} --- 1,3 ---- ! \centerline{\strong{BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0}} \centerline{\strong{BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1}} From python-dev@python.org Sat Oct 14 05:14:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:14:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules Setup.in,1.111,1.112 Message-ID: <200010140414.VAA10282@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv10257/Modules Modified Files: Setup.in Log Message: Update the comments for the BSD DB module, including a new pointer to the DB 3 module; thanks to Robin Dunn . This closes SourceForge bug #116850. Index: Setup.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/Setup.in,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -r1.111 -r1.112 *** Setup.in 2000/10/02 21:20:22 1.111 --- Setup.in 2000/10/14 04:14:09 1.112 *************** *** 361,369 **** # and the subdirectory of PORT where you built it. # ! # (See http://www.jenkon-dev.com/~rd/python/ for an interface to ! # BSD DB 2.1.0.) # Note: If a db.h file is found by configure, bsddb will be enabled ! # automatically via Setup.config.in #DB=/depot/sundry/src/berkeley-db/db.1.85 --- 361,371 ---- # and the subdirectory of PORT where you built it. # ! # (See http://electricrain.com/greg/python/bsddb3/ for an interface to ! # BSD DB 3.x.) # Note: If a db.h file is found by configure, bsddb will be enabled ! # automatically via Setup.config.in. It only needs to be enabled here ! # if it is not automatically enabled there; check the generated ! # Setup.config before enabling it here. #DB=/depot/sundry/src/berkeley-db/db.1.85 From python-dev@python.org Sat Oct 14 05:45:24 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:45:24 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libmacfs.tex,1.24,1.25 libmacic.tex,1.14,1.15 Message-ID: <200010140445.VAA18557@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv18544 Modified Files: libmacfs.tex libmacic.tex Log Message: A bunch of nits fix and some additional information added by Chris Barker . Index: libmacfs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacfs.tex,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** libmacfs.tex 2000/09/22 15:46:35 1.24 --- libmacfs.tex 2000/10/14 04:45:22 1.25 *************** *** 16,24 **** Whenever a function or method expects a \var{file} argument, this argument can be one of three things:\ (1) a full or partial Macintosh ! pathname, (2) an \pytype{FSSpec} object or (3) a 3-tuple \code{(\var{wdRefNum}, ! \var{parID}, \var{name})} as described in \citetitle{Inside ! Macintosh:\ Files}. A description of aliases and the Standard File ! package can also be found there. \begin{funcdesc}{FSSpec}{file} Create an \pytype{FSSpec} object for the specified file. --- 16,27 ---- Whenever a function or method expects a \var{file} argument, this argument can be one of three things:\ (1) a full or partial Macintosh ! pathname, (2) an \pytype{FSSpec} object or (3) a 3-tuple ! \code{(\var{wdRefNum}, \var{parID}, \var{name})} as described in ! \citetitle{Inside Macintosh:\ Files}. A description of aliases and the ! Standard File package can also be found there. + \strong{Note:} A module, \refmodule{macfsn}, is auto-imported to replace + StandardFile calls in macfs with NavServices calls. + \begin{funcdesc}{FSSpec}{file} Create an \pytype{FSSpec} object for the specified file. *************** *** 60,64 **** \begin{funcdesc}{PromptGetFile}{prompt\optional{, type, \moreargs}} Similar to \function{StandardGetFile()} but allows you to specify a ! prompt. \end{funcdesc} --- 63,67 ---- \begin{funcdesc}{PromptGetFile}{prompt\optional{, type, \moreargs}} Similar to \function{StandardGetFile()} but allows you to specify a ! prompt which will be displayed at the top of the dialog. \end{funcdesc} *************** *** 72,78 **** \begin{funcdesc}{GetDirectory}{\optional{prompt}} ! Present the user with a non-standard ``select a directory'' ! dialog. \var{prompt} is the prompt string, and the optional. ! Return an \pytype{FSSpec} object and a success-indicator. \end{funcdesc} --- 75,83 ---- \begin{funcdesc}{GetDirectory}{\optional{prompt}} ! Present the user with a non-standard ``select a directory'' dialog. You ! have to first open the directory before clicking on the ``select current ! directory'' button. \var{prompt} is the prompt string which will be ! displayed at the top of the dialog. Return an \pytype{FSSpec} object and ! a success-indicator. \end{funcdesc} *************** *** 85,89 **** Note that starting with system 7.5 the user can change Standard File ! behaviour with the ``general controls'' controlpanel, thereby making this call inoperative. \end{funcdesc} --- 90,94 ---- Note that starting with system 7.5 the user can change Standard File ! behaviour with the ``general controls'' control panel, thereby making this call inoperative. \end{funcdesc} *************** *** 107,111 **** \begin{funcdesc}{FindApplication}{creator} ! Locate the application with 4-char creator code \var{creator}. The function returns an \pytype{FSSpec} object pointing to the application. \end{funcdesc} --- 112,116 ---- \begin{funcdesc}{FindApplication}{creator} ! Locate the application with 4-character creator code \var{creator}. The function returns an \pytype{FSSpec} object pointing to the application. \end{funcdesc} Index: libmacic.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacic.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libmacic.tex 1999/03/04 19:00:26 1.14 --- libmacic.tex 2000/10/14 04:45:22 1.15 *************** *** 13,17 **** of mappings from Macintosh creator/type codes to foreign filename extensions plus information on how to transfer files (binary, ascii, ! etc). There is a low-level companion module --- 13,17 ---- of mappings from Macintosh creator/type codes to foreign filename extensions plus information on how to transfer files (binary, ascii, ! etc.). Since MacOS 9, this module is a control panel named Internet. There is a low-level companion module *************** *** 62,66 **** representation to a ``logical'' Python data structure. Running the \module{ic} module standalone will run a test program that lists all ! keys and values in your IC database, this will have to server as documentation. --- 62,66 ---- representation to a ``logical'' Python data structure. Running the \module{ic} module standalone will run a test program that lists all ! keys and values in your IC database, this will have to serve as documentation. *************** *** 85,89 **** position and the URL. The optional \var{start} and \var{end} can be used to limit the search, so for instance if a user clicks in a long ! textfield you can pass the whole textfield and the click-position in \var{start} and this routine will return the whole URL in which the user clicked. As above, \var{hint} is an optional scheme used to --- 85,89 ---- position and the URL. The optional \var{start} and \var{end} can be used to limit the search, so for instance if a user clicks in a long ! text field you can pass the whole text field and the click-position in \var{start} and this routine will return the whole URL in which the user clicked. As above, \var{hint} is an optional scheme used to From python-dev@python.org Sat Oct 14 05:47:55 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:47:55 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.4,1.5 Message-ID: <200010140447.VAA18626@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv18618 Modified Files: ACKS Log Message: More names. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ACKS 2000/10/09 18:08:56 1.4 --- ACKS 2000/10/14 04:47:53 1.5 *************** *** 91,94 **** --- 91,95 ---- Andrew MacIntyre Vladimir Marangozov + Vincent Marchetti Aahz Maruch Doug Mennella *************** *** 118,121 **** --- 119,123 ---- Constantina S. Hugh Sasse + Bob Savage Neil Schemenauer Barry Scott From python-dev@python.org Sat Oct 14 05:49:38 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:49:38 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libctb.tex,1.14,1.15 Message-ID: <200010140449.VAA18770@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv18763 Modified Files: libctb.tex Log Message: Wrap a long line. Index: libctb.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libctb.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** libctb.tex 1999/03/02 16:36:31 1.14 --- libctb.tex 2000/10/14 04:49:36 1.15 *************** *** 4,9 **** \declaremodule{builtin}{ctb} \platform{Mac} ! \modulesynopsis{Interfaces to the Communications Tool Box. Only the Connection ! Manager is supported.} --- 4,9 ---- \declaremodule{builtin}{ctb} \platform{Mac} ! \modulesynopsis{Interfaces to the Communications Tool Box. Only the ! Connection Manager is supported.} From python-dev@python.org Sat Oct 14 05:53:33 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:53:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libframework.tex,1.8,1.9 Message-ID: <200010140453.VAA18985@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv18892 Modified Files: libframework.tex Log Message: Chris Barker : Added summary of the strengths and weaknesses of the FrameWork module and fixed some typos. Index: libframework.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libframework.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** libframework.tex 1999/03/02 16:36:31 1.8 --- libframework.tex 2000/10/14 04:53:31 1.9 *************** *** 19,24 **** documentation describes only the most important functionality, and not in the most logical manner at that. Examine the source or the examples ! for more details. The \module{FrameWork} module defines the following functions: --- 19,37 ---- documentation describes only the most important functionality, and not in the most logical manner at that. Examine the source or the examples ! for more details. The following are some comments posted on the ! MacPython newsgroup about the strengths and limitations of ! \module{FrameWork}: ! ! \begin{quotation} ! The strong point of \module{FrameWork} is that it allows you to break ! into the control-flow at many different places. \refmodule{W}, for ! instance, uses a different way to enable/disable menus and that plugs ! right in leaving the rest intact. The weak points of ! \module{FrameWork} are that it has no abstract command interface (but ! that shouldn't be difficult), that it's dialog support is minimal and ! that it's control/toolbar support is non-existent. ! \end{quotation} + The \module{FrameWork} module defines the following functions: *************** *** 43,53 **** \begin{funcdesc}{MenuItem}{menu, title\optional{, shortcut, callback}} ! Create a menu item object. The arguments are the menu to crate the ! item it, the item title string and optionally the keyboard shortcut and a callback routine. The callback is called with the arguments menu-id, item number within menu (1-based), current front window and the event record. ! In stead of a callable object the callback can also be a string. In this case menu selection causes the lookup of a method in the topmost window and the application. The method name is the callback string --- 56,66 ---- \begin{funcdesc}{MenuItem}{menu, title\optional{, shortcut, callback}} ! Create a menu item object. The arguments are the menu to create, the ! item item title string and optionally the keyboard shortcut and a callback routine. The callback is called with the arguments menu-id, item number within menu (1-based), current front window and the event record. ! Instead of a callable object the callback can also be a string. In this case menu selection causes the lookup of a method in the topmost window and the application. The method name is the callback string *************** *** 80,85 **** tuple suitable for creation of a window of given width and height. The window will be staggered with respect to previous windows, and an ! attempt is made to keep the whole window on-screen. The window will ! however always be exact the size given, so parts may be offscreen. \end{funcdesc} --- 93,98 ---- tuple suitable for creation of a window of given width and height. The window will be staggered with respect to previous windows, and an ! attempt is made to keep the whole window on-screen. However, the window will ! however always be the exact size given, so parts may be offscreen. \end{funcdesc} *************** *** 267,271 **** \begin{methoddesc}[ScrolledWindow]{do_activate}{onoff, event} Takes care of dimming/highlighting scrollbars when a window becomes ! frontmost vv. If you override this method call this one at the end of your method. \end{methoddesc} --- 280,284 ---- \begin{methoddesc}[ScrolledWindow]{do_activate}{onoff, event} Takes care of dimming/highlighting scrollbars when a window becomes ! frontmost. If you override this method, call this one at the end of your method. \end{methoddesc} From python-dev@python.org Sat Oct 14 05:55:17 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:55:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libminiae.tex,1.6,1.7 Message-ID: <200010140455.VAA19063@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv19054 Modified Files: libminiae.tex Log Message: Chris Barker : Small clarification, remove the assertion that the module is temporary. Index: libminiae.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libminiae.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** libminiae.tex 1999/03/02 16:36:37 1.6 --- libminiae.tex 2000/10/14 04:55:15 1.7 *************** *** 13,21 **** (OSA) server, i.e. receive and process AppleEvents\index{AppleEvents}. It can be used in conjunction with ! \refmodule{FrameWork}\refstmodindex{FrameWork} or standalone. - This module is temporary, it will eventually be replaced by a module - that handles argument names better and possibly automates making your - application scriptable. The \module{MiniAEFrame} module defines the following classes: --- 13,19 ---- (OSA) server, i.e. receive and process AppleEvents\index{AppleEvents}. It can be used in conjunction with ! \refmodule{FrameWork}\refstmodindex{FrameWork} or standalone. As an ! example, it is used in \program{PythonCGISlave}. The \module{MiniAEFrame} module defines the following classes: From python-dev@python.org Sat Oct 14 05:56:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:56:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libmacui.tex,1.15,1.16 Message-ID: <200010140456.VAA19122@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv19113 Modified Files: libmacui.tex Log Message: Chris Barker : Various updates and additions. Index: libmacui.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacui.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libmacui.tex 2000/08/30 14:33:02 1.15 --- libmacui.tex 2000/10/14 04:56:52 1.16 *************** *** 23,27 **** \begin{funcdesc}{AskString}{prompt\optional{, default}} Ask the user to input a string value, in a modal dialog. \var{prompt} ! is the promt message, the optional \var{default} arg is the initial value for the string. All strings can be at most 255 bytes long. \function{AskString()} returns the string entered or \code{None} --- 23,27 ---- \begin{funcdesc}{AskString}{prompt\optional{, default}} Ask the user to input a string value, in a modal dialog. \var{prompt} ! is the prompt message, the optional \var{default} arg is the initial value for the string. All strings can be at most 255 bytes long. \function{AskString()} returns the string entered or \code{None} *************** *** 29,32 **** --- 29,41 ---- \end{funcdesc} + \begin{funcdesc}{AskPassword}{prompt\optional{, default}} + Ask the user to input a string value, in a modal dialog. Like + \method{AskString}, but with the text shown as bullets. \var{prompt} + is the prompt message, the optional \var{default} arg is the initial + value for the string. All strings can be at most 255 bytes + long. \function{AskString()} returns the string entered or \code{None} + in case the user cancelled. + \end{funcdesc} + \begin{funcdesc}{AskYesNoCancel}{question\optional{, default}} Present a dialog with text \var{question} and three buttons labelled *************** *** 37,57 **** \end{funcdesc} ! \begin{funcdesc}{ProgressBar}{\optional{label\optional{, maxval}}} ! Display a modeless progress dialog with a thermometer bar. \var{label} is the text string displayed (default ``Working...''), \var{maxval} is ! the value at which progress is complete (default \code{100}). The ! returned object has one method, \code{set(\var{value})}, which sets ! the value of the progress bar. The bar remains visible until the ! object returned is discarded. ! The progress bar has a ``cancel'' button, but it is currently ! non-functional. \end{funcdesc} - - Note that \module{EasyDialogs} does not currently use the notification - manager. This means that displaying dialogs while the program is in - the background will lead to unexpected results and possibly - crashes. Also, all dialogs are modeless and hence expect to be at the - top of the stacking order. This is true when the dialogs are created, - but windows that pop-up later (like a console window) may also result - in crashes. --- 46,60 ---- \end{funcdesc} ! \begin{funcdesc}{ProgressBar}{\optional{title \optional{, maxval\optional{,label}}}} ! Display a modeless progress dialog with a thermometer bar. \var{title} is the text string displayed (default ``Working...''), \var{maxval} is ! the value at which progress is complete (default ! \code{100}). \var{label} is the text that is displayed over the progress ! bar itself. The returned object has two methods, ! \code{set(\var{value})}, which sets the value of the progress bar, and ! \code{label(\var{text})}, which sets the text of the label. The bar ! remains visible until the object returned is discarded. ! The progress bar has a ``cancel'' button. [NOTE: how does the cancel ! button behave?] \end{funcdesc} From python-dev@python.org Sat Oct 14 05:59:15 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 21:59:15 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libmacostools.tex,1.12,1.13 Message-ID: <200010140459.VAA19284@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv19277 Modified Files: libmacostools.tex Log Message: Chris Barker : Small fixes. Index: libmacostools.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmacostools.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libmacostools.tex 1999/03/02 16:36:35 1.12 --- libmacostools.tex 2000/10/14 04:59:12 1.13 *************** *** 40,44 **** Tell the finder that some bits of finder-information such as creator or type for file \var{dst} has changed. The file can be specified by ! pathname or fsspec. This call should prod the finder into redrawing the files icon. \end{funcdesc} --- 40,44 ---- Tell the finder that some bits of finder-information such as creator or type for file \var{dst} has changed. The file can be specified by ! pathname or fsspec. This call should tell the finder to redraw the files icon. \end{funcdesc} *************** *** 80,84 **** Tell the finder to print a file (again specified by full pathname or \pytype{FSSpec}). The behaviour is identical to selecting the file and using ! the print command in the finder. \end{funcdesc} --- 80,84 ---- Tell the finder to print a file (again specified by full pathname or \pytype{FSSpec}). The behaviour is identical to selecting the file and using ! the print command in the finder's file menu. \end{funcdesc} From python-dev@python.org Sat Oct 14 06:06:26 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:06:26 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libaepack.tex,NONE,1.1 libaetypes.tex,NONE,1.1 Message-ID: <200010140506.WAA21694@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv21666 Added Files: libaepack.tex libaetypes.tex Log Message: Documentation for the aepack and aetypes modules, by Vincent Marchetti . --- NEW FILE --- \section{\module{aepack} --- Conversion between Python variables and AppleEvent data containers} \declaremodule{standard}{aepack} \platform{Mac} %\moduleauthor{Jack Jansen?}{email} \modulesynopsis{Conversion between Python variables and AppleEvent data containers.} \sectionauthor{Vincent Marchetti}{vincem@en.com} The \module{aepack} module defines functions for converting (packing) Python variables to AppleEvent descriptors and back (unpacking). Within Python the AppleEvent descriptor is handled by Python objects of built-in type \pytype{AEDesc}, defined in module \refmodule{AE}. The \module{aepack} module defines the following functions: \begin{funcdesc}{pack}{x\optional{, forcetype}} Returns an \class{AEDesc} object containing a conversion of Python value x. If \var{forcetype} is provided it specifies the descriptor type of the result. Otherwise, a default mapping of Python types to Apple Event descriptor types is used, as follows: \begin{tableii}{l|l}{textrm}{Python type}{descriptor type} \lineii{\class{FSSpec}}{typeFSS} \lineii{\class{Alias}}{typeAlias} \lineii{integer}{typeLong (32 bit integer)} \lineii{float}{typeFloat (64 bit floating point)} \lineii{string}{typeText} \lineii{list}{typeAEList} \lineii{dictionary}{typeAERecord} \lineii{instance}{\emph{see below}} \end{tableii} \pytype{FSSpec} and \pytype{Alias} are built-in object types defined in the module \refmodule{macfs}. If \var{x} is a Python instance then this function attempts to call an \method{__aepack__()} method. This method should return an \pytype{AE.AEDesc} object. If the conversion \var{x} is not defined above, this function returns the Python string representation of a value (the repr() function) encoded as a text descriptor. \end{funcdesc} \begin{funcdesc}{unpack}{x} \var{x} must be an object of type \class{AEDesc}. This function returns a Python object representation of the data in the Apple Event descriptor \var{x}. Simple AppleEvent data types (integer, text, float) are returned as their obvious Python counterparts. Apple Event lists are returned as Python lists, and the list elements are recursively unpacked. Object references (ex. \code{line 3 of document 1}) are returned as instances of \class{aetypes.ObjectSpecifier}. AppleEvent descriptors with descriptor type typeFSS are returned as \class{FSSpec} objects. AppleEvent record descriptors are returned as Python dictionaries, with keys of type \class{?} and elements recursively unpacked. \end{funcdesc} \begin{seealso} \seemodule{AE}{Built-in access to Apple Event Manager routines.} \seemodule{aetypes}{Python definitions of codes for Apple Event descriptor types.} \seetitle[http://developer.apple.com/techpubs/mac/IAC/IAC-2.html]{ Inside Macintosh: Interapplication Communication}{Information about inter-process communications on the Macintosh.} \end{seealso} --- NEW FILE --- \section{\module{aetypes} --- AppleEvent objects} \declaremodule{standard}{aetypes} \platform{Mac} %\moduleauthor{Jack Jansen?}{email} \modulesynopsis{Python representation of the Apple Event Object Model.} \sectionauthor{Vincent Marchetti}{vincem@en.com} The \module{aetypes} defines classes used to represent Apple Event object specifiers. An object specifier is essentially an address of an object implemented in a Apple Event server. An Apple Event specifier is used as the direct object for an Apple Event or as the argument of an optional parameter. In AppleScript an object specifier is represented by a phrase such as: \code{character 23 of document "Semprini"}. The classes defined in this module allow this specifier to be represented by a Python object which is initialized as follows: \code{res = Document(1).Character(23)} The \module{AEObjects} module defines the following class: \begin{classdesc}{ObjectSpecifier}{want, form, seld, from} This is the base class for representing object specifiers and is generally not constructed directly by the user. Its important functionality is to define an \function{__aepack__()} function, which returns the Apple Event descriptor containing the object specifier. Its data members, set directly from the constructor arguments, are: \end{classdesc} \begin{memberdesc}{want} A four character string representing the class code of the object. These class codes are specified in Apple Event Suites; for example the standard code for a character object is the 4 bytes \samp{char}. \end{memberdesc} From python-dev@python.org Sat Oct 14 06:08:36 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:08:36 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac toolbox.tex,NONE,1.1 undoc.tex,NONE,1.1 Message-ID: <200010140508.WAA22845@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv22780 Added Files: toolbox.tex undoc.tex Log Message: Chapters on Mac Toolbox modules and other undocumented modules, ready to be filled in with real information. Contributed by Chris Barker . --- NEW FILE --- \chapter{MacOS Toolbox Modules \label{toolbox}} There are a set of modules that provide interfaces to various MacOS toolboxes. If applicable the module will define a number of Python objects for the various structures declared by the toolbox, and operations will be implemented as methods of the object. Other operations will be implemented as functions in the module. Not all operations possible in C will also be possible in Python (callbacks are often a problem), and parameters will occasionally be different in Python (input and output buffers, especially). All methods and functions have a \member{__doc__} string describing their arguments and return values, and for additional description you are referred to \citetitle[http://developer.apple.com/techpubs/macos8/mac8.html]{Inside Macintosh} or similar works. \strong{Warning!} These modules are not yet documented. If you wish to contribute documentation of any of these modules, please get in touch with \email{python-docs@python.org}. \localmoduletable %\section{Argument Handling for Toolbox Modules} \section{\module{AE} --- Apple Events} \declaremodule{standard}{AE} \platform{Mac} \modulesynopsis{Interface to the Apple Events toolbox} \section{\module{Cm} --- Component Manager} \declaremodule{standard}{Cm} \platform{Cm} \modulesynopsis{Interface to the Component Manager} \section{\module{Ctl} --- Control Manager} \declaremodule{standard}{Ctl} \platform{Mac} \modulesynopsis{Interface to the Control Manager} \section{\module{Dlg} --- Dialog Manager} \declaremodule{standard}{Dlg} \platform{Mac} \modulesynopsis{Interface to the Dialog Manager} \section{\module{Evt} --- Event Manager} \declaremodule{standard}{Evt} \platform{Mac} \modulesynopsis{Interface to the Event Manager} \section{\module{Fm} --- Font Manager} \declaremodule{standard}{Fm} \platform{Mac} \modulesynopsis{Interface to the Font Manager} \section{\module{List} --- List Manager} \declaremodule{standard}{List} \platform{Mac} \modulesynopsis{Interface to the List Manager} \section{\module{Menu} --- Menu Manager} \declaremodule{standard}{Menu} \platform{Mac} \modulesynopsis{Interface to the Menu Manager} \section{\module{Qd} --- QuickDraw} \declaremodule{builtin}{Qd} \platform{Mac} \modulesynopsis{Interface to the QuickDraw toolbox} \section{\module{Qt} --- QuickTime} \declaremodule{standard}{Qt} \platform{Mac} \modulesynopsis{Interface to the QuickTime toolbox} \section{\module{Res} --- Resource Manager and Handles} \declaremodule{standard}{Res} \platform{Mac} \modulesynopsis{Interface to the Resource Manager and Handles} \section{\module{Scrap} --- Scrap Manager} \declaremodule{standard}{Scrap} \platform{Mac} \modulesynopsis{Interface to the Scrap Manager} \section{\module{Snd} --- Sound Manager} \declaremodule{standard}{Snd} \platform{Mac} \modulesynopsis{Interface to the Sound Manager } \section{\module{TE} --- TextEdit} \declaremodule{standard}{TE} \platform{Mac} \modulesynopsis{Interface to TextEdit} \section{\module{waste} --- non-Apple \program{TextEdit} replacement} \declaremodule{standard}{waste} \platform{Mac} \modulesynopsis{Interface to the ``WorldScript-Aware Styled Text Engine.''} \begin{seealso} \seetitle[http://www.merzwaren.com/waste/]{About WASTE}{Information about the WASTE widget and library, including documentation and downloads.} \end{seealso} \section{\module{Win} --- Window Manager} \declaremodule{standard}{Win} \platform{Mac} \modulesynopsis{Interface to the Window Manager} --- NEW FILE --- \chapter{Undocumented Modules \label{undocumented-modules}} The modules in this chapter are poorly documented (if at all). If you wish to contribute documentation of any of these modules, please get in touch with \email{python-docs@python.org}. \localmoduletable \section{\module{buildtools} --- Helper module for BuildApplet and Friends} \declaremodule{standard}{buildtools} \platform{Mac} \modulesynopsis{Helper module for BuildApple, BuildApplication and macfreeze} \section{\module{py_resource} --- } \declaremodule[pyresource]{standard}{py_resource} \platform{Mac} \modulesynopsis{} \section{\module{cfmfile} --- Code Fragment Resource module} \declaremodule{standard}{cfmfile} \platform{Mac} \modulesynopsis{Code Fragment Resource module} \module{cfmfile} is a module that understands Code Fragments and the accompanying ``cfrg'' resources. It can parse them and merge them, and is used by BuildApplication to combine all plugin modules to a single executable. \section{\module{macerrors} --- MacOS Errors} \declaremodule{standard}{macerrors} \platform{Mac} \modulesynopsis{Constant definitions for many MacOS error codes} \module{macerrors} cotains constant definitions for many MacOS error codes. \section{\module{macfsn} --- NavServices calls} \declaremodule{standard}{macfsn} \platform{Mac} \modulesynopsis{NavServices versions of StandardFile calls} \module{macfsn} contains wrapper functions that have the same API as the macfs StandardFile calls, but are implemented with Navigation Services. Importing it will replace the methods in macfs with these, if Navigation Services is available on your machine. \section{\module{icopen} --- Internet Config replacement for \method{open()}} \declaremodule{standard}{icopen} \platform{Mac} \modulesynopsis{Internet Config replacement for \method{open()}} Importing \module{icopen} will replace the builtin \method{open()} with a version that uses Internet Config to set file type and creator for new files. \section{\module{mactty} --- } \declaremodule{standard}{mactty} \platform{Mac} \modulesynopsis{} \section{\module{nsremote} --- Wrapper around Netscape OSA modules} \declaremodule{standard}{nsremote} \platform{Mac} \modulesynopsis{Wrapper around Netscape OSA modules} \module{nsremote} is a wrapper around the Netscape OSA modules that allows you to easily send your browser to a given URL. \section{\module{PixMapWrapper} --- Wrapper for PixMap objects} \declaremodule{standard}{PixMapWrapper} \platform{Mac} \modulesynopsis{Wrapper for PixMap objects} \module{PixMapWrapper} wraps a PixMap object with a Python object that allows access to the fields by name. It also has methods to convert to and from \module{PIL} images. \section{\module{preferences} --- } \declaremodule{standard}{preferences} \platform{Mac} \modulesynopsis{} \section{\module{pythonprefs} --- } \declaremodule{standard}{pythonprefs} \platform{Mac} \modulesynopsis{} \section{\module{quietconsole} --- non-visible stdout output} \declaremodule{standard}{quietconsole} \platform{Mac} \modulesynopsis{buffered, non-visible stdout output} \module{quietconsole} allows you to keep stdio output in a buffer without displaying it (or without displaying the stdout window altogether, if set with \program{EditPythonPrefs}) until you try to read from stdin or disable the buffering, at which point all the saved output is sent to the window. Good for GUI programs that do want to display their output at a crash. \section{\module{W} --- Widgets built on \module{FrameWork}} \declaremodule{standard}{W} \platform{Mac} \modulesynopsis{Widgets for the Mac, built on top of \module{FrameWork}} The \module{W} widgets are used extensively in the \program{IDE}. From python-dev@python.org Sat Oct 14 06:09:45 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:09:45 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac using.tex,NONE,1.1 Message-ID: <200010140509.WAA23555@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv23534 Added Files: using.tex Log Message: Chapter on how to use MacPython, by Bob Savage . --- NEW FILE --- \chapter{Using Python on the Macintosh \label{using}} \sectionauthor{Bob Savage}{bobsavage@mac.com} Using Python on the Macintosh can seem like something completely different than using it on a \UNIX-like or Windows system. Most of the Python documentation, both the ``official'' documentation and published books, describe only how Python is used on these systems, causing confusion for the new user of MacPython. This chapter gives a brief introduction to the specifics of using Python on a Macintosh. \section{Getting and Installing MacPython \label{getting}} The most recent release version as well as possible newer experimental versions are best found at the MacPython page maintained by Jack Jansen: \url{http://www.cwi.nl/~jack/macpython.html}. Please refer to the \file{README} included with your distribution for the most up-to-date instructions. \section{Entering the interactive Interpreter \label{interpreter}} The interactive interpreter that you will see used in Python documentation is started by double-clicking the \program{PythonInterpreter} icon, which looks like a 16-ton weight falling. You should see the version information and the \samp{>>>~} prompt. Use it exactly as described in the standard documentation. \section{How to run a Python script} There are several ways to run an existing Python script; two common ways to run a Python script are ``drag and drop'' and ``double clicking''. Other ways include running it from within the IDE (see Section \ref{IDE}), or launching via AppleScript. \subsection{Drag and drop} One of the easiest ways to launch a Python script is via ``Drag and Drop''. This is just like launching a text file in the Finder by ``dragging'' it over your word processor's icon and ``dropping'' it there. Make sure that you use an icon referring to the \program{PythonInterpreter}, not the \program{IDE} or \program{Idle} icons which have different behaviour which is described below. Some things that might have gone wrong: \begin{itemize} \item A window flashes after dropping the script onto the \program{PythonInterpreter}, but then disappears. Most likely this is a configuration issue; your \program{PythonInterpreter} is setup to exit immediately upon completion, but your script assumes that if it prints something that text will stick around for a while. To fix this, see section \ref{Defaults}. \item After dropping the script onto the \program{PythonInterpreter}, a window appeared which said: ``File contains \code{\e r} characters (incorrect line endings?)''. That script probably originated on a \UNIX{} or Windows machine. You will need to change the line endings to the standard Mac usage. One way to do this is to open the file in \program{BBedit} (\url{http://www.barebones.com/products/bbedit_lite.html}) which can easily change the line endings between Mac, DOS, and \UNIX\ styles. \item When you waved the script icon over the \program{PythonInterpreter}, the \program{PythonInterpreter} icon did not hilight. Most likely the Creator code and document type is unset (or set incorrectly) -- this often happens when a file originates on a non-Mac computer. See section \ref{CreatorCode} for more details. \end{itemize} \subsection{Set Creator and Double Click \label{creator-code}} If the script that you want to launch has the appropriate Creator Code and File Type you can simply double-click on the script to launch it. To be ``double-clickable'' a file needs to be of type \samp{TEXT}, with a creator code of \samp{Pyth}. Setting the creator code and filetype can be done with the IDE (see sections \ref{IDEwrite} and \ref{IDEapplet}), with an editor with a Python mode (\program{BBEdit}) -- see section \ref{scripting-with-BBedit}, or with assorted other Mac utilities, but a script (\file{fixfiletypes.py}) has been included in the MacPython distribution, making it possible to set the proper Type and Creator Codes with Python. The \file{fixfiletypes.py} script will change the file type and creator codes for the indicated directory. To use \file{fixfiletypes.py}: \begin{enumerate} \item Locate it in the \file{scripts} folder of the \file{Mac} folder of the MacPython distribution. \item Put all of the scripts that you want to fix in a folder with nothing else in it. \item Double-click on the \file{fixfiletypes.py} icon. \item Navigate into the folder of files you want to fix, and press the ``Select current folder'' button. \end{enumerate} \section{Simulating command line arguments \label{argv}} There are two ways to simulate command-line arguments with MacPython. \begin{enumerate} \item via Interpreter options \begin{itemize} % nestable? I hope so! \item Hold the option-key down when launching your script. This will bring up a dialog box of Python Interpreter options. \item Click ``Set \UNIX-style command line..'' button. \item Type the arguments into the ``Argument'' field. \item Click ``OK'' \item Click ``Run''. \end{itemize} % end \item via drag and drop If you save the script as an applet (see Section \ref{IDEapplet}), you can also simulate some command-line arguments via ``Drag-and-Drop''. In this case, the names of the files that were dropped onto the applet will be appended to \code{sys.argv}, so that it will appear to the script as though they had been typed on a command line. As on \UNIX\ systems, the first item in \code{sys.srgv} is the path to the applet, and the rest are the files dropped on the applet. \end{enumerate} \section{Creating a Python script} Since Python scripts are simply text files, they can be created in any way that text files can be created, but some special tools also exist with extra features. \subsection{In an editor} You can create a text file with any word processing program such as \program{MSWord} or \program{AppleWorks} but you need to make sure that the file is saved as ``\ASCII'' or ``plain text''. \subsubsection{Editors with Python modes} Several text editors have additional features that add functionality when you are creating a Python script. These can include coloring Python keywords to make your code easier to read, module browsing, or a built-in debugger. These include \program{Alpha}, \program{Pepper}, and \program{BBedit}, and the MacPython IDE (Section \ref{IDE}). %\subsubsection{Alpha} % **NEED INFO HERE** \subsubsection{BBedit \label{scripting-with-BBedit}} If you use \program{BBEdit} to create your scripts you will want to tell it about the Python creator code so that you can simply double click on the saved file to launch it. \begin{itemize} \item Launch \program{BBEdit}. \item Select ``Preferences'' from the ``Edit'' menu. \item Select ``File Types'' from the scrolling list. \item click on the ``Add...'' button and navigate to \program{PythonInterpreter} in the main directory of the MacPython distribution; click ``open''. \item Click on the ``Save'' button in the Preferences panel. \end{itemize} % Are there additional BBedit Python-specific features? I'm not aware of any. %\subsubsection{IDE} %You can use the \program{Python IDE} supplied in the MacPython Distribution to create longer Python scripts %-- see Section \ref{IDEwrite} for details. %\subsubsection{IDLE} %Idle is an IDE for Python that was written in Python, using TKInter. You should be able to use it on a Mac by following %the standard documentation, but see Section \ref{TKInter} for guidance on using TKInter with MacPython. %\subsubsection{Pepper} % **NEED INFO HERE** \section{The IDE\label{IDE}} The \program{Python IDE} (Integrated Development Environment) is a separate application that acts as a text editor for your Python code, a class browser, a graphical debugger, and more. \subsection{Using the ``Python Interactive'' window} Use this window like you would the \program{PythonInterpreter}, except that you cannot use the ``Drag and drop'' method above. Instead, dropping a script onto the \program{Python IDE} icon will open the file in a seperate script window (which you can then execute manually -- see section \ref{IDEexecution}). \subsection{Writing a Python Script \label{IDEwrite}} In addition to using the \program{Python IDE} interactively, you can also type out a complete Python program, saving it incrementally, and execute it or smaller selections of it. You can create a new script, open a previously saved script, and save your currently open script by selecting the appropriate item in the ``File'' menu. Dropping a Python script onto the \program{Python IDE} will open it for editting. If you try to open a script with the \program{Python IDE} but either can't locate it from the ``Open'' dialog box, or you get an error message like ``Can't open file of type ...'' see section \ref{CreatorCode}. When the \program{Python IDE} saves a script, it uses the creator code settings which are available by clicking on the small black triangle on the top right of the document window, and selecting ``save options''. The default is to save the file with the \program{Python IDE} as the creator, this means that you can open the file for editing by simply double-clicking on its icon. You might want to change this behaviour so that it will be opened by the \program{PythonInterpreter}, and run. To do this simply choose ``Python Interpreter'' from the ``save options''. Note that these options are associated with the \emph{file} not the application. \subsection{Executing a script from within the IDE \label{IDEexecution}} You can run the script in the frontmost window of the \program{Python IDE} by hitting the run all button. You should be aware, however that if you use the Python convention \samp{if __name__ == "__main__":} the script will \emph{not} be ``__main__'' by default. To get that behaviour you must select the ``Run as __main__'' option from the small black triangle on the top right of the document window. Note that this option is associated with the \emph{file} not the application. It \emph{will} stay active after a save, however; to shut this feature off simply select it again. \subsection{``Save as'' versus ``Save as Applet'' \label{IDEapplet}} When you are done writing your Python script you have the option of saving it as an ``applet'' (by selecting ``Save as applet'' from the ``File'' menu). This has a significant advantage in that you can drop files or folders onto it, to pass them to the applet the way command-line users would type them onto the command-line to pass them as arguments to the script. However, you should make sure to save the applet as a seperate file, do not overwrite the script you are writing, because you will not be able to edit it again. Accessing the items passed to the applet via ``drag-and-drop'' is done using the standard \member{sys.argv} mechanism. See the general documentation for more % need to link to the appropriate place in non-Mac docs Note that saving a script as an applet will not make it runnable on a system without a Python installation. %\subsection{Debugger} % **NEED INFO HERE** %\subsection{Module Browser} % **NEED INFO HERE** %\subsection{Profiler} % **NEED INFO HERE** % end IDE %\subsection{The ``Scripts'' menu} % **NEED INFO HERE** \section{Configuration \label{configuration}} The MacPython distribution comes with \program{EditPythonPrefs}, an applet which will help you to customize the MacPython environment for your working habits. \subsection{EditPythonPrefs\label{EditPythonPrefs}} \program{EditPythonPrefs} gives you the capability to configure Python to behave the way you want it to. There are two ways to use \program{EditPythonPrefs}, you can use it to set the preferences in general, or you can drop a particular Python engine onto it to customize only that version. The latter can be handy if, for example, you want to have a second copy of the \program{PythonInterpreter} that keeps the output window open on a normal exit even though you prefer to normally not work that way. To change the default preferences, simply double-click on \program{EditPythonPrefs}. To change the preferences only for one copy of the Interpreter, drop the icon for that copy onto \program{EditPythonPrefs}. You can also use \program{EditPythonPrefs} in this fashion to set the preferences of the \program{Python IDE} and any applets you create -- see Sections \ref{BuildApplet} and \ref{IDEapplet}. \subsection{Adding modules to the Module Search Path \label{search-path}} When executing an \keyword{import} statement, Python looks for modules in places defined by the \member{sys.path} To edit the \member{sys.path} on a Mac, launch \program{EditPythonPrefs}, and enter them into the largish field at the top (one per line). Since MacPython defines a main Python directory, the easiest thing is to add folders to search within the main Python directory. To add a folder of scripts that you created called ``My Folder'' located in the main Python Folder, enter \samp{\$(PYTHON):My Folder} onto a new line. To add the Desktop under OS 9 or below, add \samp{StartupDriveName:Desktop Folder} on a new line. \subsection{Default startup options \label{defaults}} % I'm assuming that there exists some other documentation on the % rest of the options so I only go over a couple here. The ``Default startup options...'' button in the \program{EditPythonPrefs} dialog box gives you many options including the ability to keep the ``Output'' window open after the script terminates, and the ability to enter interactive mode after the termination of the run script. The latter can be very helpful if you want to examine the objects that were created during your script. %\section{Nifty Tools} %There are many other tools included with the MacPython %distribution. In addition to those discussed here, make %sure to check the \file{Mac} directory. %\subsection{BuildApplet \label{BuildApplet}} % **NEED INFO HERE** %\subsection{BuildApplication} % **NEED INFO HERE** %\section{TKInter on the Mac \label{TKInter}} %TKinter is installed by default with the MacPython distribution, but %you may need to add the \file{lib-tk} folder to the Python Path (see %section \ref{search-path}). Also, it is important that you do not %try to launch Tk from within the \program{Python IDE} because the two %event loops will collide -- always run a script which uses Tkinter %with the \program{PythonInterpreter} instead -- see section %\ref{interpreter}. %\section{CGI on the Mac with Python \label{CGI}} %**NEED INFO HERE** \section{Mac OS X} At the time of this writing Mac OS X had just been released as a Public Beta. Efforts are under way to bring MacPython to Mac OS X. The MacPython release \version{1.5.2c1} runs quite well within the ``Classic'' environment. A ``Carbon'' port of the MacPython code is being prepared for release, and several people have made a command line version available to the ``Darwin'' layer (which is accessible via Terminal.app). From python-dev@python.org Sat Oct 14 06:24:23 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:24:23 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac using.tex,1.1,1.2 Message-ID: <200010140524.WAA31483@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv31476 Modified Files: using.tex Log Message: Fix some internal references that I botched. Index: using.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/using.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** using.tex 2000/10/14 05:09:42 1.1 --- using.tex 2000/10/14 05:24:20 1.2 *************** *** 58,62 **** immediately upon completion, but your script assumes that if it prints something that text will stick around for a while. To fix this, see ! section \ref{Defaults}. \item --- 58,62 ---- immediately upon completion, but your script assumes that if it prints something that text will stick around for a while. To fix this, see ! section \ref{defaults}. \item *************** *** 75,79 **** Creator code and document type is unset (or set incorrectly) -- this often happens when a file originates on a non-Mac computer. See ! section \ref{CreatorCode} for more details. \end{itemize} --- 75,79 ---- Creator code and document type is unset (or set incorrectly) -- this often happens when a file originates on a non-Mac computer. See ! section \ref{creator-code} for more details. \end{itemize} *************** *** 226,230 **** can't locate it from the ``Open'' dialog box, or you get an error message like ``Can't open file of type ...'' see section ! \ref{CreatorCode}. When the \program{Python IDE} saves a script, it uses the creator code --- 226,230 ---- can't locate it from the ``Open'' dialog box, or you get an error message like ``Can't open file of type ...'' see section ! \ref{creator-code}. When the \program{Python IDE} saves a script, it uses the creator code *************** *** 309,313 **** \program{EditPythonPrefs}. You can also use \program{EditPythonPrefs} in this fashion to set the preferences of the \program{Python IDE} and ! any applets you create -- see Sections \ref{BuildApplet} and \ref{IDEapplet}. --- 309,313 ---- \program{EditPythonPrefs}. You can also use \program{EditPythonPrefs} in this fashion to set the preferences of the \program{Python IDE} and ! any applets you create -- see section %s \ref{BuildApplet} and \ref{IDEapplet}. From python-dev@python.org Sat Oct 14 06:39:11 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:39:11 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac libmac.tex,1.20,1.21 Message-ID: <200010140539.WAA07627@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv7585 Modified Files: libmac.tex Log Message: Remove everything that is not module documentation. It is no longer needed here. Index: libmac.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/libmac.tex,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** libmac.tex 1999/11/10 16:12:30 1.20 --- libmac.tex 2000/10/14 05:39:08 1.21 *************** *** 1,43 **** - \section{Introduction} - \label{intro} - - The modules in this manual are available on the Apple Macintosh only. - - Aside from the modules described here there are also interfaces to - various MacOS toolboxes, which are currently not extensively - described. The toolboxes for which modules exist are: - \module{AE} (Apple Events), - \module{Cm} (Component Manager), - \module{Ctl} (Control Manager), - \module{Dlg} (Dialog Manager), - \module{Evt} (Event Manager), - \module{Fm} (Font Manager), - \module{List} (List Manager), - \module{Menu} (Moenu Manager), - \module{Qd} (QuickDraw), - \module{Qt} (QuickTime), - \module{Res} (Resource Manager and Handles), - \module{Scrap} (Scrap Manager), - \module{Snd} (Sound Manager), - \module{TE} (TextEdit), - \module{Waste} (non-Apple \program{TextEdit} replacement) and - \module{Win} (Window Manager). - - If applicable the module will define a number of Python objects for - the various structures declared by the toolbox, and operations will be - implemented as methods of the object. Other operations will be - implemented as functions in the module. Not all operations possible in - \C{} will also be possible in Python (callbacks are often a problem), and - parameters will occasionally be different in Python (input and output - buffers, especially). All methods and functions have a \code{__doc__} - string describing their arguments and return values, and for - additional description you are referred to \citetitle{Inside - Macintosh} or similar works. - - The following modules are documented here: - - \localmoduletable - - \section{\module{mac} --- Implementations for the \module{os} module} --- 1,2 ---- From python-dev@python.org Sat Oct 14 06:41:20 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:41:20 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/mac mac.tex,1.5,1.6 Message-ID: <200010140541.WAA09395@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/mac In directory slayer.i.sourceforge.net:/tmp/cvs-serv9357 Modified Files: mac.tex Log Message: Update to include all the new chapters & sections. Convert from a howto to a manual, so we can *have* chapters! Comment out the macconsole module documentation; Think C seems to have disappeared. Index: mac.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/mac/mac.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** mac.tex 1999/11/10 16:12:30 1.5 --- mac.tex 2000/10/14 05:41:17 1.6 *************** *** 1,3 **** ! \documentclass{howto} \title{Macintosh Library Modules} --- 1,3 ---- ! \documentclass{manual} \title{Macintosh Library Modules} *************** *** 5,12 **** \input{boilerplate} ! \makeindex % tell \index to actually write the ! % .idx file ! \makemodindex % ... and the module index as well. ! %\ignorePlatformAnnotation{Mac} --- 5,10 ---- \input{boilerplate} ! \makeindex % tell \index to actually write the .idx file ! \makemodindex % ... and the module index as well. *************** *** 42,48 **** \tableofcontents ! \input{libmac} % MACINTOSH ONLY \input{libctb} ! \input{libmacconsole} \input{libmacdnr} \input{libmacfs} --- 40,57 ---- \tableofcontents ! ! \input{using.tex} % Using Python on the Macintosh ! ! ! \chapter{MacPython Modules \label{macpython-modules}} ! ! The following modules are only available on the Macintosh, and are ! documented here: ! ! \localmoduletable ! ! \input{libmac} \input{libctb} ! %\input{libmacconsole} \input{libmacdnr} \input{libmacfs} *************** *** 55,58 **** --- 64,73 ---- \input{libframework} \input{libminiae} + \input{libaepack} + \input{libaetypes} + + \input{toolbox} % MacOS Toolbox Modules + + \input{undoc} % Undocumented Modules % *************** *** 65,74 **** \renewcommand{\indexname}{Module Index} %end{latexonly} ! \input{modmac.ind} % Module Index %begin{latexonly} \renewcommand{\indexname}{Index} %end{latexonly} ! \input{mac.ind} % Index \end{document} --- 80,89 ---- \renewcommand{\indexname}{Module Index} %end{latexonly} ! \input{modmac.ind} % Module Index %begin{latexonly} \renewcommand{\indexname}{Index} %end{latexonly} ! \input{mac.ind} % Index \end{document} From python-dev@python.org Sat Oct 14 06:44:34 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:44:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile.deps,1.47,1.48 Message-ID: <200010140544.WAA12119@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv12080 Modified Files: Makefile.deps Log Message: Update dependencies for the Macintosh manual. Index: Makefile.deps =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile.deps,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -r1.47 -r1.48 *** Makefile.deps 2000/10/12 20:07:08 1.47 --- Makefile.deps 2000/10/14 05:44:32 1.48 *************** *** 251,257 **** MACFILES= $(HOWTOSTYLES) $(COMMONTEX) \ ../mac/mac.tex \ ../mac/libmac.tex \ ../mac/libctb.tex \ - ../mac/libmacconsole.tex \ ../mac/libmacdnr.tex \ ../mac/libmacfs.tex \ --- 251,261 ---- MACFILES= $(HOWTOSTYLES) $(COMMONTEX) \ ../mac/mac.tex \ + ../mac/using.tex \ + ../mac/toolbox.tex \ + ../mac/undoc.tex \ ../mac/libmac.tex \ + ../mac/libaepack.tex \ + ../mac/libaetypes.tex \ ../mac/libctb.tex \ ../mac/libmacdnr.tex \ ../mac/libmacfs.tex \ From python-dev@python.org Sat Oct 14 06:46:14 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:46:14 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.51,1.52 Message-ID: <200010140546.WAA13492@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv13450/lib Modified Files: libos.tex Log Message: For os.stat() & friends, note that the time fields are returned as floating-point values. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -r1.51 -r1.52 *** libos.tex 2000/10/04 13:57:27 1.51 --- libos.tex 2000/10/14 05:46:11 1.52 *************** *** 711,715 **** \code{st_mtime}, \code{st_ctime}. ! More items may be added at the end by some implementations. (On MS Windows, some items are filled with dummy values.) Availability: Macintosh, \UNIX{}, Windows. --- 711,717 ---- \code{st_mtime}, \code{st_ctime}. ! More items may be added at the end by some implementations. Note that ! on the Macintosh, the time values are floating point values, like all ! time values on the Macintosh. (On MS Windows, some items are filled with dummy values.) Availability: Macintosh, \UNIX{}, Windows. From python-dev@python.org Sat Oct 14 06:47:19 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:47:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/paper-letter Makefile,1.17,1.18 Message-ID: <200010140547.WAA14369@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/paper-letter In directory slayer.i.sourceforge.net:/tmp/cvs-serv14330/paper-letter Modified Files: Makefile Log Message: Adjust the Macintosh manual to have the formatting dependencies for manuals instead of howtos. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/paper-letter/Makefile,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** Makefile 2000/09/12 15:20:54 1.17 --- Makefile 2000/10/14 05:47:17 1.18 *************** *** 14,25 **** # what's what ! MANDVIFILES= api.dvi ext.dvi lib.dvi ref.dvi tut.dvi ! HOWTODVIFILES= doc.dvi mac.dvi inst.dvi dist.dvi ! MANPDFFILES= api.pdf ext.pdf lib.pdf ref.pdf tut.pdf ! HOWTOPDFFILES= doc.pdf mac.pdf inst.pdf dist.pdf ! MANPSFILES= api.ps ext.ps lib.ps ref.ps tut.ps ! HOWTOPSFILES= doc.ps mac.ps inst.ps dist.ps DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES) --- 14,25 ---- # what's what ! MANDVIFILES= api.dvi ext.dvi lib.dvi mac.dvi ref.dvi tut.dvi ! HOWTODVIFILES= doc.dvi inst.dvi dist.dvi ! MANPDFFILES= api.pdf ext.pdf lib.pdf mac.pdf ref.pdf tut.pdf ! HOWTOPDFFILES= doc.pdf inst.pdf dist.pdf ! MANPSFILES= api.ps ext.ps lib.ps mac.ps ref.ps tut.ps ! HOWTOPSFILES= doc.ps inst.ps dist.ps DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES) From python-dev@python.org Sat Oct 14 06:49:33 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 13 Oct 2000 22:49:33 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.95,1.96 Message-ID: <200010140549.WAA16299@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/api In directory slayer.i.sourceforge.net:/tmp/cvs-serv16239/api Modified Files: api.tex Log Message: For PyErr_Format(), note that the exception parameter can be a string or class, but not an instance (since an instance will be created using the formatted message string as the constructor parameter). Index: api.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -r1.95 -r1.96 *** api.tex 2000/10/07 12:31:50 1.95 --- api.tex 2000/10/14 05:49:30 1.96 *************** *** 883,888 **** \begin{cfuncdesc}{PyObject*}{PyErr_Format}{PyObject *exception, const char *format, \moreargs} ! This function sets the error indicator. ! \var{exception} should be a Python object. \var{fmt} should be a string, containing format codes, similar to \cfunction{printf}. The \code{width.precision} before a format code --- 883,888 ---- \begin{cfuncdesc}{PyObject*}{PyErr_Format}{PyObject *exception, const char *format, \moreargs} ! This function sets the error indicator. \var{exception} should be a ! Python exception (string or class, not an instance). \var{fmt} should be a string, containing format codes, similar to \cfunction{printf}. The \code{width.precision} before a format code From python-dev@python.org Sat Oct 14 08:35:18 2000 From: python-dev@python.org (Tim Peters) Date: Sat, 14 Oct 2000 00:35:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/PCbuild BUILDno.txt,1.3,1.4 python20.dsp,1.13,1.14 python20.wse,1.20,1.21 Message-ID: <200010140735.AAA21264@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/PCbuild In directory slayer.i.sourceforge.net:/tmp/cvs-serv18588/python/dist/src/pcbuild Modified Files: BUILDno.txt python20.dsp python20.wse Log Message: Prep the Windows installer for 2.0 final: + Bump the build number. + Changed app name in installer dialogs. + Fiddled dialogs to repair grammar and get rid of anachronisms (e.g., "ProgMan" and "Program Manager" haven't made sense since Windows 3.1!). Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** BUILDno.txt 2000/10/07 04:04:07 1.3 --- BUILDno.txt 2000/10/14 07:35:14 1.4 *************** *** 28,32 **** + This is not enough to convince MSDev to recompile getbuildinfo.c, so force that and relink. ! + Verify that the new build number shows up in both release and debug builds. --- 28,32 ---- + This is not enough to convince MSDev to recompile getbuildinfo.c, so force that and relink. ! + Verify that the new build number shows up in both release and debug builds. *************** *** 34,37 **** --- 34,39 ---- Windows Python BUILD numbers ---------------------------- + 8 2.0 (final) + 14-Oct-2000 7 2.0c1 07-Oct-2000 Index: python20.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.dsp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** python20.dsp 2000/10/07 04:04:07 1.13 --- python20.dsp 2000/10/14 07:35:15 1.14 *************** *** 695,703 **** !IF "$(CFG)" == "python20 - Win32 Release" ! # ADD CPP /D BUILD=7 !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! # ADD CPP /D BUILD=7 !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" --- 695,703 ---- !IF "$(CFG)" == "python20 - Win32 Release" ! # ADD CPP /D BUILD=8 !ELSEIF "$(CFG)" == "python20 - Win32 Debug" ! # ADD CPP /D BUILD=8 !ELSEIF "$(CFG)" == "python20 - Win32 Alpha Debug" Index: python20.wse =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.wse,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** python20.wse 2000/10/07 04:04:07 1.20 --- python20.wse 2000/10/14 07:35:15 1.21 *************** *** 2,6 **** item: Global Version=5.0 ! Title=Python 2.0 Release Candidate 1 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 --- 2,6 ---- item: Global Version=5.0 ! Title=Python 2.0 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 *************** *** 65,69 **** item: Set Variable Variable=APPTITLE ! Value=Python 2.0 Release Candidate 1 end item: Set Variable --- 65,69 ---- item: Set Variable Variable=APPTITLE ! Value=Python 2.0 end item: Set Variable *************** *** 511,515 **** Name=Times New Roman Font Style=-24 0 0 0 700 255 0 0 0 3 2 1 18 ! Text=Select ProgMan Group Text French=Sélectionner le groupe du Gestionnaire de programme Text German=Bestimmung der Programm-Managergruppe --- 511,515 ---- Name=Times New Roman Font Style=-24 0 0 0 700 255 0 0 0 3 2 1 18 ! Text=Select Start Menu Group Text French=Sélectionner le groupe du Gestionnaire de programme Text German=Bestimmung der Programm-Managergruppe *************** *** 520,524 **** Rectangle=86 44 256 68 Create Flags=01010000000000000000000000000000 ! Text=Enter the name of the Program Manager group to add %APPTITLE% icons to: Text French=Entrez le nom du groupe du Gestionnaire de programme dans lequel vous souhaitez ajouter les icônes de %APPTITLE% : Text German=Geben Sie den Namen der Programmgruppe ein, der das Symbol %APPTITLE% hinzugefügt werden soll: --- 520,524 ---- Rectangle=86 44 256 68 Create Flags=01010000000000000000000000000000 ! Text=Enter the name of the Start Menu program group to which to add the %APPTITLE% icons: Text French=Entrez le nom du groupe du Gestionnaire de programme dans lequel vous souhaitez ajouter les icônes de %APPTITLE% : Text German=Geben Sie den Namen der Programmgruppe ein, der das Symbol %APPTITLE% hinzugefügt werden soll: *************** *** 606,610 **** Text=You are now ready to install %APPTITLE%. Text= ! Text=Press the Next button to begin the installation or the Back button to reenter the installation information. Text French=Vous ętes maintenant pręt ŕ installer les fichiers %APPTITLE%. Text French= --- 606,610 ---- Text=You are now ready to install %APPTITLE%. Text= ! Text=Click the Next button to begin the installation, or the Back button to change choices made previously. Text French=Vous ętes maintenant pręt ŕ installer les fichiers %APPTITLE%. Text French= *************** *** 1073,1076 **** --- 1073,1077 ---- Source=%_SRC_%\Lib\test\*.xml Destination=%MAINDIR%\Lib\test + Description=Python Test files Flags=0000000000000010 end *************** *** 1078,1081 **** --- 1079,1083 ---- Source=%_SRC_%\Lib\test\*.out Destination=%MAINDIR%\Lib\test + Description=Python Test files Flags=0000000000000010 end *************** *** 1351,1354 **** --- 1353,1357 ---- Source=%_SRC_%\..\tcl\bin\tk8%_TCLMINOR_%.dll Destination=%MAINDIR%\DLLs\tk8%_TCLMINOR_%.dll + Description=Tcl/Tk binaries and libraries Flags=0000000000000010 end *************** *** 1356,1359 **** --- 1359,1363 ---- Source=%_SRC_%\..\tcl\lib\*.* Destination=%MAINDIR%\tcl + Description=Tcl/Tk binaries and libraries Flags=0000000100000010 end From python-dev@python.org Sat Oct 14 11:28:05 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Sat, 14 Oct 2000 03:28:05 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.17,1.18 Message-ID: <200010141028.DAA01339@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv1038 Modified Files: expatreader.py Log Message: Fixed minor problem with reset(). Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** expatreader.py 2000/10/09 16:45:54 1.17 --- expatreader.py 2000/10/14 10:28:01 1.18 *************** *** 70,75 **** def feed(self, data, isFinal = 0): if not self._parsing: - self._parsing = 1 self.reset() self._cont_handler.startDocument() --- 70,75 ---- def feed(self, data, isFinal = 0): if not self._parsing: self.reset() + self._parsing = 1 self._cont_handler.startDocument() *************** *** 118,121 **** --- 118,122 ---- self._parser.ExternalEntityRefHandler = self.external_entity_ref + self._parsing = 0 self._entity_stack = [] From python-dev@python.org Sun Oct 15 20:20:22 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 15 Oct 2000 12:20:22 -0700 Subject: [Python-checkins] CVS: distutils/distutils __init__.py,1.17,1.18 Message-ID: <200010151920.MAA19349@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv19263/distutils Modified Files: __init__.py Log Message: Bump version to 1.0.1. Index: __init__.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/__init__.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** __init__.py 2000/10/03 03:48:43 1.17 --- __init__.py 2000/10/15 19:20:20 1.18 *************** *** 11,13 **** __revision__ = "$Id$" ! __version__ = "1.0" --- 11,13 ---- __revision__ = "$Id$" ! __version__ = "1.0.1" From python-dev@python.org Sun Oct 15 20:20:22 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 15 Oct 2000 12:20:22 -0700 Subject: [Python-checkins] CVS: distutils setup.py,1.26,1.27 Message-ID: <200010151920.MAA19345@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv19263 Modified Files: setup.py Log Message: Bump version to 1.0.1. Index: setup.py =================================================================== RCS file: /cvsroot/python/distutils/setup.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** setup.py 2000/10/03 03:48:43 1.26 --- setup.py 2000/10/15 19:20:19 1.27 *************** *** 12,16 **** setup (name = "Distutils", ! version = "1.0", description = "Python Distribution Utilities", author = "Greg Ward", --- 12,16 ---- setup (name = "Distutils", ! version = "1.0.1", description = "Python Distribution Utilities", author = "Greg Ward", From python-dev@python.org Sun Oct 15 20:21:00 2000 From: python-dev@python.org (Greg Ward) Date: Sun, 15 Oct 2000 12:21:00 -0700 Subject: [Python-checkins] CVS: distutils README.txt,1.22,1.23 CHANGES.txt,1.16,1.17 Message-ID: <200010151921.MAA19813@slayer.i.sourceforge.net> Update of /cvsroot/python/distutils In directory slayer.i.sourceforge.net:/tmp/cvs-serv19703 Modified Files: README.txt CHANGES.txt Log Message: Update for version 1.0.1. Index: README.txt =================================================================== RCS file: /cvsroot/python/distutils/README.txt,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** README.txt 2000/10/03 03:47:46 1.22 --- README.txt 2000/10/15 19:20:56 1.23 *************** *** 1,5 **** Python Distribution Utilities ! release 1.0 ! October 2, 2000 --- 1,5 ---- Python Distribution Utilities ! release 1.0.1 ! October 15, 2000 *************** *** 121,125 **** 2.0b1 0.9.2 2.0b2 0.9.3 ! 2.0 (planned) 1.0 There's generally no need to install the Distutils under Python 1.6/2.0. --- 121,125 ---- 2.0b1 0.9.2 2.0b2 0.9.3 ! 2.0 1.0.1 There's generally no need to install the Distutils under Python 1.6/2.0. Index: CHANGES.txt =================================================================== RCS file: /cvsroot/python/distutils/CHANGES.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** CHANGES.txt 2000/10/03 03:47:46 1.16 --- CHANGES.txt 2000/10/15 19:20:56 1.17 *************** *** 1,2 **** --- 1,15 ---- + Relase 1.0.1 (15 October, 2000): + -------------------------------- + * fixed Windows installer to deal with ZIP files created by the + zipfile module better (Thomas Heller) + + * fixed install command's spurious warnings on Windows (due to + case-sensitive filename comparison) + + * two tweaks to the (experimental, unfinished) config command: + make 'check_lib()' more like AC_CHECK_LIB, and make sure + any command-line options are the right type + + Release 1.0 (2 October, 2000): ------------------------------ From python-dev@python.org Mon Oct 16 16:25:41 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 16 Oct 2000 08:25:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/xml - New directory Message-ID: <200010161525.IAA17544@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/xml In directory slayer.i.sourceforge.net:/tmp/cvs-serv17472/xml Log Message: Directory /cvsroot/python/python/dist/src/Demo/xml added to the repository From python-dev@python.org Mon Oct 16 16:27:08 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 16 Oct 2000 08:27:08 -0700 Subject: [Python-checkins] CVS: python/dist/src/Demo/xml elem_count.py,NONE,1.1 roundtrip.py,NONE,1.1 rss2html.py,NONE,1.1 Message-ID: <200010161527.IAA18605@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Demo/xml In directory slayer.i.sourceforge.net:/tmp/cvs-serv18550 Added Files: elem_count.py roundtrip.py rss2html.py Log Message: Demos of the new XML support from Lars Marius Garshol . --- NEW FILE --- import sys from xml.sax import make_parser, handler class FancyCounter(handler.ContentHandler): def __init__(self): self._elems = 0 self._attrs = 0 self._elem_types = {} self._attr_types = {} def startElement(self, name, attrs): self._elems = self._elems + 1 self._attrs = self._attrs + len(attrs) self._elem_types[name] = self._elem_types.get(name, 0) + 1 for name in attrs.keys(): self._attr_types[name] = self._attr_types.get(name, 0) + 1 def endDocument(self): print "There were", self._elems, "elements." print "There were", self._attrs, "attributes." print "---ELEMENT TYPES" for pair in self._elem_types.items(): print "%20s %d" % pair print "---ATTRIBUTE TYPES" for pair in self._attr_types.items(): print "%20s %d" % pair parser = make_parser() parser.setContentHandler(FancyCounter()) parser.parse(sys.argv[1]) --- NEW FILE --- """ A simple demo that reads in an XML document and spits out an equivalent, but not necessarily identical, document. """ import sys, string from xml.sax import saxutils, handler, make_parser # --- The ContentHandler class ContentGenerator(handler.ContentHandler): def __init__(self, out = sys.stdout): handler.ContentHandler.__init__(self) self._out = out # ContentHandler methods def startDocument(self): self._out.write('\n') def startElement(self, name, attrs): self._out.write('<' + name) for (name, value) in attrs.items(): self._out.write(' %s="%s"' % (name, saxutils.escape(value))) self._out.write('>') def endElement(self, name): self._out.write('' % name) def characters(self, content): self._out.write(saxutils.escape(content)) def ignorableWhitespace(self, content): self._out.write(content) def processingInstruction(self, target, data): self._out.write('' % (target, data)) # --- The main program parser = make_parser() parser.setContentHandler(ContentGenerator()) parser.parse(sys.argv[1]) --- NEW FILE --- import sys from xml.sax import make_parser, handler # --- Templates top = \ """ %s

%s

""" bottom = \ """
Converted to HTML by sax_rss2html.py.
""" # --- The ContentHandler class RSSHandler(handler.ContentHandler): def __init__(self, out = sys.stdout): handler.ContentHandler.__init__(self) self._out = out self._text = "" self._parent = None self._list_started = 0 self._title = None self._link = None self._descr = "" # ContentHandler methods def startElement(self, name, attrs): if name == "channel" or name == "image" or name == "item": self._parent = name self._text = "" def endElement(self, name): if self._parent == "channel": if name == "title": self._out.write(top % (self._text, self._text)) elif name == "description": self._out.write("

%s

\n" % self._text) elif self._parent == "item": if name == "title": self._title = self._text elif name == "link": self._link = self._text elif name == "description": self._descr = self._text elif name == "item": if not self._list_started: self._out.write("
    \n") self._list_started = 1 self._out.write('
  • %s %s\n' % (self._link, self._title, self._descr)) self._title = None self._link = None self._descr = "" if name == "rss": self._out.write(bottom) def characters(self, content): self._text = self._text + content # --- Main program parser = make_parser() parser.setContentHandler(RSSHandler()) parser.parse(sys.argv[1]) From python-dev@python.org Mon Oct 16 16:33:34 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 08:33:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM - New directory Message-ID: <200010161533.IAA22665@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM In directory slayer.i.sourceforge.net:/tmp/cvs-serv22618/RPM Log Message: Directory /cvsroot/python/python/dist/src/Misc/RPM added to the repository From python-dev@python.org Mon Oct 16 16:34:54 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 08:34:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM README,NONE,1.1 beopen-python.spec,NONE,1.1 BeOpen-Python-Setup.patch,NONE,1.1 make-spec.sh,NONE,1.1 Message-ID: <200010161534.IAA23728@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM In directory slayer.i.sourceforge.net:/tmp/cvs-serv23487 Added Files: README beopen-python.spec BeOpen-Python-Setup.patch make-spec.sh Log Message: misc. RPM support files --- NEW FILE --- This directory contains support file used to build RPM releases of Python. beopen-python.spec: Template for the spec file used to build Python. The make-spec.sh program below converts fills in the template with current release information. BeOpen-Python-Setup.patch: This patch modifies Setup.in to include many extension modules that compile cleanly on a generic Linux system. make-spec.sh: Copies the .spec and .patch files into /usr/src/redhat/SPECS and SOURCES respectively. The generated versions of these files have version numbers set from the source tree. Tkinter: The files in this directory are used to package the _tkinter extension module with distutils. The src subdirectory should contain copies of _tkinter.c and tkappinit.c from the Modules directory of the source tree. --- NEW FILE --- %define name BeOpen-Python %define version 2.0 %define release 1 %define __prefix /usr/local Summary: An interpreted, interactive, object-oriented programming language. Name: %{name} Version: %{version} Release: %{release} Copyright: Modified CNRI Open Source License Group: Development/Languages Source: %{name}-%{version}.tar.bz2 Source1: html-%{version}.tar.bz2 Patch0: %{name}-%{version}-Setup.patch BuildRoot: /var/tmp/%{name}-%{version}-root Prefix: %{__prefix} URL: http://www.pythonlabs.com/ Vendor: BeOpen PythonLabs Packager: Jeremy Hylton %description Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++. It is also usable as an extension language for applications that need a programmable interface. Finally, Python is portable: it runs on many brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the Mac. %changelog * Mon Oct 9 2000 Jeremy Hylton - updated for 2.0c1 - build audioop, imageop, and rgbimg extension modules - include xml.parsers subpackage - add test.xml.out to files list * Thu Oct 5 2000 Jeremy Hylton - added bin/python2.0 to files list (suggested by Martin v. Löwis) * Tue Sep 26 2000 Jeremy Hylton - updated for release 1 of 2.0b2 - use .bz2 version of Python source * Tue Sep 12 2000 Jeremy Hylton - Version 2 of 2.0b1 - Make the package relocatable. Thanks to Suchandra Thapa. - Exclude Tkinter from main RPM. If it is in a separate RPM, it is easier to track Tk releases. %prep %setup -n Python-%{version} %patch0 %setup -D -T -a 1 -n Python-%{version} # This command drops the HTML files in the top-level build directory. # That's not perfect, but it will do for now. %build ./configure make %install [ -d $RPM_BUILD_ROOT ] && rm -fr $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{__prefix} make prefix=$RPM_BUILD_ROOT%{__prefix} install %clean rm -fr $RPM_BUILD_ROOT %files %defattr(-, root, root) %{__prefix}/bin/python %{__prefix}/bin/python2.0 %{__prefix}/man/man1/python.1 %doc Misc/README Misc/HYPE Misc/cheatsheet Misc/unicode.txt Misc/Porting %doc LICENSE Misc/ACKS Misc/BLURB.* Misc/HISTORY Misc/NEWS %doc index.html modindex.html api dist doc ext inst lib mac ref tut icons %dir %{__prefix}/include/python2.0 %{__prefix}/include/python2.0/*.h %dir %{__prefix}/lib/python2.0/ %{__prefix}/lib/python2.0/*.py* %{__prefix}/lib/python2.0/pdb.doc %{__prefix}/lib/python2.0/profile.doc %dir %{__prefix}/lib/python2.0/config %{__prefix}/lib/python2.0/config/Makefile %{__prefix}/lib/python2.0/config/Makefile.pre.in %{__prefix}/lib/python2.0/config/Setup %{__prefix}/lib/python2.0/config/Setup.config %{__prefix}/lib/python2.0/config/Setup.local %{__prefix}/lib/python2.0/config/config.c %{__prefix}/lib/python2.0/config/config.c.in %{__prefix}/lib/python2.0/config/install-sh %{__prefix}/lib/python2.0/config/libpython2.0.a %{__prefix}/lib/python2.0/config/makesetup %{__prefix}/lib/python2.0/config/python.o %dir %{__prefix}/lib/python2.0/curses %{__prefix}/lib/python2.0/curses/*.py* %dir %{__prefix}/lib/python2.0/distutils %{__prefix}/lib/python2.0/distutils/*.py* %{__prefix}/lib/python2.0/distutils/README %dir %{__prefix}/lib/python2.0/distutils/command %{__prefix}/lib/python2.0/distutils/command/*.py* %{__prefix}/lib/python2.0/distutils/command/command_template %dir %{__prefix}/lib/python2.0/encodings %{__prefix}/lib/python2.0/encodings/*.py* %dir %{__prefix}/lib/python2.0/lib-dynload %dir %{__prefix}/lib/python2.0/lib-tk %{__prefix}/lib/python2.0/lib-tk/*.py* %{__prefix}/lib/python2.0/lib-dynload/_codecsmodule.so %{__prefix}/lib/python2.0/lib-dynload/_cursesmodule.so %{__prefix}/lib/python2.0/lib-dynload/_localemodule.so %{__prefix}/lib/python2.0/lib-dynload/arraymodule.so %{__prefix}/lib/python2.0/lib-dynload/audioop.so %{__prefix}/lib/python2.0/lib-dynload/binascii.so %{__prefix}/lib/python2.0/lib-dynload/cPickle.so %{__prefix}/lib/python2.0/lib-dynload/cStringIO.so %{__prefix}/lib/python2.0/lib-dynload/cmathmodule.so %{__prefix}/lib/python2.0/lib-dynload/errnomodule.so %{__prefix}/lib/python2.0/lib-dynload/fcntlmodule.so %{__prefix}/lib/python2.0/lib-dynload/gdbmmodule.so %{__prefix}/lib/python2.0/lib-dynload/grpmodule.so %{__prefix}/lib/python2.0/lib-dynload/imageop.so %{__prefix}/lib/python2.0/lib-dynload/linuxaudiodev.so %{__prefix}/lib/python2.0/lib-dynload/mathmodule.so %{__prefix}/lib/python2.0/lib-dynload/md5module.so %{__prefix}/lib/python2.0/lib-dynload/mmapmodule.so %{__prefix}/lib/python2.0/lib-dynload/newmodule.so %{__prefix}/lib/python2.0/lib-dynload/operator.so %{__prefix}/lib/python2.0/lib-dynload/parsermodule.so %{__prefix}/lib/python2.0/lib-dynload/pwdmodule.so %{__prefix}/lib/python2.0/lib-dynload/pyexpat.so %{__prefix}/lib/python2.0/lib-dynload/readline.so %{__prefix}/lib/python2.0/lib-dynload/resource.so %{__prefix}/lib/python2.0/lib-dynload/rgbimgmodule.so %{__prefix}/lib/python2.0/lib-dynload/rotormodule.so %{__prefix}/lib/python2.0/lib-dynload/selectmodule.so %{__prefix}/lib/python2.0/lib-dynload/shamodule.so %{__prefix}/lib/python2.0/lib-dynload/_socketmodule.so %{__prefix}/lib/python2.0/lib-dynload/stropmodule.so %{__prefix}/lib/python2.0/lib-dynload/structmodule.so %{__prefix}/lib/python2.0/lib-dynload/syslogmodule.so %{__prefix}/lib/python2.0/lib-dynload/termios.so %{__prefix}/lib/python2.0/lib-dynload/timemodule.so %{__prefix}/lib/python2.0/lib-dynload/ucnhash.so %{__prefix}/lib/python2.0/lib-dynload/unicodedata.so %{__prefix}/lib/python2.0/lib-dynload/zlibmodule.so %dir %{__prefix}/lib/python2.0/lib-old %{__prefix}/lib/python2.0/lib-old/*.py* %dir %{__prefix}/lib/python2.0/plat-linux2 %{__prefix}/lib/python2.0/plat-linux2/*.py* %{__prefix}/lib/python2.0/plat-linux2/regen %dir %{__prefix}/lib/python2.0/site-packages %{__prefix}/lib/python2.0/site-packages/README %dir %{__prefix}/lib/python2.0/test %{__prefix}/lib/python2.0/test/*.py* %{__prefix}/lib/python2.0/test/README %{__prefix}/lib/python2.0/test/audiotest.au %{__prefix}/lib/python2.0/test/greyrgb.uue %{__prefix}/lib/python2.0/test/test.xml %{__prefix}/lib/python2.0/test/test.xml.out %{__prefix}/lib/python2.0/test/testimg.uue %{__prefix}/lib/python2.0/test/testimgr.uue %{__prefix}/lib/python2.0/test/testrgb.uue %dir %{__prefix}/lib/python2.0/test/output %{__prefix}/lib/python2.0/test/output/test_* %dir %{__prefix}/lib/python2.0/xml %{__prefix}/lib/python2.0/xml/*.py* %dir %{__prefix}/lib/python2.0/xml/dom %{__prefix}/lib/python2.0/xml/dom/*.py* %dir %{__prefix}/lib/python2.0/xml/parsers %{__prefix}/lib/python2.0/xml/parsers/*.py* %dir %{__prefix}/lib/python2.0/xml/sax %{__prefix}/lib/python2.0/xml/sax/*.py* --- NEW FILE --- *** /src/python/dist/src/Modules/Setup.in Mon Oct 9 10:40:21 2000 --- Modules/Setup.in Mon Oct 9 16:27:33 2000 *************** *** 111,117 **** # modules are to be built as shared libraries (see above for more # detail; also note that *static* reverses this effect): ! #*shared* # GNU readline. Unlike previous Python incarnations, GNU readline is # now incorporated in an optional module, configured in the Setup file --- 111,117 ---- # modules are to be built as shared libraries (see above for more # detail; also note that *static* reverses this effect): ! *shared* # GNU readline. Unlike previous Python incarnations, GNU readline is # now incorporated in an optional module, configured in the Setup file *************** *** 121,127 **** # it, depending on your system -- see the GNU readline instructions. # It's okay for this to be a shared library, too. ! #readline readline.c -lreadline -ltermcap # Modules that should always be present (non UNIX dependent): --- 121,127 ---- # it, depending on your system -- see the GNU readline instructions. # It's okay for this to be a shared library, too. ! readline readline.c -lreadline -ltermcap # Modules that should always be present (non UNIX dependent): *************** *** 170,187 **** # Some more UNIX dependent modules -- off by default, since these # are not supported by all UNIX systems: ! #nis nismodule.c -lnsl # Sun yellow pages -- not everywhere ! #termios termios.c # Steen Lumholt's termios module ! #resource resource.c # Jeremy Hylton's rlimit interface # Multimedia modules -- off by default. # These don't work for 64-bit platforms!!! # These represent audio samples or images as strings: ! #audioop audioop.c # Operations on audio samples ! #imageop imageop.c # Operations on images ! #rgbimg rgbimgmodule.c # Read SGI RGB image files (but coded portably) # The md5 module implements the RSA Data Security, Inc. MD5 --- 170,187 ---- # Some more UNIX dependent modules -- off by default, since these # are not supported by all UNIX systems: ! nis nismodule.c -lnsl # Sun yellow pages -- not everywhere ! termios termios.c # Steen Lumholt's termios module ! resource resource.c # Jeremy Hylton's rlimit interface # Multimedia modules -- off by default. # These don't work for 64-bit platforms!!! # These represent audio samples or images as strings: ! audioop audioop.c # Operations on audio samples ! imageop imageop.c # Operations on images ! rgbimg rgbimgmodule.c # Read SGI RGB image files (but coded portably) # The md5 module implements the RSA Data Security, Inc. MD5 *************** *** 255,261 **** # Linux specific modules -- off by default: ! #linuxaudiodev linuxaudiodev.c # George Neville-Neil's timing module: --- 255,261 ---- # Linux specific modules -- off by default: ! linuxaudiodev linuxaudiodev.c # George Neville-Neil's timing module: *************** *** 311,317 **** # Lance Ellinghaus's modules: rotor rotormodule.c # enigma-inspired encryption ! #syslog syslogmodule.c # syslog daemon interface # Curses support, requring the System V version of curses, often --- 311,317 ---- # Lance Ellinghaus's modules: rotor rotormodule.c # enigma-inspired encryption ! syslog syslogmodule.c # syslog daemon interface # Curses support, requring the System V version of curses, often *************** *** 319,325 **** # instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include # -L/usr/5lib before -lcurses). ! #_curses _cursesmodule.c -lcurses -ltermcap --- 319,325 ---- # instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include # -L/usr/5lib before -lcurses). ! _curses _cursesmodule.c -lcurses -ltermcap *************** *** 349,355 **** # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: ! #gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm # Berkeley DB interface. --- 349,355 ---- # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: ! gdbm gdbmmodule.c -I/usr/include -L/usr/lib -lgdbm # Berkeley DB interface. *************** *** 406,412 **** # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.cdrom.com/pub/infozip/zlib/ ! #zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz # Interface to the Expat XML parser # --- 406,412 ---- # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.cdrom.com/pub/infozip/zlib/ ! zlib zlibmodule.c -I/usr/include -L/usr/lib -lz # Interface to the Expat XML parser # *************** *** 427,434 **** # # ar cr libexpat.a xmltok/*.o xmlparse/*.o # ! #EXPAT_DIR=/usr/local/src/expat ! #pyexpat pyexpat.c -I$(EXPAT_DIR)/xmlparse -L$(EXPAT_DIR) -lexpat # Example -- included for reference only: --- 427,433 ---- # # ar cr libexpat.a xmltok/*.o xmlparse/*.o # ! pyexpat pyexpat.c -I/usr/local/include/xmlparse -L/usr/local/lib -lexpat # Example -- included for reference only: --- NEW FILE --- #! /bin/bash RPM_TOPDIR=/usr/src/redhat PY_VERSION=`perl -ne 'print "$1\n" if (/PY_VERSION\s*\"(.*)\"/o);' ../../Include/patchlevel.h` export PY_VERSION cp beopen-python.spec $RPM_TOPDIR/SPECS/beopen-python-$PY_VERSION.spec cp BeOpen-Python-Setup.patch $RPM_TOPDIR/SOURCES/BeOpen-Python-$PY_VERSION-Setup.patch perl -pi -e "s/(%define version).*/\$1 $PY_VERSION/;" $RPM_TOPDIR/SPECS/beopen-python-$PY_VERSION.spec From python-dev@python.org Mon Oct 16 16:35:40 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 08:35:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM/Tkinter - New directory Message-ID: <200010161535.IAA24136@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM/Tkinter In directory slayer.i.sourceforge.net:/tmp/cvs-serv24095/Tkinter Log Message: Directory /cvsroot/python/python/dist/src/Misc/RPM/Tkinter added to the repository From python-dev@python.org Mon Oct 16 16:36:28 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 08:36:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM/Tkinter setup.py,NONE,1.1 setup.cfg,NONE,1.1 Message-ID: <200010161536.IAA24793@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM/Tkinter In directory slayer.i.sourceforge.net:/tmp/cvs-serv24645 Added Files: setup.py setup.cfg Log Message: distutils setup files for Tkinter --- NEW FILE --- #! /usr/bin/env python """Tkinter is the Python interface to the Tk GUI toolkit. Tk offers native look and feel on most major platforms, including Unix, Windows, and Macintosh. The Tkinter-2.0 RPM contains the Python C extension module for Python 2.0. The Python source files are distributed with the main Python distribution.""" from distutils.core import setup, Extension setup(name="Tkinter-2.0", version="8.0", description="Python interface to Tk GUI toolkit", author="Python development team", author_email="pythoneers@beopen.com", url="http://www.pythonlabs.com/products/python2.0/", licence="Modified CNRI Open Source License", ext_modules=[Extension("_tkinter", ["src/_tkinter.c", "src/tkappinit.c"], define_macros=[('WITH_APPINIT', None)], library_dirs=["/usr/X11R6/lib"], libraries=["tk8.0", "tcl8.0", "X11"], )], long_description = __doc__ ) --- NEW FILE --- [bdist_rpm] packager = Jeremy Hylton vendor = BeOpen PythonLabs release = 2 From python-dev@python.org Mon Oct 16 16:36:41 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 08:36:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM/Tkinter/src - New directory Message-ID: <200010161536.IAA24976@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM/Tkinter/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv24926/src Log Message: Directory /cvsroot/python/python/dist/src/Misc/RPM/Tkinter/src added to the repository From python-dev@python.org Mon Oct 16 16:47:53 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 16 Oct 2000 08:47:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib gettext.py,1.8,1.9 Message-ID: <200010161547.IAA00993@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv934 Modified Files: gettext.py Log Message: find(): Application of (slightly modified) SF patch #101928 by Ulf Betlehem, verified by Peter Funk. Fixes preservation of language search order lost due to use of dictionary keys instead of a list. Closes SF bug #116964. Index: gettext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/gettext.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** gettext.py 2000/10/05 18:48:12 1.8 --- gettext.py 2000/10/16 15:47:50 1.9 *************** *** 209,219 **** languages.append('C') # now normalize and expand the languages ! langdict = {} for lang in languages: for nelang in _expand_lang(lang): ! langdict[nelang] = nelang ! languages = langdict.keys() # select a language ! for lang in languages: if lang == 'C': break --- 209,219 ---- languages.append('C') # now normalize and expand the languages ! nelangs = [] for lang in languages: for nelang in _expand_lang(lang): ! if nelang not in nelangs: ! nelangs.append(nelang) # select a language ! for lang in nelangs: if lang == 'C': break From python-dev@python.org Mon Oct 16 17:59:17 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 09:59:17 -0700 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.172,1.173 configure,1.164,1.165 Message-ID: <200010161659.JAA26312@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv25935 Modified Files: configure.in configure Log Message: Patch #101936: Auto-detect DEC threads (which need "-threads" argument) by Thomas Wouters Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.172 retrieving revision 1.173 diff -C2 -r1.172 -r1.173 *** configure.in 2000/10/12 17:11:38 1.172 --- configure.in 2000/10/16 16:59:12 1.173 *************** *** 806,809 **** --- 806,818 ---- LIBOBJS="$LIBOBJS thread.o" USE_THREAD_MODULE=""]) + + if test "$USE_THREAD_MODULE" != "#" + then + # If the above checks didn't disable threads, (at least) OSF1 + # needs this '-threads' argument during linking. + case $ac_sys_system in + OSF1) LDLAST=-threads;; + esac + fi fi Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.164 retrieving revision 1.165 diff -C2 -r1.164 -r1.165 *** configure 2000/10/12 17:11:38 1.164 --- configure 2000/10/16 16:59:12 1.165 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.171 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...4098 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) --- 6014,6018 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6335,6338 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 --- 6318,6321 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 From python-dev@python.org Mon Oct 16 18:33:53 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 10:33:53 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 test_cop.py,NONE,1.1 stringio.py,1.6,1.7 test_fcn.py,1.8,1.9 test_gra.py,1.5,1.6 test_mat.py,1.4,1.5 test_min.py,1.3,1.4 test_str.py,1.12,1.13 test_unp.py,1.3,1.4 test_url.py,1.3,1.4 test_win.py,1.5,1.6 Message-ID: <200010161733.KAA19541@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv18471 Modified Files: stringio.py test_fcn.py test_gra.py test_mat.py test_min.py test_str.py test_unp.py test_url.py test_win.py Added Files: test_cop.py Log Message: the usual --- NEW FILE --- import copy_reg class C: pass try: copy_reg.pickle(C, None, None) except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch expected TypeError when registering a class type." print try: copy_reg.pickle(type(1), "not a callable") except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch TypeError " \ "when registering a non-callable reduction function." print try: copy_reg.pickle(type(1), int, "not a callable") except TypeError, e: print "Caught expected TypeError:" print e else: print "Failed to catch TypeError " \ "when registering a non-callable constructor." Index: stringio.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/stringio.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** stringio.py 2000/10/09 22:14:43 1.6 --- stringio.py 2000/10/16 17:33:50 1.7 *************** *** 130,133 **** --- 130,135 ---- self.buflist = [self.buf[:self.pos], s, self.buf[newpos:]] self.buf = '' + if newpos > self.len: + self.len = newpos else: self.buflist.append(s) Index: test_fcn.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_fcn.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** test_fcn.py 2000/09/26 17:32:27 1.8 --- test_fcn.py 2000/10/16 17:33:50 1.9 *************** *** 17,21 **** print 'Status from fnctl with O_NONBLOCK: ', rv ! if sys.platform in ('netbsd1', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4', --- 17,21 ---- print 'Status from fnctl with O_NONBLOCK: ', rv ! if sys.platform in ('netbsd1', 'Darwin1.2', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4', Index: test_gra.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_gra.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_gra.py 2000/09/26 17:32:27 1.5 --- test_gra.py 2000/10/16 17:33:50 1.6 *************** *** 269,276 **** print >> sys.stdout, 0 or 1 ! # test print >> None class Gulp: def write(self, msg): pass def driver(): oldstdout = sys.stdout --- 269,284 ---- print >> sys.stdout, 0 or 1 ! # test printing to an instance class Gulp: def write(self, msg): pass + gulp = Gulp() + print >> gulp, 1, 2, 3 + print >> gulp, 1, 2, 3, + print >> gulp + print >> gulp, 0 or 1, 0 or 1, + print >> gulp, 0 or 1 + + # test print >> None def driver(): oldstdout = sys.stdout Index: test_mat.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_mat.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_mat.py 2000/09/01 19:25:51 1.4 --- test_mat.py 2000/10/16 17:33:50 1.5 *************** *** 153,154 **** --- 153,185 ---- testit('tanh(0)', math.tanh(0), 0) testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) + + print 'exceptions' # oooooh, *this* is a x-platform gamble! good luck + + try: + x = math.exp(-1000000000) + except: + # mathmodule.c is failing to weed out underflows from libm, or + # we've got an fp format with huge dynamic range + raise TestFailed("underflowing exp() should not have rasied an exception") + if x != 0: + raise TestFailed("underflowing exp() should have returned 0") + + # If this fails, probably using a strict IEEE-754 conforming libm, and x + # is +Inf afterwards. But Python wants overflows detected by default. + try: + x = math.exp(1000000000) + except OverflowError: + pass + else: + raise TestFailed("overflowing exp() didn't trigger OverflowError") + + # If this fails, it could be a puzzle. One odd possibility is that + # mathmodule.c's CHECK() macro is getting confused while comparing + # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE + # as a result (and so raising OverflowError instead). + try: + x = math.sqrt(-1.0) + except ValueError: + pass + else: + raise TestFailed("sqrt(-1) didn't raise ValueError") Index: test_min.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_min.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_min.py 2000/10/09 22:14:43 1.3 --- test_min.py 2000/10/16 17:33:50 1.4 *************** *** 16,20 **** del base ! def confirm( test, testname="Test" ): if test: print "Passed " + testname --- 16,20 ---- del base ! def confirm(test, testname = "Test"): if test: print "Passed " + testname *************** *** 23,43 **** raise Exception ! Node._debug=1 def testParseFromFile(): from StringIO import StringIO ! dom=parse( StringIO( open( tstfile ).read() ) ) dom.unlink() confirm(isinstance(dom,Document)) ! def testGetElementsByTagName( ): ! dom=parse( tstfile ) ! confirm( dom.getElementsByTagName( "LI" )==\ ! dom.documentElement.getElementsByTagName( "LI" ) ) dom.unlink() ! def testInsertBefore( ): ! dom=parse( tstfile ) ! docel=dom.documentElement #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[1]) --- 23,43 ---- raise Exception ! Node._debug = 1 def testParseFromFile(): from StringIO import StringIO ! dom = parse(StringIO(open(tstfile).read())) dom.unlink() confirm(isinstance(dom,Document)) ! def testGetElementsByTagName(): ! dom = parse(tstfile) ! confirm(dom.getElementsByTagName("LI") == \ ! dom.documentElement.getElementsByTagName("LI")) dom.unlink() ! def testInsertBefore(): ! dom = parse(tstfile) ! docel = dom.documentElement #docel.insertBefore( dom.createProcessingInstruction("a", "b"), # docel.childNodes[1]) *************** *** 46,170 **** # docel.childNodes[0]) ! #confirm( docel.childNodes[0].tet=="a" ) ! #confirm( docel.childNodes[2].tet=="a" ) dom.unlink() def testAppendChild(): ! dom=parse( tstfile ) ! dom.documentElement.appendChild( dom.createComment( u"Hello" )) ! confirm( dom.documentElement.childNodes[-1].nodeName=="#comment" ) ! confirm( dom.documentElement.childNodes[-1].data=="Hello" ) dom.unlink() def testNonZero(): ! dom=parse( tstfile ) ! confirm( dom )# should not be zero ! dom.appendChild( dom.createComment( "foo" ) ) ! confirm( not dom.childNodes[-1].childNodes ) dom.unlink() def testUnlink(): ! dom=parse( tstfile ) dom.unlink() def testElement(): ! dom=Document() ! dom.appendChild( dom.createElement( "abc" ) ) ! confirm( dom.documentElement ) dom.unlink() def testAAA(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam2" ) dom.unlink() def testAAB(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam" ) ! el.setAttribute( "spam", "jam2" ) dom.unlink() def testAddAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! child.setAttribute( "def", "ghi" ) ! confirm( child.getAttribute( "def" )=="ghi" ) ! confirm( child.attributes["def"].value=="ghi" ) ! child.setAttribute( "jkl", "mno" ) ! confirm( child.getAttribute( "jkl" )=="mno" ) ! confirm( child.attributes["jkl"].value=="mno" ) ! confirm( len( child.attributes )==2 ) ! child.setAttribute( "def", "newval" ) ! confirm( child.getAttribute( "def" )=="newval" ) ! confirm( child.attributes["def"].value=="newval" ) ! confirm( len( child.attributes )==2 ) dom.unlink() def testDeleteAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! confirm( len( child.attributes)==0 ) ! child.setAttribute( "def", "ghi" ) ! confirm( len( child.attributes)==1 ) del child.attributes["def"] ! confirm( len( child.attributes)==0 ) dom.unlink() def testRemoveAttr(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "abc" ) ) ! child.setAttribute( "def", "ghi" ) ! confirm( len( child.attributes)==1 ) ! child.removeAttribute("def" ) ! confirm( len( child.attributes)==0 ) dom.unlink() def testRemoveAttrNS(): ! dom=Document() ! child=dom.appendChild( ! dom.createElementNS( "http://www.python.org", "python:abc" ) ) ! child.setAttributeNS( "http://www.w3.org", "xmlns:python", ! "http://www.python.org" ) ! child.setAttributeNS( "http://www.python.org", "python:abcattr", "foo" ) ! confirm( len( child.attributes )==2 ) ! child.removeAttributeNS( "http://www.python.org", "abcattr" ) ! confirm( len( child.attributes )==1 ) dom.unlink() def testRemoveAttributeNode(): ! dom=Document() ! child=dom.appendChild( dom.createElement( "foo" ) ) ! child.setAttribute( "spam", "jam" ) ! confirm( len( child.attributes )==1 ) ! node=child.getAttributeNode( "spam" ) ! child.removeAttributeNode( node ) ! confirm( len( child.attributes )==0 ) dom.unlink() def testChangeAttr(): ! dom=parseString( "" ) ! el=dom.documentElement ! el.setAttribute( "spam", "jam" ) ! confirm( len( el.attributes )==1 ) ! el.setAttribute( "spam", "bam" ) ! confirm( len( el.attributes )==1 ) ! el.attributes["spam"]="ham" ! confirm( len( el.attributes )==1 ) ! el.setAttribute( "spam2", "bam" ) ! confirm( len( el.attributes )==2 ) ! el.attributes[ "spam2"]= "bam2" ! confirm( len( el.attributes )==2 ) dom.unlink() --- 46,170 ---- # docel.childNodes[0]) ! #confirm( docel.childNodes[0].tet == "a") ! #confirm( docel.childNodes[2].tet == "a") dom.unlink() def testAppendChild(): ! dom = parse(tstfile) ! dom.documentElement.appendChild(dom.createComment(u"Hello")) ! confirm(dom.documentElement.childNodes[-1].nodeName == "#comment") ! confirm(dom.documentElement.childNodes[-1].data == "Hello") dom.unlink() def testNonZero(): ! dom = parse(tstfile) ! confirm(dom)# should not be zero ! dom.appendChild(dom.createComment("foo")) ! confirm(not dom.childNodes[-1].childNodes) dom.unlink() def testUnlink(): ! dom = parse(tstfile) dom.unlink() def testElement(): ! dom = Document() ! dom.appendChild(dom.createElement("abc")) ! confirm(dom.documentElement) dom.unlink() def testAAA(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam2") dom.unlink() def testAAB(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam") ! el.setAttribute("spam", "jam2") dom.unlink() def testAddAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! child.setAttribute("def", "ghi") ! confirm(child.getAttribute("def") == "ghi") ! confirm(child.attributes["def"].value == "ghi") ! child.setAttribute("jkl", "mno") ! confirm(child.getAttribute("jkl") == "mno") ! confirm(child.attributes["jkl"].value == "mno") ! confirm(len(child.attributes) == 2) ! child.setAttribute("def", "newval") ! confirm(child.getAttribute("def") == "newval") ! confirm(child.attributes["def"].value == "newval") ! confirm(len(child.attributes) == 2) dom.unlink() def testDeleteAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! confirm(len(child.attributes) == 0) ! child.setAttribute("def", "ghi") ! confirm(len(child.attributes) == 1) del child.attributes["def"] ! confirm(len(child.attributes) == 0) dom.unlink() def testRemoveAttr(): ! dom = Document() ! child = dom.appendChild(dom.createElement("abc")) ! child.setAttribute("def", "ghi") ! confirm(len(child.attributes) == 1) ! child.removeAttribute("def") ! confirm(len(child.attributes) == 0) dom.unlink() def testRemoveAttrNS(): ! dom = Document() ! child = dom.appendChild( ! dom.createElementNS("http://www.python.org", "python:abc")) ! child.setAttributeNS("http://www.w3.org", "xmlns:python", ! "http://www.python.org") ! child.setAttributeNS("http://www.python.org", "python:abcattr", "foo") ! confirm(len(child.attributes) == 2) ! child.removeAttributeNS("http://www.python.org", "abcattr") ! confirm(len(child.attributes) == 1) dom.unlink() def testRemoveAttributeNode(): ! dom = Document() ! child = dom.appendChild(dom.createElement("foo")) ! child.setAttribute("spam", "jam") ! confirm(len(child.attributes) == 1) ! node = child.getAttributeNode("spam") ! child.removeAttributeNode(node) ! confirm(len(child.attributes) == 0) dom.unlink() def testChangeAttr(): ! dom = parseString("") ! el = dom.documentElement ! el.setAttribute("spam", "jam") ! confirm(len(el.attributes) == 1) ! el.setAttribute("spam", "bam") ! confirm(len(el.attributes) == 1) ! el.attributes["spam"] = "ham" ! confirm(len(el.attributes) == 1) ! el.setAttribute("spam2", "bam") ! confirm(len(el.attributes) == 2) ! el.attributes[ "spam2"] = "bam2" ! confirm(len(el.attributes) == 2) dom.unlink() *************** *** 187,225 **** def testElementReprAndStr(): ! dom=Document() ! el=dom.appendChild( dom.createElement( "abc" ) ) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicode(): ! dom=Document() ! el=dom.appendChild( dom.createElement( u"abc" ) ) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicodeNS(): ! dom=Document() ! el=dom.appendChild( ! dom.createElementNS( u"http://www.slashdot.org", u"slash:abc" )) ! string1=repr( el ) ! string2=str( el ) ! confirm( string1==string2 ) ! confirm( string1.find("slash:abc" )!=-1 ) dom.unlink() ! confirm( len( Node.allnodes )==0 ) def testAttributeRepr(): ! dom=Document() ! el=dom.appendChild( dom.createElement( u"abc" ) ) ! node=el.setAttribute( "abc", "def" ) ! confirm( str( node ) == repr( node ) ) dom.unlink() ! confirm( len( Node.allnodes )==0 ) def testTextNodeRepr(): pass --- 187,225 ---- def testElementReprAndStr(): ! dom = Document() ! el = dom.appendChild(dom.createElement("abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicode(): ! dom = Document() ! el = dom.appendChild(dom.createElement(u"abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) dom.unlink() # commented out until Fredrick's fix is checked in def _testElementReprAndStrUnicodeNS(): ! dom = Document() ! el = dom.appendChild( ! dom.createElementNS(u"http://www.slashdot.org", u"slash:abc")) ! string1 = repr(el) ! string2 = str(el) ! confirm(string1 == string2) ! confirm(string1.find("slash:abc") != -1) dom.unlink() ! confirm(len(Node.allnodes) == 0) def testAttributeRepr(): ! dom = Document() ! el = dom.appendChild(dom.createElement(u"abc")) ! node = el.setAttribute("abc", "def") ! confirm(str(node) == repr(node)) dom.unlink() ! confirm(len(Node.allnodes) == 0) def testTextNodeRepr(): pass *************** *** 231,235 **** dom.unlink() confirm(str == domstr) ! confirm( len( Node.allnodes )==0 ) def testProcessingInstruction(): pass --- 231,235 ---- dom.unlink() confirm(str == domstr) ! confirm(len(Node.allnodes) == 0) def testProcessingInstruction(): pass *************** *** 309,321 **** def testClonePIDeep(): pass ! names=globals().keys() names.sort() ! works=1 for name in names: ! if name.startswith( "test" ): ! func=globals()[name] try: func() --- 309,387 ---- def testClonePIDeep(): pass + def testSiblings(): + doc = parseString("text?") + root = doc.documentElement + (pi, text, elm) = root.childNodes + + confirm(pi.nextSibling is text and + pi.previousSibling is None and + text.nextSibling is elm and + text.previousSibling is pi and + elm.nextSibling is None and + elm.previousSibling is text, "testSiblings") + + doc.unlink() + + def testParents(): + doc = parseString("") + root = doc.documentElement + elm1 = root.childNodes[0] + (elm2a, elm2b) = elm1.childNodes + elm3 = elm2b.childNodes[0] + + confirm(root.parentNode is doc and + elm1.parentNode is root and + elm2a.parentNode is elm1 and + elm2b.parentNode is elm1 and + elm3.parentNode is elm2b, "testParents") + + doc.unlink() + + def testSAX2DOM(): + from xml.dom import pulldom + + sax2dom = pulldom.SAX2DOM() + sax2dom.startDocument() + sax2dom.startElement("doc", {}) + sax2dom.characters("text") + sax2dom.startElement("subelm", {}) + sax2dom.characters("text") + sax2dom.endElement("subelm") + sax2dom.characters("text") + sax2dom.endElement("doc") + sax2dom.endDocument() + + doc = sax2dom.document + root = doc.documentElement + (text1, elm1, text2) = root.childNodes + text3 = elm1.childNodes[0] + + confirm(text1.previousSibling is None and + text1.nextSibling is elm1 and + elm1.previousSibling is text1 and + elm1.nextSibling is text2 and + text2.previousSibling is elm1 and + text2.nextSibling is None and + text3.previousSibling is None and + text3.nextSibling is None, "testSAX2DOM - siblings") + + confirm(root.parentNode is doc and + text1.parentNode is root and + elm1.parentNode is root and + text2.parentNode is root and + text3.parentNode is elm1, "testSAX2DOM - parents") + + doc.unlink() ! # --- MAIN PROGRAM ! ! names = globals().keys() names.sort() ! works = 1 for name in names: ! if name.startswith("test"): ! func = globals()[name] try: func() *************** *** 323,327 **** confirm(len(Node.allnodes) == 0, "assertion: len(Node.allnodes) == 0") ! if len( Node.allnodes ): print "Garbage left over:" if verbose: --- 389,393 ---- confirm(len(Node.allnodes) == 0, "assertion: len(Node.allnodes) == 0") ! if len(Node.allnodes): print "Garbage left over:" if verbose: *************** *** 331,341 **** # are needed print len(Node.allnodes) ! Node.allnodes={} ! except Exception, e : ! works=0 print "Test Failed: ", name ! apply( traceback.print_exception, sys.exc_info() ) print `e` ! Node.allnodes={} if works: --- 397,407 ---- # are needed print len(Node.allnodes) ! Node.allnodes = {} ! except Exception, e: ! works = 0 print "Test Failed: ", name ! traceback.print_exception(*sys.exc_info()) print `e` ! Node.allnodes = {} if works: Index: test_str.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_str.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** test_str.py 2000/10/09 22:14:43 1.12 --- test_str.py 2000/10/16 17:33:50 1.13 *************** *** 1,134 **** ! #! /usr/bin/env python ! # Sanity checker for time.strftime ! ! import time, calendar, sys, string, os, re ! from test_support import verbose ! ! def main(): ! global verbose ! now = time.time() ! strftest(now) ! verbose = 0 ! # Try a bunch of dates and times, chosen to vary through time of ! # day and daylight saving time ! for j in range(-5, 5): ! for i in range(25): ! strftest(now + (i + j*100)*23*3603) ! ! def strftest(now): ! if verbose: ! print "strftime test for", time.ctime(now) ! nowsecs = str(long(now))[:-1] ! gmt = time.gmtime(now) ! now = time.localtime(now) ! ! if now[3] < 12: ampm='(AM|am)' ! else: ampm='(PM|pm)' ! ! jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) ! try: ! if now[8]: tz = time.tzname[1] ! else: tz = time.tzname[0] ! except AttributeError: ! tz = '' ! ! if now[3] > 12: clock12 = now[3] - 12 ! elif now[3] > 0: clock12 = now[3] ! else: clock12 = 12 ! ! expectations = ( ! ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ! ('%A', calendar.day_name[now[6]], 'full weekday name'), ! ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ! ('%B', calendar.month_name[now[1]], 'full month name'), ! # %c see below ! ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ! ('%H', '%02d' % now[3], 'hour (00-23)'), ! ('%I', '%02d' % clock12, 'hour (01-12)'), ! ('%j', '%03d' % now[7], 'julian day (001-366)'), ! ('%m', '%02d' % now[1], 'month as number (01-12)'), ! ('%M', '%02d' % now[4], 'minute, (00-59)'), ! ('%p', ampm, 'AM or PM as appropriate'), ! ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ! ('%U', '%02d' % ((now[7] + jan1[6])/7), ! 'week number of the year (Sun 1st)'), ! ('%w', '0?%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ! ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), ! 'week number of the year (Mon 1st)'), ! # %x see below ! ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ! ('%y', '%02d' % (now[0]%100), 'year without century'), ! ('%Y', '%d' % now[0], 'year with century'), ! # %Z see below ! ('%%', '%', 'single percent sign'), ! ) ! ! nonstandard_expectations = ( ! # These are standard but don't have predictable output ! ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ! ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), ! '%m/%d/%y %H:%M:%S'), ! ('%Z', '%s' % tz, 'time zone name'), ! ! # These are some platform specific extensions ! ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ! ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ! ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ! ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ! ('%n', '\n', 'newline character'), ! ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), ! '%I:%M:%S %p'), ! ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ! ('%s', nowsecs, 'seconds since the Epoch in UCT'), ! ('%t', '\t', 'tab character'), ! ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ! ('%3y', '%03d' % (now[0]%100), ! 'year without century rendered using fieldwidth'), ! ) ! ! if verbose: ! print "Strftime test, platform: %s, Python version: %s" % \ ! (sys.platform, string.split(sys.version)[0]) ! ! for e in expectations: ! try: ! result = time.strftime(e[0], now) ! except ValueError, error: ! print "Standard '%s' format gave error:" % e[0], error ! continue ! if re.match(e[1], result): continue ! if not result or result[0] == '%': ! print "Does not support standard '%s' format (%s)" % (e[0], e[2]) ! else: ! print "Conflict for %s (%s):" % (e[0], e[2]) ! print " Expected %s, but got %s" % (e[1], result) ! ! for e in nonstandard_expectations: ! try: ! result = time.strftime(e[0], now) ! except ValueError, result: ! if verbose: ! print "Error for nonstandard '%s' format (%s): %s" % \ ! (e[0], e[2], str(result)) ! continue ! if re.match(e[1], result): ! if verbose: ! print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) ! elif not result or result[0] == '%': ! if verbose: ! print "Does not appear to support '%s' format (%s)" % (e[0], ! e[2]) ! else: ! if verbose: ! print "Conflict for nonstandard '%s' format (%s):" % (e[0], ! e[2]) ! print " Expected %s, but got %s" % (e[1], result) ! ! def fixasctime(s): ! if s[8] == ' ': ! s = s[:8] + '0' + s[9:] ! return s ! ! main() --- 1,37 ---- ! # Tests StringIO and cStringIO ! def do_test(module): ! s = ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+'\n')*5 ! f = module.StringIO(s) ! print f.read(10) ! print f.readline() ! print len(f.readlines(60)) ! ! f = module.StringIO() ! f.write('abcdef') ! f.seek(3) ! f.write('uvwxyz') ! f.write('!') ! print `f.getvalue()` ! f.close() ! f = module.StringIO() ! f.write(s) ! f.seek(10) ! f.truncate() ! print `f.getvalue()` ! f.seek(0) ! f.truncate(5) ! print `f.getvalue()` ! f.close() try: ! f.write("frobnitz") ! except ValueError, e: ! print "Caught expected ValueError writing to closed StringIO:" ! print e ! else: ! print "Failed to catch ValueError writing to closed StringIO." ! ! # Don't bother testing cStringIO without ! import StringIO, cStringIO ! do_test(StringIO) ! do_test(cStringIO) Index: test_unp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_unp.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_unp.py 2000/09/01 19:25:51 1.3 --- test_unp.py 2000/10/16 17:33:50 1.4 *************** *** 48,51 **** --- 48,63 ---- raise TestFailed + # single element unpacking, with extra syntax + if verbose: + print 'unpack single tuple/list' + st = (99,) + sl = [100] + a, = st + if a <> 99: + raise TestFailed + b, = sl + if b <> 100: + raise TestFailed + # now for some failures Index: test_url.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_url.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_url.py 2000/10/09 22:14:43 1.3 --- test_url.py 2000/10/16 17:33:50 1.4 *************** *** 0 **** --- 1,32 ---- + # Minimal test of the quote function + import urllib + + chars = 'abcdefghijklmnopqrstuvwxyz'\ + '\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356' \ + '\357\360\361\362\363\364\365\366\370\371\372\373\374\375\376\377' \ + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' \ + '\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317' \ + '\320\321\322\323\324\325\326\330\331\332\333\334\335\336' + + expected = 'abcdefghijklmnopqrstuvwxyz%df%e0%e1%e2%e3%e4%e5%e6%e7%e8%e9%ea%eb%ec%ed%ee%ef%f0%f1%f2%f3%f4%f5%f6%f8%f9%fa%fb%fc%fd%fe%ffABCDEFGHIJKLMNOPQRSTUVWXYZ%c0%c1%c2%c3%c4%c5%c6%c7%c8%c9%ca%cb%cc%cd%ce%cf%d0%d1%d2%d3%d4%d5%d6%d8%d9%da%db%dc%dd%de' + + test = urllib.quote(chars) + assert test == expected, "urllib.quote problem" + test2 = urllib.unquote(expected) + assert test2 == chars + + in1 = "abc/def" + out1_1 = "abc/def" + out1_2 = "abc%2fdef" + + assert urllib.quote(in1) == out1_1, "urllib.quote problem" + assert urllib.quote(in1, '') == out1_2, "urllib.quote problem" + + in2 = "abc?def" + out2_1 = "abc%3fdef" + out2_2 = "abc?def" + + assert urllib.quote(in2) == out2_1, "urllib.quote problem" + assert urllib.quote(in2, '?') == out2_2, "urllib.quote problem" + + Index: test_win.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_win.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_win.py 2000/10/09 22:14:43 1.5 --- test_win.py 2000/10/16 17:33:50 1.6 *************** *** 1,7 **** ! # Ridiculously simple test of the winsound module for Windows. ! import winsound ! for i in range(100, 2000, 100): ! winsound.Beep(i, 75) ! print "Hopefully you heard some sounds increasing in frequency!" --- 1,147 ---- ! # Test the windows specific win32reg module. ! # Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey ! from _winreg import * ! import os, sys ! ! test_key_name = "SOFTWARE\\Python Registry Test Key - Delete Me" ! ! test_data = [ ! ("Int Value", 45, REG_DWORD), ! ("String Val", "A string value", REG_SZ,), ! (u"Unicode Val", u"A Unicode value", REG_SZ,), ! ("StringExpand", "The path is %path%", REG_EXPAND_SZ), ! ("UnicodeExpand", u"The path is %path%", REG_EXPAND_SZ), ! ("Multi-string", ["Lots", "of", "string", "values"], REG_MULTI_SZ), ! ("Multi-unicode", [u"Lots", u"of", u"unicode", u"values"], REG_MULTI_SZ), ! ("Multi-mixed", [u"Unicode", u"and", "string", "values"],REG_MULTI_SZ), ! ("Raw Data", ("binary"+chr(0)+"data"), REG_BINARY), ! ] ! ! def WriteTestData(root_key): ! # Set the default value for this key. ! SetValue(root_key, test_key_name, REG_SZ, "Default value") ! key = CreateKey(root_key, test_key_name) ! # Create a sub-key ! sub_key = CreateKey(key, "sub_key") ! # Give the sub-key some named values ! ! for value_name, value_data, value_type in test_data: ! SetValueEx(sub_key, value_name, 0, value_type, value_data) ! ! # Check we wrote as many items as we thought. ! nkeys, nvalues, since_mod = QueryInfoKey(key) ! assert nkeys==1, "Not the correct number of sub keys" ! assert nvalues==1, "Not the correct number of values" ! nkeys, nvalues, since_mod = QueryInfoKey(sub_key) ! assert nkeys==0, "Not the correct number of sub keys" ! assert nvalues==len(test_data), "Not the correct number of values" ! # Close this key this way... ! # (but before we do, copy the key as an integer - this allows ! # us to test that the key really gets closed). ! int_sub_key = int(sub_key) ! CloseKey(sub_key) ! try: ! QueryInfoKey(int_sub_key) ! raise RuntimeError, "It appears the CloseKey() function does not close the actual key!" ! except EnvironmentError: ! pass ! # ... and close that key that way :-) ! int_key = int(key) ! key.Close() ! try: ! QueryInfoKey(int_key) ! raise RuntimeError, "It appears the key.Close() function does not close the actual key!" ! except EnvironmentError: ! pass ! ! def ReadTestData(root_key): ! # Check we can get default value for this key. ! val = QueryValue(root_key, test_key_name) ! assert val=="Default value", "Registry didn't give back the correct value" ! ! key = OpenKey(root_key, test_key_name) ! # Read the sub-keys ! sub_key = OpenKey(key, "sub_key") ! # Check I can enumerate over the values. ! index = 0 ! while 1: ! try: ! data = EnumValue(sub_key, index) ! except EnvironmentError: ! break ! assert data in test_data, "Didn't read back the correct test data" ! index = index + 1 ! assert index==len(test_data), "Didn't read the correct number of items" ! # Check I can directly access each item ! for value_name, value_data, value_type in test_data: ! read_val, read_typ = QueryValueEx(sub_key, value_name) ! assert read_val==value_data and read_typ == value_type, \ ! "Could not directly read the value" ! sub_key.Close() ! # Enumerate our main key. ! read_val = EnumKey(key, 0) ! assert read_val == "sub_key", "Read subkey value wrong" ! try: ! EnumKey(key, 1) ! assert 0, "Was able to get a second key when I only have one!" ! except EnvironmentError: ! pass ! ! key.Close() ! ! def DeleteTestData(root_key): ! key = OpenKey(root_key, test_key_name, 0, KEY_ALL_ACCESS) ! sub_key = OpenKey(key, "sub_key", 0, KEY_ALL_ACCESS) ! # It is not necessary to delete the values before deleting ! # the key (although subkeys must not exist). We delete them ! # manually just to prove we can :-) ! for value_name, value_data, value_type in test_data: ! DeleteValue(sub_key, value_name) ! ! nkeys, nvalues, since_mod = QueryInfoKey(sub_key) ! assert nkeys==0 and nvalues==0, "subkey not empty before delete" ! sub_key.Close() ! DeleteKey(key, "sub_key") ! ! try: ! # Shouldnt be able to delete it twice! ! DeleteKey(key, "sub_key") ! assert 0, "Deleting the key twice succeeded" ! except EnvironmentError: ! pass ! key.Close() ! DeleteKey(root_key, test_key_name) ! # Opening should now fail! ! try: ! key = OpenKey(root_key, test_key_name) ! assert 0, "Could open the non-existent key" ! except WindowsError: # Use this error name this time ! pass ! ! def TestAll(root_key): ! WriteTestData(root_key) ! ReadTestData(root_key) ! DeleteTestData(root_key) ! ! # Test on my local machine. ! TestAll(HKEY_CURRENT_USER) ! print "Local registry tests worked" ! try: ! remote_name = sys.argv[sys.argv.index("--remote")+1] ! except (IndexError, ValueError): ! remote_name = None ! ! if remote_name is not None: ! try: ! remote_key = ConnectRegistry(remote_name, HKEY_CURRENT_USER) ! except EnvironmentError, exc: ! print "Could not connect to the remote machine -", exc.strerror ! remote_key = None ! if remote_key is not None: ! TestAll(remote_key) ! print "Remote registry tests worked" ! else: ! print "Remote registry calls can be tested using", ! print "'test_winreg.py --remote \\\\machine_name'" From python-dev@python.org Mon Oct 16 18:35:19 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 16 Oct 2000 10:35:19 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_math.py,1.7,1.8 Message-ID: <200010161735.KAA20503@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv19269/python/dist/src/lib/test Modified Files: test_math.py Log Message: Test for math.* exceptional behavior only in verbose mode, so that the oddball platforms (where, e.g., math.exp(+huge) still fails to raise OverflowError) don't fail the std test suite when run normally. Index: test_math.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_math.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** test_math.py 2000/10/12 07:15:55 1.7 --- test_math.py 2000/10/16 17:35:12 1.8 *************** *** 154,185 **** testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) ! print 'exceptions' # oooooh, *this* is a x-platform gamble! good luck ! try: ! x = math.exp(-1000000000) ! except: ! # mathmodule.c is failing to weed out underflows from libm, or ! # we've got an fp format with huge dynamic range ! raise TestFailed("underflowing exp() should not have rasied an exception") ! if x != 0: ! raise TestFailed("underflowing exp() should have returned 0") ! # If this fails, probably using a strict IEEE-754 conforming libm, and x ! # is +Inf afterwards. But Python wants overflows detected by default. ! try: ! x = math.exp(1000000000) ! except OverflowError: ! pass ! else: ! raise TestFailed("overflowing exp() didn't trigger OverflowError") ! # If this fails, it could be a puzzle. One odd possibility is that ! # mathmodule.c's CHECK() macro is getting confused while comparing ! # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE ! # as a result (and so raising OverflowError instead). ! try: ! x = math.sqrt(-1.0) ! except ValueError: ! pass ! else: ! raise TestFailed("sqrt(-1) didn't raise ValueError") --- 154,195 ---- testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) ! # RED_FLAG 16-Oct-2000 Tim ! # While 2.0 is more consistent about exceptions than previous releases, it ! # still fails this part of the test on some platforms. For now, we only ! # *run* test_exceptions() in verbose mode, so that this isn't normally ! # tested. ! def test_exceptions(): ! print 'exceptions' ! try: ! x = math.exp(-1000000000) ! except: ! # mathmodule.c is failing to weed out underflows from libm, or ! # we've got an fp format with huge dynamic range ! raise TestFailed("underflowing exp() should not have raised " ! "an exception") ! if x != 0: ! raise TestFailed("underflowing exp() should have returned 0") ! # If this fails, probably using a strict IEEE-754 conforming libm, and x ! # is +Inf afterwards. But Python wants overflows detected by default. ! try: ! x = math.exp(1000000000) ! except OverflowError: ! pass ! else: ! raise TestFailed("overflowing exp() didn't trigger OverflowError") ! # If this fails, it could be a puzzle. One odd possibility is that ! # mathmodule.c's CHECK() macro is getting confused while comparing ! # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE ! # as a result (and so raising OverflowError instead). ! try: ! x = math.sqrt(-1.0) ! except ValueError: ! pass ! else: ! raise TestFailed("sqrt(-1) didn't raise ValueError") ! ! if verbose: ! test_exceptions() From python-dev@python.org Mon Oct 16 18:35:17 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 16 Oct 2000 10:35:17 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_math,1.4,1.5 Message-ID: <200010161735.KAA20499@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv19269/python/dist/src/lib/test/output Modified Files: test_math Log Message: Test for math.* exceptional behavior only in verbose mode, so that the oddball platforms (where, e.g., math.exp(+huge) still fails to raise OverflowError) don't fail the std test suite when run normally. Index: test_math =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_math,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_math 2000/10/12 06:10:25 1.4 --- test_math 2000/10/16 17:35:13 1.5 *************** *** 25,27 **** tan tanh - exceptions --- 25,26 ---- From python-dev@python.org Mon Oct 16 18:42:44 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 10:42:44 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 test_mat.py,1.5,1.6 Message-ID: <200010161742.KAA26367@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/dos-8x3 In directory slayer.i.sourceforge.net:/tmp/cvs-serv26217 Modified Files: test_mat.py Log Message: the usual (part II) Index: test_mat.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/dos-8x3/test_mat.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_mat.py 2000/10/16 17:33:50 1.5 --- test_mat.py 2000/10/16 17:42:40 1.6 *************** *** 154,185 **** testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) ! print 'exceptions' # oooooh, *this* is a x-platform gamble! good luck ! try: ! x = math.exp(-1000000000) ! except: ! # mathmodule.c is failing to weed out underflows from libm, or ! # we've got an fp format with huge dynamic range ! raise TestFailed("underflowing exp() should not have rasied an exception") ! if x != 0: ! raise TestFailed("underflowing exp() should have returned 0") ! # If this fails, probably using a strict IEEE-754 conforming libm, and x ! # is +Inf afterwards. But Python wants overflows detected by default. ! try: ! x = math.exp(1000000000) ! except OverflowError: ! pass ! else: ! raise TestFailed("overflowing exp() didn't trigger OverflowError") ! # If this fails, it could be a puzzle. One odd possibility is that ! # mathmodule.c's CHECK() macro is getting confused while comparing ! # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE ! # as a result (and so raising OverflowError instead). ! try: ! x = math.sqrt(-1.0) ! except ValueError: ! pass ! else: ! raise TestFailed("sqrt(-1) didn't raise ValueError") --- 154,195 ---- testit('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) ! # RED_FLAG 16-Oct-2000 Tim ! # While 2.0 is more consistent about exceptions than previous releases, it ! # still fails this part of the test on some platforms. For now, we only ! # *run* test_exceptions() in verbose mode, so that this isn't normally ! # tested. ! def test_exceptions(): ! print 'exceptions' ! try: ! x = math.exp(-1000000000) ! except: ! # mathmodule.c is failing to weed out underflows from libm, or ! # we've got an fp format with huge dynamic range ! raise TestFailed("underflowing exp() should not have raised " ! "an exception") ! if x != 0: ! raise TestFailed("underflowing exp() should have returned 0") ! # If this fails, probably using a strict IEEE-754 conforming libm, and x ! # is +Inf afterwards. But Python wants overflows detected by default. ! try: ! x = math.exp(1000000000) ! except OverflowError: ! pass ! else: ! raise TestFailed("overflowing exp() didn't trigger OverflowError") ! # If this fails, it could be a puzzle. One odd possibility is that ! # mathmodule.c's CHECK() macro is getting confused while comparing ! # Inf (HUGE_VAL) to a NaN, and artificially setting errno to ERANGE ! # as a result (and so raising OverflowError instead). ! try: ! x = math.sqrt(-1.0) ! except ValueError: ! pass ! else: ! raise TestFailed("sqrt(-1) didn't raise ValueError") ! ! if verbose: ! test_exceptions() From python-dev@python.org Mon Oct 16 18:53:39 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 10:53:39 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc/RPM/src - New directory Message-ID: <200010161753.KAA02946@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc/RPM/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv2893/src Log Message: Directory /cvsroot/python/python/dist/src/Misc/RPM/src added to the repository From python-dev@python.org Mon Oct 16 19:26:46 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 11:26:46 -0700 Subject: [Python-checkins] CVS: python/dist/src README,1.103,1.104 Message-ID: <200010161826.LAA12600@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv12297 Modified Files: README Log Message: the usual Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -r1.103 -r1.104 *** README 2000/10/09 21:34:51 1.103 --- README 2000/10/16 18:26:42 1.104 *************** *** 1,4 **** ! This is Python version 2.0 release candidate 1 ! ============================================== Copyright (c) 2000 BeOpen.com. --- 1,4 ---- ! This is Python version 2.0 ! ========================== Copyright (c) 2000 BeOpen.com. From python-dev@python.org Mon Oct 16 21:08:50 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 13:08:50 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.76,1.77 Message-ID: <200010162008.NAA25314@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv24484/Misc Modified Files: NEWS Log Message: Add NEWS for 2.0 final (there are a few XXX comments that must be addressed). Fix a few nits in 2.0c1 news. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -r1.76 -r1.77 *** NEWS 2000/10/09 21:27:22 1.76 --- NEWS 2000/10/16 20:08:38 1.77 *************** *** 1,3 **** ! What's New in Python 2.0c1? =========================== --- 1,3 ---- ! What's New in Python 2.0? =========================== *************** *** 15,18 **** --- 15,88 ---- ====================================================================== + What's new in 2.0 (since release candidate 1)? + ============================================== + + Standard library + + - The copy_reg module was modified to clarify its intended use: to + register pickle support for extension types, not for classes. + pickle() will raise a TypeError if it is passed a class. + + - Fixed a bug in gettext's "normalize and expand" code that prevented + it from finding an existing .mo file. + + - Restored support for HTTP/0.9 servers in httplib. + + - XXX The math module was changed to suppress underflow errors and + just return 0. + + - Fixed a bug in StringIO that occurred when the file position was not + at the end of the file and write() was called with enough data to + extend past the end of the file. + + - Fixed a bug that caused Tkinter error messages to get lost on + Windows. The bug was fixed by replacing direct use of + interp->result with Tcl_GetStringResult(interp). + + - Fixed bug in urllib2 that caused it to fail when it received an HTTP + redirect response. + + - Several changes were made to distutils: Some debugging code was + removed from util. Fixed the installer used when an external zip + program (like WinZip) is not found; the source code for this + installer is in Misc/distutils. check_lib() was modified to behave + more like AC_CHECK_LIB by add other_libraries() as a parameter. The + test for whether installed modules are on sys.path was changed to + use both normcase() and normpath(). + + - XXX xml minidom, pulldom, expatreader, and saxutils changes (can't + tell what happened from the CVS logs) + + - The regression test driver (regrtest.py) behavior when invoked with + -l changed: It now reports a count of objects that are recognized as + garbage but not freed by the garbage collector. + + - The regression test for the math module was changed to report + exceptional behavior when the test is run in verbose mode. + + Internals + + - PyOS_CheckStack() has been disabled on Win64, where it caused + test_sre to fail. + + Build issues + + - Changed compiler flags, so that gcc is always invoked with -Wall and + -Wstrict-prototypes. Users compiling Python with GCC should see + exactly one warning, except if they have passed configure the + --with-pydebug flag. The expect warning is for getopt() in + Modules/main.c. + + - Fixed configure to add -threads argument during linking on OSF1. + + Tools and other miscellany + + - The compiler in Tools/compiler was updated to support the new + language features introduced in 2.0: extended print statement, list + comprehensions, and augmented assignments. The new compiler should + also be backwards compatible with Python 1.5.2; the compiler will + always generate code for the version of the interpreter it runs + under. + What's new in 2.0 release candidate 1 (since beta 2)? ===================================================== *************** *** 29,33 **** All the changes since the last beta release are bug fixes or changes ! to build support for specific platforms. Core language, builtins, and interpreter --- 99,103 ---- All the changes since the last beta release are bug fixes or changes ! to support building Python for specific platforms. Core language, builtins, and interpreter *************** *** 56,64 **** methods in SRE, the standard regular expression engine. ! - In SRE, fix error with negative lookahead and lookbehind that manifested itself as a runtime error in patterns like "(? Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv6607/python/dist/src/misc Modified Files: NEWS Log Message: Filled in math-module info; fixed a typo or two. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -r1.77 -r1.78 *** NEWS 2000/10/16 20:08:38 1.77 --- NEWS 2000/10/16 20:24:53 1.78 *************** *** 29,34 **** - Restored support for HTTP/0.9 servers in httplib. ! - XXX The math module was changed to suppress underflow errors and ! just return 0. - Fixed a bug in StringIO that occurred when the file position was not --- 29,37 ---- - Restored support for HTTP/0.9 servers in httplib. ! - The math module was changed to stop raising OverflowError in case of ! underflow, and return 0 instead in underflow cases. Whether Python ! used to raise OverflowError in case of underflow was platform- ! dependent (it did when the platform math library set errno to ERANGE ! on underflow). - Fixed a bug in StringIO that occurred when the file position was not *************** *** 58,63 **** garbage but not freed by the garbage collector. ! - The regression test for the math module was changed to report ! exceptional behavior when the test is run in verbose mode. Internals --- 61,69 ---- garbage but not freed by the garbage collector. ! - The regression test for the math module was changed to test ! exceptional behavior when the test is run in verbose mode. Python ! cannot yet guarantee consistent exception behavior across platforms, ! so the exception part of test_math is run only in verbose mode, and ! may fail on your platform. Internals *************** *** 71,76 **** -Wstrict-prototypes. Users compiling Python with GCC should see exactly one warning, except if they have passed configure the ! --with-pydebug flag. The expect warning is for getopt() in ! Modules/main.c. - Fixed configure to add -threads argument during linking on OSF1. --- 77,82 ---- -Wstrict-prototypes. Users compiling Python with GCC should see exactly one warning, except if they have passed configure the ! --with-pydebug flag. The expected warning is for getopt() in ! Modules/main.c. This will warning will be fixed for Python 2.1. - Fixed configure to add -threads argument during linking on OSF1. From python-dev@python.org Mon Oct 16 21:27:28 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 16 Oct 2000 13:27:28 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.78,1.79 Message-ID: <200010162027.NAA10309@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv10236/Misc Modified Files: NEWS Log Message: Updated the XML package comment. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -r1.78 -r1.79 *** NEWS 2000/10/16 20:24:53 1.78 --- NEWS 2000/10/16 20:27:25 1.79 *************** *** 1,4 **** What's New in Python 2.0? ! =========================== Below is a list of all relevant changes since release 1.6. Older --- 1,4 ---- What's New in Python 2.0? ! ========================= Below is a list of all relevant changes since release 1.6. Older *************** *** 54,59 **** use both normcase() and normpath(). ! - XXX xml minidom, pulldom, expatreader, and saxutils changes (can't ! tell what happened from the CVS logs) - The regression test driver (regrtest.py) behavior when invoked with --- 54,59 ---- use both normcase() and normpath(). ! - xml minidom, pulldom, expatreader, and saxutils had some minor bug ! fixes. - The regression test driver (regrtest.py) behavior when invoked with From python-dev@python.org Mon Oct 16 21:32:32 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 13:32:32 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0001.txt,1.11,1.12 Message-ID: <200010162032.NAA14882@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv14259 Modified Files: pep-0001.txt Log Message: Revise guidelines for discussion of PEP before draft exists. The goal is to limit needless and uninformed discussion of an issue, not to prevent all discussion. Index: pep-0001.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0001.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** pep-0001.txt 2000/08/23 15:58:05 1.11 --- pep-0001.txt 2000/10/16 20:32:29 1.12 *************** *** 62,69 **** final arbitrator of the latter. ! Discussion concerning a PEP should initially be kept out of the ! python-dev and python-list mailing lists. Instead, comments ! should be sent to, and collected by, the PEP owner, who has the ! responsibility to incorporate these comments into the document. The authors of the PEP are then responsible for writing the PEP --- 62,69 ---- final arbitrator of the latter. ! In general, an initial draft of the PEP should be prepared before ! discussion occurs on the python-dev and pyton-list mailing lists. ! The author should incorporate comments and feedback into this ! initial draft when possible. The authors of the PEP are then responsible for writing the PEP From python-dev@python.org Mon Oct 16 21:41:41 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 16 Oct 2000 13:41:41 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.79,1.80 Message-ID: <200010162041.NAA22943@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv22757/Misc Modified Files: NEWS Log Message: revise xml comment Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -r1.79 -r1.80 *** NEWS 2000/10/16 20:27:25 1.79 --- NEWS 2000/10/16 20:41:38 1.80 *************** *** 54,59 **** use both normcase() and normpath(). ! - xml minidom, pulldom, expatreader, and saxutils had some minor bug ! fixes. - The regression test driver (regrtest.py) behavior when invoked with --- 54,59 ---- use both normcase() and normpath(). ! - Several minor bugs were fixed in the xml package (the minidom, ! pulldom, expatreader, and saxutils modules). - The regression test driver (regrtest.py) behavior when invoked with From python-dev@python.org Mon Oct 16 21:51:37 2000 From: python-dev@python.org (Tim Peters) Date: Mon, 16 Oct 2000 13:51:37 -0700 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.80,1.81 Message-ID: <200010162051.NAA29535@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Misc In directory slayer.i.sourceforge.net:/tmp/cvs-serv29324/python/dist/src/misc Modified Files: NEWS Log Message: Typo repair. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -r1.80 -r1.81 *** NEWS 2000/10/16 20:41:38 1.80 --- NEWS 2000/10/16 20:51:33 1.81 *************** *** 78,82 **** exactly one warning, except if they have passed configure the --with-pydebug flag. The expected warning is for getopt() in ! Modules/main.c. This will warning will be fixed for Python 2.1. - Fixed configure to add -threads argument during linking on OSF1. --- 78,82 ---- exactly one warning, except if they have passed configure the --with-pydebug flag. The expected warning is for getopt() in ! Modules/main.c. This warning will be fixed for Python 2.1. - Fixed configure to add -threads argument during linking on OSF1. From python-dev@python.org Mon Oct 16 22:24:53 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 16 Oct 2000 14:24:53 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0226.txt,NONE,1.1 Message-ID: <200010162124.OAA24850@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv24816 Added Files: pep-0226.txt Log Message: PEP 226, Python 2.1 Release Schedule, Jeremy Hylton --- NEW FILE --- PEP: 226 Title: Python 2.1 Release Schedule Version: $Revision: 1.1 $ Author: Jeremy Hylton Status: Incomplete Type: Informational Created: 16-Oct-2000 Python-Version: 2.1 Post-History: Abstract This document describes the post Python 2.0 development and release schedule. According to this schedule, Python 2.1 will be released in mid-March of 2001. The schedule primarily concerns itself with PEP-size items. Small bug fixes and changes will occur up until the first beta release. Tentative Release Schedule 16-Oct-2000: Python 2.0 final release These dates represent goals, not commitments. 16-Dec-2000: 2.1 PEPs ready for review 01-Feb-2001: First 2.1 beta release 16-Mar-2001: 2.1 final release Guidelines for making changes for Python 2.1 The guidelines and schedule will be revised based on discussion in the python-dev@python.org mailing list. The PEP system was instituted late in the Python 2.0 development cycle and many changes did not follow the process described in PEP 1. The development process for 2.1, however, will follow the PEP process as documented. The first eight weeks following 2.0 final will be the design and review phase. By the end of this period, any PEP that is proposed for 2.1 should be ready for review. This means that the PEP is written and discussion has occurred on the python-dev@python.org and python-list@python.org mailing lists. The next six weeks will be spent reviewing the PEPs and implementing and testing the accepted PEPs. When this period stops, we will end consideration of any incomplete PEPs. Near the end of this period, there will be a feature freeze where any small features not worthy of a PEP will not be accepted. Before the final release, we will have six weeks of beta testing and a release candidate or two. Bug fix releases before 2.1 We may have to issue Python 2.0.1 for critical bug fixes. If we need to issue a bug fix release, we will use a CVS branch. General guidelines for submitting patches and making changes Use good sense when committing changes. You should know what we mean by good sense or we wouldn't have given you commit privileges <0.5 wink>. Some specific examples of good sense include: - Do whatever the dictator tells you. - Discuss any controversial changes on python-dev first. If you get a lot of +1 votes and no -1 votes, make the change. If you get a some -1 votes, think twice; consider asking Guido what he thinks. - If the change is to code you contributed, it probably makes sense for you to fix it. - If the change affects code someone else wrote, it probably makes sense to ask him or her first. - You can use the SourceForge (SF) Patch Manager to submit a patch and assign it to someone for review. Any significant new feature must be described in a PEP and approved before it is checked in. Any significant code addition, such as a new module or large patch, must include test cases for the regression test and documentation. A patch should not be checked in until the tests and documentation are ready. If you fix a bug, you should write a test case that would have caught the bug. If you commit a patch from the SF Patch Manager or fix a bug from the Jitterbug database, be sure to reference the patch/bug number in the CVS log message. Also be sure to change the status in the patch manager or bug database (if you have access to the bug database). It is not acceptable for any checked in code to cause the regression test to fail. If a checkin causes a failure, it must be fixed within 24 hours or it will be backed out. All contributed C code must be ANSI C. If possible check it with two different compilers, e.g. gcc and MSVC. All contributed Python code must follow Guido's Python style guide. http://www.python.org/doc/essays/styleguide.html It is understood that any code contributed will be released under an Open Source license. Do not contribute code if it can't be released this way. Local Variables: mode: indented-text indent-tabs-mode: nil End: From python-dev@python.org Mon Oct 16 22:25:38 2000 From: python-dev@python.org (Barry Warsaw) Date: Mon, 16 Oct 2000 14:25:38 -0700 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.36,1.37 Message-ID: <200010162125.OAA24930@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv24917 Modified Files: pep-0000.txt Log Message: PEP 226, Python 2.1 Release Schedule, Jeremy Hylton Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** pep-0000.txt 2000/10/04 22:40:04 1.36 --- pep-0000.txt 2000/10/16 21:25:34 1.37 *************** *** 54,57 **** --- 54,59 ---- S 224 pep-0224.txt Attribute Docstrings Lemburg SD 225 pep-0225.txt Elementwise/Objectwise Operators Zhu, Lielens + I 226 pep-0226.txt Python 2.1 Release Schedule Hylton + Key From python-dev@python.org Tue Oct 17 05:58:04 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 16 Oct 2000 21:58:04 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libarray.tex,1.25,1.26 Message-ID: <200010170458.VAA20943@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv20934/lib Modified Files: libarray.tex Log Message: Update the links to the NumPy website and documentation, based on a comment from Janko Hauser . Index: libarray.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libarray.tex,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** libarray.tex 2000/07/31 20:52:21 1.25 --- libarray.tex 2000/10/17 04:58:01 1.26 *************** *** 188,196 **** \seemodule{struct}{packing and unpacking of heterogeneous binary data} \seemodule{xdrlib}{packing and unpacking of XDR data} ! \seetext{The Numeric Python extension (NumPy) defines another array ! type; see \emph{The Numerical Python Manual} for additional ! information (available online at ! \url{ftp://ftp-icf.llnl.gov/pub/python/numericalpython.pdf}). ! Further information about NumPy is available at ! \url{http://www.python.org/topics/scicomp/numpy.html}.} \end{seealso} --- 188,195 ---- \seemodule{struct}{packing and unpacking of heterogeneous binary data} \seemodule{xdrlib}{packing and unpacking of XDR data} ! \seetitle[http://numpy.sourceforge.net/numdoc/numdoc.pdf]{The ! Numerical Python Manual}{The Numeric Python extension ! (NumPy) defines another array type; see ! \url{http://numpy.sourceforge.net/} for further information ! about Numerical Python.} \end{seealso} From python-dev@python.org Wed Oct 18 02:21:43 2000 From: python-dev@python.org (Fred L. Drake) Date: Tue, 17 Oct 2000 18:21:43 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_fcntl.py,1.11,1.12 Message-ID: <200010180121.SAA21358@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv21348/Lib/test Modified Files: test_fcntl.py Log Message: Use test_support.TESTFN as the temporary filename. Fix a minor stylistic nit. This closes SourceForge bug #117032. Index: test_fcntl.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_fcntl.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** test_fcntl.py 2000/10/12 16:01:55 1.11 --- test_fcntl.py 2000/10/18 01:21:38 1.12 *************** *** 7,16 **** import FCNTL import os, sys ! from test_support import verbose ! filename = '/tmp/delete-me' # the example from the library docs ! f = open(filename,'w') rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETFL, os.O_NONBLOCK) if verbose: --- 7,16 ---- import FCNTL import os, sys ! from test_support import verbose, TESTFN ! filename = TESTFN # the example from the library docs ! f = open(filename, 'w') rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETFL, os.O_NONBLOCK) if verbose: From python-dev@python.org Wed Oct 18 17:00:46 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 09:00:46 -0700 Subject: [Python-checkins] CVS: python/nondist/sf-html index.html,1.6,1.7 Message-ID: <200010181600.JAA30662@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/sf-html In directory slayer.i.sourceforge.net:/tmp/cvs-serv30651 Modified Files: index.html Log Message: Point link to development version of the docs to python.sourceforge.net. Clean up the presentation a little bit. Index: index.html =================================================================== RCS file: /cvsroot/python/python/nondist/sf-html/index.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** index.html 2000/10/09 19:21:06 1.6 --- index.html 2000/10/18 16:00:44 1.7 *************** *** 4,8 **** ! Python Sites --- 4,8 ---- ! Python @ SourceForge *************** *** 11,32 **** alink="#FF0000">

    PythonatSourceForge

    ! Python Project Page - ! CVS repository,  Python Developers and the Patch Manager.
    ! Python Enhancement Proposals - Information on new language ! features
    ! Python at SourceForge FAQ - Tips on CVS, SSH and ! patch submission

    External links

    Python Language Website - Documentation, Downloads, News and lots of other resources for the Python language.
    ! Development ! version of the documentation - Straight from Fred's working files.
    PythonLabs.com - Python's core development team and its plans for Python development.
    !   --- 11,48 ---- alink="#FF0000">

    Python at SourceForge

    ! +

    External links

    + +
      +
    • Python Language Website - Documentation, Downloads, News and lots of other resources for the Python language.
      ! !
    • PythonLabs.com - Python's core development team and its plans for Python development.
      !
    ! ! From python-dev@python.org Wed Oct 18 17:48:01 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 09:48:01 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libpickle.tex,1.27,1.28 Message-ID: <200010181648.JAA02589@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2574/lib Modified Files: libpickle.tex Log Message: Capitalize & use periods for \seemodule explanation parameter. Index: libpickle.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** libpickle.tex 2000/07/16 19:01:10 1.27 --- libpickle.tex 2000/10/18 16:47:52 1.28 *************** *** 283,294 **** \begin{seealso} ! \seemodule[copyreg]{copy_reg}{pickle interface constructor ! registration} ! \seemodule{shelve}{indexed databases of objects; uses \module{pickle}} ! \seemodule{copy}{shallow and deep object copying} ! \seemodule{marshal}{high-performance serialization of built-in types} \end{seealso} --- 283,294 ---- \begin{seealso} ! \seemodule[copyreg]{copy_reg}{Pickle interface constructor ! registration for extension types.} ! \seemodule{shelve}{Indexed databases of objects; uses \module{pickle}.} ! \seemodule{copy}{Shallow and deep object copying.} ! \seemodule{marshal}{High-performance serialization of built-in types.} \end{seealso} From python-dev@python.org Wed Oct 18 18:43:09 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 10:43:09 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libarray.tex,1.26,1.27 libbase64.tex,1.15,1.16 libbinhex.tex,1.7,1.8 libgzip.tex,1.12,1.13 librand.tex,1.10,1.11 libsymbol.tex,1.7,1.8 libtoken.tex,1.7,1.8 libuser.tex,1.15,1.16 libuu.tex,1.9,1.10 libzlib.tex,1.22,1.23 Message-ID: <200010181743.KAA23015@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv22844 Modified Files: libarray.tex libbase64.tex libbinhex.tex libgzip.tex librand.tex libsymbol.tex libtoken.tex libuser.tex libuu.tex libzlib.tex Log Message: Make all the \seemodule explanations consistent: start with a capitalized letter and end with proper punctuation. "Documenting Python" will be updated accordingly so that this will be editorial policy for the Python documentation. Index: libarray.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libarray.tex,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** libarray.tex 2000/10/17 04:58:01 1.26 --- libarray.tex 2000/10/18 17:43:06 1.27 *************** *** 186,191 **** \begin{seealso} ! \seemodule{struct}{packing and unpacking of heterogeneous binary data} ! \seemodule{xdrlib}{packing and unpacking of XDR data} \seetitle[http://numpy.sourceforge.net/numdoc/numdoc.pdf]{The Numerical Python Manual}{The Numeric Python extension --- 186,193 ---- \begin{seealso} ! \seemodule{struct}{Packing and unpacking of heterogeneous binary data.} ! \seemodule{xdrlib}{Packing and unpacking of External Data ! Representation (XDR) data as used in some remote ! procedure call systems.} \seetitle[http://numpy.sourceforge.net/numdoc/numdoc.pdf]{The Numerical Python Manual}{The Numeric Python extension Index: libbase64.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbase64.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libbase64.tex 2000/04/03 20:13:52 1.15 --- libbase64.tex 2000/10/18 17:43:06 1.16 *************** *** 51,56 **** \begin{seealso} ! \seemodule{binascii}{support module containing \ASCII{}-to-binary ! and binary-to-\ASCII{} conversions} \seetext{Internet \rfc{1521}, \emph{MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and --- 51,56 ---- \begin{seealso} ! \seemodule{binascii}{Support module containing \ASCII{}-to-binary ! and binary-to-\ASCII{} conversions.} \seetext{Internet \rfc{1521}, \emph{MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Index: libbinhex.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbinhex.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libbinhex.tex 1999/04/23 15:41:53 1.7 --- libbinhex.tex 2000/10/18 17:43:06 1.8 *************** *** 30,35 **** \begin{seealso} ! \seemodule{binascii}{support module containing \ASCII{}-to-binary ! and binary-to-\ASCII{} conversions} \end{seealso} --- 30,35 ---- \begin{seealso} ! \seemodule{binascii}{Support module containing \ASCII-to-binary ! and binary-to-\ASCII{} conversions.} \end{seealso} Index: libgzip.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgzip.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** libgzip.tex 1999/04/05 19:00:54 1.12 --- libgzip.tex 2000/10/18 17:43:06 1.13 *************** *** 66,69 **** \begin{seealso} ! \seemodule{zlib}{the basic data compression module} \end{seealso} --- 66,70 ---- \begin{seealso} ! \seemodule{zlib}{The basic data compression module needed to support ! the \program{gzip} file format.} \end{seealso} Index: librand.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/librand.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** librand.tex 1998/08/10 19:42:10 1.10 --- librand.tex 2000/10/18 17:43:06 1.11 *************** *** 27,31 **** \begin{seealso} ! \seemodule{whrandom}{the standard Python random number generator} \end{seealso} - --- 27,31 ---- \begin{seealso} ! \seemodule{random}{Python's interface to random number generators.} ! \seemodule{whrandom}{The random number generator used by default.} \end{seealso} Index: libsymbol.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsymbol.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libsymbol.tex 2000/07/16 19:01:10 1.7 --- libsymbol.tex 2000/10/18 17:43:06 1.8 *************** *** 17,28 **** - \begin{datadesc}{sym_name} ! Dictionary mapping the numeric values of the constants defined in this ! module back to name strings, allowing more human-readable ! representation of parse trees to be generated. \end{datadesc} \begin{seealso} ! \seemodule{parser}{second example uses this module} \end{seealso} --- 17,30 ---- \begin{datadesc}{sym_name} ! Dictionary mapping the numeric values of the constants defined in ! this module back to name strings, allowing more human-readable ! representation of parse trees to be generated. \end{datadesc} + \begin{seealso} ! \seemodule{parser}{The second example for the \refmodule{parser} ! module shows how to use the \module{symbol} ! module.} \end{seealso} Index: libtoken.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtoken.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** libtoken.tex 2000/07/16 19:01:10 1.7 --- libtoken.tex 2000/10/18 17:43:06 1.8 *************** *** 37,41 **** \end{funcdesc} \begin{seealso} ! \seemodule{parser}{second example uses this module} \end{seealso} --- 37,44 ---- \end{funcdesc} + \begin{seealso} ! \seemodule{parser}{The second example for the \refmodule{parser} ! module shows how to use the \module{symbol} ! module.} \end{seealso} Index: libuser.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuser.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** libuser.tex 2000/07/16 19:01:10 1.15 --- libuser.tex 2000/10/18 17:43:06 1.16 *************** *** 66,70 **** \begin{seealso} ! \seemodule{site}{site-wide customization mechanism} ! \refstmodindex{site} \end{seealso} --- 66,69 ---- \begin{seealso} ! \seemodule{site}{Site-wide customization mechanism.} \end{seealso} Index: libuu.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuu.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** libuu.tex 1999/04/23 15:57:23 1.9 --- libuu.tex 2000/10/18 17:43:06 1.10 *************** *** 40,44 **** \begin{seealso} ! \seemodule{binascii}{support module containing \ASCII{}-to-binary ! and binary-to-\ASCII{} conversions} \end{seealso} --- 40,44 ---- \begin{seealso} ! \seemodule{binascii}{Support module containing \ASCII-to-binary ! and binary-to-\ASCII{} conversions.} \end{seealso} Index: libzlib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzlib.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** libzlib.tex 2000/09/16 06:18:26 1.22 --- libzlib.tex 2000/10/18 17:43:06 1.23 *************** *** 149,153 **** \begin{seealso} ! \seemodule{gzip}{reading and writing \program{gzip}-format files} \seeurl{http://www.info-zip.org/pub/infozip/zlib/}{The zlib library home page.} --- 149,153 ---- \begin{seealso} ! \seemodule{gzip}{Reading and writing \program{gzip}-format files.} \seeurl{http://www.info-zip.org/pub/infozip/zlib/}{The zlib library home page.} From python-dev@python.org Thu Oct 19 00:08:16 2000 From: python-dev@python.org (A.M. Kuchling) Date: Wed, 18 Oct 2000 16:08:16 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.58,1.59 Message-ID: <200010182308.QAA01012@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv961 Modified Files: libre.tex Log Message: Document the .lastindex and .lastgroup attributes of MatchObject Index: libre.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -r1.58 -r1.59 *** libre.tex 2000/10/10 22:00:03 1.58 --- libre.tex 2000/10/18 23:08:13 1.59 *************** *** 734,737 **** --- 734,747 ---- \end{memberdesc} + \begin{memberdesc}[MatchObject]{lastgroup} + The name of the last matched capturing group, or \code{None} if the + group didn't have a name, or if no group was matched at all. + \end{memberdesc} + + \begin{memberdesc}[MatchObject]{lastindex} + The integer index of the last matched capturing group, or \code{None} + if no group was matched at all. + \end{memberdesc} + \begin{memberdesc}[MatchObject]{re} The regular expression object whose \method{match()} or From python-dev@python.org Thu Oct 19 06:33:49 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 22:33:49 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.52,1.53 Message-ID: <200010190533.WAA32191@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv32098/lib Modified Files: libos.tex Log Message: Capitalize first letter of an explanation for a \versionchanged annotation. Index: libos.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** libos.tex 2000/10/14 05:46:11 1.52 --- libos.tex 2000/10/19 05:33:46 1.53 *************** *** 786,790 **** 2-tuple of numbers, of the form \code{(\var{atime}, \var{mtime})} which is used to set the access and modified times, respectively. ! \versionchanged[added support for \code{None} for \var{times}]{2.0} Availability: Macintosh, \UNIX{}, Windows. \end{funcdesc} --- 786,790 ---- 2-tuple of numbers, of the form \code{(\var{atime}, \var{mtime})} which is used to set the access and modified times, respectively. ! \versionchanged[Added support for \code{None} for \var{times}]{2.0} Availability: Macintosh, \UNIX{}, Windows. \end{funcdesc} From python-dev@python.org Thu Oct 19 06:36:13 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 22:36:13 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/doc doc.tex,1.33,1.34 Message-ID: <200010190536.WAA32261@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv32251/doc Modified Files: doc.tex Log Message: Revise the capitalization policy of \versionchanged explanation; the explanation must now be capitalized. This is more consistent with the \see* explanation fields. Added a lot of material to the "LaTeX Primer" section. Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** doc.tex 2000/09/21 15:58:01 1.33 --- doc.tex 2000/10/19 05:36:10 1.34 *************** *** 192,201 **** The document body follows the preamble. This contains all the ! printed components of the document marked up structurally. ! XXX This section will discuss what the markup looks like, and ! explain the difference between an environment and a macro. \section{Document Classes \label{classes}} --- 192,318 ---- The document body follows the preamble. This contains all the ! printed components of the document marked up structurally. Generic ! \LaTeX{} structures include hierarchical sections ! \subsection{Syntax} + There are only a things that an author of Python documentation + needs to know about \LaTeX{} syntax. + A \dfn{comment} is started by the ``percent'' character + (\character{\%}) and continues through the end of the line and all + leading whitespace on the following line. This is a little + different from any programming language I know of, so an example + is in order: + + \begin{verbatim} + This is text.% comment + This is more text. % another comment + Still more text. + \end{verbatim} + + The first non-comment character following the first comment is the + letter \character{T} on the second line; the leading whitespace on + that line is consumed as part of the first comment. This means + that there is no space between the first and second sentences, so + the period and letter \character{T} will be directly adjacent in + the typeset document. + + Note also that though the first non-comment character after the + second comment is the letter \character{S}, there is whitespace + preceding the comment, so the two sentences are separated as + expected. + + A \dfn{group} is an enclosure for a collection of text and + commands which encloses the formatting context and constrains the + scope of any changes to that context made by commands within the + group. Groups can be nested hierarchically. The formatting + context includes the font and the definition of additional macros + (or overrides of macros defined in outer groups). Syntactically, + groups are enclosed in braces: + + \begin{verbatim} + {text in a group} + \end{verbatim} + + An alternate syntax for a group using brackets (\code{\{...\}}) is + used by macros and environment constructors which take optional + parameters; brackets do not normally hold syntactic significance. + A degenerate group, containing only one atomic bit of content, + does not need to have an explicit group, unless it is required to + avoid ambiguity. Since Python tends toward the explicit, groups + are also made explicit in the documentation markup. + + Groups are used only sparingly in the Python documentation, except + for their use in marking parameters to macros and environments. + + A \dfn{macro} is usually simple construct which is identified by + name and can take some number of parameters. In normal \LaTeX{} + usage, one of these can be optional. The markup is introduced + using the backslash character (\character{\e}), and the name is + given by alphabetic characters (no digits, hyphens, or + underscores). Required parameters should be marked as a group, + and optional parameters should be marked using the alternate + syntax for a group. + + For example, a macro named ``foo'' which takes a single parameter + would appear like this: + + \begin{verbatim} + \name{parameter} + \end{verbatim} + + A macro which takes an optional parameter would be typed like this + when the optional paramter is given: + + \begin{verbatim} + \name[optional] + \end{verbatim} + + If both optional and required parameters are to be required, it + looks like this: + + \begin{verbatim} + \name[optional]{required} + \end{verbatim} + + A macro name may be followed by a space or newline; a space + between the macro name and any parameters will be consumed, but + this usage is not practiced in the Python documentation. Such a + space is still consumed if there are no parameters to the marco, + in which case inserting an empty group (\code{\{\}}) or explicit + word space (\samp{\e\ }) immediately after the macro name helps to + avoid running the expansion of the macro into the following text. + Macros which take no parameters but which should not be followed + by a word space do not need special treatment if the following + character in the document source if not a name character (such as + puctuation). + + Each line of this example shows an appropriate way to write text + which includes a macro which takes no parameters: + + \begin{verbatim} + This \UNIX{} is followed by a space. + This \UNIX\ is also followed by a space. + \UNIX, followed by a comma, needs no additional markup. + \end{verbatim} + + An \dfn{environment} is ... + + There are a number of less-used marks in \LaTeX{} are used to + enter non-\ASCII{} characters, especially those used in European + names. Some which are found in the Python documentation are: + + XXX Table of Latin-1 characters that we've actually used in the + Python documentation, pointer to other, more complete + documentation elsewhere. + + + \subsection{Hierarchical Structure} + + XXX Talk about the traditional sectional hierarchy and how it's + marked in \LaTeX. + + \section{Document Classes \label{classes}} *************** *** 391,395 **** Representing an interactive session requires including the prompts and output along with the Python code. No special markup is ! required for interactive sessions. Within the \env{verbatim} environment, characters special to --- 508,520 ---- Representing an interactive session requires including the prompts and output along with the Python code. No special markup is ! required for interactive sessions. After the last line of input ! or output presented, there should not be an ``unused'' primary ! prompt; this is an example of what \emph{not} to do: ! ! \begin{verbatim} ! >>> 1 + 1 ! 2 ! >>> ! \end{verbatim} Within the \env{verbatim} environment, characters special to *************** *** 397,401 **** example will be presented in a monospaced font; no attempt at ``pretty-printing'' is made, as the environment must work for ! non-Python code and non-code displays. The Python Documentation Special Interest Group has discussed a --- 522,527 ---- example will be presented in a monospaced font; no attempt at ``pretty-printing'' is made, as the environment must work for ! non-Python code and non-code displays. There should be no blank ! lines at the top or bottom of any \env{verbatim} display. The Python Documentation Special Interest Group has discussed a *************** *** 657,661 **** some way (new parameters, changed side effects, etc.). \var{explanation} should be a \emph{brief} explanation of the ! change consisting of a non-capitalized sentence fragment; a period will be appended by the formatting process. This is typically added to the end of the first paragraph of the --- 783,787 ---- some way (new parameters, changed side effects, etc.). \var{explanation} should be a \emph{brief} explanation of the ! change consisting of a capitalized sentence fragment; a period will be appended by the formatting process. This is typically added to the end of the first paragraph of the From python-dev@python.org Thu Oct 19 06:54:54 2000 From: python-dev@python.org (Fred L. Drake) Date: Wed, 18 Oct 2000 22:54:54 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools push-docs.sh,NONE,1.1 update-docs.sh,NONE,1.1 Message-ID: <200010190554.WAA00911@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tools In directory slayer.i.sourceforge.net:/tmp/cvs-serv902 Added Files: push-docs.sh update-docs.sh Log Message: Helper scripts used in published the "development" snapshots of the Python documentation. --- NEW FILE --- #! /bin/sh # Script to push docs from my development area to SourceForge, where the # update-docs.sh script unpacks them into their final destination. START="`pwd`" MYDIR="`dirname $0`" cd "$MYDIR" MYDIR="`pwd`" HTMLDIR="${HTMLDIR:-html}" cd "../$HTMLDIR" make --no-print-directory || exit $? RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'` make --no-print-directory HTMLDIR="$HTMLDIR" bziphtml scp "html-$RELEASE.tar.bz2" python.sourceforge.net:/home/users/fdrake/python-docs-update.tar.bz2 --- NEW FILE --- #! /bin/sh # Script which determines if a new development snapshot of the # documentation is available, and unpacks it into the "Python @ # SourceForge" website. # # A copy of this script is run periodically via cron. if [ -z "$HOME" ] ; then HOME=`grep fdrake /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'` export HOME fi UPDATES=/home/users/fdrake/python-docs-update.tar.bz2 if [ -f "$UPDATES" ] ; then cd /home/groups/python/htdocs rm -rf devel-docs || exit $? mkdir devel-docs || exit $? cd devel-docs || exit $? (bzip2 -dc "$UPDATES" | tar xf -) || exit $? rm "$UPDATES" || exit $? Mail -s '[online doc updates]' fdrake@acm.org < Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv1052 Modified Files: ACKS Log Message: Two more names. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ACKS 2000/10/14 04:47:53 1.5 --- ACKS 2000/10/19 05:58:03 1.6 *************** *** 53,56 **** --- 53,57 ---- Manus Hand Travis B. Hartwell + Janko Hauser Bernhard Herzog Magnus L. Hetland *************** *** 93,96 **** --- 94,98 ---- Vincent Marchetti Aahz Maruch + Laura Matson Doug Mennella Paolo Milani From python-dev@python.org Thu Oct 19 08:36:31 2000 From: python-dev@python.org (Lars Marius Garshol) Date: Thu, 19 Oct 2000 00:36:31 -0700 Subject: [Python-checkins] CVS: python/dist/src/Lib/xml/sax expatreader.py,1.18,1.19 Message-ID: <200010190736.AAA07087@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/xml/sax In directory slayer.i.sourceforge.net:/tmp/cvs-serv7072 Modified Files: expatreader.py Log Message: Fixed a bug that caused namespace names to be reported as lists rather than tuples. Index: expatreader.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** expatreader.py 2000/10/14 10:28:01 1.18 --- expatreader.py 2000/10/19 07:36:29 1.19 *************** *** 146,149 **** --- 146,151 ---- if len(pair) == 1: pair = (None, name) + else: + pair = tuple(pair) newattrs = {} From python-dev@python.org Thu Oct 19 14:25:18 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 19 Oct 2000 06:25:18 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.203,1.204 Message-ID: <200010191325.GAA12639@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv12516 Modified Files: Makefile Log Message: Remove the bzip2 archives from the "distfiles" target. There are not enough downloads to keep this around. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.203 retrieving revision 1.204 diff -C2 -r1.203 -r1.204 *** Makefile 2000/10/13 15:35:26 1.203 --- Makefile 2000/10/19 13:25:15 1.204 *************** *** 328,333 **** bzips: bzippdf bzipps bziphtml ! distfiles: tarballs zips bzips ! $(TOOLSDIR)/mksourcepkg --all $(RELEASE) --- 328,333 ---- bzips: bzippdf bzipps bziphtml ! distfiles: tarballs zips ! $(TOOLSDIR)/mksourcepkg --zip --gzip $(RELEASE) From python-dev@python.org Fri Oct 20 04:03:21 2000 From: python-dev@python.org (Fred L. Drake) Date: Thu, 19 Oct 2000 20:03:21 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.118,1.119 Message-ID: <200010200303.UAA14056@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/tut In directory slayer.i.sourceforge.net:/tmp/cvs-serv13833/tut Modified Files: tut.tex Log Message: Update the display of some floating point values at the interactive prompt to reflect current behavior. This closes SourceForge bug #117305. Made a reference to the library reference a hyperlink. Fixed some minor markup nits. Index: tut.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -r1.118 -r1.119 *** tut.tex 2000/09/29 15:17:36 1.118 --- tut.tex 2000/10/20 03:03:18 1.119 *************** *** 1047,1052 **** % Weird spacings happen here if the wrapping of the source text % gets changed in the wrong way. ! is a substitute for the \emph{switch} or ! \emph{case} statements found in other languages. --- 1047,1052 ---- % Weird spacings happen here if the wrapping of the source text % gets changed in the wrong way. ! is a substitute for the \keyword{switch} or ! \keyword{case} statements found in other languages. *************** *** 2601,2605 **** >>> ps = repr(p) >>> ps ! '[31.4, 40000]' >>> # Converting a string adds string quotes and backslashes: ... hello = 'hello, world\n' --- 2601,2605 ---- >>> ps = repr(p) >>> ps ! '[31.400000000000002, 40000]' >>> # Converting a string adds string quotes and backslashes: ... hello = 'hello, world\n' *************** *** 2609,2613 **** >>> # The argument of reverse quotes may be a tuple: ... `x, y, ('spam', 'eggs')` ! "(31.4, 40000, ('spam', 'eggs'))" \end{verbatim} --- 2609,2613 ---- >>> # The argument of reverse quotes may be a tuple: ... `x, y, ('spam', 'eggs')` ! "(31.400000000000002, 40000, ('spam', 'eggs'))" \end{verbatim} *************** *** 2968,2973 **** it will not display lines read from standard input. ! The \emph{Python Library Reference} lists the built-in exceptions and ! their meanings. --- 2968,2973 ---- it will not display lines read from standard input. ! The \citetitle[../lib/module-exceptions.html]{Python Library ! Reference} lists the built-in exceptions and their meanings. From python-dev@python.org Fri Oct 20 21:02:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 20 Oct 2000 13:02:40 -0700 Subject: [Python-checkins] CVS: python/dist/src/Modules threadmodule.c,2.39,2.40 Message-ID: <200010202002.NAA28215@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv28124 Modified Files: threadmodule.c Log Message: t_bootstram(): Use PySys_WriteStderr() instead of fprintf(stderr,...). This closes bug #117324. Index: threadmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -r2.39 -r2.40 *** threadmodule.c 2000/09/01 23:29:27 2.39 --- threadmodule.c 2000/10/20 20:02:37 2.40 *************** *** 198,202 **** PyErr_Clear(); else { ! fprintf(stderr, "Unhandled exception in thread:\n"); PyErr_PrintEx(0); } --- 198,202 ---- PyErr_Clear(); else { ! PySys_WriteStderr("Unhandled exception in thread:\n"); PyErr_PrintEx(0); } From python-dev@python.org Fri Oct 20 21:51:34 2000 From: python-dev@python.org (Fred L. Drake) Date: Fri, 20 Oct 2000 13:51:34 -0700 Subject: [Python-checkins] CVS: python/dist/src/Doc/doc doc.tex,1.34,1.35 Message-ID: <200010202051.NAA21980@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Doc/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv21845/doc Modified Files: doc.tex Log Message: Flesh out the "LaTeX Primer" some more. Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** doc.tex 2000/10/19 05:36:10 1.34 --- doc.tex 2000/10/20 20:51:31 1.35 *************** *** 298,316 **** \end{verbatim} ! An \dfn{environment} is ... There are a number of less-used marks in \LaTeX{} are used to enter non-\ASCII{} characters, especially those used in European ! names. Some which are found in the Python documentation are: ! XXX Table of Latin-1 characters that we've actually used in the ! Python documentation, pointer to other, more complete ! documentation elsewhere. \subsection{Hierarchical Structure} ! XXX Talk about the traditional sectional hierarchy and how it's ! marked in \LaTeX. --- 298,383 ---- \end{verbatim} ! An \dfn{environment} is a larger construct than a macro, and can ! be used for things with more content that would conveniently fit ! in a macro parameter. They are primarily used when formatting ! parameters need to be changed before and after a large chunk of ! content, but the content itself needs to be highly flexible. Code ! samples are presented using an environment, and descriptions of ! functions, methods, and classes are also marked using envionments. + Since the content of an environment is free-form and can consist + of several paragraphs, they are actually marked using a pair of + macros: \macro{begin} and \macro{end}. These macros both take the + name of the environment as a parameter. An example is the + environment used to mark the abstract of a document: + + \begin{verbatim} + \begin{abstract} + This is the text of the abstract. It concisely explains what + information is found in the document. + + It can consist of multiple paragraphs. + \end{abstract} + \end{verbatim} + + An environment can also have required and optional parameters of + its own. These follow the parameter of the \macro{begin} macro. + This example shows an environment which takes a single required + parameter: + + \begin{verbatim} + \begin{datadesc}{datadesc}{controlnames} + A 33-element string array that contains the \ASCII{} mnemonics for + the thirty-two \ASCII{} control characters from 0 (NUL) to 0x1f + (US), in order, plus the mnemonic \samp{SP} for the space character. + \end{datadesc} + \end{verbatim} + There are a number of less-used marks in \LaTeX{} are used to enter non-\ASCII{} characters, especially those used in European ! names. Given that these are often used adjacent to other ! characters, the markup required to produce the proper character ! may need to be followed by a space or an empty group, or the the ! markup can be enclosed in a group. Some which are found in Python ! documentation are: ! \begin{tableii}{c|l}{textrm}{Character}{Markup} ! \lineii{\c c}{\code{\e c c}} ! \lineii{\"o}{\code{\e"o}} ! \lineii{\o}{\code{\e o}} ! \end{tableii} \subsection{Hierarchical Structure} + + \LaTeX{} expects documents to be arranged in a conventional, + hierarchical way, with chapters, sections, sub-sections, + appendixes, and the like. These are marked using macros rather + than environments, probably because the end of a section can be + safely inferred when a section of equal or higher level starts. + + There are six ``levels'' of sectioning in the document classes + used for Python documentation, and the lowest two levels are not + used. The levels are: + + \begin{tableiii}{c|l|c}{textrm}{Level}{Macro Name}{Notes} + \lineiii{1}{\macro{chapter}}{(1)} + \lineiii{2}{\macro{section}}{} + \lineiii{3}{\macro{subsection}}{} + \lineiii{4}{\macro{subsubsections}}{} + \lineiii{5}{\macro{paragraph}}{(2)} + \lineiii{6}{\macro{subparagraph}}{} + \end{tableiii} + + \noindent + Notes: ! \begin{description} ! \item[(1)] ! Only used for the \code{manual} documents, as described in ! section \ref{classes}, ``Document Classes.'' ! \item[(2)] ! Not the same as a paragraph of text; nobody seems to use this. ! \end{description} From python-dev@python.org Thu Oct 26 00:08:51 2000 From: python-dev@python.org (Fred L. Drake, Jr.) Date: Wed, 25 Oct 2000 19:08:51 -0400 (EDT) Subject: [Python-checkins] SourceForge problems Message-ID: <14839.26627.968974.44752@cj42289-a.reston1.va.home.com> Presumably everyone on this list has noticed that its been quiet lately. ;) SourceForge is having some problems with mail delivery, and we're not entirely sure what the problem is. But check-in messages don't seem to be getting sent for some reason; they might be queued up somewhere or they may be lost. At any rate, there has been activity in the source tree; you just might want to do a CVS update to see what's changed. There have been a number of bug fixes, a fair number of documentation updates, and many of the modules in the standard library have been passed through Tim Peter's reindent.py script (look in Tools/scripts/). -Fred -- Fred L. Drake, Jr. PythonLabs Team Member From python-dev@python.org Sat Oct 28 11:43:05 2000 From: python-dev@python.org (Fredrik Lundh) Date: Sat, 28 Oct 2000 12:43:05 +0200 Subject: [Python-checkins] SourceForge problems References: <14839.26627.968974.44752@cj42289-a.reston1.va.home.com> Message-ID: <012e01c040cb$dc501b30$3c6340d5@hagrid> fred wrote: > At any rate, there has been activity in the source tree; you just > might want to do a CVS update to see what's changed. There have been > a number of bug fixes, a fair number of documentation updates, and > many of the modules in the standard library have been passed through > Tim Peter's reindent.py script (look in Tools/scripts/). now that this has been done, emacs users might want to add something like the following to their local configuration (based on code by jwz, so it should work...) ::: (defun python-mode-untabify () (save-excursion (goto-char (point-min)) (while (re-search-forward "[ \t]+$" nil t) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) (if (search-forward "\t" nil t) (untabify (1- (point)) (point-max)))) nil) (add-hook 'python-mode-hook '(lambda () (make-local-variable 'write-contents-hooks) (add-hook 'write-contents-hooks 'python-mode-untabify))) From python-dev@python.org Mon Oct 30 17:15:22 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 30 Oct 2000 09:15:22 -0800 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.212,2.213 Message-ID: <200010301715.JAA32564@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Python In directory slayer.i.sourceforge.net:/tmp/cvs-serv32349/Python Modified Files: ceval.c Log Message: Fix for SF bug #117241 When a method is called with no regular arguments and * args, defer the first arg is subclass check until after the * args have been expanded. N.B. The CALL_FUNCTION implementation is getting really hairy; should review it to see if it can be simplified. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.212 retrieving revision 2.213 diff -C2 -r2.212 -r2.213 *** ceval.c 2000/10/24 19:57:45 2.212 --- ceval.c 2000/10/30 17:15:19 2.213 *************** *** 1823,1827 **** n++; } ! else { /* Unbound methods must be called with an instance of the class (or a derived --- 1823,1827 ---- n++; } ! else if (!((flags & 1) && na == 0)) { /* Unbound methods must be called with an instance of the class (or a derived *************** *** 1895,1898 **** --- 1895,1912 ---- if (nstar < 0) { goto extcall_fail; + } + if (class && self == NULL && na == 0) { + /* * arg is first argument of method, + so check it is isinstance of class */ + self = PyTuple_GET_ITEM(stararg, 0); + if (!(PyInstance_Check(self) && + PyClass_IsSubclass((PyObject *) + (((PyInstanceObject *)self)->in_class), + class))) { + PyErr_SetString(PyExc_TypeError, + "unbound method must be called with instance as first argument"); + x = NULL; + break; + } } } From python-dev@python.org Mon Oct 30 17:15:22 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 30 Oct 2000 09:15:22 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_extcall.py,1.6,1.7 Message-ID: <200010301715.JAA32568@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test In directory slayer.i.sourceforge.net:/tmp/cvs-serv32349/Lib/test Modified Files: test_extcall.py Log Message: Fix for SF bug #117241 When a method is called with no regular arguments and * args, defer the first arg is subclass check until after the * args have been expanded. N.B. The CALL_FUNCTION implementation is getting really hairy; should review it to see if it can be simplified. Index: test_extcall.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_extcall.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** test_extcall.py 2000/10/23 17:22:07 1.6 --- test_extcall.py 2000/10/30 17:15:20 1.7 *************** *** 145,146 **** --- 145,164 ---- a, b = f2(1, *(2, 3), **d) print len(a), len(b), b == d + + class Foo: + def method(self, arg1, arg2): + return arg1 + arg2 + + x = Foo() + print Foo.method(*(x, 1, 2)) + print Foo.method(x, *(1, 2)) + try: + print Foo.method(*(1, 2, 3)) + except TypeError, err: + print err + try: + print Foo.method(1, *(2, 3)) + except TypeError, err: + print err + + From python-dev@python.org Mon Oct 30 17:35:25 2000 From: python-dev@python.org (Barry A. Warsaw) Date: Mon, 30 Oct 2000 12:35:25 -0500 (EST) Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.212,2.213 References: <200010301715.JAA32564@slayer.i.sourceforge.net> Message-ID: <14845.45405.867829.722598@anthem.concentric.net> Well, it looks like checkin messages are flowing again. Yay! From python-dev@python.org Mon Oct 30 17:45:10 2000 From: python-dev@python.org (Guido van Rossum) Date: Mon, 30 Oct 2000 09:45:10 -0800 Subject: [Python-checkins] CVS: python/dist/src configure,1.166,1.167 configure.in,1.174,1.175 Message-ID: <200010301745.JAA02424@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv2362 Modified Files: configure configure.in Log Message: Hack to force -lpthread instead instead of -lcma on HPUX, by Philipp Jocham. Philipp asks: "Are there any success stories with HP-UX 11.00 and -lcma? Maybe libcma is broken." Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -r1.166 -r1.167 *** configure 2000/10/26 17:09:35 1.166 --- configure 2000/10/30 17:45:07 1.167 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Revision: 1.173 # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # --- 1,8 ---- #! /bin/sh [...4187 lines suppressed...] ! echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) --- 6073,6077 ---- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) *************** *** 6353,6356 **** chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 --- 6377,6380 ---- chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.174 retrieving revision 1.175 diff -C2 -r1.174 -r1.175 *** configure.in 2000/10/26 17:09:35 1.174 --- configure.in 2000/10/30 17:45:07 1.175 *************** *** 791,794 **** --- 791,798 ---- LIBS="$LIBS -lthread" LIBOBJS="$LIBOBJS thread.o"], [ + AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD) + AC_DEFINE(_POSIX_THREADS) + LIBS="$LIBS -lpthread" + LIBOBJS="$LIBOBJS thread.o"], [ AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) *************** *** 796,800 **** LIBOBJS="$LIBOBJS thread.o"],[ USE_THREAD_MODULE="#"]) ! ])])])])])])])]) AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD) --- 800,804 ---- LIBOBJS="$LIBOBJS thread.o"],[ USE_THREAD_MODULE="#"]) ! ])])])])])])])])]) AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD) From python-dev@python.org Mon Oct 30 19:41:36 2000 From: python-dev@python.org (Jeremy Hylton) Date: Mon, 30 Oct 2000 11:41:36 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_extcall,1.4,1.5 Message-ID: <200010301941.LAA18619@slayer.i.sourceforge.net> Update of /cvsroot/python/python/dist/src/Lib/test/output In directory slayer.i.sourceforge.net:/tmp/cvs-serv18593 Modified Files: test_extcall Log Message: track recent change to test_extcall.py Index: test_extcall =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_extcall,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** test_extcall 2000/10/24 19:57:44 1.4 --- test_extcall 2000/10/30 19:41:33 1.5 *************** *** 28,29 **** --- 28,33 ---- ** argument must be a dictionary 3 512 1 + 3 + 3 + unbound method must be called with instance as first argument + unbound method must be called with instance as first argument From python-dev@python.org Mon Oct 30 20:48:46 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 30 Oct 2000 12:48:46 -0800 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.38,1.39 pep-0001.txt,1.12,1.13 pep-0003.txt,1.1,1.2 pep-0042.txt,1.39,1.40 pep-0160.txt,1.6,1.7 pep-0200.txt,1.44,1.45 pep-0201.txt,1.16,1.17 pep-0202.txt,1.5,1.6 pep-0205.txt,1.1,1.2 pep-0214.txt,1.9,1.10 pep-0223.txt,1.5,1.6 pep-0226.txt,1.1,1.2 Message-ID: <200010302048.MAA12741@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv12719 Modified Files: pep-0000.txt pep-0001.txt pep-0003.txt pep-0042.txt pep-0160.txt pep-0200.txt pep-0201.txt pep-0202.txt pep-0205.txt pep-0214.txt pep-0223.txt pep-0226.txt Log Message: Update a few email addresses. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** pep-0000.txt 2000/10/26 21:22:48 1.38 --- pep-0000.txt 2000/10/30 20:48:44 1.39 *************** *** 2,6 **** Title: Index of Python Enhancement Proposals (PEPs) Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw) Status: Active Type: Informational --- 2,6 ---- Title: Index of Python Enhancement Proposals (PEPs) Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Status: Active Type: Informational *************** *** 73,78 **** ---------------- ------------- Ascher, David davida@activestate.com ! Drake, Fred fdrake@beopen.com ! Hylton, Jeremy jeremy@beopen.com Kuchling, Andrew akuchlin@mems-exchange.org Lemburg, Marc-Andre mal@lemburg.com --- 73,78 ---- ---------------- ------------- Ascher, David davida@activestate.com ! Drake, Fred fdrake@acm.org ! Hylton, Jeremy jeremy@digicool.com Kuchling, Andrew akuchlin@mems-exchange.org Lemburg, Marc-Andre mal@lemburg.com *************** *** 80,88 **** von Loewis, Martin loewis@informatik.hu-berlin.de McMillan, Gordon gmcm@hypernet.com ! Peters, Tim tpeters@beopen.com Prescod, Paul paul@prescod.net Raymond, Eric esr@snark.thyrsus.com Schneider-Kamp, Peter nownder@nowonder.de ! Warsaw, Barry bwarsaw@beopen.com Wilson, Greg gvwilson@nevex.com Wouters, Thomas thomas@xs4all.net --- 80,88 ---- von Loewis, Martin loewis@informatik.hu-berlin.de McMillan, Gordon gmcm@hypernet.com ! Peters, Tim tim@digicool.com Prescod, Paul paul@prescod.net Raymond, Eric esr@snark.thyrsus.com Schneider-Kamp, Peter nownder@nowonder.de ! Warsaw, Barry bwarsaw@digicool.com Wilson, Greg gvwilson@nevex.com Wouters, Thomas thomas@xs4all.net Index: pep-0001.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0001.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** pep-0001.txt 2000/10/16 20:32:29 1.12 --- pep-0001.txt 2000/10/30 20:48:44 1.13 *************** *** 2,7 **** Title: PEP Purpose and Guidelines Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw), ! jeremy@beopen.com (Jeremy Hylton) Status: Draft Type: Informational --- 2,7 ---- Title: PEP Purpose and Guidelines Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw), ! jeremy@digicool.com (Jeremy Hylton) Status: Draft Type: Informational *************** *** 40,44 **** PEP Workflow ! The PEP editor, Barry Warsaw , assigns numbers for each PEP and changes its status. --- 40,44 ---- PEP Workflow ! The PEP editor, Barry Warsaw , assigns numbers for each PEP and changes its status. *************** *** 59,63 **** status include duplication of effort, being technically unsound, or not in keeping with the Python philosophy; the BDFL (Benevolent ! Dictator for Life, Guido van Rossum ) is the final arbitrator of the latter. --- 59,63 ---- status include duplication of effort, being technically unsound, or not in keeping with the Python philosophy; the BDFL (Benevolent ! Dictator for Life, Guido van Rossum ) is the final arbitrator of the latter. Index: pep-0003.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0003.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0003.txt 2000/09/25 16:08:03 1.1 --- pep-0003.txt 2000/10/30 20:48:44 1.2 *************** *** 2,6 **** Title: Guidelines for Handling Bug Reports Version: $Revision$ ! Author: jeremy@beopen.com (Jeremy Hylton) Status: Active Type: Informational --- 2,6 ---- Title: Guidelines for Handling Bug Reports Version: $Revision$ ! Author: jeremy@alum.mit.edu (Jeremy Hylton) Status: Active Type: Informational Index: pep-0042.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0042.txt,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** pep-0042.txt 2000/10/25 20:58:27 1.39 --- pep-0042.txt 2000/10/30 20:48:44 1.40 *************** *** 2,6 **** Title: Feature Requests Version: $Revision$ ! Author: Jeremy Hylton Status: Active Type: Informational --- 2,6 ---- Title: Feature Requests Version: $Revision$ ! Author: Jeremy Hylton Status: Active Type: Informational Index: pep-0160.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0160.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** pep-0160.txt 2000/09/07 04:30:29 1.6 --- pep-0160.txt 2000/10/30 20:48:44 1.7 *************** *** 2,6 **** Title: Python 1.6 Release Schedule Version: $Revision$ ! Owner: Fred L. Drake, Jr. Python-Version: 1.6 Status: Complete --- 2,6 ---- Title: Python 1.6 Release Schedule Version: $Revision$ ! Owner: Fred L. Drake, Jr. Python-Version: 1.6 Status: Complete Index: pep-0200.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0200.txt,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 *** pep-0200.txt 2000/10/05 14:35:13 1.44 --- pep-0200.txt 2000/10/30 20:48:44 1.45 *************** *** 2,6 **** Title: Python 2.0 Release Schedule Version: $Revision$ ! Owner: Jeremy Hylton Python-Version: 2.0 Status: Incomplete --- 2,6 ---- Title: Python 2.0 Release Schedule Version: $Revision$ ! Owner: Jeremy Hylton Python-Version: 2.0 Status: Incomplete Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** pep-0201.txt 2000/09/23 08:18:32 1.16 --- pep-0201.txt 2000/10/30 20:48:44 1.17 *************** *** 2,6 **** Title: Lockstep Iteration Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw) Status: Final Type: Standards Track --- 2,6 ---- Title: Lockstep Iteration Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Status: Final Type: Standards Track Index: pep-0202.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0202.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep-0202.txt 2000/08/23 05:19:21 1.5 --- pep-0202.txt 2000/10/30 20:48:44 1.6 *************** *** 2,6 **** Title: List Comprehensions Version: $Revision$ ! Author: tpeters@beopen.com (Tim Peters) Status: Draft Type: Standards Track --- 2,6 ---- Title: List Comprehensions Version: $Revision$ ! Author: tim@digicool.com (Tim Peters) Status: Draft Type: Standards Track Index: pep-0205.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0205.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0205.txt 2000/07/14 03:44:01 1.1 --- pep-0205.txt 2000/10/30 20:48:44 1.2 *************** *** 2,6 **** Title: Weak References Version: $Revision$ ! Owner: fdrake@beopen.com (Fred Drake) Python-Version: 2.1 Status: Incomplete --- 2,6 ---- Title: Weak References Version: $Revision$ ! Owner: fdrake@acm.org (Fred Drake) Python-Version: 2.1 Status: Incomplete Index: pep-0214.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0214.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** pep-0214.txt 2000/10/27 10:25:44 1.9 --- pep-0214.txt 2000/10/30 20:48:44 1.10 *************** *** 2,6 **** Title: Extended Print Statement Version: $Revision$ ! Author: bwarsaw@beopen.com (Barry A. Warsaw) Python-Version: 2.0 Status: Final --- 2,6 ---- Title: Extended Print Statement Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Python-Version: 2.0 Status: Final Index: pep-0223.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0223.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pep-0223.txt 2000/09/23 08:16:25 1.5 --- pep-0223.txt 2000/10/30 20:48:44 1.6 *************** *** 2,6 **** Title: Change the Meaning of \x Escapes Version: $Revision$ ! Author: tpeters@beopen.com (Tim Peters) Status: Final Type: Standards Track --- 2,6 ---- Title: Change the Meaning of \x Escapes Version: $Revision$ ! Author: tim@digicool.com (Tim Peters) Status: Final Type: Standards Track Index: pep-0226.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0226.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pep-0226.txt 2000/10/16 21:24:49 1.1 --- pep-0226.txt 2000/10/30 20:48:44 1.2 *************** *** 2,6 **** Title: Python 2.1 Release Schedule Version: $Revision$ ! Author: Jeremy Hylton Status: Incomplete Type: Informational --- 2,6 ---- Title: Python 2.1 Release Schedule Version: $Revision$ ! Author: Jeremy Hylton Status: Incomplete Type: Informational From python-dev@python.org Mon Oct 30 21:16:40 2000 From: python-dev@python.org (Fred L. Drake) Date: Mon, 30 Oct 2000 13:16:40 -0800 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.39,1.40 pep-0001.txt,1.13,1.14 pep-0201.txt,1.17,1.18 pep-0214.txt,1.10,1.11 Message-ID: <200010302116.NAA16491@slayer.i.sourceforge.net> Update of /cvsroot/python/python/nondist/peps In directory slayer.i.sourceforge.net:/tmp/cvs-serv16479 Modified Files: pep-0000.txt pep-0001.txt pep-0201.txt pep-0214.txt Log Message: It's "barry" now, not "bwarsaw"... Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** pep-0000.txt 2000/10/30 20:48:44 1.39 --- pep-0000.txt 2000/10/30 21:16:38 1.40 *************** *** 2,6 **** Title: Index of Python Enhancement Proposals (PEPs) Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Status: Active Type: Informational --- 2,6 ---- Title: Index of Python Enhancement Proposals (PEPs) Version: $Revision$ ! Author: barry@digicool.com (Barry A. Warsaw) Status: Active Type: Informational *************** *** 84,88 **** Raymond, Eric esr@snark.thyrsus.com Schneider-Kamp, Peter nownder@nowonder.de ! Warsaw, Barry bwarsaw@digicool.com Wilson, Greg gvwilson@nevex.com Wouters, Thomas thomas@xs4all.net --- 84,88 ---- Raymond, Eric esr@snark.thyrsus.com Schneider-Kamp, Peter nownder@nowonder.de ! Warsaw, Barry barry@digicool.com Wilson, Greg gvwilson@nevex.com Wouters, Thomas thomas@xs4all.net Index: pep-0001.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0001.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** pep-0001.txt 2000/10/30 20:48:44 1.13 --- pep-0001.txt 2000/10/30 21:16:38 1.14 *************** *** 2,6 **** Title: PEP Purpose and Guidelines Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw), jeremy@digicool.com (Jeremy Hylton) Status: Draft --- 2,6 ---- Title: PEP Purpose and Guidelines Version: $Revision$ ! Author: barry@digicool.com (Barry A. Warsaw), jeremy@digicool.com (Jeremy Hylton) Status: Draft *************** *** 40,44 **** PEP Workflow ! The PEP editor, Barry Warsaw , assigns numbers for each PEP and changes its status. --- 40,44 ---- PEP Workflow ! The PEP editor, Barry Warsaw , assigns numbers for each PEP and changes its status. Index: pep-0201.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0201.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** pep-0201.txt 2000/10/30 20:48:44 1.17 --- pep-0201.txt 2000/10/30 21:16:38 1.18 *************** *** 2,6 **** Title: Lockstep Iteration Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Status: Final Type: Standards Track --- 2,6 ---- Title: Lockstep Iteration Version: $Revision$ ! Author: barry@digicool.com (Barry A. Warsaw) Status: Final Type: Standards Track Index: pep-0214.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0214.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** pep-0214.txt 2000/10/30 20:48:44 1.10 --- pep-0214.txt 2000/10/30 21:16:38 1.11 *************** *** 2,6 **** Title: Extended Print Statement Version: $Revision$ ! Author: bwarsaw@digicool.com (Barry A. Warsaw) Python-Version: 2.0 Status: Final --- 2,6 ---- Title: Extended Print Statement Version: $Revision$ ! Author: barry@digicool.com (Barry A. Warsaw) Python-Version: 2.0 Status: Final