Skip to content

Python 3 compability #1

@iwan933

Description

@iwan933

Hi,

i downloaded the following package from pypi: https://pypi.python.org/pypi/python-zanox-api/0.4.0

This does not have any support for python3 - i had to change the lib imports (urllib) to get the imports running. Using the client.get function made me also change the following row:

hmac.new(self.secret_key, msg=bytes(signature, 'utf-8'), digestmod=hashlib.sha1).digest()

to

hmac.new(bytearray(self.secret_key), msg=bytes(signature, 'utf-8'), digestmod=hashlib.sha1).digest()

as python 3 has new types (bytes and bytearray) and hmac does not accept str's anymore.

Which works for me.

Regards John

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions