python3 #38

Closed
denik opened this Issue Sep 13, 2012 · 98 comments

Comments

Projects
None yet
@denik
Member

denik commented Sep 13, 2012

Would be cool to have python3 support, ideally as single source.

Here's an old python3 fork: http://bitbucket.org/jjonte/gevent

Reported by Denis.Bilenko.


earlier comments

Denis.Bilenko said, at 2011-01-28T05:36:07.000Z:

There's some work going on at https://bitbucket.org/Edmund_Ogban/gevent-py3k

carsten.klein@axn-software.de said, at 2011-03-20T18:40:50.000Z:

Exception handling is a problem here. With Python2.5 there is only except Exception, e, whereas Python3.x requires except Exception as e.

Making 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?

Otherwise I would say: drop support for Python 2.5 with the next release version, and make that one compatible with 2.6 .. 3.2.

anacrolix said, at 2011-09-13T00:03:14.000Z:

I'm keen to try gevent, but I sailed for Python3 over a year ago.

anacrolix said, at 2011-09-20T00:23:26.000Z:

Denis can you report on the status of Python3 support for gevent?

Denis.Bilenko said, at 2011-12-20T18:14:35.000Z:

Issue 89 has been merged into this issue.

luchenue said, at 2011-12-23T09:14:52.000Z:

Any news ?

anacrolix said, at 2011-12-23T11:09:10.000Z:

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.

k.cherkasoff said, at 2011-12-23T11:42:53.000Z:

Is there any up to date forks for python 3.x ?

whitelynx said, at 2012-02-01T07:13:18.000Z:

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.

amcnabb8 said, at 2012-02-09T19:14:00.000Z:

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.

@shakefu

This comment has been minimized.

Show comment
Hide comment
@shakefu

shakefu Oct 1, 2012

Just want to add a +1 to this, though I'm not sure if I can contribute. With the latest Python 3.3 release, lack of gevent is the only thing holding me back from making the jump.

shakefu commented Oct 1, 2012

Just want to add a +1 to this, though I'm not sure if I can contribute. With the latest Python 3.3 release, lack of gevent is the only thing holding me back from making the jump.

@Ivoz

This comment has been minimized.

Show comment
Hide comment
@Ivoz

Ivoz Oct 24, 2012

Contributor

Would you be willing to drop 2.5 for 3.3?

Contributor

Ivoz commented Oct 24, 2012

Would you be willing to drop 2.5 for 3.3?

@denik

This comment has been minimized.

Show comment
Hide comment
@denik

denik Oct 24, 2012

Member

