Fred Drake [Fri, 8 Feb 2002 21:27:50 +0000 (21:27 +0000)]
start() and stop() methods: return None where there is no exception;
returning NULL causes the interpreter to raise a SystemError.
Noted by Anthony Baxter at Python 10.
Fix to the UTF-8 encoder: it failed on 0-length input strings.
Fix for the UTF-8 decoder: it will now accept isolated surrogates
(previously it raised an exception which causes round-trips to
fail).
Added new tests for UTF-8 round-trip safety (we rely on UTF-8 for
marshalling Unicode objects, so we better make sure it works for
all Unicode code points, including isolated surrogates).
Bumped the PYC magic in a non-standard way -- please review. This
was needed because the old PYC format used illegal UTF-8 sequences
for isolated high surrogates which now raise an exception.
Fred Drake [Mon, 4 Feb 2002 21:15:42 +0000 (21:15 +0000)]
When linking to an index page, explicitly name index.html instead of
using "./". The later does not work nicely when browsing docs on a local
disk (as in the installed docs on Windows).
Tim Peters [Sat, 2 Feb 2002 00:08:15 +0000 (00:08 +0000)]
Change the version string from "2.2+" to "2.3a0". disutils peels off
the first 3 characters of this string in several places, so for as long
as they remain "2.2" it confuses the heck out of attempts to build 2.3
stuff using distutils.
[Bug #220993; may also fix bug #479469] Fix flakiness when old
installations are present, by always unlinking the destination file
before copying to it. Without the unlink(), the copied file remains
owned by its previous UID, causing the subsequent chmod() to fail.
Bugfix candidate, though it may cause changes on platforms where
file ownership behaves differently.
Jack Jansen [Fri, 1 Feb 2002 16:01:05 +0000 (16:01 +0000)]
A new dynload_next, which actually only works on OSX but isn't renamed yet.
By default every module is imported in its own namespace, but this can
be changed by defining USE_DYLD_GLOBAL_NAMESPACE. In a future version this
define will be replaced by a runtime setting, but that needs a bit more
thought.
This code is largely based on code and feedback from Steven Majewski,
Marcel Prastawa, Manoj Plakal and other on pythonmac-sig.
Tim Peters [Fri, 1 Feb 2002 11:27:43 +0000 (11:27 +0000)]
Implement os.waitpid() for Windows, in a way that's compatible with Linux
where their capabilities intersect. Would be nice if people using non-
MSVC compilers (Borland etc) took a whack at doing something similar for
them (this code relies on the MS _cwait function).
Restrict the mode to the lowest four octal positions; higher positions
contain the type of the file (regular file, socket, link, &c.).
This means that install_scripts will now print
"changing mode of <file> to 775" instead of "... to 100775".
2.2 bugfix candidate, I suppose, though this isn't actually fixing a bug.
Tim Peters [Wed, 30 Jan 2002 07:47:51 +0000 (07:47 +0000)]
New TemporaryFile implementation for Windows: this doesn't need a
TemproraryFileWrapper wrapper anymore, and should be immune from the
problem that a temp file inherited by a spawned process caused an
attempt to close the temp file in the spawning process to blow
up (the unlink in TemporaryFileWrapper.close() blew up with a
"Permission denied" error because, despite that the temp file got
closed in the spawning process, the spawned process still had it open
by virtue of C-level file descriptor inheritance). In context,
that bug took days to figure out <wink/sigh>.
Tim Peters [Wed, 30 Jan 2002 05:49:46 +0000 (05:49 +0000)]
Add new constants usable with os.popen() on Windows.
NOTE: this seems a mess wrt which symbols are available on which
platforms. I can't fix it, but I didn't add to it <wink>, and
included an XXX comment about names claimed to be available on
Windows that aren't. If anyone can figure out the whole ugly truth,
I'm sure a better organization will suggest itself.
Fred Drake [Tue, 29 Jan 2002 14:53:30 +0000 (14:53 +0000)]
Revise cheeseshop example so that the order of the keyword output is
completely determined by the example; dict insertion order and the string
hash algorithm no longer affect the output.
This fixes SF bug #509281.
Tim Peters [Mon, 28 Jan 2002 23:11:23 +0000 (23:11 +0000)]
SF bug #509805 tempfile.gettempdir not threadsafe
This is an ancient race when multiple threads call gettempdir() (or
anything relying on it) for the first time.
Fixed x-platform via the Big Hammer of rearranging the code to serialize
the first calls. Subsequent calls are as fast as before.
Note that the Python test suite can't provoke this bug: it requires
setting up multiple threads making the very first calls into tempfile,
but the test suite uses tempfile several times before getting to
test_threadedtempfile.
Barry Warsaw [Sun, 27 Jan 2002 06:48:02 +0000 (06:48 +0000)]
_parsebody(): When adding subparts to a multipart container, make sure
that the first subpart added makes the payload a list object.
Otherwise, a multipart/* with only one subpart will not have the
proper structure.