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.
Thomas Heller [Thu, 7 Sep 2006 19:09:54 +0000 (19:09 +0000)]
The cast function did not accept c_char_p or c_wchar_p instances
as first argument, and failed with a 'bad argument to internal function'
error message.
Thomas Heller [Thu, 7 Sep 2006 18:56:28 +0000 (18:56 +0000)]
Anonymous structure fields that have a bit-width specified did not work,
and they gave a strange error message from PyArg_ParseTuple:
function takes exactly 2 arguments (3 given).
[Bug #1552726] Avoid repeatedly polling in interactive mode -- only put a timeout on the select()
if an input hook has been defined. Patch by Richard Boulton.
This select() code is only executed with readline 2.1, or if
READLINE_CALLBACKS is defined.
Backport candidate for 2.5, 2.4, probably earlier versions too.
Update the PCBuild8 solution.
Facilitate cross-compilation by having binaries in separate Win32 and x64 directories.
Rationalized configs by making proper use of platforms/configurations.
Remove pythoncore_pgo project.
Add new PGIRelease and PGORelease configurations to perform Profile Guided Optimisation.
Removed I64 support, but this can be easily added by copying the x64 platform settings.
[Bug #1526834] Fix crash in pdb when you do 'b f(';
the function name was placed into a regex pattern and the unbalanced paren
caused re.compile() to report an error
[Bug #1525469] SimpleXMLRPCServer still uses the sys.exc_{value,type} module-level globals instead of calling sys.exc_info(). Reported by Russell Warren
Fix a few bugs on cjkcodecs found by Oren Tirosh:
- gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
- iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
codepoints to conform the standard.
- iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 2013:2
codepoints now.