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

Remove Tools/scripts/h2py.py #81885

Closed
vstinner opened this issue Jul 29, 2019 · 3 comments
Closed

Remove Tools/scripts/h2py.py #81885

vstinner opened this issue Jul 29, 2019 · 3 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir

Comments

@vstinner
Copy link
Member

BPO 37704
Nosy @vstinner
PRs
  • bpo-37704: Remove Tools/scripts/h2py.py #15000
  • 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-07-30.15:45:57.148>
    created_at = <Date 2019-07-29.11:58:12.727>
    labels = ['library', '3.9']
    title = 'Remove Tools/scripts/h2py.py'
    updated_at = <Date 2019-07-30.15:45:57.147>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-07-30.15:45:57.147>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-07-30.15:45:57.148>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2019-07-29.11:58:12.727>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37704
    keywords = ['patch']
    message_count = 3.0
    messages = ['348643', '348742', '348754']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = ['15000']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue37704'
    versions = ['Python 3.9']

    @vstinner
    Copy link
    Member Author

    Python 2 standard library had platform specific modules like CDROM which were generated by Tools/scripts/h2py.py. These modules were removed, but h2py.py is still around.

    There are now way better ways to expose C APIs in Python like cffi.

    I propose to simply remove Tools/scripts/h2py.py.

    Attached PR removes the file and update files which mention it. It would allow to simply close bpo-13032.

    @vstinner vstinner added 3.9 only security fixes stdlib Python modules in the Lib dir labels Jul 29, 2019
    @vstinner
    Copy link
    Member Author

    Lib/plat-*/ directories has been removed in Python 3.6 by:

    commit 20737cc
    Author: Zachary Ware <zachary.ware@gmail.com>
    Date: Thu Sep 8 11:38:46 2016 -0700

    Issue bpo-28027: Remove [Lib/plat](https://github.com/python/cpython/blob/main/Lib/plat)-* files
    

    Python 2 standard library had platform specific modules like CDROM which were generated by Tools/scripts/h2py.py. These modules were removed, but h2py.py is still around.

    Example of Python 2.7:

    $ head -n1 Lib/plat-linux2/IN.py 
    # Generated by h2py from /usr/include/netinet/in.h
    ...
    
    $ tail -n1 Lib/plat-linux2/regen 
    ...
    h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h

    @vstinner
    Copy link
    Member Author

    New changeset 27eeaf0 by Victor Stinner in branch 'master':
    bpo-37704: Remove Tools/scripts/h2py.py (GH-15000)
    27eeaf0

    @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 stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant