Commit Graph

113 Commits

Author SHA1 Message Date
Ezio Melotti bf1253b25a #6780: merge with 3.2. 2011-04-26 06:45:24 +03:00
Ezio Melotti f2b3f780a1 #6780: merge with 3.1. 2011-04-26 06:40:59 +03:00
Ezio Melotti ba42fd5801 #6780: fix starts/endswith error message to mention that tuples are accepted too. 2011-04-26 06:09:45 +03:00
Ezio Melotti 5020e000c5 Merge with 3.2. 2011-04-20 21:59:06 +03:00
Ezio Melotti af92842bf9 Use non-deprecated method name. 2011-04-20 21:56:21 +03:00
Jesus Cea c1ceb64e41 MERGE: startswith and endswith don't accept None as slice index. Patch by Torsten Becker. (closes #11828) 2011-04-20 17:59:29 +02:00
Jesus Cea 6159ee3cf5 MERGE: startswith and endswith don't accept None as slice index. Patch by Torsten Becker. (closes #11828) 2011-04-20 17:42:50 +02:00
Jesus Cea ac4515063c startswith and endswith don't accept None as slice index. Patch by Torsten Becker. (closes #11828) 2011-04-20 17:09:23 +02:00
Eli Bendersky e0c8635d89 Merged revisions 88735 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88735 | eli.bendersky | 2011-03-04 06:55:25 +0200 (Fri, 04 Mar 2011) | 2 lines

  Issue #11386: Fixed the exception thrown by bytearray.pop() for empty bytearrays
........
2011-03-04 05:10:57 +00:00
Eli Bendersky 1bc4f193d8 Issue #11386: Fixed the exception thrown by bytearray.pop() for empty bytearrays 2011-03-04 04:55:25 +00:00
Eli Bendersky 4db28d3343 Issue #10516: added copy() and clear() methods to bytearrays as well 2011-03-03 18:21:02 +00:00
Marc-André Lemburg 8f36af7a4c Normalize the encoding names for Latin-1 and UTF-8 to
'latin-1' and 'utf-8'.

These are optimized in the Python Unicode implementation
to result in more direct processing, bypassing the codec
registry.

Also see issue11303.
2011-02-25 15:42:01 +00:00
Victor Stinner 29e762c941 test_bytes: test PyBytes_FromFormat() using ctypes 2011-01-05 03:33:28 +00:00
Benjamin Peterson 28a4dce6a8 remove (un)transform methods 2010-12-12 01:33:04 +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
Ezio Melotti 19f2aeba67 Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line

  #9424: Replace deprecated assert* methods in the Python test suite.
........
2010-11-21 01:30:29 +00:00
Ezio Melotti b3aedd4862 #9424: Replace deprecated assert* methods in the Python test suite. 2010-11-20 19:04:17 +00:00
Florent Xicluna edf5f0ddc0 Strengthen BytesWarning tests. 2010-09-03 20:00:37 +00:00
Mark Dickinson cf940c701f Issue #9530: Fix undefined-behaviour-inducing overflow checks in bytes and bytearray implementations. 2010-08-10 18:35:01 +00:00
Victor Stinner dcb2403022 Issue #8485: PyUnicode_FSConverter() doesn't accept bytearray object anymore,
you have to convert your bytearray filenames to bytes
2010-04-22 12:08:36 +00:00
Benjamin Peterson 0ff8a505c6 Merged revisions 80125,80128,80130 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r80125 | benjamin.peterson | 2010-04-16 17:35:32 -0500 (Fri, 16 Apr 2010) | 13 lines

  Merged revisions 80123-80124 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r80123 | benjamin.peterson | 2010-04-16 17:24:16 -0500 (Fri, 16 Apr 2010) | 1 line

    bytearray -> type2test
  ........
    r80124 | benjamin.peterson | 2010-04-16 17:25:57 -0500 (Fri, 16 Apr 2010) | 1 line

    fix typo
  ........
................
  r80128 | benjamin.peterson | 2010-04-16 17:51:37 -0500 (Fri, 16 Apr 2010) | 9 lines

  Merged revisions 80126 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r80126 | benjamin.peterson | 2010-04-16 17:35:38 -0500 (Fri, 16 Apr 2010) | 1 line

    have a clear error when passing something > sys.maxsize to bytearray
  ........
................
  r80130 | benjamin.peterson | 2010-04-16 18:00:53 -0500 (Fri, 16 Apr 2010) | 9 lines

  Merged revisions 80129 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r80129 | benjamin.peterson | 2010-04-16 17:52:44 -0500 (Fri, 16 Apr 2010) | 1 line

    tiny simplification
  ........
................
2010-04-16 23:19:11 +00:00
Benjamin Peterson 8380dd5aa4 Merged revisions 80126 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80126 | benjamin.peterson | 2010-04-16 17:35:38 -0500 (Fri, 16 Apr 2010) | 1 line

  have a clear error when passing something > sys.maxsize to bytearray
........
2010-04-16 22:51:37 +00:00
Benjamin Peterson 4c04583e79 Merged revisions 80123-80124 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80123 | benjamin.peterson | 2010-04-16 17:24:16 -0500 (Fri, 16 Apr 2010) | 1 line

  bytearray -> type2test
........
  r80124 | benjamin.peterson | 2010-04-16 17:25:57 -0500 (Fri, 16 Apr 2010) | 1 line

  fix typo
........
2010-04-16 22:35:32 +00:00
Brett Cannon 41a08bcb83 Clean up warnings filter use in test_bytes. 2010-03-20 21:45:01 +00:00
Florent Xicluna 9b86b9a086 Merged revisions 79100 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79100 | florent.xicluna | 2010-03-19 19:34:55 +0100 (ven, 19 mar 2010) | 2 lines

  Various tests cleanup: check_warnings/check_py3k_warnings, unittest.assert* and setUp/tearDown.
........
2010-03-19 19:00:44 +00:00
Mark Dickinson a53f2c997e Merged revisions 77823 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r77823 | mark.dickinson | 2010-01-29 17:27:24 +0000 (Fri, 29 Jan 2010) | 10 lines

  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:29:21 +00:00
Mark Dickinson bc09964be1 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:27:24 +00:00
Ezio Melotti e96159335f Merged revisions 77727 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77727 | ezio.melotti | 2010-01-24 18:58:36 +0200 (Sun, 24 Jan 2010) | 1 line

  use assert[Not]IsInstance where appropriate
........
2010-01-24 19:26:24 +00:00
Ezio Melotti b58e0bd8bb use assert[Not]In where appropriate 2010-01-23 15:40:09 +00:00
Benjamin Peterson 577473fe68 use assert[Not]In where appropriate
A patch from Dave Malcolm.
2010-01-19 00:09:57 +00:00
Antoine Pitrou 20d6c15327 Merged revisions 77576 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r77576 | antoine.pitrou | 2010-01-17 13:38:54 +0100 (dim., 17 janv. 2010) | 12 lines

  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:43:00 +00:00
Antoine Pitrou fc8d6f4b73 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:38:54 +00:00
Antoine Pitrou cbaa6250b9 Merged revisions 77475 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77475 | antoine.pitrou | 2010-01-13 16:02:13 +0100 (mer., 13 janv. 2010) | 4 lines

  Issue #7625: Add more tests that bytearray methods return new objects,
  even if identical.  Patch by Florent Xicluna (again).
........
2010-01-13 15:03:39 +00:00
Antoine Pitrou f845302d06 Merged revisions 77448 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77448 | antoine.pitrou | 2010-01-12 23:02:10 +0100 (mar., 12 janv. 2010) | 3 lines

  Issue #7654: enable additional bytes/bytearray tests.  Patch by Florent Xicluna.
........
2010-01-12 22:05:42 +00:00
Alexandre Vassalotti 41f58a70ac Issue #7382: Fix bytes.__getnewargs__. 2010-01-12 01:23:09 +00:00
Antoine Pitrou 344ec44be1 Merged revisions 76010 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r76010 | antoine.pitrou | 2009-11-01 16:59:11 +0100 (dim., 01 nov. 2009) | 3 lines

  Fix test skipping in multibyte codec tests
........
2009-11-01 16:04:09 +00:00
Antoine Pitrou c9e92167ac Fix test skipping in multibyte codec tests 2009-11-01 15:59:11 +00:00
Antoine Pitrou 96bb15bcb4 Merged revisions 75404 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r75404 | antoine.pitrou | 2009-10-14 19:14:16 +0200 (mer., 14 oct. 2009) | 5 lines

  Issue #7065: Fix a crash in bytes.maketrans and bytearray.maketrans when
  using byte values greater than 127.  Patch by egreen.

........
2009-10-14 17:18:54 +00:00
Antoine Pitrou 403ce78872 Issue #7065: Fix a crash in bytes.maketrans and bytearray.maketrans when
using byte values greater than 127.  Patch by egreen.
2009-10-14 17:14:16 +00:00
Benjamin Peterson 308d637c94 Merged revisions 74929 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74929 | benjamin.peterson | 2009-09-18 16:14:55 -0500 (Fri, 18 Sep 2009) | 1 line

  add keyword arguments support to str/unicode encode and decode #6300
........
2009-09-18 21:42:35 +00:00
Mark Dickinson 424d75a3f5 Merged revisions 74675 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r74675 | mark.dickinson | 2009-09-06 11:19:23 +0100 (Sun, 06 Sep 2009) | 10 lines

  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:20:23 +00:00
Mark Dickinson 54a3db9f41 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:19:23 +00:00
Georg Brandl ab91fdef1f Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line

  convert old fail* assertions to assert*
........
2009-08-13 08:51:18 +00:00
Benjamin Peterson c9c0f201fe convert old fail* assertions to assert* 2009-06-30 23:06:06 +00:00
Martin v. Löwis db12d454e6 Issue #3672: Reject surrogates in utf-8 codec; add surrogates error
handler.
2009-05-02 18:52:14 +00:00
Georg Brandl abc387747d Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecate
string.maketrans() which actually works on bytes.  (Also closes #5675.)
2009-04-12 15:51:51 +00:00
Georg Brandl ccc47b6eee #4759: allow None as first argument of bytearray.translate(), for consistency with bytes.translate().
Also fix segfault for bytearray.translate(x, None) -- will backport this part to 3.0 and 2.6.
2008-12-28 11:44:14 +00:00
Antoine Pitrou 5504e893f8 Issue #4509: bugs in bytearray with exports (buffer protocol) 2008-12-06 21:27:53 +00:00
Amaury Forgeot d'Arc b0c29161a2 Merged revisions 67295,67301-67302,67318,67330,67342-67343 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67295 | benjamin.peterson | 2008-11-20 05:05:12 +0100 (jeu., 20 nov. 2008) | 1 line

  move useful sys.settrace information to the function's documentation from the debugger
........
  r67301 | benjamin.peterson | 2008-11-20 22:25:31 +0100 (jeu., 20 nov. 2008) | 1 line

  fix indentation and a sphinx warning
........
  r67302 | benjamin.peterson | 2008-11-20 22:44:23 +0100 (jeu., 20 nov. 2008) | 1 line

  oops! didn't mean to disable that test
........
  r67318 | amaury.forgeotdarc | 2008-11-21 23:05:48 +0100 (ven., 21 nov. 2008) | 4 lines

  #4363: Let uuid.uuid1() and uuid.uuid4() run even if the ctypes module is not present.

  Will backport to 2.6
........
  r67330 | georg.brandl | 2008-11-22 09:34:14 +0100 (sam., 22 nov. 2008) | 2 lines

  #4364: fix attribute name on ctypes object.
........
  r67342 | amaury.forgeotdarc | 2008-11-22 20:39:38 +0100 (sam., 22 nov. 2008) | 3 lines

  yuvconvert.c is a part of the "sv" module, an old IRIX thing
  and certainly not useful for any Windows build.
........
  r67343 | amaury.forgeotdarc | 2008-11-22 21:01:18 +0100 (sam., 22 nov. 2008) | 5 lines

  #3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter from
  stack overflow. But doing this, it always crashes when the stack is nearly full.

  Reviewed by Martin von Loewis. Will backport to 2.6.
........
2008-11-22 22:18:04 +00:00
Benjamin Peterson 0f3641ce88 Merged revisions 67291 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67291 | benjamin.peterson | 2008-11-19 15:49:09 -0600 (Wed, 19 Nov 2008) | 5 lines

  make sure that bytearray methods return a new bytearray even if there is no change

  Fixes #4348
  Reviewed by Brett
........
2008-11-19 22:05:52 +00:00