Barry Warsaw [Sun, 4 Nov 2001 03:04:25 +0000 (03:04 +0000)]
Two bug fixes for problems reported by Sverre:
__getaddr(): Watch out for empty addresses that can happen when
something like "MAIL FROM:<CR>" is received. This avoids the
IndexError and rightly returns an SMTP syntax error.
parseargs(): We didn't handle the 2-arg case where both the localspec
and the remotespec were provided on the command line.
Tim Peters [Sat, 3 Nov 2001 19:35:43 +0000 (19:35 +0000)]
Improved error msg when a symbolic group name is redefined. Added docs
and NEWS. Bugfix candidate? That's a dilemma for Anthony <wink>: /F
did fix a longstanding bug here, but the fix can cause code to raise an
exception that previously worked by accident.
Just van Rossum [Fri, 2 Nov 2001 19:17:16 +0000 (19:17 +0000)]
- rearranged some imports
- removed default button drawing code: this doesn't work well
under OSX. Needs to be replaced by SetWindowDefaultButton()
calls, once we have those.
Tim Peters [Thu, 1 Nov 2001 23:59:56 +0000 (23:59 +0000)]
float_divmod(): the code wasn't sick enough to stop the MS optimizer
from optimizing away mod's sign adjustment when mod == 0; so it got
the intended result only in the debug build.
Jack Jansen [Thu, 1 Nov 2001 23:17:35 +0000 (23:17 +0000)]
We always install the Sioux menubar, in stead of only when no menubar
was installed previously. This fixes bug #476904, but I'm not 100%
sure it doesn't break anything else. But if it does I'll notice tomorrow
when I try to build GRiNS:-)
Tim Peters [Thu, 1 Nov 2001 23:12:27 +0000 (23:12 +0000)]
SF bug #477221: abs and divmod act oddly with -0.0
Try to ensure that divmod(-0.0, 1.0) -> (-0.0, +0.0) across platforms.
It always did on Windows, and still does. It didn't on Linux. Alas,
there's no platform-independent way to write a test case for this.
Bugfix candidate.
Tim Peters [Thu, 1 Nov 2001 21:51:15 +0000 (21:51 +0000)]
float_abs() again: Guido pointed out that this could screw up in the
presence of NaNs. So pass the issue on to the platform libm fabs();
after all, fabs() is a std C function because you can't implement it
correctly in portable C89.
Fred Drake [Thu, 1 Nov 2001 20:26:12 +0000 (20:26 +0000)]
PyFunction_Call() did not check the result of PyObject_Repr() for NULL, and
should just avoid calling it in the first place to avoid waiting for a repr
of a large object like a dict or list. The result of PyObject_Repr() was
being leaked as well.
Bugfix candidate!
Add has_finalizer predictate function. Use it when deciding which
objects to save in gc.garbage. This should be the last change needed to
fix SF bug 477059: "__del__ on new classes vs. GC".
Note that this change slightly changes the behavior of the collector.
Before, if a cycle was found that contained instances with __del__
methods then all instance objects in that cycle were saved in
gc.garbage. Now, only objects with __del__ methods are saved in
gc.garbage.
Jack Jansen [Thu, 1 Nov 2001 14:44:15 +0000 (14:44 +0000)]
The import check in setup.py fails on Mac OS X for Carbon-based modules
if you are not building while logged in to the console (you cannot
connect to the window server, so the Carbon library doesn't initialize).
Added a quick hack to skip the import test, with a warning, for modules
linked against Carbon.
SF bug #477059 (my own): __del__ on new classes vs. GC.
When moving objects with a __del__ attribute to a special list, look
for __del__ on new-style classes with the HEAPTYPE flag set as well.
(HEAPTYPE means the class was created by a class statement.)
Jack Jansen [Wed, 31 Oct 2001 12:11:48 +0000 (12:11 +0000)]
Link the core with CoreServices, not with Carbon, and don't use any Carbon
routines. As of 10.1 using Carbon will crash Python if no window server is
available (ssh connection, console mode, MacOSX Server). This fixes bug
#466907.
A result of this mod is that the default 8bit encoding on OSX is now ASCII,
for the time being. Also, the extension modules that need the Carbon
framework now explicitly include it in setup.py.
Tim Peters [Tue, 30 Oct 2001 23:20:46 +0000 (23:20 +0000)]
Fix bad bug in structseq slicing (NULL pointers in result). Reported by
Jack Jansen on python-dev.
Add simple test case.
Move vereq() from test_descr to test_support (it's handy!).
Jack Jansen [Tue, 30 Oct 2001 22:48:36 +0000 (22:48 +0000)]
Mod by Donovan Preston to allow MacPython to live in a Python.app bundle and understand the __main__.py convention used there for applets. This gives us applets that work on both OS9 and OSX! (Although "applet" may not be the correct word for something that is going to be multimegabyte:-).
But: the code is currently disabled, as it requires CodeWarrior 7 and I'm still using 6.
Tim Peters [Tue, 30 Oct 2001 21:09:55 +0000 (21:09 +0000)]
SF bug #474077 2.2b1: Error compiling extns with BCC
Removed "#undef HAVE_HYPOT" line from Borland config, as suggested.
Whether this will break some other Borland usage is a good question I
can't answer.
Fred Drake [Tue, 30 Oct 2001 16:28:46 +0000 (16:28 +0000)]
Always use --dvips-safe when generating HTML for the standard documentation
since we do not have anything that causes dvips to be run except when
PostScript is specifically requested, which is a separate target.
Fred Drake [Tue, 30 Oct 2001 16:09:51 +0000 (16:09 +0000)]
Add a new option, --dvips-safe, which sets the $DVIPS_SAFE option in
LaTeX2HTML. This is not safe to do in general (for the reasons LaTeX2HTML
protects against dvips to begin with), but is safe if we do not actually
need to run dvips. Note that we also assume it is safe if the user
specifically requests PostScript generation. See the comments for further
explanation.
Guido van Rossum [Tue, 30 Oct 2001 03:17:30 +0000 (03:17 +0000)]
Fix SF bug #456386: test_commands regression failure (Andrew Dalke)
test_commands does not work on IRIX
It assumes the output of "ls /bin/ls" is a line
that starts with a '-'. On IRIX that file is
a symbolic link, so the first character is an l.
This causes test_getstatus to fail.
Tim Peters [Tue, 30 Oct 2001 01:26:49 +0000 (01:26 +0000)]
PySocketSock_connect_ex(): On Windows, return the correct Windows exit
code. The patch is from Jeremy, and allows test_asynchat to run again.
Bugfix candidate.
Guido van Rossum [Mon, 29 Oct 2001 22:11:00 +0000 (22:11 +0000)]
Add __del__ callbacks. They are too useful to leave out.
XXX Remaining problems:
- The GC module doesn't know about these; I think it has its reasons
to disallow calling __del__, but for now, __del__ on new-style
objects is called when the GC module discards an object, for better
or for worse.
- The code to call a __del__ handler is really ridiculously
complicated, due to all the different debug #ifdefs. I've copied
this from the similar code in classobject.c, so I'm pretty sure I
did it right, but it's not pretty. :-(
Tim Peters [Mon, 29 Oct 2001 21:46:08 +0000 (21:46 +0000)]
SF bug #476138: tempfile behavior across platforms
Ensure that a tempfile can be closed any number of times without error.
This wasn't true on Windows.
Fred Drake [Mon, 29 Oct 2001 21:02:28 +0000 (21:02 +0000)]
Revise the PDF support in the LaTeX style sheet. This still isn't quite
right, but the tests for whether we are generating PDF are a bit more
readable, and some unnecessary indirection has been removed.
Fred Drake [Mon, 29 Oct 2001 20:57:23 +0000 (20:57 +0000)]
Update to reflect changes to the low-level logreader: share the info
dictionary instead of building a new one, and provide an overridable method
to allow subclasses to catch ADD_INFO records that are not part of the
initial block of ADD_INFO records created by the profiler itself.
Fred Drake [Mon, 29 Oct 2001 20:45:57 +0000 (20:45 +0000)]
Make the low-level log-reader object export a dictionary mapping keys
to lists of values, giving the contents of all the ADD_INFO records
seen so far. This is initialized agressively when the log file is
opened, so that whoever is looking at the log reader can always see
the initial data loaded into the data stream. ADD_INFO events later
in the log file continue to be reported to the application layer as
before.
Add a new method, addinfo(), to the profiler. This can be used to
insert additional ADD_INFO records into the profiler log.
Fix the tp_flags and tp_name slots on the type objects.
Fred Drake [Mon, 29 Oct 2001 18:01:24 +0000 (18:01 +0000)]
Add additional information on exceptions from time.mktime() and related to
improper time tuples passed to various functions. Based on comments from
Andreas Jung.