A bug fix in the extra-index-url argument for az extension add and update commands.#5491
Merged
derekbekoe merged 9 commits intodevfrom Feb 6, 2018
unknown repository
Merged
A bug fix in the extra-index-url argument for az extension add and update commands.#5491derekbekoe merged 9 commits intodevfrom unknown repository
derekbekoe merged 9 commits intodevfrom
unknown repository
Conversation
* Update History.rst file. * Added first version of az extension add --extra-index-url test. * Added first version of az extension add --extra-index-url test. * Pep8 fixing * Pep8 fixing. * Pep 8 fix. * Modified the extra-index-url test. Modified the code to give preference to --extra-index-urls * Added some bebug statement. * Hopefully all build problems fixed. * Hopefully all build problems fixed. * Removed prints.
* Resolved PR comments. * Removed unnecessary extra index url precedence logic.
|
View a preview at https://prompt.ws/r/Azure/azure-cli/5491 |
derekbekoe
suggested changes
Feb 6, 2018
Member
derekbekoe
left a comment
There was a problem hiding this comment.
No need for the v. no. changes.
LGTM otherwise.
| 0.0.10 | ||
| ++++++ | ||
| A bug fix in the --extra-index-url argument in az extension add and update commands. | ||
|
|
Member
There was a problem hiding this comment.
We haven't released 0.0.9 yet so you can just modify the entry you created prev. for that one.
| cmdclass = {} | ||
|
|
||
| VERSION = "0.0.9" | ||
| VERSION = "0.0.10" |
Member
There was a problem hiding this comment.
Then no need to change the version no.
derekbekoe
approved these changes
Feb 6, 2018
LukaszStem
pushed a commit
to LukaszStem/azure-cli
that referenced
this pull request
Feb 21, 2018
…date commands. (Azure#5491) * Added the extra-index-urls change to az extension add and update commands. * Bumped the version. * Added --extra-index-url support. Added tests. (Azure#1) * Update History.rst file. * Added first version of az extension add --extra-index-url test. * Added first version of az extension add --extra-index-url test. * Pep8 fixing * Pep8 fixing. * Pep 8 fix. * Modified the extra-index-url test. Modified the code to give preference to --extra-index-urls * Added some bebug statement. * Hopefully all build problems fixed. * Hopefully all build problems fixed. * Removed prints. * Resolved PR comments. (Azure#2) * Removed precedence for extra index urls * Resolved PR comments. * Removed unnecessary extra index url precedence logic. * Updated the version number. * Changed the argument name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR fixes the following bug.
While adding the support for --extra-index-url in az extension add and update commands, I assumed --extra-index-url argument in pip install to be defined using nargs='+'. But that is not the case, it uses action='append'.
So, I changed the pip command accordingly and also modified the tests.
The pip code for extra-index-url is at this link.
https://github.com/pypa/pip/blob/master/src/pip/_internal/cmdoptions.py#L260
A simple code that shows the bug that the PR resolves.
import argparse
parser = argparse.ArgumentParser(prog='PROG', usage='%(prog)s [options]')
parser.add_argument('--foo', action='append', help='foo help')
parser.parse_args(['--foo', 'YYY', '--foo', 'abc'])
parser.parse_args(['--foo', 'YYY', 'abc'])
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
Command Guidelines
(see Authoring Command Modules)