Skip to content

pending python 3 upgrade tasks #111

@alastair

Description

@alastair

✔️ This item is fixed in #115

There is still some python code which only runs in python 2.
Most importantly are uses of basestring and unicode:

if not isinstance(key, basestring):
raise TypeError('A key in the map is not a string; can not convert it')
# until python 3, everything should always be utf-8 encoded bytestrings
if isinstance(key, unicode):
key = key.encode('utf-8')
if isinstance(value, unicode):
value = value.encode('utf-8')

These will have to be converted, but we have to understand the use of the types in this method. Theoretically both basestring and unicode can be changed to str, but in python 3, we should double-check where items should be actual strings, and where they should be encoded bytes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions