python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.29k stars 2.26k forks source link

`poetry init` finds 20 packages but only shows 10 #5033

Closed cu closed 2 years ago

cu commented 2 years ago

Issue

When running the poetry init wizard to initialize a new project, the section to define dependencies will find up to 20 matches but only display 10, with no (obvious) way to see the others

$ poetry init -vvv

This command will guide you through creating your pyproject.toml config.

Package name [foo]:  
Version [0.1.0]:  
Description []:  
Author [<censored>, n to skip]:  
License []:  
Compatible Python versions [^3.9]:  

Would you like to define your main dependencies interactively? (yes/no) [yes] 
You can specify a package in the following forms:
  - A single name (requests)
  - A name and a constraint (requests@^2.23.0)
  - A git url (git+https://github.com/python-poetry/poetry.git)
  - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)
  - A file path (../my-package/my-package.whl)
  - A directory (../my-package/)
  - A url (https://example.com/packages/my-package-0.1.0.tar.gz)

Search for package to add (or leave blank to continue): python
Found 20 packages matching python

Enter package # to add, or the complete package name if it is not listed: 
 [0] python101
 [1] Python123
 [2] python4
 [3] python2
 [4] python7
 [5] python9909
 [6] python-42
 [7] python42
 [8] python-geoip-python3
 [9] python-dubbo-support-python3
 > 
finswimmer commented 2 years ago

Hello @cu,

that's intended. It doesn't make sense to show all results and the user has to scroll to in endless list. Of course we could improve the message to let the user know that Poetry cuts the result.

fin swimmer

albertogomcas commented 2 years ago

Hello @cu,

that's intended. It doesn't make sense to show all results and the user has to scroll to in endless list. Of course we could improve the message to let the user know that Poetry cuts the result.

fin swimmer

It does not really make sense if it refuses to take the name for the package and keeps showing the partial list

Search for package to add (or leave blank to continue): PyQt5
Found 20 packages matching PyQt5

Enter package # to add, or the complete package name if it is not listed:
 [0] PyQt6
 [1] PyQt6-Charts
 [2] PyQt5-stubs
 [3] pyqt4topyqt5
 [4] pyqt2waybinding
 [5] PyQt-builder
 [6] pyqt_client
 [7] vsutillib-pyqt
 [8] PyQt5Designer
 [9] pyqt5ac

 > PyQt5
Value "PyQt5" is invalid

Enter package # to add, or the complete package name if it is not listed:
 [0] PyQt6
 [1] PyQt6-Charts
 [2] PyQt5-stubs
 [3] pyqt4topyqt5
 [4] pyqt2waybinding
 [5] PyQt-builder
 [6] pyqt_client
 [7] vsutillib-pyqt
 [8] PyQt5Designer
 [9] pyqt5ac
 >

poetry add PyQt5 works, BTW.

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.