poetry
poetry copied to clipboard
Add support to `poetry show` for packages that are not installed
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
- [x] I have searched the FAQ and general documentation and believe that my question is not already covered.
Feature Request
I am working on publishing a package using poetry publish
. Before publishing, I would like to check what versions of my package are already available on Pypi, so that I can ensure that I don't overwrite an existing version.
Poetry has some functionality, that lets you interact with Pypi including:
-
poetry show --latest foo
(note this only works for packages that you depend on - if you don't havefoo
in your dependencies the command doesn't work) -
poetry search foo
It would be awesome if we could use poetry info foo
or poetry show foo
to get info on packages that are not currently installed (or is the current package).
Ideally, it would have format something like this:
$ poetry info black
name : black
version : 22.10.0
description : The uncompromising code formatter.
dependencies
- click >=8.0.0
- mypy-extensions >=0.4.3
- pathspec >=0.9.0
- platformdirs >=2
- tomli >=1.1.0
- typing-extensions >=3.10.0.0
And maybe a command to list all of the versions:
poetry info black --verisons
22.10.0
22.9.0
22.7.0
...
There are existing projects with similar purpose - eg quick google finds https://pypi.org/project/pypi-command-line/ - suggest using that or similar. poetry doesnt have to do everything!
I just found this issue and came here being surprised that poetry show PACKAGENAME
does not show me info about an available package in some repository that would get installed/added when I run poetry add PACKAGENAME
- which I somehow took for granted given that many other package managers like apt, rpm, pip, gem etc have a function like that...
I absolutely agree poetry doesn't need to do everything, but at the same time this is a common function pattern and not really unrelated top the tasks people use poetry. So as a user it would be quite natural and a good experience.
I guess that's a consequence from the fact that poetry is more like a build system than a package manager, but still, being able to cast show
at least for the package one is currently developing seems like a must to me.
this is a must for me too .. +1