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

handle [[source]] without url - raise PipenvUsageError #3447

Merged
merged 3 commits into from Jan 17, 2019

Conversation

AdamGold
Copy link
Contributor

@AdamGold AdamGold commented Jan 16, 2019

Thank you for contributing to Pipenv!

The issue

Fixes #2373 where sources[0]['url'] raises a KeyError.

The fix

Raises PipenvUsageError with better description.

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

@AdamGold AdamGold changed the title handle non-URL sources - raise PipenvUsageError handle [[source]] without url - raise PipenvUsageError Jan 16, 2019
pipenv/utils.py Outdated Show resolved Hide resolved
@jxltom
Copy link
Contributor

jxltom commented Jan 17, 2019

Thanks for the PR! Do you mind merging fixed test getting empty URL in source and add test to invalid prepare_pip_source_args and change error to be mo… into one commit (same for address CR - relative import and handle non-URL sources - raise PipenvUsageError) and then force-push your PR? We would like to keep the commits clean. Thanks!

news/2373.bugfix.rst Outdated Show resolved Hide resolved
@AdamGold AdamGold force-pushed the feature/pip_source_args_error_handling branch from e47a813 to 070da4b Compare January 17, 2019 12:01
@AdamGold AdamGold force-pushed the feature/pip_source_args_error_handling branch from 070da4b to d6b20a7 Compare January 17, 2019 12:08
@AdamGold
Copy link
Contributor Author

All done 🎉

…re descriptive. (+1 squashed commit)

Squashed commits:
[b00fb5b] fixed test getting empty URL in source
@AdamGold AdamGold force-pushed the feature/pip_source_args_error_handling branch from d6b20a7 to c3e3cfb Compare January 17, 2019 12:11
@jxltom
Copy link
Contributor

jxltom commented Jan 17, 2019

Thanks @AdamGold ! Looks good to me.

@jxltom jxltom merged commit 32a5e16 into pypa:master Jan 17, 2019
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.

Better error messages (instead of exceptions) when parsing malformed [[source]] section
2 participants