Optimize PyList_AsTuple(). Improve cache performance by doing the
pointer copy and object increment in one pass. For small lists,
save the overhead of the call to memcpy() -- this comes up in
calls like f(*listcomp).
Christian Heimes [Fri, 14 Dec 2007 02:35:23 +0000 (02:35 +0000)]
Fixed bug #1620: New @spam.getter property syntax modifies the property in place.
I added also the feature that a @prop.getter decorator does not overwrite the doc string of the property if it was given as an argument to property().
Gerhard Häring [Tue, 11 Dec 2007 21:07:40 +0000 (21:07 +0000)]
Forward-port of commit 59184.
- Backported a workaround for a bug in SQLite 3.2.x/3.3.x versions where a
statement recompilation with no bound parameters lead to a segfault
- Backported a fix necessary because of an SQLite API change in version
3.5.
This prevents segfaults when executing empty queries, like our test suite
does
Christian Heimes [Tue, 11 Dec 2007 00:54:34 +0000 (00:54 +0000)]
The new float repr causes too much trouble and pain. I'm disabling the feature until we have sorted out the issues on all machines. 64bit machines seem to have issues and Guido has reported even worse.
Guido: It's pretty bad actually -- repr(1e5) comes out as '1.0'... Ditto for
repr(1eN) for most N... Both in 2.6 and in 3.0...
Guido van Rossum [Mon, 10 Dec 2007 23:00:12 +0000 (23:00 +0000)]
Patch #1643738 by Ulisses Furquim -- make the is_tripped variable
in signalmodule.c more robust. Includes Martin von Loewis's suggestion
to set is_tripped after .tripped.
Christian Heimes [Mon, 10 Dec 2007 22:28:56 +0000 (22:28 +0000)]
Backport of r59456:59458 from py3k to trunk
Issue #1580: New free format floating point representation based on "Floating-Point Printer Sample Code", by Robert G. Burger. For example repr(11./5) now returns '2.2' instead of '2.2000000000000002'.
Thanks to noam for the patch! I had to modify doubledigits.c slightly to support X64 and IA64 machines on Windows. I also added the new file to the three project files.
Christian Heimes [Mon, 10 Dec 2007 15:12:41 +0000 (15:12 +0000)]
Added wide char api variants of getch and putch to msvcrt module. The wide char methods are required to fix #1578 in py3k. I figured out that they might be useful in 2.6, too.
Several Windows related cleanups:
* Removed a #define from pyconfig.h. The macro was already defined a few lines higher.
* Fixed path to tix in the build_tkinter.py script
* Changed make_buildinfo.c to use versions of unlink and strcat which are considered safe by Windows (as suggested by MvL).
* Removed two defines from pyproject.vsprops that are no longer required. Both are defined in pyconfig.h and make_buildinfo.c doesn't use the unsafe versions any more (as suggested by MvL).
* Added some more information about PGO and the property files to PCbuild9/readme.txt.
Fixed get_config_h_filename for Windows. Without the patch it can't find the pyconfig.h file inside a build tree.
Added several small unit tests for sysconfig.
Fix Issue 1045.
Factor-out common calling code by simplifying the length_hint API.
Speed-up the function by caching the PyObject_String for the attribute lookup.
The macros _WIN32, _WIN64 and _M_X64 are defined by the compiler. The VS 2008 IDE doesn't know about (some) of the macros and can display wrong information. In my case a section #ifdef _WIN64 was grayed out although the platform was x64. I've added the macros to pyproject.vsprops and x64.vsprops.
I've also added a paragraph about the property files to the readme and fixed the order of pyupdate > pyinstrument.
Ronald Oussoren [Wed, 5 Dec 2007 20:07:36 +0000 (20:07 +0000)]
This "fixes" compilation issues for the Carbon._OSA module on OSX Leopard
by purging bindings to OSA's debug API's. Those APIs we're completely
unsupported on OSX 10.4 and are no longer available on OSX 10.5.
Note that this patches a generated file. This is somewhat acceptable because
regenerating the file is non-trivial and wouldn't use system headers anyway.
These optimizations create smaller and a bit faster code on my machine. I've also disabled an optimization that may be dangerous. Intrinsic functions conflict with errno.
Added warning that make install may overwrite or masquerade the default python binary. Use make altinstall instead.
A native English speaker may want to rephrase the paragraph. ;)
Patch #1537 from Chad Austin
Change GeneratorExit's base class from Exception to BaseException
(This time I'm applying the patch to the correct sandbox.)
Martin v. Löwis [Mon, 3 Dec 2007 19:20:02 +0000 (19:20 +0000)]
Issue #1727780: Support loading pickles of random.Random objects created
on 32-bit systems on 64-bit systems, and vice versa. As a consequence
of the change, Random pickles created by Python 2.6 cannot be loaded
in Python 2.5.