{"action":"created","issue":{"url":"https://api.github.com/repos/gevent/gevent/issues/38","labels_url":"https://api.github.com/repos/gevent/gevent/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/gevent/gevent/issues/38/comments","events_url":"https://api.github.com/repos/gevent/gevent/issues/38/events","html_url":"https://github.com/gevent/gevent/issues/38","id":6862182,"number":38,"title":"python3","user":{"login":"denik","id":86671,"avatar_url":"https://avatars.githubusercontent.com/u/86671?v=3","gravatar_id":"","url":"https://api.github.com/users/denik","html_url":"https://github.com/denik","followers_url":"https://api.github.com/users/denik/followers","following_url":"https://api.github.com/users/denik/following{/other_user}","gists_url":"https://api.github.com/users/denik/gists{/gist_id}","starred_url":"https://api.github.com/users/denik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denik/subscriptions","organizations_url":"https://api.github.com/users/denik/orgs","repos_url":"https://api.github.com/users/denik/repos","events_url":"https://api.github.com/users/denik/events{/privacy}","received_events_url":"https://api.github.com/users/denik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":73,"created_at":"2012-09-13T22:04:32Z","updated_at":"2015-04-20T15:00:13Z","closed_at":null,"body":"Would be cool to have python3 support, ideally as single source.\n\nHere's an old python3 fork: http://bitbucket.org/jjonte/gevent\n\n<p><a href=\"http://code.google.com/p/gevent/issues/detail?id=38\">Reported by Denis.Bilenko.</a></p><hr/><h2>earlier comments</h2>\n<p><strong>Denis.Bilenko said, at 2011-01-28T05:36:07.000Z:</strong></p>\n<p>There's some work going on at https://bitbucket.org/Edmund_Ogban/gevent-py3k</p><p><strong>carsten.klein@axn-software.de said, at 2011-03-20T18:40:50.000Z:</strong></p>\n<p>Exception handling is a problem here. With Python2.5 there is only except Exception, e, whereas Python3.x requires except Exception as e.\n\nMaking this single source supporting 2.5 and higher is therefore quite difficult. Or is there some __future__ that can be used to simulate the new syntax included with the language since 2.6?\n\nOtherwise I would say: drop support for Python 2.5 with the next release version, and make that one compatible with 2.6 .. 3.2.\n</p><p><strong>anacrolix said, at 2011-09-13T00:03:14.000Z:</strong></p>\n<p>I'm keen to try gevent, but I sailed for Python3 over a year ago.</p><p><strong>anacrolix said, at 2011-09-20T00:23:26.000Z:</strong></p>\n<p>Denis can you report on the status of Python3 support for gevent?</p><p><strong>Denis.Bilenko said, at 2011-12-20T18:14:35.000Z:</strong></p>\n<p>Issue 89 has been merged into this issue.</p><p><strong>luchenue said, at 2011-12-23T09:14:52.000Z:</strong></p>\n<p>Any news ?</p><p><strong>anacrolix said, at 2011-12-23T11:09:10.000Z:</strong></p>\n<p>From what I've observed, I don't think Denis wants to break support for Python 2 yet, and so won't accept patches that don't support both 2 *and* 3, which is a complex obstacle.</p><p><strong>k.cherkasoff said, at 2011-12-23T11:42:53.000Z:</strong></p>\n<p>Is there any up to date forks for python 3.x ?\n</p><p><strong>whitelynx said, at 2012-02-01T07:13:18.000Z:</strong></p>\n<p>I think the general approach for maintaining anything that's supposed to work on 2.5 - 3.x is to use the 2to3 tool to automatically generate a python3 version from the python2 source. The exception handling issue mentioned by carsten above (comment 2) is treated by the 'except' fixer in 2to3. (http://docs.python.org/library/2to3.html?highlight=except#2to3fixer-except) Since fixers can be run individually, it shouldn't be too difficult to put together a 2to3 command line that would be able to translate gevent with a minimum amount of breakage, and then just manually clean up the results. I do wish there was a 3to2 or similar that would translate some of the python3-style idioms to something compatible with 2.5, as with the 'except _ as _' syntax.</p><p><strong>amcnabb8 said, at 2012-02-09T19:14:00.000Z:</strong></p>\n<p>The six library makes it very easy to support both Python 2 (>=2.6) and Python 3 without needing 2to3. With a couple of workarounds, Michael Foord has shown that it's entirely possible to support Python 2.4 without 2to3. But really, it's not as hard as it sounds to support both Python 2 and 3, and there are two reasonable approaches.</p>"},"comment":{"url":"https://api.github.com/repos/gevent/gevent/issues/comments/94476005","html_url":"https://github.com/gevent/gevent/issues/38#issuecomment-94476005","issue_url":"https://api.github.com/repos/gevent/gevent/issues/38","id":94476005,"user":{"login":"aidylewis","id":6703997,"avatar_url":"https://avatars.githubusercontent.com/u/6703997?v=3","gravatar_id":"","url":"https://api.github.com/users/aidylewis","html_url":"https://github.com/aidylewis","followers_url":"https://api.github.com/users/aidylewis/followers","following_url":"https://api.github.com/users/aidylewis/following{/other_user}","gists_url":"https://api.github.com/users/aidylewis/gists{/gist_id}","starred_url":"https://api.github.com/users/aidylewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aidylewis/subscriptions","organizations_url":"https://api.github.com/users/aidylewis/orgs","repos_url":"https://api.github.com/users/aidylewis/repos","events_url":"https://api.github.com/users/aidylewis/events{/privacy}","received_events_url":"https://api.github.com/users/aidylewis/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T15:00:13Z","updated_at":"2015-04-20T15:00:13Z","body":"Is it worth entering in the [installation notes](http://www.gevent.org/intro.html#installation) that python 3 is not supported. It currently states: 'gevent runs on Python 2.5 and newer and requires'."}}