Message142293
| Author |
pitrou |
| Recipients |
benjamin.peterson, pitrou |
| Date |
2011年08月17日.22:04:21 |
| SpamBayes Score |
1.4194251e-06 |
| Marked as misclassified |
No |
| Message-id |
<1313618661.89.0.946127810392.issue12720@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I think the functions should:
- accept both str and bytes for keys and values; when it's an str, encoding it using the FS encoding
- return str for attribute names, using the FS encoding
- return bytes for attribute values, although returning str might be reasonable as well
I also get the following test failures:
======================================================================
FAIL: test_fds (test.test_os.ExtendedAttributeTests)
----------------------------------------------------------------------
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
======================================================================
FAIL: test_lpath (test.test_os.ExtendedAttributeTests)
----------------------------------------------------------------------
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
======================================================================
FAIL: test_simple (test.test_os.ExtendedAttributeTests)
----------------------------------------------------------------------
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 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年08月17日 22:04:21 | pitrou | set | recipients:
+ pitrou, benjamin.peterson |
| 2011年08月17日 22:04:21 | pitrou | set | messageid: <1313618661.89.0.946127810392.issue12720@psf.upfronthosting.co.za> |
| 2011年08月17日 22:04:21 | pitrou | link | issue12720 messages |
| 2011年08月17日 22:04:21 | pitrou | create |
|