Dong-hee Na
87ec86c425
bpo-37207: Add _PyArg_NoKwnames() helper function (GH-18980)
6 years ago
Victor Stinner
a102ed7d2f
bpo-39573: Use Py_TYPE() macro in Python and Include directories (GH-18391)
Replace direct access to PyObject.ob_type with Py_TYPE().
6 years ago
Sebastian Berg
75bb07e92b
bpo-39028: Performance enhancement in keyword extraction (GH-17576)
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.
6 years ago
Serhiy Storchaka
5bc6a7c06e
bpo-38540: Fix possible leak in PyArg_Parse for "es#" and "et#". (GH-16869)
6 years ago
Vinay Sajip
0b60f64e43
bpo-11410: Standardize and use symbol visibility attributes across POSIX and Windows. (GH-16347)
6 years ago
Jordon Xu
2ec7010206
bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095)
6 years ago
Rémi Lapeyre
4901fe274b
bpo-37034: Display argument name on errors with keyword arguments with Argument Clinic. (GH-13593)
6 years ago
Raymond Hettinger
aef9ad82f7
bpo-37942: Improve argument clinic float converter (GH-15470)
6 years ago
Jeroen Demeyer
0567786d26
bpo-37540: vectorcall: keyword names must be strings (GH-14682)
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
6 years ago
Inada Naoki
d3c72a223a
bpo-36381: warn when no PY_SSIZE_T_CLEAN defined (GH-12473)
We will remove int support from 3.10 or 4.0.
7 years ago
Serhiy Storchaka
1b0393d5b7
bpo-36127: Fix compiler warning in _PyArg_UnpackKeywords(). (GH-12353)
7 years ago
Serhiy Storchaka
3191391515
bpo-36127: Argument Clinic: inline parsing code for keyword parameters. (GH-12058)
7 years ago
Serhiy Storchaka
2c0d3f4547
bpo-36254: Fix yet one invalid use of %d in format string in C. (GH-12318)
7 years ago
Serhiy Storchaka
f2f55e7f03
bpo-36282: Improved error message for too much positional arguments. (GH-12310)
7 years ago
Serhiy Storchaka
d53fe5f407
bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264)
7 years ago
Serhiy Storchaka
a24107b04c
bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112)
7 years ago
Serhiy Storchaka
6a44f6eef3
bpo-36048: Use __index__() instead of __int__() for implicit conversion if available. (GH-11952)
Deprecate using the __int__() method in implicit conversions of Python
numbers to C integers.
7 years ago
Serhiy Storchaka
4fa9591025
bpo-35582: Argument Clinic: inline parsing code for positional parameters. (GH-11313)
7 years ago
Serhiy Storchaka
32d96a2b5b
bpo-23867: Argument Clinic: inline parsing code for a single positional parameter. (GH-9689)
7 years ago
Xtreak
6326278e8a
bpo-34193: Fix pluralization in getargs.c and test cases. (GH-8438)
7 years ago
Victor Stinner
ec13b9322d
bpo-35081: Add Include/internal/pycore_tupleobject.h (GH-10705)
Move _PyTuple_ITEMS() to a new header file:
Include/internal/pycore_tupleobject.h
7 years ago
Victor Stinner
d17a693fa0
bpo-35199: Add an internal _PyTuple_ITEMS() macro (GH-10434)
* _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].
7 years ago
Xtreak
1426daa4fe
bpo-34127: Fix grammar in error message with respect to argument count (GH-8395)
8 years ago
Serhiy Storchaka
504373c59b
bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192)
8 years ago
Leo Arias
c3d9508ff2
bpo-32746: Fix multiple typos (GH-5144)
Fix typos found by codespell in docs, docstrings, and comments.
8 years ago
Serhiy Storchaka
a5552f023e
bpo-32240: Add the const qualifier to declarations of PyObject* array arguments. ( #4746 )
8 years ago
Benjamin Peterson
2bb69a5b4e
bpo-31373: remove overly strict float range checks ( #3486 )
This undoes a853a8ba78 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.
8 years ago
Benjamin Peterson
a853a8ba78
bpo-31373: fix undefined floating-point demotions ( #3396 )
8 years ago
Oren Milman
bf9075a0c5
bpo-31229: Fixed wrong error messages when too many keyword arguments are received. ( #3180 )
8 years ago
Stefan Krah
f432a3234f
bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. ( #3157 )
8 years ago
Segev Finer
e7bc7aac3d
bpo-9566: Fix a warning in Python/getargs.c ( #2890 )
9 years ago
Serhiy Storchaka
7e60192fe0
Remove _PyArg_NoStackKeywords(). ( #2641 )
9 years ago
Serhiy Storchaka
f9f1ccace3
Fix regression in error message introduced in bpo-29951. ( #2028 )
* Fix regression in error message introduced in bpo-29951.
* Add test.
* Make the test more strong.
9 years ago
Serhiy Storchaka
5eb788bf7f
bpo-30534: Fixed error messages when pass keyword arguments ( #1901 )
to functions implemented in C that don't support this.
Also unified error messages for functions that don't take positional or keyword
arguments.
9 years ago
Michael Seifert
64c8f705c0
bpo-29951: Include function name for some error messages in `PyArg_ParseTuple*` ( #916 )
Also changed format specifier for function name from "%s" to "%.200s"
and exception messages should start with lowercase letter.
9 years ago
Serhiy Storchaka
68a001dd59
Issue #29460 : _PyArg_NoKeywords(), _PyArg_NoStackKeywords() and
_PyArg_NoPositional() now are macros.
9 years ago
Victor Stinner
fdbc397f4d
Issue #29286 : Rename private PyArg_UnpackStack_impl() to unpack_stack()
Rename also "l" argument to "nargs".
9 years ago
Serhiy Storchaka
1741441649
Issue #29029 : Speed up processing positional arguments in
PyArg_ParseTupleAndKeywords(), _PyArg_ParseTupleAndKeywordsFast() and like.
9 years ago
Victor Stinner
fe54dd8a08
Add _PyArg_UnpackStack() function helper
Issue #29286 .
9 years ago
Victor Stinner
29d39cc8f5
Add _PyArg_NoStackKeywords() helper function
Issue #29286 . Similar to _PyArg_NoKeywords(), but expects a tuple of keyword
names, instead of a dict.
9 years ago
Victor Stinner
6518a93cb1
Add _PyArg_ParseStack() helper function
Issue #29286 . Function similar to PyArg_ParseTuple(), but uses a C array of
PyObject* to pass arguments. Don't support the compatibility mode.
9 years ago
Victor Stinner
3e1fad6913
Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywords
Issue #29286 .
9 years ago
Victor Stinner
c0083fc47d
Rename keywords to kwargs in getargs.c
Issue #29029 . Patch written by Serhiy Storchaka.
9 years ago
Victor Stinner
80ab22fa2c
Cleanup getargs.c
Factorize argument checks in:
* vgetargskeywordsfast()
* vgetargskeywordsfast_impl()
9 years ago
Serhiy Storchaka
5ab81d787f
Issue #28959 : Added private macro PyDict_GET_SIZE for retrieving the size of dict.
9 years ago
Serhiy Storchaka
460bd0d284
Issue #19569 : Compiler warnings are now emitted if use most of deprecated
functions.
9 years ago
Serhiy Storchaka
85b0f5beb1
Added the const qualifier to char* variables that refer to readonly internal
UTF-8 represenatation of Unicode objects.
9 years ago
Serhiy Storchaka
f4934ea77d
Issue #28701 : Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
9 years ago
Christian Heimes
2f2fee19ec
va_end() all va_copy()ed va_lists.
9 years ago
Benjamin Peterson
0c21214f3e
replace usage of Py_VA_COPY with the (C99) standard va_copy
9 years ago