-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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: Allow extra-index-url to precede index-url #11621
base: main
Are you sure you want to change the base?
Conversation
pre-commit.ci autofix |
index_urls = [opts.index_url] | ||
if PyPI.simple_url in index_urls: | ||
index_urls.remove(PyPI.simple_url) | ||
index_urls.append(opts.index_url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is too difficult to make sense of if you consider the surrounding code and all possible circumstances. It may be better to modify some logic in PackageFinder so finder.index_urls
does not automatically add the default index (PyPI.simple_url
) eagerly, but still have it as a default if no extra indexes are added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mainly because this function is called on each line of the file without any context. The upper layer is also the generator. If you modify it according to this idea, you may need to modify it at the outermost layer
I'm sorry. Actually, I'm not familiar with the overall structure of this project.
is this still being developed? |
Any update on this? |
fix #11511
fix python-poetry/poetry-plugin-export#149