[Bug 2080940] Re: unattended-upgrades broken by python-upgrade
Julian Andres Klode
2080940 at bugs.launchpad.net
Tue Sep 17 11:40:24 UTC 2024
One proposed work around in Python is to change the email.generator
module import:
from email.errors import HeaderWriteError
to graciously support the previous version email.errors:
try:
from email.errors import HeaderWriteError
except ImportError:
from email.errors import MessageError as HeaderWriteError
This will work correctly for affected applications as they can't know
about HeaderWriteError yet anyway, so we can't break any except clauses.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to unattended-upgrades in Ubuntu.
https://bugs.launchpad.net/bugs/2080940
Title:
unattended-upgrades broken by python-upgrade
Status in python3.10 package in Ubuntu:
New
Status in python3.12 package in Ubuntu:
New
Status in python3.8 package in Ubuntu:
New
Status in unattended-upgrades package in Ubuntu:
Won't Fix
Bug description:
at least focal and jammy are affected
automatic updates installed "python3.10:amd64 3.10.12-1~22.04.6" tonight. This updated does not contain functions/classes required by unattended-upgrade. It resulted in broken status-emails for me, otherwise I would not have seen.
One could argue that the bug is with python3.10, since there should be
no breaking changes in LTS.
Sep 17 06:05:01 xxx systemd[1]: Starting Daily apt upgrade and clean activities...
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: Traceback (most recent call last):
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: File "/usr/bin/unattended-upgrade", line 2005, in main
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: send_summary_mail(res.pkgs, res.success, res.result_str,
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: File "/usr/bin/unattended-upgrade", line 1509, in send_summary_mail
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: ret = _send_mail_using_sendmail(from_email, to_email, subject, body)
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: File "/usr/bin/unattended-upgrade", line 1408, in _send_mail_using_sendmail
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: sendmail.stdin.write(msg.as_string())
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: File "/usr/lib/python3.10/email/message.py", line 151, in as_string
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: from email.generator import Generator
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: File "/usr/lib/python3.10/email/generator.py", line 17, in <module>
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: from email.errors import HeaderWriteError
Sep 17 06:05:24 xxx apt.systemd.daily[1894012]: ImportError: cannot import name 'HeaderWriteError' from 'email.errors' (/usr/lib/python3.10/email/errors.py)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3.10/+bug/2080940/+subscriptions
More information about the foundations-bugs
mailing list