Commit Graph

37572 Commits

Author SHA1 Message Date
Guido van Rossum 5397fd1a51 A patch from issue 1378 by roudkerk:
Currently on Windows set_error() make use of a large array which maps
socket error numbers to error messages.

This patch removes that array and just lets PyErr_SetExcFromWindowsErr()
generate the message by using the Win32 function FormatMessage().
2007-11-16 00:24:44 +00:00
Bill Janssen 414c2b0819 add the certificate for the Python SVN repository for testing SSL 2007-11-15 23:03:03 +00:00
Raymond Hettinger bc693491eb Add example for use cases requiring default values. 2007-11-15 22:39:34 +00:00
Raymond Hettinger 7c3738e11c Example of multiple replacements. 2007-11-15 03:16:09 +00:00
Raymond Hettinger 213ae014db Fixup example in docs. 2007-11-15 02:58:20 +00:00
Raymond Hettinger 5681cbce81 Small improvement to the implementation of __replace__(). 2007-11-15 02:55:42 +00:00
Raymond Hettinger eeeb9c4445 Accept Issac Morland's suggestion for __replace__ to allow multiple replacements
(suprisingly, this simplifies the signature, improves clarity, and is comparably fast).
Update the docs to reflect a previous change to the function name.
Add an example to the docs showing how to override the default __repr__ method.
2007-11-15 02:44:53 +00:00
Raymond Hettinger b5e5d0741a Add test for __fields__ being read-only 2007-11-14 23:02:30 +00:00
Raymond Hettinger 78f27e001b Make __fields__ read-only. Suggested by Issac Morland 2007-11-14 22:56:16 +00:00
Georg Brandl b5b6f3c46e Remove dead link from random docs. 2007-11-14 13:59:09 +00:00
Amaury Forgeot d'Arc 0d75f09177 Merge from py3k branch:
Correction for issue1265 (pdb bug with "with" statement).

When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx
is called with a GeneratorExit exception set.  This leads to funny results
if the sys.settrace function itself makes use of generators.
A visible effect is that the settrace function is reset to None.
Another is that the eventual "finally" block of the generator is not called.

It is necessary to save/restore the exception around the call to the trace
function.

This happens a lot with py3k: isinstance() of an ABCMeta instance runs
    def __instancecheck__(cls, instance):
        """Override for isinstance(instance, cls)."""
        return any(cls.__subclasscheck__(c)
                   for c in {instance.__class__, type(instance)})
which lets an opened generator expression each time it returns True.

Backport candidate, even if the case is less frequent in 2.5.
2007-11-13 21:54:28 +00:00
Guido van Rossum 0288cb0ba8 Add the test from issue 1704621 (the issue itself is already fixed here). 2007-11-12 20:06:40 +00:00
Christian Heimes 1bc4af4bdd readline module cleanup
fixed indention to tabs
use Py_RETURN_NONE macro
added more error checks to on_completion_display_matches_hook

open question: Does PyList_SetItem(l, i, o) steal a reference to o in the case of an error?
2007-11-12 18:58:08 +00:00
Walter Dörwald edc526c161 Fix TextCalendar.prweek(). This closes issue #1427. 2007-11-12 10:01:33 +00:00
Martin v. Löwis 63bf149a26 Patch #1418: Make the AC_REPLACE_FUNCS object files actually work. 2007-11-12 05:14:05 +00:00
Martin v. Löwis f354894e7b Only set rl_completion_display_matches_hook if there
is a Python hook function. Fixes #1425.
2007-11-12 04:53:02 +00:00
Andrew M. Kuchling abfe45368c Re-word sentence 2007-11-12 01:25:21 +00:00
Christian Heimes ced1646b9e Fix for #1427: Error in standard module calendar
the prweek() method is still broken and I can't figure out how it suppose to work.
2007-11-12 01:20:56 +00:00
Christian Heimes 3d4c316f17 Added new decorator syntax to property.__doc__
Guido prefers _x over __x.
2007-11-12 01:15:40 +00:00
Georg Brandl 03c1d1e9c4 Remove duplication of "this". 2007-11-11 15:16:16 +00:00
Vinay Sajip 95dd03b8b8 Fixed a bug reported (in private email, by Robert Crida) in logging configuration whereby child loggers of a logger named in a configuration file, which are not themselves named in the configuration, are disabled when the configuration is applied. 2007-11-11 14:27:30 +00:00
Guido van Rossum d1ef78942a Issue 1416. Add getter, setter, deleter methods to properties that can be
used as decorators to create fully-populated properties.
2007-11-10 22:12:24 +00:00
Raymond Hettinger d3ffd341b8 Use a freelist to speed-up block allocation and deallocation in collections.deque(). 2007-11-10 01:54:03 +00:00
Raymond Hettinger 34448790db Optimize common case for dict.fromkeys(). 2007-11-09 23:14:44 +00:00
Martin v. Löwis d3d0baf0a1 Add Amaury Forgeot d'Arc. 2007-11-09 22:56:30 +00:00
Georg Brandl 980c4fc04d Correct a comment about testing methods - nowadays most
tests don't run directly on import.
2007-11-09 17:33:23 +00:00
Georg Brandl 87426cb151 Fix misleading example. 2007-11-09 13:08:48 +00:00
Georg Brandl 07c19eaa20 Fix seealso link to sets docs. Do not merge to Py3k. 2007-11-09 12:31:43 +00:00
Raymond Hettinger e8d58ba6bb Reposition the decref (spotted by eagle-eye norwitz). 2007-11-08 18:47:51 +00:00
Raymond Hettinger 1760c8a017 Add set.isdisjoint() 2007-11-08 02:52:43 +00:00
Christian Heimes 004c1c1562 Backport of Guido's review of my patch. 2007-11-07 18:30:22 +00:00
Christian Heimes cea681be19 Backported fix for bug #1392 from py3k branch r58903. 2007-11-07 17:50:54 +00:00
Nick Coghlan 90b858e1b3 Add missing NEWS entry 2007-11-07 11:57:51 +00:00
Raymond Hettinger dc1d1ba9cf Add build option for faster loop execution. 2007-11-07 02:45:46 +00:00
Raymond Hettinger cdcf887999 Optimize dict.fromkeys() with dict inputs. Useful for resetting bag/muliset counts for example. 2007-11-07 02:26:17 +00:00
Raymond Hettinger 12e94200c0 Fix marshal's incorrect handling of subclasses of builtin types (backport candidate). 2007-11-07 01:13:09 +00:00
Guido van Rossum 9b847b432c Add missing "return NULL" in overflow check in PyObject_Repr(). 2007-11-06 23:32:56 +00:00
Gregory P. Smith e1ac4f1930 Fixes Issue 1385: The hmac module now computes the correct hmac when using
hashes with a block size other than 64 bytes (such as sha384 and sha512).
2007-11-06 00:19:03 +00:00
Mark Summerfield 91f9429bc3 Clarified the fact that you can have comments for individual archive
members even though comments to the archive itself aren't currently
supported.
2007-11-05 14:38:50 +00:00
Mark Summerfield aea6e5913b Added cross-references between the various archive file formats. 2007-11-05 09:22:48 +00:00
Gregory P. Smith 80e95c142e * db->get_flags is only available in BerkeleyDB >= 4.2 2007-11-05 09:07:40 +00:00
Gregory P. Smith fc006692ad * db->get_types is only available in BerkeleyDB >= 4.2
* get compiling with older versions of python again for a stand alone release.
2007-11-05 09:06:28 +00:00
Gregory P. Smith ac11e02143 Add the bsddb.db.DBEnv.lock_id_free method.
Improve test_lock's tempdir creation and cleanup.
2007-11-05 02:56:31 +00:00
Gregory P. Smith ec10a4a402 Fixes bug 477182 on pybsddb.sf.net. DB objects now load the flags and
pay attention to them when opening an existing database.  This means
that d[] behaves properly even on databases previously created with DB_DUP
or DB_DUPSORT flags to allow duplicate keys.

http://sourceforge.net/tracker/index.php?func=detail&aid=477182&group_id=13900&atid=113900

Do not backport, this bugfix could be considered an API change.
2007-11-05 02:32:26 +00:00
Georg Brandl 9c466baa01 Fix syntax for versionchanged markup. 2007-11-04 17:43:49 +00:00
Skip Montanaro d469ff1e6a Note change to get_dialect semantics in 2.5. Will backport to 2.5. 2007-11-04 15:56:52 +00:00
Brett Cannon b13f70df1b Add a missing quotation mark. 2007-11-03 06:47:02 +00:00
Georg Brandl 7c3e79f67f Make "hashable" a glossary entry and clarify docs on __cmp__, __eq__ and __hash__.
I hope the concept of hashability is better understandable now.
Thanks to Tim Hatch for pointing out the flaws here.
2007-11-02 20:06:17 +00:00
Thomas Heller 03fd077482 Enable the full ctypes c_longdouble tests again. 2007-11-02 19:11:23 +00:00
Thomas Heller 486b1b0268 Issue #1292: On alpha, arm, ppc, and s390 linux systems the
--with-system-ffi configure option defaults to "yes" because the
bundled libffi sources are too old.
2007-11-02 19:10:24 +00:00