[Bug #829532] Invoking os.makedirs() with an argument that contains a
directory name with a single dot fails. The patch skips creating
directories named os.curdir. (Patch by Bram Moolenaar)
Tim Peters [Mon, 22 Dec 2003 18:10:51 +0000 (18:10 +0000)]
Changed the UCHAR_MAX error msg a bit: we don't really assume anything
about "characters", we assume something about C's char type (which is
an integral type).
Skip Montanaro [Mon, 22 Dec 2003 16:31:41 +0000 (16:31 +0000)]
There are places in Python which assume bytes have 8-bits. Formalize that a
bit by checking the value of UCHAR_MAX in Include/Python.h. There was a
check in Objects/stringobject.c. Remove that. (Note that we don't define
UCHAR_MAX if it's not defined as the old test did.)
Jeremy Hylton [Wed, 17 Dec 2003 18:52:16 +0000 (18:52 +0000)]
Rewrite AbstractHTTPHandler to use modern httplib interface.
The chief benefit of this change is that requests will now use
HTTP/1.1 instead of HTTP/1.0. Bump the module version number as part
of the change.
There are two possible incompatibilities that we'll need to watch out
for when we get to an alpha release. We may get a different class of
exceptions out of httplib, and the do_open() method changed its
signature. The latter is only important if anyone actually subclasses
AbstractHTTPHandler.
Walter Dörwald [Mon, 15 Dec 2003 10:16:09 +0000 (10:16 +0000)]
Make the module docstring a raw string, so that the backslash in
"read until end of line ('\n') or EOF" will be treated literally.
Fixes SF bug #860155.
Jeremy Hylton [Sun, 14 Dec 2003 05:27:34 +0000 (05:27 +0000)]
SF patch 852995: add processors feature to urllib2
John J. Lee writes: "the patch makes it possible to implement
functionality like HTTP cookie handling, Refresh handling,
etc. etc. using handler objects. At the moment urllib2's handler
objects aren't quite up to the job, which results in a lot of
cut-n-paste and subclassing. I believe the changes are
backwards-compatible, with the exception of people who've
reimplemented build_opener()'s functionality -- those people would
need to call opener.add_handler(HTTPErrorProcessor).
The main change is allowing handlers to implement
methods like:
Guido van Rossum [Sat, 13 Dec 2003 22:12:53 +0000 (22:12 +0000)]
After hearing from someone who gave up on timeout sockets due to a
mistake in his code, I'm adding a note explaining that you should call
settimeout() before connect().
Expand the groupby() example to:
* show that it is typically used with sorted data,
* highlight commonalities with SQL's groupby and Unix's uniq,
* demonstrate valid uses for the default identity function,
* add some excitement by suggesting the range of possibilities.
Jack Jansen [Wed, 10 Dec 2003 15:18:18 +0000 (15:18 +0000)]
- Renamed OSA.ComponentInstance to OSA.OSAComponentInstance. It is not
a real subtype of Cm.ComponentInstance right now, it turns out that is
too difficult.
- OSA.OSAComponentInstance initializer does accept a Cm.ComponentInstance
instance, though, so at least things are becoming useable.
Hye-Shik Chang [Wed, 10 Dec 2003 07:31:08 +0000 (07:31 +0000)]
Fix memory error treatment correctly. Going to dsu_fail causes
deallocating garbage pointers; saved_ob_item and empty_ob_item.
(Reviewed by Raymond Hettinger)
Walter Dörwald [Mon, 8 Dec 2003 11:38:45 +0000 (11:38 +0000)]
Move list and tuple tests from test_types.py to their own scripts:
test_tuple.py and test_list.py. Common tests for tuple, list and UserList
are shared (in seq_tests.py and list_tests.py). Port tests to PyUnit.
(From SF patch #736962)
Jack Jansen [Mon, 8 Dec 2003 01:10:12 +0000 (01:10 +0000)]
Revamped framework search path handling for MacOSX. This should allow
two framework builds (in /Library and /System/Library) to coexist
with distutils linking against the right one.
Should be backported to 2.3, but getting Apple-supplied Python to pick
up these fixes is going to be non-trivial.
SF bug #855317: unittest: 5.3.9 Getting Extended Error Information
The example code did not work and could not easily be made to work.
Since the docs were already complex and the feature was not used
(it took two years for the errors to surface), we decided to dedocument
it entirely, leaving unittest cleaner than before.
Original idea by Guido van Rossum.
Idea for skipable inner iterators by Raymond Hettinger.
Idea for argument order and identity function default by Alex Martelli.
Implementation by Hye-Shik Chang (with tweaks by Raymond Hettinger).
Jack Jansen [Fri, 5 Dec 2003 23:51:54 +0000 (23:51 +0000)]
Reverting to previous version, which works. And I don't really care about
the new waste functionality because it's probably going to be dropped
anyway.
Thomas Heller [Fri, 5 Dec 2003 20:12:23 +0000 (20:12 +0000)]
Compile the files in the same order they are passed to the compiler.
Use case: Sometimes 'compiling' source files (with SWIG, for example)
creates additionl files which included by later sources. The win32all
setup script requires this.
There is no SF item for this, but it was discussed on distutils-sig:
http://mail.python.org/pipermail/distutils-sig/2003-November/003514.html