randomsync / robotframework-mqttlibrary

MQTT Keyword Library for Robot Framework
Apache License 2.0
25 stars 30 forks source link

Compatibility with Python3 #5

Closed chbndrhnns closed 5 years ago

chbndrhnns commented 7 years ago

Installation via pip3 is not possible due to use of Python2-only commands.

Collecting robotframework-mqttlibrary
  Downloading robotframework-mqttlibrary-0.5.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/n1/wsd2x88j48d6yr5dmwqs71m80000gn/T/pip-build-u7hpj9cr/robotframework-mqttlibrary/setup.py", line 9, in <module>
        execfile(join(here, 'src', 'MQTTLibrary', 'version.py'))
    NameError: name 'execfile' is not defined

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/n1/wsd2x88j48d6yr5dmwqs71m80000gn/T/pip-build-u7hpj9cr/robotframework-mqttlibrary/
Atihinen commented 6 years ago

Upvoting this one.

ThePersistentTester commented 5 years ago

Hi there,

Since the RobotFramework / RIDE people have now upgraded RIDe so as to support Python 2.7 and >3.6 Could the library be made compatible with Python3.6+, so that users don't have to switch between 2.7 and 3.6 just to use this library?

"DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7."

This is what I got when I re-installed 2.7 (after upgrading RIDE that supports python 3.6+ ) so that my MQTT tests work again. The tests stopped working after I upgraded RIDE so that I dont have to switch between Python 3.6+ and 2.7(PATH).

Thanks!

Atihinen commented 5 years ago

@randomsync what do you think? python 2.x is going to be deprecated by 2020 as pip is also suggesting. Should this library be python 2 compatible or is python3 enough?

randomsync commented 5 years ago

Since python 2.x will be deprecated, there might not be a need to keep it python 2 compatible. However, I would love to get some help in making it python 3 compatible, as I haven't had time or would have time in near future to look into it.

vogoltsov commented 5 years ago

@randomsync I have added compatibility with python3 in #13 , please have a look.

randomsync commented 5 years ago

This has been merged and released in v0.7.0. Thanks @vogoltsov