BradRuderman/pyhs2

Set construction in connections.py not compatible with Python 2.6

Closed this issue · 6 comments

I am using pyhs2 with latest CentOS (6.4). It comes with Python 2.6.6 installed globally and this is difficult to change, since doing so breaks parts of the OS.

Line #19 of your connections.py uses the curly brace set construction, which fails in Python 2.6. If you change the line to

authMechanisms = set(['NOSASL', 'PLAIN', 'KERBEROS', 'LDAP'])

It will work in 2.6 (I tested it) and should be forward compatible to Python 2.7 and 3.x.

I am going to fix this and retroactively fix bugs, however I am proposing to the community to support 2.7.x and 3.3+.

Thanks,
Brad

It sounds like you are proposing to use the set() function on this one line, but that in general you will not promise to support Python 2.6. Is that correct?

Yes, that is correct. Do you see any reason to support 2.6.X from a community perspective?

Thanks,
Brad

Yes. Reason is that 2.6 is the standard (and hard to upgrade) version in the latest CentOS release. FYI, your code works now with 2.6. I am running it with that one-line change.

I'm also running with 2.6 - changing this line makes things work properly.

thanks a lot for fixing that!