[jira] [Commented] (LENS-1517) Python3 compatibility issues with python client
[ https://issues.apache.org/jira/browse/LENS-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16499773#comment-16499773 ] Rajat Khandelwal commented on LENS-1517: +1 > Python3 compatibility issues with python client > --- > > Key: LENS-1517 > URL: https://issues.apache.org/jira/browse/LENS-1517 > Project: Apache Lens > Issue Type: Bug > Components: python-client >Affects Versions: 3.0, 2.8 > Environment: Python 3.5.2 > Commit: c6423ae01a4776383f0edcd8591124ac643b9e3e >Reporter: Michael McCarthy >Assignee: Michael McCarthy >Priority: Major > > Using the python client in Python3 fails on import: > {noformat} > from lens.client import LensClient > --- > ImportError Traceback (most recent call last) > in () > > 1 from lens.client import LensClient > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/__init__.py > in () > 15 # limitations under the License. > 16 # > ---> 17 from .main import LensClient > 18 > 19 __all__ = ['LensClient'] > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/main.py > in () > 18 > 19 from six import string_types > ---> 20 from .log import LensLogClient > 21 from .session import LensSessionClient > 22 from .query import LensQueryClient > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/log.py > in () > 15 # limitations under the License. > 16 # > ---> 17 from .auth import SpnegoAuth > 18 import requests > 19 > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/auth.py > in () > 19 import subprocess > 20 import threading > ---> 21 from urlparse import urlparse > 22 > 23 > ImportError: No module named 'urlparse' > {noformat} > This appears to be due to the fact that in Python3, {{urlparse}} is > {{urllib.parse}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LENS-1517) Python3 compatibility issues with python client
[ https://issues.apache.org/jira/browse/LENS-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16499443#comment-16499443 ] Michael McCarthy commented on LENS-1517: Patch provided (with [~prongs]'s recommended changes): https://reviews.apache.org/r/67427/ > Python3 compatibility issues with python client > --- > > Key: LENS-1517 > URL: https://issues.apache.org/jira/browse/LENS-1517 > Project: Apache Lens > Issue Type: Bug > Components: python-client >Affects Versions: 3.0, 2.8 > Environment: Python 3.5.2 > Commit: c6423ae01a4776383f0edcd8591124ac643b9e3e >Reporter: Michael McCarthy >Assignee: Michael McCarthy >Priority: Major > > Using the python client in Python3 fails on import: > {noformat} > from lens.client import LensClient > --- > ImportError Traceback (most recent call last) > in () > > 1 from lens.client import LensClient > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/__init__.py > in () > 15 # limitations under the License. > 16 # > ---> 17 from .main import LensClient > 18 > 19 __all__ = ['LensClient'] > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/main.py > in () > 18 > 19 from six import string_types > ---> 20 from .log import LensLogClient > 21 from .session import LensSessionClient > 22 from .query import LensQueryClient > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/log.py > in () > 15 # limitations under the License. > 16 # > ---> 17 from .auth import SpnegoAuth > 18 import requests > 19 > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/auth.py > in () > 19 import subprocess > 20 import threading > ---> 21 from urlparse import urlparse > 22 > 23 > ImportError: No module named 'urlparse' > {noformat} > This appears to be due to the fact that in Python3, {{urlparse}} is > {{urllib.parse}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
Review Request 67427: LENS-1517: Python3 compatibility issues with python client
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67427/ --- Review request for lens. Repository: lens Description --- Fix of urlparse import in auth.py to make compatibiliy with Python 2 and 3. Diffs - contrib/clients/python/lens/client/auth.py fccc75c9 Diff: https://reviews.apache.org/r/67427/diff/1/ Testing --- Tested with Python 2.7.12 and Python 3.5.2. Thanks, Michael McCarthy
[jira] [Commented] (LENS-1517) Python3 compatibility issues with python client
[ https://issues.apache.org/jira/browse/LENS-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16499419#comment-16499419 ] Rajat Khandelwal commented on LENS-1517: Hi Michael. The solution you posted seems like a hack to me. Can you look at http://python-future.org/compatible_idioms.html#urllib-module and update patch? > Python3 compatibility issues with python client > --- > > Key: LENS-1517 > URL: https://issues.apache.org/jira/browse/LENS-1517 > Project: Apache Lens > Issue Type: Bug > Components: python-client >Affects Versions: 3.0, 2.8 > Environment: Python 3.5.2 > Commit: c6423ae01a4776383f0edcd8591124ac643b9e3e >Reporter: Michael McCarthy >Assignee: Michael McCarthy >Priority: Major > > Using the python client in Python3 fails on import: > {noformat} > from lens.client import LensClient > --- > ImportError Traceback (most recent call last) > in () > > 1 from lens.client import LensClient > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/__init__.py > in () > 15 # limitations under the License. > 16 # > ---> 17 from .main import LensClient > 18 > 19 __all__ = ['LensClient'] > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/main.py > in () > 18 > 19 from six import string_types > ---> 20 from .log import LensLogClient > 21 from .session import LensSessionClient > 22 from .query import LensQueryClient > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/log.py > in () > 15 # limitations under the License. > 16 # > ---> 17 from .auth import SpnegoAuth > 18 import requests > 19 > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/auth.py > in () > 19 import subprocess > 20 import threading > ---> 21 from urlparse import urlparse > 22 > 23 > ImportError: No module named 'urlparse' > {noformat} > This appears to be due to the fact that in Python3, {{urlparse}} is > {{urllib.parse}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (LENS-1517) Python3 compatibility issues with python client
[ https://issues.apache.org/jira/browse/LENS-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCarthy updated LENS-1517: --- Attachment: (was: LENS-1234.patch) > Python3 compatibility issues with python client > --- > > Key: LENS-1517 > URL: https://issues.apache.org/jira/browse/LENS-1517 > Project: Apache Lens > Issue Type: Bug > Components: python-client >Affects Versions: 3.0, 2.8 > Environment: Python 3.5.2 > Commit: c6423ae01a4776383f0edcd8591124ac643b9e3e >Reporter: Michael McCarthy >Assignee: Michael McCarthy >Priority: Major > > Using the python client in Python3 fails on import: > {noformat} > from lens.client import LensClient > --- > ImportError Traceback (most recent call last) > in () > > 1 from lens.client import LensClient > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/__init__.py > in () > 15 # limitations under the License. > 16 # > ---> 17 from .main import LensClient > 18 > 19 __all__ = ['LensClient'] > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/main.py > in () > 18 > 19 from six import string_types > ---> 20 from .log import LensLogClient > 21 from .session import LensSessionClient > 22 from .query import LensQueryClient > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/log.py > in () > 15 # limitations under the License. > 16 # > ---> 17 from .auth import SpnegoAuth > 18 import requests > 19 > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/auth.py > in () > 19 import subprocess > 20 import threading > ---> 21 from urlparse import urlparse > 22 > 23 > ImportError: No module named 'urlparse' > {noformat} > This appears to be due to the fact that in Python3, {{urlparse}} is > {{urllib.parse}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (LENS-1517) Python3 compatibility issues with python client
[ https://issues.apache.org/jira/browse/LENS-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCarthy updated LENS-1517: --- Attachment: LENS-1234.patch > Python3 compatibility issues with python client > --- > > Key: LENS-1517 > URL: https://issues.apache.org/jira/browse/LENS-1517 > Project: Apache Lens > Issue Type: Bug > Components: python-client >Affects Versions: 3.0, 2.8 > Environment: Python 3.5.2 > Commit: c6423ae01a4776383f0edcd8591124ac643b9e3e >Reporter: Michael McCarthy >Assignee: Michael McCarthy >Priority: Major > Attachments: LENS-1234.patch > > > Using the python client in Python3 fails on import: > {noformat} > from lens.client import LensClient > --- > ImportError Traceback (most recent call last) > in () > > 1 from lens.client import LensClient > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/__init__.py > in () > 15 # limitations under the License. > 16 # > ---> 17 from .main import LensClient > 18 > 19 __all__ = ['LensClient'] > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/main.py > in () > 18 > 19 from six import string_types > ---> 20 from .log import LensLogClient > 21 from .session import LensSessionClient > 22 from .query import LensQueryClient > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/log.py > in () > 15 # limitations under the License. > 16 # > ---> 17 from .auth import SpnegoAuth > 18 import requests > 19 > /data/d1/users/ds-exp/python-virtualenvs/python3.5/src/lenspythonclient/contrib/clients/python/lens/client/auth.py > in () > 19 import subprocess > 20 import threading > ---> 21 from urlparse import urlparse > 22 > 23 > ImportError: No module named 'urlparse' > {noformat} > This appears to be due to the fact that in Python3, {{urlparse}} is > {{urllib.parse}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)