Closed Polynomial-C closed 6 years ago
Thanks for the patch, but - I don't see any version checks, so how will this work when compiled against older versions, especially ones that - like Debian Hurd - don't define ENOATTR?
To be honest I only looked at attr/xattr.h
from attr-2.4.47 which simply redefines ENOATTR
:
#ifndef ENOATTR
# define ENOATTR ENODATA /* No such attribute */
#endif
Wondering what the status is here. Do you want me to change something?
To be honest, you are the first one asking for a version check. I've never seen this in any other project using xattr. And I tried to make this backward compatible. That's why I replaced ENOATTR
with ENODATA
. That should also be available in GNU Hurd.
Hey, sorry, I just dropped the ball on this one. I'll review the patch on the weekend.
My comment about version was just about backwards compatibility, if that is achieved simply via ifdefs, all good.
Status?
IMO the fix is to merge this PR and get rid of code deprecated for 3 years, with inlining the single define which the file provided.
It's what we did for Arch Linux: https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/python-pyxattr&id=97d5258ce2c604c3c1c9366d536b5b65b2405ebf
Finally had some time to test. The main point I was missing is for how long this was available in glibc - since 2.3, which was released ages ago. As such, just switching is fine for any modern distribution.
I'll accept this PR, but it needs further small update to the setup.py
file to remove the requirement of the attr library, since it will be no longer needed, and the README.
For the record, I found this discussion interesting/somewhat relevant: https://patchwork.ozlabs.org/patch/363203/.
Released in version 0.6.1.
See also: http://git.savannah.nongnu.org/cgit/attr.git/commit/?id=7921157890d07858d092f4003ca4c6bae9fd2c38