Skip to content

Rework command handling #463

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

Closed
wants to merge 1 commit into from
Closed

Conversation

gvalkov
Copy link
Contributor

@gvalkov gvalkov commented Mar 1, 2012

Rework pip command handling

  • Remove module-singleton baseparser.parser object. A parser instance is
    created in pip.main() and passed as the first argument to each command. Each
    command can access the main parser from self.main_parser.
  • Remove all global command instances. Commands are instantiated on demand in
    pip.main(). Deferred command module imports were removed.
  • Factor option handling out of pip.main() and into pip.parseopts()
  • The list of available commands is now part of the parser's description and
    comes before all other options. 'Pip help' is more targeted at showing the
    options of a command instead of all available commands.
  • Move command specific options under a 'Command Options' OptionGroup
  • Move general options under a 'General Options' OptionGroup

This pull request depends on pull requests 464 465 466

@gvalkov
Copy link
Contributor Author

gvalkov commented Mar 1, 2012

Apologies for the monstrous commit, but most of the changes were very intertwined. This pull request can be considered a precursor to the improved option handling that is described in pull request 428.


epilog = '''
Further help:
- man 5 pip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

man? AFAIK there is no man page support for pip.

It is an open issue indeed: #415

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. This is a remnant of pull request 428. I'll remove it.

@gvalkov
Copy link
Contributor Author

gvalkov commented Mar 3, 2012

Test merge and travis ci build of 464. 465. 466 and 463.

@pnasrat
Copy link
Contributor

pnasrat commented May 13, 2012

Needs reworking to cleanly apply as I've merged 464.

@gvalkov
Copy link
Contributor Author

gvalkov commented May 14, 2012

Can we get #465 in first? I'll rebase with develop and give it another round of testing once that's done. Thanks.

@pnasrat
Copy link
Contributor

pnasrat commented May 14, 2012

Have done 465, look forward to the next round of review/testing.

 * Remove module-singleton baseparser.parser object. A parser instance is
   created in pip.main() and passed as the first argument to each command. Each
   command can access the main parser from self.main_parser.

 * Remove all global command instances. Commands are instantiated on demand in
   pip.main(). Deferred command module imports were removed.

 * Factor option handling out of pip.main() and into pip.parseopts()

 * The list of available commands is now part of the parser's description and
   comes before all other options. 'Pip help' is more targeted at showing the
   options of a command instead of all available commands.

 * Move command specific options under a 'Command Options' OptionGroup
 * Move general options under a 'General Options' OptionGroup

Conflicts:

	pip/__init__.py
@gvalkov
Copy link
Contributor Author

gvalkov commented May 15, 2012

Patch rebased. It looks like this request will conflict a bit with #519, #517 and possibly others. I can work on resolving those if need be, but I really hope this gets in first even though it's mostly refactoring.

@gvalkov
Copy link
Contributor Author

gvalkov commented Dec 16, 2012

Superseded by #721 and #744.

@gvalkov gvalkov closed this Dec 16, 2012
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 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