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

fix: don't use pypi.org when pypi.url is set #2563

Merged
merged 1 commit into from
Jan 16, 2024
Merged

fix: don't use pypi.org when pypi.url is set #2563

merged 1 commit into from
Jan 16, 2024

Conversation

XYenon
Copy link
Contributor

@XYenon XYenon commented Jan 16, 2024

Pull Request Checklist

  • A news fragment is added in news/ describing what is new.
  • Test cases added for changed code.

Describe what you have changed in this PR.

Set index_urls and find_links when init finder. Fix #2560

Copy link
Collaborator

@frostming frostming left a comment

Choose a reason for hiding this comment

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

Thanks for the patch. However, this fix doesn't seem right.

The approach intentionally is to keep the order of the source order defined in pyproject.toml. But this patch changes that.

You can clear the finder.sources before the for source in sources line.

@XYenon
Copy link
Contributor Author

XYenon commented Jan 16, 2024

The approach intentionally is to keep the order of the source order defined in pyproject.toml.

If the order between index_urls and find_links is important, maybe unearth.PackageFinder should receive a sources parameter, rather than separate index_urls and find_links?

@frostming
Copy link
Collaborator

frostming commented Jan 16, 2024

maybe unearth.PackageFinder should receive a sources parameter, rather than separate index_urls and find_links?

It already offers add_index_url and add_find_links for that purpose, directly specifying sources is a more difficult interface to users because the source has its own structure. We could, however, change it to initialize with an empty sources, but that requires changes on the unearth side. Please fix as the previous comment.

@audricsun
Copy link

I ran into this earlier today, and it's like it's caused by a upgrade from unearth, so I pinned down those to make it work on my side

pip install pdm unearth==0.12.1 urllib3==1.26.16

@frostming frostming merged commit 22808c9 into pdm-project:main Jan 16, 2024
19 checks passed
@j178 j178 mentioned this pull request Apr 3, 2024
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

Successfully merging this pull request may close these issues.

config pypi.url does't work at docker build
3 participants