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

py3k: Completely remove nb_coerce slot #45526

Closed
amauryfa opened this issue Sep 20, 2007 · 5 comments
Closed

py3k: Completely remove nb_coerce slot #45526

amauryfa opened this issue Sep 20, 2007 · 5 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@amauryfa
Copy link
Member

BPO 1185
Nosy @gvanrossum, @amauryfa, @scoder, @nascheme
Files
  • nocoerce.diff
  • 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 2007-09-21.20:21:42.779>
    created_at = <Date 2007-09-20.22:51:45.537>
    labels = ['interpreter-core', 'type-feature']
    title = 'py3k: Completely remove nb_coerce slot'
    updated_at = <Date 2008-06-06.12:01:57.952>
    user = 'https://github.com/amauryfa'

    bugs.python.org fields:

    activity = <Date 2008-06-06.12:01:57.952>
    actor = 'scoder'
    assignee = 'none'
    closed = True
    closed_date = <Date 2007-09-21.20:21:42.779>
    closer = 'gvanrossum'
    components = ['Interpreter Core']
    creation = <Date 2007-09-20.22:51:45.537>
    creator = 'amaury.forgeotdarc'
    dependencies = []
    files = ['8454']
    hgrepos = []
    issue_num = 1185
    keywords = ['patch']
    message_count = 5.0
    messages = ['56067', '56076', '56081', '56082', '67764']
    nosy_count = 4.0
    nosy_names = ['gvanrossum', 'amaury.forgeotdarc', 'scoder', 'nas']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1185'
    versions = ['Python 3.0']

    @amauryfa
    Copy link
    Member Author

    Arguments coercion has been removed in py3k for a while, but there are
    still some traces of it.
    This patch removes the nb_coerce slot and the last usages of __coerce__.
    Documentation is also updated: Py_TPFLAGS_CHECKTYPES does not exists
    anymore.

    Note: I ran the testsuite on Windows only.

    @amauryfa amauryfa added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Sep 20, 2007
    @gvanrossum
    Copy link
    Member

    Can you redo the patch while keeping the slot *position* (though not the
    name or type)? The wasted space is minimal (4-8 bytes per type or class
    object) and it means a lot for third party code if the positional struct
    initialization never breaks due to insertion or removal of a slot.
    Since everyone has a zero here anyway, I propose to name the slot
    nb_reserved and make its type int.

    @nascheme
    Copy link
    Member

    I made the changes as suggest by Guido. Commited as SVN rev 58226.
    Thanks for the patch.

    @gvanrossum
    Copy link
    Member

    Thanks Neil!

    @scoder
    Copy link
    Contributor

    scoder commented Jun 6, 2008

    As noted in bpo-2997, the nb_divide slot (4th field!) has already been
    removed, so Py2 code has to be adapted anyway. I therefore recommend to
    just remove all unused fields to get a clean struct for Py3.

    @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

    4 participants