Serhiy Storchaka
279f44678c
bpo-37206: Unrepresentable default values no longer represented as None. (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.
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
Tim Hoffmann
5df4025f42
Add description to the command line help of the argument clinic (GH-8518)
7 years ago
Serhiy Storchaka
3191391515
bpo-36127: Argument Clinic: inline parsing code for keyword parameters. (GH-12058)
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
animalize
463572c8be
bpo-36101: remove non-ascii characters in docstring (GH-12018)
* remove non-ascii characters in docstring
* clinic.py emits a warning when docstring has non-ascii character
7 years ago
Serhiy Storchaka
2a39d251f0
bpo-35582: Argument Clinic: Optimize the "all boring objects" case. (GH-11520)
Use _PyArg_CheckPositional() and inlined code instead of
PyArg_UnpackTuple() and _PyArg_UnpackStack() if all parameters
are positional and use the "object" converter.
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
Serhiy Storchaka
65ce60aef1
bpo-20180: Simplify char_converter in Argument Clinic. (GH-9828)
Fix also handling non-ascii default values.
7 years ago
Serhiy Storchaka
4db62e1158
bpo-35490: Remove the DecodeFSDefault return converter in AC. ( #11152 )
7 years ago
Serhiy Storchaka
afb3e71a17
bpo-35489: Use "const Py_UNICODE *" for the Py_UNICODE converter in AC. (GH-11150)
7 years ago
Serhiy Storchaka
4a934d490f
bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. (GH-6748)
Fix invalid function cast warnings with gcc 8
for method conventions different from METH_NOARGS, METH_O and
METH_VARARGS in Argument Clinic generated code.
7 years ago
Serhiy Storchaka
3f22811fef
bpo-32892: Use ast.Constant instead of specific constant AST types. (GH-9445)
7 years ago
Raymond Hettinger
1401018da1
Remove wording that could be deemed to be perjorative (GH-9287)
7 years ago
Victor Stinner
65fc98e7b1
bpo-26901: Fix the Argument Clinic test suite (GH-8879)
* Fix Tools/clinic/clinic_test.py: add missing
FakeClinic.destination_buffers attribute and pass a file argument
to Clinic().
* Rename Tools/clinic/clinic_test.py to Lib/test/test_clinic.py:
add temporary Tools/clinic/ to sys.path to import the clinic
module.
Co-Authored-By: Pablo Galindo <pablogsal@gmail.com>
7 years ago
Serhiy Storchaka
7cb7bcff20
bpo-20260: Implement non-bitwise unsigned int converters for Argument Clinic. (GH-8434)
8 years ago
Tal Einat
c929df3b96
bpo-20180: complete AC conversion of Objects/stringlib/transmogrify.h (GH-8039)
* converted bytes methods: expandtabs, ljust, rjust, center, zfill
* updated char_convertor to properly set the C default value
8 years ago
Serhiy Storchaka
a5552f023e
bpo-32240: Add the const qualifier to declarations of PyObject* array arguments. ( #4746 )
8 years ago
Tal Einat
4f57409a2f
bpo-31926: fix missing *_METHODDEF statements by argument clinic ( #4230 )
When a single .c file contains several functions and/or methods with
the same name, a safety _METHODDEF #define statement is generated
only for one of them.
This fixes the bug by using the full name of the function to avoid
duplicates rather than just the name.
8 years ago
Serhiy Storchaka
6969eaf468
bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make ( #1955 )
the bare METH_FASTCALL be used for functions with positional-only
parameters.
9 years ago
Sylvain
7445381c60
bpo-30600: Fix error messages (condition order in Argument Clinic) ( #2051 )
The function '_PyArg_ParseStack()' and
'_PyArg_UnpackStack' were failing (with error
"XXX() takes Y argument (Z given)") before
the function '_PyArg_NoStackKeywords()' was called.
Thus, the latter did not raise its more meaningful
error : "XXX() takes no keyword arguments".
9 years ago
Gregory P. Smith
178418ad67
bpo-30492: Allow make clinic to work out of tree. ( #1836 )
* bpo-30492: Allow make clinic to work out of tree.
* Use os.curdir instead of "." as the default value.
9 years ago
Serhiy Storchaka
d4edfc9abf
bpo-29935: Fixed error messages in the index() method of tuple, list and deque ( #887 )
when pass indices of wrong type.
9 years ago
Serhiy Storchaka
762bf40438
bpo-29852: Argument Clinic Py_ssize_t converter now supports None ( #716 )
if pass `accept={int, NoneType}`.
9 years ago
Victor Stinner
d6debb24e0
bpo-29919: Remove unused imports found by pyflakes ( #137 )
Make also minor PEP8 coding style fixes on modified imports.
9 years ago
Serhiy Storchaka
80ec8364f1
bpo-29748: Added the slice index converter in Argument Clinic. ( #549 )
9 years ago
Serhiy Storchaka
202fda55c2
bpo-24037: Add Argument Clinic converter `bool(accept={int})`. ( #485 )
9 years ago
Serhiy Storchaka
b5c51d3dd9
bpo-20185: Convert float object implementation to Argument Clinic. ( #543 )
Based on patch by Vajrasky Kok.
9 years ago
Victor Stinner
093119e4eb
Argument Clinic: Use METH_FASTCALL for boring positionals
Issue #29286 . Use METH_FASTCALL calling convention instead of METH_VARARGS to
parse "boring" position arguments. METH_FASTCALL is faster since it avoids the
creation of a temporary tuple to pass positional arguments.
Replace PyArg_UnpackTuple() with _PyArg_UnpackStack()+_PyArg_NoStackKeywords().
9 years ago
Victor Stinner
0c8c3893ae
Argument Clinic: Use METH_FASTCALL for positionals
Issue #29286 . Use METH_FASTCALL calling convention instead of METH_VARARGS to
parse position arguments. METH_FASTCALL is faster since it avoids the creation
of a temporary tuple to pass positional arguments.
9 years ago
Victor Stinner
3e1fad6913
Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywords
Issue #29286 .
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
R David Murray
44b548dda8
#27364 : fix "incorrect" uses of escape character in the stdlib.
And most of the tools.
Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
9 years ago
Benjamin Peterson
cc854499e4
clinic: PY_LONG_LONG -> long long
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
Martin Panter
eb9957065a
Issue #27626 : Spelling fixes in docs, comments and internal names
Based on patch by Ville Skyttä.
10 years ago
Serhiy Storchaka
1a2b24f02d
Issue #27332 : Fixed the type of the first argument of module-level functions
generated by Argument Clinic. Patch by Petr Viktorin.
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
5dee6551e2
Issue #26305 : Argument Clinic now uses braces in C code as required by PEP 7.
10 years ago
Serhiy Storchaka
ebe95fdabb
Issue #26305 : Argument Clinic now escapes braces. No need to double them.
10 years ago
Serhiy Storchaka
5b6f0aa71c
Remove duplicated tests.
There were duplicated methods with the same name and body.
10 years ago
Martin Panter
4177e7c38e
Issue #26316 : Fix variable name typo in Argument Clinic
10 years ago
Larry Hastings
38337d1e15
Issue #24000 : Improved Argument Clinic's mapping of converters to legacy
"format units". Updated the documentation to match.
11 years ago
Larry Hastings
dbfdc380df
Issue #24001 : Argument Clinic converters now use accept={type}
instead of types={'type'} to specify the types the converter accepts.
11 years ago
Serhiy Storchaka
247789cee9
Issue #24007 : Argument Clinic now writes the format of PyArg_Parse*() at the
same line as function name.
11 years ago
Larry Hastings
7f90cba7f3
Issue #23935 : Argument Clinic's understanding of format units
accepting bytes, bytearrays, and buffers is now consistent with
both the documentation and the implementation.
11 years ago
Larry Hastings
89964c48d1
Issue #23944 : Argument Clinic now wraps long impl prototypes at column 78.
11 years ago
Zachary Ware
bbbbe7e4e6
Make Argument Clinic's '--make' option work on Windows.
11 years ago