New issue 3006: codecs.decode failure: 'hex' decoder returned 'bytes' instead of 'str' https://bitbucket.org/pypy/pypy/issues/3006/codecsdecode-failure-hex-decoder-returned
vados: PyPy: ```python Python 3.6.1 (de061d87e39c7df4e436974096d7982c676a859d, Mar 26 2019, 16:19:11) [PyPy 7.1.0-beta0 with GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``PyPy is a tool to keep otherwise dangerous minds safely occupied.'' >>>> import codecs; codecs.decode("707974686f6e2d666f72756d2e696f", "hex") Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'hex' decoder returned 'bytes' instead of 'str'; use codecs.decode() to decode to arbitrary types ``` In Python: ```python Python 3.7.3 (default, Mar 26 2019, 21:43:19) [GCC 8.2.1 20181127] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import codecs; codecs.decode("707974686f6e2d666f72756d2e696f", "hex") b'python-forum.io' ``` This was discovered deep [in some code that powers ethereum for python](https://github.com/ethereum/eth-utils/blob/master/eth_utils/hexadecimal.py#L17) _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue