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 the binhex module, binhex4 and hexbin4 standards #89248

Closed
vstinner opened this issue Sep 1, 2021 · 6 comments
Closed

Remove the binhex module, binhex4 and hexbin4 standards #89248

vstinner opened this issue Sep 1, 2021 · 6 comments
Labels
3.11 only security fixes stdlib Python modules in the Lib dir

Comments

@vstinner
Copy link
Member

vstinner commented Sep 1, 2021

BPO 45085
Nosy @vstinner, @ambv, @serhiy-storchaka
PRs
  • bpo-45085: Remove the binhex module #28117
  • 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 2021-09-02.10:24:56.986>
    created_at = <Date 2021-09-01.22:44:58.498>
    labels = ['library', '3.11']
    title = 'Remove the binhex module, binhex4 and hexbin4 standards'
    updated_at = <Date 2021-09-02.10:24:56.985>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2021-09-02.10:24:56.985>
    actor = 'lukasz.langa'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-09-02.10:24:56.986>
    closer = 'lukasz.langa'
    components = ['Library (Lib)']
    creation = <Date 2021-09-01.22:44:58.498>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45085
    keywords = ['patch']
    message_count = 6.0
    messages = ['400878', '400880', '400881', '400882', '400907', '400909']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'lukasz.langa', 'serhiy.storchaka']
    pr_nums = ['28117']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue45085'
    versions = ['Python 3.11']

    @vstinner
    Copy link
    Member Author

    vstinner commented Sep 1, 2021

    The binhex module was deprecated in Python 3.9 by bpo-39353 (commit beea26b). I propose to remove it: see attached PR.

    The PR also removes the following binascii functions, also deprecated in Python 3.9:

    • a2b_hqx(), b2a_hqx()
    • rlecode_hqx(), rledecode_hqx()

    The binascii.crc_hqx() function remains available.

    @vstinner vstinner added 3.11 only security fixes stdlib Python modules in the Lib dir labels Sep 1, 2021
    @vstinner
    Copy link
    Member Author

    vstinner commented Sep 1, 2021

    See also the PEP-594: Removing dead batteries from the standard library
    https://www.python.org/dev/peps/pep-0594/

    @vstinner
    Copy link
    Member Author

    vstinner commented Sep 1, 2021

    The binhex module was deprecated in Python 3.9 by bpo-39353 (commit beea26b). I have been asked there to keep binascii.crc_hqx() (not deprecated it).

    @vstinner
    Copy link
    Member Author

    vstinner commented Sep 1, 2021

    In bpo-39353, Serhiy Storchaka proposed: "But it would be nice to create a separate package on PyPI that provides such functionality before removing it from the stdlib."

    The purpose of the PEP-594 is to reduce the Python maintenance burden. Publishing a module on PyPI introduces a new maintenance burden, even if there is no plan to ever update the package.

    The PEP-594 is still a draft. So far, there was no agreement on the strategy to remove anything from the stdlib.

    In past, other stdlib modules have been removed silently and nobody complained. Likely because nobody used them. For example, the the Python 2 CDROM module of the old Lib/plat-linux2/ directory (CDROM.py, DLFCN.py, IN.py, regen, TYPES.py).

    If someone uses the binhex module, I suggest users to create a new project on PyPI to support binhex. Users who need binhex are likely the most motivated to *maintain* such code. You can start by copying Python 3.10 code.

    @ambv
    Copy link
    Contributor

    ambv commented Sep 2, 2021

    New changeset a806608 by Victor Stinner in branch 'main':
    bpo-45085: Remove the binhex module (GH-28117)
    a806608

    @ambv
    Copy link
    Contributor

    ambv commented Sep 2, 2021

    Agreed with Victor. I'd go with the "traditional" flow of PendingDeprecationWarning in 3.9, DeprecationWarning in 3.10, and removal in 3.11; but since we kept DeprecationWarning for two releases, it's pretty much the same and fine to remove it now.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants