CampbellGroup / common

Shared campbell lab code.
GNU Lesser General Public License v3.0
8 stars 5 forks source link

Make common Python 2 and Python 3 compatible #202

Open jayich opened 7 years ago

jayich commented 6 years ago

treedict is not Python 3 compatible.

fanmingyu212 commented 6 years ago

@aransfor I started a branch https://github.com/CampbellGroup/common/tree/mf/python_3_upgrading for python 2/3 compatibility. If using python 3, it will use pyqt5 and pyqt4 for python 2. I will first start upgrading the pulser and normalpmtflow.

aransfor commented 6 years ago

@fanmingyu212 , sounds good! How is it going to deal with pyqt4/pyqt5? Also do you know the status of pylabrad compatibility with Python3 or if anyone has fully switched?

fanmingyu212 commented 6 years ago

@aransfor I planned to have a separate folder "client_py3" for python 3 clients. The servers would be compatible with python 2 and 3 simultaneously though. I just learned that the Martinis Group has switched to python 3. I think pylabrad is now compatible with python 3.6 (See https://github.com/labrad/pylabrad/blob/master/setup.py#L18).

aransfor commented 5 years ago

@fanmingyu212 are you guys up and running on Python3?

fanmingyu212 commented 5 years ago

@aransfor Yes, we are. Most of the servers and clients we are using in common (pulser, script scanner, ixonServer) are compatible with python 3. I am working on upgrading all servers and clients that we use and will finish soon.

I am not able to upgrade all servers and clients in common to python 3 as we are not using some of them so we cannot test, but they should be similar to the other upgraded servers and clients.

fanmingyu212 commented 5 years ago

https://github.com/CampbellGroup/common/tree/mf/python_3_upgrading upgrades several servers and clients to python 3.

Servers upgraded to python 3:

Python 3 clients added:

fanmingyu212 commented 5 years ago

General methods I used to port servers to python 3:

General methods for porting clients to python 3: