Opened 13 years ago

Closed 13 years ago

#1591 defect closed fixed (fixed)

twisted.web2.dav.test.test_prop.PROP.test_PROPFIND fails if pyxattr is installed

Reported by: spiv Owned by:
Priority: high Milestone:
Component: web2.dav Keywords:
Cc: Wilfredo Sánchez Vega, David Reid, spiv, Jean-Paul Calderone Branch:

Description (last modified by Jean-Paul Calderone)

Traceback from trial:

[ERROR]: twisted.web2.dav.test.test_prop.PROP.test_PROPFIND

  File "/home/andrew/code/Twisted/twisted/web2/dav/", line 210, in listProperties
    for qname in self.deadProperties().list():
  File "/home/andrew/code/Twisted/twisted/web2/dav/", line 82, in deadProperties
    self._dead_properties = DeadPropertyStore(self)
  File "/home/andrew/code/Twisted/twisted/web2/dav/", line 81, in __init__
    self.attrs = xattr.xattr(self.resource.fp.path)
exceptions.AttributeError: 'module' object has no attribute 'xattr'

I'm using Ubuntu Breezy, with python2.4-pyattr installed:

$ dpkg -l python2.4-pyxattr [...] ii python2.4-pyxattr 0.2-2ubuntu3 module for manipulating filesystem extended attributes

The DAV code should check that the xattr it encounters is the one it expects, to avoid confusing errors. Or perhaps it shouldn't try running tests for code that relies on Darwin-only modules. Whatever it does, I shouldn't see a test failure because of it.

Change History (6)

comment:1 Changed 13 years ago by Jean-Paul Calderone

Description: modified (diff)
Priority: normalhigh

This has been bugging me for a while as well.

comment:2 Changed 13 years ago by David Reid

The actual source of this bug is fixed, but supporting pyxattr is non-trivial. Bob's xattr module does support a compatible api but the errors given by the various functions seem to differ. pyxattr also doesn't seem to work on directories, I don't know if this is a limitation of pyxattr or the underlying filesystem but it would need to be worked around, probably by creating an empty file to store properties on if the current resource represents a directory (example: .DS_store) Given these differences, I don't care enough to fix it. I hope this information will be useful to someone who does.

comment:3 Changed 13 years ago by jknight

Owner: changed from jknight to David Reid

While you may not care to fix, it's more you than me. :)

comment:4 Changed 13 years ago by jknight

Cc: Wilfredo Sánchez Vega David Reid spiv Jean-Paul Calderone added
Component: web2web2.dav

comment:5 Changed 13 years ago by David Reid

Resolution: fixed
Status: newclosed

This ticket isn't about supporting pyxattr, i think it's safe to close it, if someone actually wants pyxattr support they should file a new ticket. But considering the other xattr works on linux just fine i don't think it should be a high priority.

comment:6 Changed 9 years ago by <automation>

Owner: David Reid deleted
Note: See TracTickets for help on using tickets.