{"action":"created","issue":{"url":"https://api.github.com/repos/mitsuhiko/click/issues/494","labels_url":"https://api.github.com/repos/mitsuhiko/click/issues/494/labels{/name}","comments_url":"https://api.github.com/repos/mitsuhiko/click/issues/494/comments","events_url":"https://api.github.com/repos/mitsuhiko/click/issues/494/events","html_url":"https://github.com/mitsuhiko/click/issues/494","id":124284063,"number":494,"title":"Python 3.4.3 on OS X: _unicodefun: TypeError: 'str' does not support the buffer interface","user":{"login":"ivan","id":4458,"avatar_url":"https://avatars.githubusercontent.com/u/4458?v=3","gravatar_id":"","url":"https://api.github.com/users/ivan","html_url":"https://github.com/ivan","followers_url":"https://api.github.com/users/ivan/followers","following_url":"https://api.github.com/users/ivan/following{/other_user}","gists_url":"https://api.github.com/users/ivan/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan/subscriptions","organizations_url":"https://api.github.com/users/ivan/orgs","repos_url":"https://api.github.com/users/ivan/repos","events_url":"https://api.github.com/users/ivan/events{/privacy}","received_events_url":"https://api.github.com/users/ivan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-29T23:49:57Z","updated_at":"2015-12-29T23:58:49Z","closed_at":null,"body":"I have an OS X / Python 3.4.3 user in https://github.com/ludios/grab-site/issues/64 seeing:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Volumes/Macintosh HD/Users/user/Library/Python/3.4/bin/grab-site\", line 4, in <module>\r\n    main.main()\r\n  File \"/Volumes/Macintosh HD/Users/user/Library/Python/3.4/lib/python/site-packages/click/core.py\", line 716, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/Volumes/Macintosh HD/Users/user/Library/Python/3.4/lib/python/site-packages/click/core.py\", line 675, in main\r\n    _verify_python3_env()\r\n  File \"/Volumes/Macintosh HD/Users/user/Library/Python/3.4/lib/python/site-packages/click/_unicodefun.py\", line 69, in _verify_python3_env\r\n    if locale.lower().endswith(('.utf-8', '.utf8')):\r\nTypeError: 'str' does not support the buffer interface\r\n```\r\n\r\ncaused by https://github.com/mitsuhiko/click/blob/8c6c1505adf8ef701f6006a6749a0a493a67fbef/click/_unicodefun.py#L69\r\n\r\nI believe the `.strip()` and `.lower()` are operating on bytes instead of unicode, leading to a failure like this:\r\n\r\n```\r\n>>> b\"ab\".strip().lower().endswith((\"b\", \"a\"))\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nTypeError: 'str' does not support the buffer interface\r\n```"},"comment":{"url":"https://api.github.com/repos/mitsuhiko/click/issues/comments/167902230","html_url":"https://github.com/mitsuhiko/click/issues/494#issuecomment-167902230","issue_url":"https://api.github.com/repos/mitsuhiko/click/issues/494","id":167902230,"user":{"login":"mitsuhiko","id":7396,"avatar_url":"https://avatars.githubusercontent.com/u/7396?v=3","gravatar_id":"","url":"https://api.github.com/users/mitsuhiko","html_url":"https://github.com/mitsuhiko","followers_url":"https://api.github.com/users/mitsuhiko/followers","following_url":"https://api.github.com/users/mitsuhiko/following{/other_user}","gists_url":"https://api.github.com/users/mitsuhiko/gists{/gist_id}","starred_url":"https://api.github.com/users/mitsuhiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitsuhiko/subscriptions","organizations_url":"https://api.github.com/users/mitsuhiko/orgs","repos_url":"https://api.github.com/users/mitsuhiko/repos","events_url":"https://api.github.com/users/mitsuhiko/events{/privacy}","received_events_url":"https://api.github.com/users/mitsuhiko/received_events","type":"User","site_admin":false},"created_at":"2015-12-29T23:58:49Z","updated_at":"2015-12-29T23:58:49Z","body":"I'm amazed  this did not come up earlier."}}