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

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

Closed
brettcannon opened this issue Mar 24, 2008 · 4 comments
Closed

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

brettcannon opened this issue Mar 24, 2008 · 4 comments
Labels
extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@brettcannon
Copy link
Member

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

    @brettcannon
    Copy link
    Member Author

    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.

    @brettcannon brettcannon added extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error labels Mar 24, 2008
    @benjaminp
    Copy link
    Contributor

    Attaching patch...

    @benjaminp
    Copy link
    Contributor

    This was fixed as r62484.

    @amauryfa
    Copy link
    Member

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

    @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
    extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants