Skip to content

option parsing fixes #1202

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 6 commits into from
Sep 17, 2013
Merged

option parsing fixes #1202

merged 6 commits into from
Sep 17, 2013

Conversation

qwcode
Copy link
Contributor

@qwcode qwcode commented Sep 17, 2013

fixes for #70, #1084, and #1195

starts with an old commit from @gvalkov, then more commits and tests from me.

(using some old PR's from @hltbra to navigate thru this; probably one more PR coming after this with some logging fixes)

gvalkov and others added 6 commits September 15, 2013 21:28
This patch removes the error prone step of merging the baseparsers'
options (the 'Generic Options') with those of the subparser. In fact,
commands are already capable of parsing all options present in the
'Generic Options' option group. The option parsing logic is as follows:

Given a command line such as:
  '--timeout 5 install --user pkg'
pip.parseopt() returns command 'install' with arguments:
  '--timeout 5 --user pkg'
pip.main() executes the above as:
  commands['install'](parser).main('--timeout 5 --user pkg', options)
2) have `create_main_parser` mark the parser as the 'main' parser.
3) remove an extraneus block that's never called.  thanks @Netspyer.
4) move 'create_main_parser` to __init__ to avoid circular or embedded imports.
jezdez added a commit that referenced this pull request Sep 17, 2013
@jezdez jezdez merged commit 1229cf0 into pypa:develop Sep 17, 2013
@dstufft dstufft mentioned this pull request Aug 30, 2014
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants