strands-project / mongodb_store

MongoDB tools for storing and analysing runs of ROS systems.
BSD 3-Clause "New" or "Revised" License
49 stars 73 forks source link

adjusted python funtions for python3 #235

Closed VGab closed 5 years ago

VGab commented 6 years ago

Quickly adjusted the scripts within mongodb_store to python3 syntax. I have to admit, I did not do any backward compatibility tests so far.

hawesie commented 6 years ago

Does melodic need to run on python 2 and 3?

VGab commented 6 years ago

According to the official documentation, melodic aims at Python2.7 being the major target platform. Nonetheless, testing against Python3.5 and above is recommended, as listed here. With ROS2 and the plans of Ubuntu to make Python3 the default python interpreter from 2020+ on , I thought maybe there are some persons out there in need of python2 & pyhon3 compatibility already. But as I don't want to mess up your work. I can also stick to my forge in case there is no relevance for python3 support here yet.

hawesie commented 6 years ago

@VGab I'm very happy to support this since it will make our lives easier in the future. Let me know when you think it's ready to test.

hawesie commented 5 years ago

@VGab ready to test?

VGab commented 5 years ago

@hawesie Sorry for the late reply. Completely forgot to answer... but the code should be ready to test, latest changes of this branch have been merged without conflicts. I hope the tests do not reveal any.

hawesie commented 5 years ago

I get an immediate failure on 16.04 Python 2.7.12:

Traceback (most recent call last):
  File "/home/nah/code/strands_ws/src/mongodb_store/mongodb_store/scripts/message_store_node.py", line 4, in <module>
    from future.utils import iteritems
ImportError: No module named future.utils
VGab commented 5 years ago

Sorry my bad... the python-future package was not added to the package.xml

hawesie commented 5 years ago

Thanks! This now works for me and all test files run successfully, so merging in.