Skip to content

Conversation

@LouisLau-art
Copy link

Fixes #612.

requirements-txt-fixer sorts entries by name, which causes --extra-index-url to be placed before --index-url. Pip processes these options in order, and this ordering can change behavior.

This adds a small sort special-case so --index-url is always ordered before --extra-index-url, and includes a regression test.

Test plan:

  • python -m pytest -q tests/requirements_txt_fixer_test.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

requirements-txt-fixer ordering breaks using --index-url and --extra-index-url together in requirements.txt

1 participant