Jack Jansen [Wed, 14 Nov 2001 10:59:57 +0000 (10:59 +0000)]
OSX tests used specific version numbers to test for new features and
used the default Darwin/* for the old code. Reversed those tests so
that compatibility code is in a switch leg with a specific version and
newer systems take the default leg.
This should allow Python to build on OSX 10.1.1 (which jumps from Darwin/1.4
to Darwin/5.1 due to a new numbering scheme).
Tim Peters [Tue, 13 Nov 2001 23:11:19 +0000 (23:11 +0000)]
CVS patch #477161: New "access" keyword for mmap, from Jay T Miller.
This gives mmap() on Windows the ability to create read-only, write-
through and copy-on-write mmaps. A new keyword argument is introduced
because the mmap() signatures diverged between Windows and Unix, so
while they (now) both support this functionality, there wasn't a way to
spell it in a common way without introducing a new spelling gimmick.
The old spellings are still accepted, so there isn't a backward-
compatibility issue here.
Barry Warsaw [Tue, 13 Nov 2001 20:16:52 +0000 (20:16 +0000)]
Committing the second part of patch #480902, an improved test suite
for dumbdbm.py, by Skip Montanaro. The first half of Skip's patch has
been postponed until Py2.3 since it adds new features.
Jack Jansen [Sat, 10 Nov 2001 23:21:55 +0000 (23:21 +0000)]
Add the MSL C library to the set of standard libraries
linked against. Most, but not all, of it is included in
PythonCore, but extensions may want to use some of
the routines not included. Fixes a bug reported by
Tom Loredo.
Jack Jansen [Sat, 10 Nov 2001 00:41:43 +0000 (00:41 +0000)]
Fixed various problems with command-dot handling (some very old):
- Don't scan for cmd-. unless in the foreground
- Scan before switching out to other processes, not after
- don't scan if SchedParams.check_interrupt is false (!)
- But: do scan if we're blocked on I/O
One problem remains: in the last case KeyboardInterrupt is raised
too late.
Tim Peters [Fri, 9 Nov 2001 19:23:47 +0000 (19:23 +0000)]
open_the_file(): this routine has a borrowed reference to the file
object, so the "Metroworks only" section should not decref it in case
of error (the caller is responsible for decref'ing in case of error --
and does).
Barry Warsaw [Fri, 9 Nov 2001 16:59:56 +0000 (16:59 +0000)]
formatdate(): An implementation to replace the one borrowed from
rfc822.py. The old rfc822.formatdate() produced date strings using
obsolete syntax. The new version produces the preferred RFC 2822
dates.
Also, an optional argument `localtime' is added, which if true,
produces a date relative to the local timezone, with daylight savings
time properly taken into account.
Jeremy Hylton [Fri, 9 Nov 2001 16:46:51 +0000 (16:46 +0000)]
Fix SF bug 468948 & 451295: urllib2 authentication problems
Fix contributed by Jeffrey C. Ollie.
I haven't tested the fix because the situation is non-trivial to
reproduce.
The basic solution is to get rid of the __current_realm attribute of
authentication handlers. Instead, prevent infinite retries by
checking for the presence of an Authenticate: header in the request
object that exactly matches the Authenticate: header that would be
added.
The problem prevent authentication from working correctly in the
presence of retries.
Ollie mentioned that digest authentication has the same problem and I
applied the same solution there.
Fixes to compile cPickle.c & socketmodule.c on cygwin and possibly
other platforms that have funny ideas about whether addresses of
functions in dlls are compile-time constants.
Add fast-path for comparing interned (true) string objects.
This patch boosts performance for comparing identical string object
by some 20% on my machine while not causing any noticable slow-down
for other operations (according to tests done with pybench).
Fred Drake [Wed, 7 Nov 2001 06:22:25 +0000 (06:22 +0000)]
apply() documentation: Remove a detail about the implementation that does
not affect the API. Clean up the text about call syntax apply() is
equivalent to. Based on comments by Thomas Guettler.
Tim Peters [Wed, 7 Nov 2001 04:42:04 +0000 (04:42 +0000)]
SF bug #478949 Windows installer start menu registry.
I'm guessing at this, pending more info from the bug submitter. Wise
changed how the %GROUP% vrbl got defined between versions 5.0a (used
before Python 2.2) and 8.14, to hold the full path to Start Menu group
instead of just the group name. If I'm guessing correctly, the info
the bug report is complaining about is in one of the registry keys
we set up that neither Windows nor Python cares about. We did store
a full path there in 2.2b1 instead of just the group name; the patch cuts
it back to just the name again.
Fred Drake [Tue, 6 Nov 2001 16:38:34 +0000 (16:38 +0000)]
Add a regression test for SF bug #478536: If a value cannot be weakly
referenced, WeakKeyDictionary.has_key() should return 0 instead of raising
TypeError.
Fred Drake [Tue, 6 Nov 2001 16:36:53 +0000 (16:36 +0000)]
WeakKeyDictionary.has_key(): If the key being tested is not weakly
referencable (weakref.ref() raises TypeError), return 0 instead of
propogating the TypeError.
This closes SF bug #478536; bugfix candidate.
Tim Peters [Mon, 5 Nov 2001 21:25:02 +0000 (21:25 +0000)]
SF bug 478425: Change in os.path.join (ntpath.py)
ntpath.join('a', '') was producing 'a' instead of 'a\\' as in 2.1.
Impossible to guess what was ever *intended*, but since split('a\\')
produces ('a', ''), I think it's best if join('a', '') gives 'a\\' back.
Fred Drake [Mon, 5 Nov 2001 17:40:48 +0000 (17:40 +0000)]
copy(): Make sure the copy of a derived class cannot share the data of the
original by replacing self.data temporarily, then using the update() method
on the new mapping object to populate it.
This closes SF bug #476616.
Jack Jansen [Mon, 5 Nov 2001 14:44:23 +0000 (14:44 +0000)]
Carbon Event Manager module donated by Donovan Preston. Checked in as I received them (except for namechange), these will not work as-is, that'll be fixed in a later checkin.