........
r68941 | raymond.hettinger | 2009-01-25 15:04:14 -0600 (Sun, 25 Jan 2009) | 1 line
Promote compress() from a recipe to being a regular itertool.
........
r68942 | raymond.hettinger | 2009-01-25 15:31:47 -0600 (Sun, 25 Jan 2009) | 1 line
Improved itertools recipe for generating powerset().
........
As discussed on python-dev, remove several operator functions
isSequenceType(), isMappingType(), and isNumberType() in favor
of using abstract base classes. Also, remove repeat() and irepeat()
in favor of mul() and imul().
After the buildbots have had a go at this. Will backport to Py3.0.1.
For Py2.7, will just mark as deprecated.
No need for carry to be type twodigits in _PyLong_AsByteArray; digit is large enough.
This change should silence a compiler warning on Windows.
........
I changed some bytearray methods to use strings instead of unicode like bytes_repr
Also, bytearray.fromhex() can take strings as well as unicode
........
Antoine Pitrou [Sun, 25 Jan 2009 16:34:23 +0000 (16:34 +0000)]
Issue #4753: By enabling a configure option named '--with-computed-gotos'
on compilers that support it (notably: gcc, SunPro, icc), the bytecode
evaluation loop is compiled with a new dispatch mechanism which gives
speedups of up to 20%, depending on the system, on various benchmarks.
Issue #1672332: Fix unpickling of subnormal floats, which was raising
ValueError on some platforms as a result of the platform strtod setting
errno on underflow.
........
r68906 | mark.dickinson | 2009-01-24 21:08:38 +0000 (Sat, 24 Jan 2009) | 2 lines
Issue #4393: fix 3 classes of potential portability problems in longobject.c:
- fix some places where counters into ob_digit were declared as
int instead of Py_ssize_t
- add (twodigit) casts where necessary
- fix code in _PyLong_AsByteArray that uses << on negative values
........
Mark Dickinson [Sat, 24 Jan 2009 15:02:35 +0000 (15:02 +0000)]
Some minor cleanups in PyLong_FromLong:
- fast path wasn't being properly taken for negative ints;
thanks Victor Stinner for pointing this out.
- use Py_SAFE_DOWNCAST instead of direct casting to digit
(it's safer, especially if we ever consider moving to 30-bit
digits)
- cleaner way to write negation
Brett Cannon [Thu, 22 Jan 2009 22:44:04 +0000 (22:44 +0000)]
Add some comment markers to more clearly delineate what different parts of the
code are for. Also add a note that the import * at the end of the file should
eventually go away.
Brett Cannon [Thu, 22 Jan 2009 22:43:07 +0000 (22:43 +0000)]
Add importlib.machinery with its first tenants, BuitinImporter and
FrozenImporter. Docs forthcoming.
I plan on all finders and loaders (and most likely hooks) to live
in imoprtlib.machinery. Utility stuff will end up in importlib.util.
Higher-level API stuff will stay on imoprtlib directly (e.g. import_module).
Blocked revisions 68760,68793,68813,68826,68829,68831 via svnmerge
........
r68760 | vinay.sajip | 2009-01-19 00:49:19 -0600 (Mon, 19 Jan 2009) | 1 line
Added more cross-reference targets and tidied up list of useful handlers.
........
r68793 | raymond.hettinger | 2009-01-19 21:36:36 -0600 (Mon, 19 Jan 2009) | 1 line
Make merging easier by formattng comment blocks the same in Py3.1
........
r68813 | raymond.hettinger | 2009-01-20 14:34:19 -0600 (Tue, 20 Jan 2009) | 3 lines
Issue 4998: __slots__ on Fractions was useless.
........
r68826 | vinay.sajip | 2009-01-20 16:43:17 -0600 (Tue, 20 Jan 2009) | 1 line
Issue 5013: Fixed bug in FileHandler when delay was set.
........
r68829 | vinay.sajip | 2009-01-20 17:16:08 -0600 (Tue, 20 Jan 2009) | 1 line
Issue 5013: Fixed bug in FileHandler when delay was set - added fix for RotatingFileHandler and changed header comment slightly.
........
r68831 | raymond.hettinger | 2009-01-20 17:42:54 -0600 (Tue, 20 Jan 2009) | 1 line
Beautify and cleanup the references section.
........
Issue #5008: When a file is opened in append mode with the new IO library,
do an explicit seek to the end of file (so that e.g. tell() returns the
file size rather than 0). This is consistent with the behaviour of the
traditional 2.x file object.
........
Mark Dickinson [Tue, 20 Jan 2009 20:43:58 +0000 (20:43 +0000)]
Issue #4842, patch 1/2: fix pickle in Python 3.x so that pickling with the
'L' opcode always appends an 'L' on output, just as 2.x does. When
unpickling, remove the trailing 'L' (if present) before passing the
result to PyLong_FromString.
Use Georg's new permalinks to documentation by version number.
That assures that IDLE's help always points to the correct
version and the latest update with all bug fixes.
........
Change an example in the docs to avoid a mistake when the code is copy
pasted and changed afterwards.
........
r68648 | benjamin.peterson | 2009-01-16 22:28:57 -0600 (Fri, 16 Jan 2009) | 1 line
use enumerate
........
r68667 | amaury.forgeotdarc | 2009-01-17 14:18:59 -0600 (Sat, 17 Jan 2009) | 3 lines
#4077: No need to append \n when calling Py_FatalError
+ fix a declaration to make it match the one in pythonrun.h
........
r68706 | benjamin.peterson | 2009-01-17 19:28:46 -0600 (Sat, 17 Jan 2009) | 1 line
fix grammar
........
r68718 | georg.brandl | 2009-01-18 04:42:35 -0600 (Sun, 18 Jan 2009) | 1 line
#4976: union() and intersection() take multiple args, but talk about "the other".
........
r68720 | georg.brandl | 2009-01-18 04:45:22 -0600 (Sun, 18 Jan 2009) | 1 line
#4974: fix redundant mention of lists and tuples.
........
r68721 | georg.brandl | 2009-01-18 04:48:16 -0600 (Sun, 18 Jan 2009) | 1 line
#4914: trunc is in math.
........
r68724 | georg.brandl | 2009-01-18 07:24:10 -0600 (Sun, 18 Jan 2009) | 1 line
#4979: correct result range for some random functions.
........
r68725 | georg.brandl | 2009-01-18 07:47:26 -0600 (Sun, 18 Jan 2009) | 1 line
Merged revisions 68547,68607,68610,68618,68621-68622,68649,68722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68547 | kristjan.jonsson | 2009-01-12 12:09:27 -0600 (Mon, 12 Jan 2009) | 1 line
Add tests for invalid format specifiers in strftime, and for handling of invalid file descriptors in the os module.
........
r68607 | kristjan.jonsson | 2009-01-14 04:50:57 -0600 (Wed, 14 Jan 2009) | 2 lines
Re-enable all tests for windows platforms.
Also, explicitly connect to the IPV4 address. On windows platforms supporting AF_INET6, the SocketProxy would connect using socket.create_connection('localhost', port) which would cycle through all address families and try to connect. It would try connecting using AF_INET6 first and this would cause a delay of up to a second.
........
r68610 | kristjan.jonsson | 2009-01-15 03:09:13 -0600 (Thu, 15 Jan 2009) | 3 lines
Fix recently introduced test cases.
For datetime, gentoo didn't seem to mind the %e format for strftime. So, we just excercise those instead making sure that we don't crash.
For test_os, two cases were incorrect.
........
r68618 | kristjan.jonsson | 2009-01-15 11:20:21 -0600 (Thu, 15 Jan 2009) | 1 line
Issue 4929: Handle socket errors when receiving
........
r68621 | kristjan.jonsson | 2009-01-15 16:40:03 -0600 (Thu, 15 Jan 2009) | 1 line
Fix two test cases in test_os. ftruncate raises IOError unlike all the others which raise OSError. And close() on some platforms doesn't complain when given an invalid file descriptor.
........
r68622 | kristjan.jonsson | 2009-01-15 16:46:26 -0600 (Thu, 15 Jan 2009) | 1 line
Make all the invalid fd tests for os subject to the function being available.
........
r68649 | benjamin.peterson | 2009-01-16 22:39:05 -0600 (Fri, 16 Jan 2009) | 1 line
trying to find some fpathconf() settings that all unixs support...
........
r68722 | kristjan.jonsson | 2009-01-18 04:58:44 -0600 (Sun, 18 Jan 2009) | 1 line
issue 4293: make test_capi.py more robutst, it times out on some platforms, presumably waiting for threads. Lower the thread count to 16.
........
Brett Cannon [Sun, 18 Jan 2009 06:55:05 +0000 (06:55 +0000)]
Tests of case-sensitivity were being executed on OSs which did not have a
case-insensitive file system, leading to test failures. This was due to using
the TestCase objects directly instead of the guard in the test_main() function.
Move over to a class decorator instead to control if the tests should be run.
follow-up of #3997: since 0xFFFF numbers are not enough to indicate a zip64 format,
always try to read the "zip64 end of directory structure".
........