python3-libmaas not compatible with python3.10
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack HA Cluster Charm |
Invalid
|
Undecided
|
Unassigned | ||
python-libmaas (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Jammy |
Fix Released
|
High
|
Unassigned | ||
Kinetic |
Fix Released
|
High
|
Unassigned | ||
Lunar |
Fix Released
|
High
|
Unassigned |
Bug Description
[ Impact ]
python-libmaas is not currently usable in any release where the Python version is >= 3.10.
[ Test Plan ]
Standalone tests:
sudo apt install python3-libmaas
python3 -c "import maas.client"
Error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/
from .utils.maas_async import asynchronous
File "/usr/lib/
from collections import (
ImportError: cannot import name 'Iterable' from 'collections'
(/usr/lib/
This also impact the use of the libmaas API from the hacluster charm - this will be used to validate the updates as well by following the deployment guide for masakari:
https:/
[ Where problems could occur ]
The proposed resolution for this issue is to update to the latest patch release for libmaas - this brings the potential for other regressions however the package is completely unusable in its current form and 0.6.8 is the current recommended version from the MAAS project (and is used via PPA by most users).
The proposed update will also enable test execution as part of the package
build to reduce the risk of a breaking change.
[ Other Info ]
The latest libmaas release is 0.6.8 - the changelog between 0.6.4 and 0.6.8 is mainly bug fixes and enablement of snaps:
babd97f5ff7c5ce
a0673683cf42120
fb06cab6227a5dd
69c51b5e64e7ffa
4dc66b5dfaf9fb2
e0211170b9f9247
fc44f195e5c15cc
ae3e321924b231a
1f6378049e8f3cc
94fe03efec5470b
575d3f762afc69a
bc1d76ae5fbb550
069e75885aaaf17
6822d838f470fe6
27faf84e3870b0d
647065b4112d4bb
e33e1afab5c60d8
1ebf61279b66625
7005096b006eaa1
474f756f485dae7
b5518780ec5e9c1
7641ce8a757833d
a870202dd4e7894
[ Original Bug Report ]
The python3-libmaas package in Ubuntu 22.04 does not work:
$ python3
Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import maas.client
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
from .utils.maas_async import asynchronous
File "/usr/lib/
from collections import (
ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib/
>>>
It looks like upstream has fixed several Python 3.10 compatibility issues in the master branch recently:
https:/
https:/
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: python3-libmaas 0.6.4-0ubuntu1
ProcVersionSign
Uname: Linux 5.15.0-47-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: GNOME
Date: Thu Sep 8 09:54:01 2022
InstallationDate: Installed on 2021-06-09 (455 days ago)
InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
PackageArchitec
SourcePackage: python-libmaas
UpgradeStatus: Upgraded to jammy on 2022-09-07 (0 days ago)
Changed in charm-hacluster: | |
status: | New → Invalid |
Changed in python-libmaas (Ubuntu Jammy): | |
importance: | Undecided → High |
Changed in python-libmaas (Ubuntu Kinetic): | |
importance: | Undecided → High |
Changed in python-libmaas (Ubuntu Lunar): | |
importance: | Undecided → High |
Changed in python-libmaas (Ubuntu Kinetic): | |
status: | New → Triaged |
Changed in python-libmaas (Ubuntu Jammy): | |
status: | New → Triaged |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
The correct package to use is the upstream python-libmaas: https:/ /launchpad. net/~maas/ +archive/ ubuntu/ python- libmaas
The one in the ubuntu archive is unmaintained.