]> granicus.if.org Git - python/log
python
17 years agoFix typo of hexidecimal
Neal Norwitz [Sun, 24 Feb 2008 08:27:49 +0000 (08:27 +0000)]
Fix typo of hexidecimal

17 years agoGet ctypes working on the Alpha (Tru64). The problem was that there
Neal Norwitz [Sun, 24 Feb 2008 07:21:56 +0000 (07:21 +0000)]
Get ctypes working on the Alpha (Tru64).  The problem was that there
were two module_methods and the one used depended on the order the
modules were loaded.  By making the test module_methods static,
it is not exported and the correct version is picked up.

17 years agoIssue 1742669. Now %d accepts very big float numbers.
Facundo Batista [Sun, 24 Feb 2008 03:17:21 +0000 (03:17 +0000)]
Issue 1742669. Now %d accepts very big float numbers.
Thanks Gabriel Genellina.

17 years agoAdd a little info to the 3k deprecation warnings about what to use instead.
Neal Norwitz [Sun, 24 Feb 2008 02:40:58 +0000 (02:40 +0000)]
Add a little info to the 3k deprecation warnings about what to use instead.
Suggested by Raymond Hettinger.

17 years agoRemove stray word
Andrew M. Kuchling [Sun, 24 Feb 2008 02:39:15 +0000 (02:39 +0000)]
Remove stray word

17 years agomap(None, ...) is not supported in 3.0.
Neal Norwitz [Sun, 24 Feb 2008 02:20:25 +0000 (02:20 +0000)]
map(None, ...) is not supported in 3.0.

17 years ago#1627: httplib now ignores negative Content-Length headers.
Georg Brandl [Sun, 24 Feb 2008 00:14:24 +0000 (00:14 +0000)]
#1627: httplib now ignores negative Content-Length headers.

17 years ago#900744: If an invalid chunked-encoding header is sent by a server,
Georg Brandl [Sun, 24 Feb 2008 00:03:22 +0000 (00:03 +0000)]
#900744: If an invalid chunked-encoding header is sent by a server,
httplib will now raise IncompleteRead and close the connection instead
of raising ValueError.

17 years agoMS Windows doesn't have mode_t but stat.st_mode is defined as unsigned short.
Christian Heimes [Sat, 23 Feb 2008 23:59:45 +0000 (23:59 +0000)]
MS Windows doesn't have mode_t but stat.st_mode is defined as unsigned short.

17 years agoSpecify what kind of warning -3 emits.
Georg Brandl [Sat, 23 Feb 2008 23:43:01 +0000 (23:43 +0000)]
Specify what kind of warning -3 emits.

17 years agoDocument import ./. threading issues. #1720705.
Georg Brandl [Sat, 23 Feb 2008 23:25:26 +0000 (23:25 +0000)]
Document import ./. threading issues. #1720705.

17 years ago#1506171: added operator.methodcaller().
Georg Brandl [Sat, 23 Feb 2008 23:04:35 +0000 (23:04 +0000)]
#1506171: added operator.methodcaller().

17 years ago#1826: allow dotted attribute paths in operator.attrgetter.
Georg Brandl [Sat, 23 Feb 2008 23:02:23 +0000 (23:02 +0000)]
#1826: allow dotted attribute paths in operator.attrgetter.

17 years ago#1825: correctly document msilib.add_data.
Georg Brandl [Sat, 23 Feb 2008 22:55:18 +0000 (22:55 +0000)]
#1825: correctly document msilib.add_data.

17 years agoAdded simple test case. Thanks Benjamin Peterson.
Facundo Batista [Sat, 23 Feb 2008 22:54:12 +0000 (22:54 +0000)]
Added simple test case. Thanks Benjamin Peterson.

17 years agoIn test_heapq and test_bisect, test both the Python and the C implementation.
Georg Brandl [Sat, 23 Feb 2008 22:35:33 +0000 (22:35 +0000)]
In test_heapq and test_bisect, test both the Python and the C implementation.
Originally written for GHOP by Josip Dzolonga, heavily patched by me.

