Python 3.6 support?

All other Source.Python topics and issues.
Mahi
Senior Member
Posts: 213
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

Python 3.6 support?

Postby Mahi » Tue Apr 11, 2017 12:49 pm

Are there any plans or ETA to add Python 3.6 support? There are a few huge things in it, namely faster dicts, f-strings, and __init_subclass__(), last of which I'd love to get my hands on already. I believe the f-strings make it worthy upgrade for almost any SP plugin though.
User avatar
satoon101
Project Leader
Posts: 2386
Joined: Sat Jul 07, 2012 1:59 am

Re: Python 3.6 support?

Postby satoon101 » Tue Apr 11, 2017 12:54 pm

It has been planned for a while, we just haven't gotten around to doing it, yet. And yes, there are a lot of nice updates in 3.6!
Image
Mahi
Senior Member
Posts: 213
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

Re: Python 3.6 support?

Postby Mahi » Wed Apr 12, 2017 9:35 am

Glad to hear it's under the radar! Not to hurry, but can't wait! :wink:
User avatar
satoon101
Project Leader
Posts: 2386
Joined: Sat Jul 07, 2012 1:59 am

Re: Python 3.6 support?

Postby satoon101 » Mon Jun 19, 2017 11:25 pm

For those not following the repository on GitHub, SP now uses Python 3.6 (available starting with version 583)!
Image
decompile
Senior Member
Posts: 320
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Python 3.6 support?

Postby decompile » Tue Jun 20, 2017 12:47 pm

Thanks for the awesome work!
decompile
Senior Member
Posts: 320
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Python 3.6 support?

Postby decompile » Tue Jun 20, 2017 9:47 pm

Is it just me that I cant load the new build on linux css?

ImportError: libffi.so.6: cannot open shared object file: No such file or directory
User avatar
satoon101
Project Leader
Posts: 2386
Joined: Sat Jul 07, 2012 1:59 am

Re: Python 3.6 support?

Postby satoon101 » Tue Jun 20, 2017 10:06 pm

You might need to yum or apt-get install libffi on your Linux system. Is that the entire traceback?
Image
decompile
Senior Member
Posts: 320
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Python 3.6 support?

Postby decompile » Tue Jun 20, 2017 11:03 pm

Sorry

Code: Select all

[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/packages/source-python/__init__.py", line 58, in load
    setup_sqlite()
  File "../addons/source-python/packages/source-python/__init__.py", line 343, in setup_sqlite
    import ctypes
  File "../addons/source-python/Python3/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array

ImportError: libffi.so.6: cannot open shared object file: No such file or directory
User avatar
Ayuto
Project Leader
Posts: 1623
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Python 3.6 support?

Postby Ayuto » Wed Jun 21, 2017 2:54 am

Our build server has the same issue. Note that you need to install the 32bit version.
User avatar
satoon101
Project Leader
Posts: 2386
Joined: Sat Jul 07, 2012 1:59 am

Re: Python 3.6 support?

Postby satoon101 » Wed Jun 21, 2017 3:35 am

I just noticed the following in the upcoming Python 3.7 changes:
What's New In Python3.7 wrote:
  • A full copy of libffi is no longer bundled for use when building the _ctypes module on non-OSX UNIX platforms. An installed copy of libffi is now required when building _ctypes on such platforms.
Image
decompile
Senior Member
Posts: 320
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Python 3.6 support?

Postby decompile » Wed Jun 21, 2017 1:04 pm

satoon101 wrote:You might need to yum or apt-get install libffi on your Linux system.


So this is currently the only fix for that? Guess python 3.7 wont come tht quick?
User avatar
satoon101
Project Leader
Posts: 2386
Joined: Sat Jul 07, 2012 1:59 am

Re: Python 3.6 support?

Postby satoon101 » Wed Jun 21, 2017 1:46 pm

I think you are misinterpreting the text I quoted. The issue is that for Python 3.7 they removed that file. While our current version does say Python 3.6.1, I am fairly certain it contains the code in the Python master repository that was even committed after the 3.6.1 release. That is fine, as that is what I believe I used when I last updated the SP Python version. I am not sure if we can handle this within the SP build itself, but we will look into it. But for now, yes, that is the only fix.
Image
User avatar
Ayuto
Project Leader
Posts: 1623
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Python 3.6 support?

Postby Ayuto » Fri Jun 23, 2017 4:35 pm

Actually, I have taken the source from the 3.6.1 release and not from the repository. Our build server also suffers from this problem. I hope necavi has some time to install the library very soon.
sm2345110
Junior Member
Posts: 1
Joined: Thu Jun 29, 2017 10:20 am

Re: Python 3.6 support?

Postby sm2345110 » Thu Jun 29, 2017 10:23 am

Wow !!! Such a great, thanks for updating .....its really awesome update.

Python Training at CETPA :)

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest