8000 xmlrpc.server module provided by future is incomplete · Issue #280 · PythonCharmers/python-future · GitHub
[go: up one dir, main page]

Skip to content
xmlrpc.server module provided by future is incomplete #280
Open
@mschmitzer

Description

@mschmitzer

Installing the future package provides an xmlrpc.server module that is not present in the python2.7 standard library (but is present in python3). Since the module provided by future only contains the contents of xmlrpclib, it lacks some items present in the python3 package, thus breaking code that assumes to be running under python3 when xmlrpclib.server is available.

Examples:

  • Clean virtualenv, python2.7
>>> import xmlrpc.server
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named xmlrpc.server
>>> import SimpleXMLRPCServer
>>> SimpleXMLRPCServer
<module 'SimpleXMLRPCServer' from '/usr/lib/python2.7/SimpleXMLRPCServer.pyc'>
>>> SimpleXMLRPCServer.SimpleXMLRPCDispatcher
<class SimpleXMLRPCServer.SimpleXMLRPCDispatcher at 0x7fc4f5e58bb0>
  • Virtualenv with future installed, python2.7
>>> import xmlrpc.server
>>> xmlrpc.server
<module 'xmlrpc.server' from '/home/marc/.venv/test/local/lib/python2.7/site-packages/xmlrpc/server.pyc'>
>>> xmlrpc.server.SimpleXMLRPCDispatcher
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'SimpleXMLRPCDispatcher'
  • python3
>>> import xmlrpc.server
>>> xmlrpc.server.SimpleXMLRPCDispatcher
<class 'xmlrpc.server.SimpleXMLRPCDispatcher'>

This forces projects that use xmlrpclib to workarounds such as tcalmant/jsonrpclib#30 .

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0