classification
Title: PyArena type is used in headers from the limited API
Type: compile error Stage: resolved
Components: Build Versions: Python 3.9
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Mark.Shannon, ZackerySpytz, aponomarenko, jcea, loewis
Priority: normal Keywords: patch

Created on 2014-04-01 08:10 by aponomarenko, last changed 2019-09-12 09:30 by Mark.Shannon. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14634 merged ZackerySpytz, 2019-07-07 05:59
Messages (4)
msg215300 - (view) Author: Andrey (aponomarenko) Date: 2014-04-01 08:10
Hi all,

The PyArena data type is defined in the pyarena.h under the #ifndef Py_LIMITED_API statement, so it's not included in the limited api. But this type is used in Python-ast.h, ast.h and asdl.h headers that included in the limited api, because they don't contain any checks for Py_LIMITED_API.

May be all these header files (Python-ast.h, ast.h, asdl.h) should begin with "#ifndef Py_LIMITED_API" (excluded from the limited api)?

Thanks.
msg238955 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-03-22 23:39
I'm not sure if this should be a compile error or an enhancement request, can someone please advise.
msg351386 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2019-09-09 09:45
This seems like the correct thing to do.
Since the AST changes from version to version, I don't see how these files could reasonably be part of the limited API.
msg352071 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2019-09-12 09:27
New changeset 421a72af4deaec96a49a79951b9c2546a2faa13d by Mark Shannon (Zackery Spytz) in branch 'master':
bpo-21120: Exclude Python-ast.h, ast.h and asdl.h from the limited API (#14634)
https://github.com/python/cpython/commit/421a72af4deaec96a49a79951b9c2546a2faa13d
History
Date User Action Args
2019-09-12 09:30:33Mark.Shannonsetstatus: open -> closed
2019-09-12 09:30:08Mark.Shannonsetstage: patch review -> resolved
2019-09-12 09:27:17Mark.Shannonsetmessages: + msg352071
2019-09-09 09:45:47Mark.Shannonsetnosy: + Mark.Shannon
messages: + msg351386
2019-07-07 09:31:19ZackerySpytzsetnosy: + ZackerySpytz

components: + Build, - Library (Lib)
versions: + Python 3.9, - Python 3.5
2019-07-07 05:59:05ZackerySpytzsetkeywords: + patch
stage: patch review
pull_requests: + pull_request14448
2019-03-15 22:17:41BreamoreBoysetnosy: - BreamoreBoy
2015-03-22 23:39:01BreamoreBoysetnosy: + BreamoreBoy
messages: + msg238955
2014-04-02 14:47:31jceasetnosy: + jcea
2014-04-01 13:16:58vstinnersetnosy: + loewis
2014-04-01 08:10:21aponomarenkocreate