This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients serhiy.storchaka, vstinner
Date 2020-01-16.09:14:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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, no real usage of binhex.

On Stackoverflow, the latest questions about binhex has been asked in 2012:

I also found an answer suggesting to use binascii.a2b_hex() to decode a string the hexadecimal string "2020202020202020202020205635514d385a5856":

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

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