canonical / juju-backup-all

Tool for backing up charms, local juju configs, and juju controllers.
Apache License 2.0
0 stars 5 forks source link

Add support for python 3.6 (bionic) #32

Closed zxhdaze closed 7 months ago

zxhdaze commented 7 months ago

The module uses python features that require a newer python version than provided in Ubuntu Bionic (18.04), which is 3.6.9 - In particular dataclasses, which became available in python 3.7. The stacktrace below is an example of the unit test suite failing due to this issue.

It would be convenient if the jujubackupall module had support for the python version in Ubuntu Bionic, as it is still used widely.

====================================================================== ERROR: test_process (unittest.loader._FailedTest)

ImportError: Failed to import test module: test_process Traceback (most recent call last): File "/home/jguedez/.pyenv/versions/3.6.9/lib/python3.6/unittest/loader.py", line 428, in _find_test_path module = self._get_module_from_name(name) File "/home/jguedez/.pyenv/versions/3.6.9/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name import(name) File "/home/jguedez/canonical/repos/bootstack/juju-backup-all/tests/unit/test_process.py", line 10, in from jujubackupall.process import BackupProcessor, ControllerProcessor, JujuModel File "/home/jguedez/canonical/repos/bootstack/juju-backup-all/jujubackupall/process.py", line 30, in from jujubackupall.backup import ( File "/home/jguedez/canonical/repos/bootstack/juju-backup-all/jujubackupall/backup.py", line 20, in import dataclasses ModuleNotFoundError: No module named 'dataclasses'


Ran 19 tests in 0.011s

FAILED (errors=3)


Imported from Launchpad using lp2gh.