Skip to content

Marvin and CloudStack integration tests aren't fully Python v3.9-3.11 compatible #6962

@yadvr

Description

@yadvr

Marvin and CloudStack integration tests aren't fully Python v3.9-3.11 compatible. On my attempt to migrating CI to Github Actions with Python 3.9 I hit this:

2022-12-09 04:16:00,759 - ERROR - __sendCmdToCS: Exception:['Traceback (most recent call last):\n', '  File "/home/runner/.local/lib/python3.9/site-packages/marvin/cloudstackConnection.py", line 217, in __sendCmdToCS\n    payload["signature"] = self.__sign(payload)\n', '  File "/home/runner/.local/lib/python3.9/site-packages/marvin/cloudstackConnection.py", line 150, in __sign\n    signature = base64.encodestring(\n', "AttributeError: module 'base64' has no attribute 'encodestring'\n"]
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.9/site-packages/marvin/cloudstackConnection.py", line 217, in __sendCmdToCS
    payload["signature"] = self.__sign(payload)
  File "/home/runner/.local/lib/python3.9/site-packages/marvin/cloudstackConnection.py", line 150, in __sign
    signature = base64.encodestring(
AttributeError: module 'base64' has no attribute 'encodestring'

On further investigation I found this particular method in base64 module was deprecated and removed in Py 3.9;
https://docs.python.org/3.8/library/base64.html#base64.decodestring

It's possible there are other things not supported/removed in even newer Python (3.10/3.11) versions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions