{"action":"created","comment":{"url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/comments/71338111","id":71338111,"diff_hunk":"@@ -799,8 +800,9 @@ def __launch_app_proxy_for_project(self, project, pipeline_configuration_id=None\n                 \"proxy_auth\": server_auth,\n             },\n         }\n-        (_, pickle_data_file) = tempfile.mkstemp(suffix='.pkl')\n+        (fd, pickle_data_file) = tempfile.mkstemp(suffix='.pkl')\n         pickle.dump(desktop_data, open(pickle_data_file, \"wb\"))","path":"python/tk_desktop/desktop_window.py","position":23,"original_position":23,"commit_id":"f039d944111853a2440d669697ee67d05fc32a2f","original_commit_id":"f039d944111853a2440d669697ee67d05fc32a2f","user":{"login":"jfboismenu","id":8126447,"avatar_url":"https://avatars.githubusercontent.com/u/8126447?v=3","gravatar_id":"","url":"https://api.github.com/users/jfboismenu","html_url":"https://github.com/jfboismenu","followers_url":"https://api.github.com/users/jfboismenu/followers","following_url":"https://api.github.com/users/jfboismenu/following{/other_user}","gists_url":"https://api.github.com/users/jfboismenu/gists{/gist_id}","starred_url":"https://api.github.com/users/jfboismenu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfboismenu/subscriptions","organizations_url":"https://api.github.com/users/jfboismenu/orgs","repos_url":"https://api.github.com/users/jfboismenu/repos","events_url":"https://api.github.com/users/jfboismenu/events{/privacy}","received_events_url":"https://api.github.com/users/jfboismenu/received_events","type":"User","site_admin":false},"body":"Should `try`/`except` around dump, just in case. Otherwise this is good to go.","created_at":"2016-07-19T13:32:49Z","updated_at":"2016-07-19T13:32:49Z","html_url":"https://github.com/shotgunsoftware/tk-desktop/pull/34#discussion_r71338111","pull_request_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/comments/71338111"},"html":{"href":"https://github.com/shotgunsoftware/tk-desktop/pull/34#discussion_r71338111"},"pull_request":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/34","id":71747003,"html_url":"https://github.com/shotgunsoftware/tk-desktop/pull/34","diff_url":"https://github.com/shotgunsoftware/tk-desktop/pull/34.diff","patch_url":"https://github.com/shotgunsoftware/tk-desktop/pull/34.patch","issue_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/34","number":34,"state":"open","locked":false,"title":"for #36693: ensure we explicitly close os-level file descriptors","user":{"login":"kporangehat","id":3391,"avatar_url":"https://avatars.githubusercontent.com/u/3391?v=3","gravatar_id":"","url":"https://api.github.com/users/kporangehat","html_url":"https://github.com/kporangehat","followers_url":"https://api.github.com/users/kporangehat/followers","following_url":"https://api.github.com/users/kporangehat/following{/other_user}","gists_url":"https://api.github.com/users/kporangehat/gists{/gist_id}","starred_url":"https://api.github.com/users/kporangehat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kporangehat/subscriptions","organizations_url":"https://api.github.com/users/kporangehat/orgs","repos_url":"https://api.github.com/users/kporangehat/repos","events_url":"https://api.github.com/users/kporangehat/events{/privacy}","received_events_url":"https://api.github.com/users/kporangehat/received_events","type":"User","site_admin":false},"body":"OS-level file handles opened with `mkstemp()` don't get closed automatically and over time can contribute to reaching the OS limit of open file handles. Reaching the OS limit will generate errors like:\r\n```\r\nIOError: [Errno 24] Too many open files: '/tmp/tmpJ6g4Ke'\r\n```\r\n```\r\nWindows Error [Error 32]\r\n```","created_at":"2016-05-27T17:31:10Z","updated_at":"2016-07-19T13:32:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62d3bedb6f4bc04bfad2b034d63bbe9e75631c5c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/34/commits","review_comments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/34/comments","review_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/34/comments","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/statuses/f039d944111853a2440d669697ee67d05fc32a2f","head":{"label":"shotgunsoftware:36693_close_file_handles","ref":"36693_close_file_handles","sha":"f039d944111853a2440d669697ee67d05fc32a2f","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":14870751,"name":"tk-desktop","full_name":"shotgunsoftware/tk-desktop","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shotgunsoftware/tk-desktop","description":"A Shotgun Pipeline Toolkit engine for desktop applications and operating system integration.","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-desktop","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/deployments","created_at":"2013-12-02T18:22:12Z","updated_at":"2016-06-24T15:48:41Z","pushed_at":"2016-07-19T05:02:38Z","git_url":"git://github.com/shotgunsoftware/tk-desktop.git","ssh_url":"git@github.com:shotgunsoftware/tk-desktop.git","clone_url":"https://github.com/shotgunsoftware/tk-desktop.git","svn_url":"https://github.com/shotgunsoftware/tk-desktop","homepage":null,"size":4463,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":6,"default_branch":"master"}},"base":{"label":"shotgunsoftware:master","ref":"master","sha":"5460339feef95cd2674d9f0085107ff1e6ed090d","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":14870751,"name":"tk-desktop","full_name":"shotgunsoftware/tk-desktop","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shotgunsoftware/tk-desktop","description":"A Shotgun Pipeline Toolkit engine for desktop applications and operating system integration.","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-desktop","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/deployments","created_at":"2013-12-02T18:22:12Z","updated_at":"2016-06-24T15:48:41Z","pushed_at":"2016-07-19T05:02:38Z","git_url":"git://github.com/shotgunsoftware/tk-desktop.git","ssh_url":"git@github.com:shotgunsoftware/tk-desktop.git","clone_url":"https://github.com/shotgunsoftware/tk-desktop.git","svn_url":"https://github.com/shotgunsoftware/tk-desktop","homepage":null,"size":4463,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/34"},"html":{"href":"https://github.com/shotgunsoftware/tk-desktop/pull/34"},"issue":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/34"},"comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/statuses/f039d944111853a2440d669697ee67d05fc32a2f"}}}}
{"actor":{"display_login":"jfboismenu"}}