-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Hi there,
the current package seem to require lxml, yet this module only uses the etree interface, which has a builtin C and Python implementation (xml.etree.cElementTree and xml.etree.ElementTree). As such, you could make lxml an optional dependency, which would make the webdav module way easier to setup on machines without compilers as well as Python implementations other than CPython.
The fix is straightforward: in webdav/client.py, replace
import lxml.etree as etreewith
try:
from lxml import etree
except ImportError:
try:
from xml.etree import cElementTree as etree
except ImportError:
from xml.etree import ElementTree as etreethis way, the lxml implementation is used if available; otherwise, the C implementation is used; if it's not available, the plain Python implementation is used. Then, you could remove lxml from the hard dependencies !
Metadata
Metadata
Assignees
Labels
No labels