summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bytes.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #24467: Fixed possible buffer over-read in bytearray. The bytearraySerhiy Storchaka2015-06-291-1/+18
| | | | | object now always allocates place for trailing null byte and it's buffer now is always null-terminated.
* Issue #23985: Fix a possible buffer overrun when deleting a slice from the ↵Antoine Pitrou2015-05-191-0/+16
| | | | | | front of a bytearray and then appending some other bytes data. Patch by Martin Panter.
* Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-16/+17
|
* Issue #20335: bytes constructor now raises TypeError when encoding or errorsSerhiy Storchaka2014-12-021-0/+8
| | | | is specified with non-string argument. Based on patch by Renaud Blanch.
* Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff ↵Antoine Pitrou2014-11-021-0/+13
| | | | bytes on a 32-bit platform.
* check that exception messages are not empty (#22379)Benjamin Peterson2014-09-281-0/+1
| | | | Patch by Yongzhi Pan.
* Fix test_bytes when sys.stdin is None, for example on Windows when usingVictor Stinner2014-07-281-1/+1
| | | | pythonw.exe instead of python.exe
* (Merge 3.3) Issue #19969: PyBytes_FromFormatV() now raises an OverflowError ifVictor Stinner2013-12-131-0/+6
|\ | | | | | | "%c" argument is not in range [0; 255].
| * Issue #19969: PyBytes_FromFormatV() now raises an OverflowError if "%c"Victor Stinner2013-12-131-0/+6
| | | | | | | | argument is not in range [0; 255].
* | Issue #19087: Improve bytearray allocation in order to allow cheap popping ↵Antoine Pitrou2013-10-051-0/+9
| | | | | | | | of data at the front (slice deletion).
* | Merge 3.3.Stefan Krah2013-01-261-0/+1
|\ \ | |/
| * Adapt test_bytes for a build --without-doc-strings.Stefan Krah2013-01-261-0/+1
| |
* | #16910: merge with 3.3.Ezio Melotti2013-01-101-15/+9
|\ \ | |/
| * #16910: test_bytes, test_unicode, and test_userstring now work with unittest ↵Ezio Melotti2013-01-101-15/+9
| | | | | | | | test discovery. Patch by Zachary Ware.
* | Use OESeeror instead of os.error (#16720)Andrew Svetlov2012-12-241-1/+1
| | | | | | | | Patch by Serhiy Storchaka.
* | merge 3.3 (#16722)Benjamin Peterson2012-12-191-0/+6
|\ \ | |/
| * try to call __bytes__ before __index__ (closes #16722)Benjamin Peterson2012-12-191-0/+6
| |
| * #8401: merge with 3.2.Ezio Melotti2012-11-031-0/+18
| |\
* | \ #8401: merge with 3.3.Ezio Melotti2012-11-031-0/+18
|\ \ \ | | |/ | |/|
| * | #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an ↵Ezio Melotti2012-11-031-0/+18
| | | | | | | | | | | | error.
* | | Issue #15958: bytes.join and bytearray.join now accept arbitrary buffer objects.Antoine Pitrou2012-10-161-2/+21
| |/ |/|
* | Issue #14288: Serialization support for builtin iterators.Kristján Valur Jónsson2012-04-031-0/+18
| |
* | #14081: The sep and maxsplit parameter to str.split, bytes.split, and ↵Ezio Melotti2012-02-261-0/+16
| | | | | | | | bytearray.split may now be passed as keyword arguments.
* | Issue #13623: Fix a performance regression introduced by issue #12170 inVictor Stinner2011-12-181-0/+5
| | | | | | | | | | bytes.find() and handle correctly OverflowError (raise the same ValueError than the error for -1).
* | Issue #12170: The count(), find(), rfind(), index() and rindex() methodsAntoine Pitrou2011-10-201-15/+88
| | | | | | | | | | of bytes and bytearray objects now accept an integer between 0 and 255 as their first argument. Patch by Petri Lehtinen.
* | Issue #12380: PyArg_ParseTuple now accepts a bytearray for the 'c' format.Eli Bendersky2011-07-291-0/+21
| | | | | | | | | | | | | | As a side effect, this now allows the rjust, ljust and center methods of bytes and bytearray to accept a bytearray argument. Patch by Petri Lehtinen
* | #6780: merge with 3.2.Ezio Melotti2011-04-261-0/+10
|\ \ | |/
| * #6780: merge with 3.1.Ezio Melotti2011-04-261-0/+10
| |\
| | * #6780: fix starts/endswith error message to mention that tuples are accepted ↵Ezio Melotti2011-04-261-0/+16
| | | | | | | | | | | | too.
* | | Merge with 3.2.Ezio Melotti2011-04-201-7/+7
|\ \ \ | |/ /
| * | Use non-deprecated method name.Ezio Melotti2011-04-201-7/+7
| | |
* | | MERGE: startswith and endswith don't accept None as slice index. Patch by ↵Jesus Cea2011-04-201-0/+62
|\ \ \ | |/ / | | | | | | Torsten Becker. (closes #11828)
| * | MERGE: startswith and endswith don't accept None as slice index. Patch by ↵Jesus Cea2011-04-201-0/+62
| |\ \ | | |/ | | | | | | Torsten Becker. (closes #11828)
| | * startswith and endswith don't accept None as slice index. Patch by Torsten ↵Jesus Cea2011-04-201-0/+62
| | | | | | | | | | | | Becker. (closes #11828)
| | * Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........
| | * Merged revisions 80125,80128,80130 via svnmerge fromBenjamin Peterson2010-04-161-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ........ ................
| | * Merged revisions 77823 via svnmerge fromMark Dickinson2010-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........ ................
| | * Merged revisions 77576 via svnmerge fromAntoine Pitrou2010-01-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........ ................
| | * Merged revisions 76010 via svnmerge fromAntoine Pitrou2009-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ........
| | * Merged revisions 75404 via svnmerge fromAntoine Pitrou2009-10-141-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........
| | * Merged revisions 74675 via svnmerge fromMark Dickinson2009-09-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........ ................
| | * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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* ........
| * | Merged revisions 88735 via svnmerge fromEli Bendersky2011-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ........
* | | Issue #11386: Fixed the exception thrown by bytearray.pop() for empty bytearraysEli Bendersky2011-03-041-1/+1
| | |
* | | Issue #10516: added copy() and clear() methods to bytearrays as wellEli Bendersky2011-03-031-0/+33
| | |
* | | Normalize the encoding names for Latin-1 and UTF-8 toMarc-André Lemburg2011-02-251-8/+10
|/ / | | | | | | | | | | | | | | | | | | '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.
* | test_bytes: test PyBytes_FromFormat() using ctypesVictor Stinner2011-01-051-0/+21
| |
* | remove (un)transform methodsBenjamin Peterson2010-12-121-5/+0
| |
* | #7475: add (un)transform method to bytes/bytearray and str, add back codecs ↵Georg Brandl2010-12-021-0/+5
| | | | | | | | that can be used with them from Python 2.
* | #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-13/+13
| |