summaryrefslogtreecommitdiffstats
path: root/Modules/_csv.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-20028: Empty escapechar/quotechar is not allowed for csv.Dialect (GH-28833)Dong-hee Na2021-10-111-9/+4
|
* bpo-27580: Add support of null characters in the csv module. (GH-28808)Serhiy Storchaka2021-10-091-33/+30
|
* bpo-20028: Keep original exception when PyUnicode_GetLength return -1 (GH-28832)Dong-hee Na2021-10-091-0/+6
|
* bpo-20028: Improve error message of csv.Dialect when initializing (GH-28705)Dong-hee Na2021-10-091-8/+38
|
* Fix typos in the Modules directory (GH-28761)Christian Clauss2021-10-071-1/+1
|
* bpo-44630: Fix assertion errors in csv module (GH-27127)T. Wouters2021-07-131-4/+8
| | | | | | | | | | | | | Fix incorrect handling of exceptions when interpreting dialect objects in the csv module. Not clearing exceptions between calls to PyObject_GetAttrString() causes assertion failures in pydebug mode (or with assertions enabled). Add a minimal test that would've caught this (passing None as dialect, or any object that isn't a csv.Dialect subclass, which the csv module allows and caters to, even though it is not documented.) In pydebug mode, the test triggers the assertion failure in the old code. Contributed-By: T. Wouters [Google]
* bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351)Erlend Egeberg Aasland2021-06-171-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make functools types immutable * Multibyte codec types are now immutable * pyexpat.xmlparser is now immutable * array.arrayiterator is now immutable * _thread types are now immutable * _csv types are now immutable * _queue.SimpleQueue is now immutable * mmap.mmap is now immutable * unicodedata.UCD is now immutable * sqlite3 types are now immutable * _lsprof.Profiler is now immutable * _overlapped.Overlapped is now immutable * _operator types are now immutable * winapi__overlapped.Overlapped is now immutable * _lzma types are now immutable * _bz2 types are now immutable * _dbm.dbm and _gdbm.gdbm are now immutable
* bpo-44116: Add GC support to _csv heap types (GH-26074)Erlend Egeberg Aasland2021-05-121-30/+32
|
* bpo-44089: Allow subclassing of ``csv.Error`` (GH-26008)Ken Jin2021-05-121-1/+1
| | | | | * fix subclass error * Update 2021-05-09-22-52-34.bpo-44089.IoANsN.rst
* bpo-14935: Remove static state from the _csv module (GH-23224)Petr Viktorin2020-12-151-241/+303
| | | | | | | | Uses code from: https://github.com/python/cpython/pull/16078 Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com> Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com> Co-authored-by: Hai Shi <shihai1992@gmail.com>
* bpo-12178: Fix escaping of escapechar in csv.writer() (GH-13710)Berker Peksag2020-09-201-0/+3
| | | Co-authored-by: Itay Elbirt <anotahacou@gmail.com>
* bpo-26407: Do not mask errors in csv. (GH-20536)Serhiy Storchaka2020-06-221-8/+8
| | | | | Unexpected errors in calling the __iter__ method are no longer masked by TypeError in csv.reader(), csv.writer.writerow() and csv.writer.writerows().
* Remove usesless function from csv module (GH-20762)Dong-hee Na2020-06-091-8/+2
|
* bpo-40876: Clarify error message in the csv module (GH-20653)Ram Rachum2020-06-051-1/+1
|
* Remove unused ReaderObject_Check macro (#20614)Dong-hee Na2020-06-031-2/+0
|
* bpo-40268: Remove unused structmember.h includes (GH-19530)Victor Stinner2020-04-151-1/+1
| | | | | | If only offsetof() is needed: include stddef.h instead. When structmember.h is used, add a comment explaining that PyMemberDef is used.
* bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode ↵Serhiy Storchaka2020-04-111-4/+4
| | | | data. (GH-19345)
* bpo-40024: Update C extension modules to use PyModule_AddType() (GH-19119)Dong-hee Na2020-03-241-6/+2
| | | | | | Update _asyncio, _bz2, _csv, _curses, _datetime, _io, _operator, _pickle, _queue, blake2, multibytecodec and overlapped C extension modules to use PyModule_AddType().
* bpo-39968: Convert extension modules' macros of get_module_state() to inline ↵Hai Shi2020-03-161-14/+20
| | | | functions (GH-19017)
* bpo-39573: Clean up modules and headers to use Py_IS_TYPE() function (GH-18521)Dong-hee Na2020-02-171-1/+1
|
* bpo-39245: Switch to public API for Vectorcall (GH-18460)Petr Viktorin2020-02-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bulk of this patch was generated automatically with: for name in \ PyObject_Vectorcall \ Py_TPFLAGS_HAVE_VECTORCALL \ PyObject_VectorcallMethod \ PyVectorcall_Function \ PyObject_CallOneArg \ PyObject_CallMethodNoArgs \ PyObject_CallMethodOneArg \ ; do echo $name git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g" done old=_PyObject_FastCallDict new=PyObject_VectorcallDict git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g" and then cleaned up: - Revert changes to in docs & news - Revert changes to backcompat defines in headers - Nudge misaligned comments
* bpo-39573: Use Py_TYPE() macro in Modules directory (GH-18393)Victor Stinner2020-02-071-3/+3
| | | Replace direct access to PyObject.ob_type with Py_TYPE().
* bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630)Serhiy Storchaka2019-09-011-1/+4
| | | Only AttributeError should be silenced.
* bpo-37483: add _PyObject_CallOneArg() function (#14558)Jeroen Demeyer2019-07-041-1/+1
|
* Fix name of '\0'. (GH-14222)Benjamin Peterson2019-06-191-1/+1
| | | '\0' is the NUL byte not NULL.
* bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-311-6/+6
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* Change WriterObj.writeline to WriterObj.write (GH-12344)Rémi Lapeyre2019-05-141-10/+12
| | | This cleans the csv module a bit, I don't think it requires a bpo issue or a news entry.
* bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112)Serhiy Storchaka2019-02-251-3/+7
|
* bpo-33029: Fix signatures of getter and setter functions. (GH-10746)Serhiy Storchaka2018-11-271-5/+5
| | | Fix also return type for few other functions (clear, releasebuffer).
* bpo-33012: Fix invalid function cast warnings with gcc 8. (GH-6749)Serhiy Storchaka2018-11-271-3/+3
| | | | | | Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS excluding Argument Clinic generated code.
* bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Resize(). ↵Sergey Fedoseev2018-08-161-36/+15
| | | | (GH-8756)
* bpo-34197: Make _csv.Dialect attributes booleans. (GH-8440)Serhiy Storchaka2018-07-261-15/+16
| | | | Attributes skipinitialspace, doublequote and strict are now booleans instead of integers 0 or 1.
* bpo-32747: Remove trailing spaces in docstrings. (GH-5491)oldk2018-02-021-4/+4
|
* bpo-32255: Always quote a single empty field when write into a CSV file. (#4769)Licht Takeuchi2017-12-121-1/+1
| | | This allows to distinguish an empty row from a row consisting of a single empty field.
* Use NULL rather than 0. (#778)Serhiy Storchaka2017-03-231-8/+8
| | | | | There was few cases of using literal 0 instead of NULL in the context of pointers. While this was a legitimate C code, using NULL rather than 0 makes the code clearer.
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-8/+4
| | | | possible. Patch is writen with Coccinelle.
* Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-1/+1
| | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
* Replace PyObject_CallFunctionObjArgs() with fastcallVictor Stinner2016-12-011-1/+1
| | | | | | | | | | | | | | * PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func) * PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg) PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires extra work to "parse" C arguments to build a C array of PyObject*. _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. This change is part of the fastcall project. The change on listsort() is related to the issue #23507.
* _csv: use _PyLong_AsInt()Victor Stinner2016-10-191-10/+4
|
* Issue #27809: _csv: _call_dialect() uses fast callVictor Stinner2016-08-221-9/+7
|
* merge 3.5 (closes #27758)Benjamin Peterson2016-08-141-4/+19
|\
| * merge 3.4 (closes #27758)Benjamin Peterson2016-08-141-4/+19
| |\
| | * merge 3.3 (#27758)Benjamin Peterson2016-08-141-4/+19
| | |\
| | | * check for overflow in join_append_data (closes #27758)Benjamin Peterson2016-08-141-4/+19
| | | | | | | | | | | | | | | | Reported by Thomas E. Hybel
* | | | Issue #26778: Fixed "a/an/and" typos in code comment, documentation and errorSerhiy Storchaka2016-04-171-1/+1
|\ \ \ \ | |/ / / | | | | | | | | messages.
| * | | Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
| | | |
* | | | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-2/+2
|\ \ \ \ | |/ / /
| * | | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-2/+2
| | | |
* | | | Issue #25923: Added the const qualifier to static constant arrays.Serhiy Storchaka2015-12-251-4/+4
|/ / /
* | | Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-4/+2
| | | | | | | | | | | | macro Py_SETREF.