Skip to content

Refactor requirements file parsing #2697

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

Merged
merged 15 commits into from
Apr 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pip/cmdoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,16 @@ def editable():
help="Don't periodically check PyPI to determine whether a new version "
"of pip is available for download. Implied with --no-index.")

# Deprecated, Remove later
always_unzip = partial(
Option,
'-Z', '--always-unzip',
dest='always_unzip',
action='store_true',
help=SUPPRESS_HELP,
)


##########
# groups #
##########
Expand Down
14 changes: 11 additions & 3 deletions pip/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,17 @@ class DistributionNotFound(InstallationError):
"""Raised when a distribution cannot be found to satisfy a requirement"""


class RequirementsFileParseError(PipError):
"""Raised when an invalid state is encountered during requirement file
parsing."""
class RequirementsFileParseError(InstallationError):
"""Raised when a general error occurs parsing a requirements file line."""


class ReqFileOnleOneOptionPerLineError(InstallationError):
"""Raised when an option is not allowed in a requirements file."""


class ReqFileOptionNotAllowedWithReqError(InstallationError):
"""Raised when an option is not allowed on a requirement line in a requirements
file."""


class BestVersionAlreadyInstalled(PipError):
Expand Down
Loading