I think so. unlikely for 1.0 (there's just no time), but for some release after that, yes.

Member

denik commented Oct 24, 2012

I think so. unlikely for 1.0 (there's just no time), but for some release after that, yes.

@jakewan

This comment has been minimized.

Show comment
Hide comment
@jakewan

jakewan Oct 24, 2012

I'm really glad this is on the radar. I'm sort of in the same boat as anacrolix above. I use Python 3 by default nowadays, and would love to be able to use it with gevent.

jakewan commented Oct 24, 2012

I'm really glad this is on the radar. I'm sort of in the same boat as anacrolix above. I use Python 3 by default nowadays, and would love to be able to use it with gevent.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Oct 29, 2012

I really really would like to see gevent support Python 3 as soon as possible.. It's one of those vital python libraries that if starts supporting 3.x, lot's of python crowd will be making the switch.

ghost commented Oct 29, 2012

I really really would like to see gevent support Python 3 as soon as possible.. It's one of those vital python libraries that if starts supporting 3.x, lot's of python crowd will be making the switch.

@niwinz

This comment has been minimized.

Show comment
Hide comment
@niwinz

niwinz Oct 29, 2012

+1

I'm migrating my development to python3 and really, I would have gevent with python3.

niwinz commented Oct 29, 2012

+1

I'm migrating my development to python3 and really, I would have gevent with python3.

@denik

This comment has been minimized.

Show comment
Hide comment
@denik

denik Oct 29, 2012

Member

+1s will not speed it up (we already know lots of people want it).

To help, contribute. Create a branch, enable python 3.3/3.2 in travis and start making test suite work.

  • it's ok to break 2.5 compat in the process - we can deal with it afterwards (or drop support for it)
  • it's ok to only support latest python3k (3.3) and ignore 3.2.
  • definitely ignore 3.1 and 3.0
Member

denik commented Oct 29, 2012

+1s will not speed it up (we already know lots of people want it).

To help, contribute. Create a branch, enable python 3.3/3.2 in travis and start making test suite work.

  • it's ok to break 2.5 compat in the process - we can deal with it afterwards (or drop support for it)
  • it's ok to only support latest python3k (3.3) and ignore 3.2.
  • definitely ignore 3.1 and 3.0

fantix added a commit to fantix/gevent that referenced this issue Nov 30, 2012

fantix added a commit to fantix/gevent that referenced this issue Nov 30, 2012

fantix added a commit to fantix/gevent that referenced this issue Nov 30, 2012

fantix added a commit to fantix/gevent that referenced this issue Nov 30, 2012

fantix added a commit to fantix/gevent that referenced this issue Dec 5, 2012

fantix added a commit to fantix/gevent that referenced this issue Dec 6, 2012

fantix added a commit to fantix/gevent that referenced this issue Dec 6, 2012

fantix added a commit to fantix/gevent that referenced this issue Dec 7, 2012

fantix added a commit to fantix/gevent that referenced this issue Dec 10, 2012

Refs #38, sync fixes with master 1.0rc2. Command:
 * git merge issue38_2 --squash --no-commit

Conflicts:
	gevent/subprocess.py

fantix added a commit to fantix/gevent that referenced this issue Dec 10, 2012

fantix added a commit to fantix/gevent that referenced this issue Dec 10, 2012

fantix added a commit to fantix/gevent that referenced this issue Dec 10, 2012

Fixed #38, Gevent now supports Python 3.3 as single source.
The tests are all passing now. But some of the Python 3 stdlib
interfaces are not implemented yet. And, there are still lots of
ResourceWarnings for unclosed files or sockets in Python 3.

These modules are fixed with explict PY3 code fragment branches:

    ares, backdoor, core, fileobject, hub, os, pywsgi, queue,
    server, socket, ssl, subprocess

The Six library is partly introduced as a part of hub.py (while
for tests it is greentest/six.py). These symbols are added:

    text_type, binary_type, xrange, b, u, reraise

Travis can test under Python 3.3 for now, and ignoring tests
depending on web.py which doesn't support Python 3 yet.

@Zearin Zearin referenced this issue in heynemann/pyvows Jan 6, 2013

Open

Py3 status (site, README) #23

0 of 2 tasks complete
@Elizafox

This comment has been minimized.

Show comment
Hide comment
@Elizafox

Elizafox Jan 7, 2013

@fantix why not leave a pull request? :)

Elizafox commented Jan 7, 2013

@fantix why not leave a pull request? :)

@fantix

This comment has been minimized.

Show comment
Hide comment
@fantix

fantix Jan 7, 2013

Contributor

@ElizaCat :D I'm kind of waiting for the authors to reply in the mailing list - it's probably going to be done after 1.0 is released I suppose.

Contributor

fantix commented Jan 7, 2013

@ElizaCat :D I'm kind of waiting for the authors to reply in the mailing list - it's probably going to be done after 1.0 is released I suppose.

@Ivoz

This comment has been minimized.

Show comment
Hide comment
@Ivoz

Ivoz Feb 9, 2013

Contributor

Good attempt fantix! It seems sockets are going to be a major issue getting right, and I would guess a good knowledge of python internals is needed to get them working properly again.

Contributor

Ivoz commented Feb 9, 2013

Good attempt fantix! It seems sockets are going to be a major issue getting right, and I would guess a good knowledge of python internals is needed to get them working properly again.

@Ivoz

This comment has been minimized.

Show comment
Hide comment
@Ivoz

Ivoz Feb 18, 2013

Contributor

@denik Do you know much about how to get sockets working with the new python? Was it a pain originally with python 2? Know of any good reading for learning how to emulate the internal API successfully, etc?

Contributor

Ivoz commented Feb 18, 2013

@denik Do you know much about how to get sockets working with the new python? Was it a pain originally with python 2? Know of any good reading for learning how to emulate the internal API successfully, etc?

@Elizafox

This comment has been minimized.

Show comment
Hide comment
@Elizafox

Elizafox Feb 24, 2013

I've been using fantix's branch for some time, and it works great for me. I think it needs some merges though.

Python sockets in python 3 are now based on the io module, @Ivoz, which is different from Python 2. I'll have a deeper look at the ResourceWarnings later.

I've been using fantix's branch for some time, and it works great for me. I think it needs some merges though.

Python sockets in python 3 are now based on the io module, @Ivoz, which is different from Python 2. I'll have a deeper look at the ResourceWarnings later.

@westurner

This comment has been minimized.

Show comment
Hide comment

@fantix
Thanks!

@westurner

This comment has been minimized.

Show comment
Hide comment
@westurner

westurner Apr 8, 2013

@Ivoz

It seems sockets are going to be a major issue getting right, and I would guess a good knowledge of python internals is needed to get them working properly again.

Why do you ask?

Here are some resources for doing socket programming in Python 3:

@Ivoz

It seems sockets are going to be a major issue getting right, and I would guess a good knowledge of python internals is needed to get them working properly again.

Why do you ask?

Here are some resources for doing socket programming in Python 3:

@westurner

This comment has been minimized.

Show comment
Hide comment
@fantix

This comment has been minimized.

Show comment
Hide comment
@fantix

fantix Apr 8, 2013

Contributor

@westurner thanks for the comments and testing out the fork! :)

Contributor

fantix commented Apr 8, 2013

@westurner thanks for the comments and testing out the fork! :)

@fantix

This comment has been minimized.

Show comment
Hide comment
@fantix

fantix Apr 8, 2013

Contributor

@Ivoz yes indeed the current gevent.socket is not 100% "compatible" with py3k socket interface. Maybe minor though, that would eventually be a problem sooner or later. :)

Contributor

fantix commented Apr 8, 2013

@Ivoz yes indeed the current gevent.socket is not 100% "compatible" with py3k socket interface. Maybe minor though, that would eventually be a problem sooner or later. :)

@hpk42

This comment has been minimized.

Show comment
Hide comment
@hpk42

hpk42 Apr 25, 2013

As someone who is not closely following all gevent discussions -- is there any estimate for when an official gevent release will support python3, at least experimentally?

hpk42 commented Apr 25, 2013

As someone who is not closely following all gevent discussions -- is there any estimate for when an official gevent release will support python3, at least experimentally?

@Bengt

This comment has been minimized.

Show comment
Hide comment
@Bengt

Bengt Apr 30, 2013

@fantix Your fork works for me, too. I'd be happy to support with testing for possible pull requests against this repo.

Bengt commented Apr 30, 2013

@fantix Your fork works for me, too. I'd be happy to support with testing for possible pull requests against this repo.

@fantix

This comment has been minimized.

Show comment
Hide comment
@fantix

fantix May 1, 2013

Contributor

@Bengt Thanks a lot for the feedback!

Contributor

fantix commented May 1, 2013

@Bengt Thanks a lot for the feedback!

@wladston

This comment has been minimized.

Show comment
Hide comment
@wladston

wladston May 2, 2013

I'm also looking forward to using gevent and python3. @fantix's port seems to be working perfectly for now with my application.

wladston commented May 2, 2013

I'm also looking forward to using gevent and python3. @fantix's port seems to be working perfectly for now with my application.

@qoh

This comment has been minimized.

Show comment
Hide comment
@qoh

qoh Jul 17, 2013

Any news on this? How's the status on master python3 support?

qoh commented Jul 17, 2013

Any news on this? How's the status on master python3 support?

@fantix

This comment has been minimized.

Show comment
Hide comment
@fantix

fantix Jul 18, 2013

Contributor

@Portify Unfortunately this is still pending.

Contributor

fantix commented Jul 18, 2013

@Portify Unfortunately this is still pending.

@alekibango

This comment has been minimized.

Show comment
Hide comment
@alekibango

alekibango Jul 26, 2013

