dsmurl / the-system-controller-4

This is the working code of the System Conroller V4 designed for grass roots industrial systems management.
GNU Affero General Public License v3.0
2 stars 1 forks source link

Convert the app to Python 3 #44

Open rgreinho opened 8 years ago

rgreinho commented 8 years ago

In 2015, there is no point to start developing an application with python 2. The application should be converted to python 3. Besides, the project is still at an early stage so it should not be too complicated.

Requirements:

dsmurl commented 8 years ago

On this, we will have to be careful that the version of python, the version of AdaFruits GPIO library, and the version, of flask all work well together. The GPIO library may only be available for python 2.7 right now. I want to use the latest stuff but there will just need to be some testing on a BB to make sure our efforts aren't wasted.

rgreinho commented 8 years ago

On the package description of the AdaFruits Library, it says Python 3, so that should not be an issue. They even run unit tests for Python 3 (https://github.com/adafruit/adafruit-beaglebone-io-python/blob/master/tox.ini). Flask is also Python 3 compliant. The only limitation for moving to Python 3 is really the supervisor lib but it should be easy to find a replacement.

Regarding Flask, it looks like that project is not using it. Flask is not part of the requirements, and the app object is a WebApp2 object (https://github.com/dsmurl/TheSystemController4/blob/develop/wsgi.py#L20). I might be missing something so feel free to correct me.

Is there a reason for using WebApp2 and WebOp together?

rgreinho commented 8 years ago

@dsmurl any update on this?

dsmurl commented 8 years ago

@faisalraja what do you think about moving to python 3? Do you know of any dependencies this might mess with. We can always try it and I can field test it in the branch and such.

faisalraja commented 8 years ago

I think it's fine. The only reason I use python2.7 is cause most of my deployments has it still as default version of the OS. If that's not a concern for this then I don't see any reason why not to move.