summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_codecs.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * Backport 0398f07d4827 (fix for weird buildbot failures)Antoine Pitrou2011-07-261-1/+1
| |
* | Write tests for invalid characters (U+00110000)Victor Stinner2011-12-091-0/+16
| | | | | | | | | | | | | | | | | | Test the following functions: * codecs.raw_unicode_escape_decode() * PyUnicode_FromWideChar() * PyUnicode_FromUnicode() * "unicode_internal" and "unicode_escape" decoders
* | #13406: fix more deprecation warnings and move the deprecation of ↵Ezio Melotti2011-11-171-8/+6
| | | | | | | | unicode-internal earlier in the code.
* | #13406: correct the error message in check_warnings too.Ezio Melotti2011-11-161-3/+3
| |
* | #13406: silence deprecation warnings in test_codecs.Ezio Melotti2011-11-161-8/+15
| |
* | "unicode_internal" codec has been deprecated: fix related testsVictor Stinner2011-11-151-12/+25
| |
* | Cleanup decode_code_page_stateful() and encode_code_page()Victor Stinner2011-11-031-0/+3
| | | | | | | | | | | | * Fix decode_code_page_errors() result * Inline decode_code_page() and encode_code_page_chunk() * Replace the PyUnicodeObject type by PyObject
* | Close #13247: Add cp65001 codec, the Windows UTF-8 (CP_UTF8)Victor Stinner2011-10-261-60/+116
| |
* | Issue #12281: Fix test_codecs.test_cp932() on Windows XPVictor Stinner2011-10-181-7/+3
| | | | | | | | | | Cool! Decoding b'\x81\x00abc' from cp932 with replace error handler is now giving the same result on all Windows versions.
* | Issue #12281: Skip code page tests on non-Windows platformsVictor Stinner2011-10-181-6/+10
| |
* | Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignoreVictor Stinner2011-10-181-0/+198
| | | | | | | | | | error handlers on all Windows versions. The MBCS codec is now supporting all error handlers, instead of only replace to encode and ignore to decode.
* | Fix text failures when ctypes is not availableAntoine Pitrou2011-10-051-2/+7
| | | | | | | | (followup to Victor's 85d11cf67aa8 and 7a50e549bd11)
* | Fix test_codecs for Windows: check size of wchar_t, not sys.maxunicodeVictor Stinner2011-09-291-41/+44
| |
* | Implement PEP 393.Martin v. Löwis2011-09-281-0/+4
| |
* | Try to fix weird buildbot failuresAntoine Pitrou2011-07-261-1/+1
| |
* | Add a test for issue #1813: getlocale() failing under a Turkish localeAntoine Pitrou2011-07-241-0/+14
|\ \ | |/ | | | | (not a problem under 3.x)
| * Issue #1813: Fix codec lookup under Turkish locales.Antoine Pitrou2011-07-241-0/+14
| |
* | Revert my commit 3555cf6f9c98: "Issue #8796: codecs.open() calls the builtinVictor Stinner2011-05-271-106/+46
| | | | | | | | | | | | | | | | open() function instead of using StreamReaderWriter. Deprecate StreamReader, StreamWriter, StreamReaderWriter, StreamRecoder and EncodedFile() of the codec module. Use the builtin open() function or io.TextIOWrapper instead." "It has not been approved !" wrote Marc-Andre Lemburg.
* | Issue #8796: codecs.open() calls the builtin open() function instead of usingVictor Stinner2011-05-261-46/+106
| | | | | | | | | | | | StreamReaderWriter. Deprecate StreamReader, StreamWriter, StreamReaderWriter, StreamRecoder and EncodedFile() of the codec module. Use the builtin open() function or io.TextIOWrapper instead.
* | Merge 3.2Victor Stinner2011-05-231-7/+6
|\ \ | |/
| * Merge 3.1Victor Stinner2011-05-231-7/+6
| |\
| | * test_codecs now removes the temporay file (created by the test)Victor Stinner2011-05-231-7/+6
| | |
| | * Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-81/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 81908 via svnmerge fromAntoine Pitrou2010-06-111-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81908 | antoine.pitrou | 2010-06-11 23:46:32 +0200 (ven., 11 juin 2010) | 11 lines Merged revisions 81907 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81907 | antoine.pitrou | 2010-06-11 23:42:26 +0200 (ven., 11 juin 2010) | 5 lines Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash the interpreter with characters outside the Basic Multilingual Plane (higher than 0x10000). ........ ................
| | * Merged revisions 79780 via svnmerge fromPhilip Jenvey2010-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r79780 | philip.jenvey | 2010-04-04 20:05:24 -0700 (Sun, 04 Apr 2010) | 9 lines Merged revisions 79779 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79779 | philip.jenvey | 2010-04-04 19:51:51 -0700 (Sun, 04 Apr 2010) | 2 lines fix escape_encode to return the correct consumed size ........ ................
| | * Merged revisions 81474 via svnmerge fromVictor Stinner2010-05-221-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81474 | victor.stinner | 2010-05-22 18:59:09 +0200 (sam., 22 mai 2010) | 20 lines Merged revisions 81471-81472 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81471 | victor.stinner | 2010-05-22 15:37:56 +0200 (sam., 22 mai 2010) | 7 lines Issue #6268: More bugfixes about BOM, UTF-16 and UTF-32 * Fix seek() method of codecs.open(), don't write the BOM twice after seek(0) * Fix reset() method of codecs, UTF-16, UTF-32 and StreamWriter classes * test_codecs: use "w+" mode instead of "wt+". "t" mode is not supported by Solaris or Windows, but does it really exist? I found it the in the issue. ........ r81472 | victor.stinner | 2010-05-22 15:44:25 +0200 (sam., 22 mai 2010) | 4 lines Fix my last commit (r81471) about codecs Rememder: don't touch the code just before a commit ........ ................
| | * Merged revisions 81461 via svnmerge fromVictor Stinner2010-05-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81461 | victor.stinner | 2010-05-22 04:16:27 +0200 (sam., 22 mai 2010) | 10 lines Merged revisions 81459 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81459 | victor.stinner | 2010-05-22 04:11:07 +0200 (sam., 22 mai 2010) | 3 lines Issue #6268: Fix seek() method of codecs.open(), don't read the BOM twice after seek(0) ........ ................
| | * Merged revisions 80382 via svnmerge fromVictor Stinner2010-04-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r80382 | victor.stinner | 2010-04-22 21:38:16 +0200 (jeu., 22 avril 2010) | 3 lines Issue #8092: Fix PyUnicode_EncodeUTF8() to support error handler producing unicode string (eg. backslashreplace) ........
| | * Recorded merge of revisions 78462,78484 via svnmerge fromFlorent Xicluna2010-02-271-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78462 | florent.xicluna | 2010-02-26 12:12:33 +0100 (ven, 26 fév 2010) | 9 lines Merged revisions 78461 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78461 | florent.xicluna | 2010-02-26 11:40:58 +0100 (ven, 26 fév 2010) | 2 lines #691291: codecs.open() should not convert end of lines on reading and writing. ........ ................ r78484 | florent.xicluna | 2010-02-27 12:31:21 +0100 (sam, 27 fév 2010) | 9 lines Merged revisions 78482 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78482 | florent.xicluna | 2010-02-27 12:19:18 +0100 (sam, 27 fév 2010) | 2 lines Add entry for issue #691291. ........ ................
| | * Merged revisions 74871 via svnmerge fromGeorg Brandl2009-09-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ................ r74871 | georg.brandl | 2009-09-17 13:41:24 +0200 (Do, 17 Sep 2009) | 12 lines Merged revisions 74869 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk (Only the new tests, the code had already been corrected due to an API change in unicode_decode_call_errorhandler.) ........ r74869 | georg.brandl | 2009-09-17 13:28:09 +0200 (Do, 17 Sep 2009) | 4 lines Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32 stream with a non-raising error handler like "replace" or "ignore". ........ ................
| | * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 73698 via svnmerge fromAmaury Forgeot d'Arc2009-06-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r73698 | amaury.forgeotdarc | 2009-06-30 00:36:49 +0200 (mar., 30 juin 2009) | 7 lines #6373: SystemError in str.encode('latin1', 'surrogateescape') if the string contains unpaired surrogates. (In debug build, crash in assert()) This can happen with normal processing, if python starts with utf-8, then calls sys.setfilesystemencoding('latin-1') ........
* | | Normalize the encoding names for Latin-1 and UTF-8 toMarc-André Lemburg2011-02-251-2/+2
|/ / | | | | | | | | | | | | | | | | | | '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.
* | remove (un)transform methodsBenjamin Peterson2010-12-121-16/+3
| |
* | Issue #10546: UTF-16-LE and UTF-16-BE *do* support non-BMP charactersVictor Stinner2010-12-081-0/+12
| | | | | | | | Fix the doc and add tests.
* | #7475: add (un)transform method to bytes/bytearray and str, add back codecs ↵Georg Brandl2010-12-021-0/+62
| | | | | | | | that can be used with them from Python 2.
* | #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-81/+81
| |
* | Merged revisions 81499,81506 via svnmerge fromBenjamin Peterson2010-06-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81499 | georg.brandl | 2010-05-24 16:29:07 -0500 (Mon, 24 May 2010) | 1 line #8016: add the CP858 codec (approved by Benjamin). (Also add CP720 to the tests, it was missing there.) ........ r81506 | benjamin.peterson | 2010-05-24 17:04:53 -0500 (Mon, 24 May 2010) | 1 line set svn:eol-style ........
* | Issue #850997: mbcs encoding (Windows only) handles errors argument: strictVictor Stinner2010-06-161-6/+1
| | | | | | | | | | mode raises unicode errors. The encoder only supports "strict" and "replace" error handlers, the decoder only supports "strict" and "ignore" error handlers.
* | Merged revisions 81907 via svnmerge fromAntoine Pitrou2010-06-111-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81907 | antoine.pitrou | 2010-06-11 23:42:26 +0200 (ven., 11 juin 2010) | 5 lines Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash the interpreter with characters outside the Basic Multilingual Plane (higher than 0x10000). ........
* | Issue #8838, #8339: Remove codecs.charbuffer_encode() and "t#" parsing formatVictor Stinner2010-06-081-14/+0
| | | | | | | | | | Remove last references to the "char buffer" of the buffer protocol from Python3.
* | Merged revisions 81471-81472 via svnmerge fromVictor Stinner2010-05-221-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81471 | victor.stinner | 2010-05-22 15:37:56 +0200 (sam., 22 mai 2010) | 7 lines Issue #6268: More bugfixes about BOM, UTF-16 and UTF-32 * Fix seek() method of codecs.open(), don't write the BOM twice after seek(0) * Fix reset() method of codecs, UTF-16, UTF-32 and StreamWriter classes * test_codecs: use "w+" mode instead of "wt+". "t" mode is not supported by Solaris or Windows, but does it really exist? I found it the in the issue. ........ r81472 | victor.stinner | 2010-05-22 15:44:25 +0200 (sam., 22 mai 2010) | 4 lines Fix my last commit (r81471) about codecs Rememder: don't touch the code just before a commit ........
* | Merged revisions 81459 via svnmerge fromVictor Stinner2010-05-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81459 | victor.stinner | 2010-05-22 04:11:07 +0200 (sam., 22 mai 2010) | 3 lines Issue #6268: Fix seek() method of codecs.open(), don't read the BOM twice after seek(0) ........
* | Issue #8092: Fix PyUnicode_EncodeUTF8() to support error handler producingVictor Stinner2010-04-221-0/+10
| | | | | | | | unicode string (eg. backslashreplace)
* | Merged revisions 79779 via svnmerge fromPhilip Jenvey2010-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79779 | philip.jenvey | 2010-04-04 19:51:51 -0700 (Sun, 04 Apr 2010) | 2 lines fix escape_encode to return the correct consumed size ........
* | Merged revisions 78461 via svnmerge fromFlorent Xicluna2010-02-261-0/+15
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78461 | florent.xicluna | 2010-02-26 11:40:58 +0100 (ven, 26 fév 2010) | 2 lines #691291: codecs.open() should not convert end of lines on reading and writing. ........
* | Merged revisions 77727 via svnmerge fromEzio Melotti2010-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | 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 ........
* | Merged revisions 74869 via svnmerge from ↵Georg Brandl2009-09-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk (Only the new tests, the code had already been corrected due to an API change in unicode_decode_call_errorhandler.) ........ r74869 | georg.brandl | 2009-09-17 13:28:09 +0200 (Do, 17 Sep 2009) | 4 lines Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32 stream with a non-raising error handler like "replace" or "ignore". ........
* | convert old fail* assertions to assert*Benjamin Peterson2009-06-301-5/+5
| |
* | #6373: SystemError in str.encode('latin1', 'surrogateescape')Amaury Forgeot d'Arc2009-06-291-0/+5
|/ | | | | | | | if the string contains unpaired surrogates. (In debug build, crash in assert()) This can happen with normal processing, if python starts with utf-8, then calls sys.setfilesystemencoding('latin-1')