[New-bugs-announce] [issue6499] Can't import xmlrpclib, DocXMLRPCServer and SimpleXMLRPCServer when zlib is not available

Ezio Melotti report at bugs.python.org
Fri Jul 17 04:20:08 CEST 2009


New submission from Ezio Melotti <ezio.melotti at gmail.com>:

I'm working on #6026 and I noticed that the patch for #6267 introduced
an "import gzip" in Lib/xmlrpclib.py in r73638.
gzip tries to import zlib, and if it's not available the import fails.
This led to 3 new tests failures in the trunk: test_xmlrpc,
test_docxmlrpc and test_multiprocessing.
This also mean that the modules xmlrpclib, DocXMLRPCServer and
SimpleXMLRPCServer (and possibly others) cannot be imported anymore if
zlib is not available (they used to work on 2.6).

xmlrpclib should check if the "import gzip" fails and disable the new
gzip-related features (raising an error only when someone tries to use
them).

I don't know if this check can be moved directly on gzip but it seems
unlikely.

----------
assignee: krisvale
messages: 90599
nosy: ezio.melotti, krisvale
priority: normal
severity: normal
stage: needs patch
status: open
title: Can't import xmlrpclib, DocXMLRPCServer and SimpleXMLRPCServer when zlib is not available
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6499>
_______________________________________


More information about the New-bugs-announce mailing list