forked from python-poetry/poetry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure repository deletion is consistent (python-poetry#6214)
This change improves the consistency of `Pool().remove_repository()` to make it easier to write poetry plugins which mutate the repository pool. 1. Deleting an element from the middle of `Pool()._repositories` decrements the index of later entries. Update `Pool()._lookup` to reflect this. 2. If a primary repository is deleted, decrement `Pool()._secondary_start_idx` to ensure that any additional primary repositories are still added before all secondary repositories. 3. If the default repository is deleted, reset `Pool()._default` so a new one can be added. Co-authored-by: Randy Döring <30527984+radoering@users.noreply.github.com>
- Loading branch information
1 parent
e7f864d
commit d708104
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters