Barry Warsaw [Mon, 17 Dec 2001 15:40:24 +0000 (15:40 +0000)]
Get rid of the stupid backslash in front of the column zero open
paren. This was there to worm around a stupid XEmacs bug, but since I
can't tickle the bug in newer XEmacsen (just tried w/21.4.5) it's
possible the problem has been fixed. We shouldn't have to be working
around editor bugs anyway.
If it crops up again, I'll report it (again) to the XEmacs crowd.
Steve Purcell [Mon, 17 Dec 2001 10:13:17 +0000 (10:13 +0000)]
Synch with pyunit CVS:
- Adds Fred's patch 487662: "Better error message for assertEqual"
- Removed small portion of code unused after Guido's patch
490119: "Don't treat ^C as error"
Tim Peters [Mon, 17 Dec 2001 01:27:01 +0000 (01:27 +0000)]
David Abrahams tried to compile this as a separate DLL under MSVC, and
got a barrage of compile errors that didn't make sense to the C++ brain:
MSVC does not allow C (but does allow C++) initializers to contain
data addresses supplied by other DLLs. So changed the initializers here
to use dummy nulls, and changed module init to plug in the foreign
addresses at runtime (manually simulating what C++ does by magic). Tested
on Windows, and Guido tested on Linux (thanks!). BTW, the *point* is that
people are going to use this module as a template for writing their own
subtypes, and it's unusual for extension authors to build their extensions
into Python directly (separate DLLs are the norm on Windows); so it's
better if we give them a template that works <wink>.
Tim Peters [Sun, 16 Dec 2001 19:11:44 +0000 (19:11 +0000)]
_PyEval_SliceIndex(): Repaired the comments, and added XXX comments
about its dubious treatment of NULL (also opened a bug report on that,
but don't want to risk changing it this late in the 2.2 game).
Tim Peters [Sat, 15 Dec 2001 22:12:47 +0000 (22:12 +0000)]
SF patch 493739 2 Bugfixes for 2.2c1 (RISC OS specific), from
Dietmar Schwertberger.
Bugfix candidate.
"""
RISCOS/Modules/getpath_riscos.c:
Include trailing '\0' when using strncpy [copy
strlen(...)+1 characters].
Lib/plat-riscos/riscospath.py:
Use riscosmodule.expand for os.path.abspath.
[fixes problems with site.py where
abspath("<Python$Dir>") returned
join(os.getcwd(), "<Python$Dir>") as e.g.
"SCSI::SCSI4.$.<Python$Dir>" because "<Python$Dir>"
wasn't recognised as an absolute path.]
"""
Jack Jansen [Sat, 15 Dec 2001 00:23:35 +0000 (00:23 +0000)]
Finally CW7 allows me to replace the continually-in-need-of-updating exports files with one 6-line anti-export-file. Yeah! (Thanks Alex, for reminding me:-)
Jack Jansen [Fri, 14 Dec 2001 21:28:53 +0000 (21:28 +0000)]
Added test_socketserver and test_unicode_file to tests expected to be
skipped on Mac OS X. Not sure yet about test_locale.py: this may be
due to my copy of Mac OS X (although it talks english fine enough).
Barry Warsaw [Fri, 14 Dec 2001 20:34:20 +0000 (20:34 +0000)]
send(), ehlo(): Integrate patch #487310 by Fazal Majid. Consistently
call self.close() just before raising SMTPServerDisconnected. This
allows you to, e.g. reconnect after a server timeout.
Fred Drake [Fri, 14 Dec 2001 16:57:31 +0000 (16:57 +0000)]
Work around the problem of spaces after a "}" being dropped by LaTeX2HTML if
they were represented by newlines in the document source.
Partially fixes SF bug #493243.
Fred Drake [Fri, 14 Dec 2001 16:54:53 +0000 (16:54 +0000)]
The valign attribute to control the vertical alignment of a table cell should
be on the <tr> element, not the <table> element.
Partially fixes SF bug #493243.
Jeremy Hylton [Fri, 14 Dec 2001 16:15:11 +0000 (16:15 +0000)]
Partial fix for problem in SF buf #487458
Rev 1.20 introduced a call to getpeername() in the dispatcher
constructor. This only works for a connected socket. Apparently
earlier versions of the code worked with un-connected sockets, e.g. a
listening socket.
It's not clear that the code is supposed to accept these sockets,
because it sets self.connected = 1 when passed a socket. But it's
also not clear that it should be a fatal error to pass a listening
socket.
The solution, for now, is to put a try/except around the getpeername()
call and continue if it fails. The self.addr attribute is used
primarily (only?) to produce a nice repr for the object, so it hardly
matters. If there is a real error on a connected socket, it's likely
that subsequent calls will fail too.
Jack Jansen [Fri, 14 Dec 2001 14:31:15 +0000 (14:31 +0000)]
Add default values for options in the class init routine, not in the convenience wrapper function: distutils uses the class directly. Fixes bug #492665.
Guido van Rossum [Fri, 14 Dec 2001 04:19:56 +0000 (04:19 +0000)]
(Merge into trunk.)
Fix for SF bug #492345. (I could've sworn I checked this in, but
apparently I didn't!)
This code:
class Classic:
pass
class New(Classic):
__metaclass__ = type
attempts to create a new-style class with only classic bases -- but it
doesn't work right. Attempts to fix it so it works caused problems
elsewhere, so I'm now raising a TypeError in this case.
Fred Drake [Thu, 13 Dec 2001 17:20:32 +0000 (17:20 +0000)]
Replace the "Cookbook approach" with the approach documented in
PC/example_nt/readme.txt; this one does not rely on any external scripts.
This "fixes" SF bug #221671 and most of SF bug #225003.
Fred Drake [Thu, 13 Dec 2001 04:53:07 +0000 (04:53 +0000)]
Make tix_configure() work the same way configure() works for the basic
Tkinter classes.
Adjust a lot of docstrings.
Convert a few type checks to use isinstance() instead of type().
This is part of SF patch #485959.
Fred Drake [Wed, 12 Dec 2001 05:38:08 +0000 (05:38 +0000)]
Very small test suite for the calendar module, mostly to check a constraint
on the return values from isleap(). Also checks firstweekday() and
setfirstweekday().
Guido van Rossum [Tue, 11 Dec 2001 22:41:24 +0000 (22:41 +0000)]
Fix SF bug #482171: webchecker dies on file: URLs w/o robots.txt
The cause seems to be that when a file URL doesn't exist,
urllib.urlopen() raises OSError instead of IOError. Simply add this
to the except clause. Not elegant, but effective. :-)
Tim Peters [Tue, 11 Dec 2001 21:43:14 +0000 (21:43 +0000)]
Added -Qnew news about the test_coercion.py failure. That's the only test
that still fails under -Qnew, and is so tied to details of current
behavior that fixing it before new division becomes the default is
impractical.
Fred Drake [Tue, 11 Dec 2001 20:49:23 +0000 (20:49 +0000)]
Remove crufty whitespace in a block of index entries.
Minor, but generates slightly smaller HTML & makes it easier to see what's
happening when debugging the HTML.
Joe VanAndel wrote:
>
> When using 'distutils' (shipped with Python 2.1) I've found that my
> Python scripts installed with a first line of:
>
> #!/usr/bin/python2.1None
>
> This is caused by distutils trying to patch the first line of the python
> script to use the current interpreter.
Tim Peters [Tue, 11 Dec 2001 20:31:34 +0000 (20:31 +0000)]
float_floor_div: An expression like 3.//1j crashed the interpreter, or
delivered bizarre results. Check float_divmod for a Py_NotImplemented
return and pass it along (instead of treating Py_NotImplemented as a
2-tuple).
CONVERT_TO_DOUBLE: Added comments; this macro is obscure.