+1 for python3 support

+1 for python3 support

fantix added a commit to fantix/gevent that referenced this issue Mar 2, 2015

fantix added a commit to fantix/gevent that referenced this issue Mar 2, 2015

@davidfischer-ch

This comment has been minimized.

Show comment
Hide comment
@ml31415

This comment has been minimized.

Show comment
Hide comment

ml31415 commented Mar 9, 2015

Another related project: https://github.com/veegee/guv

@gawry

This comment has been minimized.

Show comment
Hide comment
@gawry

gawry Mar 25, 2015

Are we to far from finishing this?

gawry commented Mar 25, 2015

Are we to far from finishing this?

@aidylewis

This comment has been minimized.

Show comment
Hide comment
@aidylewis

aidylewis Apr 20, 2015

Is it worth entering in the installation notes that python 3 is not supported. It currently states: 'gevent runs on Python 2.5 and newer . . .'.

Is it worth entering in the installation notes that python 3 is not supported. It currently states: 'gevent runs on Python 2.5 and newer . . .'.

@AxelVoitier AxelVoitier referenced this issue in zeromq/pyzmq Apr 20, 2015

Closed

zmq.green import error with py3 #666

@denik denik added the python3 label May 18, 2015

@koliyo

This comment has been minimized.

Show comment
Hide comment

koliyo commented May 19, 2015

+1

@TDaltonC TDaltonC referenced this issue in 0rpc/zerorpc-python Jun 1, 2015

Closed

Python 3 support #108

@thedrow

This comment has been minimized.

Show comment
Hide comment
@thedrow

thedrow Jun 18, 2015

Contributor

Hi guys @fantix has contributed a lot of Pull Requests.
Some are not merged and some are only partially merged.
Can we please have someone look at those?

Contributor

thedrow commented Jun 18, 2015

Hi guys @fantix has contributed a lot of Pull Requests.
Some are not merged and some are only partially merged.
Can we please have someone look at those?

@macolo

This comment has been minimized.

Show comment
Hide comment
@macolo

macolo Jun 20, 2015

Yes, please, what's going on?

macolo commented Jun 20, 2015

Yes, please, what's going on?

@jamadden

This comment has been minimized.

Show comment
Hide comment
@jamadden

jamadden Jun 20, 2015

Member

I've just merged (updates of) many of the open Python 3 PRs or variations on them, including #412, #413, #416, #421, #462, #474, and #409. The Py3 build is green now with only one known failing test (test__socket_dns.py).

Member

jamadden commented Jun 20, 2015

I've just merged (updates of) many of the open Python 3 PRs or variations on them, including #412, #413, #416, #421, #462, #474, and #409. The Py3 build is green now with only one known failing test (test__socket_dns.py).

@fantix

This comment has been minimized.

Show comment
Hide comment
@fantix

fantix Jun 21, 2015

Contributor

@jamadden Awesome! Much appreciated for the hard work! 🚀

Contributor

fantix commented Jun 21, 2015

@jamadden Awesome! Much appreciated for the hard work! 🚀

@mjumbewu

This comment has been minimized.

Show comment
Hide comment
@mjumbewu

mjumbewu Jun 21, 2015

@jmadden @fantix you guys are amazing.

@jmadden @fantix you guys are amazing.

@thedrow

This comment has been minimized.

Show comment
Hide comment
@thedrow

thedrow Jun 21, 2015

Contributor

Wonderful.
Now let's fix that test and the failing tests in #248 and we can release 1.1.

Contributor

thedrow commented Jun 21, 2015

Wonderful.
Now let's fix that test and the failing tests in #248 and we can release 1.1.

@thedrow

This comment has been minimized.

Show comment
Hide comment
@thedrow

thedrow Jun 21, 2015

Contributor

@jamadden It seems that the DNS test should be fixed in #418 but it isn't.

Contributor

thedrow commented Jun 21, 2015

@jamadden It seems that the DNS test should be fixed in #418 but it isn't.

@thedrow

This comment has been minimized.

Show comment
Hide comment
@thedrow

thedrow Jun 21, 2015

Contributor

Other pull requests related to Python 3: #390 #399

