Commit Graph

3295 Commits

Author SHA1 Message Date
Georg Brandl 54d2898ef8 #8635: document enumerate() start parameter in docstring. 2010-05-22 11:43:25 +00:00
Antoine Pitrou 83137c2e16 Issue #7079: Fix a possible crash when closing a file object while using
it from another thread.  Patch by Daniel Stutzbach.
2010-05-17 19:56:59 +00:00
Mark Dickinson 43ca377e45 Wrap multiline macros in a 'do {} while(0)', for safety. 2010-05-09 20:42:09 +00:00
Mark Dickinson fda8d114ea Post-detabification cleanup: whitespace fixes and long line rewraps only. 2010-05-09 20:30:29 +00:00
Antoine Pitrou c83ea137d7 Untabify C files. Will watch buildbots. 2010-05-09 14:46:46 +00:00
Mark Dickinson 22ff664ff7 Issue #8659: Remove redundant ABS calls. Thanks Daniel Stutzbach. 2010-05-08 08:01:19 +00:00
Brett Cannon a8ac944924 Add back in a line that was unneeded which advanced a pointer, but commented
out as it is currently unneeded.

This effectively adds back in the line removed in r80809 as a comment.
2010-05-06 17:56:36 +00:00
Brett Cannon 8a478ced55 Remove an unneeded assignment.
Found using Clang's static analyzer.
2010-05-05 20:19:26 +00:00
Brett Cannon fee3acb082 Remove an unneeded variable assignment.
Found using Clang's static analyzer.
2010-05-05 20:18:23 +00:00
Brett Cannon eb3fef59b9 Remove an unneeded variable.
Found using Clang's static analyzer.
2010-05-05 20:16:50 +00:00
Brett Cannon 6f38175cbc Remove an unneeded variable increment.
Found using Clang's static analyzer.
2010-05-05 20:16:09 +00:00
Alexandre Vassalotti 268e4872d3 Issue #8404: Fix set operations on dictionary views. 2010-05-04 03:21:51 +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
Brett Cannon a7f13ee3f5 Remove an unneeded variable and assignment.
Found using Clang's static analyzer.
2010-05-04 01:16:51 +00:00
Mark Dickinson 328284adcf Improve error message from nb_int returning a non-integer, in various PyInt_As* functions: 2010-05-02 09:38:43 +00:00
Raymond Hettinger 35b76027f9 Issue 8436: set.__init__ accepts keyword args 2010-04-18 22:57:57 +00:00
Benjamin Peterson ae530c2bab tiny simplification 2010-04-16 22:52:44 +00:00
Benjamin Peterson 821a8ea39f have a clear error when passing something > sys.maxsize to bytearray 2010-04-16 22:35:38 +00:00
Stefan Krah ef7590e943 Issue #8328: Silence Visual Studio warnings. 2010-04-07 08:24:44 +00:00
Mark Dickinson ea7e5510aa Silence a 'comparison between signed and unsigned integer expressions' gcc warning. 2010-04-06 18:58:54 +00:00
Mark Dickinson 3ec9b942b5 Issue #8259: Get rid of 'outrageous left shift count' error when
left-shifting an integer by more than 2**31 on a 64-bit machine.  Also
convert shift counts to a Py_ssize_t instead of a C long.
2010-04-06 16:46:09 +00:00
Mark Dickinson 56506a6ed2 Use a better NaN test in _Py_HashDouble as well. 2010-04-05 18:54:51 +00:00
Mark Dickinson 5e0c2748fb Use a more robust infinity check in _Py_HashDouble.
This fixes a test_decimal failure on FreeBSD 8.0.  (modf apparently
doesn't follow C99 Annex F on FreeBSD.)
2010-04-05 18:07:51 +00:00
Raymond Hettinger 30583e3f38 Silence a compiler warning. 2010-04-03 17:10:05 +00:00
Benjamin Peterson bea424af98 more _PyString_Resize error checking 2010-04-03 00:57:33 +00:00
Benjamin Peterson 6caf7ff505 always check _PyString_Resize for error
also normalize how this error is checked
2010-04-02 23:59:41 +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
Larry Hastings 5ac006dfd3 Capsule-related changes:
* PyCObject_AsVoidPtr() can now open capsules.  This addresses
  most of the remaining backwards-compatibility concerns about
  the conversion of Python 2.7 from CObjects to capsules.
* CObjects were marked Pending Deprecation.
* Documentation about this pending deprecation was added to
  cobject.h.
* The capsule source files were added to the legacy PC build
  processes.
2010-04-02 11:01:35 +00:00
Antoine Pitrou a57df2cf1d Issue #8268: Old-style classes (not just instances) now support weak
references.
2010-03-31 21:32:15 +00:00
Florent Xicluna 22b243809e #7643: Unicode codepoints VT (0x0B) and FF (0x0C) are linebreaks according to Unicode Standard Annex #14. 2010-03-30 08:24:06 +00:00
Larry Hastings 402b73fb8d Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
2010-03-25 00:54:54 +00:00
Victor Stinner 95affc4449 Issue #1583863: An unicode subclass can now override the __str__ method 2010-03-22 12:24:37 +00:00
Collin Winter 001a3952c9 Add support for weak references to code objects. This will be used by an optimization in the incoming Python 3 JIT.
Patch by Reid Kleckner!
2010-03-18 21:54:01 +00:00
Florent Xicluna 2e0a53fdf6 Issue #8024: Update the Unicode database to 5.2 2010-03-18 21:50:06 +00:00
Victor Stinner 17d905449d Issue #7818: set().test_c_api() doesn't expect a set('abc'), modify the set. 2010-03-13 00:13:22 +00:00
Ezio Melotti fb501123e3 #8030: more docstring fix for builtin types. 2010-02-28 23:59:00 +00:00
Georg Brandl b36e63a5ee The set types can also be called without arguments. 2010-02-28 18:26:37 +00:00
Georg Brandl bca1169e94 #8030: make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object. 2010-02-28 18:19:17 +00:00
Ezio Melotti 321251567e #7649: "u'%c' % char" now behaves like "u'%s' % char" and raises a UnicodeDecodeError if 'char' is a byte string that can't be decoded using the default encoding. 2010-02-25 17:36:04 +00:00
Eric Smith 2d9856d6ce Issue #7309: Unchecked pointer access when converting UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings. 2010-02-24 14:15:36 +00:00
Victor Stinner f20f9c299e Issue #7649: Fix u'%c' % char for character in range 0x80..0xFF
=> raise an UnicodeDecodeError. Patch written by Ezio Melotti.
2010-02-23 23:16:07 +00:00
Eric Smith 87bcb243ac Issue #6902: Fix problem with built-in types format incorrectly with 0 padding. 2010-02-23 00:11:16 +00:00
Andrew M. Kuchling 00b6a5c03d #7706: DONT_HAVE_ERRNO_H is no longer defined by configure (after rev.46819). 2010-02-22 23:10:52 +00:00
Eric Smith f32d4acead Issue #7988: Fix default alignment to be right aligned for complex.__format__. Now it matches other numeric types. 2010-02-22 18:33:47 +00:00
Ezio Melotti bce3e17bd2 #7482: clarify error message in case of division by zero of float and complex numbers. 2010-02-22 16:30:58 +00:00
Mark Dickinson 82b34c5dbe Issue #5211: Fix complex type to avoid implicit calls to
complex.__coerce__.  Thanks Meador Inge for the patch.
2010-02-21 12:57:35 +00:00
Mark Dickinson 2d7911eda4 Silence more compiler warnings; fix an instance of potential undefined behaviour from signed overflow. 2010-02-14 12:31:26 +00:00
Mark Dickinson ac5685eb67 Silence some 'comparison between signed and unsigned' compiler warnings. 2010-02-14 12:16:43 +00:00
Antoine Pitrou bb445a1f22 Issue #5677: Explicitly forbid write operations on read-only file objects,
and read operations on write-only file objects.  On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash
the interpreter.  Patch by Stefan Krah.
2010-02-05 17:05:54 +00:00
Antoine Pitrou 526e421b12 Issue #7385: Fix a crash in `MemoryView_FromObject` when
`PyObject_GetBuffer` fails.  Patch by Florent Xicluna.
2010-02-02 22:36:17 +00:00