Add --use-feature and --deprecated-feature flags

This commit is contained in:
Pradyun Gedam 2020-07-03 18:44:02 +05:30
parent af3080f43e
commit cd95531951
No known key found for this signature in database
GPG Key ID: DA17C4B29CB32E4B
1 changed files with 27 additions and 2 deletions

View File

@ -906,8 +906,31 @@ unstable_feature = partial(
action='append',
default=[],
choices=['resolver'],
help=SUPPRESS_HELP, # TODO: Enable this when the resolver actually works.
# help='Enable unstable feature(s) that may be backward incompatible.',
help=SUPPRESS_HELP, # TODO: drop this in pip 20.3
) # type: Callable[..., Option]
use_new_feature = partial(
Option,
'--use-feature',
dest='features_enabled',
metavar='feature',
action='append',
default=[],
choices=['2020-resolver'],
help='Enable new functionality, that may be backward incompatible.',
) # type: Callable[..., Option]
use_deprecated_feature = partial(
Option,
'--deprecated-feature',
dest='deprecated_features_enabled',
metavar='feature',
action='append',
default=[],
choices=[],
help=(
'Enable deprecated functionality, that will be removed in the future.'
),
) # type: Callable[..., Option]
@ -939,6 +962,8 @@ general_group = {
no_color,
no_python_version_warning,
unstable_feature,
use_new_feature,
use_deprecated_feature,
]
} # type: Dict[str, Any]