Contributor

thedrow commented Jun 21, 2015

Other pull requests related to Python 3: #390 #399

@jamadden

This comment has been minimized.

Show comment
Hide comment
@jamadden

jamadden Jul 13, 2015

Member

Just like with #248, 1.1a2 has been released with no unaccounted for failures under Python 3. Master currently has several improvements but only one specific to Python 3, and it's minor. I think we can consider the major thrust of this issue to be completed. Please open new issues/PRs for specific issues with Python 3 support. Thanks everyone!

Member

jamadden commented Jul 13, 2015

Just like with #248, 1.1a2 has been released with no unaccounted for failures under Python 3. Master currently has several improvements but only one specific to Python 3, and it's minor. I think we can consider the major thrust of this issue to be completed. Please open new issues/PRs for specific issues with Python 3 support. Thanks everyone!

@jamadden jamadden closed this Jul 13, 2015

@mjumbewu

This comment has been minimized.

Show comment
Hide comment

👏

@ramnes

This comment has been minimized.

Show comment
Hide comment

ramnes commented Jul 13, 2015

👯

@ultrabug

This comment has been minimized.

Show comment
Hide comment

💃

@giampaolo

This comment has been minimized.

Show comment
Hide comment
@giampaolo

giampaolo Jul 13, 2015

This is awesome! Glad to see one of the biggest stoppers for python 3 adoption finally got ported.

This is awesome! Glad to see one of the biggest stoppers for python 3 adoption finally got ported.

@tebanep

This comment has been minimized.

Show comment
Hide comment
@tebanep

tebanep Jul 13, 2015

😀🎉🎉🎉

On Mon, Jul 13, 2015, 1:15 PM giampaolo notifications@github.com wrote:

This is awesome! Glad to see one of the biggest stoppers for python 3
adoption finally supports Python 3.


Reply to this email directly or view it on GitHub
#38 (comment).

tebanep commented Jul 13, 2015

😀🎉🎉🎉

On Mon, Jul 13, 2015, 1:15 PM giampaolo notifications@github.com wrote:

This is awesome! Glad to see one of the biggest stoppers for python 3
adoption finally supports Python 3.


Reply to this email directly or view it on GitHub
#38 (comment).

@zubinmehta

This comment has been minimized.

Show comment
Hide comment

:-)

@sylvinus

This comment has been minimized.

Show comment
Hide comment
@sylvinus

sylvinus Jul 14, 2015

Congrats!!

Congrats!!

@chuliang

This comment has been minimized.

Show comment
Hide comment
@chuliang

chuliang Jul 14, 2015

Good job !

Good job !

@maguowei

This comment has been minimized.

Show comment
Hide comment
@maguowei

maguowei Jul 14, 2015

Great Job ! 🍺🍉👏

Great Job ! 🍺🍉👏

@brunoalano

This comment has been minimized.

Show comment
Hide comment

Yay (:

@waynew

This comment has been minimized.

Show comment
Hide comment
@waynew

waynew Jul 14, 2015

Great job, and a huge thank you to everyone involved in this!

waynew commented Jul 14, 2015

Great job, and a huge thank you to everyone involved in this!

@sieben

This comment has been minimized.

Show comment
Hide comment

sieben commented Jul 14, 2015

👍

@svieira

This comment has been minimized.

Show comment
Hide comment
@svieira

svieira Jul 14, 2015

🌃🎆🎇 Fantastic, fantastic, fantastic! Thank you all!

svieira commented Jul 14, 2015

🌃🎆🎇 Fantastic, fantastic, fantastic! Thank you all!

@mavier

This comment has been minimized.

Show comment
Hide comment
@mavier

mavier Jul 14, 2015

👍

mavier commented Jul 14, 2015

👍

@gitaarik

This comment has been minimized.

Show comment
Hide comment

gitaarik commented Oct 7, 2015

🏄

@lerks lerks referenced this issue in cms-dev/cms Jun 20, 2016

Closed

Port to python 3 #286

@jgehrcke jgehrcke referenced this issue in jgehrcke/gipc Dec 30, 2016

Closed

Python 3 support #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment