libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nigel B (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LIBCLOUD-1011) A unicode string is not an instance of basestring on Python 2.7.5
Date Tue, 04 Sep 2018 09:39:01 GMT
Nigel B created LIBCLOUD-1011:
---------------------------------

             Summary: A unicode string is not an instance of basestring on Python 2.7.5
                 Key: LIBCLOUD-1011
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-1011
             Project: Libcloud
          Issue Type: Bug
          Components: Core
         Environment: Python 2.7.5 on Centos 7.
            Reporter: Nigel B


I've run into a problem with basestring defined in libcloud.utils.py3 for python. It does
not recognize unicode as an instance of basestring. That doesn't sound right.

 

Here's terminal output from a machine where I can consistently reproduce this issue.

 

{{$ python}}
{{Python 2.7.5 (default, Aug  4 2017, 00:39:18)}}
{{[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2}}
{{Type "help", "copyright", "credits" or "license" for more information.}}
{{>>> foo = u'my-unicode-string'}}
{{>>> isinstance(foo, basestring)}}
{{True}}
{{>>> from libcloud.utils.py3 import basestring}}
{{/srv/softserve/env/lib/python2.7/site-packages/libcloud/utils/py3.py:60: UserWarning: Missing
backports.ssl_match_hostname package}}
{{  warnings.warn("Missing backports.ssl_match_hostname package")}}
{{>>> isinstance(foo, basestring)}}
{{False}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message