17 years agoUse os.closerange().
Georg Brandl [Sat, 23 Feb 2008 22:14:02 +0000 (22:14 +0000)]
Use os.closerange().

17 years agoUse os.closerange() in popen2.
Georg Brandl [Sat, 23 Feb 2008 22:09:24 +0000 (22:09 +0000)]
Use os.closerange() in popen2.

17 years agoAdd examples to modulefinder docs. Written for GHOP by Josip Dzolonga.
Georg Brandl [Sat, 23 Feb 2008 22:05:38 +0000 (22:05 +0000)]
Add examples to modulefinder docs. Written for GHOP by Josip Dzolonga.

17 years ago#2101: fix removeAttribute docs.
Georg Brandl [Sat, 23 Feb 2008 21:59:11 +0000 (21:59 +0000)]
#2101: fix removeAttribute docs.

17 years agoFollowup to r61011: Also avoid the reference cycle when the Thread's target
Jeffrey Yasskin [Sat, 23 Feb 2008 20:40:35 +0000 (20:40 +0000)]
Followup to r61011: Also avoid the reference cycle when the Thread's target
raises an exception.

17 years agoPrevent classes like:
Jeffrey Yasskin [Sat, 23 Feb 2008 19:40:54 +0000 (19:40 +0000)]
Prevent classes like:
    class RunSelfFunction(object):
        def __init__(self):
            self.thread = threading.Thread(target=self._run)
            self.thread.start()
        def _run(self):
            pass
from creating a permanent cycle between the object and the thread by having the
Thread delete its references to the object when it completes.

As an example of the effect of this bug, paramiko.Transport inherits from
Thread to avoid it.

17 years ago#1389051, #1092502: fix excessively large allocations when using read() on a socket
Andrew M. Kuchling [Sat, 23 Feb 2008 19:28:58 +0000 (19:28 +0000)]
#1389051, #1092502: fix excessively large allocations when using read() on a socket

17 years ago#1389051: IMAP module tries to read entire message in one chunk. Patch by Fredrik...
Andrew M. Kuchling [Sat, 23 Feb 2008 19:02:33 +0000 (19:02 +0000)]
#1389051: IMAP module tries to read entire message in one chunk.  Patch by Fredrik Lundh.

17 years agoDocumentation coverage builder, part 1.
Georg Brandl [Sat, 23 Feb 2008 18:47:04 +0000 (18:47 +0000)]
Documentation coverage builder, part 1.

17 years agoIssue #2051 and patch from Alexander Belopolsky:
Christian Heimes [Sat, 23 Feb 2008 17:52:07 +0000 (17:52 +0000)]
Issue #2051 and patch from Alexander Belopolsky:
Permission for pyc and pyo files are inherited from the py file.

17 years agoPatch #1957: syslogmodule: Release GIL when calling syslog(3)
Christian Heimes [Sat, 23 Feb 2008 17:42:31 +0000 (17:42 +0000)]
Patch #1957: syslogmodule: Release GIL when calling syslog(3)

17 years agoPatch #2167 from calvin: Remove unused imports
Christian Heimes [Sat, 23 Feb 2008 17:40:11 +0000 (17:40 +0000)]
Patch #2167 from calvin: Remove unused imports

17 years ago#1433694: minidom's .normalize() failed to set .nextSibling for last element.
Andrew M. Kuchling [Sat, 23 Feb 2008 17:10:46 +0000 (17:10 +0000)]
#1433694: minidom's .normalize() failed to set .nextSibling for last element.
Fix by Malte Helmert

17 years ago#835521: Add index entries for various pickle-protocol methods and attributes
Andrew M. Kuchling [Sat, 23 Feb 2008 16:39:43 +0000 (16:39 +0000)]
#835521: Add index entries for various pickle-protocol methods and attributes

17 years ago#1330538: Improve comparison of xmlrpclib.DateTime and datetime instances.
Andrew M. Kuchling [Sat, 23 Feb 2008 16:23:05 +0000 (16:23 +0000)]
#1330538: Improve comparison of xmlrpclib.DateTime and datetime instances.
Remove automatic handling of datetime.date and datetime.time.
This breaks backward compatibility, but python-dev discussion was strongly
against this automatic conversion; see the bug for a link.

17 years agoRemoved duplicate Py_CHARMASK define. It's already defined in Python.h.
Eric Smith [Sat, 23 Feb 2008 16:05:26 +0000 (16:05 +0000)]
Removed duplicate Py_CHARMASK define.  It's already defined in Python.h.

17 years ago#1119331: ncurses will just call exit() if the terminal name isn't found.
Andrew M. Kuchling [Sat, 23 Feb 2008 15:49:35 +0000 (15:49 +0000)]
#1119331: ncurses will just call exit() if the terminal name isn't found.
Call setupterm() first so that we get a Python exception instead of just existing.

17 years ago#2161: Fix opcode name.
Georg Brandl [Sat, 23 Feb 2008 15:43:48 +0000 (15:43 +0000)]
#2161: Fix opcode name.

17 years ago#2072: correct documentation for .rpc_paths
Andrew M. Kuchling [Sat, 23 Feb 2008 15:41:51 +0000 (15:41 +0000)]
#2072: correct documentation for .rpc_paths

17 years agoMore difflib examples. Written for GHOP by Josip Dzolonga.
Georg Brandl [Sat, 23 Feb 2008 15:19:54 +0000 (15:19 +0000)]
More difflib examples. Written for GHOP by Josip Dzolonga.

17 years ago#2067: file.__exit__() now calls subclasses' close() method.
Georg Brandl [Sat, 23 Feb 2008 15:11:18 +0000 (15:11 +0000)]
#2067: file.__exit__() now calls subclasses' close() method.

17 years agoIssue 1089358. Adds the siginterrupt() function, that is just a
Facundo Batista [Sat, 23 Feb 2008 15:07:35 +0000 (15:07 +0000)]
Issue 1089358.  Adds the siginterrupt() function, that is just a
wrapper around the system call with the same name.  Also added
test cases, doc changes and NEWS entry. Thanks Jason and Ralf
Schmitt.

17 years ago#2165: fix test_logging failure on some machines.
Georg Brandl [Sat, 23 Feb 2008 15:06:25 +0000 (15:06 +0000)]
#2165: fix test_logging failure on some machines.

17 years ago#1492: allow overriding BaseHTTPServer's content type for error messages.
Georg Brandl [Sat, 23 Feb 2008 15:02:28 +0000 (15:02 +0000)]
#1492: allow overriding BaseHTTPServer's content type for error messages.

17 years agoPatch #1759: Backport of PEP 3129 class decorators
Christian Heimes [Sat, 23 Feb 2008 15:01:05 +0000 (15:01 +0000)]
Patch #1759: Backport of PEP 3129 class decorators
with some help from Georg

17 years agoIssue 1781. Now ConfigParser.add_section does not let you add a
Facundo Batista [Sat, 23 Feb 2008 12:46:10 +0000 (12:46 +0000)]
Issue 1781. Now ConfigParser.add_section does not let you add a
DEFAULT section any more, because it duplicated sections with
the rest of the machinery. Thanks Tim Lesher and Manuel Kaufmann.

17 years agoIssue 1776581. Minor corrections to smtplib, and two small tests.
Facundo Batista [Sat, 23 Feb 2008 12:27:17 +0000 (12:27 +0000)]
Issue 1776581. Minor corrections to smtplib, and two small tests.
Thanks Alan McIntyre.

17 years agoIssue 1881. Increased the stack limit from 500 to 1500. Also added
Facundo Batista [Sat, 23 Feb 2008 12:01:13 +0000 (12:01 +0000)]
Issue 1881. Increased the stack limit from 500 to 1500. Also added
a test for this (and because of this test you'll see in stderr a
message that parser.c sends before raising MemoryError).
Thanks Ralf Schmitt.

17 years agoAdd recipe using itertools.product().
Raymond Hettinger [Sat, 23 Feb 2008 10:04:15 +0000 (10:04 +0000)]
Add recipe using itertools.product().

