-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Remove the pip search command #5216
Comments
I've rarely used I'd like to see a good search facility on PyPI, and if there were one, I'd want to be able to use it on the command line as So I guess I'm -1 on removing (Another option is that we could develop a plugin API and delegate producing a good |
@pfmoore Is there a functional difference of deprecating/removing the search command now, and if a standardized search API gets designed and implemented, adding it back at a later point? Having the command there but always returning an error seems the worst of all possible outcomes. |
Two, in my view. Both minor.
But honestly, I don't care enough to fight for its retention. I do think it deserves a deprecation cycle, but you included that in your proposal anyway, so that's fine. |
I tried a couple examples ( For the "requests" example, it looks like the reason it's picking up ~900 instead of ~100 is that the first implementation is also searching the summary string instead of just the project name, and "requests" is a common English word. For example, it picks up this:
|
Do we expect the XML-RPC API to be removed before we manage to make a search API? If that's the case, we should go ahead and pull out the band aid. Otherwise, what Paul suggests (making it loudly known that we expect |
Any interest in this? I don't mind deprecating it for removal. |
If pip search will be deprecated, which tool need to use for packages search in PyPi (not in warehouse, in public)? I ask, because, we have several internal cases when we use "pip search". Thanks in advance for the answer! |
@xnuinside I'm not sure I understand your question, specifically the "(not in warehouse, in public)" part, can you elaborate? The |
@di, Dustin, PyPI's API it is what I need) thx |
No one is opposed to actually deprecating the |
FWIW, a while back I asked what people used |
@di Thanks, I was aware of that and if that's representative of our userbase (it's not, but let's roll with the assumption), Ee's response looks like the main reason that endpoint is hit so often. None the less, deprecation is probably the best tool we have to surface any concerns users might have with removal/replacement of functionality. That should tell us if |
Just confirming, the intent is to add the deprecation warning by 20.2? The way we're talking it sounds like we might drop it in 20.2, but there's no deprecation warning being emitted to warn people! |
The plan is definitely to deprecate in 20.2. |
Quoting @nlhkabu's excellent suggestion from Zulip:
I think I'm going to go ahead and file a new issue, and use that as a URL for this message. If anyone has inputs, please let me know. I'd really like to slip this into 20.2 if possible. |
I might have missed it, but was there any follow up to the survey on how people use the search command? |
Why not just download a list of packages from an URL and grep it locally? We expect a package repository to have a search command, the default one is broken, so just y'know, make it search locally like Removing it or keeping it with error messages seems like an admission of failure. Downloading a cacheable, zipped list and grepping it isn't much of a technical challenge. Is the problem political? Edit: |
There was discussion further up that As for client-side searches of metadata, I made https://github.com/domdfcoding/pypi_search/ last week which is periodically updated with package names and summaries. But if all you want to search are package names you can download the file at https://pypi.org/simple/ and parse it – even easier with the JSON version of that page now. |
I don't think you read the entire thread. That's exactly what From this comment. |
I was wrong -- https://docs.google.com/forms/d/1-4kiVV8NnlkBrCr6x7eb8SobnS1RVRAR2xEl8iUeu24/viewform was a survey we did. One of the maintainers will need to check what the results of that were. |
Fixes are: - Update badges in `README.md` - Fix `pip search` as it's deprecated - See: pypa/pip#5216
Fixes are: - Update badges in `README.md` - Fix `pip search` as it's deprecated - See: pypa/pip#5216
Fixes are: - Update badges in `README.md` - Fix `pip search` as it's deprecated - See: pypa/pip#5216
Maybe we can switch to an alternative implementation for |
Adding a link to the UX research outputs: https://pip--10745.org.readthedocs.build/en/10745/ux-research-design/2020-research-outputs/pip-search/ |
FWIW, I'm opposed to trying to parse HTML out of pypi.org/search results -- that's inherently fragile and extremely coupled to what PyPI implements today (making that exceedingly difficult for alternative indexes to implement or for PyPI to update its HTML markup used to present that data). If PyPI added an alternative search API that had better cachability, providing better DOS protection (which has been requested already), we could switch over pip search to use that if XMLRPC doesn't work (or vice-versa). |
Why I've just spend 10 minutes reading drama, while I just wanted to |
Because the command isn't deprecated, the API on Pypi is though. You can point it to a private repo that supports XMP RPC search and it works fine. |
It's not exactly cryptic. |
As of 2023, the documentation for a command does not specify that is uses So, after years of discussion, is there a decision? :) |
why don't you just release a pip version with a workaround? this is so bad for the reputation of python in general. |
No, not yet. We’ve not changed anything in pip’s core implementation other than improving the error messaging since pypi.org unconditionally fails now. Using it with alternative indexes still works, however.
If this were just that simple, we’d have done it by now. It’s not. |
Ok, I’m gonna go ahead and say that… We’re not going to be changing the pip search command until there’s a new search API designed for PyPI. Until then, we’re going to leave the pip search implementation largely untouched on pip’s end since there’s little cost to having that logic in pip. With that rationale, I’m gonna close this out as “no, let’s keep this even if it’s non-functional with pypi.org today”. update: I assume people aren't reading the conversation above -- I've seen that the XML-RPC API works with non-PyPI package indexes that implement it (devpi and Artifactory, for example) which don't really have other "easy to use" package search APIs today outside of this. |
Thanks for tracking this @pradyunsg! I agree with closing this, since there's nothing we can do by now. |
how about contacting pypi maintainers; |
You should read the original message here, and the three first links in it. |
Locking this since this topic has run its course and I don’t expect to see any new bits of information coming out of the sort of discussion that’s been taking place here over the last few months. |
As of today (Oct 7, 2022),
pip search
does not return results with PyPI (pypi.org). Please use pypi.org/search instead.Relevant context on this that GitHub hides by default:
#5216 (comment)
#5216 (comment)
The status.python.org incident that (eventually) led to the XMLPRC
search
(which powerspip search
) being disabled on pypi.org(original description below)
Currently pip allows you to search a repository by running
pip search
, which will then print out a bunch of packages that match, see for example:The output here goes on for ~900 lines and the results are just complete trash. This is a better on Warehouse:
Which gives us ~111 lines of output, and which actually returns some meaningful output.
I believe that this command is a fairly regular source of confusion for users, primarily because it uses a different source of truth than
pip install
does, which means they need to configure the location to search at differently than they need to configure the location to install from (and the search API is not standardized, and to the best of my knowledge, very few alternative implementations support it.There has been a long standing idea of switching search to use the
PackageFinder()
class to try and resolve these issues, but I don't think that is going to work reasonably either. The problem is that while that would reconcile the differences between, PEP 503 doesn't provide any mechanism to pass information like the summary that we print alongside each result above. Speaking with my PyPI hat on, I would be very opposed to adding such information to the PEP 503 repository API, because it would bloat the responses and have them take up more bandwidth for a very minority edge case. The other problem is that thePackageFinder()
API itself doesn't fall back to/simple/
anymore, but that's resolvable but the larger issue with that is that/simple/
is 7MB large as of right now, and that is likely to continue to grow, havingpip search
issue a 7MB http request is a pretty crummy experience.So that leaves us in a bit of a sticky situation. The current implementation is confusing and practically speaking only searches PyPI and not anywhere else, but our best path forward for resolving that is a non-starter due to other concerns.
So I think we should just rip the bandaid off and deprecate and eventually remove the
pip search
command. The only other alternative I can really think of that would actually resolve this, is to switch to using/simple/
, but that would then mean getting hit with a 7MB download just to try and search.Thoughts @pypa/pip-committers?
The text was updated successfully, but these errors were encountered: