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.
Created on 2016年10月03日 18:07 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (6) | |||
|---|---|---|---|
| msg277972 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年10月03日 18:07 | |
As documented in Doc/extending/newtypes.rst, the flags field of PyMemberDef must be bitwise-or-ed combination of flag constants READONLY, READ_RESTRICTED, WRITE_RESTRICTED and RESTRICTED. There are problems with this: 1. Actually WRITE_RESTRICTED was renamed to PY_WRITE_RESTRICTED in 2.6 (a8dd8874ff2d). I didn't find mention of this backward incompatible change in Misc/NEWS and whatsnew files. 2. Since the support of restricted mode was removed in 3.x, only READONLY flag has effect. Other flags are still documented and used in CPython sources. I think we should get rid of using these flags and undocument them or document as outdated. 3. As noted by Skip Montanaro on the Python-Dev mailing list, these flags (as well as T_* type tags in Include/structmember.h) should have the PY_ prefix. |
|||
| msg277974 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年10月03日 18:14 | |
The latter issue is a duplicate of issue2897. |
|||
| msg277978 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年10月03日 18:22 | |
We still should correct the documentation in 2.7 and 3.x. |
|||
| msg277980 - (view) | Author: Alexander Belopolsky (belopolsky) * (Python committer) | Date: 2016年10月03日 18:24 | |
Serhiy, while I see that you've raised some additional issues here, let's keep the discussion related to Include/structmember.h in one place. I would not mind adding additional affected versions there. |
|||
| msg277981 - (view) | Author: Alexander Belopolsky (belopolsky) * (Python committer) | Date: 2016年10月03日 18:30 | |
There is also #24065 ("Outdated *_RESTRICTED flags in structmember.h") which I think should be folded into #2897. |
|||
| msg277983 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年10月03日 18:35 | |
Ah this is a duplicate of issue24065! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:37 | admin | set | github: 72535 |
| 2016年10月03日 18:43:06 | belopolsky | link | issue2897 dependencies |
| 2016年10月03日 18:35:06 | serhiy.storchaka | set | status: open -> closed superseder: PyMemberDef missing in limited API / Deprecate structmember.h -> Outdated *_RESTRICTED flags in structmember.h messages: + msg277983 resolution: duplicate stage: needs patch -> resolved |
| 2016年10月03日 18:30:49 | belopolsky | set | messages: + msg277981 |
| 2016年10月03日 18:24:50 | belopolsky | set | nosy:
+ belopolsky messages: + msg277980 |
| 2016年10月03日 18:22:39 | serhiy.storchaka | set | status: closed -> open resolution: duplicate -> (no value) messages: + msg277978 stage: resolved -> needs patch |
| 2016年10月03日 18:20:01 | belopolsky | set | status: open -> closed superseder: PyMemberDef missing in limited API / Deprecate structmember.h resolution: duplicate stage: resolved |
| 2016年10月03日 18:14:17 | serhiy.storchaka | set | messages: + msg277974 |
| 2016年10月03日 18:07:59 | serhiy.storchaka | create | |