Barry Warsaw [Mon, 30 Dec 2002 17:45:02 +0000 (17:45 +0000)]
TestMIMEAudio.setUp(): Use the email package's copy of the audio test
file, needed because some binary distros (read RPMs) don't include the
test module in their standard Python package. This eliminates an
external dependency and closes SF bug # 650441.
Barry Warsaw [Mon, 30 Dec 2002 17:44:27 +0000 (17:44 +0000)]
A copy of the audio test file from Lib/test, needed because some
binary distros (read RPMs) don't include the test module in their
standard Python package. This eliminates an external dependency and
closes SF bug # 650441.
Tim Peters [Mon, 30 Dec 2002 17:37:30 +0000 (17:37 +0000)]
Added tests that conversion to our own timezone is always an identity,
and that conversion to "timezone" None is the same as stripping the
tzinfo member.
Tim Peters [Mon, 30 Dec 2002 17:09:40 +0000 (17:09 +0000)]
Beefed up the timezone conversion test by adding a phony UTC zone that's
west of the US zones getting converted, and also by using Eastern "as if"
it were UTC (wrt Pacific), and vice versa.
Guido van Rossum [Mon, 30 Dec 2002 16:25:41 +0000 (16:25 +0000)]
Patch 659834 by Magnus Lie Hetland:
Check for readline 2.2 features. This should make it possible to
compile readline.c again with GNU readline versions 2.0 or 2.1; this
ability was removed in readline.c rev. 2.49. Apparently the older
versions are still in widespread deployment on older Solaris
installations. With an older readline, completion behavior is subtly
different (a space is always added).
Restore the test of the random module after including "Random" in the
ignore tuple.
The line, "from _random import Random as CoreGenerator", fools the test
code which expects CoreGenerator.__name__ to be "CoreGenerator" instead
of "Random".
This test depends on the exact ordering produced by the WichmannHill
random number generator. Altered it a bit to use the old generator
and restore the test.
Tim Peters [Sun, 29 Dec 2002 23:46:40 +0000 (23:46 +0000)]
Taught the Windows build about _randommodule.c. This is compiled
into the core DLL, since it's not much code and lots of stuff uses
it (e.g., try getting a tempfile name without it).
Tim Peters [Sun, 29 Dec 2002 23:44:49 +0000 (23:44 +0000)]
A start at non-trivial (== DST-aware) tests of timezone conversion.
Guido has in mind an easier way for users to code this stuff, but the
only tests we have now are for fixed-offset tzinfo classes, and this
stuff is extremely delicate in the endcases (read the new test code
for why: there are holes in time <wink>).
Kurt B. Kaiser [Sun, 29 Dec 2002 22:03:38 +0000 (22:03 +0000)]
M EditorWindow.py
M PyShell.py
1. PyShell Rev 1.39, EditorWindow Rev 1.37 fix was not handling a
multiline prompt.
2. The same fix introduced a bug where hitting <enter> at a previous
prompt-only line would copy the prompt to the iomark.
3. Move the setting of sys.ps1 earlier, into PyShell.main(), to allow
this code to work before a shell is started up.
4. If cursor is on the input line in the prompt, and you hit <enter>,
process the line instead of complaining.
5. If line has no stdin range (this includes the last line before shell
restart) strip any prompt before recalling.
Incorporate Skip's suggestion to use SciPy's validation test near
equality. Note, there is another flavor that compares to a given
number of significant digits rather than decimal places. If there
is a demand, that could be added at a later date.
SF patch #659536: Use PyArg_UnpackTuple where possible.
Obtain cleaner coding and a system wide
performance boost by using the fast, pre-parsed
PyArg_Unpack function instead of PyArg_ParseTuple
function which is driven by a format string.
Tim Peters [Sat, 28 Dec 2002 21:56:08 +0000 (21:56 +0000)]
Apparently FreeBSD enables some HW floating-point exceptions by default.
This can cause core dumps when Python runs. Python relies on the 754-
(and C99-) mandated default "non-stop" mode for FP exceptions. This
patch from Ben Laurie disables at least one FP exception on FreeBSD at
Python startup time.
Tim Peters [Fri, 27 Dec 2002 00:41:11 +0000 (00:41 +0000)]
Make comparison and subtraction of aware objects ignore tzinfo if the
operands have identical tzinfo members (meaning object identity -- "is").
I misunderstood the intent here, reading wrong conclusion into
conflicting clues.
Tim Peters [Thu, 26 Dec 2002 05:01:19 +0000 (05:01 +0000)]
Added tests to ensure that timetz comparison, and datetimetz
subtraction, work as documented. In the Python implementation,
they weren't calling utcoffset() if both operands had the same
tzinfo object. That's fine if it so happens that the shared
tzinfo object returns a fixed offset (independent of operand),
but can give wrong results if that's not so, and the latter
obtains in a tzinfo subclass instance trying to model both
standard and daylight times. The C implementation was already
doing this "correctly", so we're just adding tests to verify it.
Jack Jansen [Wed, 25 Dec 2002 22:45:28 +0000 (22:45 +0000)]
If you entered a pathname for a nonexisting file to a FSSpec constructor
on OSX then the actual error (file not found) was obscured by the
error message that tried to be helpful about the allowed arguments. Fixed.
Jack Jansen [Wed, 25 Dec 2002 22:31:28 +0000 (22:31 +0000)]
Changed folder name for apps from Python to MacPython-$(VERSION) (for a
normal 2.3 framework install) and MacPython-OSX-$(VERSION) (for the
experimental Jaguar addon install).
Kurt B. Kaiser [Tue, 24 Dec 2002 06:36:19 +0000 (06:36 +0000)]
M PyShell.py
M idle
M idle.py
M idle.pyw
M setup.py
Switch back to installing IDLE as a package. The IDLE GUI and the
subprocess will both attempt to start up via the package mechanism, but if
IDLE is not yet installed it is possible to run by calling python idle.py
in the IDLE source directory, or to add the source directory to sys.path.
One advantage of doing it this way is IDLE stays off sys.path.
Kurt B. Kaiser [Tue, 24 Dec 2002 00:57:22 +0000 (00:57 +0000)]
1. RPC stack levels were not pruned from traceback unless IDLE was started
from its source directory.
2. Replace final traceback '?' with '-toplevel-'
3. Remove duplicated import boolcheck
Tim Peters [Mon, 23 Dec 2002 22:21:52 +0000 (22:21 +0000)]
Brought the strftime explanation into synch with the plain-text sandbox
docs, and moved its section to the end (before the "C API" section,
which latter doesn't really belong in the Library manual).
Guido van Rossum [Mon, 23 Dec 2002 16:30:00 +0000 (16:30 +0000)]
Last week we discussed adding this module to the standard library.
Here's a draft. I have no immediate use for it, but I'd like this to
be available for experimentation. I may withdraw it or change it
radically up to and including the release of Python 2.3b1.