snobear/ezmomi

Python 3 support

pathcl opened this issue · 11 comments

Hello,

I've just installed ezmomi and noticed it sticks with 'pyvmomi==5.5.0'. Is there any specific reason? if I upgrade to (5.5.0.2014.1.1) I can work on pypy3-2.40 but if not..

File "/home/pathcl/src/vsphere-python-restapi/methods.py", line 8, in
from pyVim import connect
File "/home/pathcl/.pyenv/versions/pypy3-2.4.0/site-packages/pyVim/connect.py", line 331
except Exception, e:
^
SyntaxError: invalid syntax

its easy to fix. Just don't specify any version for pyvmomi on setup.py.

Isnt python3 support planned? :)

There's a weird inconsistency with print function.

  • Is it print("some") or print "some"? you could use from future import print_function
  • Why not use .format(object) instead of %s ?

I have not tested on python 3 and don't have any immediate plans to support it. That said, I do see that pyvmomi supports 3.3/3.4, so we'd only need some basic tweaks to make it 3.x happy.

Who wants to work on that :)?

Well I'll fix it :)

@pathcl thats great thanks!

@snobear @pathcl , Any updates on this? I may be able to work on it if I can find the time.

@Cory-Watson I'm pretty sure python 3 support was added in the latest release: https://github.com/snobear/ezmomi/releases/tag/6.5.0 which should be in pypi.

6.5.0 does not have the correction : print in setup.py do not have parenthesis.

Correction is on HEAD on master branch, but not realeased in any PIP package.
Any plan on a new release ?

With python3.5, I can install with pip directly from git repo:
pip install git+https://github.com/snobear/ezmomi.git

im-n1 commented

I can confirm - master (this repo) is installable, PyPI version is not.

@TMadMac @im-n1 OK I pushed the latest master to pypi. So this is now available as version 6.5.1.

https://pypi.org/project/ezmomi/6.5.1/