GitHub PullRequestEvent at 2014-08-31 06:43:20
Repository: pip
Actor: dstufft
Payload: {"action":"opened","number":2008,"pull_request":{"url":"https://api.github.com/repos/pypa/pip/pulls/2008","id":20542671,"html_url":"https://github.com/pypa/pip/pull/2008","diff_url":"https://github.com/pypa/pip/pull/2008.diff","patch_url":"https://github.com/pypa/pip/pull/2008.patch","issue_url":"https://api.github.com/repos/pypa/pip/issues/2008","number":2008,"state":"open","locked":false,"title":"[WIP] Switch from using a homegrown logging solution to the stdlib logging module","user":{"login":"dstufft","id":145979,"avatar_url":"https://avatars.githubusercontent.com/u/145979?v=2","gravatar_id":"ebf132362b622423ed5baca2988911b8","url":"https://api.github.com/users/dstufft","html_url":"https://github.com/dstufft","followers_url":"https://api.github.com/users/dstufft/followers","following_url":"https://api.github.com/users/dstufft/following{/other_user}","gists_url":"https://api.github.com/users/dstufft/gists{/gist_id}","starred_url":"https://api.github.com/users/dstufft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstufft/subscriptions","organizations_url":"https://api.github.com/users/dstufft/orgs","repos_url":"https://api.github.com/users/dstufft/repos","events_url":"https://api.github.com/users/dstufft/events{/privacy}","received_events_url":"https://api.github.com/users/dstufft/received_events","type":"User","site_admin":false},"body":"#### Overview\r\n\r\nThis PR switches us away from using our own custom logging framework and instead uses a combination of the stdlib logging and the warnings module. This will ideally give us a few benefits:\r\n\r\n* Make it easier for debug logging to include information from other libraries that we're using.\r\n* Ideally have less issues with unicode handling as we're offloading that to the standard library.\r\n* Use a system that more Python developers will be familiar with to make it easier for end users to contribute to pip.\r\n* Make pip friendlier in an eventual future where we might support using pip as a library instead of only as a CLI application.\r\n* Easily add nice features to the logging, such as being able to add an appending log instead of an overwriting log that is on by default which automatically limits it's size.\r\n\r\n\r\n#### Details\r\n\r\n* Logger - When logging things in pip you'll now use a ``logger`` module that comes from ``logging.getLogger(__name__)`` instead of a global one at ``pip.log:logger``.\r\n* Logging Levels - We'll now have the standard logging levels, ``DEBUG``, ``INFO``, ``WARNING``, ``ERROR``, ``CRITICAL``.  By default we'll log ``INFO`` and higher, while any ``--quiet`` configuration will change that to ``ERROR`` and higher, and any ``--verbose`` will change that to ``DEBUG`` and higher. The difference between ``ERROR`` and ``CRITICAL`` is that ``CRITICAL`` should generally only be used for *fatal* errors.\r\n* Deprecations - Instead of using ``logger.deprecated()`` deprecations will now be handled by using ``warnings.warn()`` with special warnings from the ``pip.utils.deprecation`` module.\r\n* Backports ``logging.config.dictConfig`` from Python 2.7 for use in Python 2.6.\r\n\r\n#### Tasks\r\n\r\n* [x] Switch from using pip.log:Logger to the stdlib logging module.\r\n* [x] Switch to using the warnings module to handle deprecations.\r\n* [x] Switch to using a logging formatter to handle indenting the log messages.\r\n* [x] Create a context manager to indent all the logging messages inside of the context manager.\r\n* [x] Simplify the ``--verbose`` and ``--quiet`` flags.\r\n* [ ] Switch to using the stdlib logging modules to handle the log files that we write.\r\n* [ ] Switch to using a custom log handler to colorize the output of the various levels.\r\n* [ ] Use a UI module external to the logging system to handle progress indicators.\r\n* [ ] Write tests for all of the new stuff and fix any broken tests.\r\n* [ ] Refactor & Cleanup.","created_at":"2014-08-31T06:43:20Z","updated_at":"2014-08-31T06:43:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pypa/pip/pulls/2008/commits","review_comments_url":"https://api.github.com/repos/pypa/pip/pulls/2008/comments","review_comment_url":"https://api.github.com/repos/pypa/pip/pulls/comments/{number}","comments_url":"https://api.github.com/repos/pypa/pip/issues/2008/comments","statuses_url":"https://api.github.com/repos/pypa/pip/statuses/70ef78e964db3c77a0431540f56d4df8e1324126","head":{"label":"dstufft:standard-logging","ref":"standard-logging","sha":"70ef78e964db3c77a0431540f56d4df8e1324126","user":{"login":"dstufft","id":145979,"avatar_url":"https://avatars.githubusercontent.com/u/145979?v=2","gravatar_id":"ebf132362b622423ed5baca2988911b8","url":"https://api.github.com/users/dstufft","html_url":"https://github.com/dstufft","followers_url":"https://api.github.com/users/dstufft/followers","following_url":"https://api.github.com/users/dstufft/following{/other_user}","gists_url":"https://api.github.com/users/dstufft/gists{/gist_id}","starred_url":"https://api.github.com/users/dstufft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstufft/subscriptions","organizations_url":"https://api.github.com/users/dstufft/orgs","repos_url":"https://api.github.com/users/dstufft/repos","events_url":"https://api.github.com/users/dstufft/events{/privacy}","received_events_url":"https://api.github.com/users/dstufft/received_events","type":"User","site_admin":false},"repo":{"id":3383276,"name":"pip","full_name":"dstufft/pip","owner":{"login":"dstufft","id":145979,"avatar_url":"https://avatars.githubusercontent.com/u/145979?v=2","gravatar_id":"ebf132362b622423ed5baca2988911b8","url":"https://api.github.com/users/dstufft","html_url":"https://github.com/dstufft","followers_url":"https://api.github.com/users/dstufft/followers","following_url":"https://api.github.com/users/dstufft/following{/other_user}","gists_url":"https://api.github.com/users/dstufft/gists{/gist_id}","starred_url":"https://api.github.com/users/dstufft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstufft/subscriptions","organizations_url":"https://api.github.com/users/dstufft/orgs","repos_url":"https://api.github.com/users/dstufft/repos","events_url":"https://api.github.com/users/dstufft/events{/privacy}","received_events_url":"https://api.github.com/users/dstufft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dstufft/pip","description":"pip installs packages. Python packages. An easy_install replacement","fork":true,"url":"https://api.github.com/repos/dstufft/pip","forks_url":"https://api.github.com/repos/dstufft/pip/forks","keys_url":"https://api.github.com/repos/dstufft/pip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dstufft/pip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dstufft/pip/teams","hooks_url":"https://api.github.com/repos/dstufft/pip/hooks","issue_events_url":"https://api.github.com/repos/dstufft/pip/issues/events{/number}","events_url":"https://api.github.com/repos/dstufft/pip/events","assignees_url":"https://api.github.com/repos/dstufft/pip/assignees{/user}","branches_url":"https://api.github.com/repos/dstufft/pip/branches{/branch}","tags_url":"https://api.github.com/repos/dstufft/pip/tags","blobs_url":"https://api.github.com/repos/dstufft/pip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dstufft/pip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dstufft/pip/git/refs{/sha}","trees_url":"https://api.github.com/repos/dstufft/pip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dstufft/pip/statuses/{sha}","languages_url":"https://api.github.com/repos/dstufft/pip/languages","stargazers_url":"https://api.github.com/repos/dstufft/pip/stargazers","contributors_url":"https://api.github.com/repos/dstufft/pip/contributors","subscribers_url":"https://api.github.com/repos/dstufft/pip/subscribers","subscription_url":"https://api.github.com/repos/dstufft/pip/subscription","commits_url":"https://api.github.com/repos/dstufft/pip/commits{/sha}","git_commits_url":"https://api.github.com/repos/dstufft/pip/git/commits{/sha}","comments_url":"https://api.github.com/repos/dstufft/pip/comments{/number}","issue_comment_url":"https://api.github.com/repos/dstufft/pip/issues/comments/{number}","contents_url":"https://api.github.com/repos/dstufft/pip/contents/{+path}","compare_url":"https://api.github.com/repos/dstufft/pip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dstufft/pip/merges","archive_url":"https://api.github.com/repos/dstufft/pip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dstufft/pip/downloads","issues_url":"https://api.github.com/repos/dstufft/pip/issues{/number}","pulls_url":"https://api.github.com/repos/dstufft/pip/pulls{/number}","milestones_url":"https://api.github.com/repos/dstufft/pip/milestones{/number}","notifications_url":"https://api.github.com/repos/dstufft/pip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dstufft/pip/labels{/name}","releases_url":"https://api.github.com/repos/dstufft/pip/releases{/id}","created_at":"2012-02-08T01:42:04Z","updated_at":"2014-06-28T04:54:49Z","pushed_at":"2014-08-31T06:19:05Z","git_url":"git://github.com/dstufft/pip.git","ssh_url":"git@github.com:dstufft/pip.git","clone_url":"https://github.com/dstufft/pip.git","svn_url":"https://github.com/dstufft/pip","homepage":"www.pip-installer.org","size":25947,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":4,"default_branch":"develop"}},"base":{"label":"pypa:develop","ref":"develop","sha":"4b6b7c77b6cb535beb425e3a40c1d6eaed59fe7e","user":{"login":"pypa","id":647025,"avatar_url":"https://avatars.githubusercontent.com/u/647025?v=2","gravatar_id":"097e00640790ef99fa4df9e0c29cc6d8","url":"https://api.github.com/users/pypa","html_url":"https://github.com/pypa","followers_url":"https://api.github.com/users/pypa/followers","following_url":"https://api.github.com/users/pypa/following{/other_user}","gists_url":"https://api.github.com/users/pypa/gists{/gist_id}","starred_url":"https://api.github.com/users/pypa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypa/subscriptions","organizations_url":"https://api.github.com/users/pypa/orgs","repos_url":"https://api.github.com/users/pypa/repos","events_url":"https://api.github.com/users/pypa/events{/privacy}","received_events_url":"https://api.github.com/users/pypa/received_events","type":"Organization","site_admin":false},"repo":{"id":1446467,"name":"pip","full_name":"pypa/pip","owner":{"login":"pypa","id":647025,"avatar_url":"https://avatars.githubusercontent.com/u/647025?v=2","gravatar_id":"097e00640790ef99fa4df9e0c29cc6d8","url":"https://api.github.com/users/pypa","html_url":"https://github.com/pypa","followers_url":"https://api.github.com/users/pypa/followers","following_url":"https://api.github.com/users/pypa/following{/other_user}","gists_url":"https://api.github.com/users/pypa/gists{/gist_id}","starred_url":"https://api.github.com/users/pypa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypa/subscriptions","organizations_url":"https://api.github.com/users/pypa/orgs","repos_url":"https://api.github.com/users/pypa/repos","events_url":"https://api.github.com/users/pypa/events{/privacy}","received_events_url":"https://api.github.com/users/pypa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pypa/pip","description":"The PyPA recommended tool for installing Python packages","fork":false,"url":"https://api.github.com/repos/pypa/pip","forks_url":"https://api.github.com/repos/pypa/pip/forks","keys_url":"https://api.github.com/repos/pypa/pip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pypa/pip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pypa/pip/teams","hooks_url":"https://api.github.com/repos/pypa/pip/hooks","issue_events_url":"https://api.github.com/repos/pypa/pip/issues/events{/number}","events_url":"https://api.github.com/repos/pypa/pip/events","assignees_url":"https://api.github.com/repos/pypa/pip/assignees{/user}","branches_url":"https://api.github.com/repos/pypa/pip/branches{/branch}","tags_url":"https://api.github.com/repos/pypa/pip/tags","blobs_url":"https://api.github.com/repos/pypa/pip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pypa/pip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pypa/pip/git/refs{/sha}","trees_url":"https://api.github.com/repos/pypa/pip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pypa/pip/statuses/{sha}","languages_url":"https://api.github.com/repos/pypa/pip/languages","stargazers_url":"https://api.github.com/repos/pypa/pip/stargazers","contributors_url":"https://api.github.com/repos/pypa/pip/contributors","subscribers_url":"https://api.github.com/repos/pypa/pip/subscribers","subscription_url":"https://api.github.com/repos/pypa/pip/subscription","commits_url":"https://api.github.com/repos/pypa/pip/commits{/sha}","git_commits_url":"https://api.github.com/repos/pypa/pip/git/commits{/sha}","comments_url":"https://api.github.com/repos/pypa/pip/comments{/number}","issue_comment_url":"https://api.github.com/repos/pypa/pip/issues/comments/{number}","contents_url":"https://api.github.com/repos/pypa/pip/contents/{+path}","compare_url":"https://api.github.com/repos/pypa/pip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pypa/pip/merges","archive_url":"https://api.github.com/repos/pypa/pip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pypa/pip/downloads","issues_url":"https://api.github.com/repos/pypa/pip/issues{/number}","pulls_url":"https://api.github.com/repos/pypa/pip/pulls{/number}","milestones_url":"https://api.github.com/repos/pypa/pip/milestones{/number}","notifications_url":"https://api.github.com/repos/pypa/pip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pypa/pip/labels{/name}","releases_url":"https://api.github.com/repos/pypa/pip/releases{/id}","created_at":"2011-03-06T14:30:46Z","updated_at":"2014-08-30T14:25:19Z","pushed_at":"2014-08-30T23:13:31Z","git_url":"git://github.com/pypa/pip.git","ssh_url":"git@github.com:pypa/pip.git","clone_url":"https://github.com/pypa/pip.git","svn_url":"https://github.com/pypa/pip","homepage":"https://pip.pypa.io/","size":36849,"stargazers_count":1686,"watchers_count":1686,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":646,"mirror_url":null,"open_issues_count":499,"forks":646,"open_issues":499,"watchers":1686,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/pypa/pip/pulls/2008"},"html":{"href":"https://github.com/pypa/pip/pull/2008"},"issue":{"href":"https://api.github.com/repos/pypa/pip/issues/2008"},"comments":{"href":"https://api.github.com/repos/pypa/pip/issues/2008/comments"},"review_comments":{"href":"https://api.github.com/repos/pypa/pip/pulls/2008/comments"},"review_comment":{"href":"https://api.github.com/repos/pypa/pip/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/pypa/pip/pulls/2008/commits"},"statuses":{"href":"https://api.github.com/repos/pypa/pip/statuses/70ef78e964db3c77a0431540f56d4df8e1324126"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":8,"additions":1497,"deletions":707,"changed_files":35}}