In rare cases of strings specifying true values near sys.maxint,
and oddball bases (not decimal or a power of 2), int(string, base)
could deliver insane answers. This repairs all such problems, and
also speeds string->int significantly. On my box, here are %
speedups for decimal strings of various lengths:
Note that the difference between 9 and 10 is the difference between
short and long Python ints on a 32-bit box. The patch doesn't
actually do anything to speed conversion to long: the speedup is
due to detecting "unsigned long" overflow more quickly.
This is a bugfix candidate, but it's a non-trivial patch and it
would be painful to separate the "bug fix" from the "speed up" parts.
Fredrik Lundh [Tue, 23 May 2006 18:44:25 +0000 (18:44 +0000)]
needforspeed: use append+reverse for rsplit, use "bloom filters" to
speed up splitlines and strip with charsets; etc. rsplit is now as
fast as split in all our tests (reverse takes no time at all), and
splitlines() is nearly as fast as a plain split("\n") in our tests.
and we're not done yet... ;-)
Use 'speed' instead of 'performance', because I agree with the argument
at http://zestyping.livejournal.com/193260.html that 'erformance' really means
something more general.
This patchs makes it possible to create a universal build on OSX 10.4 and use
the result to build extensions on 10.3. It also makes it possible to override
the '-arch' and '-isysroot' compiler arguments for specific extensions.
Richard Jones [Tue, 23 May 2006 10:37:38 +0000 (10:37 +0000)]
Merge from rjones-funccall branch.
Applied patch zombie-frames-2.diff from sf patch 876206 with updates for
Python 2.5 and also modified to retain the free_list to avoid the 67%
slow-down in pybench recursion test. 5% speed up in function call pybench.
Tim Peters [Mon, 22 May 2006 19:17:04 +0000 (19:17 +0000)]
PyUnicode_Join(): Recent code changes introduced new
compiler warnings on Windows (signed vs unsigned mismatch
in comparisons). Cleaned that up by switching more locals
to Py_ssize_t. Simplified overflow checking (it can _be_
simpler because while these things are declared as
Py_ssize_t, then should in fact never be negative).
This patches a file that is generated by bgen, however the code is now the
same as a current copy of bgen would generate. Without this patch most types
in the Carbon.CF module are unusable.
I haven't managed to coax bgen into generating a complete copy of _CFmodule.c
yet :-(, hence the manual patching.
Ronald Oussoren [Fri, 19 May 2006 18:17:31 +0000 (18:17 +0000)]
* Change working directory to the users home
directory, that makes the file open/save
dialogs more useable.
* Don't use argv emulator, its not needed
for idle.
George Yoshida [Tue, 16 May 2006 18:07:00 +0000 (18:07 +0000)]
Mention that Exception is now a subclass of BaseException.
Remove a sentence that says that BaseException inherits from BaseException.
(I guess this is just a copy & paste mistake.)
Tim Peters [Mon, 15 May 2006 20:44:10 +0000 (20:44 +0000)]
ReadDetectFileobjTest: repair Windows disasters by opening
the file object in binary mode.
The Windows buildbot slaves shouldn't swap themselves to death
anymore. However, test_tarfile may still fail because of a
temp directory left behind from a previous failing run.
Windows buildbot owners may need to remove that directory
by hand.
Ronald Oussoren [Sun, 14 May 2006 20:35:41 +0000 (20:35 +0000)]
A first cut at replacing the icons on MacOS X. This replaces all icons by icons
based on the new python.org logo. These are also the first icons that are
"proper" OSX icons.
Ronald Oussoren [Sun, 14 May 2006 19:56:34 +0000 (19:56 +0000)]
Rework the build system for osx applications:
* Don't use xcodebuild for building PythonLauncher, but use a normal unix
makefile. This makes it a lot easier to use the same build flags as for the
rest of python (e.g. make a universal version of python launcher)
* Convert the mac makefile-s to makefile.in-s and use configure to set makefile
variables instead of forwarding them as command-line arguments
* Add a C version of pythonw, that we you can use '#!/usr/local/bin/pythonw'
* Build IDLE.app using bundlebuilder instead of BuildApplet, that will allow
easier modification of the bundle contents later on.
Tim Peters [Sat, 13 May 2006 23:28:20 +0000 (23:28 +0000)]
Teach PyString_FromFormat, PyErr_Format, and PyString_FromFormatV
about "%u", "%lu" and "%zu" formats.
Since PyString_FromFormat and PyErr_Format have exactly the same rules
(both inherited from PyString_FromFormatV), it would be good if someone
with more LaTeX Fu changed one of them to just point to the other.
Their docs were way out of synch before this patch, and I just did a
mass copy+paste to repair that.
George Yoshida [Fri, 12 May 2006 17:25:26 +0000 (17:25 +0000)]
Duplicated description about the illegal continue usage can be found in nearly the same place.
They are same, so keep the original one and remove the later-added one.