Martin v. Löwis [Sat, 18 Sep 2004 16:16:34 +0000 (16:16 +0000)]
Link with ws2_32 instead of wsock32.
Martin v. Löwis [Sat, 18 Sep 2004 16:07:58 +0000 (16:07 +0000)]
Patch #
1021596: Check for None to determine whether _urandomfd is
uninitialized.
Martin v. Löwis [Sat, 18 Sep 2004 16:01:23 +0000 (16:01 +0000)]
Convert boolean results back to strings. Fixes #807871.
Will backport to 2.3.
Martin v. Löwis [Sat, 18 Sep 2004 10:07:03 +0000 (10:07 +0000)]
Make curses.h inclusion conditional as in the original patch #
1012280.
Backported to 2.3.
Martin v. Löwis [Sat, 18 Sep 2004 09:54:52 +0000 (09:54 +0000)]
Patch #
1012280: Include curses.h for term.h check. Fixes #933795.
Will backport to 2.3.
Martin v. Löwis [Sat, 18 Sep 2004 09:08:52 +0000 (09:08 +0000)]
Patch #
1029061: Always extract member names from the tarinfo.
Martin v. Löwis [Sat, 18 Sep 2004 09:03:49 +0000 (09:03 +0000)]
Patch #
1025790: Add status code constants to httplib.
Barry Warsaw [Sat, 18 Sep 2004 00:06:34 +0000 (00:06 +0000)]
At the cost of a modest (but useful in its own right) change in the semantics
of the Template.delimiter attribute, we make use of the delimiter in the
escaped group, and in the safe_substitute() method more robust.
Now, .delimiter should be the unescaped delimiter literal, e.g. '$' or '&', or
whatever. The _TemplateMetaclass will re.escape() this value when it builds
the pattern.
Fred Drake [Fri, 17 Sep 2004 20:23:47 +0000 (20:23 +0000)]
remove gzipped archives from the list of expected distributions
Sean Reifschneider [Fri, 17 Sep 2004 08:34:12 +0000 (08:34 +0000)]
SF Patch
1022011: Add a command-line argument --no-autoreq, which sets the
"AutoReq: 0" to disable automatic dependency searching.
Sean Reifschneider [Fri, 17 Sep 2004 08:23:22 +0000 (08:23 +0000)]
SF Patch
1022003: Change bdist_rpm _topdir to use
os.path.abspath(self.rpm_base) instead of os.getcwd() + '/' + self.rpm_base
Raymond Hettinger [Thu, 16 Sep 2004 16:41:57 +0000 (16:41 +0000)]
SF bug #
1014215: Unspecific errors with metaclass
High level error message was stomping useful detailed messages from lower
level routines.
The new approach is to augment string error messages returned by the low
level routines. The provides both high and low level information. If
the exception value is not a string, no changes are made.
To see the improved messages in action, type:
import random
class R(random): pass
class B(bool): pass
Skip Montanaro [Thu, 16 Sep 2004 03:28:13 +0000 (03:28 +0000)]
Initialize sep and seplen to suppress warning from gcc.
Tim Peters [Thu, 16 Sep 2004 01:30:50 +0000 (01:30 +0000)]
SF bug #
1028306: date-datetime comparison
Treat comparing a date to a datetime like a mixed-type comparison.
Tim Peters [Thu, 16 Sep 2004 00:09:19 +0000 (00:09 +0000)]
Whitespace normalization.
Brett Cannon [Wed, 15 Sep 2004 23:26:23 +0000 (23:26 +0000)]
Remove tabs.
Thomas Heller [Wed, 15 Sep 2004 11:41:32 +0000 (11:41 +0000)]
Add a missing line continuation character.
Martin v. Löwis [Wed, 15 Sep 2004 06:02:54 +0000 (06:02 +0000)]
Patch #
1026986: Add OpenBSD 3.5 and 3.6 to list of broken systems.
Martin v. Löwis [Tue, 14 Sep 2004 21:45:36 +0000 (21:45 +0000)]
Strip square brackets from IPv6 address.
Skip Montanaro [Tue, 14 Sep 2004 17:58:31 +0000 (17:58 +0000)]
mention httplib ipv6 fix
Skip Montanaro [Tue, 14 Sep 2004 17:55:21 +0000 (17:55 +0000)]
missed the obvious test case and corresponding fix
Michael W. Hudson [Tue, 14 Sep 2004 17:19:09 +0000 (17:19 +0000)]
Make the word "module" appear in the error string for calling the
module type with silly arguments. (The exact name can be quibbled
over, if you care).
This was partially inspired by bug #
1014215 and so on, but is also
just a good idea.
Michael W. Hudson [Tue, 14 Sep 2004 17:09:47 +0000 (17:09 +0000)]
Move a comment back to its rightful location.
Skip Montanaro [Tue, 14 Sep 2004 16:32:02 +0000 (16:32 +0000)]
Search from the end of the host/port combination to find the colon which
separates ip address from the port to accommodate ipv6 addresses.
Walter Dörwald [Tue, 14 Sep 2004 09:45:10 +0000 (09:45 +0000)]
Make the hint about the None default less ambiguous.
Walter Dörwald [Tue, 14 Sep 2004 09:40:45 +0000 (09:40 +0000)]
Enhance the docstrings for unicode.split() and string.split()
to make it clear that it is possible to pass None as the
separator argument to get the default "any whitespace" separator.
Martin v. Löwis [Tue, 14 Sep 2004 07:52:22 +0000 (07:52 +0000)]
Remove claims that Python source code is ASCII. Fixes #
1026038.
Raymond Hettinger [Tue, 14 Sep 2004 06:32:20 +0000 (06:32 +0000)]
Tweak the wording. Improve examples. Make more brief.
Raymond Hettinger [Tue, 14 Sep 2004 05:21:42 +0000 (05:21 +0000)]
Cover string.Template in the tutorial's library tour.
Raymond Hettinger [Tue, 14 Sep 2004 02:34:08 +0000 (02:34 +0000)]
Fix small bugs in Template code.
* The parameterization of "delimiter" was incomplete.
* safe_substitute's code for braced delimiters should only be executed
when braced is not None.
* Invalid pattern group names now raise a ValueError. Formerly, the
convert code would fall off the end and improperly return None.
Beefed-up tests.
* Test delimiter override for all paths in substitute and safe_substitute.
* Alter unittest invocation to match other modules (now it itemizes the
tests as they are run).
Raymond Hettinger [Mon, 13 Sep 2004 22:23:21 +0000 (22:23 +0000)]
SF #
1027105: HardwareRandom should be renamed OSRandom
Renamed the new generator at Trevor's recommendation.
The name HardwareRandom suggested a bit more than it
delivered (no radioactive decay detectors or such).
Barry Warsaw [Mon, 13 Sep 2004 20:53:27 +0000 (20:53 +0000)]
The 4th group is now 'invalid' instead of 'bogus'.
Barry Warsaw [Mon, 13 Sep 2004 20:52:50 +0000 (20:52 +0000)]
Raymond's good suggestion to re-order the tests in the convert() helper so the
most common paths are tested first. Also, that 'invalid' is better than
'bogus'.
Trent Mick [Mon, 13 Sep 2004 17:48:41 +0000 (17:48 +0000)]
Patch for compilation on IRIX from rwgk on http://python.org/sf/728330
Barry Warsaw [Mon, 13 Sep 2004 15:25:15 +0000 (15:25 +0000)]
substitute(), safe_substitute(): Paul Moore provides a better hack for dealing
with positional arguments.
Barry Warsaw [Mon, 13 Sep 2004 15:24:43 +0000 (15:24 +0000)]
Added a test for # positional arguments > 1.
Andrew M. Kuchling [Mon, 13 Sep 2004 15:06:50 +0000 (15:06 +0000)]
Credit patch from Raymond
Tim Peters [Mon, 13 Sep 2004 15:03:17 +0000 (15:03 +0000)]
Document testmod's new exclude_empty argument.
Tim Peters [Mon, 13 Sep 2004 14:53:28 +0000 (14:53 +0000)]
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().
Barry Warsaw [Mon, 13 Sep 2004 14:35:59 +0000 (14:35 +0000)]
Add tests for keyword arguments and combining mapping and keyword arguments.
Barry Warsaw [Mon, 13 Sep 2004 14:35:04 +0000 (14:35 +0000)]
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.
Walter Dörwald [Mon, 13 Sep 2004 08:53:15 +0000 (08:53 +0000)]
Fix quoting.
Edward Loper [Mon, 13 Sep 2004 05:47:24 +0000 (05:47 +0000)]
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.
Tim Peters [Mon, 13 Sep 2004 01:07:12 +0000 (01:07 +0000)]
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.
Tim Peters [Mon, 13 Sep 2004 00:52:51 +0000 (00:52 +0000)]
Reluctantly, rehabilitate doctest.master.
Tim Peters [Sun, 12 Sep 2004 22:45:17 +0000 (22:45 +0000)]
Tester.run___test__(): This couldn't possibly work at all. I'm afraid
the "backward compatibility" here was a joke.
Tim Peters [Sun, 12 Sep 2004 22:39:46 +0000 (22:39 +0000)]
Tester.__init__(): this couldn't possibly work when a module argument
was passed.
Raymond Hettinger [Sun, 12 Sep 2004 19:53:07 +0000 (19:53 +0000)]
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.
Tim Peters [Sun, 12 Sep 2004 03:49:31 +0000 (03:49 +0000)]
Whitespace normalization.
Tim Peters [Sun, 12 Sep 2004 03:21:00 +0000 (03:21 +0000)]
HtmlDiff corrections from Dan Gass, + trimmed trailing whitespace.
Johannes Gijsbers [Sat, 11 Sep 2004 21:26:21 +0000 (21:26 +0000)]
Document not-completely-obvious behavior in a test.
Johannes Gijsbers [Sat, 11 Sep 2004 17:48:21 +0000 (17:48 +0000)]
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!
Tim Peters [Sat, 11 Sep 2004 17:33:27 +0000 (17:33 +0000)]
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.
Johannes Gijsbers [Sat, 11 Sep 2004 17:33:25 +0000 (17:33 +0000)]
Patch #
1022152: add required 'domain' argument to gettext.translation() examples.
Johannes Gijsbers [Sat, 11 Sep 2004 16:50:06 +0000 (16:50 +0000)]
Patch #
1026384: fix two common typo's:
- accomodate -> accommodate
- occured -> occurred
Thanks George Yoshida!
Johannes Gijsbers [Sat, 11 Sep 2004 16:34:35 +0000 (16:34 +0000)]
Add 'if __name__ == "__main__":' to files already as a usable as a module.
Johannes Gijsbers [Sat, 11 Sep 2004 15:53:22 +0000 (15:53 +0000)]
Use __module__ attribute when available instead of using isclass() predicate
(functions and methods have grown the __module__ attribute too). See bug #570300.
Johannes Gijsbers [Sat, 11 Sep 2004 15:47:30 +0000 (15:47 +0000)]
Patch #
1025800: remove TeX quoting from verbatim section. Thanks Dima Dorfman!
Andrew M. Kuchling [Fri, 10 Sep 2004 19:33:00 +0000 (19:33 +0000)]
[Bug #
1023359] Make code match inheritance diagram
Barry Warsaw [Fri, 10 Sep 2004 18:30:42 +0000 (18:30 +0000)]
Template: remove __slots__ since that interferes with the ability to mix in
Template and unicode classes.
Andrew M. Kuchling [Fri, 10 Sep 2004 13:05:22 +0000 (13:05 +0000)]
Add some stdlib items; remove 'other changes' section; fix sorting error in list of changed modules
Andrew M. Kuchling [Fri, 10 Sep 2004 12:59:54 +0000 (12:59 +0000)]
Typo fix: 'comparisions' is not a word
Andrew M. Kuchling [Fri, 10 Sep 2004 12:38:36 +0000 (12:38 +0000)]
Bump version number
Martin v. Löwis [Fri, 10 Sep 2004 11:56:56 +0000 (11:56 +0000)]
Do not include extpy[w].exe anymore
Martin v. Löwis [Fri, 10 Sep 2004 11:55:32 +0000 (11:55 +0000)]
Generate the product code properly
Andrew M. Kuchling [Fri, 10 Sep 2004 11:34:39 +0000 (11:34 +0000)]
Update PEP292 section
Martin v. Löwis [Fri, 10 Sep 2004 09:20:10 +0000 (09:20 +0000)]
Change all extensions to unadvertised.
Add script dealing with REGISTRY.tcl installation
Martin v. Löwis [Fri, 10 Sep 2004 06:32:54 +0000 (06:32 +0000)]
Patch #808120: Add --force-arch=ARCH to bdist_rpm.py.
Martin v. Löwis [Fri, 10 Sep 2004 06:25:01 +0000 (06:25 +0000)]
Patch #808115: Add script support to bdist_rpm.py.
Raymond Hettinger [Fri, 10 Sep 2004 06:21:22 +0000 (06:21 +0000)]
__slots__ went missing from Template.
Barry Warsaw [Fri, 10 Sep 2004 03:08:08 +0000 (03:08 +0000)]
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).
Fred Drake [Fri, 10 Sep 2004 01:20:21 +0000 (01:20 +0000)]
document the exceptions raised by sgmllib, htmllib, and HTMLParser
Fred Drake [Fri, 10 Sep 2004 01:16:49 +0000 (01:16 +0000)]
fix typo in markup
Fred Drake [Thu, 9 Sep 2004 05:13:52 +0000 (05:13 +0000)]
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)
Fred Drake [Thu, 9 Sep 2004 02:24:13 +0000 (02:24 +0000)]
clean up the API a little; exceptions are defined by this module
(needs documentation)
Fred Drake [Thu, 9 Sep 2004 01:49:58 +0000 (01:49 +0000)]
add name that should be considered public to __all__
Fred Drake [Wed, 8 Sep 2004 22:58:36 +0000 (22:58 +0000)]
remove unnecessary override of base class method
Fred Drake [Wed, 8 Sep 2004 22:57:01 +0000 (22:57 +0000)]
add tests that make sure buffer boundaries are handled properly for SGML comments
(see SF patch #901369)
Martin v. Löwis [Wed, 8 Sep 2004 16:09:14 +0000 (16:09 +0000)]
Revert creation of launcher.exe.
Install python[w].exe on demand also as extpy[w].exe
Martin v. Löwis [Wed, 8 Sep 2004 15:57:36 +0000 (15:57 +0000)]
Revert creation of launcher.exe
Brett Cannon [Wed, 8 Sep 2004 02:02:41 +0000 (02:02 +0000)]
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.
Walter Dörwald [Tue, 7 Sep 2004 20:24:22 +0000 (20:24 +0000)]
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.
Trent Mick [Tue, 7 Sep 2004 17:48:26 +0000 (17:48 +0000)]
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.
Martin v. Löwis [Tue, 7 Sep 2004 15:40:12 +0000 (15:40 +0000)]
Add support for launcher.exe
Martin v. Löwis [Tue, 7 Sep 2004 15:39:29 +0000 (15:39 +0000)]
Implement conditional extensions through launcher.exe.
Martin v. Löwis [Tue, 7 Sep 2004 15:37:26 +0000 (15:37 +0000)]
Support Python 2.2.
Jeremy Hylton [Tue, 7 Sep 2004 15:36:48 +0000 (15:36 +0000)]
Remove debugging print (not triggered by test suite) and add XXX comment about how the code should raise a SyntaxError.
Martin v. Löwis [Tue, 7 Sep 2004 15:36:46 +0000 (15:36 +0000)]
Add launcher program
Jeremy Hylton [Tue, 7 Sep 2004 15:28:01 +0000 (15:28 +0000)]
compiler.transformer: correct lineno attribute when possible
SF patch #
1015989
The basic idea of this patch is to compute lineno attributes for all AST nodes. The actual
implementation lead to a lot of restructing and code cleanup.
The generated AST nodes now have an optional lineno argument to constructor. Remove the
top-level asList(), since it didn't seem to serve any purpose. Add an __iter__ to ast nodes.
Use isinstance() instead of explicit type tests.
Change transformer to use the new lineno attribute, which replaces three lines of code with one.
Use universal newlines so that we can get rid of special-case code for line endings. Use
lookup_node() in a few more frequently called, but simple com_xxx methods(). Change string
exception to class exception.
Brett Cannon [Mon, 6 Sep 2004 23:30:27 +0000 (23:30 +0000)]
Ported test__locale to unittest.
Raymond Hettinger [Mon, 6 Sep 2004 23:02:37 +0000 (23:02 +0000)]
Remove redunandant assertions from last checkin.
Raymond Hettinger [Mon, 6 Sep 2004 22:58:37 +0000 (22:58 +0000)]
SF #
1022953: binascii.a2b_hqx("") raises SystemError
Several functions adopted the strategy of altering a full lengthed
string copy and resizing afterwards. That would fail if the initial
string was short enough (0 or 1) to be interned. Interning precluded
the subsequent resizing operation.
The solution was to make sure the initial string was at least two
characters long.
Added tests to verify that all binascii functions do not crater when
given an empty string argument.
Raymond Hettinger [Mon, 6 Sep 2004 07:04:09 +0000 (07:04 +0000)]
Fix erroneous docstring comment.
Martin v. Löwis [Mon, 6 Sep 2004 06:31:12 +0000 (06:31 +0000)]
Add test_difflib_expect.html.
Fix open Verbs.
Properly add "Edit with IDLE" to TclTk feature.
Raymond Hettinger [Mon, 6 Sep 2004 01:01:08 +0000 (01:01 +0000)]
Markup nits.
Raymond Hettinger [Mon, 6 Sep 2004 00:42:14 +0000 (00:42 +0000)]
Add missing close parenthesis.
Raymond Hettinger [Mon, 6 Sep 2004 00:12:04 +0000 (00:12 +0000)]
SF bug #901654: split method documentation can be improved
* Discuss the algorithmic distinctions between s.split() and s.split(sep).
* Document the split behavior for empty strings.
* Note the behavior when maxsplit is zero.
* Include short examples.
Brett Cannon [Sun, 5 Sep 2004 19:42:15 +0000 (19:42 +0000)]
Rework some wording.
Raymond Hettinger [Sun, 5 Sep 2004 00:00:42 +0000 (00:00 +0000)]
Fulfill Martin's request to use try/except rather than a "look before
you leap" approach. Makes the early call to os.urandom() unnecessary.
Raymond Hettinger [Sat, 4 Sep 2004 23:53:20 +0000 (23:53 +0000)]
Teach a test about the different kinds of functions.