-
Notifications
You must be signed in to change notification settings - Fork 952
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
Python 3.X compatibility #10
Conversation
Backwards compatibility with python 2.X is preserved. Python 3 probably has some bugs, especially with regards to string encoding (for example, _encode_multipart_form() in facebook.py).
Sorry @ogier, but "mostly compatible" with Python 3 doesn't give me the greatest feelings :) Like @martey says in #5, most people using this library are on Python 2, and I'm one of them. I won't be able to help with testing, but if it's working for people and doesn't break backwards compatibility I think we'd love to enable Python 3 support in this library. Thoughts? |
PEP 414 looks like it might help with the strings. Since it looks like it has already been implemented in the prerelease versions of Python 3.3, I will try to do some testing. |
Alright. I would look at the specification of http://docs.python.org/library/urllib2.html#urllib2.urlopen |
hey i am getting the following installation error while installing using pip on windows running python 3.2: "C:\Python32\Scripts>pip install http://github.com/pythonforfacebook/facebook-sdk Installing collected packages: facebook-sdk Successfully installed facebook-sdk When I execute 'help('modules') on IDLE, it does shows a module named "facebook". But I cannot import that library. Throws a trackback error. Please fix this. |
@0xakhil, this library does not currently support Python 3. You can try to integrate the changes that @ogier made, but they may not work completely. |
Thanks. It installed successfully. Is it completely compactible? |
@martey Why dont you create a new branch dedicated to a python3 compatible version separated from the master (python2) one ? |
As I wrote on the mailing list last month, the next release will support Python 3. I still have some changes and testing to do (which are likely to involve lots of rebasing), but I will make them available in a separate branch soon so that the community can test them before they are merged to master. |
This should be fixed by d0eb831. Any Python 3 bugs should be reported in a new issue. |
I made the library compatible with 3.X, though there are probably still string encoding bugs because of the way Python 3 handles strings. Importantly, the library should still behave identically on python 2.X.