summaryrefslogtreecommitdiff
path: root/Python/clinic
AgeCommit message (Collapse)AuthorLines
2018-01-22bpo-32436: Implement PEP 567 (#5027)Yury Selivanov-0/+146
2018-01-21bpo-32591: Add native coroutine origin tracking (#5250)Nathaniel J. Smith-0/+66
* Add coro.cr_origin and sys.set_coroutine_origin_tracking_depth * Use coroutine origin information in the unawaited coroutine warning * Stop using set_coroutine_wrapper in asyncio debug mode * In BaseEventLoop.set_debug, enable debugging in the correct thread
2018-01-07bpo-30579: Allow TracebackType creation and tb_next mutation from Python ↵Nathaniel J. Smith-0/+35
(GH-4793) Third party projects may wish to hide their own internal machinery in order to present more comprehensible tracebacks to end users (e.g. Jinja2 and Trio both do this). Previously such projects have had to rely on ctypes to do so: https://github.com/pallets/jinja/blob/fe3dadacdf4cf411d0a5b6bbd4d5234697a28af2/jinja2/debug.py#L345 https://github.com/python-trio/trio/blob/1e86b1aee8c0c759f6f239ae53a05d0d3963c629/trio/_core/_multierror.py#L296 This provides a Python level API for creating and modifying real Traceback objects, allowing tracebacks to be edited at runtime. Patch by Nathaniel Smith.
2017-12-15bpo-32240: Add the const qualifier to declarations of PyObject* array ↵Serhiy Storchaka-24/+24
arguments. (#4746)
2017-12-09closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)Benjamin Peterson-1/+36
Python now supports checking bytecode cache up-to-dateness with a hash of the source contents rather than volatile source metadata. See the PEP for details. While a fairly straightforward idea, quite a lot of code had to be modified due to the pervasiveness of pyc implementation details in the codebase. Changes in this commit include: - The core changes to importlib to understand how to read, validate, and regenerate hash-based pycs. - Support for generating hash-based pycs in py_compile and compileall. - Modifications to our siphash implementation to support passing a custom key. We then expose it to importlib through _imp. - Updates to all places in the interpreter, standard library, and tests that manually generate or parse pyc files to grok the new format. - Support in the interpreter command line code for long options like --check-hash-based-pycs. - Tests and documentation for all of the above.
2017-11-15bpo-30950: Convert round() to Argument Clinic. (#2740)Serhiy Storchaka-1/+35
2017-07-03bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)Serhiy Storchaka-86/+22
the bare METH_FASTCALL be used for functions with positional-only parameters.
2017-06-10bpo-30600: Fix error messages (condition order in Argument Clinic) (#2051)Sylvain-63/+63
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".
2017-05-29Add reference to help('FORMATTING') in format() builtin (GH-166)Amit Kumar-2/+4
2017-03-12bpo-20185: Convert the marshal module to Argument Clinic. (#541)Serhiy Storchaka-0/+145
Based on patch by Vajrasky Kok.
2017-01-17Run Argument Clinic: METH_VARARGS=>METH_FASTCALLVictor Stinner-38/+86
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using "boring" positional arguments. Manually fix _elementtree: _elementtree_XMLParser_doctype() must remain consistent with the clinic code.
2017-01-17Run Argument Clinic: METH_VARARGS=>METH_FASTCALLVictor Stinner-9/+17
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using only positional arguments.
2017-01-17Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywordsVictor Stinner-2/+2
Issue #29286.
2016-12-09Issue #20185: Convert _warnings.warn() to Argument ClinicVictor Stinner-0/+38
Fix warn_explicit(): interpret source=None as source=NULL.
2016-09-09Issue #27810: Rerun Argument Clinic on all modulesVictor Stinner-4/+4
2016-08-14Issue #27574: Decreased an overhead of parsing keyword arguments in functionsSerhiy Storchaka-3/+4
implemented with using Argument Clinic.
2016-07-07- Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka-63/+62
generated by Argument Clinic. Patch by Petr Viktorin.
2016-07-07Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka-63/+62
generated by Argument Clinic. Patch by Petr Viktorin.
2016-06-09Issue #26305: Argument Clinic now uses braces in C code as required by PEP 7.Serhiy Storchaka-25/+48
2016-05-01Regenerate Argument Clinic code for issue #26874.Serhiy Storchaka-2/+2
2015-08-24Rebuilt Clinic generated code.Larry Hastings-2/+2
2015-08-24Issue #24769: Interpreter now starts properly when dynamic loadingLarry Hastings-1/+28
is disabled. Patch by Petr Viktorin.
2015-05-30Specify default values of semantic booleans in Argument Clinic generated ↵Serhiy Storchaka-5/+5
signatures as booleans.
2015-05-23PEP 489: Multi-phase extension module initializationNick Coghlan-43/+60
Known limitations of the current implementation: - documentation changes are incomplete - there's a reference leak I haven't tracked down yet The leak is most visible by running: ./python -m test -R3:3 test_importlib However, you can also see it by running: ./python -X showrefcount Importing the array or _testmultiphase modules, and then deleting them from both sys.modules and the local namespace shows significant increases in the total number of active references each cycle. By contrast, with _testcapi (which continues to use single-phase initialisation) the global refcounts stabilise after a couple of cycles.
2015-04-24Issue #24007: Argument Clinic now writes the format of PyArg_Parse*() at theSerhiy Storchaka-31/+13
same line as function name.
2015-04-14Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.Larry Hastings-11/+21
2015-04-04Issue #23492: Argument Clinic now generates argument parsing code withSerhiy Storchaka-23/+23
PyArg_Parse instead of PyArg_ParseTuple if possible.
2015-04-03Issue #23501: Argumen Clinic now generates code into separate files by default.Serhiy Storchaka-0/+659
2014-05-30Move import.c to use Clinic file output.Brett Cannon-0/+323