{"action":"created","comment":{"url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/comments/64122816","id":64122816,"diff_hunk":"@@ -1,12 +1,16 @@\n import base64\n import os\n from tempfile import _TemporaryFileWrapper\n+# python-gnupg will not recognize our SecureTemporaryFile as a stream-like type\n+# and will attempt to call encode on it, thinking it's a string-like type. To\n+# avoid this we add it the list of stream-like types.\n+from gnupg._util import _STREAMLIKE_TYPES\n+_STREAMLIKE_TYPES.append(_TemporaryFileWrapper)","path":"securedrop/secure_tempfile.py","position":8,"original_position":8,"commit_id":"9cc8256970b11784ec7225f5629c6ed2a1ec8298","original_commit_id":"9cc8256970b11784ec7225f5629c6ed2a1ec8298","user":{"login":"garrettr","id":407302,"avatar_url":"https://avatars.githubusercontent.com/u/407302?v=3","gravatar_id":"","url":"https://api.github.com/users/garrettr","html_url":"https://github.com/garrettr","followers_url":"https://api.github.com/users/garrettr/followers","following_url":"https://api.github.com/users/garrettr/following{/other_user}","gists_url":"https://api.github.com/users/garrettr/gists{/gist_id}","starred_url":"https://api.github.com/users/garrettr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garrettr/subscriptions","organizations_url":"https://api.github.com/users/garrettr/orgs","repos_url":"https://api.github.com/users/garrettr/repos","events_url":"https://api.github.com/users/garrettr/events{/privacy}","received_events_url":"https://api.github.com/users/garrettr/received_events","type":"User","site_admin":false},"body":"Why not `SecureTemporaryFile` instead?","created_at":"2016-05-21T00:06:45Z","updated_at":"2016-05-21T00:06:45Z","html_url":"https://github.com/freedomofpress/securedrop/pull/1306#discussion_r64122816","pull_request_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/1306","_links":{"self":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/comments/64122816"},"html":{"href":"https://github.com/freedomofpress/securedrop/pull/1306#discussion_r64122816"},"pull_request":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/1306"}}},"pull_request":{"url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/1306","id":70807782,"html_url":"https://github.com/freedomofpress/securedrop/pull/1306","diff_url":"https://github.com/freedomofpress/securedrop/pull/1306.diff","patch_url":"https://github.com/freedomofpress/securedrop/pull/1306.patch","issue_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/1306","number":1306,"state":"open","locked":false,"title":"Pip package upgrade for release 0.3.7","user":{"login":"fowlslegs","id":3538418,"avatar_url":"https://avatars.githubusercontent.com/u/3538418?v=3","gravatar_id":"","url":"https://api.github.com/users/fowlslegs","html_url":"https://github.com/fowlslegs","followers_url":"https://api.github.com/users/fowlslegs/followers","following_url":"https://api.github.com/users/fowlslegs/following{/other_user}","gists_url":"https://api.github.com/users/fowlslegs/gists{/gist_id}","starred_url":"https://api.github.com/users/fowlslegs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fowlslegs/subscriptions","organizations_url":"https://api.github.com/users/fowlslegs/orgs","repos_url":"https://api.github.com/users/fowlslegs/repos","events_url":"https://api.github.com/users/fowlslegs/events{/privacy}","received_events_url":"https://api.github.com/users/fowlslegs/received_events","type":"User","site_admin":false},"body":"commit 9cc8256970b11784ec7225f5629c6ed2a1ec8298\r\nAuthor: Noah Vesely <noah@freedom.press>\r\nDate:   Fri May 20 14:53:07 2016 -0700\r\n\r\n    Warn if virtualenv active instead of trying to deactivate\r\n\r\n    `deactivate` does not work reliably, so we instruct to do so manually and exit.\r\n    Also, this corrects the virtualenv envirnoment variable name.\r\n\r\ncommit bee345514e8bf33ed52abe087a001e8bb37c8bb2\r\nAuthor: Noah Vesely <noah@freedom.press>\r\nDate:   Fri May 20 11:50:12 2016 -0700\r\n\r\n    Autoexit virtualenv on pip_update.sh invocation\r\n\r\n    Being in a virtualenv while running this script can causes errors. It now\r\n    detects if you are and deactivates it. Also, I cleaned up the tests for pip and\r\n    virtualenv install presence, so that it will try to install them automatically\r\n    on Debian and derivates, and will just tell the user to install them themselves\r\n    on other systems.\r\n\r\ncommit f0e3fc9e1aa42442123c7edc556bf5a79471cab1\r\nAuthor: Noah Vesely <noah@freedom.press>\r\nDate:   Thu May 19 23:21:52 2016 -0700\r\n\r\n    Modify crypto_util.encrypt() to work with py-gnupg 2.0.2\r\n\r\n    We've been using an old branch of python-gnupg for quite some time for reasons\r\n    explained in\r\n    https://github.com/freedomofpress/securedrop/issues/250#issuecomment-86237456.\r\n    For over a year now https://github.com/freedomofpress/securedrop/issues/946 has\r\n    been open and just in 91f6491beb856d94f8bf6b38e162d1e23e5a581d I updated us to\r\n    the latest version.\r\n\r\n    Changes to GPG.encrypt() required changes in crypto_util. In particular,\r\n    GPG.encrypt() became the singular encryption function--there is no longer a\r\n    separate GPG.encrypt_file(). Further, GPG.encrypt() now handles encoding for us\r\n    using our preferred locale, which is already set on Ubuntu and any sane distro\r\n    to UTF-8--that's to say it's not something we should worry about.\r\n\r\n    Related to the ability for GPG.encrypt() to now be able to handle files and\r\n    other stream-like types, it needed to have some idea of what those types are.\r\n    This idea is implemented in the form of the list gnupg._util._STREAMLIKE_TYPES.\r\n    If a type is not in that list python-gnupg assumes it's a string-like type and\r\n    tries to encode it for you. Thus, it was necessary to\r\n    append(_TemporaryFileWrapper) to this list to avoid calling an undefined method\r\n    on SecureTemporaryFile (stream-like type membership testing is done with\r\n    isinstance() which holds true for subclasses as well).\r\n\r\ncommit 91f6491beb856d94f8bf6b38e162d1e23e5a581d\r\nAuthor: Noah Vesely <noah@freedom.press>\r\nDate:   Wed May 18 09:56:45 2016 -0700\r\n\r\n    0.3.7 reqs update, new pip-tools pkg mgmt system\r\n\r\n    Around `pip-tools` 1.0 they released some new utilities detailed in a blog post\r\n    http://nvie.com/posts/better-package-management/. Use of `pip-compile` allows us\r\n    specify only the packages we actually import in the SD app code, our top-level\r\n    dependencies, and not the lower-level dependencies (the dependencies of our\r\n    top-level dependencies).\r\n\r\n    Thus our top-level dependencies have been moved to `.in` files. Calling\r\n    `pip-compile` on a `.in` file will first find the latest versions of all the\r\n    packages declared in that file, and second find the latest compatible versions\r\n    of the lower-level dependencies, compiling them all together in a standard\r\n    `.txt` requirements file. This is beneficial because the dependencies of our\r\n    top-level packages may shift and this automates the process of finding and\r\n    tracking current and new lower-level dependencies and deprecating old\r\n    lower-level dependencies.\r\n\r\n    This commit also updates `pip_update.sh` to work with this new dependency\r\n    management system.","created_at":"2016-05-20T06:37:56Z","updated_at":"2016-05-21T00:06:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71569e7fa8edf9d766c802b60e9c6eaeffae949a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/1306/commits","review_comments_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/1306/comments","review_comment_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/1306/comments","statuses_url":"https://api.github.com/repos/freedomofpress/securedrop/statuses/9cc8256970b11784ec7225f5629c6ed2a1ec8298","head":{"label":"fowlslegs:pkg-upgrade/0.3.7","ref":"pkg-upgrade/0.3.7","sha":"9cc8256970b11784ec7225f5629c6ed2a1ec8298","user":{"login":"fowlslegs","id":3538418,"avatar_url":"https://avatars.githubusercontent.com/u/3538418?v=3","gravatar_id":"","url":"https://api.github.com/users/fowlslegs","html_url":"https://github.com/fowlslegs","followers_url":"https://api.github.com/users/fowlslegs/followers","following_url":"https://api.github.com/users/fowlslegs/following{/other_user}","gists_url":"https://api.github.com/users/fowlslegs/gists{/gist_id}","starred_url":"https://api.github.com/users/fowlslegs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fowlslegs/subscriptions","organizations_url":"https://api.github.com/users/fowlslegs/orgs","repos_url":"https://api.github.com/users/fowlslegs/repos","events_url":"https://api.github.com/users/fowlslegs/events{/privacy}","received_events_url":"https://api.github.com/users/fowlslegs/received_events","type":"User","site_admin":false},"repo":{"id":47371547,"name":"securedrop","full_name":"fowlslegs/securedrop","owner":{"login":"fowlslegs","id":3538418,"avatar_url":"https://avatars.githubusercontent.com/u/3538418?v=3","gravatar_id":"","url":"https://api.github.com/users/fowlslegs","html_url":"https://github.com/fowlslegs","followers_url":"https://api.github.com/users/fowlslegs/followers","following_url":"https://api.github.com/users/fowlslegs/following{/other_user}","gists_url":"https://api.github.com/users/fowlslegs/gists{/gist_id}","starred_url":"https://api.github.com/users/fowlslegs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fowlslegs/subscriptions","organizations_url":"https://api.github.com/users/fowlslegs/orgs","repos_url":"https://api.github.com/users/fowlslegs/repos","events_url":"https://api.github.com/users/fowlslegs/events{/privacy}","received_events_url":"https://api.github.com/users/fowlslegs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fowlslegs/securedrop","description":"GitHub repository for the SecureDrop whistleblower platform. Do not submit tips here!","fork":true,"url":"https://api.github.com/repos/fowlslegs/securedrop","forks_url":"https://api.github.com/repos/fowlslegs/securedrop/forks","keys_url":"https://api.github.com/repos/fowlslegs/securedrop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fowlslegs/securedrop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fowlslegs/securedrop/teams","hooks_url":"https://api.github.com/repos/fowlslegs/securedrop/hooks","issue_events_url":"https://api.github.com/repos/fowlslegs/securedrop/issues/events{/number}","events_url":"https://api.github.com/repos/fowlslegs/securedrop/events","assignees_url":"https://api.github.com/repos/fowlslegs/securedrop/assignees{/user}","branches_url":"https://api.github.com/repos/fowlslegs/securedrop/branches{/branch}","tags_url":"https://api.github.com/repos/fowlslegs/securedrop/tags","blobs_url":"https://api.github.com/repos/fowlslegs/securedrop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fowlslegs/securedrop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fowlslegs/securedrop/git/refs{/sha}","trees_url":"https://api.github.com/repos/fowlslegs/securedrop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fowlslegs/securedrop/statuses/{sha}","languages_url":"https://api.github.com/repos/fowlslegs/securedrop/languages","stargazers_url":"https://api.github.com/repos/fowlslegs/securedrop/stargazers","contributors_url":"https://api.github.com/repos/fowlslegs/securedrop/contributors","subscribers_url":"https://api.github.com/repos/fowlslegs/securedrop/subscribers","subscription_url":"https://api.github.com/repos/fowlslegs/securedrop/subscription","commits_url":"https://api.github.com/repos/fowlslegs/securedrop/commits{/sha}","git_commits_url":"https://api.github.com/repos/fowlslegs/securedrop/git/commits{/sha}","comments_url":"https://api.github.com/repos/fowlslegs/securedrop/comments{/number}","issue_comment_url":"https://api.github.com/repos/fowlslegs/securedrop/issues/comments{/number}","contents_url":"https://api.github.com/repos/fowlslegs/securedrop/contents/{+path}","compare_url":"https://api.github.com/repos/fowlslegs/securedrop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fowlslegs/securedrop/merges","archive_url":"https://api.github.com/repos/fowlslegs/securedrop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fowlslegs/securedrop/downloads","issues_url":"https://api.github.com/repos/fowlslegs/securedrop/issues{/number}","pulls_url":"https://api.github.com/repos/fowlslegs/securedrop/pulls{/number}","milestones_url":"https://api.github.com/repos/fowlslegs/securedrop/milestones{/number}","notifications_url":"https://api.github.com/repos/fowlslegs/securedrop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fowlslegs/securedrop/labels{/name}","releases_url":"https://api.github.com/repos/fowlslegs/securedrop/releases{/id}","deployments_url":"https://api.github.com/repos/fowlslegs/securedrop/deployments","created_at":"2015-12-04T00:57:59Z","updated_at":"2015-12-04T00:58:01Z","pushed_at":"2016-05-20T21:54:07Z","git_url":"git://github.com/fowlslegs/securedrop.git","ssh_url":"git@github.com:fowlslegs/securedrop.git","clone_url":"https://github.com/fowlslegs/securedrop.git","svn_url":"https://github.com/fowlslegs/securedrop","homepage":"https://freedom.press/securedrop","size":34514,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"freedomofpress:release/0.3.7","ref":"release/0.3.7","sha":"b39bf3868e2fe8bad8d5813951893068e239f85e","user":{"login":"freedomofpress","id":5388147,"avatar_url":"https://avatars.githubusercontent.com/u/5388147?v=3","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"repo":{"id":3156820,"name":"securedrop","full_name":"freedomofpress/securedrop","owner":{"login":"freedomofpress","id":5388147,"avatar_url":"https://avatars.githubusercontent.com/u/5388147?v=3","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freedomofpress/securedrop","description":"GitHub repository for the SecureDrop whistleblower platform. Do not submit tips here!","fork":false,"url":"https://api.github.com/repos/freedomofpress/securedrop","forks_url":"https://api.github.com/repos/freedomofpress/securedrop/forks","keys_url":"https://api.github.com/repos/freedomofpress/securedrop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freedomofpress/securedrop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freedomofpress/securedrop/teams","hooks_url":"https://api.github.com/repos/freedomofpress/securedrop/hooks","issue_events_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/events{/number}","events_url":"https://api.github.com/repos/freedomofpress/securedrop/events","assignees_url":"https://api.github.com/repos/freedomofpress/securedrop/assignees{/user}","branches_url":"https://api.github.com/repos/freedomofpress/securedrop/branches{/branch}","tags_url":"https://api.github.com/repos/freedomofpress/securedrop/tags","blobs_url":"https://api.github.com/repos/freedomofpress/securedrop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freedomofpress/securedrop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freedomofpress/securedrop/git/refs{/sha}","trees_url":"https://api.github.com/repos/freedomofpress/securedrop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freedomofpress/securedrop/statuses/{sha}","languages_url":"https://api.github.com/repos/freedomofpress/securedrop/languages","stargazers_url":"https://api.github.com/repos/freedomofpress/securedrop/stargazers","contributors_url":"https://api.github.com/repos/freedomofpress/securedrop/contributors","subscribers_url":"https://api.github.com/repos/freedomofpress/securedrop/subscribers","subscription_url":"https://api.github.com/repos/freedomofpress/securedrop/subscription","commits_url":"https://api.github.com/repos/freedomofpress/securedrop/commits{/sha}","git_commits_url":"https://api.github.com/repos/freedomofpress/securedrop/git/commits{/sha}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop/comments{/number}","issue_comment_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/comments{/number}","contents_url":"https://api.github.com/repos/freedomofpress/securedrop/contents/{+path}","compare_url":"https://api.github.com/repos/freedomofpress/securedrop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freedomofpress/securedrop/merges","archive_url":"https://api.github.com/repos/freedomofpress/securedrop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freedomofpress/securedrop/downloads","issues_url":"https://api.github.com/repos/freedomofpress/securedrop/issues{/number}","pulls_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls{/number}","milestones_url":"https://api.github.com/repos/freedomofpress/securedrop/milestones{/number}","notifications_url":"https://api.github.com/repos/freedomofpress/securedrop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freedomofpress/securedrop/labels{/name}","releases_url":"https://api.github.com/repos/freedomofpress/securedrop/releases{/id}","deployments_url":"https://api.github.com/repos/freedomofpress/securedrop/deployments","created_at":"2012-01-11T19:57:55Z","updated_at":"2016-05-19T04:55:58Z","pushed_at":"2016-05-20T23:49:07Z","git_url":"git://github.com/freedomofpress/securedrop.git","ssh_url":"git@github.com:freedomofpress/securedrop.git","clone_url":"https://github.com/freedomofpress/securedrop.git","svn_url":"https://github.com/freedomofpress/securedrop","homepage":"https://freedom.press/securedrop","size":45484,"stargazers_count":1706,"watchers_count":1706,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":285,"mirror_url":null,"open_issues_count":232,"forks":285,"open_issues":232,"watchers":1706,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/1306"},"html":{"href":"https://github.com/freedomofpress/securedrop/pull/1306"},"issue":{"href":"https://api.github.com/repos/freedomofpress/securedrop/issues/1306"},"comments":{"href":"https://api.github.com/repos/freedomofpress/securedrop/issues/1306/comments"},"review_comments":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/1306/comments"},"review_comment":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/1306/commits"},"statuses":{"href":"https://api.github.com/repos/freedomofpress/securedrop/statuses/9cc8256970b11784ec7225f5629c6ed2a1ec8298"}}}}
{"actor":{"display_login":"garrettr"}}