Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated *_RESTRICTED flags in structmember.h #68253

Closed
berkerpeksag opened this issue Apr 27, 2015 · 3 comments
Closed

Outdated *_RESTRICTED flags in structmember.h #68253

berkerpeksag opened this issue Apr 27, 2015 · 3 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@berkerpeksag
Copy link
Member

BPO 24065
Nosy @abalkin, @pitrou, @berkerpeksag
Superseder
  • bpo-2897: PyMemberDef missing in limited API / Deprecate structmember.h
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2016-10-03.18:36:03.160>
    created_at = <Date 2015-04-27.17:40:18.984>
    labels = ['interpreter-core', 'type-feature']
    title = 'Outdated *_RESTRICTED flags in structmember.h'
    updated_at = <Date 2016-10-04.12:01:48.174>
    user = 'https://github.com/berkerpeksag'

    bugs.python.org fields:

    activity = <Date 2016-10-04.12:01:48.174>
    actor = 'berker.peksag'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-10-03.18:36:03.160>
    closer = 'belopolsky'
    components = ['Interpreter Core']
    creation = <Date 2015-04-27.17:40:18.984>
    creator = 'berker.peksag'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 24065
    keywords = []
    message_count = 3.0
    messages = ['242134', '242138', '277984']
    nosy_count = 3.0
    nosy_names = ['belopolsky', 'pitrou', 'berker.peksag']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '2897'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue24065'
    versions = ['Python 3.5']

    @berkerpeksag
    Copy link
    Member Author

    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

    RESTRICTED

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

    [1] https://github.com/python/cpython/blob/2.7/Python/structmember.c#L180

    @berkerpeksag berkerpeksag added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Apr 27, 2015
    @pitrou
    Copy link
    Member

    pitrou commented Apr 27, 2015

    +1 for deprecating them.

    @abalkin
    Copy link
    Member

    abalkin commented Oct 3, 2016

    See bpo-2897 for a plan to deperecate Include/structmember.h.

    @abalkin abalkin closed this as completed Oct 3, 2016
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants