better-bencode
better-bencode copied to clipboard
Addresses https://github.com/kosqx/better-bencode/issues/5
- add support for python 3.6 and 3.7
- remove compilation warning related to python function signature with args and kwargs
So I added support for processing strings in python 3 to this program, and since utf string and "normal" string is uniform thing in python3 now, I just decode them as bytes so we can obtain its size in bytes and not unicode code points. As for output, program now tries to decode bytes objects as utf8 and if it fails, it returns the bytes object.
Also this change brakes the python3 tests because if the bytes are decodable, it returns string objects instead of bytes objects. Couldn't find official specification for bencode to decide if its acceptable behavior or not.