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

Conversation

@vstinner
Copy link
Member

vstinner commented Jan 16, 2020

@vstinner

This comment has been minimized.

Copy link
Member Author

vstinner commented Jan 16, 2020

cc @tiran

@vstinner

This comment has been minimized.

Copy link
Member Author

vstinner commented Jan 17, 2020

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

@serhiy-storchaka

This comment has been minimized.

Copy link
Member

serhiy-storchaka commented Jan 17, 2020

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

This comment has been minimized.

Copy link
Member

serhiy-storchaka commented Jan 17, 2020

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 vstinner force-pushed the vstinner:deprecate_binhex branch 2 times, most recently from f99007d to 09f5a4c Jan 17, 2020
@vstinner

This comment has been minimized.

Copy link
Member Author

vstinner commented Jan 17, 2020

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 left a comment

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

This comment has been minimized.

Copy link
@serhiy-storchaka

serhiy-storchaka Jan 21, 2020

Member

Is binhex imported in test___all__ or other tests?

This comment has been minimized.

Copy link
@vstinner

vstinner Jan 22, 2020

Author Member

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 force-pushed the vstinner:deprecate_binhex branch from 09f5a4c to 3eaef03 Jan 22, 2020
@vstinner vstinner merged commit beea26b into python:master Jan 22, 2020
9 checks passed
9 checks passed
Docs
Details
Windows (x86)
Details
Windows (x64)
Details
macOS
Details
Ubuntu
Details
Azure Pipelines PR #20200122.28 succeeded
Details
bedevere/issue-number Issue number 39353 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@vstinner vstinner deleted the vstinner:deprecate_binhex branch Jan 22, 2020
@vstinner

This comment has been minimized.

Copy link
Member Author

vstinner commented Jan 22, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.