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.

classification
Title: Outdated *_RESTRICTED flags in structmember.h
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: PyMemberDef missing in limited API / Deprecate structmember.h
View: 2897
Assigned To: Nosy List: belopolsky, berker.peksag, pitrou
Priority: normal Keywords:

Created on 2015-04-27 17:40 by berker.peksag, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg242134 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-04-27 17:40
Looks like READ_RESTRICTED, PY_WRITE_RESTRICTED and RESTRICTED flags were used for "restricted mode" [1] in Python 2. "restricted mode" has been deprecated in Python 2.3. Also, the current documentation is outdated. WRITE_RESTRICTED is now PY_WRITE_RESTRICTED: https://docs.python.org/3/extending/newtypes.html#generic-attribute-management

There are a few usages of these flags in the CPython source:

PY_WRITE_RESTRICTED

* Objects/funcobject.c
* Objects/methodobject.c

RESTRICTED

* Objects/funcobject.c
* Objects/classobject.c

Are they still useful or can we deprecate/remove them now?

[1] https://github.com/python/cpython/blob/2.7/Python/structmember.c#L180
msg242138 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2015-04-27 17:47
+1 for deprecating them.
msg277984 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2016-10-03 18:36
See #2897 for a plan to deperecate Include/structmember.h.
History
Date User Action Args
2022-04-11 14:58:16adminsetgithub: 68253
2016-10-04 12:01:48berker.peksagsetstage: needs patch -> resolved
2016-10-03 18:43:06belopolskylinkissue2897 dependencies
2016-10-03 18:36:03belopolskysetstatus: open -> closed

nosy: + belopolsky
messages: + msg277984

superseder: PyMemberDef missing in limited API / Deprecate structmember.h
resolution: duplicate
2016-10-03 18:35:06serhiy.storchakalinkissue28349 superseder
2015-05-13 10:49:14berker.peksagsetstage: needs patch
2015-04-27 17:47:07pitrousetnosy: + pitrou
messages: + msg242138
2015-04-27 17:40:18berker.peksagcreate