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

bpo-39353: Deprecate the binhex module #18025

Merged
merged 1 commit into from
Jan 22, 2020
Merged

bpo-39353: Deprecate the binhex module #18025

merged 1 commit into from
Jan 22, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jan 16, 2020

@vstinner
Copy link
Member Author

cc @tiran

@vstinner
Copy link
Member Author

@serhiy-storchaka: Does you expect any issue just by marking the module as deprecated in 3.9?

@serhiy-storchaka
Copy link
Member

What is a benefit of deprecating it?

This module is a high-level interface to several functions in the binascii module. This is all macOS specific stuff, so you need to ask macOS experts. If this encoding no longer used in macOS, its support can be removed, with deprecating first. If there are no plans to remove, there is no reason to deprecate.

@serhiy-storchaka
Copy link
Member

If deprecate the binhex module, I think that it would be better to deprecate corresponding functions in the binascii module in the same issue and PR, so it will be easier to find the original discussion.

@vstinner
Copy link
Member Author

If deprecate the binhex module, I think that it would be better to deprecate corresponding functions in the binascii module in the same issue and PR, so it will be easier to find the original discussion.

Ok. Let's do that. I added a second commit which deprecates the 5 related functions of the binascii module.

I'm not sure about the binhex code to avoid emitting warnings on calls to deprecated binascii functions: with _ignore_deprecation_warning():. Is it useful to bother with that?

What is a benefit of deprecating it?

Let me answer on the issue instead.

Copy link
Contributor

@ronaldoussoren ronaldoussoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Doc/whatsnew/3.9.rst Outdated Show resolved Hide resolved
Lib/test/test_binascii.py Outdated Show resolved Hide resolved
import unittest
from test import support

with support.check_warnings(('', DeprecationWarning)):
import binhex
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is binhex imported in test___all__ or other tests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full test suite pass with -Werror, except of test_signal which is unrelated to this PR: https://bugs.python.org/issue39424

Deprecate binhex4 and hexbin4 standards. Deprecate the binhex module
and the following binascii functions:

* b2a_hqx(), a2b_hqx()
* rlecode_hqx(), rledecode_hqx()
* crc_hqx()
@vstinner vstinner merged commit beea26b into python:master Jan 22, 2020
@vstinner vstinner deleted the deprecate_binhex branch January 22, 2020 19:44
@vstinner
Copy link
Member Author

@serhiy-storchaka: Thank you for insisting to also deprecate related binascii functions. You're right that it's more consistent.

@bugadani
Copy link

Can someone suggest an alternative to crc_hqx that provides the same result with the same or better performance?

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Deprecate binhex4 and hexbin4 standards. Deprecate the binhex module
and the following binascii functions:

* b2a_hqx(), a2b_hqx()
* rlecode_hqx(), rledecode_hqx()
* crc_hqx()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants