aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_codeccallbacks.py
Commit message (Collapse)AuthorAge
* gh-124665: Add `_PyCodec_UnregisterError` and `_codecs._unregister_error` ↵Bénédikt Tran2024-09-29
| | | | (#124677)
* bpo-36819: Fix crashes in built-in encoders with weird error handlers (GH-28593)Serhiy Storchaka2022-05-02
| | | | | | | If the error handler returns position less or equal than the starting position of non-encodable characters, most of built-in encoders didn't properly re-size the output buffer. This led to out-of-bounds writes, and segfaults.
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-01
|
* bpo-36297: remove "unicode_internal" codec (GH-12342)Inada Naoki2019-03-18
|
* bpo-32583: Fix possible crashing in builtin Unicode decoders (#5325)Xiang Zhang2018-01-31
| | | | | When using customized decode error handlers, it is possible for builtin decoders to write out-of-bounds and then crash.
* bpo-32618: Fix test_mutatingdecodehandler not testing test.mutating (#5269)Xiang Zhang2018-01-23
| | | | | * bpo-32618: Fix test_mutatingdecodehandler not testing test.mutating It should test both test.replacing and test.mutating instead of test test.replacing twice.
* #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-08
| | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* Issue #23277: Remove unused imports in tests.Serhiy Storchaka2016-04-24
|
* Issue #24102: Fixed exception type checking in standard error handlers.Serhiy Storchaka2015-05-18
|\
| * Issue #24102: Fixed exception type checking in standard error handlers.Serhiy Storchaka2015-05-18
| |
* | Use non-zero and non-last positions in error handler tests.Serhiy Storchaka2015-03-16
|\|
| * Use non-zero and non-last positions in error handler tests.Serhiy Storchaka2015-03-16
| |
* | Increased coverage of standard codec error handlers.Serhiy Storchaka2015-03-15
|\|
| * Increased coverage of standard codec error handlers.Serhiy Storchaka2015-03-15
| |
* | Issue #22286: The "backslashreplace" error handlers now works withSerhiy Storchaka2015-01-25
| | | | | | | | decoding and translating.
* | Issue #19676: Added the "namereplace" error handler.Serhiy Storchaka2014-11-25
| |
* | Issue #21118: str.translate() now raises a ValueError, not a TypeError, if theVictor Stinner2014-04-05
|/ | | | replacement character is bigger than U+10ffff code point.
* Update various test modules to use unittest.main() for test discoveryBrett Cannon2013-06-12
| | | | instead of manually listing tests for test.support.run_unittest().
* Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.Serhiy Storchaka2013-01-29
|\
| * Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.Serhiy Storchaka2013-01-29
| |
| * Issue #15379: Fix passing of non-BMP characters as integers for the charmap ↵Antoine Pitrou2012-09-23
| | | | | | | | | | | | decoder (already working as unicode strings). Patch by Serhiy Storchaka.
* | #13406: fix more deprecation warnings and move the deprecation of ↵Ezio Melotti2011-11-17
| | | | | | | | unicode-internal earlier in the code.
* | "unicode_internal" codec has been deprecated: fix related testsVictor Stinner2011-11-15
| |
* | Port code page codec to Unicode API.Martin v. Löwis2011-11-04
| |
* | Fix text failures when ctypes is not availableAntoine Pitrou2011-10-05
| | | | | | | | (followup to Victor's 85d11cf67aa8 and 7a50e549bd11)
* | #13054: fix usage of sys.maxunicode after PEP-393.Ezio Melotti2011-10-04
| |
* | Fix test_codeccallbacks for Windows: check size of wchar_t, not sys.maxunicodeVictor Stinner2011-09-29
| |
* | Implement PEP 393.Martin v. Löwis2011-09-28
|/
* #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-20
|
* Issue #9804: ascii() now always represents unicode surrogate pairs asAntoine Pitrou2010-09-09
| | | | | | a single `\UXXXXXXXX`, regardless of whether the character is printable or not. Also, the "backslashreplace" error handler now joins surrogate pairs into a single character on UCS-2 builds.
* Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.Ezio Melotti2010-07-01
| | | | | | | | | | | | | 1) #8271: when a byte sequence is invalid, only the start byte and all the valid continuation bytes are now replaced by U+FFFD, instead of replacing the number of bytes specified by the start byte. See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95); 2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes in behavior); 3) Change the error messages "unexpected code byte" to "invalid start byte" and "invalid data" to "invalid continuation byte"; 4) Add an extensive set of tests in test_unicode; 5) Fix test_codeccallbacks because it was failing after this change.
* Merged revisions 69846 via svnmerge fromMark Dickinson2009-02-21
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69846 | mark.dickinson | 2009-02-21 20:27:01 +0000 (Sat, 21 Feb 2009) | 2 lines Issue #5341: Fix a variety of spelling errors. ........
* Merged revisions 68633,68648,68667,68706,68718,68720-68721,68724-68727,68739 ↵Benjamin Peterson2009-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68633 | thomas.heller | 2009-01-16 12:53:44 -0600 (Fri, 16 Jan 2009) | 3 lines Change an example in the docs to avoid a mistake when the code is copy pasted and changed afterwards. ........ r68648 | benjamin.peterson | 2009-01-16 22:28:57 -0600 (Fri, 16 Jan 2009) | 1 line use enumerate ........ r68667 | amaury.forgeotdarc | 2009-01-17 14:18:59 -0600 (Sat, 17 Jan 2009) | 3 lines #4077: No need to append \n when calling Py_FatalError + fix a declaration to make it match the one in pythonrun.h ........ r68706 | benjamin.peterson | 2009-01-17 19:28:46 -0600 (Sat, 17 Jan 2009) | 1 line fix grammar ........ r68718 | georg.brandl | 2009-01-18 04:42:35 -0600 (Sun, 18 Jan 2009) | 1 line #4976: union() and intersection() take multiple args, but talk about "the other". ........ r68720 | georg.brandl | 2009-01-18 04:45:22 -0600 (Sun, 18 Jan 2009) | 1 line #4974: fix redundant mention of lists and tuples. ........ r68721 | georg.brandl | 2009-01-18 04:48:16 -0600 (Sun, 18 Jan 2009) | 1 line #4914: trunc is in math. ........ r68724 | georg.brandl | 2009-01-18 07:24:10 -0600 (Sun, 18 Jan 2009) | 1 line #4979: correct result range for some random functions. ........ r68725 | georg.brandl | 2009-01-18 07:47:26 -0600 (Sun, 18 Jan 2009) | 1 line #4857: fix augmented assignment target spec. ........ r68726 | georg.brandl | 2009-01-18 08:41:52 -0600 (Sun, 18 Jan 2009) | 1 line #4923: clarify what was added. ........ r68727 | georg.brandl | 2009-01-18 12:25:30 -0600 (Sun, 18 Jan 2009) | 1 line #4986: augassigns are not expressions. ........ r68739 | benjamin.peterson | 2009-01-18 15:11:38 -0600 (Sun, 18 Jan 2009) | 1 line fix test that wasn't working as expected #4990 ........
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-20
|
* rename HTMLParser to html.parser and htmlentitydefs to html.entities;Fred Drake2008-05-17
| | | | includes merge of trunk revision 63432
* Rename buffer -> bytearray.Guido van Rossum2007-11-21
|
* Merging the py3k-pep3137 branch back into the py3k branch.Guido van Rossum2007-11-06
| | | | | | | | | | | | | | No detailed change log; just check out the change log for the py3k-pep3137 branch. The most obvious changes: - str8 renamed to bytes (PyString at the C level); - bytes renamed to buffer (PyBytes at the C level); - PyString and PyUnicode are no longer compatible. I.e. we now have an immutable bytes type and a mutable bytes type. The behavior of PyString was modified quite a bit, to make it more bytes-like. Some changes are still on the to-do list.
* Remove a test case which is no longer valid.Georg Brandl2007-10-24
|
* Patch #1303: Adapt str8 constructor to bytes (now buffer) one.Georg Brandl2007-10-24
|
* Patch# 1258 by Christian Heimes: kill basestring.Guido van Rossum2007-10-16
| | | | I like this because it makes the code shorter! :-)
* Changes in anticipation of stricter str vs. bytes enforcement.Guido van Rossum2007-08-27
|
* Apply SF patch #1775604: This adds three new codecs (utf-32, utf-32-le andWalter Dörwald2007-08-16
| | | | | | | | | ut-32-be). On narrow builds the codecs combine surrogate pairs in the unicode object into one codepoint on encoding and create surrogate pairs for codepoints outside the BMP on decoding. Lone surrogates are passed through unchanged in all cases. Backport to the trunk will follow.
* Bytes (which are the input for decoding) are mutable now. If a decodingWalter Dörwald2007-07-30
| | | | | | | error callback changes the bytes object in the exception the decoder might use memory that's no longer in use. Change unicode_decode_call_errorhandler() so that it fetches the adresses of the bytes array (start and end) from the exception object and passes them back to the caller.
* Patch by Ron Adam: Don't use u prefix in unicode error messagesWalter Dörwald2007-06-20
| | | | and remove u prefix from some comments in test_codecs.py.
* Fix test_codeccallbacks.py: bytes has no % operator.Walter Dörwald2007-06-06
|
* Add 'U'/'U#' format characters to Py_BuildValue (and thusWalter Dörwald2007-05-18
| | | | | | | | | | | | | | to PyObject_CallFunction()) that take a char * (and a size in the case of 'U#') and create a unicode object out of it. Add functions PyUnicode_FromFormat() and PyUnicode_FromFormatV() that work similar to PyString_FromFormat(), but create a unicode object (also a %U format character has been added, that takes a PyObject *, which must point to a unicode object). Change the encoding and reason attributes of UnicodeEncodeError, UnicodeDecodeError and UnicodeTranslateError to be unicode objects.
* test_codeccallbacks.py passes again.Walter Dörwald2007-05-09
|
* Merged revisions 55007-55179 via svnmerge fromGuido van Rossum2007-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55077 | guido.van.rossum | 2007-05-02 11:54:37 -0700 (Wed, 02 May 2007) | 2 lines Use the new print syntax, at least. ........ r55142 | fred.drake | 2007-05-04 21:27:30 -0700 (Fri, 04 May 2007) | 1 line remove old cruftiness ........ r55143 | fred.drake | 2007-05-04 21:52:16 -0700 (Fri, 04 May 2007) | 1 line make this work with the new Python ........ r55162 | neal.norwitz | 2007-05-06 22:29:18 -0700 (Sun, 06 May 2007) | 1 line Get asdl code gen working with Python 2.3. Should continue to work with 3.0 ........ r55164 | neal.norwitz | 2007-05-07 00:00:38 -0700 (Mon, 07 May 2007) | 1 line Verify checkins to p3yk (sic) branch go to 3000 list. ........ r55166 | neal.norwitz | 2007-05-07 00:12:35 -0700 (Mon, 07 May 2007) | 1 line Fix this test so it runs again by importing warnings_test properly. ........ r55167 | neal.norwitz | 2007-05-07 01:03:22 -0700 (Mon, 07 May 2007) | 8 lines So long xrange. range() now supports values that are outside -sys.maxint to sys.maxint. floats raise a TypeError. This has been sitting for a long time. It probably has some problems and needs cleanup. Objects/rangeobject.c now uses 4-space indents since it is almost completely new. ........ r55171 | guido.van.rossum | 2007-05-07 10:21:26 -0700 (Mon, 07 May 2007) | 4 lines Fix two tests that were previously depending on significant spaces at the end of a line (and before that on Python 2.x print behavior that has no exact equivalent in 3.0). ........
* Rename 'unicode' to 'str' in its tp_name field. Rename 'str' to 'str8'.Guido van Rossum2007-05-03
| | | | Change all occurrences of unichr to chr.
* Rip out all the u"..." literals and calls to unicode().Guido van Rossum2007-05-02
|