classification
Title: Promote PyObject_GenericGetDict to the stable API
Type: Stage: resolved
Components: C API Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Mark.Shannon, ZackerySpytz, alex, benjamin.peterson, serhiy.storchaka, steve.dower
Priority: normal Keywords: patch

Created on 2020-09-23 14:31 by alex, last changed 2020-10-19 22:49 by steve.dower. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 22646 merged ZackerySpytz, 2020-10-11 11:09
Messages (8)
msg377388 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2020-09-23 14:31
Currently PyObject_GenericSetDict is part of the stable API, but PyObject_GenericGetDict is not. I noticed this while working on https://github.com/PyO3/pyo3/pull/1207

Because of the symmetry here, it seems appropriate to promote Get.
msg377404 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-09-23 16:23
It was moved out from the limited API in issue13903 (7d95e4072169911b228c9e42367afb5f17fd3db0). I think it was error.
msg377406 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2020-09-23 16:40
It wasn't removed in 7d95e4072169911b228c9e42367afb5f17fd3db0,
just moved from object.h to dictobject.h
It was still part of the API at that point, I think.
msg377410 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-09-23 16:56
It was moved into the "#ifndef Py_LIMITED_API" block and therefore was effectively excluded from the limited API.

We should fix this error in all maintained versions.
msg378426 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2020-10-11 11:10
I have created PR 22646 to fix this issue.  Please consider taking a look.
msg379024 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-10-19 21:36
Unfortunately, fixing this won't make the builds work in previous versions, so it can't be backported.

We also need to update the version check in the PR - I left a comment for it.
msg379051 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-10-19 22:47
New changeset 1438c2ac773e87d1f9c97fc22f2346e16bf48773 by Zackery Spytz in branch 'master':
bpo-41845: Move PyObject_GenericGetDict() back into the limited API (GH22646)
https://github.com/python/cpython/commit/1438c2ac773e87d1f9c97fc22f2346e16bf48773
msg379053 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-10-19 22:49
Thanks!
History
Date User Action Args
2020-10-19 22:49:30steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg379053

stage: patch review -> resolved
2020-10-19 22:47:44steve.dowersetmessages: + msg379051
2020-10-19 21:36:06steve.dowersetnosy: + steve.dower

messages: + msg379024
versions: - Python 3.8, Python 3.9
2020-10-11 11:10:57ZackerySpytzsetmessages: + msg378426
2020-10-11 11:09:13ZackerySpytzsetkeywords: + patch
nosy: + ZackerySpytz

pull_requests: + pull_request21619
stage: patch review
2020-09-23 16:56:32serhiy.storchakasetmessages: + msg377410
versions: + Python 3.8, Python 3.9
2020-09-23 16:40:03Mark.Shannonsetmessages: + msg377406
2020-09-23 16:23:37serhiy.storchakasetnosy: + Mark.Shannon, serhiy.storchaka
messages: + msg377404
2020-09-23 14:31:49alexcreate