test_site often failed under "regrtest.py -r", because this xmlrpc test
left sys with a setdefaultencoding attribute, but loading site.py removes
that attribute and test_site.py verifies the attribute is gone. Changed
this test to get rid of sys.setdefaultencoding if it didn't exist when
this test started.
Don't know whether this is a bugfix (backport) candidate.
In a threads-disabled build, typing Ctrl-C into a raw_input() crashed,
because (essentially) I didn't realise that PY_BEGIN/END_ALLOW_THREADS
actually expanded to nothing under a no-threads build, so if you somehow
NULLed out the threadstate (e.g. by calling PyThread_SaveThread) it would
stay NULLed when you return to Python. Argh!
Walter Dörwald [Mon, 4 Apr 2005 21:38:47 +0000 (21:38 +0000)]
Fix for SF bug #1175396: readline() will now read one more character, if
the last character read is "\r" (and size is None, i.e. we're allowed to
call read() multiple times), so that we can return the correct line ending
(this additional character might be a "\n").
If the stream is temporarily exhausted, we might return the wrong line ending
(if the last character read is "\r" and the next one (after the byte stream
provides more data) is "\n", but at least the atcr member ensure that we
get the correct number of lines (i.e. this "\n" will not be treated as
another line ending.)
Make a handy macro, Py_DEFAULT_RECURSION_LIMIT to allow to define
a default value of recursion limit from build systems. 1000 levels
are still too high for some 64bit systems.
I suppose a bug report or even a fix would be a better response, but
commit a yelp about a noted flaw the error messages for METH_KEYWORDS
functions under some circumstances.
[ 1166660 ] The readline module can cause python to segfault
It seems to me that the code I'm rewriting here attempted to call any
user-supplied hook functions using the thread state of the thread that
called the hook-setting function, as opposed to that of the thread
that is currently executing. This doesn't work, in general.
Fix this by using the PyGILState API (It wouldn't be that hard to
define a dummy version of said API when #ifndef WITH_THREAD, would
it?).
Also, check the conversion to integer of the return value of a hook
function for errors (this problem was mentioned in the ipython bug
report linked to in the above bug).
Bob Ippolito [Mon, 28 Mar 2005 23:23:47 +0000 (23:23 +0000)]
patch [1171735] - Darwin 8's headers disable functionality when
POSIX is enabled. This prevents the toolbox glue, all of Carbon,
and various other non-POSIX features from compiling. The POSIX
symbols are still used by default, so turning off the #define
doesn't hurt.
Additionally, linker flags have changed for Darwin 8, and are
different for Darwin 8/gcc4 (default) and Darwin 8/gcc3.3.
Greg Ward [Mon, 28 Mar 2005 02:34:59 +0000 (02:34 +0000)]
SF #1169212: merge from 2.4 branch: fix silly typo in explaining AFMT
macros: U16 is unsigned and S16 is signed. Duh. Clarify surrounding
text a bit and refer to OSS docs.
* Fix decimal's handling of foreign types. Now returns NotImplemented
instead of raising a TypeError. Allows other types to successfully
implement __radd__() style methods.
* Remove future division import from test suite.
* Remove test suite's shadowing of __builtin__.dir().
Martin v. Löwis [Tue, 15 Mar 2005 00:39:40 +0000 (00:39 +0000)]
Reuse componentids for *.dll across minor releases.
Indicate to the user when this is an upgrade installation.
Make CHM file non-advertised.
Backported to 2.4.
Vinay Sajip [Sun, 13 Mar 2005 09:54:31 +0000 (09:54 +0000)]
Added optional encoding argument to file handlers. Made traceback import unconditional, to avoid lock contention problems which occur when logging from custom importers (SF patch #1158052)
Tim Peters [Sat, 12 Mar 2005 19:05:58 +0000 (19:05 +0000)]
Port bugfix from 2.4 maint.
Bug #1160802: Can't build Zope on Windows w/ 2.4.1c1.
MSVCCompiler.initialize(): set self.initialized to True, as suggested
by AMK. Else we keep growing the PATH endlessly, with each new C
extension built, until putenv() complains.
No change to NEWS because the patch that created this bug is also new
for 2.5a1 (so there's no change here to any code yet released from HEAD).
Patch #1159931/bug #1143895: inspect.getsource failed when functions,
etc., had comments after the colon, and some other cases. This patch
take a simpler approach that doesn't rely on looking for a ':'. Thanks
Simon Percivall!
Fred Drake [Thu, 10 Mar 2005 05:02:18 +0000 (05:02 +0000)]
- fix generated Texinfo markup for \deprecated
- add support for additional markup: \leq, \textbar, \textit
- add a comment about the non-support for the Euro character
(ported from release24-maint branch release 1.10.4.2)