{"action":"created","comment":{"url":"https://api.github.com/repos/conda/conda-build/pulls/comments/55747965","id":55747965,"diff_hunk":"@@ -47,6 +47,10 @@ def get_git_build_info(src_dir, git_url, expected_rev):\n     env = os.environ.copy()\n     d = {}\n     git_dir = join(src_dir, '.git')\n+    if not isinstance(git_dir, str):","path":"conda_build/environ.py","position":4,"original_position":4,"commit_id":"5bc0e7ab15184c0bd6f6f616be04c83579445b10","original_commit_id":"7c1f82864ca386b5a41ab08da2e79ae25b4f280c","user":{"login":"stuarteberg","id":1655821,"avatar_url":"https://avatars.githubusercontent.com/u/1655821?v=3","gravatar_id":"","url":"https://api.github.com/users/stuarteberg","html_url":"https://github.com/stuarteberg","followers_url":"https://api.github.com/users/stuarteberg/followers","following_url":"https://api.github.com/users/stuarteberg/following{/other_user}","gists_url":"https://api.github.com/users/stuarteberg/gists{/gist_id}","starred_url":"https://api.github.com/users/stuarteberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuarteberg/subscriptions","organizations_url":"https://api.github.com/users/stuarteberg/orgs","repos_url":"https://api.github.com/users/stuarteberg/repos","events_url":"https://api.github.com/users/stuarteberg/events{/privacy}","received_events_url":"https://api.github.com/users/stuarteberg/received_events","type":"User","site_admin":false},"body":"OK, on Windows, I see this:\r\n\r\n```\r\n>>> import sys\r\n>>> sys.getdefaultencoding()\r\n'ascii'\r\n>>> sys.getfilesystemencoding()\r\n'mbcs'\r\n```\r\n\r\nAnd the [Python docs][1] say:\r\n\r\n[1]: https://docs.python.org/2/library/sys.html#sys.getfilesystemencoding\r\n\r\n>On Windows NT+, file names are Unicode natively, so no conversion is performed. [**getfilesystemencoding()**][1] still \r\n>returns `'mbcs'`, as this is the encoding that applications should use when they explicitly want to convert Unicode \r\n>strings to byte strings that are equivalent when used as file names.\r\n\r\nSo, I still think using `getfilesystemencoding()` is correct in this case, and using `str(git_dir)` would be wrong, even though it might work in many cases.\r\n\r\nBut either way, I'm sure that people have probably developed a healthy aversion to putting umlauts in their git repo names.  That's just asking for trouble.","created_at":"2016-03-10T20:56:40Z","updated_at":"2016-03-10T20:56:40Z","html_url":"https://github.com/conda/conda-build/pull/824#discussion_r55747965","pull_request_url":"https://api.github.com/repos/conda/conda-build/pulls/824","_links":{"self":{"href":"https://api.github.com/repos/conda/conda-build/pulls/comments/55747965"},"html":{"href":"https://github.com/conda/conda-build/pull/824#discussion_r55747965"},"pull_request":{"href":"https://api.github.com/repos/conda/conda-build/pulls/824"}}},"pull_request":{"url":"https://api.github.com/repos/conda/conda-build/pulls/824","id":62437875,"html_url":"https://github.com/conda/conda-build/pull/824","diff_url":"https://github.com/conda/conda-build/pull/824.diff","patch_url":"https://github.com/conda/conda-build/pull/824.patch","issue_url":"https://api.github.com/repos/conda/conda-build/issues/824","number":824,"state":"open","locked":false,"title":"Fix Windows crash in environ.get_git_build_info()","user":{"login":"stuarteberg","id":1655821,"avatar_url":"https://avatars.githubusercontent.com/u/1655821?v=3","gravatar_id":"","url":"https://api.github.com/users/stuarteberg","html_url":"https://github.com/stuarteberg","followers_url":"https://api.github.com/users/stuarteberg/followers","following_url":"https://api.github.com/users/stuarteberg/following{/other_user}","gists_url":"https://api.github.com/users/stuarteberg/gists{/gist_id}","starred_url":"https://api.github.com/users/stuarteberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuarteberg/subscriptions","organizations_url":"https://api.github.com/users/stuarteberg/orgs","repos_url":"https://api.github.com/users/stuarteberg/repos","events_url":"https://api.github.com/users/stuarteberg/events{/privacy}","received_events_url":"https://api.github.com/users/stuarteberg/received_events","type":"User","site_admin":false},"body":"~~Awaiting feedback in #820.~~  Now tested and ready for merge.\r\n\r\nenviron.get_git_build_info(): All entries in env dict must be str, not unicode.\r\n\r\nFixes #820","created_at":"2016-03-10T18:57:28Z","updated_at":"2016-03-10T20:56:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a70e129bcaf68b6e6a8be4177334d9ef5ae032e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/conda/conda-build/pulls/824/commits","review_comments_url":"https://api.github.com/repos/conda/conda-build/pulls/824/comments","review_comment_url":"https://api.github.com/repos/conda/conda-build/pulls/comments{/number}","comments_url":"https://api.github.com/repos/conda/conda-build/issues/824/comments","statuses_url":"https://api.github.com/repos/conda/conda-build/statuses/5bc0e7ab15184c0bd6f6f616be04c83579445b10","head":{"label":"stuarteberg:fix-820","ref":"fix-820","sha":"5bc0e7ab15184c0bd6f6f616be04c83579445b10","user":{"login":"stuarteberg","id":1655821,"avatar_url":"https://avatars.githubusercontent.com/u/1655821?v=3","gravatar_id":"","url":"https://api.github.com/users/stuarteberg","html_url":"https://github.com/stuarteberg","followers_url":"https://api.github.com/users/stuarteberg/followers","following_url":"https://api.github.com/users/stuarteberg/following{/other_user}","gists_url":"https://api.github.com/users/stuarteberg/gists{/gist_id}","starred_url":"https://api.github.com/users/stuarteberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuarteberg/subscriptions","organizations_url":"https://api.github.com/users/stuarteberg/orgs","repos_url":"https://api.github.com/users/stuarteberg/repos","events_url":"https://api.github.com/users/stuarteberg/events{/privacy}","received_events_url":"https://api.github.com/users/stuarteberg/received_events","type":"User","site_admin":false},"repo":{"id":37874194,"name":"conda-build","full_name":"stuarteberg/conda-build","owner":{"login":"stuarteberg","id":1655821,"avatar_url":"https://avatars.githubusercontent.com/u/1655821?v=3","gravatar_id":"","url":"https://api.github.com/users/stuarteberg","html_url":"https://github.com/stuarteberg","followers_url":"https://api.github.com/users/stuarteberg/followers","following_url":"https://api.github.com/users/stuarteberg/following{/other_user}","gists_url":"https://api.github.com/users/stuarteberg/gists{/gist_id}","starred_url":"https://api.github.com/users/stuarteberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuarteberg/subscriptions","organizations_url":"https://api.github.com/users/stuarteberg/orgs","repos_url":"https://api.github.com/users/stuarteberg/repos","events_url":"https://api.github.com/users/stuarteberg/events{/privacy}","received_events_url":"https://api.github.com/users/stuarteberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stuarteberg/conda-build","description":"Commands and tools for building conda packages","fork":true,"url":"https://api.github.com/repos/stuarteberg/conda-build","forks_url":"https://api.github.com/repos/stuarteberg/conda-build/forks","keys_url":"https://api.github.com/repos/stuarteberg/conda-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stuarteberg/conda-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stuarteberg/conda-build/teams","hooks_url":"https://api.github.com/repos/stuarteberg/conda-build/hooks","issue_events_url":"https://api.github.com/repos/stuarteberg/conda-build/issues/events{/number}","events_url":"https://api.github.com/repos/stuarteberg/conda-build/events","assignees_url":"https://api.github.com/repos/stuarteberg/conda-build/assignees{/user}","branches_url":"https://api.github.com/repos/stuarteberg/conda-build/branches{/branch}","tags_url":"https://api.github.com/repos/stuarteberg/conda-build/tags","blobs_url":"https://api.github.com/repos/stuarteberg/conda-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stuarteberg/conda-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stuarteberg/conda-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/stuarteberg/conda-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stuarteberg/conda-build/statuses/{sha}","languages_url":"https://api.github.com/repos/stuarteberg/conda-build/languages","stargazers_url":"https://api.github.com/repos/stuarteberg/conda-build/stargazers","contributors_url":"https://api.github.com/repos/stuarteberg/conda-build/contributors","subscribers_url":"https://api.github.com/repos/stuarteberg/conda-build/subscribers","subscription_url":"https://api.github.com/repos/stuarteberg/conda-build/subscription","commits_url":"https://api.github.com/repos/stuarteberg/conda-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/stuarteberg/conda-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/stuarteberg/conda-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/stuarteberg/conda-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/stuarteberg/conda-build/contents/{+path}","compare_url":"https://api.github.com/repos/stuarteberg/conda-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stuarteberg/conda-build/merges","archive_url":"https://api.github.com/repos/stuarteberg/conda-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stuarteberg/conda-build/downloads","issues_url":"https://api.github.com/repos/stuarteberg/conda-build/issues{/number}","pulls_url":"https://api.github.com/repos/stuarteberg/conda-build/pulls{/number}","milestones_url":"https://api.github.com/repos/stuarteberg/conda-build/milestones{/number}","notifications_url":"https://api.github.com/repos/stuarteberg/conda-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stuarteberg/conda-build/labels{/name}","releases_url":"https://api.github.com/repos/stuarteberg/conda-build/releases{/id}","deployments_url":"https://api.github.com/repos/stuarteberg/conda-build/deployments","created_at":"2015-06-22T18:49:19Z","updated_at":"2015-06-22T18:49:21Z","pushed_at":"2016-03-10T20:34:10Z","git_url":"git://github.com/stuarteberg/conda-build.git","ssh_url":"git@github.com:stuarteberg/conda-build.git","clone_url":"https://github.com/stuarteberg/conda-build.git","svn_url":"https://github.com/stuarteberg/conda-build","homepage":null,"size":2043,"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":"master"}},"base":{"label":"conda:master","ref":"master","sha":"04d49f5f627aa96b69aa9f9f3dc6c13cb184d1b1","user":{"login":"conda","id":6392739,"avatar_url":"https://avatars.githubusercontent.com/u/6392739?v=3","gravatar_id":"","url":"https://api.github.com/users/conda","html_url":"https://github.com/conda","followers_url":"https://api.github.com/users/conda/followers","following_url":"https://api.github.com/users/conda/following{/other_user}","gists_url":"https://api.github.com/users/conda/gists{/gist_id}","starred_url":"https://api.github.com/users/conda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conda/subscriptions","organizations_url":"https://api.github.com/users/conda/orgs","repos_url":"https://api.github.com/users/conda/repos","events_url":"https://api.github.com/users/conda/events{/privacy}","received_events_url":"https://api.github.com/users/conda/received_events","type":"Organization","site_admin":false},"repo":{"id":16008423,"name":"conda-build","full_name":"conda/conda-build","owner":{"login":"conda","id":6392739,"avatar_url":"https://avatars.githubusercontent.com/u/6392739?v=3","gravatar_id":"","url":"https://api.github.com/users/conda","html_url":"https://github.com/conda","followers_url":"https://api.github.com/users/conda/followers","following_url":"https://api.github.com/users/conda/following{/other_user}","gists_url":"https://api.github.com/users/conda/gists{/gist_id}","starred_url":"https://api.github.com/users/conda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conda/subscriptions","organizations_url":"https://api.github.com/users/conda/orgs","repos_url":"https://api.github.com/users/conda/repos","events_url":"https://api.github.com/users/conda/events{/privacy}","received_events_url":"https://api.github.com/users/conda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/conda/conda-build","description":"Commands and tools for building conda packages","fork":false,"url":"https://api.github.com/repos/conda/conda-build","forks_url":"https://api.github.com/repos/conda/conda-build/forks","keys_url":"https://api.github.com/repos/conda/conda-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/conda/conda-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/conda/conda-build/teams","hooks_url":"https://api.github.com/repos/conda/conda-build/hooks","issue_events_url":"https://api.github.com/repos/conda/conda-build/issues/events{/number}","events_url":"https://api.github.com/repos/conda/conda-build/events","assignees_url":"https://api.github.com/repos/conda/conda-build/assignees{/user}","branches_url":"https://api.github.com/repos/conda/conda-build/branches{/branch}","tags_url":"https://api.github.com/repos/conda/conda-build/tags","blobs_url":"https://api.github.com/repos/conda/conda-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/conda/conda-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/conda/conda-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/conda/conda-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/conda/conda-build/statuses/{sha}","languages_url":"https://api.github.com/repos/conda/conda-build/languages","stargazers_url":"https://api.github.com/repos/conda/conda-build/stargazers","contributors_url":"https://api.github.com/repos/conda/conda-build/contributors","subscribers_url":"https://api.github.com/repos/conda/conda-build/subscribers","subscription_url":"https://api.github.com/repos/conda/conda-build/subscription","commits_url":"https://api.github.com/repos/conda/conda-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/conda/conda-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/conda/conda-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/conda/conda-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/conda/conda-build/contents/{+path}","compare_url":"https://api.github.com/repos/conda/conda-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/conda/conda-build/merges","archive_url":"https://api.github.com/repos/conda/conda-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/conda/conda-build/downloads","issues_url":"https://api.github.com/repos/conda/conda-build/issues{/number}","pulls_url":"https://api.github.com/repos/conda/conda-build/pulls{/number}","milestones_url":"https://api.github.com/repos/conda/conda-build/milestones{/number}","notifications_url":"https://api.github.com/repos/conda/conda-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/conda/conda-build/labels{/name}","releases_url":"https://api.github.com/repos/conda/conda-build/releases{/id}","deployments_url":"https://api.github.com/repos/conda/conda-build/deployments","created_at":"2014-01-17T18:46:21Z","updated_at":"2016-03-09T00:28:50Z","pushed_at":"2016-03-10T20:34:11Z","git_url":"git://github.com/conda/conda-build.git","ssh_url":"git@github.com:conda/conda-build.git","clone_url":"https://github.com/conda/conda-build.git","svn_url":"https://github.com/conda/conda-build","homepage":null,"size":3654,"stargazers_count":33,"watchers_count":33,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":297,"forks":96,"open_issues":297,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/conda/conda-build/pulls/824"},"html":{"href":"https://github.com/conda/conda-build/pull/824"},"issue":{"href":"https://api.github.com/repos/conda/conda-build/issues/824"},"comments":{"href":"https://api.github.com/repos/conda/conda-build/issues/824/comments"},"review_comments":{"href":"https://api.github.com/repos/conda/conda-build/pulls/824/comments"},"review_comment":{"href":"https://api.github.com/repos/conda/conda-build/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/conda/conda-build/pulls/824/commits"},"statuses":{"href":"https://api.github.com/repos/conda/conda-build/statuses/5bc0e7ab15184c0bd6f6f616be04c83579445b10"}}}}