Ronald Oussoren [Sun, 22 Oct 2006 10:45:18 +0000 (10:45 +0000)]
Patch #1580674: with this patch os.readlink uses the filesystem encoding to
decode unicode objects and returns an unicode object when the argument is one.
Thomas Heller [Tue, 17 Oct 2006 19:30:48 +0000 (19:30 +0000)]
ctypes callback functions only support 'fundamental' result types.
Check this and raise an error when something else is used - before
this change ctypes would hang or crash when such a callback was
called. This is a partial fix for #1574584.
Georg Brandl [Thu, 12 Oct 2006 09:47:12 +0000 (09:47 +0000)]
Bug #1548891: The cStringIO.StringIO() constructor now encodes unicode
arguments with the system default encoding just like the write()
method does, instead of converting it to a raw buffer.
Ronald Oussoren [Sun, 8 Oct 2006 17:51:46 +0000 (17:51 +0000)]
MacOSX: The universal build requires that users have the MacOSX10.4u SDK
installed to build extensions. This patch makes distutils emit a warning when
the compiler should use an SDK but that SDK is not installed, hopefully reducing
some confusion.
Ronald Oussoren [Sun, 8 Oct 2006 17:49:52 +0000 (17:49 +0000)]
MacOSX: distutils changes the values of BASECFLAGS and LDFLAGS when using a
universal build of python on OSX 10.3 to ensure that those flags can be used
to compile code (the universal build uses compiler flags that aren't supported
on 10.3). This patches gives the same treatment to CFLAGS, PY_CFLAGS and
BLDSHARED.
Ronald Oussoren [Sun, 8 Oct 2006 17:37:58 +0000 (17:37 +0000)]
Add version number to the link to the python documentation in
/Developer/Documentation/Python, better for users that install multiple versions
of python.
Skip Montanaro [Sat, 7 Oct 2006 11:05:02 +0000 (11:05 +0000)]
Note that the excel_tab class is registered as the "excel-tab" dialect.
Fixes 1572471. Make a similar change for the excel class and clean up
references to the Dialects and Formatting Parameters section in a few
places.
Armin Rigo [Fri, 6 Oct 2006 16:33:22 +0000 (16:33 +0000)]
A very minor bug fix: this code looks like it is designed to accept
any hue value and do the modulo itself, except it doesn't quite do
it in all cases. At least, the "cannot get here" comment was wrong.
Brett Cannon [Thu, 5 Oct 2006 22:02:31 +0000 (22:02 +0000)]
Clarify what "re-initialization" means for init_builtin() and init_dynamic().
Also remove warning about re-initialization as possibly raising an execption as
both call _PyImport_FindExtension() which pulls any module that was already
imported from the Python process' extension cache and just copies the __dict__
into the module stored in sys.modules.
Cause a PyObject_Malloc() failure to trigger a MemoryError, and then
add 'if (PyErr_Occurred())' checks to various places so that NULL is
returned properly.
Armin Rigo [Wed, 4 Oct 2006 12:17:45 +0000 (12:17 +0000)]
Forward-port of r52136,52138: a review of overflow-detecting code.
* unified the way intobject, longobject and mystrtoul handle
values around -sys.maxint-1.
* in general, trying to entierely avoid overflows in any computation
involving signed ints or longs is extremely involved. Fixed a few
simple cases where a compiler might be too clever (but that's all
guesswork).
* more overflow checks against bad data in marshal.c.
* 2.5 specific: fixed a number of places that were still confusing int
and Py_ssize_t. Some of them could potentially have caused
"real-world" breakage.
* list.pop(x): fixing overflow issues on x was messy. I just reverted
to PyArg_ParseTuple("n"), which does the right thing. (An obscure
test was trying to give a Decimal to list.pop()... doesn't make
sense any more IMHO)
Jeremy Hylton [Wed, 4 Oct 2006 02:24:52 +0000 (02:24 +0000)]
Fix for SF bug 1569998: break permitted inside try.
The compiler was checking that there was something on the fblock
stack, but not that there was a loop on the stack. Fixed that and
added a test for the specific syntax error.
Kurt B. Kaiser [Sun, 1 Oct 2006 21:16:45 +0000 (21:16 +0000)]
Some syntax errors were being caught by tokenize during the tabnanny
check, resulting in obscure error messages. Do the syntax check
first. Bug 1562716, 1562719