Skip to content

source show: include pypi and additional information about order#5680

Closed
abn wants to merge 2 commits into
python-poetry:mainfrom
abn:commands-soruces-info
Closed

source show: include pypi and additional information about order#5680
abn wants to merge 2 commits into
python-poetry:mainfrom
abn:commands-soruces-info

Conversation

@abn
Copy link
Copy Markdown
Member

@abn abn commented May 24, 2022

$ poetry source show -v
 name       : pypi-simple             
 url        : https://pypi.org/simple 
 default    : no                      
 secondary  : no                      

 name       : pypi                     
 url        : https://pypi.org/simple/ 
 default    : no                       
 secondary  : yes                      

Poetry will search all of the above package sources when searching for packages.

All other things equal, for a give package that is available from multiple sources, it will be preferred in the order listed above.

For example, if a package foo is available in both pypi-simple and pypi, Poetry will select pypi-simple.

You can override this, by explicitly specify the source when adding the package.

    $ poetry add --source pypi foo

Alternatively, you can set all your custom sources as secondary.

@abn abn requested a review from a team May 24, 2022 13:45
@abn abn marked this pull request as ready for review May 24, 2022 13:45
@abn abn added the area/docs Documentation issues/improvements label May 24, 2022
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 24, 2022

Deploy preview for website ready!

✅ Preview
https://website-4nabiqdce-python-poetry.vercel.app

Built with commit 5869194.
This pull request is being automatically deployed with vercel-action

@abn abn added the area/cli Related to the command line label May 24, 2022
["<info>url</>", f" : {source.url}"],
[
"<info>default</>",
f" : {bool_string.get(source.default, False)}",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this False be "no"? And the same in line 38?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

False is the default value if source.default is None.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, but if I understand this right, we want to display default: yes or default: no. With False, it will be default: False.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, fair point... bool_string.get(bool(source.default)) might lead to the desired behavior.

@Secrus Secrus self-assigned this May 21, 2023
@abn
Copy link
Copy Markdown
Member Author

abn commented Jan 8, 2025

Closing in favour of #9974.

@abn abn closed this Jan 8, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 8, 2025

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

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/cli Related to the command line area/docs Documentation issues/improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants