DiffSK / configobj

Python 3+ compatible port of the configobj library
https://configobj.readthedocs.org
Other
322 stars 76 forks source link

unable to install validation under python 3.6 #178

Closed millerthegorilla closed 6 years ago

millerthegorilla commented 6 years ago

python 3.6 complains about a syntax error: except Exception, e: when installing using pycharm full error: Collecting validate Downloading https://files.pythonhosted.org/packages/02/f8/97105237d0ba693b6f0bdcd94da0504e9a4433988c4393d8d3049094be7a/validate-1.0.1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pycharm-packaging/validate/setup.py", line 13, in from configobj import version as VERSION File "/tmp/pycharm-packaging/validate/configobj.py", line 1632 except Exception, e: ^ SyntaxError: invalid syntax

jhermann commented 6 years ago

Use a recent release, validation is now integrated (see changelog).

tsroten commented 6 years ago

Hello @jhermann! It looks like the latest release still has the validate.py module outside of a configobj package. The changelog references a version 5.1.0, but I don't see that release on GitHub or PyPI. There also doesn't seem to be a version tag for it either.

Is there another way we should be looking at upgrading to a release newer than 5.0.6?

jhermann commented 6 years ago

The latest release requires a change in imports, and there is a shim that redirects to the new location in case you didn't.

Avoiding the shim (i.e. rewriting imports) should solve your problem.

https://configobj.readthedocs.io/en/latest/validate.html#instantiate

jhermann commented 6 years ago

Sorry, I was sure I pushed out all those changes, but I didn't. Guess it is high time to push out what's there.

For the time being, use this requirement:

https://github.com/DiffSK/configobj/archive/master.zip#egg=configobj