summaryrefslogtreecommitdiffstats
path: root/Modules/_codecsmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code ↵Eric Snow2022-08-111-0/+1
| | | | | | | | | | | | | | | | (gh-95860) We only statically initialize for core code and builtin modules. Extension modules still create the tuple at runtime. We'll solve that part of interpreter isolation separately. This change includes generated code. The non-generated changes are in: * Tools/clinic/clinic.py * Python/getargs.c * Include/cpython/modsupport.h * Makefile.pre.in (re-generate global strings after running clinic) * very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c All other changes are generated code (clinic, global strings).
* bpo-45467: Fix IncrementalDecoder and StreamReader in the ↵Serhiy Storchaka2021-10-141-5/+8
| | | | | | | | | "raw-unicode-escape" codec (GH-28944) They support now splitting escape sequences between input chunks. Add the third parameter "final" in codecs.raw_unicode_escape_decode(). It is True by default to match the former behavior.
* bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" ↵Serhiy Storchaka2021-10-141-5/+8
| | | | | | | | | codec (GH-28939) They support now splitting escape sequences between input chunks. Add the third parameter "final" in codecs.unicode_escape_decode(). It is True by default to match the former behavior.
* bpo-41919, test_codecs: Move codecs.register calls to setUp() (GH-22513)Hai Shi2020-10-161-20/+0
| | | | * Move the codecs' (un)register operation to testcases. * Remove _codecs._forget_codec() and _PyCodec_Forget()
* bpo-41842: Add codecs.unregister() function (GH-22360)Hai Shi2020-09-281-0/+22
| | | | Add codecs.unregister() and PyCodec_Unregister() functions to unregister a codec search function.
* bpo-1635741: Port _codecs extension module to multiphase initialization (PEP ↵Hai Shi2020-02-111-3/+7
| | | | | 489) (GH-18065) https://bugs.python.org/issue1635741
* bpo-37206: Unrepresentable default values no longer represented as None. ↵Serhiy Storchaka2019-09-141-76/+76
| | | | | | | (GH-13933) In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values (like in the optional third parameter of getattr). "None" should be used if None is accepted as argument and passing None has the same effect as not passing the argument at all.
* bpo-36297: remove "unicode_internal" codec (GH-12342)Inada Naoki2019-03-181-81/+1
|
* 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*. ........