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
Benjamin Peterson
4eef505064
Backed out changeset 3934e070c9db
9 years ago
Victor Stinner
c7454ff5fc
Issue #27810 : Fix getargs.c compilation on Windows
9 years ago
Benjamin Peterson
819a46f33a
fix export of size_t parse stack function
9 years ago
Victor Stinner
f0ccbbbc57
Emit METH_FASTCALL code in Argument Clinic
Issue #27810 :
* Modify vgetargskeywordsfast() to work on a C array of PyObject* rather than
working on a tuple directly.
* Add _PyArg_ParseStack()
* Argument Clinic now emits code using the new METH_FASTCALL calling convention
9 years ago
Victor Stinner
a9efb2f56e
Add METH_FASTCALL calling convention
Issue #27810 : Add a new calling convention for C functions:
PyObject* func(PyObject *self, PyObject **args,
Py_ssize_t nargs, PyObject *kwnames);
Where args is a C array of positional arguments followed by values of keyword
arguments. nargs is the number of positional arguments, kwnames are keys of
keyword arguments. kwnames can be NULL.
9 years ago
Benjamin Peterson
af580dff4a
replace PY_LONG_LONG with long long
9 years ago
Benjamin Peterson
ed4aa83ff7
require a long long data type ( closes #27961 )
9 years ago
Serhiy Storchaka
9171a8b4ce
Issue #27574 : Decreased an overhead of parsing keyword arguments in functions
implemented with using Argument Clinic.
10 years ago
Serhiy Storchaka
f41b82fb19
Issue #26282 : PyArg_ParseTupleAndKeywords() and Argument Clinic now support
positional-only and keyword parameters in the same function.
10 years ago
Serhiy Storchaka
21a663ea28
Issue #26057 : Got rid of nonneeded use of PyUnicode_FromObject().
10 years ago
Raymond Hettinger
942302371c
Minor code cleanup for PyArg_UnpackTuple.
10 years ago
Serhiy Storchaka
a9725f86a9
Issue #26312 : SystemError is now raised in all programming bugs with using
PyArg_ParseTupleAndKeywords(). RuntimeError did raised before in some
programming bugs.
10 years ago
Serhiy Storchaka
4cd63ef67a
Issue #26198 : ValueError is now raised instead of TypeError on buffer
overflow in parsing "es#" and "et#" format units. SystemError is now raised
instead of TypeError on programmical error in parsing format string.
10 years ago
Serhiy Storchaka
c4b813d05d
Issue #26198 : Fixed error messages for some argument parsing errors.
Fixed the documented about buffer overflow error for "es#" and "et#" format
units.
10 years ago
Serhiy Storchaka
ef1585eb9a
Issue #25923 : Added more const qualifiers to signatures of static and private functions.
10 years ago
Serhiy Storchaka
d6e53dab86
Fixed error message for the "u#" format code.
11 years ago
Serhiy Storchaka
b757c83ec6
Issue #22581 : Use more "bytes-like object" throughout the docs and comments.
11 years ago
R David Murray
861470c836
#16518 : Bring error messages in harmony with docs ("bytes-like object")
Some time ago we changed the docs to consistently use the term 'bytes-like
object' in all the contexts where bytes, bytearray, memoryview, etc are used.
This patch (by Ezio Melotti) completes that work by changing the error
messages that previously reported that certain types did "not support the
buffer interface" to instead say that a bytes-like object is required. (The
glossary entry for bytes-like object references the discussion of the buffer
protocol in the docs.)
11 years ago
Serhiy Storchaka
d8a1447c99
Issue #22215 : Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
11 years ago
Victor Stinner
98ea54c35c
Issue #22156 : Fix "comparison between signed and unsigned integers" compiler
warnings in the Python/ subdirectory.
12 years ago
Benjamin Peterson
40be9e5100
remove dynamic initializer lists for c89 compliance ( closes #20595 )
12 years ago
Larry Hastings
b7ccb20423
Issue #20294 : Argument Clinic now supports argument parsing for __new__ and
__init__ functions.
12 years ago