GSoC’17 Proposal : Adding Python3 support

GSoC'17 Project proposal:
Adding Python 3 support

Name: Rohit Kumar
forum/e-mail: rohit-rk / [email protected]

Introduction:
When did you first start programming?
I started programming four years ago learning MySQL and Java (graphics) for first two years, then after joining college i started coding in C(Worked on Data structures and algorithms implementation). I am in my 2nd year of B.Tech at Dr. B. R. Ambedkar National Institute of Technology Jalandhar majoring in computer science. In 2016, I picked C++ (as academic course) and started Python on my own. Also done a course in Mongodb with python(bottle, pymongo).

Are you a user of Kodi? When did you first start using it? :
Yes, but still newbie started from this january only.I use kodi for Soundcloud, youtube, Udacity, etc.

Have you contributed to other Open Source projects? If so, which projects and can we see some of your code?
As i am new to open source, there is not much to show but i made a pull request and fixed a bug in jx-sqlite.

If you have not contributed to open source projects, do you have other code we can look at? :

My github handle is rohit-rk, and i am creating my website in my free time at akarohit.me .Also thinking to blog my work as I do to keep myself motivated.Many of my projects are on github https://github.com/rohit-rk .

Tell us about the computer and devices you have available for working on your SoC project? :
I have Ideapad Y700(6th gen i7 processor with windows 10 and ubuntu installed), Dell Vostro 1540(i3 processor with windows) and an android phone during SoC.

How much time do you have available, and how would you plan to use it?

I will be having approx. 12 weeks, will divide my work into sub parts as written in Goals. Will learn all about the codebase and other dependencies in community bonding period.

Do you plan to have a job or study during the summer in conjunction with Summer of Code?

My plan is (and I have spent time making sure this is possible) to be able to devote as much time as possible to GsoC in summer. No academic obligations throughout the whole coding period.

Summary:
We have two version of python language that are currently in development: Python 2.x(2.7) which retains backwards compatibility with previous versions and Python 3.x which breaks this compatibility. Kodi does not support Python 3.x at this point. EOL for Python 2.7 is postponed many times, but it is likely to come soon. So, it is important to atleast have compatibility for both, if not porting to Python 3 completely.

How will I achieve this:
Kodi’s python code base is not hand coded, rather generated as a part of building kodi. Code builder is Swig plus Groovy logic. Swig is responsible for parsing c++ header files. Present bindings are for python 2. For supporting python 3, I need to work on generating bindings in Swig for python 3 and adding python3 interpreter an option to let addon developers choose between python 2 and 3(this may make the project too big for summer, i am not sure.). Addition of requires tag defining the python version, xml file will then load that particular version.


What will the project focus on:
The project focuses on supporting python 3 without losing compatibility with python 2. Important parts are : Swig binding implementation, Addon’s xml part, also working on c++ files for new changes made in python.h for python 3.

Benefits:
There are two categories of python developers. Users of python 2 and python 3, and working with Kodi they are restricted to using python 2 for now. Having support for both will make it possible for developers to work in there preferred language. Addon will be made in both languages. This will bring more developers to Kodi. Users need not worry about inderlying interpreter they are using.

Goals:

  • Modify C++ files for new changes made in python.h for python 3.
  • Generating bindings in Swig for python 3.
  • Addition of a new tag for addon .xml (not sure of this).
  • Making it possible to run an addon with all this new setup.
  • Updating addons to python 3.

Also making sure that everything still works in python2.

What does it touch in Kodi:
  • SWIG implementation.
  • Python Integration.
  • Python API implementation
  • Addons Develpoment.


Requirements:
Python(both 2 and 3), C++ , Swig , Groovy, understanding of kodi code base including how addons are used and loaded.

Mentors:
Thanks

Please suggest any changes to make this proposal better.

video player osd controls disappears almost instantly

I'm on Krypton 17.1 titan latest beta device : Samsung Galaxy Tab S OS : Android marsh 6.0.1 when i try to pause, stop, access audio settings or any osd controls the buttons disappear almost instantly.. i tried the settings but with no effect

[WINDOWS] Random video playback freezing – Im lost

Hi guys I have been trying to figure this out but it is out of my league. I run windows 10 PC i5 as my kodi server Since I switched to new kodi I have been having video random video freezing issues. I have tried clean install but it seems the same ...

Kodi 17.1 does not work

Hi there, I downloaded the last version of Kodi on my windows 7 computer and it does not work, I mean, it does not even open! After the first try, I also disintalled the older version just to be sure that was not problem, and there again. Can someone h...

Vpn services

I've recently started using kodi on a fire stick. I want to use vpn to keep my provider from snooping on me. Especially since they will possibly start selling personal data to make a buck. I did search on vpn and didn't see anything here. My question i...

Atv2 Helix 14.2

Hi there! How does one go about recompiling Helix 14.2 from sources, what i want to do is enable openssl, more info Here any help is really appreciated!

2 monitor Support

I don't think there is enough need for this feature, so probably wont be implemented. but who knows if there is more demand for this feautre. basically if you have a 2 monitor system! 1 monitor always shows the main window of kodi! and the other shows...

Yawn… 80mb taking forever to download

I was wondering why Kodi 17.1 takes forever to download. Everything I download from other sites take seconds. Kodi fluctuates from 15-30 minutes, only for a measly 80mb. Hopefully this will download before the month is over.

Airplay – macOS Sierra – Nexbox A95x!

I have used the app "Beamer" to stream from my Retina MacBook Pro running macOS Sierra. HOWEVER I can't figure out what I do in order to get it to stream to my A95X...It only works sometimes, but when it does, it is incredibly smooth and functional....

How to make kodi pick first audio always?

I have bunch of .avi with 2 audio - first mp3/english, second ac3/russian. By default kodi17 picks the second one, and I want it to pick the first one. I tried repacking files and making english audio first - kodi ignores it and plays russian. I tried ...