-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
C: configurationConfiguration management and loadingConfiguration management and loadingtype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behaviortype: enhancementImprovements to functionalityImprovements to functionality
Description
Environment
- pip version: 20.2
- Python version: 3.7.7
- OS: Fedora 30
Description
I made a bad guess for the syntax of how to enable two pip features permanently, and rendered pip completely broken with a simple pip config set command.
Expected behavior
One or both of the following:
- a syntax check when doing
pip config setwould reject an invalid value - the invalid configuration value would be a warning and still let pip continue
How to Reproduce
- Enable a non-existing feature using
pip config set global.use-feature <feature> - Try to use any pip subcommand (or just
pip) - Pip crashes with an error message
Output
$ pip config set global.use-feature 2020-resolver,fast-deps
Writing to /home/akaihola/.config/pip/pip.conf
$ pip
An error occurred during configuration: option use-feature: invalid choice: '2020-resolver,fast-deps' (choose from '2020-resolver', 'fast-deps')
$ pip config unset --user global.use-feature
An error occurred during configuration: option use-feature: invalid choice: '2020-resolver,fast-deps' (choose from '2020-resolver', 'fast-deps')The work-around:
$ rm $HOME/.config/pip/pip.conf
McSinyx, melvio, SixBeeps, haqishen, ZYQInG888 and 2 more
Metadata
Metadata
Assignees
Labels
C: configurationConfiguration management and loadingConfiguration management and loadingtype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behaviortype: enhancementImprovements to functionalityImprovements to functionality