-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Python 2.6 #27
Comments
From what I can see gixy won't run on 2.6, as it's using 2.7/3.x syntax. If, like me, you're running CentOS 6, try installing EPEL and then
|
For now Gixy does not support Python 2.6 and I'm not sure if it is needed. For example, the pip project has recently dropped support for 2.6: pypa/pip#4343
So the only popular distro with Python 2.6 is CentOS 6? |
As far as I can tell, both CentOS and RHEL 6 (EL6) just support Python 2.6 (in their base repos). Then they backport security fixes back into the packages when necessary. As they're true long-term releases, EL 6 will be supported until 2020, and it still has a pretty big market share. The only reason Gixy doesn't seem to currently work is because the set syntax is different (set([1, 2]) compared to {}) and the .format() syntax in 2.7 and 3.x. I guess providing some brief installation instruction for CentOS 6 could be helpful as a workaround? |
From the one hand, CentOS 6 ships with a Python 2.6 by default. As @Jamie0 said RHEL/CentOS 6.x will be supported until 2020 and it still has a lot of users. For example, Ansible developers support Python 2.6 as well as Python 2.7. From the other hand, I understand that supporting compatibility with an obsolete version of Python might be painful. @buglloc I suggest you estimate how much effort and time do you need to maintain also the older version of Python interpreter. If it is not worth it, just close the issue and move on. |
Supporting Python 2.6 is painful, but I'll try to support it as much as I can :) |
Fixed in Gixy v0.1.5 |
[root@]# python -V
Python 2.6.6
[root@]# gixy /etc/nginx/conf.d/default.conf
Traceback (most recent call last):
File "/usr/bin/gixy", line 7, in
from gixy.cli.main import main
File "/usr/lib/python2.6/site-packages/gixy/cli/main.py", line 8, in
from gixy.formatters import get_all as formatters
File "/usr/lib/python2.6/site-packages/gixy/formatters/init.py", line 2, in
from gixy.formatters.base import BaseFormatter
File "/usr/lib/python2.6/site-packages/gixy/formatters/base.py", line 7
skip_parents = {block.Root, block.HttpBlock}
^
SyntaxError: invalid syntax
The text was updated successfully, but these errors were encountered: