Commit Graph

72 Commits

Author SHA1 Message Date
Christian Heimes 6d26ade920 Fix compilation on Windows 2012-11-03 23:07:59 +01:00
Ezio Melotti c64bcbec4b #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an error. 2012-11-03 21:19:06 +02:00
Antoine Pitrou 58bb82e7b4 Issue #13019: Fix potential reference leaks in bytearray.extend().
Patch by Suman Saha.
2012-04-01 16:05:46 +02:00
Victor Stinner bb2e9c477d Issue #11231: Fix bytes and bytearray docstrings
Patch written by Brice Berna.
2011-12-17 23:18:07 +01:00
Senthil Kumaran 53516a82df Fix closes Issue12621 - Fix docstrings of find and rfind methods of bytes/bytearry/unicodeobject. 2011-07-27 23:33:54 +08: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
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
Ezio Melotti 4969f709cc #11515: Merge with 3.1. 2011-03-15 05:59:46 +02:00
Ezio Melotti 42da663e6f #11515: fix several typos. Patch by Piotr Kasprzyk. 2011-03-15 05:18:48 +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
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
Benjamin Peterson 28a4dce6a8 remove (un)transform methods 2010-12-12 01:33:04 +00:00
Georg Brandl f3fa5685e8 Fix typo. 2010-12-04 17:09:30 +00:00
Martin v. Löwis 4d0d471a80 Merge branches/pep-0384. 2010-12-03 20:14:31 +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
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
Antoine Pitrou bc760d9f45 Merged revisions 84070,84074 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84070 | antoine.pitrou | 2010-08-15 19:12:55 +0200 (dim., 15 août 2010) | 5 lines

  Fix some compilation warnings under 64-bit Windows (issue #9566).
  Some of these are genuine bugs with objects bigger than 2GB, but
  my system doesn't allow me to write tests for it.
........
  r84074 | antoine.pitrou | 2010-08-15 19:41:31 +0200 (dim., 15 août 2010) | 3 lines

  Fix (harmless) warning with MSVC.
........
2010-08-15 17:46:50 +00:00
Antoine Pitrou 0010d37a43 Fix some compilation warnings under 64-bit Windows (issue #9566).
Some of these are genuine bugs with objects bigger than 2GB, but
my system doesn't allow me to write tests for it.
2010-08-15 17:12:55 +00:00
Alexander Belopolsky f0f45142d5 Issue #2443: Added a new macro, Py_VA_COPY, which is equivalent to C99
va_copy, but available on all python platforms.  Untabified a few
unrelated files.
2010-08-11 17:31:17 +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
Mark Dickinson 7e3b948cfe Issue #9530: Fix a couple of places where undefined behaviour can
occur, as a result of signed integer overflow.
2010-08-06 21:33:18 +00:00
Mark Dickinson 10de93a715 Silence gcc warning. (In function 'bytearray_init': warning: 'value' may be used uninitialized in this function). 2010-07-09 19:25:48 +00:00
Antoine Pitrou a57aae7d47 Merged revisions 81862 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r81862 | antoine.pitrou | 2010-06-09 18:38:55 +0200 (mer., 09 juin 2010) | 9 lines

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

  ........
    r81860 | antoine.pitrou | 2010-06-09 18:24:00 +0200 (mer., 09 juin 2010) | 3 lines

    Issue #8930: fix some C code indentation
  ........
................
2010-06-09 16:58:35 +00:00
Antoine Pitrou d118856049 Merged revisions 81860 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81860 | antoine.pitrou | 2010-06-09 18:24:00 +0200 (mer., 09 juin 2010) | 3 lines

  Issue #8930: fix some C code indentation
........
2010-06-09 16:38:55 +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 9c0e94f95c 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:00:53 +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
Mark Dickinson 5a41a4c235 Merged revisions 78185 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r78185 | mark.dickinson | 2010-02-14 12:53:32 +0000 (Sun, 14 Feb 2010) | 13 lines

  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:09:30 +00:00
Mark Dickinson 66f575b359 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 12:53:32 +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 4c81fbb118 Merged revisions 77745 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r77745 | ezio.melotti | 2010-01-25 13:58:28 +0200 (Mon, 25 Jan 2010) | 9 lines

  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 12:02:24 +00:00
Ezio Melotti 5b2b242f07 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:58:28 +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 f2c5484f9e Merged revisions 77461 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77461 | antoine.pitrou | 2010-01-13 08:55:48 +0100 (mer., 13 janv. 2010) | 5 lines

  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 08:07:53 +00:00
Antoine Pitrou da2ecaf334 Merged revisions 77241 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77241 | antoine.pitrou | 2010-01-02 22:12:58 +0100 (sam., 02 janv. 2010) | 4 lines

  Issue #7462: Implement the stringlib fast search algorithm for the `rfind`,
  `rindex`, `rsplit` and `rpartition` methods.  Patch by Florent Xicluna.
........
2010-01-02 21:40:36 +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 099d7a0ffb Merged revisions 74679 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r74679 | mark.dickinson | 2009-09-06 11:34:47 +0100 (Sun, 06 Sep 2009) | 9 lines

  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:35:38 +00:00
Mark Dickinson 2b6705fb1c 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:34:47 +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 069bcc3dd9 Merged revisions 74169 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

................
  r74169 | georg.brandl | 2009-07-22 14:03:59 +0200 (Mi, 22 Jul 2009) | 9 lines

  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:06:11 +00:00
Georg Brandl 953152f064 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:59 +00:00
Eric Smith 6dc46f5eaa Merged revisions 72040 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72040 | eric.smith | 2009-04-27 15:04:37 -0400 (Mon, 27 Apr 2009) | 1 line

  Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to py3k. Should fix Windows buildbot errors.
........
2009-04-27 20:39:49 +00:00
Benjamin Peterson 153c70f6d7 Merged revisions 71719 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71719 | benjamin.peterson | 2009-04-18 10:31:34 -0500 (Sat, 18 Apr 2009) | 1 line

  rename internal bytes_ functions to bytearray
........
2009-04-18 15:42:12 +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