-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose linux extended filesystem attributes #56929
Comments
These allow extra metadata to be attached to files. |
I think the functions should:
I also get the following test failures: ====================================================================== Traceback (most recent call last):
File "/home/antoine/cpython/default/Lib/test/test_os.py", line 1579, in test_fds
self._check_xattrs(getxattr, setxattr, removexattr, listxattr)
File "/home/antoine/cpython/default/Lib/test/test_os.py", line 1542, in _check_xattrs
setxattr(fn, b"user.test", b"bye", os.XATTR_CREATE)
AssertionError: OSError not raised ====================================================================== Traceback (most recent call last):
File "/home/antoine/cpython/default/Lib/test/test_os.py", line 1564, in test_lpath
os.llistxattr)
File "/home/antoine/cpython/default/Lib/test/test_os.py", line 1542, in _check_xattrs
setxattr(fn, b"user.test", b"bye", os.XATTR_CREATE)
AssertionError: OSError not raised ====================================================================== Traceback (most recent call last):
File "/home/antoine/cpython/default/Lib/test/test_os.py", line 1560, in test_simple
os.listxattr)
File "/home/antoine/cpython/default/Lib/test/test_os.py", line 1542, in _check_xattrs
setxattr(fn, b"user.test", b"bye", os.XATTR_CREATE)
AssertionError: OSError not raised |
Here is a new patch, implementing Antoine's suggestions. |
And here is the next version, taking into account neologix's review. |
Is it normal that listxattr() succeeds but getxattr() fails with ENOTSUPP? >>> os.listxattr("/")
[]
>>> os.getxattr("/", "foo")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 95] Operation not supported This is on 2.6.38.8. |
2011/8/28 Antoine Pitrou <report@bugs.python.org>:
>
> Antoine Pitrou <pitrou@free.fr> added the comment:
>
> Is it normal that listxattr() succeeds but getxattr() fails with ENOTSUPP?
>
>>>> os.listxattr("/")
> []
>>>> os.getxattr("/", "foo")
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> OSError: [Errno 95] Operation not supported The reason you're getting ENOSUP is you have to use the proper prefix. |
After Antoine's review... |
New changeset 4eb0b1819bda by Benjamin Peterson in branch 'default': |
There is an inconsistency in used header and library. I suggest to use sys/xattr.h:
|
New changeset 33f7044b5682 by Benjamin Peterson in branch 'default': |
The OS X buildbots fail to compile posixmodule.c: gcc -fno-strict-aliasing -g -O0 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o |
New changeset f325439d7f84 by Benjamin Peterson in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: