{"action":"created","comment":{"url":"https://api.github.com/repos/takluyver/flit/pulls/comments/156056586","pull_request_review_id":82470264,"id":156056586,"diff_hunk":"@@ -0,0 +1,335 @@\n+\"\"\"Validate various pieces of packaging data\"\"\"\n+\n+import logging\n+import os\n+from pathlib import Path\n+import re\n+import requests\n+import sys\n+\n+from .common import InvalidVersion\n+\n+log = logging.getLogger(__name__)\n+\n+def get_cache_dir() -> Path:\n+    \"\"\"Locate a platform-appropriate cache directory for flit to use\n+\n+    Does not ensure that the cache directory exists.\n+    \"\"\"\n+    if os.name == 'posix' and sys.platform != 'darwin':\n+        # Linux, Unix, AIX, etc.\n+        # use ~/.cache if empty OR not set\n+        xdg = os.environ.get(\"XDG_CACHE_HOME\", None) or (\n+        os.path.expanduser('~/.cache'))","path":"flit/validate.py","position":null,"original_position":23,"commit_id":"140c23a638de64b6f353b6a24e34e5098d556c84","original_commit_id":"8389dc4d517a56dda37865a7f5c72725c356ce86","user":{"login":"takluyver","id":327925,"avatar_url":"https://avatars3.githubusercontent.com/u/327925?v=4","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"body":"Is the new commit better? I'm not quite sure what was making it tricky.","created_at":"2017-12-11T12:13:56Z","updated_at":"2017-12-11T12:13:56Z","html_url":"https://github.com/takluyver/flit/pull/154#discussion_r156056586","pull_request_url":"https://api.github.com/repos/takluyver/flit/pulls/154","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/takluyver/flit/pulls/comments/156056586"},"html":{"href":"https://github.com/takluyver/flit/pull/154#discussion_r156056586"},"pull_request":{"href":"https://api.github.com/repos/takluyver/flit/pulls/154"}},"in_reply_to_id":156053993},"pull_request":{"url":"https://api.github.com/repos/takluyver/flit/pulls/154","id":157262588,"html_url":"https://github.com/takluyver/flit/pull/154","diff_url":"https://github.com/takluyver/flit/pull/154.diff","patch_url":"https://github.com/takluyver/flit/pull/154.patch","issue_url":"https://api.github.com/repos/takluyver/flit/issues/154","number":154,"state":"open","locked":false,"title":"More validation of packaging data","user":{"login":"takluyver","id":327925,"avatar_url":"https://avatars3.githubusercontent.com/u/327925?v=4","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"body":"This should make it easier to catch mistakes in packaging sooner.\r\n\r\nThe design is slightly awkward: a series of validation functions build up a list of problems. These are logged at 'error' level, and then a ConfigError is raised. I'm doing it this way so that it's easy to see multiple problems at once, not just the first one it finds.","created_at":"2017-12-08T15:04:25Z","updated_at":"2017-12-11T12:13:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b7f338363392f77e29880aae8034e3743295b8a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/takluyver/flit/pulls/154/commits","review_comments_url":"https://api.github.com/repos/takluyver/flit/pulls/154/comments","review_comment_url":"https://api.github.com/repos/takluyver/flit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/takluyver/flit/issues/154/comments","statuses_url":"https://api.github.com/repos/takluyver/flit/statuses/140c23a638de64b6f353b6a24e34e5098d556c84","head":{"label":"takluyver:validation","ref":"validation","sha":"140c23a638de64b6f353b6a24e34e5098d556c84","user":{"login":"takluyver","id":327925,"avatar_url":"https://avatars3.githubusercontent.com/u/327925?v=4","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"repo":{"id":32181539,"name":"flit","full_name":"takluyver/flit","owner":{"login":"takluyver","id":327925,"avatar_url":"https://avatars3.githubusercontent.com/u/327925?v=4","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/takluyver/flit","description":"Simplified packaging of Python modules","fork":false,"url":"https://api.github.com/repos/takluyver/flit","forks_url":"https://api.github.com/repos/takluyver/flit/forks","keys_url":"https://api.github.com/repos/takluyver/flit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/takluyver/flit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/takluyver/flit/teams","hooks_url":"https://api.github.com/repos/takluyver/flit/hooks","issue_events_url":"https://api.github.com/repos/takluyver/flit/issues/events{/number}","events_url":"https://api.github.com/repos/takluyver/flit/events","assignees_url":"https://api.github.com/repos/takluyver/flit/assignees{/user}","branches_url":"https://api.github.com/repos/takluyver/flit/branches{/branch}","tags_url":"https://api.github.com/repos/takluyver/flit/tags","blobs_url":"https://api.github.com/repos/takluyver/flit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/takluyver/flit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/takluyver/flit/git/refs{/sha}","trees_url":"https://api.github.com/repos/takluyver/flit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/takluyver/flit/statuses/{sha}","languages_url":"https://api.github.com/repos/takluyver/flit/languages","stargazers_url":"https://api.github.com/repos/takluyver/flit/stargazers","contributors_url":"https://api.github.com/repos/takluyver/flit/contributors","subscribers_url":"https://api.github.com/repos/takluyver/flit/subscribers","subscription_url":"https://api.github.com/repos/takluyver/flit/subscription","commits_url":"https://api.github.com/repos/takluyver/flit/commits{/sha}","git_commits_url":"https://api.github.com/repos/takluyver/flit/git/commits{/sha}","comments_url":"https://api.github.com/repos/takluyver/flit/comments{/number}","issue_comment_url":"https://api.github.com/repos/takluyver/flit/issues/comments{/number}","contents_url":"https://api.github.com/repos/takluyver/flit/contents/{+path}","compare_url":"https://api.github.com/repos/takluyver/flit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/takluyver/flit/merges","archive_url":"https://api.github.com/repos/takluyver/flit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/takluyver/flit/downloads","issues_url":"https://api.github.com/repos/takluyver/flit/issues{/number}","pulls_url":"https://api.github.com/repos/takluyver/flit/pulls{/number}","milestones_url":"https://api.github.com/repos/takluyver/flit/milestones{/number}","notifications_url":"https://api.github.com/repos/takluyver/flit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/takluyver/flit/labels{/name}","releases_url":"https://api.github.com/repos/takluyver/flit/releases{/id}","deployments_url":"https://api.github.com/repos/takluyver/flit/deployments","created_at":"2015-03-13T21:22:27Z","updated_at":"2017-12-07T07:29:55Z","pushed_at":"2017-12-11T12:13:34Z","git_url":"git://github.com/takluyver/flit.git","ssh_url":"git@github.com:takluyver/flit.git","clone_url":"https://github.com/takluyver/flit.git","svn_url":"https://github.com/takluyver/flit","homepage":"http://flit.readthedocs.io/","size":441,"stargazers_count":433,"watchers_count":433,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"bsd-3-clause","name":"BSD 3-clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":21,"open_issues":29,"watchers":433,"default_branch":"master"}},"base":{"label":"takluyver:master","ref":"master","sha":"a389206fd37b0e71f001591b942262930648393e","user":{"login":"takluyver","id":327925,"avatar_url":"https://avatars3.githubusercontent.com/u/327925?v=4","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"repo":{"id":32181539,"name":"flit","full_name":"takluyver/flit","owner":{"login":"takluyver","id":327925,"avatar_url":"https://avatars3.githubusercontent.com/u/327925?v=4","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/takluyver/flit","description":"Simplified packaging of Python modules","fork":false,"url":"https://api.github.com/repos/takluyver/flit","forks_url":"https://api.github.com/repos/takluyver/flit/forks","keys_url":"https://api.github.com/repos/takluyver/flit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/takluyver/flit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/takluyver/flit/teams","hooks_url":"https://api.github.com/repos/takluyver/flit/hooks","issue_events_url":"https://api.github.com/repos/takluyver/flit/issues/events{/number}","events_url":"https://api.github.com/repos/takluyver/flit/events","assignees_url":"https://api.github.com/repos/takluyver/flit/assignees{/user}","branches_url":"https://api.github.com/repos/takluyver/flit/branches{/branch}","tags_url":"https://api.github.com/repos/takluyver/flit/tags","blobs_url":"https://api.github.com/repos/takluyver/flit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/takluyver/flit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/takluyver/flit/git/refs{/sha}","trees_url":"https://api.github.com/repos/takluyver/flit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/takluyver/flit/statuses/{sha}","languages_url":"https://api.github.com/repos/takluyver/flit/languages","stargazers_url":"https://api.github.com/repos/takluyver/flit/stargazers","contributors_url":"https://api.github.com/repos/takluyver/flit/contributors","subscribers_url":"https://api.github.com/repos/takluyver/flit/subscribers","subscription_url":"https://api.github.com/repos/takluyver/flit/subscription","commits_url":"https://api.github.com/repos/takluyver/flit/commits{/sha}","git_commits_url":"https://api.github.com/repos/takluyver/flit/git/commits{/sha}","comments_url":"https://api.github.com/repos/takluyver/flit/comments{/number}","issue_comment_url":"https://api.github.com/repos/takluyver/flit/issues/comments{/number}","contents_url":"https://api.github.com/repos/takluyver/flit/contents/{+path}","compare_url":"https://api.github.com/repos/takluyver/flit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/takluyver/flit/merges","archive_url":"https://api.github.com/repos/takluyver/flit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/takluyver/flit/downloads","issues_url":"https://api.github.com/repos/takluyver/flit/issues{/number}","pulls_url":"https://api.github.com/repos/takluyver/flit/pulls{/number}","milestones_url":"https://api.github.com/repos/takluyver/flit/milestones{/number}","notifications_url":"https://api.github.com/repos/takluyver/flit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/takluyver/flit/labels{/name}","releases_url":"https://api.github.com/repos/takluyver/flit/releases{/id}","deployments_url":"https://api.github.com/repos/takluyver/flit/deployments","created_at":"2015-03-13T21:22:27Z","updated_at":"2017-12-07T07:29:55Z","pushed_at":"2017-12-11T12:13:34Z","git_url":"git://github.com/takluyver/flit.git","ssh_url":"git@github.com:takluyver/flit.git","clone_url":"https://github.com/takluyver/flit.git","svn_url":"https://github.com/takluyver/flit","homepage":"http://flit.readthedocs.io/","size":441,"stargazers_count":433,"watchers_count":433,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"bsd-3-clause","name":"BSD 3-clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":21,"open_issues":29,"watchers":433,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/takluyver/flit/pulls/154"},"html":{"href":"https://github.com/takluyver/flit/pull/154"},"issue":{"href":"https://api.github.com/repos/takluyver/flit/issues/154"},"comments":{"href":"https://api.github.com/repos/takluyver/flit/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/takluyver/flit/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/takluyver/flit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/takluyver/flit/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/takluyver/flit/statuses/140c23a638de64b6f353b6a24e34e5098d556c84"}},"author_association":"OWNER"}}
{"actor":{"display_login":"takluyver"}}