[Patches] SF down for maintenance: here 3 patches

Gerrit Holl gerrit@nl.linux.org
Wed, 4 Jun 2003 13:45:33 +0200


--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

since SF is down for maintanaince, and I don't know for how long,
I'm putting my patches here:

parsedate.diff      parsedate correctly uses last 3 items of tuple
demo_dates.diff     Demo/classes/Dates.py tells about DateTime
tools_README.diff   Updates {Demo,Tools}/scripts/README

yours,
Gerrit.

-- 
14. If any one steal the minor son of another, he shall be put to
death.
        -- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
	http://www.sp.nl/

--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="tools_README.diff"

Index: Demo/scripts/README
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/scripts/README,v
retrieving revision 1.19
diff -u -r1.19 README
--- Demo/scripts/README	1 Jan 2003 20:27:13 -0000	1.19
+++ Demo/scripts/README	4 Jun 2003 11:38:45 -0000
@@ -2,18 +2,23 @@
 
 See also the Tools/scripts directory!
 
+beer.py         Print the classic 'bottles of beer' list.
+eqfix.py        Fix .py files to use the correct equality test operator
 fact.py			Factorize numbers
 find-uname.py		Search for Unicode characters using regexps.
 from.py			Summarize mailbox
 ftpstats.py		Summarize ftp daemon log file
 lpwatch.py		Watch BSD line printer queues
+makedir.py      Like mkdir -p
 markov.py		Markov chain simulation of words or characters
 mboxconvvert.py		Convert MH or MMDF mailboxes to unix mailbox format
+mkrcs.py        Fix symlinks named RCS into parallel tree
 morse.py		Produce morse code (audible or on AIFF file)
 mpzpi.py		test mpz -- print digits of pi (compare pi.py)
 pi.py			Print all digits of pi -- given enough time and memory
 pp.py			Emulate some Perl command line options
 primes.py		Print prime numbers
+queens.py       Dijkstra's solution to Wirth's "N Queens problem"
 script.py		Equivalent to BSD script(1) -- by Steen Lumholt
 unbirthday.py		Print unbirthday count
 update.py		Update a bunch of files according to a script.
Index: Tools/scripts/README
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/README,v
retrieving revision 1.11
diff -u -r1.11 README
--- Tools/scripts/README	10 May 2003 03:30:13 -0000	1.11
+++ Tools/scripts/README	4 Jun 2003 11:38:45 -0000
@@ -6,21 +6,28 @@
 
 byext.py		Print lines/words/chars stats of files by extension
 byteyears.py		Print product of a file's size and age
+checkappend.py  Search for multi-argument .append() calls
 checkpyc.py		Check presence and validity of ".pyc" files
 classfix.py		Convert old class syntax to new
+cleanfuture.py  Fix reduntant Python __future__ statements
+combinerefs.py  A helper for analyzing PYTHONDUMPREFS output.
 copytime.py		Copy one file's atime and mtime to another
 crlf.py			Change CRLF line endings to LF (Windows to Unix)
 cvsfiles.py		Print a list of files that are under CVS
 db2pickle.py		Dump a database file to a pickle
 dutree.py		Format du(1) output as a tree sorted by size
 eptags.py		Create Emacs TAGS file for Python modules
+finddiv.py      A grep-like tool that looks for division operators.
 findlinksto.py		Recursively find symbolic links to a given path prefix
 fixcid.py		Massive identifier substitution on C source files
+fixdiv.py       Tool to fix division operators.
 fixheader.py		Add some cpp magic to a C include file
 fixnotice.py		Fix the copyright notice in source files
 fixps.py		Fix Python scripts' first line (if #!)
 ftpmirror.py		FTP mirror script
 gencodec.py		Create Python codecs from Unicode mapping files
+google.py       Open a webbrowser with Google.
+gprof2html.py   Transform gprof(1) output into useful HTML.
 h2py.py			Translate #define's into Python assignments
 ifdef.py		Remove #if(n)def groups from C sources
 lfcr.py			Change LF line endings to CRLF (Unix to Windows)
@@ -28,23 +35,27 @@
 lll.py			Find and list symbolic links in current directory
 logmerge.py		Consolidate CVS/RCS logs read from stdin
 mailerdaemon.py		parse error messages from mailer daemons (Sjoerd&Jack)
+md5sum.py       Python utility to print MD5 checksums of argument files.
 methfix.py		Fix old method syntax def f(self, (a1, ..., aN)):
 mkreal.py		Turn a symbolic link into a real file or directory
 ndiff.py		Intelligent diff between text files (Tim Peters)
 nm2def.py		Create a template for PC/python_nt.def (Marc Lemburg)
 objgraph.py		Print object graph from nm output on a library
+parseentities.py    Utility for parsing HTML entity definitions
 pathfix.py		Change #!/usr/local/bin/python into something else
 pdeps.py		Print dependencies between Python modules
 pickle2db.py		Load a pickle generated by db2pickle.py to a database
 pindent.py		Indent Python code, giving block-closing comments
 ptags.py		Create vi tags file for Python modules
+pydoc           Python documentation browser.
+redemo.py       Basic regular expression demostration facility
+reindent.py     Change .py files to use 4-space indents.
 rgrep.py		Reverse grep through a file (useful for big logfiles)
+setup.py        Install all scripts listed here.
 suff.py			Sort a list of files by suffix
-sum5.py			Print md5 checksums of files
-tabnanny.py		Check for ambiguous indentation (Tim Peters)
-tabpolice.py		Check for ambiguous indentation (GvR)
 texcheck.py             Validate Python LaTeX formatting (Raymond Hettinger)
 texi2html.py		Convert GNU texinfo files into HTML
+trace.py        Trace Python program or function execution
 treesync.py		Synchronize source trees (very ideosyncratic)
 untabify.py		Replace tabs with spaces in argument files
 which.py		Find a program in $PATH

--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="demo_dates.diff"

Index: Dates.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/classes/Dates.py,v
retrieving revision 1.3
diff -u -r1.3 Dates.py
--- Dates.py	14 Sep 1998 15:34:45 -0000	1.3
+++ Dates.py	4 Jun 2003 09:48:31 -0000
@@ -8,7 +8,7 @@
 # the date `int' days from `date'; date+date raises an exception;
 # date-int returns the date `int' days before `date'; date2-date1 returns
 # an integer, the number of days from date1 to date2; int-date raises an
-# exception; date1 < date2 is true iff date1 occurs before date2 (&
+# exception; date1 < date2 is true if date1 occurs before date2 (&
 # similarly for other comparisons); min(date1,date2) is the earlier of
 # the two dates and max(date1,date2) the later; and date objects can be
 # used as dictionary keys.
@@ -35,6 +35,9 @@
 
 # Adapted to Python 1.1 (where some hacks to overcome coercion are unnecessary)
 # by Guido van Rossum
+
+# Note that as of Python 2.3, a datetime module is included in the stardard
+# library.
 
 # vi:set tabsize=8:
 

--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="parsedate.diff"

Index: dist/src/Doc/lib/emailutil.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/emailutil.tex,v
retrieving revision 1.8
diff -u -r1.8 emailutil.tex
--- dist/src/Doc/lib/emailutil.tex	1 Oct 2002 04:33:16 -0000	1.8
+++ dist/src/Doc/lib/emailutil.tex	3 Jun 2003 18:48:16 -0000
@@ -56,8 +56,7 @@
 \code{"Mon, 20 Nov 1995 19:12:08 -0500"}.  If it succeeds in parsing
 the date, \function{parsedate()} returns a 9-tuple that can be passed
 directly to \function{time.mktime()}; otherwise \code{None} will be
-returned.  Note that fields 6, 7, and 8 of the result tuple are not
-usable.
+returned.
 \end{funcdesc}
 
 \begin{funcdesc}{parsedate_tz}{date}
Index: dist/src/Lib/email/_parseaddr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/_parseaddr.py,v
retrieving revision 1.6
diff -u -r1.6 _parseaddr.py
--- dist/src/Lib/email/_parseaddr.py	8 May 2003 03:33:15 -0000	1.6
+++ dist/src/Lib/email/_parseaddr.py	3 Jun 2003 18:48:20 -0000
@@ -131,7 +131,7 @@
     """Convert a time string to a time tuple."""
     t = parsedate_tz(data)
     if isinstance(t, TupleType):
-        return t[:9]
+        return time.localtime(time.mktime(t[:9]))
     else:
         return t
 

--jRHKVT23PllUwdXP--