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 PyBuffer_SizeFromFormat() C helper for struct.calcsize() #60117

Closed
ellerynewcomer mannequin opened this issue Sep 10, 2012 · 4 comments
Closed

Add PyBuffer_SizeFromFormat() C helper for struct.calcsize() #60117

ellerynewcomer mannequin opened this issue Sep 10, 2012 · 4 comments
Labels
3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@ellerynewcomer
Copy link
Mannequin

ellerynewcomer mannequin commented Sep 10, 2012

BPO 15913
Nosy @vstinner
PRs
  • bpo-15913 : Add PyBuffer_SizeFromFormat() #13873
  • 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 2019-08-20.14:47:47.638>
    created_at = <Date 2012-09-10.21:27:23.623>
    labels = ['interpreter-core', 'type-feature', '3.9']
    title = 'Add PyBuffer_SizeFromFormat() C helper for struct.calcsize()'
    updated_at = <Date 2019-08-20.14:47:47.637>
    user = 'https://bugs.python.org/ellerynewcomer'

    bugs.python.org fields:

    activity = <Date 2019-08-20.14:47:47.637>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-08-20.14:47:47.638>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2012-09-10.21:27:23.623>
    creator = 'ellery.newcomer'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 15913
    keywords = ['patch']
    message_count = 4.0
    messages = ['170239', '170269', '350007', '350008']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'ellery.newcomer']
    pr_nums = ['13873']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue15913'
    versions = ['Python 3.9']

    @ellerynewcomer
    Copy link
    Mannequin Author

    ellerynewcomer mannequin commented Sep 10, 2012

    this function is listed in the buffer docs and in abstract.h, but there is no implementation anywhere.

    @skrah
    Copy link
    Mannequin

    skrah mannequin commented Sep 11, 2012

    Even though it's documented, the function is probably a new feature
    and should go into 3.4.

    Meanwhile, you can call struct.calcsize(format). Any non-trivial
    implementation of PyBuffer_SizeFromFormat() would likely do the same.

    @skrah skrah mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Sep 11, 2012
    @vstinner vstinner added the 3.9 only security fixes label Jun 7, 2019
    @vstinner vstinner changed the title PyBuffer_SizeFromFormat is missing Add PyBuffer_SizeFromFormat() C helper for struct.calcsize() Jun 7, 2019
    @vstinner
    Copy link
    Member

    New changeset 9e66aba by Victor Stinner (Joannah Nanjekye) in branch 'master':
    bpo-15913: Implement PyBuffer_SizeFromFormat() (GH-13873)
    9e66aba

    @vstinner
    Copy link
    Member

    Joannah Nanjekye implemented the function, thanks.

    @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.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant