Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-99300: Use Py_NewRef() in Python/ directory (#99302) | Victor Stinner | 2022-11-10 | 1 | -4/+2 |
| | | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in C files of the Python/ directory. | ||||
* | GH-95909: Make `_PyArg_Parser` initialization thread safe (GH-95958) | Kumar Aditya | 2022-08-16 | 1 | -6/+23 |
| | |||||
* | gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code ↵ | Eric Snow | 2022-08-11 | 1 | -81/+149 |
| | | | | | | | | | | | | | | | | (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). | ||||
* | gh-94938: Fix errror detection of unexpected keyword arguments (GH-94999) | Serhiy Storchaka | 2022-07-28 | 1 | -85/+57 |
| | | | | | | | | | | When keyword argument name is an instance of a str subclass with overloaded methods __eq__ and __hash__, the former code could not find the name of an extraneous keyword argument to report an error, and _PyArg_UnpackKeywords() returned success without setting the corresponding cell in the linearized arguments array. But since the number of expected initialized cells is determined as the total number of passed arguments, this lead to reading NULL as a keyword parameter value, that caused SystemError or crash or other undesired behavior. | ||||
* | gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931) | Serhiy Storchaka | 2022-07-18 | 1 | -3/+1 |
| | |||||
* | GH-93207: Remove HAVE_STDARG_PROTOTYPES configure check for stdarg.h (#93215) | Kumar Aditya | 2022-05-27 | 1 | -8/+0 |
| | |||||
* | gh-92536: PEP 623: Remove wstr and legacy APIs from Unicode (GH-92537) | Inada Naoki | 2022-05-12 | 1 | -54/+0 |
| | |||||
* | bpo-45316: Move _PyArg_Fini() to internal C API (GH-31580) | Victor Stinner | 2022-02-25 | 1 | -0/+1 |
| | | | | Move the private unexported _PyArg_Fini() function to the internal C API: to the pycore_pylifecycle.h header file. | ||||
* | bpo-20291: Fix MSVC warnings in getargs.c (GH-27211) | Ken Jin | 2021-07-17 | 1 | -1/+2 |
| | | | | | | | | | * Fix MSVC warnings in getargs.c * apply suggestions Co-Authored-By: Batuhan Taskaya <batuhan@python.org> Co-authored-by: Batuhan Taskaya <batuhan@python.org> | ||||
* | bpo-20201: variadic arguments support for AC (GH-18609) | Batuhan Taskaya | 2021-07-16 | 1 | -0/+160 |
| | | | Implement support for `*args` in AC, and port `print()` to use it. | ||||
* | bpo-40943: Fix skipitem() didn't raise SystemError (GH-25937) | Inada Naoki | 2021-05-07 | 1 | -8/+5 |
| | | | | `convertitem()` raises `SystemError` when '#' is used without `PY_SSIZE_T_CLEAN`. This commit makes `skipitem()` raise it too. | ||||
* | bpo-43321: Fix SystemError in getargs.c (GH-24656) | Inada Naoki | 2021-02-27 | 1 | -2/+2 |
| | |||||
* | bpo-36346: Emit DeprecationWarning for PyArg_Parse() with 'u' or 'Z'. (GH-20927) | Inada Naoki | 2021-02-22 | 1 | -1/+4 |
| | | | | | Emit DeprecationWarning when PyArg_Parse*() is called with 'u', 'Z' format. See PEP 623. | ||||
* | bpo-42519: Replace PyMem_MALLOC() with PyMem_Malloc() (GH-23586) | Victor Stinner | 2020-12-01 | 1 | -2/+2 |
| | | | | | | | | | | | No longer use deprecated aliases to functions: * Replace PyMem_MALLOC() with PyMem_Malloc() * Replace PyMem_REALLOC() with PyMem_Realloc() * Replace PyMem_FREE() with PyMem_Free() * Replace PyMem_Del() with PyMem_Free() * Replace PyMem_DEL() with PyMem_Free() Modify also the PyMem_DEL() macro to use directly PyMem_Free(). | ||||
* | bpo-41078: Rename pycore_tupleobject.h to pycore_tuple.h (GH-21056) | Victor Stinner | 2020-06-22 | 1 | -1/+1 |
| | |||||
* | bpo-40943: PY_SSIZE_T_CLEAN required for '#' formats (GH-20784) | Victor Stinner | 2020-06-19 | 1 | -62/+27 |
| | | | | | | | The PY_SSIZE_T_CLEAN macro must now be defined to use PyArg_ParseTuple() and Py_BuildValue() "#" formats: "es#", "et#", "s#", "u#", "y#", "z#", "U#" and "Z#". See the PEP 353. Update _testcapi.test_buildvalue_issue38913(). | ||||
* | bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878) | Inada Naoki | 2020-06-17 | 1 | -0/+4 |
| | | | | Co-authored-by: Kyle Stanley <aeros167@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> | ||||
* | bpo-40943: Replace PY_FORMAT_SIZE_T with "z" (GH-20781) | Victor Stinner | 2020-06-10 | 1 | -4/+3 |
| | | | | | | | The PEP 353, written in 2005, introduced PY_FORMAT_SIZE_T. Python no longer supports macOS 10.4 and Visual Studio 2010, but requires more recent macOS and Visual Studio versions. In 2020 with Python 3.10, it is now safe to use directly "%zu" to format size_t and "%zi" to format Py_ssize_t. | ||||
* | bpo-40792: Make the result of PyNumber_Index() always having exact type int. ↵ | Serhiy Storchaka | 2020-05-28 | 1 | -1/+1 |
| | | | | | | | | | | | | (GH-20443) Previously, the result could have been an instance of a subclass of int. Also revert bpo-26202 and make attributes start, stop and step of the range object having exact type int. Add private function _PyNumber_Index() which preserves the old behavior of PyNumber_Index() for performance to use it in the conversion functions like PyLong_AsLong(). | ||||
* | bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636) | Serhiy Storchaka | 2020-05-26 | 1 | -54/+12 |
| | | | | Only __index__ should be used to make integer conversions lossless. | ||||
* | bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode ↵ | Serhiy Storchaka | 2020-04-11 | 1 | -1/+1 |
| | | | | data. (GH-19345) | ||||
* | bpo-37207: Add _PyArg_NoKwnames() helper function (GH-18980) | Dong-hee Na | 2020-03-16 | 1 | -1/+18 |
| | |||||
* | bpo-39573: Use Py_TYPE() macro in Python and Include directories (GH-18391) | Victor Stinner | 2020-02-07 | 1 | -4/+4 |
| | | | Replace direct access to PyObject.ob_type with Py_TYPE(). | ||||
* | bpo-39028: Performance enhancement in keyword extraction (GH-17576) | Sebastian Berg | 2019-12-18 | 1 | -3/+7 |
| | | | | | | | | All keywords should first be checked for pointer identity. Only after that failed for all keywords (unlikely) should unicode equality be used. The original code would call unicode equality on any non-matching keyword argument. Meaning calling it often e.g. when a function has many kwargs but only the last one is provided. | ||||
* | bpo-38540: Fix possible leak in PyArg_Parse for "es#" and "et#". (GH-16869) | Serhiy Storchaka | 2019-10-21 | 1 | -2/+26 |
| | |||||
* | bpo-11410: Standardize and use symbol visibility attributes across POSIX and ↵ | Vinay Sajip | 2019-10-15 | 1 | -12/+12 |
| | | | | Windows. (GH-16347) | ||||
* | bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095) | Jordon Xu | 2019-09-10 | 1 | -3/+3 |
| | |||||
* | bpo-37034: Display argument name on errors with keyword arguments with ↵ | Rémi Lapeyre | 2019-08-29 | 1 | -14/+8 |
| | | | | Argument Clinic. (GH-13593) | ||||
* | bpo-37942: Improve argument clinic float converter (GH-15470) | Raymond Hettinger | 2019-08-25 | 1 | -2/+2 |
| | |||||
* | bpo-37540: vectorcall: keyword names must be strings (GH-14682) | Jeroen Demeyer | 2019-08-16 | 1 | -17/+3 |
| | | | | | | | | The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon @vstinner https://bugs.python.org/issue37540 | ||||
* | bpo-36381: warn when no PY_SSIZE_T_CLEAN defined (GH-12473) | Inada Naoki | 2019-03-23 | 1 | -2/+13 |
| | | | We will remove int support from 3.10 or 4.0. | ||||
* | bpo-36127: Fix compiler warning in _PyArg_UnpackKeywords(). (GH-12353) | Serhiy Storchaka | 2019-03-16 | 1 | -1/+1 |
| | |||||
* | bpo-36127: Argument Clinic: inline parsing code for keyword parameters. ↵ | Serhiy Storchaka | 2019-03-14 | 1 | -55/+265 |
| | | | | (GH-12058) | ||||
* | bpo-36254: Fix yet one invalid use of %d in format string in C. (GH-12318) | Serhiy Storchaka | 2019-03-14 | 1 | -1/+1 |
| | |||||
* | bpo-36282: Improved error message for too much positional arguments. (GH-12310) | Serhiy Storchaka | 2019-03-13 | 1 | -1/+1 |
| | |||||
* | bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264) | Serhiy Storchaka | 2019-03-13 | 1 | -5/+5 |
| | |||||
* | bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112) | Serhiy Storchaka | 2019-02-25 | 1 | -10/+31 |
| | |||||
* | bpo-36048: Use __index__() instead of __int__() for implicit conversion if ↵ | Serhiy Storchaka | 2019-02-25 | 1 | -1/+3 |
| | | | | | | available. (GH-11952) Deprecate using the __int__() method in implicit conversions of Python numbers to C integers. | ||||
* | bpo-35582: Argument Clinic: inline parsing code for positional parameters. ↵ | Serhiy Storchaka | 2019-01-11 | 1 | -10/+33 |
| | | | | (GH-11313) | ||||
* | bpo-23867: Argument Clinic: inline parsing code for a single positional ↵ | Serhiy Storchaka | 2018-12-25 | 1 | -0/+8 |
| | | | | parameter. (GH-9689) | ||||
* | bpo-34193: Fix pluralization in getargs.c and test cases. (GH-8438) | Xtreak | 2018-12-21 | 1 | -14/+24 |
| | |||||
* | bpo-35081: Add Include/internal/pycore_tupleobject.h (GH-10705) | Victor Stinner | 2018-11-25 | 1 | -0/+1 |
| | | | | Move _PyTuple_ITEMS() to a new header file: Include/internal/pycore_tupleobject.h | ||||
* | bpo-35199: Add an internal _PyTuple_ITEMS() macro (GH-10434) | Victor Stinner | 2018-11-09 | 1 | -3/+3 |
| | | | | | | | * _PyTuple_ITEMS() gives access to the tuple->ob_item field and cast the first argument to PyTupleObject*. This internal macro is only usable if Py_BUILD_CORE is defined. * Replace &PyTuple_GET_ITEM(ob, 0) with _PyTuple_ITEMS(ob). * Replace PyTuple_GET_ITEM(op, 1) with &_PyTuple_ITEMS(ob)[1]. | ||||
* | bpo-34127: Fix grammar in error message with respect to argument count (GH-8395) | Xtreak | 2018-07-22 | 1 | -4/+4 |
| | |||||
* | bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192) | Serhiy Storchaka | 2018-07-11 | 1 | -1/+3 |
| | |||||
* | bpo-32746: Fix multiple typos (GH-5144) | Leo Arias | 2018-02-04 | 1 | -2/+2 |
| | | | Fix typos found by codespell in docs, docstrings, and comments. | ||||
* | bpo-32240: Add the const qualifier to declarations of PyObject* array ↵ | Serhiy Storchaka | 2017-12-15 | 1 | -14/+15 |
| | | | | arguments. (#4746) | ||||
* | bpo-31373: remove overly strict float range checks (#3486) | Benjamin Peterson | 2017-09-11 | 1 | -4/+0 |
| | | | | | This undoes a853a8ba7850381d49b284295dd6f0dc491dbe44 except for the pytime.c parts. We want to continue to allow IEEE 754 doubles larger than FLT_MAX to be rounded into finite floats. Tests were added to very this behavior. | ||||
* | bpo-31373: fix undefined floating-point demotions (#3396) | Benjamin Peterson | 2017-09-07 | 1 | -0/+5 |
| | |||||
* | bpo-31229: Fixed wrong error messages when too many keyword arguments are ↵ | Oren Milman | 2017-08-23 | 1 | -2/+8 |
| | | | | received. (#3180) |