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

Add Python 3 support #7

Closed
meejah opened this issue Apr 26, 2019 · 6 comments · Fixed by #9
Closed

Add Python 3 support #7

meejah opened this issue Apr 26, 2019 · 6 comments · Fixed by #9

Comments

@meejah
Copy link

meejah commented Apr 26, 2019

Are there plans for this library to support Python3?

@str4d
Copy link
Owner

str4d commented Jun 10, 2019

Yes, we should add Python 3 support. My vague recollection is that this didn't originally support Python 3 because Twisted itself didn't at the time. I assume this has since been fixed 😄

@str4d str4d changed the title Python3? Add Python 3 support Jun 10, 2019
@meejah
Copy link
Author

meejah commented Jun 10, 2019

Although Twisted doesn't say "Python 3 Support(tm)" yet (because not everything is ported?) nearly all of it is (and way more than enough for e.g. txtorcon). You can even use async-def and await if you like :)

@evilaliv3
Copy link

While implementing Python3, I would suggest inside @txi2p to keep the codebase still backward compatible with Python2 as done in @txtorcon.

@str4d, is there any particular need for basing the codebase still on tx 10?

Here we are discussing a possible adoption on @globaleaks as optional/diversity protocol with respect to Tor and what we would need is support for python3 for packaging it for Ubuntu Bionic (py3, twisted 17.9.0) and Ubuntu Xenial (py2, twisted 16.0.0): #7

@str4d
Copy link
Owner

str4d commented Jun 12, 2019

@str4d, is there any particular need for basing the codebase still on tx 10?

Nope, that was just the minimum version necessary to implement the functionality needed by txi2p at the time I wrote it (when older versions of Twisted were still prevalent). I have no personal need for this to support older Twisted versions.

@meejah
Copy link
Author

meejah commented Jun 12, 2019

Something (else) to consider is that you could switch to using https://github.com/crossbario/txaio which would give you asyncio and twisted support .. on the downside, this is like "lowest-common denominator between tx and aio" so you have to use call-back style (e.g. can't use @inlineCallbacks -- but a quick search seems to indicate you're not anyway).

@str4d
Copy link
Owner

str4d commented Jun 18, 2019

Turns out I started porting txi2p to Python 3 in 2015, and then completely forgot about the branch 😅

I'm rebasing the branch now (it was based on 0.2, so is missing a bunch of changes), so I'll see how things look afterwards.

@str4d str4d mentioned this issue Jun 18, 2019
@str4d str4d closed this as completed in #9 Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants