Commit Graph

3510 Commits

Author SHA1 Message Date
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 4fd2ff90a4 Merged revisions 79278,79280 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79278 | victor.stinner | 2010-03-22 13:24:37 +0100 (lun., 22 mars 2010) | 2 lines

  Issue #1583863: An unicode subclass can now override the __str__ method
........
  r79280 | victor.stinner | 2010-03-22 13:36:28 +0100 (lun., 22 mars 2010) | 5 lines

  Fix the NEWS about my last commit: an unicode subclass can now override the
  __unicode__ method (and not the __str__ method).

  Simplify also the testcase.
........
2010-03-22 12:56:39 +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 56f1682a44 Merged revisions 78515-78516,78522 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78515 | georg.brandl | 2010-02-28 20:19:17 +0200 (Sun, 28 Feb 2010) | 1 line

  #8030: make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object.
........
  r78516 | georg.brandl | 2010-02-28 20:26:37 +0200 (Sun, 28 Feb 2010) | 1 line

  The set types can also be called without arguments.
........
  r78522 | ezio.melotti | 2010-03-01 01:59:00 +0200 (Mon, 01 Mar 2010) | 1 line

  #8030: more docstring fix for builtin types.
........
2010-03-01 04:05:56 +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 85ddea7e69 Merged revisions 78449 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78449 | ezio.melotti | 2010-02-25 19:36:04 +0200 (Thu, 25 Feb 2010) | 1 line

  #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:51:33 +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 66807853b4 Merged revisions 78418 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78418 | eric.smith | 2010-02-24 09:15:36 -0500 (Wed, 24 Feb 2010) | 1 line

  Issue #7309: Unchecked pointer access when converting UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings.
........
2010-02-24 14:27:37 +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 f7270ba58f Merged revisions 78392 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78392 | victor.stinner | 2010-02-24 00:16:07 +0100 (mer., 24 févr. 2010) | 4 lines

  Issue #7649: Fix u'%c' % char for character in range 0x80..0xFF

  => raise an UnicodeDecodeError. Patch written by Ezio Melotti.
........
2010-02-23 23:20:14 +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 a920961673 Merged revisions 78183-78184 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78183 | mark.dickinson | 2010-02-14 12:16:43 +0000 (Sun, 14 Feb 2010) | 1 line

  Silence some 'comparison between signed and unsigned' compiler warnings.
........
  r78184 | mark.dickinson | 2010-02-14 12:31:26 +0000 (Sun, 14 Feb 2010) | 1 line

  Silence more compiler warnings;  fix an instance of potential undefined behaviour from signed overflow.
........
2010-02-14 13:08: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 2483728850 Merged revisions 77989 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77989 | antoine.pitrou | 2010-02-05 18:05:54 +0100 (ven., 05 févr. 2010) | 6 lines

  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:11:32 +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
Mark Dickinson a36507c64c Issue #7767: Add new C-API function PyLong_AsLongLongAndOverflow, a
long long variant of PyLong_AsLongAndOverflow.  Patch by Case Van
Horsen.
2010-01-30 10:08:33 +00:00
Mark Dickinson 0273354ab6 Merged revisions 77821 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77821 | mark.dickinson | 2010-01-29 17:11:39 +0000 (Fri, 29 Jan 2010) | 3 lines

  Issue #7788: Fix a crash produced by deleting a list slice with huge
  step value.  Patch by Marcin Bachry.
........
2010-01-29 17:16:18 +00:00
Mark Dickinson 36ecd676ea Issue #7788: Fix a crash produced by deleting a list slice with huge
step value.  Patch by Marcin Bachry.
2010-01-29 17:11:39 +00:00
Ezio Melotti dabb5f7db9 Merged revisions 77743 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77743 | ezio.melotti | 2010-01-25 13:24:37 +0200 (Mon, 25 Jan 2010) | 1 line

  #7775: fixed docstring for rpartition
........
2010-01-25 11:46:11 +00:00
Ezio Melotti 1fafaab5e5 #7775: fixed docstring for rpartition 2010-01-25 11:24:37 +00:00
Antoine Pitrou bb667d433c Merged revisions 77573 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77573 | antoine.pitrou | 2010-01-17 13:26:20 +0100 (dim., 17 janv. 2010) | 6 lines

  Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`)
  could crash in many places because of the PyByteArray_AS_STRING() macro
  returning NULL.  The macro now returns a statically allocated empty
  string instead.
........
2010-01-17 12:31:10 +00:00
Antoine Pitrou e80a6a4ead Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`)
could crash in many places because of the PyByteArray_AS_STRING() macro
returning NULL.  The macro now returns a statically allocated empty
string instead.
2010-01-17 12:26:20 +00:00
Georg Brandl aee900338e Add note about usage of STRINGLIB_EMPTY. 2010-01-17 12:14:42 +00:00
Ezio Melotti 262c3ce507 Merged revisions 77487 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77487 | ezio.melotti | 2010-01-14 13:34:10 +0200 (Thu, 14 Jan 2010) | 1 line

  Fixed typo
........
2010-01-14 11:39:50 +00:00
Ezio Melotti d234208588 Fixed typo 2010-01-14 11:34:10 +00:00
Antoine Pitrou 10042922d9 Sanitize bloom filter macros 2010-01-13 14:01:26 +00:00
Antoine Pitrou a913a20c91 Test commit to try to diagnose failures of the IA-64 buildbot 2010-01-13 13:43:37 +00:00
Antoine Pitrou 5c767c2f87 Fix Windows build (re r77461) 2010-01-13 08:55:20 +00:00
Antoine Pitrou 6467213bfd Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
methods of bytes, bytearray and unicode objects by using a common
implementation based on stringlib's fast search.  Patch by Florent Xicluna.
2010-01-13 07:55:48 +00:00
Alexandre Vassalotti 58a96efde5 Fixed repr of dictionary views. 2010-01-12 01:34:43 +00:00
Alexandre Vassalotti 69eb51697c Issue #1967: Backport dictionary views. 2010-01-11 23:17:10 +00:00
Benjamin Peterson 3694366af5 factor out __complex__ lookup code to fix another case 2010-01-04 01:00:47 +00:00
Benjamin Peterson ecdae19fbe do correct lookup of the __complex__ method 2010-01-04 00:43:01 +00:00
Antoine Pitrou 5b7139aab4 Issue #7462: Implement the stringlib fast search algorithm for the `rfind`,
`rindex`, `rsplit` and `rpartition` methods.  Patch by Florent Xicluna.
2010-01-02 21:12:58 +00:00
Mark Dickinson d3e323215c Refactor some longobject internals: PyLong_AsDouble and _PyLong_AsScaledDouble
(the latter renamed to _PyLong_Frexp) now use the same core code.  The
exponent produced by _PyLong_Frexp now has type Py_ssize_t instead of the
previously used int, and no longer needs scaling by PyLong_SHIFT.  This
frees the math module from having to know anything about the PyLong
implementation.  This closes issue #5576.
2010-01-02 14:45:40 +00:00
Mark Dickinson 99d652ef66 Issue #7534: Fix handling of nans, infinities, and negative zero in **
operator, on IEEE 754 platforms.  Thanks Marcos Donolo for original patch.
2009-12-30 12:12:23 +00:00
Mark Dickinson 4657283647 Issue #1811: Improve accuracy and consistency of true division for integers. 2009-12-27 14:55:57 +00:00
Ezio Melotti e748238a4f Merged revisions 77045 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77045 | ezio.melotti | 2009-12-25 00:25:17 +0200 (Fri, 25 Dec 2009) | 1 line

  #6108: unicode(exception) and str(exception) should return the same message
........
2009-12-24 22:32:25 +00:00
Ezio Melotti f84caf4eda #6108: unicode(exception) and str(exception) should return the same message 2009-12-24 22:25:17 +00:00
Mark Dickinson e31d300664 Issue #7528: Backport PyLong_AsLongAndOverflow from py3k to trunk.
Thanks Case Van Horsen for the patch.
2009-12-21 11:21:25 +00:00
Benjamin Peterson d0c92a4db0 Merged revisions 76852 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76852 | benjamin.peterson | 2009-12-15 21:36:22 -0600 (Tue, 15 Dec 2009) | 1 line

  remove type_compare, since type_richcompare does the same trick
........
2009-12-16 03:45:28 +00:00
Benjamin Peterson 0c0dcaf272 remove type_compare, since type_richcompare does the same trick 2009-12-16 03:36:22 +00:00
R. David Murray 0a0a1a842c Issue #1680159: unicode coercion during an 'in' operation was masking
any errors that might occur during coercion of the left operand and
turning them into a TypeError with a message text that was confusing in
the given context.  This patch lets any errors through, as was already
done during coercion of the right hand side.
2009-12-14 16:28:26 +00:00
Benjamin Peterson d76e711eab Merged revisions 76794 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76794 | benjamin.peterson | 2009-12-13 10:36:53 -0600 (Sun, 13 Dec 2009) | 2 lines

  fix the ignoring of __cmp__ method on metaclasses #7491
........
2009-12-13 16:41:44 +00:00
Benjamin Peterson 4895af4ef1 fix the ignoring of __cmp__ method on metaclasses #7491 2009-12-13 16:36:53 +00:00
Antoine Pitrou c169c781a8 Issue #7466: segmentation fault when the garbage collector is called
in the middle of populating a tuple.  Patch by Florent Xicluna.

(note: no NEWS entry for trunk since the bug was introduced in 2.7/3.1)
2009-12-12 19:13:08 +00:00
Benjamin Peterson 5fb877027b substitute PyDict_Check() for PyObject_IsInstance 2009-12-10 03:37:59 +00:00
Mark Dickinson 3f8707c23f Merged revisions 76665 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76665 | mark.dickinson | 2009-12-04 11:24:38 +0000 (Fri, 04 Dec 2009) | 2 lines

  Avoid undefined behaviour due to overflow in i_divmod (Objects/intobject.c).
........
2009-12-04 11:25:29 +00:00
Mark Dickinson 1691025ff2 Avoid undefined behaviour due to overflow in i_divmod (Objects/intobject.c). 2009-12-04 11:24:38 +00:00
Benjamin Peterson 91c12ebc3d disable pymalloc tricks with the --with-valgrind option #2422
Patch from James Henstridge.
2009-12-03 02:52:39 +00:00
Mark Dickinson 6df863c93a Merged revisions 76629 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76629 | mark.dickinson | 2009-12-02 17:33:41 +0000 (Wed, 02 Dec 2009) | 3 lines

  Issue #7406:  Fix some occurrences of potential signed overflow in int
  arithmetic.
........
2009-12-02 17:36:34 +00:00
Mark Dickinson 34398184eb Issue #7406: Fix some occurrences of potential signed overflow in int
arithmetic.
2009-12-02 17:33:41 +00:00
Eric Smith c4ab8339e9 Issue #3382: Make '%F' and float.__format__('F') convert results to upper case. Much of the patch came from Mark Dickinson. 2009-11-29 17:40:57 +00:00
Mark Dickinson 31f0cfef0e Include ieeefp.h (when available) in pyport.h instead of individually in
Objects/floatobject.c and Objects/complexobject.c.  This should silence
compiler warnings about implicit declaration of the 'finite' function
on Solaris.
2009-11-28 12:30:36 +00:00
Mark Dickinson 9dd5e16c5d Issue #7117, continued: Remove substitution of %g-style formatting for
%f-style formatting, which used to occur at high precision.  Float formatting
should now be consistent between 2.7 and 3.1.
2009-11-23 20:54:09 +00:00
Mark Dickinson 18cfada1ea Remove restriction on precision when formatting floats. This is the
first step towards removing the %f -> %g switch (see issues 7117,
5859).
2009-11-23 18:46:41 +00:00
Benjamin Peterson 6481e09084 Merged revisions 76395 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76395 | benjamin.peterson | 2009-11-18 21:00:02 -0600 (Wed, 18 Nov 2009) | 1 line

  #5037 proxy __unicode__ correctly
........
2009-11-19 03:11:09 +00:00
Benjamin Peterson dc3c239b1e #5037 proxy __unicode__ correctly 2009-11-19 03:00:02 +00:00
Raymond Hettinger 79628d311f Issue 7263: Fix set.intersection() docstring. 2009-11-18 20:28:22 +00:00
Raymond Hettinger 01cf960d09 Issue 7263: Fix set.intersection() docstring. 2009-11-18 20:13:27 +00:00
Mark Dickinson bd15a06fd3 Issue #7117, continued: Change round implementation to use the correctly-rounded
string <-> float conversions;  this makes sure that the result of the round
operation is correctly rounded, and hence displays nicely using the new float
repr.
2009-11-18 19:33:35 +00:00
Mark Dickinson 3d6790e49f Silence another MSVC warning about unary minus. 2009-11-16 19:17:16 +00:00
Mark Dickinson b9e16245ac Merged revisions 76330 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76330 | mark.dickinson | 2009-11-16 17:33:25 +0000 (Mon, 16 Nov 2009) | 1 line

  Silence MSVC warning about unary minus applied to unsigned type.
........
2009-11-16 17:34:11 +00:00
Mark Dickinson b2c3ca1e38 Silence MSVC warning about unary minus applied to unsigned type. 2009-11-16 17:33:25 +00:00
Mark Dickinson 82864d1ab1 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
PyFormat_FromStringV and PyErr_Format.
2009-11-15 16:18:58 +00:00
Mark Dickinson cc83afd803 Merged revisions 76295 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76295 | mark.dickinson | 2009-11-15 12:31:13 +0000 (Sun, 15 Nov 2009) | 5 lines

  Avoid signed overflow in some xrange calculations, and extend
  xrange tests to cover some special cases that caused problems
  in py3k.  This is a partial backport of r76292-76293 (see
  issue #7298.)
........
2009-11-15 12:34:12 +00:00
Mark Dickinson 009ae861f2 Avoid signed overflow in some xrange calculations, and extend
xrange tests to cover some special cases that caused problems
in py3k.  This is a partial backport of r76292-76293 (see
issue #7298.)
2009-11-15 12:31:13 +00:00
Benjamin Peterson c45a0cfb5f grant list.index() a more informative error message #7252 2009-11-02 16:14:19 +00:00
Benjamin Peterson e2caf1f60e prevent a rather unlikely segfault 2009-11-02 15:06:45 +00:00
Georg Brandl 5d2eb34f5c Merged revisions 75363,75365,75376,75392,75394,75403,75418,75484,75572,75580,75590,75592,75594-75596,75600,75602-75603,75605-75607,75610-75613,75616-75617,75623,75627,75647 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75363 | georg.brandl | 2009-10-11 20:31:23 +0200 (So, 11 Okt 2009) | 1 line

  Add the Python FAQ lists to the documentation.  Copied from sandbox/faq.  Many thanks to AMK for the preparation work.
........
  r75365 | georg.brandl | 2009-10-11 22:16:16 +0200 (So, 11 Okt 2009) | 1 line

  Fix broken links found by "make linkcheck".  scipy.org seems to be done right now, so I could not verify links going there.
........
  r75376 | benjamin.peterson | 2009-10-12 03:26:07 +0200 (Mo, 12 Okt 2009) | 1 line

  platform we don't care about
........
  r75392 | andrew.kuchling | 2009-10-13 18:11:49 +0200 (Di, 13 Okt 2009) | 1 line

  Various link, textual, and markup fixes
........
  r75394 | georg.brandl | 2009-10-13 20:10:59 +0200 (Di, 13 Okt 2009) | 1 line

  Fix markup.
........
  r75403 | georg.brandl | 2009-10-14 17:57:46 +0200 (Mi, 14 Okt 2009) | 1 line

  #7126: os.environ changes *do* take effect in subprocesses started with os.system().
........
  r75418 | georg.brandl | 2009-10-14 20:48:32 +0200 (Mi, 14 Okt 2009) | 1 line

  #7116: str.join() takes an iterable.
........
  r75484 | georg.brandl | 2009-10-18 09:58:12 +0200 (So, 18 Okt 2009) | 1 line

  Fix missing word.
........
  r75572 | benjamin.peterson | 2009-10-20 23:55:17 +0200 (Di, 20 Okt 2009) | 1 line

  clarify buffer arg #7178
........
  r75580 | georg.brandl | 2009-10-21 09:15:59 +0200 (Mi, 21 Okt 2009) | 1 line

  #7170: fix explanation about non-weakrefable builtin types.
........
  r75590 | benjamin.peterson | 2009-10-22 04:36:47 +0200 (Do, 22 Okt 2009) | 1 line

  rewrite to be nice to other implementations
........
  r75592 | georg.brandl | 2009-10-22 09:05:48 +0200 (Do, 22 Okt 2009) | 1 line

  Fix punctuation.
........
  r75594 | georg.brandl | 2009-10-22 09:56:02 +0200 (Do, 22 Okt 2009) | 1 line

  Fix markup.
........
  r75595 | georg.brandl | 2009-10-22 09:56:56 +0200 (Do, 22 Okt 2009) | 1 line

  Fix duplicate target.
........
  r75596 | georg.brandl | 2009-10-22 10:05:04 +0200 (Do, 22 Okt 2009) | 1 line

  Add a new directive marking up implementation details and start using it.
........
  r75600 | georg.brandl | 2009-10-22 13:01:46 +0200 (Do, 22 Okt 2009) | 1 line

  Make it more robust.
........
  r75602 | georg.brandl | 2009-10-22 13:28:06 +0200 (Do, 22 Okt 2009) | 1 line

  Document new directive.
........
  r75603 | georg.brandl | 2009-10-22 13:28:23 +0200 (Do, 22 Okt 2009) | 1 line

  Allow short form with text as argument.
........
  r75605 | georg.brandl | 2009-10-22 13:48:10 +0200 (Do, 22 Okt 2009) | 1 line

  Use "impl-detail" directive where applicable.
........
  r75606 | georg.brandl | 2009-10-22 17:00:06 +0200 (Do, 22 Okt 2009) | 1 line

  #6324: membership test tries iteration via __iter__.
........
  r75607 | georg.brandl | 2009-10-22 17:04:09 +0200 (Do, 22 Okt 2009) | 1 line

  #7088: document new functions in signal as Unix-only.
........
  r75610 | georg.brandl | 2009-10-22 17:27:24 +0200 (Do, 22 Okt 2009) | 1 line

  Reorder __slots__ fine print and add a clarification.
........
  r75611 | georg.brandl | 2009-10-22 17:42:32 +0200 (Do, 22 Okt 2009) | 1 line

  #7035: improve docs of the various <method>_errors() functions, and give them docstrings.
........
  r75612 | georg.brandl | 2009-10-22 17:52:15 +0200 (Do, 22 Okt 2009) | 1 line

  #7156: document curses as Unix-only.
........
  r75613 | georg.brandl | 2009-10-22 17:54:35 +0200 (Do, 22 Okt 2009) | 1 line

  #6977: getopt does not support optional option arguments.
........
  r75616 | georg.brandl | 2009-10-22 18:17:05 +0200 (Do, 22 Okt 2009) | 1 line

  Add proper references.
........
  r75617 | georg.brandl | 2009-10-22 18:20:55 +0200 (Do, 22 Okt 2009) | 1 line

  Make printout margin important.
........
  r75623 | georg.brandl | 2009-10-23 10:14:44 +0200 (Fr, 23 Okt 2009) | 1 line

  #7188: fix optionxform() docs.
........
  r75627 | fred.drake | 2009-10-23 15:04:51 +0200 (Fr, 23 Okt 2009) | 2 lines

  add further note about what's passed to optionxform
........
  r75647 | georg.brandl | 2009-10-24 12:04:19 +0200 (Sa, 24 Okt 2009) | 1 line

  Fix markup.
........
2009-10-27 15:08:27 +00:00
Georg Brandl a3c242c19d Merged revisions 72558,72745,72750,72876,73042,73045-73048,73069,73089,73163,73186,73213,73215,73217,73257-73258,73260 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72558 | benjamin.peterson | 2009-05-11 01:52:09 +0200 (Mo, 11 Mai 2009) | 1 line

  sys.setdefaultencoding() strikes me as a bad example
........
  r72745 | benjamin.peterson | 2009-05-17 16:16:29 +0200 (So, 17 Mai 2009) | 1 line

  ignore .rst files in sphinx its self
........
  r72750 | benjamin.peterson | 2009-05-17 18:59:27 +0200 (So, 17 Mai 2009) | 1 line

  chop off slash
........
  r72876 | benjamin.peterson | 2009-05-23 22:59:09 +0200 (Sa, 23 Mai 2009) | 1 line

  remove mention of old ctypes version
........
  r73042 | benjamin.peterson | 2009-05-30 05:10:52 +0200 (Sa, 30 Mai 2009) | 1 line

  no fdatasync on macos
........
  r73045 | georg.brandl | 2009-05-30 09:26:04 +0200 (Sa, 30 Mai 2009) | 1 line

  #6146: fix markup bug.
........
  r73046 | georg.brandl | 2009-05-30 09:31:25 +0200 (Sa, 30 Mai 2009) | 1 line

  Use preferred form of raising exceptions.
........
  r73047 | georg.brandl | 2009-05-30 12:33:23 +0200 (Sa, 30 Mai 2009) | 1 line

  Fix some more small markup problems.
........
  r73048 | georg.brandl | 2009-05-30 12:34:25 +0200 (Sa, 30 Mai 2009) | 1 line

  Fix markup problem.
........
  r73069 | benjamin.peterson | 2009-05-31 02:42:42 +0200 (So, 31 Mai 2009) | 1 line

  fix signature
........
  r73089 | andrew.kuchling | 2009-06-01 02:14:19 +0200 (Mo, 01 Jun 2009) | 1 line

  The class for regexes isn't called RegexObject any more; correct the text
........
  r73163 | georg.brandl | 2009-06-03 09:25:35 +0200 (Mi, 03 Jun 2009) | 1 line

  Use the preferred form of raise statements in the docs.
........
  r73186 | georg.brandl | 2009-06-03 23:21:09 +0200 (Mi, 03 Jun 2009) | 1 line

  #6174: fix indentation in code example.
........
  r73213 | georg.brandl | 2009-06-04 12:15:57 +0200 (Do, 04 Jun 2009) | 1 line

  #5967: note that the C slicing APIs do not support negative indices.
........
  r73215 | georg.brandl | 2009-06-04 12:22:31 +0200 (Do, 04 Jun 2009) | 1 line

  #6176: fix man page section for flock(2).
........
  r73217 | georg.brandl | 2009-06-04 12:27:21 +0200 (Do, 04 Jun 2009) | 1 line

  #6175: document that inet_aton supports alternate input formats with less than three dots.
........
  r73257 | georg.brandl | 2009-06-06 19:50:05 +0200 (Sa, 06 Jun 2009) | 1 line

  #6211: elaborate a bit on ways to call the function.
........
  r73258 | georg.brandl | 2009-06-06 19:51:31 +0200 (Sa, 06 Jun 2009) | 1 line

  #6204: use a real reference instead of "see later".
........
  r73260 | georg.brandl | 2009-06-06 20:21:58 +0200 (Sa, 06 Jun 2009) | 1 line

  #6224: s/JPython/Jython/, and remove one link to a module nine years old.
........
2009-10-27 14:19:50 +00:00
Antoine Pitrou 686c9adbd5 Merged revisions 75367 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75367 | antoine.pitrou | 2009-10-11 23:03:26 +0200 (dim., 11 oct. 2009) | 4 lines

  Issue #7084: Fix a (very unlikely) crash when printing a list from one
  thread, and mutating it from another one.  Patch by Scott Dial.
........
2009-10-27 12:56:06 +00:00
Mark Dickinson c04c7c5b72 Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod in
complexobject.c.  Also remove length restriction on unicode inputs to
the complex constructor.
2009-10-26 22:28:14 +00:00
Mark Dickinson 8568b19850 Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod in
floatobject.c.  Also, remove limitation on length of unicode inputs to
float().
2009-10-26 21:11:20 +00:00
Eric Smith c1bdf89145 Finished removing _PyOS_double_to_string, as mentioned in issue 7117. 2009-10-26 17:46:17 +00:00
Eric Smith cfaf79c56e Start to remove _PyOS_double_to_string, as mentioned in issue 7117. 2009-10-26 14:48:55 +00:00
Mark Dickinson 8d87dc0c29 Issue #1087418: Small performance boost for bitwise operations on longs.
Initial patch by Gregory Smith;  some tweaks added.
2009-10-25 20:39:06 +00:00
Eric Smith 8c3fb39440 Removed unused function PyFloat_AsStringEx. It is unused in floatobject.c, and it's not declared in any .h file. 2009-10-24 19:50:44 +00:00
Benjamin Peterson 97a57ec048 rewrite for style, clarify, and comments
Also, use the hasattr() like scheme of allowing BaseException exceptions through.
2009-10-22 02:50:38 +00:00
Benjamin Peterson 3c67afa714 whitespace 2009-10-22 02:26:47 +00:00
Eric Smith b327258d4f Removed usage of unsafe PyFloat_AsString. 2009-10-16 14:26:36 +00:00
Mark Dickinson 08133af12e Issue #7142: Fix uses of unicode in memoryview objects 2009-10-15 15:53:58 +00:00
Benjamin Peterson 196b0925ca only clear a module's __dict__ if the module is the only one with a reference to it #7140 2009-10-15 15:44:46 +00:00
Mark Dickinson 9d109742c0 Fix missing semicolon 2009-10-15 15:18:55 +00:00
Georg Brandl 9b4e5820cb #7116: str.join() takes an iterable. 2009-10-14 18:48:32 +00:00
Amaury Forgeot d'Arc 5c92d4301d #7112: Fix compilation warning in unicodetype_db.h
makeunicodedata now generates double literals
2009-10-13 21:29:34 +00:00
Antoine Pitrou beaf6a02f4 Issue #7084: Fix a (very unlikely) crash when printing a list from one
thread, and mutating it from another one.  Patch by Scott Dial.
2009-10-11 21:03:26 +00:00
Amaury Forgeot d'Arc d0052d17b1 #1571184: makeunicodedata.py now generates the functions _PyUnicode_ToNumeric,
_PyUnicode_IsLinebreak and _PyUnicode_IsWhitespace.

It now also parses the Unihan.txt for numeric values.
2009-10-06 19:56:32 +00:00
Mark Dickinson 71adc9328d Style/consistency/nano-optimization nit: replace occurrences of
(high_bits << PyLong_SHIFT) + low_bits with
  (high_bits << PyLong_SHIFT) | low_bits
in Objects/longobject.c.  Motivation:
 - shouldn't unnecessarily mix bit ops with arithmetic ops (style)
 - this pattern should be spelt the same way thoughout (consistency)
 - it's very very very slightly faster: no need to worry about
   carries to the high digit (nano-optimization).
2009-09-28 16:52:40 +00:00
Kristján Valur Jónsson b331802f97 http://bugs.python.org/issue6836
A missing 'const' wasn't detected by Visual Studio.
2009-09-28 15:56:25 +00:00
Kristján Valur Jónsson 02ca57ce4c http://bugs.python.org/issue6836
The debug memory api now keeps track of which external API (PyMem_* or PyObject_*) was used to allocate each block and treats any API violation as an error.  Added separate _PyMem_DebugMalloc functions for the Py_Mem API instead of having it use the _PyObject_DebugMalloc functions.
2009-09-28 13:12:38 +00:00
Mark Dickinson 66d8ce510a Remove unused variable. 2009-09-27 16:17:37 +00:00
Mark Dickinson 4b9d473d0a Issue #6713: Improve decimal int -> string conversions. Thanks Gawain
Bolton for the suggestion and original patches.
2009-09-27 16:05:21 +00:00
Mark Dickinson 622e05a064 Silence compiler warning 2009-09-27 15:53:49 +00:00
Ezio Melotti 8159c7aefd Merged revisions 75055 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75055 | ezio.melotti | 2009-09-25 19:07:55 +0300 (Fri, 25 Sep 2009) | 1 line

  #6994: fix typo in enumerate docstring
........
2009-09-25 16:10:55 +00:00
Ezio Melotti a9a7611fb6 #6994: fix typo in enumerate docstring 2009-09-25 16:07:55 +00:00
Mark Dickinson 40ee861c0a Silence MSVC compiler warnings. 2009-09-21 16:16:44 +00:00
Benjamin Peterson dc782b55f2 backport keyword argument support for bytearray.decode 2009-09-18 21:46:21 +00:00
Benjamin Peterson 332d721750 add keyword arguments support to str/unicode encode and decode #6300 2009-09-18 21:14:55 +00:00
Benjamin Peterson 4fe03350b5 use macros 2009-09-17 21:33:46 +00:00
Georg Brandl f7a09bec0a Merged revisions 74869 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74869 | georg.brandl | 2009-09-17 13:28:09 +0200 (Do, 17 Sep 2009) | 4 lines

  Issue #6922: Fix an infinite loop when trying to decode an invalid
  UTF-32 stream with a non-raising error handler like "replace" or "ignore".
........
2009-09-17 11:33:31 +00:00
Georg Brandl e9741f3ed8 Issue #6922: Fix an infinite loop when trying to decode an invalid
UTF-32 stream with a non-raising error handler like "replace" or "ignore".
2009-09-17 11:28:09 +00:00
Mark Dickinson aa2adc828a Issue #6713: Improve performance of str(n) and repr(n) for integers n
(up to 3.1 times faster in tests), by special-casing base 10 in
_PyLong_Format.  (Backport of r74851 from py3k.)
2009-09-16 22:10:56 +00:00
Georg Brandl 8997103be0 Merged revisions 74845 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74845 | georg.brandl | 2009-09-16 22:30:09 +0200 (Mi, 16 Sep 2009) | 5 lines

  #6844: do not emit DeprecationWarnings on access if Exception.message has been set by the user.

  This works by always setting it in __dict__, except when it's implicitly set in __init__.
........
2009-09-16 20:34:51 +00:00
Georg Brandl 0674d3fb5f #6844: do not emit DeprecationWarnings on access if Exception.message has been set by the user.
This works by always setting it in __dict__, except when it's implicitly set in __init__.
2009-09-16 20:30:09 +00:00
Mark Dickinson 429e34a3a5 Merged revisions 74769 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74769 | mark.dickinson | 2009-09-13 12:56:13 +0100 (Sun, 13 Sep 2009) | 3 lines

  Fix potential signed-overflow bug in _PyLong_Format;  also fix
  a couple of whitespace issues.
........
2009-09-13 11:59:41 +00:00
Mark Dickinson 1f4fc097f6 Fix potential signed-overflow bug in _PyLong_Format; also fix
a couple of whitespace issues.
2009-09-13 11:56:13 +00:00
Mark Dickinson 74e010aafb Merged revisions 74689 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74689 | mark.dickinson | 2009-09-06 21:51:37 +0100 (Sun, 06 Sep 2009) | 1 line

  Remove redundant assignment
........
2009-09-06 20:52:43 +00:00
Mark Dickinson 752a2daf32 Remove redundant assignment 2009-09-06 20:51:37 +00:00
Mark Dickinson 76e9643088 Merged revisions 74677 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74677 | mark.dickinson | 2009-09-06 11:32:21 +0100 (Sun, 06 Sep 2009) | 1 line

  Issue #6847: s/bytes/bytearray/ in some bytearray error messages.  Thanks Hagen Fürstenau.
........
2009-09-06 10:33:12 +00:00
Mark Dickinson 135a7cf540 Issue #6847: s/bytes/bytearray/ in some bytearray error messages. Thanks Hagen Fürstenau. 2009-09-06 10:32:21 +00:00
Mark Dickinson b61c035dc2 Merged revisions 74673 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74673 | mark.dickinson | 2009-09-06 11:03:31 +0100 (Sun, 06 Sep 2009) | 3 lines

  Issue #6846: bytearray.pop was returning ints in the range [-128, 128)
  instead of [0, 256).  Thanks Hagen Fürstenau for the report and fix.
........
2009-09-06 10:05:28 +00:00
Mark Dickinson c8a7c7c3b9 Issue #6846: bytearray.pop was returning ints in the range [-128, 128)
instead of [0, 256).  Thanks Hagen Fürstenau for the report and fix.
2009-09-06 10:03:31 +00:00
Benjamin Peterson 6fcf9b50bc remove the check that classmethod's argument is a callable 2009-09-01 22:27:57 +00:00
Mark Dickinson 75be68bd10 Merged revisions 74575 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74575 | mark.dickinson | 2009-08-28 21:46:24 +0100 (Fri, 28 Aug 2009) | 1 line

  Silence gcc 'comparison always false' warning
........
2009-08-28 20:57:42 +00:00
Mark Dickinson 2fdd58ad18 Silence gcc 'comparison always false' warning 2009-08-28 20:46:24 +00:00
Benjamin Peterson f492c36442 Merged revisions 74457 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74457 | benjamin.peterson | 2009-08-15 08:16:38 -0500 (Sat, 15 Aug 2009) | 1 line

  #6707 fix a crash with dir() on an uninitialized module
........
2009-08-15 13:18:47 +00:00
Benjamin Peterson 4c6e8088f5 #6707 fix a crash with dir() on an uninitialized module 2009-08-15 13:16:38 +00:00
Eric Smith 5c4a5d2911 Issue 6330: Fix --enable-unicode=ucs4. 2009-07-30 13:39:44 +00:00
Raymond Hettinger 30006c76f4 Issue 6573: Fix set.union() for cases where self is in the argument chain. 2009-07-27 20:33:25 +00:00
Raymond Hettinger c2b9e1a134 Issue 6573: Fix set.union() for cases where self is in the argument chain. 2009-07-27 20:32:04 +00:00
Eric Smith e94a826304 Sync trunk and py3k versions of string formatting. Will manually merge into py3k. 2009-07-27 01:58:25 +00:00
Benjamin Peterson 9119fbc683 clarify 2009-07-25 02:03:48 +00:00
Georg Brandl 11a81b2151 Merged revisions 74167 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74167 | georg.brandl | 2009-07-22 13:57:15 +0200 (Mi, 22 Jul 2009) | 1 line

  Issue #6540: Fixed crash for bytearray.translate() with invalid parameters.
........
2009-07-22 12:03:09 +00:00
Georg Brandl ec812caf5d Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. 2009-07-22 11:57:15 +00:00
Benjamin Peterson 24d9175ebe must use _PyThreadState_Current so it isn't checked for NULL #6530 2009-07-21 14:08:40 +00:00
Alexandre Vassalotti fd00916c2e Grow the allocated buffer in PyUnicode_EncodeUTF7 to avoid buffer overrun.
Without this change, test_unicode.UnicodeTest.test_codecs_utf7 crashes in
debug mode. What happens is the unicode string u'\U000abcde' with a length
of 1 encodes to the string '+2m/c3g-' of length 8. Since only 5 bytes is
reserved in the buffer, a buffer overrun occurs.
2009-07-07 02:17:30 +00:00
Benjamin Peterson f921469383 Merged revisions 73774 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73774 | benjamin.peterson | 2009-07-02 12:06:17 -0500 (Thu, 02 Jul 2009) | 1 line

  only order comparisons are removed in py3k #6119
........
2009-07-02 17:19:22 +00:00
Benjamin Peterson 1bf4765369 only order comparisons are removed in py3k #6119 2009-07-02 17:06:17 +00:00
Jesus Cea 585ad8ae5e Merged revisions 69846 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69846 | mark.dickinson | 2009-02-21 21:27:01 +0100 (Sat, 21 Feb 2009) | 2 lines

  Issue #5341: Fix a variety of spelling errors.
........
2009-07-02 15:37:21 +00:00
Hirokazu Yamamoto 5c3dd9a1ee Issue #6368: Fixed unused variable warning on Unix. 2009-06-29 15:52:21 +00:00
Hirokazu Yamamoto a3c5609079 Issue #4856: Remove checks for win NT. 2009-06-28 10:23:00 +00:00
Amaury Forgeot d'Arc 595f7a5bf9 #2016 Fix a crash in function call when the **kwargs dictionary is mutated
during the function call setup.

This even gives a slight speedup, probably because tuple allocation
is faster than PyMem_NEW.
2009-06-25 22:29:29 +00:00
Raymond Hettinger 62641e9534 Issue 6329: Fix iteration for memoryviews. 2009-06-23 20:59:43 +00:00
Benjamin Peterson bf9ec9ba67 add underscores 2009-06-16 23:13:09 +00:00
Georg Brandl af01c03e14 Remove unused macro. 2009-06-16 17:43:44 +00:00
Alexandre Vassalotti 55bd1efb2a Clear reference to the static PyExc_RecursionErrorInst in _PyExc_Fini. 2009-06-12 18:56:57 +00:00
Georg Brandl 18187e2167 #6224: s/JPython/Jython/, and remove one link to a module nine years old. 2009-06-06 18:21:58 +00:00
Benjamin Peterson 064a381a14 use the offical api 2009-06-04 01:40:29 +00:00
Antoine Pitrou a241917e3f Merged revisions 73129 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73129 | antoine.pitrou | 2009-06-02 01:23:16 +0200 (mar., 02 juin 2009) | 3 lines

  Fix compilation error with gcc 4.3.2
........
2009-06-01 23:27:15 +00:00
Antoine Pitrou 25de0dd89b Fix compilation error with gcc 4.3.2 2009-06-01 23:23:16 +00:00
Amaury Forgeot d'Arc 35b251d648 #4547 again: fix a typo that causes compilation warnings 2009-06-01 22:17:39 +00:00
Amaury Forgeot d'Arc 99be081fae Merged revisions 73114 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73114 | amaury.forgeotdarc | 2009-06-01 22:53:18 +0200 (lun., 01 juin 2009) | 3 lines

  #4547: When debugging a very large function, it was not always
  possible to update the lineno attribute of the current frame.
........
2009-06-01 22:04:41 +00:00
Amaury Forgeot d'Arc b02ceda3a5 #4547: When debugging a very large function, it was not always
possible to update the lineno attribute of the current frame.
2009-06-01 20:53:18 +00:00
Antoine Pitrou d11f7fcc0f Uninitialized file type would lead to __exit__ lookup failure when site.py
tries to read *.pth files on interpreter startup.
2009-05-31 18:05:51 +00:00
Raymond Hettinger 578a228ee2 Issue 5982: Classmethod and staticmethod expose wrapped function with __func__. 2009-05-29 04:58:52 +00:00
Benjamin Peterson 1afec5d6bf plug ref leak 2009-05-27 03:08:44 +00:00
Benjamin Peterson 39d43b4660 correctly handle descrs with __missing__ 2009-05-27 02:43:46 +00:00
Benjamin Peterson 87e5006d8c handle errors from _PyObject_LookupSpecial when __get__ fails 2009-05-25 02:40:21 +00:00
Jeffrey Yasskin 655d835415 Issue #6042:
lnotab-based tracing is very complicated and isn't documented very well.  There
were at least 3 comment blocks purporting to document co_lnotab, and none did a
very good job. This patch unifies them into Objects/lnotab_notes.txt which
tries to completely capture the current state of affairs.

I also discovered that we've attached 2 layers of patches to the basic tracing
scheme. The first layer avoids jumping to instructions that don't start a line,
to avoid problems in if statements and while loops.  The second layer
discovered that jumps backward do need to trace at instructions that don't
start a line, so it added extra lnotab entries for 'while' and 'for' loops, and
added a special case for backward jumps within the same line. I replaced these
patches by just treating forward and backward jumps differently.
2009-05-23 23:23:01 +00:00
Eric Smith f73758f012 Merged revisions 72848 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72848 | eric.smith | 2009-05-23 09:56:13 -0400 (Sat, 23 May 2009) | 1 line

  Issue 6089: str.format raises SystemError.
........
2009-05-23 14:04:31 +00:00
Eric Smith 4b94b192ff Issue 6089: str.format raises SystemError. 2009-05-23 13:56:13 +00:00
Mark Dickinson a4e0efa4b1 Issue #5829: don't raise OverflowError for complex('1e500'). Backport of r72803. 2009-05-20 18:43:07 +00:00
Jeffrey Yasskin c8d30fec16 Fix issue #1689458 by teaching frame_setlineno how to jump to the first line of
a code object.
2009-05-20 17:57:57 +00:00
Jeffrey Yasskin 61328eef1f While I was modifying test_trace, it threw an exception when I accidentally
made it try to set the line number from the trace callback for a 'call' event.
This patch makes the error message a little more helpful in that case, and
makes it a little less likely that a future editor will make the same mistake
in test_trace.
2009-05-18 21:14:54 +00:00
Mark Dickinson df99f04895 Merged revisions 72718 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72718 | mark.dickinson | 2009-05-17 11:38:30 +0100 (Sun, 17 May 2009) | 4 lines

  Issue #6044: remove confusing wording from complex -> integer and
  complex -> float conversion error messages.
........
2009-05-17 10:44:48 +00:00
Mark Dickinson 50626db437 Issue #6044: remove confusing wording from complex -> integer and
complex -> float conversion error messages.
2009-05-17 10:38:30 +00:00
Hirokazu Yamamoto b24bb27d22 Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more. 2009-05-17 02:52:09 +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
Mark Dickinson ce05717daa Merged revisions 72564 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72564 | mark.dickinson | 2009-05-11 16:33:08 +0100 (Mon, 11 May 2009) | 2 lines

  Issue #5981: Fix some float.fromhex bugs related to inf and nan handling.
........
2009-05-11 16:09:39 +00:00
Mark Dickinson b1d45856c2 Issue #5981: Fix some float.fromhex bugs related to inf and nan handling. 2009-05-11 15:33:08 +00:00
Benjamin Peterson ceea163e7c clear error state properly 2009-05-09 19:18:36 +00:00
Benjamin Peterson a7dc949e17 ignore AttributeErrors for classic classes 2009-05-09 19:03:05 +00:00
Benjamin Peterson 784d455066 *sigh* deal with instances correctly 2009-05-09 17:23:03 +00:00
Benjamin Peterson 0a32f9c448 can't handle classic classes here 2009-05-09 17:13:10 +00:00
Benjamin Peterson 3f3d36bd03 ignore classic classes 2009-05-09 16:51:51 +00:00
Benjamin Peterson af1692a266 convert some more special methods to use _PyObject_LookupSpecial 2009-05-09 16:36:39 +00:00
Benjamin Peterson 809e22543f lookup __reversed__ correctly as a special method 2009-05-09 02:07:04 +00:00
Jeffrey Yasskin f7f858d141 Issue 5954, PyFrame_GetLineNumber:
Most uses of PyCode_Addr2Line
(http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get
the line number of a specified frame, but there's no way to do that directly.
Forcing people to go through the code object makes them know more about the
guts of the interpreter than they should need.

The remaining uses of PyCode_Addr2Line seem to be getting the line from a
traceback (for example,
http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line),
which is replaced by the tb_lineno field.  So we may be able to deprecate
PyCode_Addr2Line entirely for external use.
2009-05-08 22:23:21 +00:00
Jeffrey Yasskin 1aa4700234 PyCode_NewEmpty:
Most uses of PyCode_New found by http://www.google.com/codesearch?q=PyCode_New
are trying to build an empty code object, usually to put it in a dummy frame
object. This patch adds a PyCode_NewEmpty wrapper which lets the user specify
just the filename, function name, and first line number, instead of also
requiring lots of code internals.
2009-05-08 21:51:06 +00:00
Benjamin Peterson 3a9930db47 this is now a bound method 2009-05-08 03:29:26 +00:00
Benjamin Peterson 399e4c4f8f add _PyObject_LookupSpecial to handle fetching special method lookup 2009-05-08 03:06:00 +00:00
Eric Smith a985a3aee4 Issue #5920: Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson. 2009-05-05 18:26:08 +00:00
Georg Brandl cecdc9c0e0 Remove unused variable. 2009-05-05 09:20:52 +00:00
Georg Brandl ba68a99656 #5929: fix signedness warning. 2009-05-05 09:19:43 +00:00
R. David Murray 05afa1aefd Merged revisions 72299 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72299 | r.david.murray | 2009-05-04 18:16:24 -0400 (Mon, 04 May 2009) | 7 lines

  Fix issue 5890: (property subclass shadows __doc__ string) by inserting
  the __doc__ into the subclass instance __dict__.  The fix refactors
  property_copy to call property_init in such a way that the __doc__
  logic is re-executed correctly when getter_doc is 1, thus simplifying
  property_copy.
........
2009-05-05 00:52:14 +00:00
R. David Murray 7ba8e1cbfd Fix issue 5890: (property subclass shadows __doc__ string) by inserting
the __doc__ into the subclass instance __dict__.  The fix refactors
property_copy to call property_init in such a way that the __doc__
logic is re-executed correctly when getter_doc is 1, thus simplifying
property_copy.
2009-05-04 22:16:24 +00:00
Antoine Pitrou 653dece278 Issue #4426: The UTF-7 decoder was too strict and didn't accept some legal sequences.
Patch by Nick Barnes and Victor Stinner.
2009-05-04 18:32:32 +00:00
Walter Dörwald 6703225258 Merged revisions 72263 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72263 | walter.doerwald | 2009-05-04 00:46:07 +0200 (Mo, 04 Mai 2009) | 2 lines

  There's no %A in Python 2.x!
........
2009-05-03 22:46:50 +00:00
Walter Dörwald 342c8db859 There's no %A in Python 2.x! 2009-05-03 22:46:07 +00:00