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

Fix python path dependencies with file #2519

Merged

Conversation

lfdebrux
Copy link
Contributor

@lfdebrux lfdebrux commented Sep 10, 2020

This should fix #1977

This PR updates the regex in Dependabot::Python::FileFetcher.parse_path_setup_paths to ignore if there is a file: at the beginning of the requirement path.

It can be helpful when testing file fetchers to be able to see what
requests are being made by the specs. This commit makes it easier to
add a debug logger to VCR; if you set the envvar
DEPENDABOT_TEST_DEBUG_LOGGER to a valid path debug logs will be saved to
that file.
Currently if a requirement file contains a path dependency where the
path starts with `file:`, the file fetcher will try and find a file
called `/file:./setup.py`, which fails because it should be looking for
`setup.py`.

This commit updates Dependabot::Python::FileFetcher to ignore the
`file:` part if it is present.
@lfdebrux lfdebrux force-pushed the lfdebrux/fix-python-path-dependencies-with-file branch from b4fe74d to aaacc97 Compare September 10, 2020 14:52
Copy link
Member

@jurre jurre left a comment

Choose a reason for hiding this comment

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

This makes sense to me, thanks for the contribution! 👍 (will merge this in once CI passes)

@jurre jurre merged commit 8991327 into dependabot:main Sep 10, 2020
@lfdebrux lfdebrux deleted the lfdebrux/fix-python-path-dependencies-with-file branch September 10, 2020 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python pip-compile "-e file:." requirement causes Dependabot to fail
2 participants