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

Add SearchScope class for --find-links and --index-url related options #6624

Merged
merged 1 commit into from
Jun 21, 2019

Conversation

cjerdonek
Copy link
Member

This is the first of two PR's to add a SearchScope class to encapsulate the --find-links and --index-url-related options.

The current PR adds the class and stores search_scope on PackageFinder instead of find_links and index_urls. The second PR will change PackageFinder.create() to accept a SearchScope object instead of find_links and index_urls.

This change has a number of benefits, including--

  1. Reduces the number of arguments to PackageFinder() and PackageFinder.create(),
  2. Further simplifies the PackageFinder class and index.py by extracting more code from it, and
  3. Provides a nicer encapsulation of the --find-links and --index-url options, which makes things easier to test and will give us more flexibility in handling those options.

@cjerdonek cjerdonek added type: refactor Refactoring code skip news Does not need a NEWS file entry (eg: trivial changes) C: finder PackageFinder and index related code labels Jun 18, 2019
@cjerdonek cjerdonek changed the title Add SearchScope class Add SearchScope class for --find-links and --index-url related options Jun 18, 2019
@cjerdonek
Copy link
Member Author

@xavfernandez Pinging you on this as it's very similar to the TargetPython PR you recently reviewed. Thanks if you can take a look!

@cjerdonek cjerdonek merged commit c3c61b5 into pypa:master Jun 21, 2019
@cjerdonek cjerdonek deleted the add-search-scope branch June 21, 2019 14:31
@pradyunsg
Copy link
Member

This is pretty cool! :D

@cjerdonek
Copy link
Member Author

Thanks!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jul 21, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jul 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: finder PackageFinder and index related code skip news Does not need a NEWS file entry (eg: trivial changes) type: refactor Refactoring code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants