Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML-RPC doesn't support MultiCall #3734

Closed
PrimozGodec opened this issue Apr 17, 2018 · 3 comments
Closed

XML-RPC doesn't support MultiCall #3734

PrimozGodec opened this issue Apr 17, 2018 · 3 comments
Assignees

Comments

@PrimozGodec
Copy link

PrimozGodec commented Apr 17, 2018

New API differ from the old API (pypi.python.org/pypi/):

  • search method work different e.g. search({'keywords': "orange3 add-on"}) returns empty list because of space
  • MultiCall is not supported.

I know that this API is deprecated but would ask if there is an option to make functionalities work same to support old versions of the softwares.

@ewdurbin
Copy link
Member

Search issue is likely #3717

MultiCall must not be supported by our RPC implementation, https://github.com/Pylons/pyramid_rpc

@espoelstra
Copy link

@PrimozGodec if you point to https://legacy.pypi.org does that address your needs for the time being, and eventually do you want/expect the new API to support some of the same functionality?

@di di changed the title Back-compatibility with an old XML-RPC API XML-RPC doesn't support MultiCall Apr 18, 2018
@di di added the APIs/feeds label Apr 18, 2018
@mcdonc
Copy link

mcdonc commented Apr 20, 2018

FTR, something like this (untested) in warehouse/legacy/api/xmlrpc/views.py is one way to go to support this:

@xmlrpc_method(method='system.multicall')
def multicall(request):
    args = request.rpc_args
    responses = []
    for arg in args:
        name = arg.get('methodName')
        params = arg.get('params')
        if name == 'system.multicall':
            raise Exception
        if not name:
            raise Exception
        subreq = Request.blank('/RPC2', base_url=request.application_url)
        subreq.method = 'POST'
        subreq.body = xmlrpclib.dumps(arg)
        response = request.invoke_subrequest(subreq, use_tweens=True)
        responses.append(xmlrpclib.loads(response.body))
    return responses

@di di self-assigned this Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants