{"action":"created","comment":{"url":"https://api.github.com/repos/swcarpentry/site/pulls/comments/30578979","id":30578979,"diff_hunk":"@@ -112,7 +110,9 @@ def main():\n     config['blog_favorites'].reverse()\n \n     # Ensure that information about workshops is in the right order.\n-    cached_workshop_info.sort(lambda x, y: cmp(x['slug'], y['slug']))\n+    decorated = [(x['slug'], x) for x in cached_workshop_info]\n+    decorated.sort()\n+    cached_workshop_info = [d[1] for d in decorated]","path":"bin/preprocess.py","position":21,"original_position":21,"commit_id":"d4727716141494fe0e42afcc1b6b4fb1d5f0fa04","original_commit_id":"d4727716141494fe0e42afcc1b6b4fb1d5f0fa04","user":{"login":"drj11","id":1215412,"avatar_url":"https://avatars.githubusercontent.com/u/1215412?v=3","gravatar_id":"","url":"https://api.github.com/users/drj11","html_url":"https://github.com/drj11","followers_url":"https://api.github.com/users/drj11/followers","following_url":"https://api.github.com/users/drj11/following{/other_user}","gists_url":"https://api.github.com/users/drj11/gists{/gist_id}","starred_url":"https://api.github.com/users/drj11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drj11/subscriptions","organizations_url":"https://api.github.com/users/drj11/orgs","repos_url":"https://api.github.com/users/drj11/repos","events_url":"https://api.github.com/users/drj11/events{/privacy}","received_events_url":"https://api.github.com/users/drj11/received_events","type":"User","site_admin":false},"body":"I think you want some variant on:\r\n\r\n```\r\nsorted(thing, key=lambda item: item['slug'])\r\n```\r\n\r\nBut I'm not quite sure, because you're using a `.sort()` method\r\n","created_at":"2015-05-19T08:36:32Z","updated_at":"2015-05-19T08:36:32Z","html_url":"https://github.com/swcarpentry/site/pull/970#discussion_r30578979","pull_request_url":"https://api.github.com/repos/swcarpentry/site/pulls/970","_links":{"self":{"href":"https://api.github.com/repos/swcarpentry/site/pulls/comments/30578979"},"html":{"href":"https://github.com/swcarpentry/site/pull/970#discussion_r30578979"},"pull_request":{"href":"https://api.github.com/repos/swcarpentry/site/pulls/970"}}},"pull_request":{"url":"https://api.github.com/repos/swcarpentry/site/pulls/970","id":35580225,"html_url":"https://github.com/swcarpentry/site/pull/970","diff_url":"https://github.com/swcarpentry/site/pull/970.diff","patch_url":"https://github.com/swcarpentry/site/pull/970.patch","issue_url":"https://api.github.com/repos/swcarpentry/site/issues/970","number":970,"state":"open","locked":false,"title":"Starting conversion to Python 3","user":{"login":"gvwilson","id":911566,"avatar_url":"https://avatars.githubusercontent.com/u/911566?v=3","gravatar_id":"","url":"https://api.github.com/users/gvwilson","html_url":"https://github.com/gvwilson","followers_url":"https://api.github.com/users/gvwilson/followers","following_url":"https://api.github.com/users/gvwilson/following{/other_user}","gists_url":"https://api.github.com/users/gvwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/gvwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvwilson/subscriptions","organizations_url":"https://api.github.com/users/gvwilson/orgs","repos_url":"https://api.github.com/users/gvwilson/repos","events_url":"https://api.github.com/users/gvwilson/events{/privacy}","received_events_url":"https://api.github.com/users/gvwilson/received_events","type":"User","site_admin":false},"body":"1.  Changing all the `print` statements to function calls.\r\n2.  Changing `except` statements to use `as` instead of comma.\r\n3.  Wrapping values of `time:` field in YAML headers of blog post in quotes (see below).\r\n\r\nThe YAML parser is inconsistent about interpretation of unquoted times: '09:00:00' is left as a string, while '11:00:00' is converted into seconds, so all blog posts' `time:` fields are now quoted.  However, `make site` still throws an error in the preprocessor when trying to write YAML that I'm unable to pin down.\r\n\r\nAlso, sorting with a user-defined function is a lot more painful than it used to be - `bin/preprocess.py` uses decorate-sort-undecorate twice (in `harvest_blog` and the constrution of `cached_workshop_info`).  This shouldn't be necessary...","created_at":"2015-05-17T01:42:42Z","updated_at":"2015-05-19T08:36:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef43164dbb79c7316a285571d86039d272d2c2fc","assignee":{"login":"wking","id":209920,"avatar_url":"https://avatars.githubusercontent.com/u/209920?v=3","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/swcarpentry/site/pulls/970/commits","review_comments_url":"https://api.github.com/repos/swcarpentry/site/pulls/970/comments","review_comment_url":"https://api.github.com/repos/swcarpentry/site/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swcarpentry/site/issues/970/comments","statuses_url":"https://api.github.com/repos/swcarpentry/site/statuses/d4727716141494fe0e42afcc1b6b4fb1d5f0fa04","head":{"label":"gvwilson:convert-to-py3","ref":"convert-to-py3","sha":"d4727716141494fe0e42afcc1b6b4fb1d5f0fa04","user":{"login":"gvwilson","id":911566,"avatar_url":"https://avatars.githubusercontent.com/u/911566?v=3","gravatar_id":"","url":"https://api.github.com/users/gvwilson","html_url":"https://github.com/gvwilson","followers_url":"https://api.github.com/users/gvwilson/followers","following_url":"https://api.github.com/users/gvwilson/following{/other_user}","gists_url":"https://api.github.com/users/gvwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/gvwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvwilson/subscriptions","organizations_url":"https://api.github.com/users/gvwilson/orgs","repos_url":"https://api.github.com/users/gvwilson/repos","events_url":"https://api.github.com/users/gvwilson/events{/privacy}","received_events_url":"https://api.github.com/users/gvwilson/received_events","type":"User","site_admin":false},"repo":{"id":11411642,"name":"site","full_name":"gvwilson/site","owner":{"login":"gvwilson","id":911566,"avatar_url":"https://avatars.githubusercontent.com/u/911566?v=3","gravatar_id":"","url":"https://api.github.com/users/gvwilson","html_url":"https://github.com/gvwilson","followers_url":"https://api.github.com/users/gvwilson/followers","following_url":"https://api.github.com/users/gvwilson/following{/other_user}","gists_url":"https://api.github.com/users/gvwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/gvwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvwilson/subscriptions","organizations_url":"https://api.github.com/users/gvwilson/orgs","repos_url":"https://api.github.com/users/gvwilson/repos","events_url":"https://api.github.com/users/gvwilson/events{/privacy}","received_events_url":"https://api.github.com/users/gvwilson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gvwilson/site","description":"Software Carpentry web site.","fork":true,"url":"https://api.github.com/repos/gvwilson/site","forks_url":"https://api.github.com/repos/gvwilson/site/forks","keys_url":"https://api.github.com/repos/gvwilson/site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gvwilson/site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gvwilson/site/teams","hooks_url":"https://api.github.com/repos/gvwilson/site/hooks","issue_events_url":"https://api.github.com/repos/gvwilson/site/issues/events{/number}","events_url":"https://api.github.com/repos/gvwilson/site/events","assignees_url":"https://api.github.com/repos/gvwilson/site/assignees{/user}","branches_url":"https://api.github.com/repos/gvwilson/site/branches{/branch}","tags_url":"https://api.github.com/repos/gvwilson/site/tags","blobs_url":"https://api.github.com/repos/gvwilson/site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gvwilson/site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gvwilson/site/git/refs{/sha}","trees_url":"https://api.github.com/repos/gvwilson/site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gvwilson/site/statuses/{sha}","languages_url":"https://api.github.com/repos/gvwilson/site/languages","stargazers_url":"https://api.github.com/repos/gvwilson/site/stargazers","contributors_url":"https://api.github.com/repos/gvwilson/site/contributors","subscribers_url":"https://api.github.com/repos/gvwilson/site/subscribers","subscription_url":"https://api.github.com/repos/gvwilson/site/subscription","commits_url":"https://api.github.com/repos/gvwilson/site/commits{/sha}","git_commits_url":"https://api.github.com/repos/gvwilson/site/git/commits{/sha}","comments_url":"https://api.github.com/repos/gvwilson/site/comments{/number}","issue_comment_url":"https://api.github.com/repos/gvwilson/site/issues/comments{/number}","contents_url":"https://api.github.com/repos/gvwilson/site/contents/{+path}","compare_url":"https://api.github.com/repos/gvwilson/site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gvwilson/site/merges","archive_url":"https://api.github.com/repos/gvwilson/site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gvwilson/site/downloads","issues_url":"https://api.github.com/repos/gvwilson/site/issues{/number}","pulls_url":"https://api.github.com/repos/gvwilson/site/pulls{/number}","milestones_url":"https://api.github.com/repos/gvwilson/site/milestones{/number}","notifications_url":"https://api.github.com/repos/gvwilson/site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gvwilson/site/labels{/name}","releases_url":"https://api.github.com/repos/gvwilson/site/releases{/id}","created_at":"2013-07-15T00:30:10Z","updated_at":"2015-05-08T20:02:04Z","pushed_at":"2015-05-19T00:39:29Z","git_url":"git://github.com/gvwilson/site.git","ssh_url":"git@github.com:gvwilson/site.git","clone_url":"https://github.com/gvwilson/site.git","svn_url":"https://github.com/gvwilson/site","homepage":null,"size":100367,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"swcarpentry:master","ref":"master","sha":"9e8c8e9b4fb50070c9f6ff600d69440eece11525","user":{"login":"swcarpentry","id":2238358,"avatar_url":"https://avatars.githubusercontent.com/u/2238358?v=3","gravatar_id":"","url":"https://api.github.com/users/swcarpentry","html_url":"https://github.com/swcarpentry","followers_url":"https://api.github.com/users/swcarpentry/followers","following_url":"https://api.github.com/users/swcarpentry/following{/other_user}","gists_url":"https://api.github.com/users/swcarpentry/gists{/gist_id}","starred_url":"https://api.github.com/users/swcarpentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swcarpentry/subscriptions","organizations_url":"https://api.github.com/users/swcarpentry/orgs","repos_url":"https://api.github.com/users/swcarpentry/repos","events_url":"https://api.github.com/users/swcarpentry/events{/privacy}","received_events_url":"https://api.github.com/users/swcarpentry/received_events","type":"Organization","site_admin":false},"repo":{"id":11396385,"name":"site","full_name":"swcarpentry/site","owner":{"login":"swcarpentry","id":2238358,"avatar_url":"https://avatars.githubusercontent.com/u/2238358?v=3","gravatar_id":"","url":"https://api.github.com/users/swcarpentry","html_url":"https://github.com/swcarpentry","followers_url":"https://api.github.com/users/swcarpentry/followers","following_url":"https://api.github.com/users/swcarpentry/following{/other_user}","gists_url":"https://api.github.com/users/swcarpentry/gists{/gist_id}","starred_url":"https://api.github.com/users/swcarpentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swcarpentry/subscriptions","organizations_url":"https://api.github.com/users/swcarpentry/orgs","repos_url":"https://api.github.com/users/swcarpentry/repos","events_url":"https://api.github.com/users/swcarpentry/events{/privacy}","received_events_url":"https://api.github.com/users/swcarpentry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/swcarpentry/site","description":"Software Carpentry web site.","fork":false,"url":"https://api.github.com/repos/swcarpentry/site","forks_url":"https://api.github.com/repos/swcarpentry/site/forks","keys_url":"https://api.github.com/repos/swcarpentry/site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swcarpentry/site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swcarpentry/site/teams","hooks_url":"https://api.github.com/repos/swcarpentry/site/hooks","issue_events_url":"https://api.github.com/repos/swcarpentry/site/issues/events{/number}","events_url":"https://api.github.com/repos/swcarpentry/site/events","assignees_url":"https://api.github.com/repos/swcarpentry/site/assignees{/user}","branches_url":"https://api.github.com/repos/swcarpentry/site/branches{/branch}","tags_url":"https://api.github.com/repos/swcarpentry/site/tags","blobs_url":"https://api.github.com/repos/swcarpentry/site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swcarpentry/site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swcarpentry/site/git/refs{/sha}","trees_url":"https://api.github.com/repos/swcarpentry/site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swcarpentry/site/statuses/{sha}","languages_url":"https://api.github.com/repos/swcarpentry/site/languages","stargazers_url":"https://api.github.com/repos/swcarpentry/site/stargazers","contributors_url":"https://api.github.com/repos/swcarpentry/site/contributors","subscribers_url":"https://api.github.com/repos/swcarpentry/site/subscribers","subscription_url":"https://api.github.com/repos/swcarpentry/site/subscription","commits_url":"https://api.github.com/repos/swcarpentry/site/commits{/sha}","git_commits_url":"https://api.github.com/repos/swcarpentry/site/git/commits{/sha}","comments_url":"https://api.github.com/repos/swcarpentry/site/comments{/number}","issue_comment_url":"https://api.github.com/repos/swcarpentry/site/issues/comments{/number}","contents_url":"https://api.github.com/repos/swcarpentry/site/contents/{+path}","compare_url":"https://api.github.com/repos/swcarpentry/site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swcarpentry/site/merges","archive_url":"https://api.github.com/repos/swcarpentry/site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swcarpentry/site/downloads","issues_url":"https://api.github.com/repos/swcarpentry/site/issues{/number}","pulls_url":"https://api.github.com/repos/swcarpentry/site/pulls{/number}","milestones_url":"https://api.github.com/repos/swcarpentry/site/milestones{/number}","notifications_url":"https://api.github.com/repos/swcarpentry/site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swcarpentry/site/labels{/name}","releases_url":"https://api.github.com/repos/swcarpentry/site/releases{/id}","created_at":"2013-07-14T00:49:11Z","updated_at":"2015-05-11T06:55:03Z","pushed_at":"2015-05-19T00:49:15Z","git_url":"git://github.com/swcarpentry/site.git","ssh_url":"git@github.com:swcarpentry/site.git","clone_url":"https://github.com/swcarpentry/site.git","svn_url":"https://github.com/swcarpentry/site","homepage":null,"size":105852,"stargazers_count":44,"watchers_count":44,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":145,"mirror_url":null,"open_issues_count":28,"forks":145,"open_issues":28,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swcarpentry/site/pulls/970"},"html":{"href":"https://github.com/swcarpentry/site/pull/970"},"issue":{"href":"https://api.github.com/repos/swcarpentry/site/issues/970"},"comments":{"href":"https://api.github.com/repos/swcarpentry/site/issues/970/comments"},"review_comments":{"href":"https://api.github.com/repos/swcarpentry/site/pulls/970/comments"},"review_comment":{"href":"https://api.github.com/repos/swcarpentry/site/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swcarpentry/site/pulls/970/commits"},"statuses":{"href":"https://api.github.com/repos/swcarpentry/site/statuses/d4727716141494fe0e42afcc1b6b4fb1d5f0fa04"}}}}