{"action":"created","issue":{"url":"https://api.github.com/repos/jelmer/dulwich/issues/435","repository_url":"https://api.github.com/repos/jelmer/dulwich","labels_url":"https://api.github.com/repos/jelmer/dulwich/issues/435/labels{/name}","comments_url":"https://api.github.com/repos/jelmer/dulwich/issues/435/comments","events_url":"https://api.github.com/repos/jelmer/dulwich/issues/435/events","html_url":"https://github.com/jelmer/dulwich/issues/435","id":161459445,"number":435,"title":"Inconsistent type requirement for client.fetch(...) in Python 3","user":{"login":"jeroenroosen","id":1044824,"avatar_url":"https://avatars.githubusercontent.com/u/1044824?v=3","gravatar_id":"","url":"https://api.github.com/users/jeroenroosen","html_url":"https://github.com/jeroenroosen","followers_url":"https://api.github.com/users/jeroenroosen/followers","following_url":"https://api.github.com/users/jeroenroosen/following{/other_user}","gists_url":"https://api.github.com/users/jeroenroosen/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroenroosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroenroosen/subscriptions","organizations_url":"https://api.github.com/users/jeroenroosen/orgs","repos_url":"https://api.github.com/users/jeroenroosen/repos","events_url":"https://api.github.com/users/jeroenroosen/events{/privacy}","received_events_url":"https://api.github.com/users/jeroenroosen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-21T14:57:08Z","updated_at":"2016-06-23T23:39:16Z","closed_at":null,"body":"Running into a small issue with Python 3:\r\n```python\r\nfrom dulwich import client\r\n\r\nc, p = client.get_transport_and_path_from_url(...)\r\nc.fetch(p, ...)\r\n```\r\n* for `file://...` urls client.fetch requires a `str` to function (or else: `TypeError(\"Can't mix strings and bytes in path components\")` by `os.path.join`\r\n* for \"ssh://\" it requires a `bytes` (or else: `TypeError(p) in _connect(...)`)"},"comment":{"url":"https://api.github.com/repos/jelmer/dulwich/issues/comments/228217314","html_url":"https://github.com/jelmer/dulwich/issues/435#issuecomment-228217314","issue_url":"https://api.github.com/repos/jelmer/dulwich/issues/435","id":228217314,"user":{"login":"jelmer","id":49032,"avatar_url":"https://avatars.githubusercontent.com/u/49032?v=3","gravatar_id":"","url":"https://api.github.com/users/jelmer","html_url":"https://github.com/jelmer","followers_url":"https://api.github.com/users/jelmer/followers","following_url":"https://api.github.com/users/jelmer/following{/other_user}","gists_url":"https://api.github.com/users/jelmer/gists{/gist_id}","starred_url":"https://api.github.com/users/jelmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelmer/subscriptions","organizations_url":"https://api.github.com/users/jelmer/orgs","repos_url":"https://api.github.com/users/jelmer/repos","events_url":"https://api.github.com/users/jelmer/events{/privacy}","received_events_url":"https://api.github.com/users/jelmer/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T23:39:16Z","updated_at":"2016-06-23T23:39:16Z","body":"This is indeed a bug, though it is not clear what the right solution is here. Python URLs are strings. Paths are strings and a optionally bytestrings. The path that is sent to the remote host is a bytestring, and we have no way of knowing what encoding the remote host is using.\n\n\n\nOn 21 June 2016 15:57:08 BST, Jeroen Roosen <notifications@github.com> wrote:\n>Running into a small issue with Python 3:\n>```python\n>from dulwich import client\n>\n>c, p = client.get_transport_and_path_from_url(...)\n>c.fetch(p, ...)\n>```\n>* for `file://...` urls client.fetch requires a `str` to function (or\n>else: `TypeError(\"Can't mix strings and bytes in path components\")` by\n>`os.path.join`\n>* for \"ssh://\" it requires a `bytes` (or else: `TypeError(p) in\n>_connect(...)`)\n>\n>---\n>You are receiving this because you are subscribed to this thread.\n>Reply to this email directly or view it on GitHub:\n>https://github.com/jelmer/dulwich/issues/435\n\n-- \nSent from my Android device with K-9 Mail. Please excuse my brevity."}}
{"actor":{"display_login":"jelmer"}}