This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2020-05-05.13:59:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588687198.83.0.363765201865.issue40513@roundup.psfhosted.org>
In-reply-to
Content
Python/ceval.c also has "int _Py_CheckRecursionLimit = Py_DEFAULT_RECURSION_LIMIT;". _Py_CheckRecursiveCall() has this comment:

    /* Needed for ABI backwards-compatibility (see bpo-31857) */
    _Py_CheckRecursionLimit = recursion_limit;

I converted Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() macros into opaque functions in bpo-38644: commit f4b1e3d7c64985f5d5b00f6cc9a1c146bbbfd613.

I don't think that the "ABI backwards-compatibility" rationale is correct. These macros never worked in the limited C API: they accessed PyThreadState.recursion_depth and PyThreadState.overflowed members, whereas the PyThreadState structure is opaque in the limited C API (on purpose, see also bpo-39947).

I think that it is now safe to simply remove _Py_CheckRecursionLimit.
History
Date User Action Args
2020-05-05 13:59:58vstinnersetrecipients: + vstinner
2020-05-05 13:59:58vstinnersetmessageid: <1588687198.83.0.363765201865.issue40513@roundup.psfhosted.org>
2020-05-05 13:59:58vstinnerlinkissue40513 messages
2020-05-05 13:59:58vstinnercreate