Skip to content
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

Python 3 support would be nice #11

Open
zoltan-fedor opened this issue Oct 7, 2015 · 3 comments
Open

Python 3 support would be nice #11

zoltan-fedor opened this issue Oct 7, 2015 · 3 comments

Comments

@zoltan-fedor
Copy link

Python 3 support would be nice.

Lots of other packages depending on it:
BradRuderman/pyhs2#44
http://stackoverflow.com/questions/31701493/problems-installing-pyhs2-in-python3

Currently compiling on Python 3 fails with "PyString_AsString" and other errors.

@zoltan-fedor
Copy link
Author

I have just seen there is a branch for Python 3 at https://github.com/laserson/python-sasl/tree/py3
Just tried, it does compile under Python 3.4.3. now the question is whether it works too.

@bolkedebruin
Copy link

+1 if this could be merged

@kpweiler
Copy link

I was able to compile lasersons py3 branch, but I get this when I try to establish a connection:

/export/home/kweiler/ip3-test/anaconda3/lib/python3.4/site-packages/impala/dbapi.py in connect(host, port, protocol, database, timeout, use_ssl, ca_cert, auth_mechanism, user, password, kerberos_service_name, use_ldap, ldap_user, ldap_password, use_kerberos)
     80                               ca_cert=ca_cert, user=user, password=password,
     81                               kerberos_service_name=kerberos_service_name,
---> 82                               auth_mechanism=auth_mechanism)
     83         return hs2.HiveServer2Connection(service, default_db=database)
     84     if protocol.lower() == 'beeswax':

/export/home/kweiler/ip3-test/anaconda3/lib/python3.4/site-packages/impala/hiveserver2.py in connect(host, port, timeout, use_ssl, ca_cert, user, password, kerberos_service_name, auth_mechanism)
    584     transport = get_transport(sock, host, kerberos_service_name,
    585                               auth_mechanism, user, password)
--> 586     transport.open()
    587     protocol = TBinaryProtocol(transport)
    588     if six.PY2:

/export/home/kweiler/ip3-test/anaconda3/lib/python3.4/site-packages/thrift_sasl/__init__.py in open(self)
     84       if status == self.COMPLETE:
     85         break
---> 86       ret, response = self.sasl.step(payload)
     87       if not ret:
     88         raise TTransportException(type=TTransportException.NOT_OPEN,

/export/home/kweiler/ip3-test/anaconda3/lib/python3.4/site-packages/sasl-0.2.0-py3.4-linux-x86_64.egg/sasl/saslwrapper.py in step(self, challenge)
    181
    182     def step(self, challenge):
--> 183         return _saslwrapper.Client_step(self, challenge)
    184
    185     def encode(self, clearText):

TypeError: in method 'Client_step', argument 2 of type 'std::string const &'

This looks like a type-error in C. I've tried casting the challenge object as a few different things with no success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants