niner / inline-python-pm

Inline::Python - Write Perl subs and classes in Python.
https://metacpan.org/release/Inline-Python
20 stars 13 forks source link

Python 3 support #6

Closed lmazuel closed 9 years ago

lmazuel commented 10 years ago

Hi again!

Here is the Python 3 support. I have tested it on Ubuntu 14.04 with Python 2.5.6, 2.6.9, 2.7.6, 3.1.5, 3.2.5, 3.3.5 and 3.4.0. On my Ubuntu, I just have to do:

export INLINE_PYTHON_EXECUTABLE=/usr/bin/python3

before calling perl Makefile.PL and all goes fine.

Remarks:

It's why you can see in tests something like:

        # u'föö' is not a valid syntax in Py3.1
        return {'f\xc3\xb6\xc3\xb6'.decode('utf-8'): 'bar'}

If something seems strange or inappropriate, let me know! I will do more commits in this pull request if needed. Hope it helps!

Laurent

lmazuel commented 9 years ago

Hi!

I just want to know if there is something wrong with this pull request, if I can do anything for help. If you think something is not correct or is not handled correctly, do not hesitate to tell it to me, I will take the time to review it and make a new commit. Thanks!

niner commented 9 years ago

Sorry for the delay. I was just busy preparing my talk at the upcoming Austrian Perl Workshop. Since this commit is quite large I wanted to run all tests of our Inline::Python using application before merging. Happy to report that all is well.

I fixed some white space issues (mixing of tabs and spaces) and pushed it to master. I guess it's time for a new release :) Thank you very much for this excellent work!

lmazuel commented 9 years ago

Great news! And thank you :)