Skip to content

imp.get_magic() should return bytes, not bytearray #46723

Closed

Description

@brettcannon
BPO 2471
Nosy @brettcannon, @amauryfa, @benjaminp
Files
  • get_magic_bytes.patch
  • 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 2008-04-24.20:31:22.072>
    created_at = <Date 2008-03-24.06:59:36.313>
    labels = ['extension-modules', 'type-bug']
    title = 'imp.get_magic() should return bytes, not bytearray'
    updated_at = <Date 2008-04-24.20:36:14.322>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2008-04-24.20:36:14.322>
    actor = 'amaury.forgeotdarc'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-04-24.20:31:22.072>
    closer = 'benjamin.peterson'
    components = ['Extension Modules']
    creation = <Date 2008-03-24.06:59:36.313>
    creator = 'brett.cannon'
    dependencies = []
    files = ['9842']
    hgrepos = []
    issue_num = 2471
    keywords = ['patch']
    message_count = 4.0
    messages = ['64395', '64443', '65745', '65746']
    nosy_count = 3.0
    nosy_names = ['brett.cannon', 'amaury.forgeotdarc', 'benjamin.peterson']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2471'
    versions = ['Python 3.0']

    Activity

    1. brettcannon commented on Mar 24, 2008

      @brettcannon
      MemberAuthor

      The magic cookie as returned by imp.get_magic() should be of the bytes
      type, not bytearray as the magic cookie will not ever change during the
      execution of the interpreter.

    2. benjaminp commented on Mar 24, 2008

      @benjaminp
      Contributor

      Attaching patch...

    3. benjaminp commented on Apr 24, 2008

      @benjaminp
      Contributor

      This was fixed as r62484.

    4. amauryfa commented on Apr 24, 2008

      @amauryfa
      Contributor

      Oops, sorry for missing the tracker item.
      The change was sleeping in my workspace for some time...
      Thanks for closing it.

    5. 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

      extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions