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

Please port to Python 3 #24

Open
txtsd opened this issue Aug 3, 2014 · 12 comments
Open

Please port to Python 3 #24

txtsd opened this issue Aug 3, 2014 · 12 comments

Comments

@txtsd
Copy link

txtsd commented Aug 3, 2014

A python 3 port would solve all my problems.

@simonzack
Copy link

+1 to this.

@t0m
Copy link

t0m commented Jan 6, 2015

I gave it a shot as a weekend project to get the tests passing on the python3 branch here: https://github.com/t0m/pyamf/tree/python3 .

I got most of them working, with the exception of the django, google and repr() ones. Obviously it's very rough and nowhere near production ready -- I did nasty things like find/replace iteritems with items, gross cython hacks to get it working with 0.21.2, and very many things that won't be compatible with python2. I hope to do another pass and maybe add tox in once I get more free time.

Any help would be appreciated! Especially with the cython stuff, I have no idea what I'm doing there.

@simonzack
Copy link

@t0m I've just finished a port compatible with python 2. I've done similar testing as you have but fixed the repr issues using assertIn. Haven't touched the cython stuff because I'm not so familiar with it either. Maybe we could try working on that together?

@t0m
Copy link

t0m commented Feb 4, 2015

Hey @simonzack, sorry for the delay. That sounds good! Is your port totally independent of mine or did you fork off of mine?

BTW, I recently had a chance to test my fork on a large python2.7 codebase and it worked really well (including the cython stuff). So I think we're in pretty good shape so far.

@simonzack
Copy link

@t0m I started a different fork instead of using your code as you mentioned "gross hacks".

@t0m
Copy link

t0m commented Feb 4, 2015

Okay, I'll take a look later on, there's a couple things I wanted to ask about and I don't want to spam everybody with messages, could you shoot me an email at tterrace [at] gmail?

@t0m
Copy link

t0m commented Apr 16, 2015

Hey @njoyce, is there anything I can help with to get this merged in? @simonzack's code is basically the same as mine, except for a couple differences:

  • I changed the assertBuffer test method to take into account inconsistent hash ordering rather than sorting in writeObject or _writeDict to avoid runtime penalties for the sake of the tests
  • I added to compat.py vs using six (I believe six is the better choice if the additional dependency is kosher)
  • Bytearray vs. to_bytes in encode_int. I'm not sure which is faster but I can profile if needed
  • I added in simple set/frozenset serialization
  • There's a floating point rounding error in test_acknowledge that shows up in python 3.4 that I fixed in my branch
    • I added a simple tox.ini to help with the cross-version testing

From the latest commits it looks like the cython code in master has been upgraded to the later version so that doesn't need to be touched anymore. I'd be happy to combine the two branches, merge up to 0.7.2 and submit another PR.

@herzaso
Copy link

herzaso commented Oct 17, 2015

Any timetable to python3 support?

@njoyce
Copy link
Member

njoyce commented Oct 31, 2015

Tbh I am struggling to find the time to be able to work on this - if someone wants to take up the mantle - feel free to email me - email is on my github profile.

@mrichie
Copy link

mrichie commented Nov 21, 2016

+1 for python3

@hugovk
Copy link

hugovk commented Oct 29, 2017

See https://github.com/StdCarrot/Py3AMF by @StdCarrot:

pip3 install Py3AMF

@nguaman
Copy link

nguaman commented Dec 4, 2019

+1

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

No branches or pull requests

8 participants