paolobenve / myphotoshare

MOVED TO GITLAB! --- A Web 2.0 Photo Gallery Done Right via Static JSON, Dynamic Javascript and a bit of php for sharing
15 stars 0 forks source link

Scanner now supports Python3 #64

Closed pmetras closed 6 years ago

pmetras commented 6 years ago

Hi,

This pull request adds support for Python 3 (tested with version 3.5.2) while remaining compatible with Python 2 (tested with version 2.7.12) for the scanner.

The Python version used is determined by using #!/usr/bin/env python2 or #!/usr/bin/env python3 in the first line of main.py.

The Flask FloatApp application, in scanner/floatapp has not been tested. I've left the Python 2 sources by default and added the *.py2to3 that were translated with 2to3. According to Flask web site, Flask run both with Python 2 and 3 and application sources should not be impacted. TO BE TESTED...

I've tested with multiple variations of the configuration file on different types of media but I'm not sure I covered all the cases.

paolobenve commented 6 years ago

great work!

Strictly speaking, is there any reason for mantaining future compatibility with python2? All linux distributions permit to have both python2 and python3 installed.

Perhaps we could have a 6 month deprecation period for python2...