Open userappgate opened 1 year ago
The README should be updated to Python 3 IMO. And in Python 3 we get bytes, not strings. Example:
>>> import xattr
>>> xattr.listxattr("main.py")
[b'user.com.dropbox.attrs']
I don't know immediately whether one can add typing hints to C modules, or how easy/difficult it is, but the docstrings are easy to change.
The (temporary) output of the docs is here: https://pyxattr--46.org.readthedocs.build/46/module.html and looks about right, although there are a number of other Python 2-related comments to remove.
So I'll commit this docstring change first, and then look into the typing aspect.
Hello,
I've started to use this project to annotate etag headers on downloaded files.
The example looks like it uses strings, but actually all strings get converted to bytes, so when reading it's all bytes… so initially it didn't match… because the type didn't match.
I understand that breaking API to just accept bytes and error out otherwise is maybe a bit much, but it'd be nice to have the examples use b'whatever' to reflect how it works.
Thanks