[Python-checkins] r71339 - in python/branches/py3k-short-float-repr: Doc/distutils/builtdist.rst Doc/library/binhex.rst Doc/library/bisect.rst Doc/library/builtins.rst Doc/library/bz2.rst Doc/library/calendar.rst Doc/library/cgi.rst Doc/library/cgitb.rst Doc/library/chunk.rst Doc/library/cmath.rst Doc/library/cmd.rst Doc/library/code.rst Doc/library/codecs.rst Doc/whatsnew/3.1.rst Lib/distutils/command/bdist.py Lib/distutils/filelist.py Lib/distutils/tests/test_bdist.py Lib/distutils/tests/test_filelist.py Misc/NEWS Tools/msi/uuids.py
eric.smith
python-checkins at python.org
Tue Apr 7 01:43:46 CEST 2009
Author: eric.smith
Date: Tue Apr 7 01:43:45 2009
New Revision: 71339
Log:
Merged revisions 71281-71338 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r71284 | tarek.ziade | 2009-04-05 17:49:36 -0400 (Sun, 05 Apr 2009) | 9 lines
Merged revisions 71280 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71280 | tarek.ziade | 2009-04-05 23:44:08 +0200 (Sun, 05 Apr 2009) | 1 line
Fixed #1491431: distutils.filelist.glob_to_re was broken for some edge cases (detailed in the test
........
................
r71289 | georg.brandl | 2009-04-05 18:20:44 -0400 (Sun, 05 Apr 2009) | 1 line
Update signature style of optional arguments, part two.
................
r71293 | tarek.ziade | 2009-04-05 18:57:21 -0400 (Sun, 05 Apr 2009) | 9 lines
Merged revisions 71291 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71291 | tarek.ziade | 2009-04-06 00:51:09 +0200 (Mon, 06 Apr 2009) | 1 line
Fixed #5095: msi missing from Distutils bdist formats
........
................
r71297 | tarek.ziade | 2009-04-05 19:05:31 -0400 (Sun, 05 Apr 2009) | 9 lines
Merged revisions 71295 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71295 | tarek.ziade | 2009-04-06 01:03:10 +0200 (Mon, 06 Apr 2009) | 1 line
pep8-fied method names
........
................
r71316 | raymond.hettinger | 2009-04-06 13:55:05 -0400 (Mon, 06 Apr 2009) | 1 line
Add more examples.
................
r71326 | martin.v.loewis | 2009-04-06 17:16:46 -0400 (Mon, 06 Apr 2009) | 1 line
Add uuids for 3.1
................
r71332 | raymond.hettinger | 2009-04-06 18:39:03 -0400 (Mon, 06 Apr 2009) | 1 line
Add example. Fix spelling. Fix patch attribution.
................
r71333 | raymond.hettinger | 2009-04-06 18:45:52 -0400 (Mon, 06 Apr 2009) | 1 line
Fix links to Decimal and ttk.
................
r71336 | raymond.hettinger | 2009-04-06 19:11:08 -0400 (Mon, 06 Apr 2009) | 1 line
Improve the prose just a bit.
................
r71337 | raymond.hettinger | 2009-04-06 19:11:47 -0400 (Mon, 06 Apr 2009) | 1 line
Fix nit.
................
Added:
python/branches/py3k-short-float-repr/Lib/distutils/tests/test_bdist.py
- copied unchanged from r71337, /python/branches/py3k/Lib/distutils/tests/test_bdist.py
python/branches/py3k-short-float-repr/Lib/distutils/tests/test_filelist.py
- copied unchanged from r71337, /python/branches/py3k/Lib/distutils/tests/test_filelist.py
Modified:
python/branches/py3k-short-float-repr/ (props changed)
python/branches/py3k-short-float-repr/Doc/distutils/builtdist.rst
python/branches/py3k-short-float-repr/Doc/library/binhex.rst
python/branches/py3k-short-float-repr/Doc/library/bisect.rst
python/branches/py3k-short-float-repr/Doc/library/builtins.rst
python/branches/py3k-short-float-repr/Doc/library/bz2.rst
python/branches/py3k-short-float-repr/Doc/library/calendar.rst
python/branches/py3k-short-float-repr/Doc/library/cgi.rst
python/branches/py3k-short-float-repr/Doc/library/cgitb.rst
python/branches/py3k-short-float-repr/Doc/library/chunk.rst
python/branches/py3k-short-float-repr/Doc/library/cmath.rst
python/branches/py3k-short-float-repr/Doc/library/cmd.rst
python/branches/py3k-short-float-repr/Doc/library/code.rst
python/branches/py3k-short-float-repr/Doc/library/codecs.rst
python/branches/py3k-short-float-repr/Doc/whatsnew/3.1.rst
python/branches/py3k-short-float-repr/Lib/distutils/command/bdist.py
python/branches/py3k-short-float-repr/Lib/distutils/filelist.py
python/branches/py3k-short-float-repr/Misc/NEWS
python/branches/py3k-short-float-repr/Tools/msi/uuids.py
Modified: python/branches/py3k-short-float-repr/Doc/distutils/builtdist.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/distutils/builtdist.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/distutils/builtdist.rst Tue Apr 7 01:43:45 2009
@@ -80,7 +80,7 @@
+-------------+------------------------------+---------+
| ``tar`` | tar file (:file:`.tar`) | \(3) |
+-------------+------------------------------+---------+
-| ``zip`` | zip file (:file:`.zip`) | \(4) |
+| ``zip`` | zip file (:file:`.zip`) | (2),(4) |
+-------------+------------------------------+---------+
| ``rpm`` | RPM | \(5) |
+-------------+------------------------------+---------+
@@ -90,9 +90,12 @@
+-------------+------------------------------+---------+
| ``rpm`` | RPM | \(5) |
+-------------+------------------------------+---------+
-| ``wininst`` | self-extracting ZIP file for | (2),(4) |
+| ``wininst`` | self-extracting ZIP file for | \(4) |
| | Windows | |
+-------------+------------------------------+---------+
+| ``msi`` | Microsoft Installer. | |
++-------------+------------------------------+---------+
+
Notes:
@@ -102,8 +105,6 @@
(2)
default on Windows
- **\*\*** to-do! **\*\***
-
(3)
requires external utilities: :program:`tar` and possibly one of :program:`gzip`,
:program:`bzip2`, or :program:`compress`
@@ -133,6 +134,8 @@
+--------------------------+-----------------------+
| :command:`bdist_wininst` | wininst |
+--------------------------+-----------------------+
+| :command:`bdist_msi` | msi |
++--------------------------+-----------------------+
The following sections give details on the individual :command:`bdist_\*`
commands.
Modified: python/branches/py3k-short-float-repr/Doc/library/binhex.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/binhex.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/binhex.rst Tue Apr 7 01:43:45 2009
@@ -1,4 +1,3 @@
-
:mod:`binhex` --- Encode and decode binhex4 files
=================================================
@@ -19,11 +18,11 @@
supporting a :meth:`write` and :meth:`close` method).
-.. function:: hexbin(input[, output])
+.. function:: hexbin(input, output)
Decode a binhex file *input*. *input* may be a filename or a file-like object
supporting :meth:`read` and :meth:`close` methods. The resulting file is written
- to a file named *output*, unless the argument is omitted in which case the
+ to a file named *output*, unless the argument is ``None`` in which case the
output filename is read from the binhex file.
The following exception is also defined:
Modified: python/branches/py3k-short-float-repr/Doc/library/bisect.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/bisect.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/bisect.rst Tue Apr 7 01:43:45 2009
@@ -1,4 +1,3 @@
-
:mod:`bisect` --- Array bisection algorithm
===========================================
@@ -17,43 +16,35 @@
The following functions are provided:
-.. function:: bisect_left(list, item[, lo[, hi]])
-
- Locate the proper insertion point for *item* in *list* to maintain sorted order.
- The parameters *lo* and *hi* may be used to specify a subset of the list which
- should be considered; by default the entire list is used. If *item* is already
- present in *list*, the insertion point will be before (to the left of) any
- existing entries. The return value is suitable for use as the first parameter
- to ``list.insert()``. This assumes that *list* is already sorted.
-
-
-.. function:: bisect_right(list, item[, lo[, hi]])
-
- Similar to :func:`bisect_left`, but returns an insertion point which comes after
- (to the right of) any existing entries of *item* in *list*.
-
-
-.. function:: bisect(...)
+.. function:: bisect_left(a, x, lo=0, hi=len(a))
- Alias for :func:`bisect_right`.
+ Locate the proper insertion point for *x* in *a* to maintain sorted order.
+ The parameters *lo* and *hi* may be used to specify a subset of the list
+ which should be considered; by default the entire list is used. If *x* is
+ already present in *a*, the insertion point will be before (to the left of)
+ any existing entries. The return value is suitable for use as the first
+ parameter to ``list.insert()``. This assumes that *a* is already sorted.
-.. function:: insort_left(list, item[, lo[, hi]])
+.. function:: bisect_right(a, x, lo=0, hi=len(a))
+ bisect(a, x, lo=0, hi=len(a))
- Insert *item* in *list* in sorted order. This is equivalent to
- ``list.insert(bisect.bisect_left(list, item, lo, hi), item)``. This assumes
- that *list* is already sorted.
+ Similar to :func:`bisect_left`, but returns an insertion point which comes
+ after (to the right of) any existing entries of *x* in *a*.
-.. function:: insort_right(list, item[, lo[, hi]])
+.. function:: insort_left(a, x, lo=0, hi=len(a))
- Similar to :func:`insort_left`, but inserting *item* in *list* after any
- existing entries of *item*.
+ Insert *x* in *a* in sorted order. This is equivalent to
+ ``a.insert(bisect.bisect_left(a, x, lo, hi), x)``. This assumes that *a* is
+ already sorted.
-.. function:: insort(...)
+.. function:: insort_right(a, x, lo=0, hi=len(a))
+ insort(a, x, lo=0, hi=len(a))
- Alias for :func:`insort_right`.
+ Similar to :func:`insort_left`, but inserting *x* in *a* after any existing
+ entries of *x*.
Examples
Modified: python/branches/py3k-short-float-repr/Doc/library/builtins.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/builtins.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/builtins.rst Tue Apr 7 01:43:45 2009
@@ -1,4 +1,3 @@
-
:mod:`builtins` --- Built-in objects
====================================
Modified: python/branches/py3k-short-float-repr/Doc/library/bz2.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/bz2.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/bz2.rst Tue Apr 7 01:43:45 2009
@@ -1,9 +1,9 @@
-
:mod:`bz2` --- Compression compatible with :program:`bzip2`
===========================================================
.. module:: bz2
- :synopsis: Interface to compression and decompression routines compatible with bzip2.
+ :synopsis: Interface to compression and decompression routines
+ compatible with bzip2.
.. moduleauthor:: Gustavo Niemeyer <niemeyer at conectiva.com>
.. sectionauthor:: Gustavo Niemeyer <niemeyer at conectiva.com>
@@ -42,7 +42,7 @@
Handling of compressed files is offered by the :class:`BZ2File` class.
-.. class:: BZ2File(filename[, mode[, buffering[, compresslevel]]])
+.. class:: BZ2File(filename, mode='r', buffering=0, compresslevel=9)
Open a bz2 file. Mode can be either ``'r'`` or ``'w'``, for reading (default)
or writing. When opened for writing, the file will be created if it doesn't
@@ -129,14 +129,13 @@
:class:`BZ2Compressor` and :class:`BZ2Decompressor`.
-.. class:: BZ2Compressor([compresslevel])
+.. class:: BZ2Compressor(compresslevel=9)
Create a new compressor object. This object may be used to compress data
sequentially. If you want to compress data in one shot, use the
:func:`compress` function instead. The *compresslevel* parameter, if given,
must be a number between ``1`` and ``9``; the default is ``9``.
-
.. method:: compress(data)
Provide more data to the compressor object. It will return chunks of
@@ -157,7 +156,6 @@
sequentially. If you want to decompress data in one shot, use the
:func:`decompress` function instead.
-
.. method:: decompress(data)
Provide more data to the decompressor object. It will return chunks of
@@ -174,7 +172,7 @@
and :func:`decompress` functions.
-.. function:: compress(data[, compresslevel])
+.. function:: compress(data, compresslevel=9)
Compress *data* in one shot. If you want to compress data sequentially, use
an instance of :class:`BZ2Compressor` instead. The *compresslevel* parameter,
Modified: python/branches/py3k-short-float-repr/Doc/library/calendar.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/calendar.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/calendar.rst Tue Apr 7 01:43:45 2009
@@ -1,10 +1,9 @@
-
:mod:`calendar` --- General calendar-related functions
======================================================
.. module:: calendar
- :synopsis: Functions for working with calendars, including some emulation of the Unix cal
- program.
+ :synopsis: Functions for working with calendars, including some emulation
+ of the Unix cal program.
.. sectionauthor:: Drew Csillag <drew_csillag at geocities.com>
@@ -23,7 +22,7 @@
it's the base calendar for all computations.
-.. class:: Calendar([firstweekday])
+.. class:: Calendar(firstweekday=0)
Creates a :class:`Calendar` object. *firstweekday* is an integer specifying the
first day of the week. ``0`` is Monday (the default), ``6`` is Sunday.
@@ -82,7 +81,7 @@
weeks. Weeks are lists of seven day numbers.
- .. method:: yeardatescalendar(year[, width])
+ .. method:: yeardatescalendar(year, width=3)
Return the data for the specified year ready for formatting. The return
value is a list of month rows. Each month row contains up to *width*
@@ -90,28 +89,27 @@
each week contains 1--7 days. Days are :class:`datetime.date` objects.
- .. method:: yeardays2calendar(year[, width])
+ .. method:: yeardays2calendar(year, width=3)
Return the data for the specified year ready for formatting (similar to
:meth:`yeardatescalendar`). Entries in the week lists are tuples of day
numbers and weekday numbers. Day numbers outside this month are zero.
- .. method:: yeardayscalendar(year[, width])
+ .. method:: yeardayscalendar(year, width=3)
Return the data for the specified year ready for formatting (similar to
:meth:`yeardatescalendar`). Entries in the week lists are day numbers. Day
numbers outside this month are zero.
-.. class:: TextCalendar([firstweekday])
+.. class:: TextCalendar(firstweekday=0)
This class can be used to generate plain text calendars.
-
:class:`TextCalendar` instances have the following methods:
- .. method:: formatmonth(theyear, themonth[, w[, l]])
+ .. method:: formatmonth(theyear, themonth, w=0, l=0)
Return a month's calendar in a multi-line string. If *w* is provided, it
specifies the width of the date columns, which are centered. If *l* is
@@ -120,12 +118,12 @@
:meth:`setfirstweekday` method.
- .. method:: prmonth(theyear, themonth[, w[, l]])
+ .. method:: prmonth(theyear, themonth, w=0, l=0)
Print a month's calendar as returned by :meth:`formatmonth`.
- .. method:: formatyear(theyear, themonth[, w[, l[, c[, m]]]])
+ .. method:: formatyear(theyear, themonth, w=2, l=1, c=6, m=3)
Return a *m*-column calendar for an entire year as a multi-line string.
Optional parameters *w*, *l*, and *c* are for date column width, lines per
@@ -135,32 +133,32 @@
can be generated is platform-dependent.
- .. method:: pryear(theyear[, w[, l[, c[, m]]]])
+ .. method:: pryear(theyear, w=2, l=1, c=6, m=3)
Print the calendar for an entire year as returned by :meth:`formatyear`.
-.. class:: HTMLCalendar([firstweekday])
+.. class:: HTMLCalendar(firstweekday=0)
This class can be used to generate HTML calendars.
:class:`HTMLCalendar` instances have the following methods:
- .. method:: formatmonth(theyear, themonth[, withyear])
+ .. method:: formatmonth(theyear, themonth, withyear=True)
Return a month's calendar as an HTML table. If *withyear* is true the year
will be included in the header, otherwise just the month name will be
used.
- .. method:: formatyear(theyear, themonth[, width])
+ .. method:: formatyear(theyear, themonth, width=3)
Return a year's calendar as an HTML table. *width* (defaulting to 3)
specifies the number of months per row.
- .. method:: formatyearpage(theyear[, width[, css[, encoding]]])
+ .. method:: formatyearpage(theyear, width=3, css='calendar.css', encoding=None)
Return a year's calendar as a complete HTML page. *width* (defaulting to
3) specifies the number of months per row. *css* is the name for the
@@ -169,7 +167,7 @@
output (defaulting to the system default encoding).
-.. class:: LocaleTextCalendar([firstweekday[, locale]])
+.. class:: LocaleTextCalendar(firstweekday=0, locale=None)
This subclass of :class:`TextCalendar` can be passed a locale name in the
constructor and will return month and weekday names in the specified
@@ -177,7 +175,7 @@
weekday names will be returned as unicode.
-.. class:: LocaleHTMLCalendar([firstweekday[, locale]])
+.. class:: LocaleHTMLCalendar(firstweekday=0, locale=None)
This subclass of :class:`HTMLCalendar` can be passed a locale name in the
constructor and will return month and weekday names in the specified
@@ -241,26 +239,26 @@
unless set by :func:`setfirstweekday`.
-.. function:: prmonth(theyear, themonth[, w[, l]])
+.. function:: prmonth(theyear, themonth, w=0, l=0)
Prints a month's calendar as returned by :func:`month`.
-.. function:: month(theyear, themonth[, w[, l]])
+.. function:: month(theyear, themonth, w=0, l=0)
Returns a month's calendar in a multi-line string using the :meth:`formatmonth`
of the :class:`TextCalendar` class.
-.. function:: prcal(year[, w[, l[c]]])
+.. function:: prcal(year, w=0, l=0, c=6, m=3)
Prints the calendar for an entire year as returned by :func:`calendar`.
-.. function:: calendar(year[, w[, l[c]]])
+.. function:: calendar(year, w=2, l=1, c=6, m=3)
- Returns a 3-column calendar for an entire year as a multi-line string using the
- :meth:`formatyear` of the :class:`TextCalendar` class.
+ Returns a 3-column calendar for an entire year as a multi-line string using
+ the :meth:`formatyear` of the :class:`TextCalendar` class.
.. function:: timegm(tuple)
Modified: python/branches/py3k-short-float-repr/Doc/library/cgi.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/cgi.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/cgi.rst Tue Apr 7 01:43:45 2009
@@ -1,6 +1,5 @@
-
-:mod:`cgi` --- Common Gateway Interface support.
-================================================
+:mod:`cgi` --- Common Gateway Interface support
+===============================================
.. module:: cgi
:synopsis: Helpers for running Python scripts via the Common Gateway Interface.
@@ -220,7 +219,7 @@
:meth:`getlist` provided by this higher level interface.
-.. method:: FieldStorage.getfirst(name[, default])
+.. method:: FieldStorage.getfirst(name, default=None)
This method always returns only one value associated with form field *name*.
The method returns only the first value in case that more values were posted
@@ -255,19 +254,19 @@
algorithms implemented in this module in other circumstances.
-.. function:: parse(fp[, keep_blank_values[, strict_parsing]])
+.. function:: parse(fp=None, environ=os.environ, keep_blank_values=False, strict_parsing=False)
Parse a query in the environment or from a file (the file defaults to
``sys.stdin``). The *keep_blank_values* and *strict_parsing* parameters are
passed to :func:`urllib.parse.parse_qs` unchanged.
-.. function:: parse_qs(qs[, keep_blank_values[, strict_parsing]])
+.. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False)
This function is deprecated in this module. Use :func:`urllib.parse.parse_qs`
instead. It is maintained here only for backward compatibility.
-.. function:: parse_qsl(qs[, keep_blank_values[, strict_parsing]])
+.. function:: parse_qsl(qs, keep_blank_values=False, strict_parsing=False)
This function is deprecated in this module. Use :func:`urllib.parse.parse_qs`
instead. It is maintained here only for backward compatibility.
@@ -319,7 +318,7 @@
Print a list of useful (used by CGI) environment variables in HTML.
-.. function:: escape(s[, quote])
+.. function:: escape(s, quote=False)
Convert the characters ``'&'``, ``'<'`` and ``'>'`` in string *s* to HTML-safe
sequences. Use this if you need to display text that might contain such
Modified: python/branches/py3k-short-float-repr/Doc/library/cgitb.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/cgitb.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/cgitb.rst Tue Apr 7 01:43:45 2009
@@ -1,4 +1,3 @@
-
:mod:`cgitb` --- Traceback manager for CGI scripts
==================================================
@@ -34,7 +33,7 @@
analysis.
-.. function:: enable([display[, logdir[, context[, format]]]])
+.. function:: enable(display=1, logdir=None, context=5, format="html")
.. index:: single: excepthook() (in module sys)
@@ -51,7 +50,7 @@
value forces plain text output. The default value is ``"html"``.
-.. function:: handler([info])
+.. function:: handler(info=None)
This function handles an exception using the default settings (that is, show a
report in the browser, but don't log to a file). This can be used when you've
Modified: python/branches/py3k-short-float-repr/Doc/library/chunk.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/chunk.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/chunk.rst Tue Apr 7 01:43:45 2009
@@ -1,4 +1,3 @@
-
:mod:`chunk` --- Read IFF chunked data
======================================
@@ -51,7 +50,7 @@
instance will fail with a :exc:`EOFError` exception.
-.. class:: Chunk(file[, align, bigendian, inclheader])
+.. class:: Chunk(file, align=True, bigendian=True, inclheader=False)
Class which represents a chunk. The *file* argument is expected to be a
file-like object. An instance of this class is specifically allowed. The
@@ -94,7 +93,7 @@
Returns ``False``.
- .. method:: seek(pos[, whence])
+ .. method:: seek(pos, whence=0)
Set the chunk's current position. The *whence* argument is optional and
defaults to ``0`` (absolute file positioning); other values are ``1``
@@ -108,7 +107,7 @@
Return the current position into the chunk.
- .. method:: read([size])
+ .. method:: read(size=-1)
Read at most *size* bytes from the chunk (less if the read hits the end of
the chunk before obtaining *size* bytes). If the *size* argument is
Modified: python/branches/py3k-short-float-repr/Doc/library/cmath.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/cmath.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/cmath.rst Tue Apr 7 01:43:45 2009
@@ -1,4 +1,3 @@
-
:mod:`cmath` --- Mathematical functions for complex numbers
===========================================================
Modified: python/branches/py3k-short-float-repr/Doc/library/cmd.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/cmd.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/cmd.rst Tue Apr 7 01:43:45 2009
@@ -1,4 +1,3 @@
-
:mod:`cmd` --- Support for line-oriented command interpreters
=============================================================
@@ -13,7 +12,7 @@
interface.
-.. class:: Cmd([completekey[, stdin[, stdout]]])
+.. class:: Cmd(completekey='tab', stdin=None, stdout=None)
A :class:`Cmd` instance or subclass instance is a line-oriented interpreter
framework. There is no good reason to instantiate :class:`Cmd` itself; rather,
@@ -42,7 +41,7 @@
A :class:`Cmd` instance has the following methods:
-.. method:: Cmd.cmdloop([intro])
+.. method:: Cmd.cmdloop(intro=None)
Repeatedly issue a prompt, accept input, parse an initial prefix off the
received input, and dispatch to action methods, passing them the remainder of
Modified: python/branches/py3k-short-float-repr/Doc/library/code.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/code.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/code.rst Tue Apr 7 01:43:45 2009
@@ -12,7 +12,7 @@
build applications which provide an interactive interpreter prompt.
-.. class:: InteractiveInterpreter([locals])
+.. class:: InteractiveInterpreter(locals=None)
This class deals with parsing and interpreter state (the user's namespace); it
does not deal with input buffering or prompting or input file naming (the
@@ -22,14 +22,14 @@
``'__doc__'`` set to ``None``.
-.. class:: InteractiveConsole([locals[, filename]])
+.. class:: InteractiveConsole(locals=None, filename="<console>")
Closely emulate the behavior of the interactive Python interpreter. This class
builds on :class:`InteractiveInterpreter` and adds prompting using the familiar
``sys.ps1`` and ``sys.ps2``, and input buffering.
-.. function:: interact([banner[, readfunc[, local]]])
+.. function:: interact(banner=None, readfunc=None, local=None)
Convenience function to run a read-eval-print loop. This creates a new instance
of :class:`InteractiveConsole` and sets *readfunc* to be used as the
@@ -40,7 +40,7 @@
discarded after use.
-.. function:: compile_command(source[, filename[, symbol]])
+.. function:: compile_command(source, filename="<input>", symbol="single")
This function is useful for programs that want to emulate Python's interpreter
main loop (a.k.a. the read-eval-print loop). The tricky part is to determine
@@ -67,7 +67,7 @@
-------------------------------
-.. method:: InteractiveInterpreter.runsource(source[, filename[, symbol]])
+.. method:: InteractiveInterpreter.runsource(source, filename="<input>", symbol="single")
Compile and run some source in the interpreter. Arguments are the same as for
:func:`compile_command`; the default for *filename* is ``'<input>'``, and for
@@ -100,7 +100,7 @@
with it.
-.. method:: InteractiveInterpreter.showsyntaxerror([filename])
+.. method:: InteractiveInterpreter.showsyntaxerror(filename=None)
Display the syntax error that just occurred. This does not display a stack
trace because there isn't one for syntax errors. If *filename* is given, it is
@@ -132,7 +132,7 @@
interpreter objects as well as the following additions.
-.. method:: InteractiveConsole.interact([banner])
+.. method:: InteractiveConsole.interact(banner=None)
Closely emulate the interactive Python console. The optional banner argument
specify the banner to print before the first interaction; by default it prints a
@@ -158,7 +158,7 @@
Remove any unhandled source text from the input buffer.
-.. method:: InteractiveConsole.raw_input([prompt])
+.. method:: InteractiveConsole.raw_input(prompt="")
Write a prompt and read a line. The returned line does not include the trailing
newline. When the user enters the EOF key sequence, :exc:`EOFError` is raised.
Modified: python/branches/py3k-short-float-repr/Doc/library/codecs.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/codecs.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/codecs.rst Tue Apr 7 01:43:45 2009
@@ -1,4 +1,3 @@
-
:mod:`codecs` --- Codec registry and base classes
=================================================
@@ -226,34 +225,36 @@
defaults to line buffered.
-.. function:: EncodedFile(file, input[, output[, errors]])
+.. function:: EncodedFile(file, data_encoding, file_encoding=None, errors='strict')
Return a wrapped version of file which provides transparent encoding
translation.
Bytes written to the wrapped file are interpreted according to the given
- *input* encoding and then written to the original file as bytes using the
- *output* encoding.
+ *data_encoding* and then written to the original file as bytes using the
+ *file_encoding*.
- If *output* is not given, it defaults to *input*.
+ If *file_encoding* is not given, it defaults to *data_encoding*.
- *errors* may be given to define the error handling. It defaults to ``'strict'``,
- which causes :exc:`ValueError` to be raised in case an encoding error occurs.
+ *errors* may be given to define the error handling. It defaults to
+ ``'strict'``, which causes :exc:`ValueError` to be raised in case an encoding
+ error occurs.
-.. function:: iterencode(iterable, encoding[, errors])
+.. function:: iterencode(iterator, encoding, errors='strict', **kwargs)
Uses an incremental encoder to iteratively encode the input provided by
- *iterable*. This function is a :term:`generator`. *errors* (as well as any
+ *iterator*. This function is a :term:`generator`. *errors* (as well as any
other keyword argument) is passed through to the incremental encoder.
-.. function:: iterdecode(iterable, encoding[, errors])
+.. function:: iterdecode(iterator, encoding, errors='strict', **kwargs)
Uses an incremental decoder to iteratively decode the input provided by
- *iterable*. This function is a :term:`generator`. *errors* (as well as any
+ *iterator*. This function is a :term:`generator`. *errors* (as well as any
other keyword argument) is passed through to the incremental decoder.
+
The module also provides the following constants which are useful for reading
and writing to platform dependent files:
Modified: python/branches/py3k-short-float-repr/Doc/whatsnew/3.1.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/whatsnew/3.1.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/whatsnew/3.1.rst Tue Apr 7 01:43:45 2009
@@ -151,20 +151,24 @@
(Contributed by Raymond Hettinger; :issue:`1696199`.)
-* Add a new module, :mod:`ttk` for access to the Tk themed widget set. The
- basic idea of ttk is to separate, to the extent possible, the code
+* Added a new module, :mod:`tkinter.ttk` for access to the Tk themed widget set.
+ The basic idea of ttk is to separate, to the extent possible, the code
implementing a widget's behavior from the code implementing its appearance.
(Contributed by Kevin Walzer and Guilherme Polo; :issue:`2618` and
:issue:`2983`.)
-* The :class:`gzip.GzipFile` and :class:`bz2.BZ2File` classs now support
- the context manager protocol.
+* The :class:`gzip.GzipFile` and :class:`bz2.BZ2File` classes now support
+ the context manager protocol::
- (Contributed by Jacques Frechet; :issue:`4272`.)
+ >>> # Automatically close file after writing
+ >>> with gzip.GzipFile(filename, "wb") as f:
+ ... f.write(b"xxx")
-* The :mod:`Decimal` module now supports two new methods to create a
- decimal object that from a binary :class:`float`. The conversion is
+ (Contributed by Antoine Pitrou.)
+
+* The :mod:`decimal.Decimal` module now supports methods for creating a
+ decimal object from a binary :class:`float`. The conversion is
exact but can sometimes be surprising::
>>> Decimal.from_float(1.1)
@@ -194,7 +198,17 @@
from APL. Also, the existing :func:`itertools.count` function now has
an optional *step* argument and can accept any type of counting
sequence including :class:`fractions.Fraction` and
- :class:`decimal.Decimal`.
+ :class:`decimal.Decimal`::
+
+ >>> [p+q for p,q in combinations_with_replacement('LOVE', 2)]
+ ['LL', 'LO', 'LV', 'LE', 'OO', 'OV', 'OE', 'VV', 'VE', 'EE']
+
+ >>> list(compress(data=range(10), selectors=[0,0,1,1,0,1,0,1,0,0]))
+ [2, 3, 5, 7]
+
+ >>> c = count(start=Fraction(1,2), step=Fraction(1,6))
+ >>> next(c), next(c), next(c), next(c)
+ (Fraction(1, 2), Fraction(2, 3), Fraction(5, 6), Fraction(1, 1))
(Contributed by Raymond Hettinger.)
@@ -206,8 +220,11 @@
(Contributed by Raymond Hettinger; :issue:`1818`.)
-* ``round`(x, n)`` now returns an integer if *x* is an integer.
- Previously it returned a float.
+* ``round(x, n)`` now returns an integer if *x* is an integer.
+ Previously it returned a float::
+
+ >>> round(1123, -2)
+ 1100
(Contributed by Mark Dickinson; :issue:`4707`.)
@@ -240,7 +257,17 @@
* The :mod:`unittest` module now supports skipping individual tests or classes
of tests. And it supports marking a test as a expected failure, a test that
is known to be broken, but shouldn't be counted as a failure on a
- TestResult.
+ TestResult::
+
+ class TestGizmo(unittest.TestCase):
+
+ @unittest.skipUnless(sys.platform.startswith("win"), "requires Windows")
+ def test_gizmo_on_windows(self):
+ ...
+
+ @unittest.expectedFailure
+ def test_gimzo_without_required_library(self):
+ ...
(Contributed by Benjamin Peterson.)
Modified: python/branches/py3k-short-float-repr/Lib/distutils/command/bdist.py
==============================================================================
--- python/branches/py3k-short-float-repr/Lib/distutils/command/bdist.py (original)
+++ python/branches/py3k-short-float-repr/Lib/distutils/command/bdist.py Tue Apr 7 01:43:45 2009
@@ -49,35 +49,28 @@
]
# The following commands do not take a format option from bdist
- no_format_option = ('bdist_rpm',
- #'bdist_sdux', 'bdist_pkgtool'
- )
+ no_format_option = ('bdist_rpm',)
# This won't do in reality: will need to distinguish RPM-ish Linux,
# Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS.
- default_format = { 'posix': 'gztar',
- 'nt': 'zip',
- 'os2': 'zip', }
+ default_format = {'posix': 'gztar',
+ 'nt': 'zip',
+ 'os2': 'zip'}
# Establish the preferred order (for the --help-formats option).
format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar',
- 'wininst', 'zip',
- #'pkgtool', 'sdux'
- ]
+ 'wininst', 'zip', 'msi']
# And the real information.
- format_command = { 'rpm': ('bdist_rpm', "RPM distribution"),
- 'zip': ('bdist_dumb', "ZIP file"),
- 'gztar': ('bdist_dumb', "gzip'ed tar file"),
- 'bztar': ('bdist_dumb', "bzip2'ed tar file"),
- 'ztar': ('bdist_dumb', "compressed tar file"),
- 'tar': ('bdist_dumb', "tar file"),
- 'wininst': ('bdist_wininst',
- "Windows executable installer"),
- 'zip': ('bdist_dumb', "ZIP file"),
- #'pkgtool': ('bdist_pkgtool',
- # "Solaris pkgtool distribution"),
- #'sdux': ('bdist_sdux', "HP-UX swinstall depot"),
+ format_command = {'rpm': ('bdist_rpm', "RPM distribution"),
+ 'gztar': ('bdist_dumb', "gzip'ed tar file"),
+ 'bztar': ('bdist_dumb', "bzip2'ed tar file"),
+ 'ztar': ('bdist_dumb', "compressed tar file"),
+ 'tar': ('bdist_dumb', "tar file"),
+ 'wininst': ('bdist_wininst',
+ "Windows executable installer"),
+ 'zip': ('bdist_dumb', "ZIP file"),
+ 'msi': ('bdist_msi', "Microsoft Installer")
}
Modified: python/branches/py3k-short-float-repr/Lib/distutils/filelist.py
==============================================================================
--- python/branches/py3k-short-float-repr/Lib/distutils/filelist.py (original)
+++ python/branches/py3k-short-float-repr/Lib/distutils/filelist.py Tue Apr 7 01:43:45 2009
@@ -289,7 +289,8 @@
# character except the special characters.
# XXX currently the "special characters" are just slash -- i.e. this is
# Unix-only.
- pattern_re = re.sub(r'(^|[^\\])\.', r'\1[^/]', pattern_re)
+ pattern_re = re.sub(r'((?<!\\)(\\\\)*)\.', r'\1[^/]', pattern_re)
+
return pattern_re
Modified: python/branches/py3k-short-float-repr/Misc/NEWS
==============================================================================
--- python/branches/py3k-short-float-repr/Misc/NEWS (original)
+++ python/branches/py3k-short-float-repr/Misc/NEWS Tue Apr 7 01:43:45 2009
@@ -327,6 +327,12 @@
Library
-------
+- Issue #5095: Added bdist_msi to the list of bdist supported formats.
+ Initial fix by Steven Bethard.
+
+- Issue #1491431: Fixed distutils.filelist.glob_to_re for edge cases.
+ Initial fix by Wayne Davison.
+
- Issue #5694: removed spurious test output in Distutils (test_clean).
- Issue #1326077: fix the formatting of SyntaxErrors by the traceback module.
Modified: python/branches/py3k-short-float-repr/Tools/msi/uuids.py
==============================================================================
--- python/branches/py3k-short-float-repr/Tools/msi/uuids.py (original)
+++ python/branches/py3k-short-float-repr/Tools/msi/uuids.py Tue Apr 7 01:43:45 2009
@@ -67,4 +67,10 @@
'3.0.1150':'{de2f2d9c-53e2-40ee-8209-74da63cb060e}', # 3.0.1
'3.0.2121':'{cef79e7f-9809-49e2-afd2-e24148d7c855}', # 3.0.2c1
'3.0.2150':'{0cf3b95a-8382-4607-9779-c36407ff362c}', # 3.0.2
+ '3.1.101': '{c423eada-c498-4d51-9eb4-bfeae647e0a0}', # 3.1a1
+ '3.1.102': '{f6e199bf-dc64-42f3-87d4-1525991a013e}', # 3.1a2
+ '3.1.111': '{c3c82893-69b2-4676-8554-1b6ee6c191e9}', # 3.1b1
+ '3.1.121': '{da2b5170-12f3-4d99-8a1f-54926cca7acd}', # 3.1c1
+ '3.1.122': '{bceb5133-e2ee-4109-951f-ac7e941a1692}', # 3.1c1
+ '3.1.150': '{3ad61ee5-81d2-4d7e-adef-da1dd37277d1}', # 3.1.0
}
More information about the Python-checkins
mailing list