Skip to content

py3k: Completely remove nb_coerce slot #45526

Closed

Description

@amauryfa
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']

    Activity

    1. amauryfa commented on Sep 20, 2007

      @amauryfa
      ContributorAuthor

      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.

    2. added
      interpreter-core
      type-feature
      on Sep 20, 2007
    3. gvanrossum commented on Sep 21, 2007

      @gvanrossum
      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.

    4. nascheme commented on Sep 21, 2007

      @nascheme
      Member

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

    5. gvanrossum commented on Sep 21, 2007

      @gvanrossum
      Member

      Thanks Neil!

    6. scoder commented on Jun 6, 2008

      @scoder
      Contributor

      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.

    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      interpreter-coretype-feature

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions