]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-113317: Change how Argument Clinic lists converters (#116853)
authorVictor Stinner <vstinner@python.org>
Wed, 27 Mar 2024 22:10:14 +0000 (23:10 +0100)
committerGitHub <noreply@github.com>
Wed, 27 Mar 2024 22:10:14 +0000 (23:10 +0100)
commit7aa89bc43e0bcf49eee5a39b5a7ba8f996f20d00
treea20c8fd78315498e96f5772112a91b9c8c2fd4ec
parent669ef49c7d42f35da6f7ee280102353b9b37f83e
gh-113317: Change how Argument Clinic lists converters (#116853)

* Add a new create_parser_namespace() function for
  PythonParser to pass objects to executed code.
* In run_clinic(), list converters using 'converters' and
  'return_converters' dictionarties.
* test_clinic: add 'object()' return converter.
* Use also create_parser_namespace() in eval_ast_expr().

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Lib/test/test_clinic.py
Tools/clinic/clinic.py