Test suite doesn't support libxml2 builds without HTTP or zlib
Bug #2066270 reported by
Nick Wellnhofer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Triaged
|
Medium
|
Unassigned |
Bug Description
HTTP support will eventually be removed from libxml2. Support for zlib and lzma maybe as well.
It would be nice if the lxml test suite could skip affected tests if the features aren't available, preferably with a runtime check using xmlHasFeature(
Regarding output compression, lxml already has some code to compress output using Python's gzip module. It might make sense to always handle compression directly instead of relying on libxml2.
To post a comment you must log in.
Thanks for the notification, Nick.
lxml can probably live without HTTP support in libxml2, given that most HTTP access actually means HTTPS these days.
But the nice thing about direct gzip support is that there's neither Python object overhead for the compression/file access, nor a dependency on the Python GIL, nor the need to hold larger uncompressed output chunks in memory. I'd rather start talking to zlib directly than losing all that. However, linking against zlib means even more complication for the build process. The same applies to lzma. While both are part of the normal Python installation, linking against the (sometimes) Python shipped C libraries isn't easy or even possible, depending on the platform.
I'll add at least feature flags to the API so that users can detect if support is available.