Commit graph

30864 commits

Author SHA1 Message Date
Trent Mick
8ea5bdf784 Patch for compilation on IRIX from rwgk on http://python.org/sf/728330 2004-09-13 17:48:41 +00:00
Barry Warsaw
b6234a95c1 substitute(), safe_substitute(): Paul Moore provides a better hack for dealing
with positional arguments.
2004-09-13 15:25:15 +00:00
Barry Warsaw
c7cd20c8c6 Added a test for # positional arguments > 1. 2004-09-13 15:24:43 +00:00
Andrew M. Kuchling
7642f7af0d Credit patch from Raymond 2004-09-13 15:06:50 +00:00
Tim Peters
8278860e52 Document testmod's new exclude_empty argument. 2004-09-13 15:03:17 +00:00
Tim Peters
958cc89037 exclude_empty: make the default True for DocTestFinder, and introduce it
with default False for testmod().  The real point of introducing this was
so that output from doctest.master.summarize() would be the same as in
2.3, and doctest.master in 2.4 is a backward-compatability hack used only
by testmod().
2004-09-13 14:53:28 +00:00
Barry Warsaw
302bd589ad Add tests for keyword arguments and combining mapping and keyword arguments. 2004-09-13 14:35:59 +00:00
Barry Warsaw
46b629c101 Accepted Raymond's patch to combine mapping and keyword arguments, with slight
modification.  Also, renamed the positional argument to '__mapping' to further
reduce the chance of duplicate keyword arguments.
2004-09-13 14:35:04 +00:00
Walter Dörwald
5011d0c683 Fix quoting. 2004-09-13 08:53:15 +00:00
Edward Loper
32ddbf7fab Added new parameter exclude_empty to DocTestFinder.__init__, which
controls whether tests are included for objects with empty docstrings.
Defaults to True, to match the behavior of Python 2.3.
2004-09-13 05:47:24 +00:00
Tim Peters
c56847878e DocTestFinder._find(): for tests derived from a module __test__ global,
doctest always promised to stick "__test__" in the name.  That got
broken.  Now it's fixed again.
2004-09-13 01:07:12 +00:00
Tim Peters
82076ef194 Reluctantly, rehabilitate doctest.master. 2004-09-13 00:52:51 +00:00
Tim Peters
9661f9ab4f Tester.run___test__(): This couldn't possibly work at all. I'm afraid
the "backward compatibility" here was a joke.
2004-09-12 22:45:17 +00:00
Tim Peters
4be7a92f7f Tester.__init__(): this couldn't possibly work when a module argument
was passed.
2004-09-12 22:39:46 +00:00
Raymond Hettinger
a84f3abb9e SF #1022910: Conserve memory with list.pop()
The list resizing scheme only downsized when more than 16 elements were
removed in a single step:  del a[100:120].   As a result, the list would
never shrink when popping elements off one at a time.

This patch makes it shrink whenever more than half of the space is unused.

Also, at Tim's suggestion, renamed _new_size to new_allocated.  This makes
the code easier to understand.
2004-09-12 19:53:07 +00:00
Tim Peters
0e9980f75a Whitespace normalization. 2004-09-12 03:49:31 +00:00
Tim Peters
2ee8099bd8 HtmlDiff corrections from Dan Gass, + trimmed trailing whitespace. 2004-09-12 03:21:00 +00:00
Johannes Gijsbers
d60e92a48d Document not-completely-obvious behavior in a test. 2004-09-11 21:26:21 +00:00
Johannes Gijsbers
6ab4b99f95 Patch #1025795: clarify language in Data Structures chapter of tutorial:
- Dictionary keys are in arbitrary order, but not random (which implies, well,
  intentional randomness).
- Move a footnote closer to what it's talking about so that it doesn't look
  like we're saying that "0 == 0.0" can't be relied on.
- Minor language tweaks in the vicinity.

Thanks Dima Dorfman!
2004-09-11 17:48:21 +00:00
Tim Peters
17b56379e1 Recover from inspect.getmodule() changes. It returns a module for
functions and methods now, including functions defined inside doctests
in test_doctest.py's recursive doctest'ing.
2004-09-11 17:33:27 +00:00
Johannes Gijsbers
2014c033f7 Patch #1022152: add required 'domain' argument to gettext.translation() examples. 2004-09-11 17:33:25 +00:00
Johannes Gijsbers
d345225ae5 Patch #1026384: fix two common typo's:
- accomodate -> accommodate
- occured -> occurred

Thanks George Yoshida!
2004-09-11 16:50:06 +00:00
Johannes Gijsbers
7a8c43ee6a Add 'if __name__ == "__main__":' to files already as a usable as a module. 2004-09-11 16:34:35 +00:00
Johannes Gijsbers
9324526a76 Use __module__ attribute when available instead of using isclass() predicate
(functions and methods have grown the __module__ attribute too). See bug #570300.
2004-09-11 15:53:22 +00:00
Johannes Gijsbers
c9c37ca62e Patch #1025800: remove TeX quoting from verbatim section. Thanks Dima Dorfman! 2004-09-11 15:47:30 +00:00
Andrew M. Kuchling
f08437ca08 [Bug #1023359] Make code match inheritance diagram 2004-09-10 19:33:00 +00:00
Barry Warsaw
f43e8bd7b4 Template: remove __slots__ since that interferes with the ability to mix in
Template and unicode classes.
2004-09-10 18:30:42 +00:00
Andrew M. Kuchling
a331e86452 Add some stdlib items; remove 'other changes' section; fix sorting error in list of changed modules 2004-09-10 13:05:22 +00:00
Andrew M. Kuchling
55be9eab38 Typo fix: 'comparisions' is not a word 2004-09-10 12:59:54 +00:00
Andrew M. Kuchling
2cc0c3008c Bump version number 2004-09-10 12:38:36 +00:00
Martin v. Löwis
0f02ce348a Do not include extpy[w].exe anymore 2004-09-10 11:56:56 +00:00
Martin v. Löwis
1e3a2642a0 Generate the product code properly 2004-09-10 11:55:32 +00:00
Andrew M. Kuchling
a79ec22f9f Update PEP292 section 2004-09-10 11:34:39 +00:00
Martin v. Löwis
dff68d0ced Change all extensions to unadvertised.
Add script dealing with REGISTRY.tcl installation
2004-09-10 09:20:10 +00:00
Martin v. Löwis
23c48a12d9 Patch #808120: Add --force-arch=ARCH to bdist_rpm.py. 2004-09-10 06:32:54 +00:00
Martin v. Löwis
641d64812c Patch #808115: Add script support to bdist_rpm.py. 2004-09-10 06:25:01 +00:00
Raymond Hettinger
1f7d6a633f __slots__ went missing from Template. 2004-09-10 06:21:22 +00:00
Barry Warsaw
12827c1fa9 Many updates to PEP 292 templates. Summary:
- Template no longer inherits from unicode.

- SafeTemplate is removed.  Now Templates have both a substitute() and a
  safe_substitute() method, so we don't need separate classes.  No more
  __mod__() operator.

- Adopt Tim Peter's idea for giving Template a metaclass, which makes the
  delimiter, the identifier pattern, or the entire pattern easy to override
  and document, while retaining efficiency of class-time compilation of the
  regexp.

- More informative ValueError messages which will help a user narrow down the
  bogus delimiter to the line and column in the original string (helpful for
  long triple quoted strings).
2004-09-10 03:08:08 +00:00
Fred Drake
961c2882a9 document the exceptions raised by sgmllib, htmllib, and HTMLParser 2004-09-10 01:20:21 +00:00
Fred Drake
a2544ee7f0 fix typo in markup 2004-09-10 01:16:49 +00:00
Fred Drake
216b249e94 make_nav_panel(): Don't cause side-effects on the input variables;
this caused duplicate attributes for the bottom navigation panel.

(closes SF patch #1013055; backport candidate)
2004-09-09 05:13:52 +00:00
Fred Drake
583359ed2e clean up the API a little; exceptions are defined by this module
(needs documentation)
2004-09-09 02:24:13 +00:00
Fred Drake
58ae830fd0 add name that should be considered public to __all__ 2004-09-09 01:49:58 +00:00
Fred Drake
49b4d19172 remove unnecessary override of base class method 2004-09-08 22:58:36 +00:00
Fred Drake
75d9a62fe0 add tests that make sure buffer boundaries are handled properly for SGML comments
(see SF patch #901369)
2004-09-08 22:57:01 +00:00
Martin v. Löwis
0b4a7d95c3 Revert creation of launcher.exe.
Install python[w].exe on demand also as extpy[w].exe
2004-09-08 16:09:14 +00:00
Martin v. Löwis
5a6653cee1 Revert creation of launcher.exe 2004-09-08 15:57:36 +00:00
Brett Cannon
85ae1a69b6 Remove usage of locale.getlocale in favor or setlocale(LC_NUMERIC, None) .
Also added a comment about why the code is bother to see what setlocale thinks
the set locale is.

Closes bug #1023798.
2004-09-08 02:02:41 +00:00
Walter Dörwald
69652035bc SF patch #998993: The UTF-8 and the UTF-16 stateful decoders now support
decoding incomplete input (when the input stream is temporarily exhausted).
codecs.StreamReader now implements buffering, which enables proper
readline support for the UTF-16 decoders. codecs.StreamReader.read()
has a new argument chars which specifies the number of characters to
return. codecs.StreamReader.readline() and codecs.StreamReader.readlines()
have a new argument keepends. Trailing "\n"s will be stripped from the lines
if keepends is false. Added C APIs PyUnicode_DecodeUTF8Stateful and
PyUnicode_DecodeUTF16Stateful.
2004-09-07 20:24:22 +00:00
Trent Mick
a708d6e3b0 Apply patch from http://python.org/sf/728330 to fix socket module compilation on Solaris 2.6, HP-UX 11, AIX 5.1 and (possibly) some IRIX versions. 2004-09-07 17:48:26 +00:00