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

Warn when dropping index URL value to directory #5836

Merged

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented Oct 1, 2018

Close #5827. I opt to only add the warning for now instead of refactoring the whole thing. expand_dir adds a lot of complexity to this function, and I want to eliminate it first. I think it would be easier to get the function to work “properly” before changing how its invoked.

@uranusjr uranusjr force-pushed the bugfix-warn-directory-path-drop-index-url branch from 1ac5caf to 5ccbf49 Compare October 1, 2018 05:59
else:
logger.warning(
"Path '{0}' is ignored: "
"it is a directory.".format(url),
Copy link
Member

Choose a reason for hiding this comment

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

Nit: this should be path (though they should be equal), right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Gosh, uh, I… guess? Since the outer condition specifies is_local_path or is_file_url, but the one above takes is_file_url, so this leaves only is_local_path and not is_file_url, which would have triggered path = url. It’s so difficult to keep this straight.

@uranusjr uranusjr force-pushed the bugfix-warn-directory-path-drop-index-url branch from 5ccbf49 to 8dcae5b Compare October 1, 2018 06:50
@cjerdonek cjerdonek added type: enhancement Improvements to functionality C: finder PackageFinder and index related code labels Oct 1, 2018
@cjerdonek
Copy link
Member

@pradyunsg Can this go in, too?

@cjerdonek cjerdonek added this to the Internal Cleansing milestone Oct 1, 2018
@cjerdonek cjerdonek merged commit 69b5917 into pypa:master Oct 8, 2018
@uranusjr uranusjr deleted the bugfix-warn-directory-path-drop-index-url branch November 1, 2018 08:33
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 24, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 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 type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--index-url with local path is dropped silently if directory exists
3 participants