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

XMLRPC error on pip search #510

Open
sudocurse opened this issue May 28, 2024 · 0 comments
Open

XMLRPC error on pip search #510

sudocurse opened this issue May 28, 2024 · 0 comments

Comments

@sudocurse
Copy link

sudocurse commented May 28, 2024

I believe this is a known-ish issue but couldn't find anything on github tracking it- sorry if this is a duplicate report.

I used import requests as r; exec(r.get('https://bit.ly/get-stash').content) to install, relaunched pythonista and spawned a stash shell. Then tried to search with pip:

Tip: Use mc to access files in your Dropbox or on a FTP-Server
[~/Documents]$ pip
site-packages/stash/bin/pip.py:35: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.util import convert_path
Error: unknown command: None
stash: ^C
KeyboardInterrupt: Exit: 1

[~/Documents]$ pip search cowsay
stash: <class 'xmlrpc.client.Fault'>: <Fault -32500: "RuntimeError: PyPI no longer supports 'pip search' (or XML-RPC search). Please use https://pypi.org/search (via a browser) instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.">
[~/Documents]$ selfupdate
Running selfupdate ...
Target: ywangd:master
Checking for new version ...
Already at latest version

Seems like this is a known issue that search still tries to use the deprecated xmlrpc endpoint- although I don't understand the comment in the search function.

Was the reasoning to maintain the ability to partial search? If so, since the endpoint is down, compatibility is already broken. Instead, can search simply return the results of _package_data?

Otherwise, as I believe the comment suggests, it seems like the solution would be to request https://pypi.org/simple/ or similar and grep.py or search over the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant