]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-113317: Rework Argument Clinic cpp.py error handling (#113525)
authorErlend E. Aasland <erlend@python.org>
Wed, 27 Dec 2023 21:43:19 +0000 (22:43 +0100)
committerGitHub <noreply@github.com>
Wed, 27 Dec 2023 21:43:19 +0000 (21:43 +0000)
commit87295b4068762f9cbdfcae5fed5ff54aadd3cb62
tree8457448ab9f4cf1cb2795ad8dff6f48768fb3182
parent6c98fce33a4c2d6671978f6286377af0d6e22182
gh-113317: Rework Argument Clinic cpp.py error handling (#113525)

Rework error handling in the C preprocessor helper. Instead of monkey-
patching the cpp.Monitor.fail() method from within clinic.py, rewrite
cpp.py to use a subclass of the ClinicError exception. As a side-effect,
ClinicError is moved into Tools/clinic/libclinic/errors.py.

Yak-shaving in preparation for putting cpp.py into libclinic.
Lib/test/test_clinic.py
Tools/clinic/clinic.py
Tools/clinic/cpp.py
Tools/clinic/libclinic/__init__.py
Tools/clinic/libclinic/errors.py [new file with mode: 0644]