Commit Graph

3656 Commits

Author SHA1 Message Date
Georg Brandl f6c8fd62b9 Merged revisions 86537,86867-86868,86881,86887,86913-86915,86931-86933,86960,86964,86974,86980,86996,87008,87050 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r86537 | georg.brandl | 2010-11-19 23:09:04 +0100 (Fr, 19 Nov 2010) | 1 line

  Do not put a raw REPLACEMENT CHARACTER in the document.
........
  r86867 | georg.brandl | 2010-11-29 15:50:54 +0100 (Mo, 29 Nov 2010) | 1 line

  Fix indentation bug.
........
  r86868 | georg.brandl | 2010-11-29 15:53:15 +0100 (Mo, 29 Nov 2010) | 1 line

  Fix heading style inconsistencies.
........
  r86881 | georg.brandl | 2010-11-30 08:43:28 +0100 (Di, 30 Nov 2010) | 1 line

  #10584: fix bad links.
........
  r86887 | georg.brandl | 2010-11-30 15:57:54 +0100 (Di, 30 Nov 2010) | 1 line

  Fix typo.
........
  r86913 | georg.brandl | 2010-12-01 16:32:43 +0100 (Mi, 01 Dez 2010) | 1 line

  Add missing word, and add a better reference to the actual function.
........
  r86914 | georg.brandl | 2010-12-01 16:36:33 +0100 (Mi, 01 Dez 2010) | 1 line

  #10594: fix parameter names in PyList API docs.
........
  r86915 | georg.brandl | 2010-12-01 16:44:25 +0100 (Mi, 01 Dez 2010) | 1 line

  Fix some markup and style in the unittest docs.
........
  r86931 | georg.brandl | 2010-12-02 10:06:12 +0100 (Do, 02 Dez 2010) | 1 line

  Fix-up documentation of makedirs().
........
  r86932 | david.malcolm | 2010-12-02 17:41:00 +0100 (Do, 02 Dez 2010) | 2 lines

  Fix spelling of Jamie Zawinski's surname in urllib.parse docstring (issue 10606)
........
  r86933 | georg.brandl | 2010-12-02 19:02:01 +0100 (Do, 02 Dez 2010) | 1 line

  #10597: fix Py_SetPythonHome docs by pointing to where the meaning of PYTHONHOME is already documented.
........
  r86960 | georg.brandl | 2010-12-03 08:55:44 +0100 (Fr, 03 Dez 2010) | 1 line

  #10360: catch TypeError in WeakSet.__contains__, just like WeakKeyDictionary does.
........
  r86964 | georg.brandl | 2010-12-03 10:58:38 +0100 (Fr, 03 Dez 2010) | 1 line

  #10549: fix interface of docclass() for text documenter.
........
  r86974 | georg.brandl | 2010-12-03 16:30:09 +0100 (Fr, 03 Dez 2010) | 1 line

  Markup consistency fixes.
........
  r86980 | georg.brandl | 2010-12-03 18:19:27 +0100 (Fr, 03 Dez 2010) | 1 line

  Fix punctuation.
........
  r86996 | georg.brandl | 2010-12-03 20:56:42 +0100 (Fr, 03 Dez 2010) | 1 line

  Fix indentation.
........
  r87008 | georg.brandl | 2010-12-04 10:04:04 +0100 (Sa, 04 Dez 2010) | 1 line

  Fix typo.
........
  r87050 | georg.brandl | 2010-12-04 18:09:30 +0100 (Sa, 04 Dez 2010) | 1 line

  Fix typo.
........
2011-02-25 09:48:21 +00:00
Eli Bendersky cbbaa96036 Issue #10516: adding list.clear() and list.copy() methods 2011-02-25 05:47:53 +00:00
Antoine Pitrou 915605c59a Merged revisions 88550 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88550 | antoine.pitrou | 2011-02-24 21:50:49 +0100 (jeu., 24 févr. 2011) | 4 lines

  Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with
  a buffer struct having a NULL data pointer.
........
2011-02-24 20:53:48 +00:00
Antoine Pitrou 5bffa79c22 Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with
a buffer struct having a NULL data pointer.
2011-02-24 20:50:49 +00:00
Victor Stinner 659eb84457 Merged revisions 88481 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88481 | victor.stinner | 2011-02-21 22:13:44 +0100 (lun., 21 févr. 2011) | 4 lines

  Fix PyUnicode_FromFormatV("%c") for non-BMP char

  Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on
  narrow build.
........
2011-02-23 12:14:22 +00:00
Victor Stinner bd475115c4 Issue #3080: Add PyModule_GetNameObject()
repr(module) uses %R to format module name and filenames, instead of '%s' and
'%U', so surrogates from undecodable bytes in a filename (PEP 383) are escaped.
2011-02-23 00:21:43 +00:00
Brett Cannon b94767ff44 Issue #8914: fix various warnings from the Clang static analyzer v254. 2011-02-22 20:15:44 +00:00
Victor Stinner 5ed8b2c737 Fix PyUnicode_FromFormatV("%c") for non-BMP char
Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on
narrow build.
2011-02-21 21:13:44 +00:00
Victor Stinner fd34b3788f Remove bootstrap code of PyUnicode_AsEncodedString()
Issue #11187: Remove bootstrap code (use ASCII) of
PyUnicode_AsEncodedString(), it was replaced by a better fallback (use
the locale encoding) in PyUnicode_EncodeFSDefault().

Prepare also empty sections in NEWS.
2011-02-21 20:51:28 +00:00
Martin v. Löwis 7be5b78b4f Merged revisions 88456 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88456 | martin.v.loewis | 2011-02-21 17:24:00 +0100 (Mo, 21 Feb 2011) | 2 lines

  - Check for NULL result in PyType_FromSpec.
........
2011-02-21 16:26:47 +00:00
Martin v. Löwis 5e06a5d4cd - Check for NULL result in PyType_FromSpec. 2011-02-21 16:24:00 +00:00
Georg Brandl 032400b2d8 #11249: in PyType_FromSpec, copy tp_doc slot since it usually will point to a static string literal which should not be deallocated together with the type. 2011-02-19 21:47:02 +00:00
Martin v. Löwis cc7e23ac15 Issue #11134: Add missing fields to typeslots.h.
Reviewed by Georg Brandl.
2011-02-11 20:50:24 +00:00
Martin v. Löwis 738236dbd6 Issue #11067: Add PyType_GetFlags, to support PyUnicode_Check
in the limited ABI
2011-02-05 20:35:29 +00:00
Eric Smith a1eac7218b Issue #11302: missing type check on _string.formatter_field_name_split and _string.formatter_parser caused crash.
Originial patch by haypo, reviewed by me, okayed by Georg.
2011-01-29 11:15:35 +00:00
Antoine Pitrou 566facd39b Merged revisions 88097 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88097 | antoine.pitrou | 2011-01-18 19:57:52 +0100 (mar., 18 janv. 2011) | 4 lines

  Issue #10451: memoryview objects could allow to mutate a readable buffer.
  Initial patch by Ross Lagerwall.
........
2011-01-18 19:06:09 +00:00
Antoine Pitrou ad62b03949 Issue #10451: memoryview objects could allow to mutate a readable buffer.
Initial patch by Ross Lagerwall.
2011-01-18 18:57:52 +00:00
Benjamin Peterson 32a8fe8b56 Merged revisions 88069 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88069 | benjamin.peterson | 2011-01-17 13:54:55 -0600 (Mon, 17 Jan 2011) | 1 line

  remove unneeded assertion
........
2011-01-17 20:03:01 +00:00
Benjamin Peterson 37b9e46a04 remove unneeded assertion 2011-01-17 19:54:55 +00:00
Benjamin Peterson d82f45b720 Merged revisions 88066 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88066 | benjamin.peterson | 2011-01-17 13:44:46 -0600 (Mon, 17 Jan 2011) | 1 line

  correct assertion
........
2011-01-17 19:46:48 +00:00
Benjamin Peterson 0dd5ca0882 correct assertion 2011-01-17 19:44:46 +00:00
Benjamin Peterson acd17591f5 Merged revisions 88063 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88063 | benjamin.peterson | 2011-01-17 13:24:34 -0600 (Mon, 17 Jan 2011) | 4 lines

  turn some checks into assertions, since they are implied by the caller

  Reviewed by Georg.
........
2011-01-17 19:36:44 +00:00
Benjamin Peterson 67641d25d4 turn some checks into assertions, since they are implied by the caller
Reviewed by Georg.
2011-01-17 19:24:34 +00:00
Matthias Klose 616667fbe8 rangeobject.c (compute_slice_indices): Make function static. 2011-01-16 20:57:01 +00:00
Benjamin Peterson 547d4859b9 plug reference leak 2011-01-13 04:22:54 +00:00
Benjamin Peterson a53d2acb3d Merged revisions 87960 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87960 | benjamin.peterson | 2011-01-12 12:56:07 -0600 (Wed, 12 Jan 2011) | 1 line

  use PyErr_SetString instead of PyErr_Format
........
2011-01-12 19:02:36 +00:00
Benjamin Peterson 23b628ed0b use PyErr_SetString instead of PyErr_Format 2011-01-12 18:56:07 +00:00
Benjamin Peterson de368717da Merged revisions 87952-87954 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87952 | benjamin.peterson | 2011-01-12 09:24:27 -0600 (Wed, 12 Jan 2011) | 1 line

  move this test to test_descr; it's not abc specific
........
  r87953 | benjamin.peterson | 2011-01-12 09:25:02 -0600 (Wed, 12 Jan 2011) | 1 line

  oops, wrong class
........
  r87954 | benjamin.peterson | 2011-01-12 09:34:01 -0600 (Wed, 12 Jan 2011) | 1 line

  don't segfault on deleting __abstractmethods__ #10892
........
2011-01-12 15:42:34 +00:00
Benjamin Peterson 477ba919c1 don't segfault on deleting __abstractmethods__ #10892 2011-01-12 15:34:01 +00:00
Nick Coghlan e993b10041 Issue 10889: Support slicing and indexing of large ranges (no docs changes, since, as far as I know, we never said anywhere that this *didn't* work) 2011-01-12 03:15:52 +00:00
Antoine Pitrou 5b6fc63998 Merged revisions 87834 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87834 | antoine.pitrou | 2011-01-07 22:43:59 +0100 (ven., 07 janv. 2011) | 5 lines

  Issue #8020: Avoid a crash where the small objects allocator would read
  non-Python managed memory while it is being modified by another thread.
  Patch by Matt Bandy.
........
2011-01-07 21:49:25 +00:00
Antoine Pitrou b7fb2e25fb Issue #8020: Avoid a crash where the small objects allocator would read
non-Python managed memory while it is being modified by another thread.
Patch by Matt Bandy.
2011-01-07 21:43:59 +00:00
Martin v. Löwis 189c091612 Drop bf_getbuffer/bf_releasebuffer from stable ABI,
see #10181.
2011-01-06 19:28:31 +00:00
Martin v. Löwis b30111f29e Support comment lines and missing indices in typeslots.h. 2011-01-06 19:26:21 +00:00
Victor Stinner aaa4e9a438 Remove arbitrary string length limits
PyUnicode_FromFormat() and PyErr_Format() allocates a buffer of the needed
size, it is no more a fixed-buffer of 500 bytes.
2011-01-05 03:33:26 +00:00
Victor Stinner dc5554008f Issue #9015, #9611: stdprinter.write() clamps the length to 2^31-1 on Windows 2011-01-04 13:15:39 +00:00
Victor Stinner 0fcab4a3ed Issue #9566: use Py_ssize_t instead of int 2011-01-04 12:59:15 +00:00
Alexander Belopolsky b9cc00caab Removed unneeded #include 2010-12-22 02:35:20 +00:00
Ezio Melotti 9d254f7092 Merged revisions 87368 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87368 | ezio.melotti | 2010-12-18 15:59:43 +0100 (Sat, 18 Dec 2010) | 1 line

  #5587: add a repr to dict_proxy objects.  Patch by David Stanek and Daniel Urban.
........
2010-12-18 15:06:45 +00:00
Ezio Melotti ac53ab64a6 #5587: add a repr to dict_proxy objects. Patch by David Stanek and Daniel Urban. 2010-12-18 14:59:43 +00:00
R. David Murray 800dfee91a Merged revisions 87251 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87251 | r.david.murray | 2010-12-14 18:06:25 -0500 (Tue, 14 Dec 2010) | 4 lines

  #4236: avoid possible Fatal Error when import is called from __del__

  Patch by Simon Cross, crasher test code by Martin von Löwis.
........
2010-12-14 23:30:42 +00:00
R. David Murray ce4b170c5a #4236: avoid possible Fatal Error when import is called from __del__
Patch by Simon Cross, crasher test code by Martin von Löwis.
2010-12-14 23:06:25 +00:00
Benjamin Peterson 28a4dce6a8 remove (un)transform methods 2010-12-12 01:33:04 +00:00
Alexander Belopolsky 532d091d05 Reverted accidental commit (from r87159) 2010-12-10 18:14:16 +00:00
Alexander Belopolsky fc55789cae Updated UCD version and unicode.org links to Unicode 6.0.0 2010-12-10 18:11:24 +00:00
Benjamin Peterson 9b955de76f use the more direct API 2010-12-07 04:04:02 +00:00
Benjamin Peterson 0eb7f86320 return views from dict proxy items/values/keys #10630 2010-12-07 03:46:27 +00:00
Georg Brandl f3fa5685e8 Fix typo. 2010-12-04 17:09:30 +00:00
Eric Smith 70099a1555 Removed static function complex_format, moved it into complex_repr. Modified tests to check both str and repr, which are the same for complex. 2010-12-04 13:27:34 +00:00
Mark Dickinson 7b1bee47ae Use copysign to produce appropriately signed zeros instead of trying to worm around possible compiler optimizations. 2010-12-04 13:14:29 +00:00
Mark Dickinson 0169af1534 Merged revisions 87032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines

  Issue #10596: Fix float.__mod__ to have the same behaviour as
  float.__divmod__ with respect to signed zeros.
........
2010-12-04 13:04:18 +00:00
Mark Dickinson 33154388f9 Backout broken backport. (Sorry.) 2010-12-04 12:42:18 +00:00
Mark Dickinson 11e77ffcbc Merged revisions 87032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines

  Issue #10596: Fix float.__mod__ to have the same behaviour as
  float.__divmod__ with respect to signed zeros.
........
2010-12-04 12:38:19 +00:00
Mark Dickinson d2a9b20efa Issue #10596: Fix float.__mod__ to have the same behaviour as
float.__divmod__ with respect to signed zeros.
2010-12-04 12:25:30 +00:00
Mark Dickinson 66f2623fb2 Remove some unecessary '#ifdef Py_NAN's from floatobject.c 2010-12-04 11:52:58 +00:00
Mark Dickinson c9fb3c6417 Fix indentation in Objects/longobject.c 2010-12-04 11:06:25 +00:00
Martin v. Löwis da72231c9f Regenerate. 2010-12-04 09:12:14 +00:00
Martin v. Löwis 81c9b45905 Add Revision keyword. 2010-12-04 09:11:41 +00:00
Martin v. Löwis 35f08f0f84 Make script 2-vs-3-agnostic. 2010-12-04 09:08:10 +00:00
Alexander Belopolsky 942af5a9a4 Issue #10557: Fixed error messages from float() and other numeric
types.  Added a new API function, PyUnicode_TransformDecimalToASCII(),
which transforms non-ASCII decimal digits in a Unicode string to their
ASCII equivalents.
2010-12-04 03:38:46 +00:00
Martin v. Löwis 4d0d471a80 Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
Victor Stinner f961377e99 #6780: fix complex() constructor TypeError message 2010-12-03 16:51:33 +00:00
Nick Coghlan 37ee850b10 Issue 2690: Add support for slicing and negative indices to range objects (includes precalculation and storage of the range length).
Refer to the tracker issue for the language moratorium implications of this change
2010-12-03 14:26:13 +00:00
Georg Brandl 3b9406b08a Remove redundant check for PyBytes in unicode_encode. 2010-12-03 07:54:09 +00:00
Benjamin Peterson 9efdccae25 code style 2010-12-03 01:44:10 +00:00
Daniel Stutzbach 98338227a7 Issue9915: speeding up sorting with a key 2010-12-02 21:55:33 +00:00
Georg Brandl 02524629f3 #7475: add (un)transform method to bytes/bytearray and str, add back codecs that can be used with them from Python 2. 2010-12-02 18:06:51 +00:00
Antoine Pitrou 715f3cd10d Issue #8685: Speed up set difference `a - b` when source set `a` is
much larger than operand `b`.  Patch by Andrew Bennetts.
2010-11-30 22:23:20 +00:00
Georg Brandl e5b99f0fb3 Remove redundant includes of headers that are already included by Python.h. 2010-11-30 09:41:01 +00:00
Georg Brandl 71c23d4473 Include structseq.h in Python.h, and remove now-redundant includes in individual sources. 2010-11-30 09:30:54 +00:00
Stefan Krah 5d744a8855 Merged revisions 86791 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86791 | stefan.krah | 2010-11-26 11:54:09 +0100 (Fri, 26 Nov 2010) | 1 line

  Indentation cleanup.
........
2010-11-26 11:07:04 +00:00
Stefan Krah 735bb12b01 Indentation cleanup. 2010-11-26 10:54:09 +00:00
Eric Smith 984bb58000 Issue #7094: Add alternate ('#') flag to __format__ methods for float, complex and Decimal. Allows greater control over when decimal points appear. Added to make transitioning from %-formatting easier. '#g' still has a problem with Decimal which I'll fix soon. 2010-11-25 16:08:06 +00:00
Benjamin Peterson a1864f3717 pep 7 actually wants the brace on a new line 2010-11-20 23:05:39 +00:00
Benjamin Peterson 155614b104 code style and simplification 2010-11-20 22:44:32 +00:00
Georg Brandl 7e5343b882 Add error handling in range_count. 2010-11-20 22:40:10 +00:00
Benjamin Peterson 0b458d52f9 count() should return integers #10474 2010-11-20 22:35:41 +00:00
Benjamin Peterson 72288d4f3c code style 2010-11-20 17:21:08 +00:00
R. David Murray 6bb9989ae3 #1574217: only swallow AttributeErrors in isinstance, not everything.
Patch and tests by Brian Harring, with improvements by Ralf Schmitt.
2010-11-20 16:33:30 +00:00
Benjamin Peterson f609654b0e handle dict subclasses gracefully in PyArg_ValidateKeywordArguments 2010-11-17 22:33:12 +00:00
Victor Stinner 3e2b7171bf Issue #10359: Remove ";" after function definition, invalid in ISO C 2010-11-09 09:32:19 +00:00
Victor Stinner d5af0a5df0 PyUnicode_DecodeFSDefaultAndSize() raises MemoryError if _Py_char2wchar() fails 2010-11-08 23:34:29 +00:00
Victor Stinner 2f02a51135 PyUnicode_EncodeFS() raises an exception if _Py_wchar2char() fails
* Add error_pos optional argument to _Py_wchar2char()
 * PyUnicode_EncodeFS() raises a UnicodeEncodeError or MemoryError if
   _Py_wchar2char() fails
2010-11-08 22:43:46 +00:00
Victor Stinner c911bbfd5d str, bytes, bytearray docstring: remove unnecessary [...] 2010-11-07 19:04:46 +00:00
Victor Stinner e14e212221 Fix encode/decode method doc of str, bytes, bytearray types
* Specify the default encoding: write 'utf-8' instead of
   sys.getdefaultencoding(), because the default encoding is now constant
 * Specify the default errors value
2010-11-07 18:41:46 +00:00
Eric Smith 16562f41b0 Merged revisions 86277 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86277 | eric.smith | 2010-11-06 15:27:37 -0400 (Sat, 06 Nov 2010) | 1 line

  Added more to docstrings for str.format, format_map, and __format__.
........
2010-11-06 19:29:45 +00:00
Eric Smith 51d2fd983b Added more to docstrings for str.format, format_map, and __format__. 2010-11-06 19:27:37 +00:00
David Malcolm 9696088b6d Issue #10288: The deprecated family of "char"-handling macros
(ISLOWER()/ISUPPER()/etc) have now been removed: use Py_ISLOWER() etc
instead.
2010-11-05 17:23:41 +00:00
Antoine Pitrou a277ec4ad9 Followup to r86170: fix reference leak in str.format 2010-11-05 12:23:55 +00:00
Antoine Pitrou aeb6ceead7 Issue #10293: Remove obsolete field in the PyMemoryView structure,
unused undocumented value PyBUF_SHADOW, and strangely-looking code in
PyMemoryView_GetContiguous.
2010-11-04 20:30:33 +00:00
Eric Smith 27bbca6f79 Issue #6081: Add str.format_map. str.format_map(mapping) is similar to str.format(**mapping), except mapping does not get converted to a dict. 2010-11-04 17:06:58 +00:00
Benjamin Peterson 83473288a8 deuglify 2010-11-03 23:11:10 +00:00
Raymond Hettinger 7529afce3c Issue 10221: Improve error message for dict.pop(). 2010-10-30 08:14:53 +00:00
Raymond Hettinger dd4215483f Issue 10221: Improve error message for dict.pop(). 2010-10-30 08:10:29 +00:00
Antoine Pitrou 98e2b45297 Merged revisions 85896 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85896 | antoine.pitrou | 2010-10-29 00:56:58 +0200 (ven., 29 oct. 2010) | 4 lines

  Issue #5437: A preallocated MemoryError instance should not hold traceback
  data (including local variables caught in the stack trace) alive infinitely.
........
2010-10-28 23:06:57 +00:00
Antoine Pitrou 07e20ef50b Issue #5437: A preallocated MemoryError instance should not hold traceback
data (including local variables caught in the stack trace) alive infinitely.
2010-10-28 22:56:58 +00:00
Victor Stinner ad15872854 Simplify PyUnicode_Encode/DecodeFSDefault on Windows/Mac OS X
* Windows always uses mbcs
 * Mac OS X always uses utf-8
2010-10-27 00:25:46 +00:00
Georg Brandl 08be72d0aa Add a new warning gategory, ResourceWarning, as discussed on python-dev. It is silent by default,
except when configured --with-pydebug.

Emit this warning from the GC shutdown procedure, rather than just printing to stderr.
2010-10-24 15:11:22 +00:00
Antoine Pitrou fbb1c6191c Follow up to #9778: fix regressions on 64-bit Windows builds 2010-10-23 17:37:54 +00:00
Benjamin Peterson 8035bc5c04 follow up to #9778: define and use an unsigned hash type 2010-10-23 16:20:50 +00:00