brennerm / check-mk-web-api

Python library to talk to the Check_Mk Web API
https://brennerm.github.io/check-mk-web-api/
MIT License
53 stars 26 forks source link

Support for python 2.7 ? #2

Closed codyaray closed 6 years ago

codyaray commented 7 years ago

Awesome! We ended up developing our own before we even realized the checkmk webapi existed. It's a large amount of logic designed to reproduce the WATO UI calls. We'd love to eventually migrate to the webapi using this webapi library wrapper rather than rolling our own.

To the sad part... My corporate environment hasn't upgraded to python3. Would you be opposed to adding support for python2.7? Things like the type hints break python2.7 compatibility. There may be others too; this is just the first error encountered.

If you're cool with this, I'm happy to fork and contribute back.

PS - python2.7 supports type hints comments in some tools like pycharm

brennerm commented 7 years ago

Hi @codyaray,

I'm definitely looking forward making this library compatible with Python 2.7. Regarding the type checking I'd prefer to remove it entirely instead of using the comment approach.

Feel free to fork and open a pull request at any time.

brennerm commented 6 years ago

Hey @codyaray, Thanks to @ravibhure the library does now support Python 2.7.

Lichtsucher commented 5 years ago

Hi everyone,

I just tried the version October 20th and discovered a new Python 3 change:

It looks like ** inside a dict is not allowed in python2.

Python2:

{x} File "", line 1 {x} ^ SyntaxError: invalid syntax

Python3:

{**x} {'a': 'b', 'c': 'd'}

brennerm commented 5 years ago

Thanks for finding this! Will take care of it.

brennerm commented 5 years ago

The issue has been fixed in 1.4.