summaryrefslogtreecommitdiffstats
path: root/Modules/_codecsmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-24037: Add Argument Clinic converter `bool(accept={int})`. (#485)Serhiy Storchaka2017-03-121-26/+26
|
* Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)Steve Dower2016-09-081-4/+4
|
* Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec ↵Steve Dower2016-09-071-0/+36
| | | | lookup
* - Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-92/+91
|\ | | | | | | generated by Argument Clinic. Patch by Petr Viktorin.
| * Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-92/+91
| | | | | | | | generated by Argument Clinic. Patch by Petr Viktorin.
* | Issues #26716, #26057: Regenerate Argument Clinic code.Serhiy Storchaka2016-04-141-15/+15
|\ \ | |/
* | Issue #26057: Got rid of nonneeded use of PyUnicode_FromObject().Serhiy Storchaka2016-04-131-186/+45
|/
* Issue #24824: Signatures of codecs.encode() and codecs.decode() now areSerhiy Storchaka2015-08-091-6/+6
| | | | compatible with pydoc.
* Fixed compilation on Windows for issue #20173.Serhiy Storchaka2015-05-121-1/+1
|
* Issue #20173: Converted the _codecs module to Argument Clinic.Serhiy Storchaka2015-05-121-615/+629
|
* Issue #23501: Argumen Clinic now generates code into separate files by default.Serhiy Storchaka2015-04-031-29/+2
|
* Issue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, andSerhiy Storchaka2015-03-201-6/+9
| | | | | codecs, that accepted only read-only bytes-like object now accept writable bytes-like object too.
* Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-9/+15
|\ | | | | | | and PyObject_AsWriteBuffer().
| * Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-9/+15
| | | | | | | | and PyObject_AsWriteBuffer().
* | Merge issue 19548 changes from 3.4Nick Coghlan2015-01-061-3/+3
|\ \ | |/
| * Issue 19548: update codecs module documentationNick Coghlan2015-01-061-3/+3
| | | | | | | | | | | | | | | | - clarified the distinction between text encodings and other codecs - clarified relationship with builtin open and the io module - consolidated documentation of error handlers into one section - clarified type constraints of some behaviours - added tests for some of the new statements in the docs
* | Merge fix for issue #22166 from 3.4Nick Coghlan2014-09-151-0/+54
|\ \ | |/
| * Issue #22166: clear codec caches in test_codecsNick Coghlan2014-09-151-0/+54
| |
* | Issue #22207: Fix "comparison between signed and unsigned integers" warning inVictor Stinner2014-08-171-1/+1
| | | | | | | | | | test checking for integer overflow on Py_ssize_t type: cast explicitly to size_t.
* | Issue #21488: Add support of keyword arguments for codecs.encode and ↵Victor Stinner2014-05-141-6/+10
|/ | | | codecs.decode
* Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-131-3/+3
|
* Issue #16096: Fix several occurrences of potential signed integer overflow. ↵Mark Dickinson2012-10-061-2/+2
| | | | Thanks Serhiy Storchaka.
* #13406: fix more deprecation warnings and move the deprecation of ↵Ezio Melotti2011-11-171-5/+5
| | | | unicode-internal earlier in the code.
* #13406: silence deprecation warnings in test_codecs.Ezio Melotti2011-11-161-1/+1
|
* Plug some (unlikely) refleaks.Antoine Pitrou2011-11-121-15/+45
|
* Fix and deprecated the unicode_internal codecVictor Stinner2011-11-101-4/+16
| | | | | | unicode_internal codec uses Py_UNICODE instead of the real internal representation (PEP 393: Py_UCS1, Py_UCS2 or Py_UCS4) for backward compatibility.
* Fix build on WindowsVictor Stinner2011-11-101-0/+4
|
* Port encoders from Py_UNICODE API to unicode object API.Martin v. Löwis2011-11-101-76/+46
|
* Port UCS1 and charmap codecs to new API.Martin v. Löwis2011-11-021-5/+1
|
* Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignoreVictor Stinner2011-10-181-0/+50
| | | | | 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.
* Issue #13088: Add shared Py_hexdigits constant to format a number into base 16Victor Stinner2011-10-141-3/+2
|
* Implement PEP 393.Martin v. Löwis2011-09-281-5/+3
|
* Issue #9642: Uniformize the tests on the availability of the mbcs codecVictor Stinner2011-07-041-5/+5
| | | | Add a new HAVE_MBCS define.
* Merged revisions 81860 via svnmerge fromAntoine Pitrou2010-06-091-98/+98
| | | | | | | | | | 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 ........
* Issue #8838, #8339: Remove codecs.charbuffer_encode() and "t#" parsing formatVictor Stinner2010-06-081-16/+0
| | | | | Remove last references to the "char buffer" of the buffer protocol from Python3.
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-377/+377
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 79779 via svnmerge fromPhilip Jenvey2010-04-051-1/+1
| | | | | | | | | | 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 72404-72406 via svnmerge fromWalter Dörwald2009-05-061-1/+2
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72404 | walter.doerwald | 2009-05-06 16:28:24 +0200 (Mi, 06 Mai 2009) | 3 lines Issue 3739: The unicode-internal encoder now reports the number of *characters* consumed like any other encoder (instead of the number of bytes). ........ r72406 | walter.doerwald | 2009-05-06 16:32:35 +0200 (Mi, 06 Mai 2009) | 2 lines Add NEWS entry about issue #3739. ........
* Merged revisions ↵Benjamin Peterson2009-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 70342,70385-70387,70389-70390,70392-70393,70395,70400,70405-70406,70418,70438,70464,70468 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70342 | georg.brandl | 2009-03-13 14:03:58 -0500 (Fri, 13 Mar 2009) | 1 line #5486: typos. ........ r70385 | benjamin.peterson | 2009-03-15 09:38:55 -0500 (Sun, 15 Mar 2009) | 1 line fix tuple.index() error message #5495 ........ r70386 | georg.brandl | 2009-03-15 16:32:06 -0500 (Sun, 15 Mar 2009) | 1 line #5496: fix docstring of lookup(). ........ r70387 | georg.brandl | 2009-03-15 16:37:16 -0500 (Sun, 15 Mar 2009) | 1 line #5493: clarify __nonzero__ docs. ........ r70389 | georg.brandl | 2009-03-15 16:43:38 -0500 (Sun, 15 Mar 2009) | 1 line Fix a small nit in the error message if bool() falls back on __len__ and it returns the wrong type: it would tell the user that __nonzero__ should return bool or int. ........ r70390 | georg.brandl | 2009-03-15 16:44:43 -0500 (Sun, 15 Mar 2009) | 1 line #5491: clarify nested() semantics. ........ r70392 | georg.brandl | 2009-03-15 16:46:00 -0500 (Sun, 15 Mar 2009) | 1 line #5488: add missing struct member. ........ r70393 | georg.brandl | 2009-03-15 16:47:42 -0500 (Sun, 15 Mar 2009) | 1 line #5478: fix copy-paste oversight in function signature. ........ r70395 | georg.brandl | 2009-03-15 16:51:48 -0500 (Sun, 15 Mar 2009) | 1 line #5276: document IDLESTARTUP and .Idle.py. ........ r70400 | georg.brandl | 2009-03-15 16:59:37 -0500 (Sun, 15 Mar 2009) | 3 lines Fix markup in re docs and give a mail address in regex howto, so that the recommendation to send suggestions to the author can be followed. ........ r70405 | georg.brandl | 2009-03-15 17:11:07 -0500 (Sun, 15 Mar 2009) | 7 lines Move the previously local import of threading to module level. This is cleaner and avoids lockups in obscure cases where a Queue is instantiated while the import lock is already held by another thread. OKed by Tim Peters. ........ r70406 | hirokazu.yamamoto | 2009-03-15 17:43:14 -0500 (Sun, 15 Mar 2009) | 1 line Added skip for old MSVC. ........ r70418 | georg.brandl | 2009-03-16 14:42:03 -0500 (Mon, 16 Mar 2009) | 1 line Add token markup. ........ r70438 | benjamin.peterson | 2009-03-17 15:29:51 -0500 (Tue, 17 Mar 2009) | 1 line I thought this was begging for an example ........ r70464 | benjamin.peterson | 2009-03-18 15:58:09 -0500 (Wed, 18 Mar 2009) | 1 line a much better example ........ r70468 | benjamin.peterson | 2009-03-18 22:04:31 -0500 (Wed, 18 Mar 2009) | 1 line close files after comparing them ........
* Issue #4874: Most builtin decoders now reject unicode input.Antoine Pitrou2009-01-221-14/+14
|
* merge from trunkBenjamin Peterson2008-10-111-1/+1
|
* Merged revisions 65654 via svnmerge fromMartin v. Löwis2008-08-131-152/+127
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65654 | martin.v.loewis | 2008-08-12 16:49:50 +0200 (Tue, 12 Aug 2008) | 6 lines Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple, by denying s# to parse objects that have a releasebuffer procedure, and introducing s*. More module might need to get converted to use s*. ........
* Implement PEP 3121: new module initialization and finalization API.Martin v. Löwis2008-06-111-2/+14
|
* Renamed PyString to PyBytesChristian Heimes2008-05-261-13/+13
|
* Merged revisions 59056-59076 via svnmerge fromChristian Heimes2007-11-201-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r59064 | christian.heimes | 2007-11-20 02:48:48 +0100 (Tue, 20 Nov 2007) | 1 line Fixed bug #1470 ........ r59066 | martin.v.loewis | 2007-11-20 03:46:02 +0100 (Tue, 20 Nov 2007) | 2 lines Patch #1468: Package Lib/test/*.pem. ........ r59068 | christian.heimes | 2007-11-20 04:21:02 +0100 (Tue, 20 Nov 2007) | 1 line Another fix for test_shutil. Martin pointed out that it breaks some build bots ........ r59073 | nick.coghlan | 2007-11-20 15:55:57 +0100 (Tue, 20 Nov 2007) | 1 line Backport some main.c cleanup from the py3k branch ........ r59076 | amaury.forgeotdarc | 2007-11-21 00:31:27 +0100 (Wed, 21 Nov 2007) | 6 lines The incremental decoder for utf-7 must preserve its state between calls. Solves issue1460. Might not be a backport candidate: a new API function was added, and some code may rely on details in utf-7.py. ........
* Merging the py3k-pep3137 branch back into the py3k branch.Guido van Rossum2007-11-061-10/+9
| | | | | | | | | | | | | | 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.
* Apply SF patch #1775604: This adds three new codecs (utf-32, utf-32-le andWalter Dörwald2007-08-161-0/+204
| | | | | | | | | 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.
* Merged revisions 56443-56466 via svnmerge fromGuido van Rossum2007-07-201-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ................ r56454 | kurt.kaiser | 2007-07-18 22:26:14 -0700 (Wed, 18 Jul 2007) | 2 lines Make relative imports explicit for py3k ................ r56455 | kurt.kaiser | 2007-07-18 23:12:15 -0700 (Wed, 18 Jul 2007) | 2 lines Was modifying dict during iteration. ................ r56457 | guido.van.rossum | 2007-07-19 07:33:19 -0700 (Thu, 19 Jul 2007) | 2 lines Fix failing test. ................ r56466 | guido.van.rossum | 2007-07-19 20:58:16 -0700 (Thu, 19 Jul 2007) | 35 lines Merged revisions 56413-56465 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r56439 | georg.brandl | 2007-07-17 23:37:55 -0700 (Tue, 17 Jul 2007) | 2 lines Use "Unix" as platform name, not "UNIX". ........ r56441 | guido.van.rossum | 2007-07-18 10:19:14 -0700 (Wed, 18 Jul 2007) | 3 lines SF patch# 1755885 by Kurt Kaiser: show location of Unicode escape errors. (Slightly tweaked for style and refcounts.) ........ r56444 | kurt.kaiser | 2007-07-18 12:58:42 -0700 (Wed, 18 Jul 2007) | 2 lines Fix failing unicode test caused by change to ast.c at r56441 ........ r56451 | georg.brandl | 2007-07-18 15:36:53 -0700 (Wed, 18 Jul 2007) | 2 lines Add description for wave.setcomptype() values ........ r56456 | walter.doerwald | 2007-07-19 06:04:38 -0700 (Thu, 19 Jul 2007) | 3 lines Document that codecs.lookup() returns a CodecInfo object. (fixes SF bug #1754453). ........ r56463 | facundo.batista | 2007-07-19 16:57:38 -0700 (Thu, 19 Jul 2007) | 6 lines Added a select.select call in the test server loop to make sure the socket is ready to be read from before attempting a read (this prevents an error 10035 on some Windows platforms). [GSoC - Alan McIntyre] ........ ................
* Change readbuffer_encode() and charbuffer_encode() toWalter Dörwald2007-06-221-8/+4
| | | | return bytes objects.
* Make identifiers str (not str8) objects throughout.Martin v. Löwis2007-06-101-1/+1
| | | | | | | | | | | | | | | | | | | This affects the parser, various object implementations, and all places that put identifiers into C string literals. In testing, a number of crashes occurred as code would fail when the recursion limit was reached (such as the Unicode interning dictionary having key/value pairs where key is not value). To solve these, I added an overflowed flag, which allows for 50 more recursions after the limit was reached and the exception was raised, and a recursion_critical flag, which indicates that recursion absolutely must be allowed, i.e. that a certain call must not cause a stack overflow exception. There are still some places where both str and str8 are accepted as identifiers; these should eventually be removed.