Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 #38

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

python3 #38

denik opened this issue Sep 13, 2012 · 98 comments
Labels
PyVer: python3 Affects Python 3

Comments

@denik
Copy link
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
Copy link

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
Copy link
Contributor

Ivoz commented Oct 24, 2012

Would you be willing to drop 2.5 for 3.3?

@denik
Copy link
Member Author

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
Copy link

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
Copy link

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
Copy link

niwinz commented Oct 29, 2012

+1

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

@denik
Copy link
Member Author

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 7, 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 7, 2012
fantix added a commit to fantix/gevent that referenced this issue Dec 10, 2012
 * 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
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.
@Elizafox
Copy link

Elizafox commented Jan 7, 2013

@fantix why not leave a pull request? :)

@fantix
Copy link
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
Copy link
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
Copy link
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
Copy link

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
Copy link

@fantix
Thanks!

@westurner
Copy link

@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
Copy link

... http://redd.it/1bvlco

@koliyo
Copy link

koliyo commented May 19, 2015

+1

@thedrow
Copy link
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
Copy link

macolo commented Jun 20, 2015

Yes, please, what's going on?

@jamadden
Copy link
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).

@fantix
Copy link
Contributor

fantix commented Jun 21, 2015

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

@mjumbewu
Copy link

@jmadden @fantix you guys are amazing.

@thedrow
Copy link
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
Copy link
Contributor

thedrow commented Jun 21, 2015

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

@thedrow
Copy link
Contributor

thedrow commented Jun 21, 2015

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

@jamadden
Copy link
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!

@mjumbewu
Copy link

👏

@ramnes
Copy link

ramnes commented Jul 13, 2015

👯

@ultrabug
Copy link

💃

@giampaolo
Copy link

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

@tebanep
Copy link

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
Copy link

:-)

@sylvinus
Copy link

Congrats!!

@chuliang
Copy link

Good job !

@maguowei
Copy link

Great Job ! 🍺🍉👏

@brunoalano
Copy link

Yay (:

@waynew
Copy link

waynew commented Jul 14, 2015

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

@remyleone
Copy link

👍

@svieira
Copy link

svieira commented Jul 14, 2015

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

@mavier
Copy link

mavier commented Jul 14, 2015

✨ 👍 ✨

@gitaarik
Copy link

gitaarik commented Oct 7, 2015

🏄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PyVer: python3 Affects Python 3
Projects
None yet
Development

No branches or pull requests