17 years agoAdd more comments
Raymond Hettinger [Sat, 23 Feb 2008 04:03:50 +0000 (04:03 +0000)]
Add more comments

17 years agoAdded future_builtins, which contains PEP 3127 compatible versions of hex() and oct().
Eric Smith [Sat, 23 Feb 2008 03:09:44 +0000 (03:09 +0000)]
Added future_builtins, which contains PEP 3127 compatible versions of hex() and oct().

17 years agoImprove the implementation of itertools.product()
Raymond Hettinger [Sat, 23 Feb 2008 02:20:41 +0000 (02:20 +0000)]
Improve the implementation of itertools.product()

* Fix-up issues pointed-out by Neal Norwitz.
* Add extensive comments.
* The lz->result variable is now a tuple instead of a list.
* Use fast macro getitem/setitem calls so most code is in-line.
* Re-use the result tuple if available (modify in-place instead of copy).

17 years agoDocument itertools.product().
Raymond Hettinger [Fri, 22 Feb 2008 19:50:06 +0000 (19:50 +0000)]
Document itertools.product().

17 years agoTests for bin() builtin. These need to get merged into py3k, which has no tests...
Eric Smith [Fri, 22 Feb 2008 17:43:17 +0000 (17:43 +0000)]
Tests for bin() builtin.  These need to get merged into py3k, which has no tests for bin.

17 years agoAdded bin() builtin. I'm going to check in the tests in a seperate checkin, because...
Eric Smith [Fri, 22 Feb 2008 16:30:22 +0000 (16:30 +0000)]
Added bin() builtin.  I'm going to check in the tests in a seperate checkin, because the builtin doesn't need to be ported to py3k, but the tests are missing in py3k and need to be merged there.

17 years agoAnother fix.
Georg Brandl [Fri, 22 Feb 2008 12:57:05 +0000 (12:57 +0000)]
Another fix.

17 years agoDon't reference pyshell.
Georg Brandl [Fri, 22 Feb 2008 12:56:34 +0000 (12:56 +0000)]
Don't reference pyshell.

17 years agoA lot more typo fixes by Ori Avtalion.
Georg Brandl [Fri, 22 Feb 2008 12:31:45 +0000 (12:31 +0000)]
A lot more typo fixes by Ori Avtalion.

