python-openid
python-openid copied to clipboard
Preliminary Python 3.x support, using 2to3
Add:
- support for running 2to3 as part of the build process
- a custom 2to3 fixer to ensure tests are patched too
- minor changes to modules to ensure they work with Python 3
- metadata to declare Python 3 support
The existing test suite passes under Python 3.2 on Linux (Fedora 17, x86_64)
were these added to the codebase yet?
It doesn't look like the pull request has been merged, if that's what you mean?
Note that this doesn't actually make things work under Python 3, it just makes them work enough to be importable. If this is something more people need I could put some more effort into making it work, but for my current project I've simply started a port since backward compatibility is a bit more work (especially as there are a lot of issues with str / bytes boundaries in this project).
necaris: I am having this wierd problem that when I use flask openid with one machine, When I click the login button, I get an internal server error. I cant pin point the error. Any ideas how to do this?
@necaris It may be better to just add the use_2to3
flag to the setup.py
and let distribute handle the rest as appropriate. Better still, hand-tune the Python 3 adaptations so that Python < 2.6 is still supported.
@mitchellrj cheers for the tip -- unfortunately this patch doesn't actually come close to making it work on Python 3, it just fixes the most glaring of the SyntaxError
s you get even after 2to3
runs.
Since this package works separately with text and bytestrings, and the boundaries between them aren't well-defined, I found it too painful to try and make all of the code upgradable with 2to3
while remaining compatible with older versions of Python. I'm keeping this pull request open just in case there's some interest from upstream, but I've moved most of my effort over to actually porting the library (https://pypi.python.org/pypi/python3-openid/3.0.1) and maybe slowly cleaning it up and modernizing things.