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
Georg Brandl [Sun, 24 Sep 2006 12:50:24 +0000 (12:50 +0000)]
Fix a bug in traceback.format_exception_only() that led to an error
being raised when print_exc() was called without an exception set.
In version 2.4, this printed "None", restored that behavior.
Georg Brandl [Sun, 24 Sep 2006 12:35:36 +0000 (12:35 +0000)]
Fix a bug in the parser's future statement handling that led to "with"
not being recognized as a keyword after, e.g., this statement:
from __future__ import division, with_statement
Make output on test_strptime() be more verbose in face of failure. This is in
hopes that more information will help debug the failing test on HPPA Ubuntu.
Mostly revert this file to the same version as before. Only force setting
of PY_FORMAT_SIZE_T to "l" for Mac OSX. I don't know a better define
to use. This should get rid of the warnings on other platforms and Mac too.
Fix %zd string formatting on Mac OS X so it prints negative numbers.
In addition to testing positive numbers, verify negative numbers work in configure.
In order to avoid compiler warnings on OS X 10.4, also change the order of the check
for the format character to use (PY_FORMAT_SIZE_T) in the sprintf format
for Py_ssize_t. This patch changes PY_FORMAT_SIZE_T from "" to "l" if it wasn't
defined at configure time. Need to verify the buildbot results.
Backport candidate (if everyone thinks this patch can't be improved).
Jack Diederich [Thu, 21 Sep 2006 17:50:26 +0000 (17:50 +0000)]
* regression bug, count_next was coercing a Py_ssize_t to an unsigned Py_size_t
which breaks negative counts
* added test for negative numbers
will backport to 2.5.1
Gregory P. Smith [Tue, 19 Sep 2006 17:35:04 +0000 (17:35 +0000)]
Fixes a bug with bsddb.DB.stat where the flags and txn keyword
arguments are transposed. (reported by Louis Zechtzer)
..already committed to release24-maint
..needs committing to release25-maint
Georg Brandl [Mon, 11 Sep 2006 09:38:35 +0000 (09:38 +0000)]
Forward-port of rev. 51857:
Building with HP's cc on HP-UX turned up a couple of problems.
_PyGILState_NoteThreadState was declared as static inconsistently.
Make it static as it's not necessary outside of this module.
Some tests failed because errno was reset to 0. (I think the tests
that failed were at least: test_fcntl and test_mailbox).
Ensure that errno doesn't change after a call to Py_END_ALLOW_THREADS.
This only affected debug builds.
Remove the __unicode__ method from exceptions. Allows unicode() to be called
on exception classes. Would require introducing a tp_unicode slot to make it
work otherwise.