17 years agoTry to make command line error messages from runpy easier to understand (and suppress...
Nick Coghlan [Fri, 22 Feb 2008 10:54:06 +0000 (10:54 +0000)]
Try to make command line error messages from runpy easier to understand (and suppress traceback cruft from the implicitly invoked runpy machinery)

17 years agoFirst draft for itertools.product(). Docs and other updates forthcoming.
Raymond Hettinger [Fri, 22 Feb 2008 03:16:42 +0000 (03:16 +0000)]
First draft for itertools.product().  Docs and other updates forthcoming.

17 years agoPart of #2154: minimal syntax fixes in doc example snippets.
Georg Brandl [Thu, 21 Feb 2008 20:38:13 +0000 (20:38 +0000)]
Part of #2154: minimal syntax fixes in doc example snippets.

17 years ago#2079: typo in userdict docs.
Georg Brandl [Thu, 21 Feb 2008 20:33:38 +0000 (20:33 +0000)]
#2079: typo in userdict docs.

17 years agoMoved test_format into the correct TestCase.
Eric Smith [Thu, 21 Feb 2008 20:17:08 +0000 (20:17 +0000)]
Moved test_format into the correct TestCase.

17 years agoFix a few typos and layout glitches (more work is needed).
Guido van Rossum [Thu, 21 Feb 2008 19:46:35 +0000 (19:46 +0000)]
Fix a few typos and layout glitches (more work is needed).
Move 2.5 news to Misc/HISTORY.

17 years agoUpdate more instances of has_key().
Raymond Hettinger [Thu, 21 Feb 2008 19:24:53 +0000 (19:24 +0000)]
Update more instances of has_key().

17 years agoReplace 'has_key()' with 'in'.
Thomas Heller [Thu, 21 Feb 2008 18:52:20 +0000 (18:52 +0000)]
Replace 'has_key()' with 'in'.
Replace 'raise Error, stuff' with 'raise Error(stuff)'.

17 years agoconfigure.ac: Remove the configure check for _Bool, it is already done in the
Thomas Heller [Thu, 21 Feb 2008 18:28:48 +0000 (18:28 +0000)]
configure.ac: Remove the configure check for _Bool, it is already done in the
top-level Python configure script.
configure, fficonfig.h.in: regenerated.

17 years agoRemoved uses of dict.has_key() from distutils, and uses of
Guido van Rossum [Thu, 21 Feb 2008 18:18:37 +0000 (18:18 +0000)]
Removed uses of dict.has_key() from distutils, and uses of
callable() from copy_reg.py, so the interpreter now starts up
without warnings when '-3' is given.  More work like this needs to
be done in the rest of the stdlib.

17 years agoRemove news about float repr() -- issue 1580 is still in limbo.
Guido van Rossum [Thu, 21 Feb 2008 17:46:16 +0000 (17:46 +0000)]
Remove news about float repr() -- issue 1580 is still in limbo.

17 years agoClose manifest file.
Andrew M. Kuchling [Thu, 21 Feb 2008 14:23:38 +0000 (14:23 +0000)]
Close manifest file.
This change doesn't make any difference to CPython, but is a necessary fix for Jython.

17 years agoNow that PyOS_ascii_formatd supports the 'n' format, simplify the float formatting...
Eric Smith [Wed, 20 Feb 2008 23:39:28 +0000 (23:39 +0000)]
Now that PyOS_ascii_formatd supports the 'n' format, simplify the float formatting code to just call it.

17 years agoTrim leading zeros from a floating point exponent, per C99. See issue 1600. As...
Eric Smith [Wed, 20 Feb 2008 23:34:22 +0000 (23:34 +0000)]
Trim leading zeros from a floating point exponent, per C99.  See issue 1600.  As far as I know, this only affects Windows.  Add float type 'n' to PyOS_ascii_formatd (see PEP 3101 for 'n' description).

17 years agoFixes contributed by Ori Avtalion.
Georg Brandl [Wed, 20 Feb 2008 19:12:36 +0000 (19:12 +0000)]
Fixes contributed by Ori Avtalion.

17 years agoAdded PEP 3101.
Eric Smith [Tue, 19 Feb 2008 13:21:56 +0000 (13:21 +0000)]
Added PEP 3101.

17 years agoAdded dependencies for stringobject.o. This should fix failing tests in test_unicode.py.
Eric Smith [Tue, 19 Feb 2008 12:27:59 +0000 (12:27 +0000)]
Added dependencies for stringobject.o.  This should fix failing tests in test_unicode.py.

17 years agoAdded code to correct combining str and unicode in ''.format(). Added test case.
Eric Smith [Mon, 18 Feb 2008 18:02:34 +0000 (18:02 +0000)]
Added code to correct combining str and unicode in ''.format().  Added test case.

17 years agoPerform correct handling of stack overflow for windows: Catch the correct exception...
Kristján Valur Jónsson [Mon, 18 Feb 2008 17:40:47 +0000 (17:40 +0000)]
Perform correct handling of stack overflow for windows: Catch the correct exception code and reset the overflow condition when handled.

17 years agoTemporarily removed float tests. See issue 1600.
Eric Smith [Mon, 18 Feb 2008 14:25:02 +0000 (14:25 +0000)]
Temporarily removed float tests.  See issue 1600.

17 years agoIssue 1224. Now we support again the double slash in the URL.
Facundo Batista [Mon, 18 Feb 2008 12:48:43 +0000 (12:48 +0000)]
Issue 1224. Now we support again the double slash in the URL.
Thanks Anthony Lenton.

17 years agoIssue #1916. Added isgenerator() and isgeneratorfunction() to
Facundo Batista [Mon, 18 Feb 2008 03:43:43 +0000 (03:43 +0000)]
Issue #1916. Added isgenerator() and isgeneratorfunction() to
inspect.py.  Thanks Javi Mansilla for patch review and
corrections.

17 years ago#2133: fix HTML color spec.
Georg Brandl [Sun, 17 Feb 2008 21:18:55 +0000 (21:18 +0000)]
#2133: fix HTML color spec.

17 years agoCompilation was broken on Windows since the introduction of Advanced String Formatting.
Amaury Forgeot d'Arc [Sun, 17 Feb 2008 20:56:31 +0000 (20:56 +0000)]
Compilation was broken on Windows since the introduction of Advanced String Formatting.

Only PCBuild (vs9) was really tested.
Changes for older compilers were done manually.

17 years agoBackport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith [Sun, 17 Feb 2008 19:46:49 +0000 (19:46 +0000)]
Backport of PEP 3101, Advanced String Formatting, from py3k.

Highlights:
 - Adding PyObject_Format.
 - Adding string.Format class.
 - Adding __format__ for str, unicode, int, long, float, datetime.
 - Adding builtin format.
 - Adding ''.format and u''.format.
 - str/unicode fixups for formatters.

The files in Objects/stringlib that implement PEP 3101 (stringdefs.h,
unicodedefs.h, formatter.h, string_format.h) are identical in trunk
and py3k.  Any changes from here on should be made to trunk, and
changes will propogate to py3k).

17 years agoIssue 2112. mmap does not raises EnvironmentError no more, but
Facundo Batista [Sun, 17 Feb 2008 18:59:29 +0000 (18:59 +0000)]
Issue 2112. mmap does not raises EnvironmentError no more, but
a subclass of it. Thanks John Lenton.

17 years agoNow we handle different the backup copy, because of security
Facundo Batista [Sun, 17 Feb 2008 16:21:13 +0000 (16:21 +0000)]
Now we handle different the backup copy, because of security
issues regarding user/group and permissions. Fixes 1050828.

17 years agoFix function name.
Georg Brandl [Sun, 17 Feb 2008 15:14:10 +0000 (15:14 +0000)]
Fix function name.

17 years ago#2131: note that codecs.open() always opens files in binary mode.
Georg Brandl [Sun, 17 Feb 2008 11:33:38 +0000 (11:33 +0000)]
#2131: note that codecs.open() always opens files in binary mode.

17 years agoMove test_logging over to doctest.
Brett Cannon [Sun, 17 Feb 2008 01:59:18 +0000 (01:59 +0000)]
Move test_logging over to doctest.

Thanks to Christopher White from GHOP.

17 years agoPrevent a crash with nested scopes, again caused by calling Py_DECREF when the pointer
Amaury Forgeot d'Arc [Sat, 16 Feb 2008 20:55:24 +0000 (20:55 +0000)]
Prevent a crash with nested scopes, again caused by calling Py_DECREF when the pointer
is still present in the containing structure.

17 years agoCrashers of the day: Py_CLEAR must be used when there is a chance that the
Amaury Forgeot d'Arc [Sat, 16 Feb 2008 14:34:57 +0000 (14:34 +0000)]
Crashers of the day: Py_CLEAR must be used when there is a chance that the
function can be called recursively.
This was discussed in issue1020188.

In python codebase, all occurrences of Py_[X]DECREF(xxx->yyy) are suspect,
except when they appear in tp_new or tp_dealloc functions, or when
the member cannot be of a user-defined class.
Note that tp_init is not safe.

I do have a (crashing) example for every changed line.
Is it worth adding them to the test suite?

Example:

class SpecialStr(str):
    def __del__(self):
        s.close()

import cStringIO
s = cStringIO.StringIO(SpecialStr("text"))
s.close() # Segfault

17 years ago#2120: broken links in advocacy document.
Georg Brandl [Sat, 16 Feb 2008 09:37:32 +0000 (09:37 +0000)]
#2120: broken links in advocacy document.

17 years agoAdd __all__ to logging module.
Raymond Hettinger [Sat, 16 Feb 2008 01:22:54 +0000 (01:22 +0000)]
Add __all__ to logging module.

17 years agommap.PROT_READ does not exists on win32;
Amaury Forgeot d'Arc [Sat, 16 Feb 2008 00:16:50 +0000 (00:16 +0000)]
mmap.PROT_READ does not exists on win32;
Skip this test created by r60830.

17 years agoRe-enable tests, they were failing since gc.collect() clears the various freelists.
Amaury Forgeot d'Arc [Fri, 15 Feb 2008 22:44:20 +0000 (22:44 +0000)]
Re-enable tests, they were failing since gc.collect() clears the various freelists.
They still remain fragile.

For example, a call to assertEqual currently does not make any allocation
(which surprised me at first).
But this can change when gc.collect also deletes the numerous "zombie frames"
attached to each function.

17 years agoConfigured selection highlighting colors were ignored; updating highlighting
Kurt B. Kaiser [Fri, 15 Feb 2008 22:25:09 +0000 (22:25 +0000)]
Configured selection highlighting colors were ignored; updating highlighting
in the config dialog would cause non-Python files to be colored as if they
were Python source; improve use of ColorDelagator.  Patch 1334. Tal Einat.

17 years agoScriptBinding event handlers weren't returning 'break'. Patch 2050, Tal Einat.
Kurt B. Kaiser [Fri, 15 Feb 2008 21:56:36 +0000 (21:56 +0000)]
ScriptBinding event handlers weren't returning 'break'. Patch 2050, Tal Einat.

17 years agoTemporarily let these tests pass
Amaury Forgeot d'Arc [Fri, 15 Feb 2008 21:27:44 +0000 (21:27 +0000)]
Temporarily let these tests pass

17 years agoIssue #2115: __slot__ attributes setting was 10x slower.
Amaury Forgeot d'Arc [Fri, 15 Feb 2008 21:22:45 +0000 (21:22 +0000)]
Issue #2115: __slot__ attributes setting was 10x slower.
Also correct a possible crash using ABCs.

This change is exactly the same as an optimisation
done 5 years ago, but on slot *access*:
http://svn.python.org/view?view=rev&rev=28297

17 years agoUpdate example to match the current syntax.
Raymond Hettinger [Fri, 15 Feb 2008 21:21:25 +0000 (21:21 +0000)]
Update example to match the current syntax.

17 years agoTwo new functions:
Skip Montanaro [Fri, 15 Feb 2008 19:03:59 +0000 (19:03 +0000)]
Two new functions:

  * place_summary_first copies the regrtest summary to the front of the file
    making it easier to scan quickly for problems.

  * count_failures gets the actual count of the number of failing tests, not
    just a 1 (some failures) or 0 (no failures).

17 years agoIn PyNumber_ToBase, changed from an assert to returning an error when PyObject_Index...
Eric Smith [Fri, 15 Feb 2008 12:14:32 +0000 (12:14 +0000)]
In PyNumber_ToBase, changed from an assert to returning an error when PyObject_Index() returns something other than an int or long.  It should never be possible to trigger this, as PyObject_Index checks to make sure it returns an int or long.

17 years agoBug #2111: mmap segfaults when trying to write a block opened with PROT_READ
Christian Heimes [Fri, 15 Feb 2008 08:20:11 +0000 (08:20 +0000)]
Bug #2111: mmap segfaults when trying to write a block opened with PROT_READ
Thanks to Thomas Herve for the fix.

17 years agoFixed repr() and str() of complex numbers. Complex suffered from the same problem...
Christian Heimes [Fri, 15 Feb 2008 06:57:08 +0000 (06:57 +0000)]
Fixed repr() and str() of complex numbers. Complex suffered from the same problem as floats but I forgot to test and fix them.

17 years agoUse a static and interned string for __subclasscheck__ and __instancecheck__ as sugge...
Christian Heimes [Thu, 14 Feb 2008 22:40:11 +0000 (22:40 +0000)]
Use a static and interned string for __subclasscheck__ and __instancecheck__ as suggested by Thomas Heller in #2115