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

Add support for BigEndianUnion and LittleEndianUnion in ctypes #77359

Closed
emezh mannequin opened this issue Mar 29, 2018 · 7 comments
Closed

Add support for BigEndianUnion and LittleEndianUnion in ctypes #77359

emezh mannequin opened this issue Mar 29, 2018 · 7 comments
Assignees
Labels
3.11 only security fixes topic-ctypes type-feature A feature request or enhancement

Comments

@emezh
Copy link
Mannequin

emezh mannequin commented Mar 29, 2018

BPO 33178
Nosy @theller, @gpshead, @amauryfa, @abalkin, @meadori, @tohyland, @ringof
PRs
  • bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes #25480
  • 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 = 'https://github.com/gpshead'
    closed_at = <Date 2022-03-29.21:27:51.446>
    created_at = <Date 2018-03-29.13:48:23.635>
    labels = ['ctypes', 'type-feature', '3.11']
    title = 'Add support for BigEndianUnion and LittleEndianUnion in ctypes'
    updated_at = <Date 2022-03-29.21:27:51.445>
    user = 'https://bugs.python.org/emezh'

    bugs.python.org fields:

    activity = <Date 2022-03-29.21:27:51.445>
    actor = 'gregory.p.smith'
    assignee = 'gregory.p.smith'
    closed = True
    closed_date = <Date 2022-03-29.21:27:51.446>
    closer = 'gregory.p.smith'
    components = ['ctypes']
    creation = <Date 2018-03-29.13:48:23.635>
    creator = 'emezh'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33178
    keywords = ['patch']
    message_count = 7.0
    messages = ['314647', '314649', '355937', '397291', '410574', '416296', '416297']
    nosy_count = 8.0
    nosy_names = ['theller', 'gregory.p.smith', 'amaury.forgeotdarc', 'belopolsky', 'meador.inge', 'emezh', 'tohyland', 'dpg']
    pr_nums = ['25480']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue33178'
    versions = ['Python 3.11']

    @emezh
    Copy link
    Mannequin Author

    emezh mannequin commented Mar 29, 2018

    Python documentation says that "To build structures with non-native byte order, you can use one of the BigEndianStructure, LittleEndianStructure, BigEndianUnion, and LittleEndianUnion base classes"

    However, BigEndianUnion ad LittleEndianUnion are not implemented

    >>> from ctypes import *
    >>> BigEndianStructure
    <class 'ctypes._endian.BigEndianStructure'>
    >>> BigEndianUnion
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    NameError: name 'BigEndianUnion' is not defined

    Is that something that can be added?

    See also https://bugs.python.org/issue19023

    @emezh emezh mannequin added topic-ctypes type-feature A feature request or enhancement labels Mar 29, 2018
    @emezh
    Copy link
    Mannequin Author

    emezh mannequin commented Mar 29, 2018

    updated nosy list

    @tohyland
    Copy link
    Mannequin

    tohyland mannequin commented Nov 4, 2019

    Hi there, I'm taking part in 'EnHackathon' spending several days over the next few weeks working on issues. I think this could be a good issue for a small team of first-time contributors with experience in C to work on.
    Would anyone be able to offer guidance if we encounter problems?

    @ringof
    Copy link
    Mannequin

    ringof mannequin commented Jul 12, 2021

    PR 25480 passes checks and awaits core review. All comments thus far have been addressed.

    @ringof
    Copy link
    Mannequin

    ringof mannequin commented Jan 14, 2022

    Any core developers available to review this PR?

    @gpshead gpshead added the 3.11 only security fixes label Feb 3, 2022
    @gpshead gpshead self-assigned this Feb 3, 2022
    @gpshead
    Copy link
    Member

    gpshead commented Mar 29, 2022

    New changeset dc2d840 by Dave Goncalves in branch 'main':
    bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes (GH-25480)
    dc2d840

    @gpshead
    Copy link
    Member

    gpshead commented Mar 29, 2022

    Thanks for the contribution!

    (our attention spans can be scattered and random, apologies for the delay)

    @gpshead gpshead closed this as completed Mar 29, 2022
    @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
    3.11 only security fixes topic-ctypes type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant