{"action":"created","comment":{"url":"https://api.github.com/repos/borgbackup/borg/pulls/comments/41563931","id":41563931,"diff_hunk":"@@ -1,6 +1,8 @@\n import configparser\n from .remote import cache_if_remote\n+from collections import namedtuple\n import errno\n+\n import msgpack","path":"borg/cache.py","position":6,"original_position":6,"commit_id":"d9e05946ac47212ecb739eec32b4868531b3b4d1","original_commit_id":"d9e05946ac47212ecb739eec32b4868531b3b4d1","user":{"login":"ThomasWaldmann","id":356103,"avatar_url":"https://avatars.githubusercontent.com/u/356103?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasWaldmann","html_url":"https://github.com/ThomasWaldmann","followers_url":"https://api.github.com/users/ThomasWaldmann/followers","following_url":"https://api.github.com/users/ThomasWaldmann/following{/other_user}","gists_url":"https://api.github.com/users/ThomasWaldmann/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasWaldmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasWaldmann/subscriptions","organizations_url":"https://api.github.com/users/ThomasWaldmann/orgs","repos_url":"https://api.github.com/users/ThomasWaldmann/repos","events_url":"https://api.github.com/users/ThomasWaldmann/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasWaldmann/received_events","type":"User","site_admin":false},"body":"msgpack is not stdlib, so if you change here, move msgpack down to the 3rd party lib section and keep stdlib in own section.","created_at":"2015-10-08T20:25:04Z","updated_at":"2015-10-08T20:25:04Z","html_url":"https://github.com/borgbackup/borg/pull/233#discussion_r41563931","pull_request_url":"https://api.github.com/repos/borgbackup/borg/pulls/233","_links":{"self":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/comments/41563931"},"html":{"href":"https://github.com/borgbackup/borg/pull/233#discussion_r41563931"},"pull_request":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/233"}}},"pull_request":{"url":"https://api.github.com/repos/borgbackup/borg/pulls/233","id":46554472,"html_url":"https://github.com/borgbackup/borg/pull/233","diff_url":"https://github.com/borgbackup/borg/pull/233.diff","patch_url":"https://github.com/borgbackup/borg/pull/233.patch","issue_url":"https://api.github.com/repos/borgbackup/borg/issues/233","number":233,"state":"open","locked":false,"title":"convert from print() to logging","user":{"login":"anarcat","id":796623,"avatar_url":"https://avatars.githubusercontent.com/u/796623?v=3","gravatar_id":"","url":"https://api.github.com/users/anarcat","html_url":"https://github.com/anarcat","followers_url":"https://api.github.com/users/anarcat/followers","following_url":"https://api.github.com/users/anarcat/following{/other_user}","gists_url":"https://api.github.com/users/anarcat/gists{/gist_id}","starred_url":"https://api.github.com/users/anarcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anarcat/subscriptions","organizations_url":"https://api.github.com/users/anarcat/orgs","repos_url":"https://api.github.com/users/anarcat/repos","events_url":"https://api.github.com/users/anarcat/events{/privacy}","received_events_url":"https://api.github.com/users/anarcat/received_events","type":"User","site_admin":false},"body":"the logging level used varies: most is logging.info(), in some place\r\nlogging.warning() or logging.error() are used when the condition is\r\nclearly an error or warning. in other cases, we keep using print, but\r\nforce writing to sys.stderr, unless we interact with the user.\r\n\r\nthere were 77 calls to print before this commit, now there are 7, most\r\nof which in the archiver module, which interacts directly with the\r\nuser. in one case there, we still use print() only because logging is\r\nnot setup properly yet during argument parsing.\r\n\r\nit could be argued that commands like info or list should use print\r\ndirectly, but we have converted them anyways, without ill effects on\r\nthe unit tests\r\n\r\nunit tests still use print() in some places\r\n\r\nthis switches all informational output to stderr, which should help\r\nwith, if not fix jborg/attic#312 directly\r\n\r\nnote that this does *not* add support for syslog or logfiles yet,\r\nalthough that would be fairly trivial to add now.\r\n\r\ni think that verbose should be an integer and that adding more -v flags would increase debugging information available. but this keeps the current behavior, which we can change easily later, if we choose to start using `logging.debug()` calls.","created_at":"2015-10-01T17:47:09Z","updated_at":"2015-10-08T20:25:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"497df634b76d6af05b639072b59ee8a933bc8cbe","assignee":null,"milestone":{"url":"https://api.github.com/repos/borgbackup/borg/milestones/7","html_url":"https://github.com/borgbackup/borg/milestones/0.28","labels_url":"https://api.github.com/repos/borgbackup/borg/milestones/7/labels","id":1336252,"number":7,"title":"0.28","description":"","creator":{"login":"ThomasWaldmann","id":356103,"avatar_url":"https://avatars.githubusercontent.com/u/356103?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasWaldmann","html_url":"https://github.com/ThomasWaldmann","followers_url":"https://api.github.com/users/ThomasWaldmann/followers","following_url":"https://api.github.com/users/ThomasWaldmann/following{/other_user}","gists_url":"https://api.github.com/users/ThomasWaldmann/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasWaldmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasWaldmann/subscriptions","organizations_url":"https://api.github.com/users/ThomasWaldmann/orgs","repos_url":"https://api.github.com/users/ThomasWaldmann/repos","events_url":"https://api.github.com/users/ThomasWaldmann/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasWaldmann/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":1,"state":"open","created_at":"2015-10-03T17:43:21Z","updated_at":"2015-10-08T01:20:44Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/borgbackup/borg/pulls/233/commits","review_comments_url":"https://api.github.com/repos/borgbackup/borg/pulls/233/comments","review_comment_url":"https://api.github.com/repos/borgbackup/borg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/borgbackup/borg/issues/233/comments","statuses_url":"https://api.github.com/repos/borgbackup/borg/statuses/d9e05946ac47212ecb739eec32b4868531b3b4d1","head":{"label":"anarcat:logging-refactor","ref":"logging-refactor","sha":"d9e05946ac47212ecb739eec32b4868531b3b4d1","user":{"login":"anarcat","id":796623,"avatar_url":"https://avatars.githubusercontent.com/u/796623?v=3","gravatar_id":"","url":"https://api.github.com/users/anarcat","html_url":"https://github.com/anarcat","followers_url":"https://api.github.com/users/anarcat/followers","following_url":"https://api.github.com/users/anarcat/following{/other_user}","gists_url":"https://api.github.com/users/anarcat/gists{/gist_id}","starred_url":"https://api.github.com/users/anarcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anarcat/subscriptions","organizations_url":"https://api.github.com/users/anarcat/orgs","repos_url":"https://api.github.com/users/anarcat/repos","events_url":"https://api.github.com/users/anarcat/events{/privacy}","received_events_url":"https://api.github.com/users/anarcat/received_events","type":"User","site_admin":false},"repo":{"id":36046474,"name":"borg","full_name":"anarcat/borg","owner":{"login":"anarcat","id":796623,"avatar_url":"https://avatars.githubusercontent.com/u/796623?v=3","gravatar_id":"","url":"https://api.github.com/users/anarcat","html_url":"https://github.com/anarcat","followers_url":"https://api.github.com/users/anarcat/followers","following_url":"https://api.github.com/users/anarcat/following{/other_user}","gists_url":"https://api.github.com/users/anarcat/gists{/gist_id}","starred_url":"https://api.github.com/users/anarcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anarcat/subscriptions","organizations_url":"https://api.github.com/users/anarcat/orgs","repos_url":"https://api.github.com/users/anarcat/repos","events_url":"https://api.github.com/users/anarcat/events{/privacy}","received_events_url":"https://api.github.com/users/anarcat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anarcat/borg","description":"Backup Software","fork":true,"url":"https://api.github.com/repos/anarcat/borg","forks_url":"https://api.github.com/repos/anarcat/borg/forks","keys_url":"https://api.github.com/repos/anarcat/borg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anarcat/borg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anarcat/borg/teams","hooks_url":"https://api.github.com/repos/anarcat/borg/hooks","issue_events_url":"https://api.github.com/repos/anarcat/borg/issues/events{/number}","events_url":"https://api.github.com/repos/anarcat/borg/events","assignees_url":"https://api.github.com/repos/anarcat/borg/assignees{/user}","branches_url":"https://api.github.com/repos/anarcat/borg/branches{/branch}","tags_url":"https://api.github.com/repos/anarcat/borg/tags","blobs_url":"https://api.github.com/repos/anarcat/borg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anarcat/borg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anarcat/borg/git/refs{/sha}","trees_url":"https://api.github.com/repos/anarcat/borg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anarcat/borg/statuses/{sha}","languages_url":"https://api.github.com/repos/anarcat/borg/languages","stargazers_url":"https://api.github.com/repos/anarcat/borg/stargazers","contributors_url":"https://api.github.com/repos/anarcat/borg/contributors","subscribers_url":"https://api.github.com/repos/anarcat/borg/subscribers","subscription_url":"https://api.github.com/repos/anarcat/borg/subscription","commits_url":"https://api.github.com/repos/anarcat/borg/commits{/sha}","git_commits_url":"https://api.github.com/repos/anarcat/borg/git/commits{/sha}","comments_url":"https://api.github.com/repos/anarcat/borg/comments{/number}","issue_comment_url":"https://api.github.com/repos/anarcat/borg/issues/comments{/number}","contents_url":"https://api.github.com/repos/anarcat/borg/contents/{+path}","compare_url":"https://api.github.com/repos/anarcat/borg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anarcat/borg/merges","archive_url":"https://api.github.com/repos/anarcat/borg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anarcat/borg/downloads","issues_url":"https://api.github.com/repos/anarcat/borg/issues{/number}","pulls_url":"https://api.github.com/repos/anarcat/borg/pulls{/number}","milestones_url":"https://api.github.com/repos/anarcat/borg/milestones{/number}","notifications_url":"https://api.github.com/repos/anarcat/borg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anarcat/borg/labels{/name}","releases_url":"https://api.github.com/repos/anarcat/borg/releases{/id}","created_at":"2015-05-22T01:49:56Z","updated_at":"2015-05-22T01:49:57Z","pushed_at":"2015-10-08T19:34:47Z","git_url":"git://github.com/anarcat/borg.git","ssh_url":"git@github.com:anarcat/borg.git","clone_url":"https://github.com/anarcat/borg.git","svn_url":"https://github.com/anarcat/borg","homepage":null,"size":2159,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"logging-refactor"}},"base":{"label":"borgbackup:master","ref":"master","sha":"10db8c1d9bc5b0e4050ac4cf0a673c6ced6f27ad","user":{"login":"borgbackup","id":12418060,"avatar_url":"https://avatars.githubusercontent.com/u/12418060?v=3","gravatar_id":"","url":"https://api.github.com/users/borgbackup","html_url":"https://github.com/borgbackup","followers_url":"https://api.github.com/users/borgbackup/followers","following_url":"https://api.github.com/users/borgbackup/following{/other_user}","gists_url":"https://api.github.com/users/borgbackup/gists{/gist_id}","starred_url":"https://api.github.com/users/borgbackup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgbackup/subscriptions","organizations_url":"https://api.github.com/users/borgbackup/orgs","repos_url":"https://api.github.com/users/borgbackup/repos","events_url":"https://api.github.com/users/borgbackup/events{/privacy}","received_events_url":"https://api.github.com/users/borgbackup/received_events","type":"Organization","site_admin":false},"repo":{"id":35517126,"name":"borg","full_name":"borgbackup/borg","owner":{"login":"borgbackup","id":12418060,"avatar_url":"https://avatars.githubusercontent.com/u/12418060?v=3","gravatar_id":"","url":"https://api.github.com/users/borgbackup","html_url":"https://github.com/borgbackup","followers_url":"https://api.github.com/users/borgbackup/followers","following_url":"https://api.github.com/users/borgbackup/following{/other_user}","gists_url":"https://api.github.com/users/borgbackup/gists{/gist_id}","starred_url":"https://api.github.com/users/borgbackup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgbackup/subscriptions","organizations_url":"https://api.github.com/users/borgbackup/orgs","repos_url":"https://api.github.com/users/borgbackup/repos","events_url":"https://api.github.com/users/borgbackup/events{/privacy}","received_events_url":"https://api.github.com/users/borgbackup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/borgbackup/borg","description":"Deduplicating backup program with compression and authenticated encryption.","fork":false,"url":"https://api.github.com/repos/borgbackup/borg","forks_url":"https://api.github.com/repos/borgbackup/borg/forks","keys_url":"https://api.github.com/repos/borgbackup/borg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/borgbackup/borg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/borgbackup/borg/teams","hooks_url":"https://api.github.com/repos/borgbackup/borg/hooks","issue_events_url":"https://api.github.com/repos/borgbackup/borg/issues/events{/number}","events_url":"https://api.github.com/repos/borgbackup/borg/events","assignees_url":"https://api.github.com/repos/borgbackup/borg/assignees{/user}","branches_url":"https://api.github.com/repos/borgbackup/borg/branches{/branch}","tags_url":"https://api.github.com/repos/borgbackup/borg/tags","blobs_url":"https://api.github.com/repos/borgbackup/borg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/borgbackup/borg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/borgbackup/borg/git/refs{/sha}","trees_url":"https://api.github.com/repos/borgbackup/borg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/borgbackup/borg/statuses/{sha}","languages_url":"https://api.github.com/repos/borgbackup/borg/languages","stargazers_url":"https://api.github.com/repos/borgbackup/borg/stargazers","contributors_url":"https://api.github.com/repos/borgbackup/borg/contributors","subscribers_url":"https://api.github.com/repos/borgbackup/borg/subscribers","subscription_url":"https://api.github.com/repos/borgbackup/borg/subscription","commits_url":"https://api.github.com/repos/borgbackup/borg/commits{/sha}","git_commits_url":"https://api.github.com/repos/borgbackup/borg/git/commits{/sha}","comments_url":"https://api.github.com/repos/borgbackup/borg/comments{/number}","issue_comment_url":"https://api.github.com/repos/borgbackup/borg/issues/comments{/number}","contents_url":"https://api.github.com/repos/borgbackup/borg/contents/{+path}","compare_url":"https://api.github.com/repos/borgbackup/borg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/borgbackup/borg/merges","archive_url":"https://api.github.com/repos/borgbackup/borg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/borgbackup/borg/downloads","issues_url":"https://api.github.com/repos/borgbackup/borg/issues{/number}","pulls_url":"https://api.github.com/repos/borgbackup/borg/pulls{/number}","milestones_url":"https://api.github.com/repos/borgbackup/borg/milestones{/number}","notifications_url":"https://api.github.com/repos/borgbackup/borg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/borgbackup/borg/labels{/name}","releases_url":"https://api.github.com/repos/borgbackup/borg/releases{/id}","created_at":"2015-05-12T23:10:47Z","updated_at":"2015-10-08T14:45:54Z","pushed_at":"2015-10-08T19:34:47Z","git_url":"git://github.com/borgbackup/borg.git","ssh_url":"git@github.com:borgbackup/borg.git","clone_url":"https://github.com/borgbackup/borg.git","svn_url":"https://github.com/borgbackup/borg","homepage":"https://borgbackup.github.io/","size":3065,"stargazers_count":135,"watchers_count":135,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":84,"forks":23,"open_issues":84,"watchers":135,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/233"},"html":{"href":"https://github.com/borgbackup/borg/pull/233"},"issue":{"href":"https://api.github.com/repos/borgbackup/borg/issues/233"},"comments":{"href":"https://api.github.com/repos/borgbackup/borg/issues/233/comments"},"review_comments":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/233/comments"},"review_comment":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/233/commits"},"statuses":{"href":"https://api.github.com/repos/borgbackup/borg/statuses/d9e05946ac47212ecb739eec32b4868531b3b4d1"}}}}