Commit Graph

225 Commits

Author SHA1 Message Date
Martin Panter
2a0438d2e4 Issue #27581: Don’t rely on overflow wrapping in PySequence_Tuple()
Patch by Xiang Zhang.
2016-07-25 02:30:05 +00:00
Martin Panter
b362f75f6e Issue #25523: Correct "a" article to "an" article
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
to fix the grammar.
2015-11-02 03:37:02 +00:00
Serhiy Storchaka
6156560e4b Issue #25678: Copy buffer objects to null-terminated strings.
Avoid buffer overreads when int(), long(), float(), and compile()
are passed buffer objects.  Similar code is removed from the
complex() constructor, where it was not reachable.

Patch backported from issue #24802 by Eryk Sun.
2015-11-20 21:56:21 +02:00
Raymond Hettinger
9c90e255e0 Issue #25326: Improve an obscure error message. 2015-10-08 21:14:15 -04:00
Raymond Hettinger
51dbc9a4ad Issue #23757: Only call the concrete list API for exact lists. 2015-05-17 14:37:39 -07:00
Stefan Krah
0a7fc53be2 Issue #23370: Fix off-by-one error for non-contiguous buffers. 2015-02-01 16:10:35 +01:00
Stefan Krah
5606cd9800 Issue #23349: Fix off-by-one error in PyBuffer_ToContiguous(). Initial patch
by Richard Hansen.
2015-01-30 20:11:10 +01:00
Benjamin Peterson
df71dcbef2 don't overwrite the error from PyObject_GetAttrString (closes #4346) 2014-06-26 23:27:41 -07:00
Serhiy Storchaka
6c467a41bc Revert a premature patch for issue #14010 (changeset d17d10c84d27). 2013-04-06 22:51:29 +03:00
Serhiy Storchaka
bb84565cdb Issue #14010: Fix a crash when iterating or deleting deeply nested filters
in itertools module (i.e. itertools.izip(), itertools.chain(), etc).
2013-04-06 22:04:10 +03:00
Benjamin Peterson
7d8a2e41a0 allow any number to be returned from __length_hint__ (closes #15354) 2012-07-14 17:53:55 -07:00
Raymond Hettinger
7d1483cbad Make an error message more understandable and consistent with other error messages. 2011-11-20 10:38:53 -08:00
Mark Dickinson
cb61e5d9b5 Issue #9869: Make long() and PyNumber_Long return something of type
long for a class whose __long__ method returns a plain int.  This
fixes an interpreter crash (due to long_subtype_new assuming
PyNumber_Long returns a long) when initializing an instance of a long
subclass from an object whose __long__ method returns a plain int.
2010-09-26 10:37:12 +00:00
Antoine Pitrou
1fcdba84be Merged revisions 84391 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84391 | antoine.pitrou | 2010-09-01 14:58:21 +0200 (mer., 01 sept. 2010) | 5 lines

  Issue #3101: Helper functions _add_one_to_C() and _add_one_to_F() become
  _Py_add_one_to_C() and _Py_add_one_to_F(), respectively.
........
2010-09-01 13:02:50 +00:00
Benjamin Peterson
d5adb5d73d _PyObject_LookupSpecial returns a new reference 2010-06-05 02:07:01 +00:00
Benjamin Peterson
3a2acb5040 remove PyType_Ready call; float should be initialized in interpreter startup 2010-06-05 00:38:22 +00:00
Benjamin Peterson
2aa6c38237 properly lookup the __format__ special method 2010-06-05 00:32:50 +00:00
Antoine Pitrou
c83ea137d7 Untabify C files. Will watch buildbots. 2010-05-09 14:46:46 +00:00
Brett Cannon
0d8a859a85 Pull a NULL pointer check up to cover more cases in the function.
Found using Clang's static analyzer.
2010-05-04 01:23:36 +00:00
Eric Smith
d44b2fc87c Issue 7994: Make object.__format__ with a non-empty format string a PendingDecprecationWarning. Still need to remove uses of this from various tests. 2010-04-02 12:30:56 +00:00
Benjamin Peterson
5fb877027b substitute PyDict_Check() for PyObject_IsInstance 2009-12-10 03:37:59 +00:00
Benjamin Peterson
87e5006d8c handle errors from _PyObject_LookupSpecial when __get__ fails 2009-05-25 02:40:21 +00:00
Benjamin Peterson
a27dbc68f0 completely ignore old-style stuff for type checking overloading 2009-05-16 22:40:56 +00:00
Benjamin Peterson
94eaba78b7 deal with old-style classes in issubclass and isinstance 2009-05-16 22:30:48 +00:00
Benjamin Peterson
fb6fb062e8 properly lookup __instancecheck__ and __subclasscheck__ 2009-05-16 21:44:25 +00:00