Author vstinner
Recipients serhiy.storchaka, vstinner
Date 2020-01-16.09:14:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579166085.65.0.30693146669.issue39353@roundup.psfhosted.org>
In-reply-to
Content
The binhex module encodes and decodes Apple Macintosh binhex4 data. It was originally developed for TRS-80. In the 1980s and early 1990s it was used on classic Mac OS 9 to encode binary email attachments.

Mac OS 9 is now heavily outdated, replaced by "macOS" (previously known as "Mac OS X").

I propose to emit a DeprecationWarning in the binhex module and document that it's deprecated.

I don't think that we have to schedule its removal yet, it can be decided later. A first deprecation warning emitted at runtime might help to warn last users, if there is any.

There are two binhex open issues:

* bpo-29566: no activity for almost 2 years (February 2017)
* bpo-34063: no activity for 1 year 1/2 (July 2018)

If we ignore global cleanup (done on the whole Python code base at once, not specific to binhex), the binhex was basically untouched since it has been ported to Python 3 (10 years ago). Maybe it means that it is very stable, which can be seen as a quality ;-)

I looked for "import binhex" in the first 10 pages of GitHub code search (restricted to Python programming language). I mostly found copies of Python test_binhex.py, no real usage of binhex.

On Stackoverflow, the latest questions about binhex has been asked in 2012:
https://stackoverflow.com/questions/12467973/binhex-decoding-using-java-code

I also found an answer suggesting to use binascii.a2b_hex() to decode a string the hexadecimal string "2020202020202020202020205635514d385a5856":
https://stackoverflow.com/questions/9683278/how-to-get-hard-disk-drivers-serial-number-in-python/9683837#9683837

But binascii.unhexlify() does the same than binascii.a2b_hex().

Attached PR deprecates binhex.
History
Date User Action Args
2020-01-16 09:14:45vstinnersetrecipients: + vstinner, serhiy.storchaka
2020-01-16 09:14:45vstinnersetmessageid: <1579166085.65.0.30693146669.issue39353@roundup.psfhosted.org>
2020-01-16 09:14:45vstinnerlinkissue39353 messages
2020-01-16 09:14:45vstinnercreate