diff -Nru reportbug-12.0.0ubuntu1/TODO reportbug-13.0.1ubuntu1/TODO --- reportbug-12.0.0ubuntu1/TODO 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/TODO 2024-02-29 17:19:31.000000000 +0000 @@ -12,9 +12,7 @@ + disabled utils.NEWBIELINE check to avoid circular import between text and utils ******** WE NEED TO FIND A SOLUTION TO THIS ********** -0.4. check for utf-8/weird locales errors, maybe at - http://ginstrom.com/scribbles/2008/11/16/notes-for-using-unicode-with-python-2x/ - we can find some hints? +0.4. check for utf-8/weird locales errors 0.5. remove the tmp file only after the report is actually sent (or at least it should be configurable?) diff -Nru reportbug-12.0.0ubuntu1/bin/querybts reportbug-13.0.1ubuntu1/bin/querybts --- reportbug-12.0.0ubuntu1/bin/querybts 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/bin/querybts 2024-02-29 17:19:31.000000000 +0000 @@ -3,7 +3,7 @@ # querybts - Examine the state of a debbugs server # Written by Chris Lawrence # (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # diff -Nru reportbug-12.0.0ubuntu1/bin/reportbug reportbug-13.0.1ubuntu1/bin/reportbug --- reportbug-12.0.0ubuntu1/bin/reportbug 2023-11-28 11:15:06.000000000 +0000 +++ reportbug-13.0.1ubuntu1/bin/reportbug 2024-02-29 17:19:31.000000000 +0000 @@ -3,7 +3,7 @@ # reportbug - Report a bug in the Debian distribution. # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # @@ -44,9 +44,7 @@ COPYRIGHT, LICENSE ) -from reportbug.utils import ( - MODE_EXPERT, MODE_ADVANCED, MODE_NOVICE, MODE_STANDARD, -) +from reportbug.utils import MODE from reportbug.tempfiles import ( TempFile, tempfile_prefix, @@ -409,7 +407,7 @@ return None -def get_package_name(bts='debian', mode=MODE_EXPERT): +def get_package_name(bts='debian', mode=MODE.EXPERT): others = debbugs.SYSTEMS[bts].get('otherpkgs') prompt = "Please enter the name of the package in which you have found " \ "a problem" @@ -443,7 +441,7 @@ "Automatically selecting the package for the running kernel") package = utils.get_running_kernel_pkg() - if mode < MODE_STANDARD: + if mode < MODE.STANDARD: if package == 'reportbug': if not ui.yes_no('Is "reportbug" actually the package you are ' 'having problems with?', @@ -453,7 +451,7 @@ 'another package.'): return get_package_name(bts, mode) - if mode < MODE_EXPERT: + if mode < MODE.EXPERT: if package in ('bugs.debian.org', 'debbugs'): if ui.yes_no('Are you reporting a problem with this program (reportbug)?', 'Yes, this is actually a bug in reportbug.', @@ -1030,16 +1028,21 @@ sys.exit(1) if options.mua and not options.template: + if isinstance(options.mua, mailer.Mua): + _mua = options.mua.name + else: + _mua = options.mua + if not mailer.mua_is_supported(options.mua): - ewrite("Specified mail user agent is not supported; exiting.\n") + ewrite(f"Specified mail user agent '{_mua}' is not supported; exiting.\n") sys.exit(1) if not mailer.mua_exists(options.mua): - ewrite("Selected mail user agent cannot be found; exiting.\n") + ewrite(f"Selected mail user agent '{_mua}' cannot be found; exiting.\n") sys.exit(1) if not mailer.mua_can_run(options.mua): - ewrite("Selected mail user agent cannot be run without graphical display; exiting.\n") + ewrite(f"Selected mail user agent '{_mua}' cannot be run without graphical display; exiting.\n") sys.exit(1) # we want options.mua to be a mailer.Mua instance @@ -1332,7 +1335,7 @@ elif package and self.options.source: # convert it to the source package if we are reporting for src package = utils.get_source_name(package) - elif package.lower() in ('general', 'project', 'debian-general') and mode < MODE_EXPERT: + elif package.lower() in ('general', 'project', 'debian-general') and mode < MODE.EXPERT: ui.long_message( "If you have a general problem, please do consider using " 'the available Debian support channels to narrow the problem ' @@ -1348,7 +1351,7 @@ package = package[4:] issource = True - others = debbugs.SYSTEMS[bts].get('otherpkgs') + others = sysinfo.get('otherpkgs', {}) if package == 'other' and others: package = get_other_package_name(others) @@ -1357,7 +1360,7 @@ "Automatically selecting the package for the running kernel") package = utils.get_running_kernel_pkg() - if package in ('installation-report', 'upgrade-report') and mode < MODE_EXPERT: + if package in ('installation-report', 'upgrade-report') and mode < MODE.EXPERT: package += 's' if not package: @@ -1398,7 +1401,7 @@ if baseedname == 'sensible-editor': edname = utils.realpath('/usr/bin/editor') - if not notatty and 'vi' in baseedname and mode < MODE_STANDARD and 'EDITOR' not in os.environ: + if not notatty and 'vi' in baseedname and mode < MODE.STANDARD and 'EDITOR' not in os.environ: if not ui.yes_no('You appear to be using the "vi" editor, which is ' 'not suited for new users. You probably want to ' 'change this setting by using "update-alternatives ' @@ -1460,7 +1463,7 @@ except NoReport: efail('Exiting.\n') - isvirtual = (package in list(sysinfo.get('otherpkgs', {}).keys()) + isvirtual = (package in others.keys() and package not in sysinfo.get('nonvirtual', [])) if issource and not pkgversion: @@ -1469,7 +1472,7 @@ if not pkgversion and self.options.querydpkg and \ sysinfo.get('query-dpkg', True) and \ - package not in list(debbugs.SYSTEMS[bts].get('otherpkgs').keys()): + package not in others.keys(): ewrite("Getting status for %s...\n", package) status = utils.get_package_status(package) @@ -1485,14 +1488,14 @@ newdepends.extend(x) depends = newdepends if len(depends) == 1: - if mode < MODE_ADVANCED: + if mode < MODE.ADVANCED: ewrite('Dependency package "%s" corresponds to ' 'actual package "%s".\n', package, depends[0]) package = depends[0] else: opts = [(x, (utils.get_package_status(x)[11] or 'not installed')) for x in depends] - if mode >= MODE_ADVANCED: + if mode >= MODE.ADVANCED: opts += [(package, status[11] + ' (dependency package)')] @@ -1673,7 +1676,9 @@ 'Exit without filing a report.', False, nowrap=True): efail("Package integrity check failed; stopping.\n") - if not pkgversion or usedavail or (not pkgavail and not issource): + if not pkgversion or usedavail or (not pkgavail + and not self.options.pkgversion + and not issource): if not bugnumber and not (isvirtual or notatty) and not self.options.resume_saved: pkgversion = ui.get_string('Please enter the version of the ' 'package this report applies to ' @@ -1681,7 +1686,7 @@ elif (check_available and not (self.options.kudos or notatty or self.options.offline) and state == 'installed' and bts == 'debian'): arch = utils.get_arch() - check_more = (mode > MODE_STANDARD) + check_more = (mode > MODE.STANDARD) if check_more: ewrite('Checking for newer versions at madison' ' and https://ftp-master.debian.org/new.html\n') @@ -1722,8 +1727,9 @@ bts = DEFAULT_BTS if self.options.bts: bts = self.options.bts + sysinfo = debbugs.SYSTEMS[bts] ewrite("Will send report to %s (per request).\n", - debbugs.SYSTEMS[bts].get('name', bts)) + sysinfo.get('name', bts)) elif origin: if origin.lower() == bts: ewrite("Package originates from %s.\n", vendor or origin) @@ -1751,8 +1757,9 @@ distro = lsbr.strip().lower() if distro in debbugs.SYSTEMS: bts = distro + sysinfo = debbugs.SYSTEMS[bts] ewrite("Will send report to %s (per lsb_release).\n", - debbugs.SYSTEMS[bts].get('name', bts)) + sysinfo.get('name', bts)) if rtype == 'mailto': rtype = 'debbugs' @@ -1989,12 +1996,12 @@ else: ewrite("Providing a subject is mandatory.\n") - if len(subject) > 100 and prompted and mode < MODE_EXPERT: + if len(subject) > 100 and prompted and mode < MODE.EXPERT: subject = ui.get_string( 'Your description is a bit long; please enter a shorter subject. ' '(An empty response will retain the existing subject.)', empty_ok=True, force_prompt=True) or subject - if package != 'wnpp' and mode < MODE_EXPERT: + if package != 'wnpp' and mode < MODE.EXPERT: if foundfile: subject = foundfile + ": " + subject ewrite("Rewriting subject to '%s'\n", subject) @@ -2006,7 +2013,7 @@ if not listcc: listcc = [] - if not listcc and mode > MODE_STANDARD and rtype == 'debbugs' and not self.options.testmode and not self.options.template and self.options.ccmenu: + if not listcc and mode > MODE.STANDARD and rtype == 'debbugs' and not self.options.testmode and not self.options.template and self.options.ccmenu: listcc += ui.get_multiline( 'Enter any additional addresses this report should be sent to; press ENTER after each address.') @@ -2019,7 +2026,7 @@ # If the bug is reported against a package with a version that possibly # indicates a security update add the security or LTS team to CC # after user confirmation - if pkgversion and package and not self.options.offline and mode > MODE_NOVICE and utils.is_security_update(package, pkgversion): + if pkgversion and package and not self.options.offline and mode > MODE.NOVICE and utils.is_security_update(package, pkgversion): if ui.yes_no('Do you want to report a regression because of a security update?', 'Yes, please inform the LTS and security teams.', 'No or I am not sure.', True): @@ -2057,7 +2064,7 @@ default = 'non-critical' else: severities = debbugs.SEVERITIES - if mode < MODE_STANDARD: + if mode < MODE.STANDARD: ewrite("Removing release critical severities, since running in \'%s\' mode.\n" % utils.MODELIST[mode]) for sev in ['critical', 'grave', 'serious', 'does-not-build']: del severities[sev] @@ -2084,7 +2091,7 @@ severity = severity or 'normal' justification = self.options.justification - if rtype == 'debbugs' and package != 'wnpp' and mode < MODE_EXPERT: + if rtype == 'debbugs' and package != 'wnpp' and mode < MODE.EXPERT: if severity in ('critical', 'grave'): justification = ui.menu( 'You are reporting a ' + severity + ' bug; which of the ' @@ -2144,7 +2151,7 @@ and not (notatty or self.options.kudos or exinfo) and package not in ('wnpp', 'ftp.debian.org', 'release.debian.org') and not self.options.resume_saved - and mode > MODE_NOVICE + and mode > MODE.NOVICE and self.options.tagsmenu ): tags = debbugs.get_tags(severity, mode) @@ -2156,17 +2163,26 @@ # We've pressed cancel or quit in urwid sys.exit() - patch = ('patch' in taglist) - - if justification and 'security' not in taglist and 'security' in \ - justification: + if 'security' not in taglist and ( + justification and 'security' in justification + or subject and any(x in subject for x in ('security', 'vuln', 'exploit')) + ): ewrite('Adding security tag to this report.\n') taglist += ['security'] - if justification and 'ftbfs' not in taglist and 'fails to build from source' in justification: + if 'ftbfs' not in taglist and ( + justification and 'fails to build from source' in justification + or subject and 'FTBFS' in subject + ): ewrite('Adding ftbfs tag to this report.\n') taglist += ['ftbfs'] + if 'patch' not in taglist and subject and 'PATCH' in subject: + ewrite('Adding patch tag to this report.\n') + taglist += ['patch'] + + patch = 'patch' in taglist + if taglist: tags = ' '.join(taglist) else: @@ -2338,7 +2354,7 @@ # newline in the message. See #234963. body = body.rstrip('\n') + '\n' - if not pseudoheaders and not justsave: + if "submit@bugs.debian.org" in sendto and not pseudoheaders and not justsave: ui.display_failure('Invalid bug report message: No pseudoheaders found.\n' 'Your message will not be submitted, but stored in a temporary file instead.\n') justsave = True @@ -2368,7 +2384,8 @@ self.options.paranoid, self.options.draftpath, self.options.envelopefrom) - ui.final_message('Thank you for using reportbug\n') + if not notatty: + ui.final_message('Thank you for using reportbug\n') return diff -Nru reportbug-12.0.0ubuntu1/debian/changelog reportbug-13.0.1ubuntu1/debian/changelog --- reportbug-12.0.0ubuntu1/debian/changelog 2023-11-28 11:29:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/debian/changelog 2024-02-29 17:24:34.000000000 +0000 @@ -1,3 +1,61 @@ +reportbug (13.0.1ubuntu1) noble; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - bin/reportbug: If bts=ubuntu or unconfigured, exit with an error and + refer user to "ubuntu-bug" instead. + - debian/control: Add prominent note to package description. + - debian/tests/runnable: Test against Debian BTS instead of Ubuntu + - reportbug/__init__.py: Match reportbug version with package version. + + -- Benjamin Drung Thu, 29 Feb 2024 18:24:34 +0100 + +reportbug (13.0.1) unstable; urgency=medium + + * reportbug/submit.py: fix crash resulting from submission failure + (Closes: #1064790) + + -- Nis Martensen Tue, 27 Feb 2024 11:42:00 +0100 + +reportbug (13.0.0) unstable; urgency=medium + + [ Paul Wise ] + * Drop progenyother variable + * Automatically add tags based on the subject + * Update URLs to https where possible + * Drop a URL that is no longer on the web + * Update Debian Policy Source field URL anchor + * Update check-available documentation + * Add User and Usertags to the list of repeatable pseudo-headers + * Refactor access to the BTS system info + + [ Jakub Wilk ] + * man/reportbug.1: grammar fix in --no-bug-script description + (Closes: #1027816) + + [ Nis Martensen ] + * bin/reportbug: adjust logic to avoid duplicates in taglist + * extend copyright years to 2023 + * update lintian override + * bin/reportbug: skip final thank you message in non-interactive mode + * bin/reportbug: only check for pseudoheaders when submitting bugs + (Closes: #1034787) + * bin/reportbug: fix -V / --package-version option (Closes: #1040779) + * reportbug/submit.py: work around bug in smtplib. Thanks to Laurent + Bigonville for investigating and providing an initial patch + (Closes: #926900) + * submit, utils, test_bugreport: fix some mypy errors + * bin/reportbug: give name of mua in error message (Closes: #1061271) + * test/test_utils.py: update for now repeatable pseudoheaders + * bin/reportbug: follow the MODE conversion to enum + + [ Alexandre Detiste ] + * modernize to python3, fix mypy failure + + [ Otto Kekäläinen ] + * Link bts(1) man page from querybts + + -- Nis Martensen Sun, 11 Feb 2024 12:52:07 +0100 + reportbug (12.0.0ubuntu1) noble; urgency=medium * Merge from Debian unstable. Remaining changes: diff -Nru reportbug-12.0.0ubuntu1/debian/copyright reportbug-13.0.1ubuntu1/debian/copyright --- reportbug-12.0.0ubuntu1/debian/copyright 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/debian/copyright 2024-02-29 17:19:31.000000000 +0000 @@ -4,7 +4,7 @@ Files: * Copyright: © 1999-2006 Chris Lawrence - Copyright (C) 2008-2022 Sandro Tosi + Copyright (C) 2008-2023 Sandro Tosi License: other Files: share/handle_bugscript @@ -23,6 +23,7 @@ Copyright: Copyright (C) 2006 Philipp Kern Copyright (C) 2008-2009 Luca Bruno + Copyright (C) 2021-2022 Takahide Nojima License: other Files: share/debian-swirl.svg diff -Nru reportbug-12.0.0ubuntu1/debian/reportbug-gtk.lintian-overrides reportbug-13.0.1ubuntu1/debian/reportbug-gtk.lintian-overrides --- reportbug-12.0.0ubuntu1/debian/reportbug-gtk.lintian-overrides 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/debian/reportbug-gtk.lintian-overrides 2024-02-29 17:19:31.000000000 +0000 @@ -1,2 +1,2 @@ # all reportbug UIs share the same main script -reportbug-gtk binary: desktop-command-not-in-package usr/share/applications/reportbug.desktop reportbug +reportbug-gtk binary: desktop-command-not-in-package reportbug [usr/share/applications/reportbug.desktop] diff -Nru reportbug-12.0.0ubuntu1/doc/HowToReportGoodBugs.txt reportbug-13.0.1ubuntu1/doc/HowToReportGoodBugs.txt --- reportbug-12.0.0ubuntu1/doc/HowToReportGoodBugs.txt 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/doc/HowToReportGoodBugs.txt 2024-02-29 17:19:31.000000000 +0000 @@ -7,11 +7,11 @@ Title: How to report a bug in Debian using reportbug Author: Debian BTS administrators -URL: http://www.debian.org/Bugs/Reporting +URL: https://www.debian.org/Bugs/Reporting Title: How to Report Bugs Effectively Author: Simon Tatham -URL: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html +URL: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html Title: How To Ask Questions The Smart Way Author: Eric Steven Raymond, Rick Moen diff -Nru reportbug-12.0.0ubuntu1/man/querybts.1 reportbug-13.0.1ubuntu1/man/querybts.1 --- reportbug-12.0.0ubuntu1/man/querybts.1 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/man/querybts.1 2024-02-29 17:19:31.000000000 +0000 @@ -102,7 +102,7 @@ required port number (simply specifying a hostname, or omitting a port other than 80, WILL NOT WORK). .SH "SEE ALSO" -reportbug(1), reportbug.conf(5) +reportbug(1), reportbug.conf(5), bts(1) .SH AUTHOR Chris Lawrence , Sandro Tosi . diff -Nru reportbug-12.0.0ubuntu1/man/reportbug.1 reportbug-13.0.1ubuntu1/man/reportbug.1 --- reportbug-12.0.0ubuntu1/man/reportbug.1 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/man/reportbug.1 2024-02-29 17:19:31.000000000 +0000 @@ -108,9 +108,9 @@ option cannot usefully be combined with many other options. .TP .B \-\-check\-available -Check for newer releases of the package at \fBpackages.debian.org\fP +Check for newer releases of the package in Debian package lists (default). In \fBadvanced\fP and \fBexpert\fP mode, check -\fBhttp://ftp-master.debian.org/new.html\fP too. +\fBhttps://ftp-master.debian.org/new.html\fP too. .TP .B \-\-no\-check\-available Do not check for newer releases of the package at @@ -314,7 +314,7 @@ .TP .B \-\-no\-bug\-script Do not execute the bug script (if present); this option can be useful -together with \-\-template to suppress every interactive actions, +together with \-\-template to suppress every interactive action, since some bug scripts can ask questions. .TP .B \-\-no\-cc\-menu @@ -574,7 +574,7 @@ \fBjitterbug\fP (used by Samba, AbiSource and FreeCiv) but it isn't. .SH "SEE ALSO" reportbug.conf(5), -.I http://www.debian.org/Bugs/Developer#tags +.I https://www.debian.org/Bugs/Developer#tags for available tags, querybts(1) .SH AUTHOR Chris Lawrence , diff -Nru reportbug-12.0.0ubuntu1/man/reportbug.conf.5 reportbug-13.0.1ubuntu1/man/reportbug.conf.5 --- reportbug-12.0.0ubuntu1/man/reportbug.conf.5 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/man/reportbug.conf.5 2024-02-29 17:19:31.000000000 +0000 @@ -65,9 +65,9 @@ Whether the reporter should be Cc:ed on the bug report. .TP .B check-available (\fIboolean\fP) -Whether \fBpackages.debian.org\fP should be queried for newer releases +Whether Debian package lists should be queried for newer releases of the package. In \fBadvanced\fP and \fBexpert\fP mode, -\fBhttp://ftp-master.debian.org/new.html\fP is also checked. +\fBhttps://ftp-master.debian.org/new.html\fP is also checked. .TP .B compress (\fIboolean\fP) Whether modified configuration files included in the bug report should diff -Nru reportbug-12.0.0ubuntu1/reportbug/__init__.py reportbug-13.0.1ubuntu1/reportbug/__init__.py --- reportbug-12.0.0ubuntu1/reportbug/__init__.py 2023-11-28 11:29:03.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/__init__.py 2024-02-29 17:22:59.000000000 +0000 @@ -3,7 +3,7 @@ # reportbug - Report a bug in the Debian distribution. # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # @@ -25,8 +25,8 @@ __all__ = ['bugreport', 'utils', 'urlutils', 'checkbuildd', 'checkversions', 'debbugs', 'exceptions', 'submit', 'tempfile', 'mailer'] -VERSION_NUMBER = "12.0.0+ubuntu1" +VERSION_NUMBER = "13.0.1+ubuntu1" VERSION = "reportbug " + VERSION_NUMBER COPYRIGHT = VERSION + '\nCopyright (C) 1999-2008 Chris Lawrence ' + \ - '\nCopyright (C) 2008-2022 Sandro Tosi ' + '\nCopyright (C) 2008-2023 Sandro Tosi ' diff -Nru reportbug-12.0.0ubuntu1/reportbug/bugreport.py reportbug-13.0.1ubuntu1/reportbug/bugreport.py --- reportbug-12.0.0ubuntu1/reportbug/bugreport.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/bugreport.py 2024-02-29 17:19:31.000000000 +0000 @@ -2,7 +2,7 @@ # bugreport module - object containing bug stuff for reporting # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # @@ -29,7 +29,7 @@ from .ui import text_ui as ui -class bugreport(object): +class bugreport: "Encapsulates a bug report into a convenient object we can pass around." # Default character set for str(x) @@ -37,7 +37,7 @@ def __init__(self, package, subject='', body='', system='debian', incfiles='', sysinfo=True, - followup=False, type='debbugs', mode=utils.MODE_STANDARD, + followup=False, type='debbugs', mode=utils.MODE.STANDARD, debsumsoutput=None, issource=False, **props): self.type = type for (k, v) in props.items(): @@ -74,7 +74,7 @@ return self.__type type = property(tget, tset) - def __unicode__(self): + def __str__(self): un = os.uname() debinfo = '' shellpath = utils.realpath('/bin/sh') @@ -122,7 +122,7 @@ # one of the specials (f.e. those with a dedicated function) also # thinking about those systems that don't have 'specials' dict # and if a body wasn't provided on the command line - if self.mode < utils.MODE_ADVANCED and not body and self.package not in \ + if self.mode < utils.MODE.ADVANCED and not body and self.package not in \ list(debbugs.SYSTEMS[self.system].get('specials', {}).keys()): body = utils.NEWBIELINE + '\n\n' + body elif not body: @@ -213,9 +213,6 @@ return report - def __str__(self): - return self.__unicode__() - def __repr__(self): params = ['%s=%s' % (k, self.k) for k in dir(self)] return 'bugreport(%s)' % ', '.join(params) diff -Nru reportbug-12.0.0ubuntu1/reportbug/checkbuildd.py reportbug-13.0.1ubuntu1/reportbug/checkbuildd.py --- reportbug-12.0.0ubuntu1/reportbug/checkbuildd.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/checkbuildd.py 2024-02-29 17:19:31.000000000 +0000 @@ -3,7 +3,7 @@ # # Written by Chris Lawrence # (C) 2002-08 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # diff -Nru reportbug-12.0.0ubuntu1/reportbug/checkversions.py reportbug-13.0.1ubuntu1/reportbug/checkversions.py --- reportbug-12.0.0ubuntu1/reportbug/checkversions.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/checkversions.py 2024-02-29 17:19:31.000000000 +0000 @@ -3,7 +3,7 @@ # # Written by Chris Lawrence # (C) 2002-08 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # @@ -35,7 +35,7 @@ from debian import debian_support RMADISON_URL = 'https://qa.debian.org/madison.php?package=%s&text=on' -NEWQUEUE_URL = 'http://ftp-master.debian.org/new.822' +NEWQUEUE_URL = 'https://ftp-master.debian.org/new.822' def compare_versions(current, upstream): diff -Nru reportbug-12.0.0ubuntu1/reportbug/debbugs.py reportbug-13.0.1ubuntu1/reportbug/debbugs.py --- reportbug-12.0.0ubuntu1/reportbug/debbugs.py 2023-11-28 11:04:45.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/debbugs.py 2024-02-29 17:19:31.000000000 +0000 @@ -3,7 +3,7 @@ # # Written by Chris Lawrence # (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # @@ -205,10 +205,6 @@ 'www.debian.org': 'Problems with the WWW site' } -progenyother = { - 'debian-general': 'Any non-package-specific bug', -} - def check_package_info(package): """ @@ -1266,7 +1262,7 @@ 'debian': { 'name': 'Debian', 'email': '%s@bugs.debian.org', - 'btsroot': 'http://www.debian.org/Bugs/', + 'btsroot': 'https://www.debian.org/Bugs/', 'otherpkgs': debother, 'nonvirtual': ['linux-image', 'kernel-image'], 'specials': { @@ -1332,7 +1328,7 @@ } -def get_tags(severity='', mode=utils.MODE_NOVICE): +def get_tags(severity='', mode=utils.MODE.NOVICE): """ Return list of tags supported by the bug tracking system @@ -1357,9 +1353,9 @@ if severity in ('grave', 'critical', 'serious'): tags.update(CRITICAL_TAGS) - if mode > utils.MODE_STANDARD: + if mode > utils.MODE.STANDARD: tags.update(EXPERT_TAGS) - elif mode < utils.MODE_STANDARD and 'newcomer' in tags: + elif mode < utils.MODE.STANDARD and 'newcomer' in tags: # do not show the newcomer tag in novice mode del tags['newcomer'] diff -Nru reportbug-12.0.0ubuntu1/reportbug/exceptions.py reportbug-13.0.1ubuntu1/reportbug/exceptions.py --- reportbug-12.0.0ubuntu1/reportbug/exceptions.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/exceptions.py 2024-02-29 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ # Exceptions for reportbug # Written by Chris Lawrence # (C) 2002-04 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # diff -Nru reportbug-12.0.0ubuntu1/reportbug/hiermatch.py reportbug-13.0.1ubuntu1/reportbug/hiermatch.py --- reportbug-12.0.0ubuntu1/reportbug/hiermatch.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/hiermatch.py 2024-02-29 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ # hiermatch - Doing match on a list of string or a hierarchy. # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi import re from . import exceptions diff -Nru reportbug-12.0.0ubuntu1/reportbug/mailer.py reportbug-13.0.1ubuntu1/reportbug/mailer.py --- reportbug-12.0.0ubuntu1/reportbug/mailer.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/mailer.py 2024-02-29 17:19:31.000000000 +0000 @@ -2,8 +2,8 @@ # mailer module - Mail User Agent interface for reportbug # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi -# Copyright (C) 2020-2022 Nis Martensen +# Copyright (C) 2008-2023 Sandro Tosi +# Copyright (C) 2020-2023 Nis Martensen # # This program is freely distributable per the following license: # @@ -35,10 +35,11 @@ class Mua: - def __init__(self, command, needs_terminal=True): + def __init__(self, command, *, needs_terminal=True, name=""): self._command = command self.executable = command.split()[0] self.needs_terminal = needs_terminal + self.name = name or self.executable def _check_attachable(self, afile): return os.path.isfile(afile) and os.access(afile, os.R_OK) @@ -69,6 +70,7 @@ def __init__(self): self.executable = 'emacsclient' self.needs_terminal = True + self.name = "Gnus" def get_send_command(self, filename, attachments=[]): elisp = """(progn @@ -136,8 +138,8 @@ MUA = { 'mutt': Mutt('mutt -H'), 'neomutt': Mutt('neomutt -H'), - 'mh': Mua('/usr/bin/mh/comp -use -file'), - 'nmh': Mua('/usr/bin/mh/comp -use -file'), + 'mh': Mua('/usr/bin/mh/comp -use -file', name='mh'), + 'nmh': Mua('/usr/bin/mh/comp -use -file', name='nmh'), 'gnus': Gnus(), 'claws-mail': Mua('claws-mail --compose-from-file', needs_terminal=False), 'alpine': Mailto('alpine -url'), diff -Nru reportbug-12.0.0ubuntu1/reportbug/submit.py reportbug-13.0.1ubuntu1/reportbug/submit.py --- reportbug-12.0.0ubuntu1/reportbug/submit.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/submit.py 2024-02-29 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ # reportbug_submit module - email and GnuPG functions # Written by Chris Lawrence # Copyright (C) 1999-2006 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # @@ -176,9 +176,9 @@ try: fp = open(attachment) fp.close() - except EnvironmentError as x: + except EnvironmentError as ex: ewrite("Warning: opening '%s' failed: %s.\n", attachment, - x.strerror) + ex.strerror) failed = True continue ctype = None @@ -443,6 +443,12 @@ if smtphost: toaddrs = [x[1] for x in alist] + try: + smtphost, smtpport = smtphost.split(":") + smtpport = int(smtpport) + except ValueError: + smtpport = 0 + tryagain = True refused = None retry = 0 @@ -455,12 +461,12 @@ # submit if smtphost.lower() == 'reportbug.debian.org': conn = smtplib.SMTP(smtphost, 587) - elif smtphost.endswith(':465'): + elif smtpport == 465: # ignore smtptls setting since port 465 implies SSL smtptls = None - conn = smtplib.SMTP_SSL(smtphost) + conn = smtplib.SMTP_SSL(smtphost, 465) else: - conn = smtplib.SMTP(smtphost) + conn = smtplib.SMTP(smtphost, smtpport) response = conn.ehlo() if not (200 <= response[0] <= 299): conn.helo() @@ -477,9 +483,9 @@ conn.login(smtpuser, smtppasswd) refused = conn.sendmail(fromaddr, toaddrs, message) conn.quit() - except (socket.error, smtplib.SMTPException) as x: + except (socket.error, smtplib.SMTPException) as ex: # If wrong password, try again... - if isinstance(x, smtplib.SMTPAuthenticationError): + if isinstance(ex, smtplib.SMTPAuthenticationError): ewrite('SMTP error: authentication failed. Try again.\n') tryagain = True smtppasswd = None @@ -490,7 +496,7 @@ tryagain = False # In case of failure, ask to retry or to save & exit - if ui.yes_no(f'SMTP send failure: {x}. You can retry, or save the report and exit. Do you want to retry?', + if ui.yes_no(f'SMTP send failure: {ex}. You can retry, or save the report and exit. Do you want to retry?', 'Yes, please retry.', 'No, save and exit.'): tryagain = True diff -Nru reportbug-12.0.0ubuntu1/reportbug/tempfiles.py reportbug-13.0.1ubuntu1/reportbug/tempfiles.py --- reportbug-12.0.0ubuntu1/reportbug/tempfiles.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/tempfiles.py 2024-02-29 17:19:31.000000000 +0000 @@ -2,7 +2,7 @@ # tempfiles module - Temporary file handling for reportbug # Written by Chris Lawrence # (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # diff -Nru reportbug-12.0.0ubuntu1/reportbug/ui/__init__.py reportbug-13.0.1ubuntu1/reportbug/ui/__init__.py --- reportbug-12.0.0ubuntu1/reportbug/ui/__init__.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/ui/__init__.py 2024-02-29 17:19:31.000000000 +0000 @@ -3,7 +3,7 @@ # reportbug - Report a bug in the Debian distribution. # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # diff -Nru reportbug-12.0.0ubuntu1/reportbug/ui/text_ui.py reportbug-13.0.1ubuntu1/reportbug/ui/text_ui.py --- reportbug-12.0.0ubuntu1/reportbug/ui/text_ui.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/ui/text_ui.py 2024-02-29 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ # Text user interface for reportbug # Written by Chris Lawrence # (C) 2001-08 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # diff -Nru reportbug-12.0.0ubuntu1/reportbug/ui/urwid_ui.py reportbug-13.0.1ubuntu1/reportbug/ui/urwid_ui.py --- reportbug-12.0.0ubuntu1/reportbug/ui/urwid_ui.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/ui/urwid_ui.py 2024-02-29 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ # urwid user interface for reportbug # Written by Chris Lawrence # (C) 2006-08 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # diff -Nru reportbug-12.0.0ubuntu1/reportbug/urlutils.py reportbug-13.0.1ubuntu1/reportbug/urlutils.py --- reportbug-12.0.0ubuntu1/reportbug/urlutils.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/urlutils.py 2024-02-29 17:19:31.000000000 +0000 @@ -3,7 +3,7 @@ # # Written by Chris Lawrence # (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # diff -Nru reportbug-12.0.0ubuntu1/reportbug/utils.py reportbug-13.0.1ubuntu1/reportbug/utils.py --- reportbug-12.0.0ubuntu1/reportbug/utils.py 2023-11-28 11:04:45.000000000 +0000 +++ reportbug-13.0.1ubuntu1/reportbug/utils.py 2024-02-29 17:19:31.000000000 +0000 @@ -2,7 +2,7 @@ # utils module - common functions for reportbug UIs # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2022 Sandro Tosi +# Copyright (C) 2008-2023 Sandro Tosi # # This program is freely distributable per the following license: # @@ -37,11 +37,12 @@ import shlex import email import email.policy +import enum import socket import subprocess -import apt import gzip +import apt from .urlutils import open_url from .mailer import MUA @@ -50,7 +51,7 @@ 'Justification', 'Followup-For', 'Owner', 'User', 'Usertags', 'Forwarded', 'Control', 'X-Debbugs-Cc') # These pseudo-headers can be repeated in the report -REPEATABLE_PSEUDOHEADERS = ['Control', ] +REPEATABLE_PSEUDOHEADERS = ['Control', 'User', 'Usertags'] MODES = {'novice': 'Offer simple prompts, bypassing technical questions.', 'standard': 'Offer more extensive prompts, including asking about ' @@ -61,12 +62,18 @@ 'expert': 'Bypass most handholding measures and preliminary triage ' 'routines. This mode should not be used by people unfamiliar with ' 'Debian\'s policies and operating procedures.'} -MODELIST = ['novice', 'standard', 'advanced', 'expert'] -for mode in MODELIST: - exec('MODE_%s=%d' % (mode.upper(), MODELIST.index(mode))) -del mode -# moved here since it needs the MODE_* vars to be defined + +class MODE(enum.IntEnum): + NOVICE = 0 + STANDARD = 1 + ADVANCED = 2 + EXPERT = 3 + + +MODELIST = [m.name.lower() for m in MODE] + +# moved here since it needs the MODE.* vars to be defined from . import debbugs # noqa: E402 from reportbug.ui import AVAILABLE_UIS # noqa: E402 @@ -573,7 +580,7 @@ return email.utils.formataddr((realname, emailaddr)) -statuscache = {} +statuscache: dict[str, tuple] = {} def get_package_status(package, avail=False): @@ -1337,7 +1344,7 @@ def generate_blank_report(package, pkgversion, severity, justification, depinfo, confinfo, foundfile='', incfiles='', system='debian', exinfo=None, type=None, klass='', - subject='', tags='', body='', mode=MODE_EXPERT, # noqa: F821 + subject='', tags='', body='', mode=MODE.EXPERT, # noqa: F821 pseudos=None, debsumsoutput=None, issource=False, options=None): """ @@ -1879,7 +1886,7 @@ Check the package name against Debian Policy Package names must comply with the policy requirements: - https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source + https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-source Returns ------- diff -Nru reportbug-12.0.0ubuntu1/share/debian-swirl.svg reportbug-13.0.1ubuntu1/share/debian-swirl.svg --- reportbug-12.0.0ubuntu1/share/debian-swirl.svg 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/share/debian-swirl.svg 2024-02-29 17:19:31.000000000 +0000 @@ -1,7 +1,7 @@ - + None: self.body = 'test' self.package = 'reportbug' self.report = bugreport(package=self.package, body=self.body) - self.text = self.report.__unicode__() + self.text = self.report.__str__() self.assertIn(self.body, self.text) self.assertIn(self.package, self.text) # verify that for special packages, we don't add the report template - def test_bts643785(self): + def test_bts643785(self) -> None: for package in list(debbugs.SYSTEMS['debian'].get('specials', {}).keys()): - self.report = bugreport(package=package, mode=utils.MODE_NOVICE) - self.text = self.report.__unicode__() + self.report = bugreport(package=package, mode=utils.MODE.NOVICE) + self.text = self.report.__str__() self.assertNotIn(utils.NEWBIELINE, self.text) @pytest.mark.network # marking the test as using network - def test_followup(self): + def test_followup(self) -> None: self.body = 'test' self.package = 'reportbug' self.tags = 'patch ftbfs' self.report = bugreport(package=self.package, body=self.body, followup=123456, tags=self.tags) - self.text = self.report.__unicode__() + self.text = self.report.__str__() self.assertIn('Followup-For: Bug #123456', self.text) self.assertIn(f'Control: tags -1 {self.tags}', self.text) @@ -44,7 +44,7 @@ bug = debianbts.get_status([123456])[0] self.report = bugreport(package=self.package, body=self.body, followup=bug) - self.text = self.report.__unicode__() + self.text = self.report.__str__() self.assertIn('Followup-For: Bug #123456', self.text) self.assertNotIn('Control: tags -1 ', self.text) diff -Nru reportbug-12.0.0ubuntu1/test/test_debbugs.py reportbug-13.0.1ubuntu1/test/test_debbugs.py --- reportbug-12.0.0ubuntu1/test/test_debbugs.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/test/test_debbugs.py 2024-02-29 17:19:31.000000000 +0000 @@ -34,7 +34,7 @@ class TestSpecials(unittest.TestCase): - def test_handle_debian_ftp(self): + def test_handle_debian_ftp(self) -> None: with self.assertRaises(SystemExit): debbugs.handle_debian_ftp('reportbug', '', MockUI(None), None, 60) self.assertIsNone(debbugs.handle_debian_ftp('reportbug', '', MockUI('other'), None, 60)) @@ -92,7 +92,7 @@ self.assertTrue(ret[4].endswith('"no change"\n')) self.assertFalse(ret[5]) - def test_handle_debian_release_britney(self): + def test_handle_debian_release_britney(self) -> None: ret = debbugs.handle_debian_release( 'reportbug', '', MockUI('britney', 'mysubject'), @@ -105,7 +105,7 @@ self.assertEqual(ret[4], '') self.assertTrue(ret[5]) - def test_handle_debian_release_transition(self): + def test_handle_debian_release_transition(self) -> None: ret = debbugs.handle_debian_release( 'reportbug', '', MockUI('transition', 'reportbug', 'oldname', 'newname'), @@ -125,7 +125,7 @@ self.assertTrue(ret[4].endswith('"oldname";\n\n')) self.assertFalse(ret[5]) - def test_handle_debian_release_unblock(self): + def test_handle_debian_release_unblock(self) -> None: ret = debbugs.handle_debian_release( 'reportbug', '', MockUI('unblock', 'reportbug', 'y'), @@ -143,7 +143,7 @@ self.assertTrue(ret[4].startswith('Please unblock package reportbug\n\n')) self.assertFalse(ret[5]) - def test_handle_debian_release_rm(self): + def test_handle_debian_release_rm(self) -> None: ret = debbugs.handle_debian_release( 'reportbug', '', MockUI('rm', 'reportbug', 'y', 'n', 'y'), @@ -167,7 +167,7 @@ None, 60 ) - def test_handle_debian_release_pu(self): + def test_handle_debian_release_pu(self) -> None: ret = debbugs.handle_debian_release( 'reportbug', '', MockUI('oldstable-pu', 'reportbug'), @@ -186,7 +186,7 @@ self.assertTrue(ret[4].startswith('(Please provide enough information')) self.assertFalse(ret[5]) - def test_handle_wnpp(self): + def test_handle_wnpp(self) -> None: with self.assertRaises(SystemExit): debbugs.handle_wnpp('reportbug', '', MockUI(None), None, 60) @@ -230,7 +230,7 @@ self.assertTrue(ret[4].startswith('(Please provide')) self.assertTrue(ret[5]) - def test_handle_upgrade_report(self): + def test_handle_upgrade_report(self) -> None: ret = debbugs.handle_upgrade_report('reportbug', '', MockUI(), None, 60) self.assertEqual(ret[0], "") self.assertEqual(ret[1], "") @@ -241,82 +241,82 @@ class TestDebianbts(unittest.TestCase): - def test_get_tags(self): + def test_get_tags(self) -> None: # for each severity, for each mode - self.assertCountEqual(list(debbugs.get_tags('critical', utils.MODE_NOVICE).keys()), + self.assertCountEqual(list(debbugs.get_tags('critical', utils.MODE.NOVICE).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'security', 'patch', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('grave', utils.MODE_NOVICE).keys()), + self.assertCountEqual(list(debbugs.get_tags('grave', utils.MODE.NOVICE).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'security', 'patch', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('serious', utils.MODE_NOVICE).keys()), + self.assertCountEqual(list(debbugs.get_tags('serious', utils.MODE.NOVICE).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'security', 'patch', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('important', utils.MODE_NOVICE).keys()), + self.assertCountEqual(list(debbugs.get_tags('important', utils.MODE.NOVICE).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('does-not-build', utils.MODE_NOVICE).keys()), + self.assertCountEqual(list(debbugs.get_tags('does-not-build', utils.MODE.NOVICE).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('normal', utils.MODE_NOVICE).keys()), + self.assertCountEqual(list(debbugs.get_tags('normal', utils.MODE.NOVICE).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('non-critical', utils.MODE_NOVICE).keys()), + self.assertCountEqual(list(debbugs.get_tags('non-critical', utils.MODE.NOVICE).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('minor', utils.MODE_NOVICE).keys()), + self.assertCountEqual(list(debbugs.get_tags('minor', utils.MODE.NOVICE).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('wishlist', utils.MODE_NOVICE).keys()), + self.assertCountEqual(list(debbugs.get_tags('wishlist', utils.MODE.NOVICE).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('critical', utils.MODE_STANDARD).keys()), + self.assertCountEqual(list(debbugs.get_tags('critical', utils.MODE.STANDARD).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'security', 'patch', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('grave', utils.MODE_STANDARD).keys()), + self.assertCountEqual(list(debbugs.get_tags('grave', utils.MODE.STANDARD).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'security', 'patch', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('serious', utils.MODE_STANDARD).keys()), + self.assertCountEqual(list(debbugs.get_tags('serious', utils.MODE.STANDARD).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'security', 'patch', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('important', utils.MODE_STANDARD).keys()), + self.assertCountEqual(list(debbugs.get_tags('important', utils.MODE.STANDARD).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('does-not-build', utils.MODE_STANDARD).keys()), + self.assertCountEqual(list(debbugs.get_tags('does-not-build', utils.MODE.STANDARD).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('normal', utils.MODE_STANDARD).keys()), + self.assertCountEqual(list(debbugs.get_tags('normal', utils.MODE.STANDARD).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('non-critical', utils.MODE_STANDARD).keys()), + self.assertCountEqual(list(debbugs.get_tags('non-critical', utils.MODE.STANDARD).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('minor', utils.MODE_STANDARD).keys()), + self.assertCountEqual(list(debbugs.get_tags('minor', utils.MODE.STANDARD).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('wishlist', utils.MODE_STANDARD).keys()), + self.assertCountEqual(list(debbugs.get_tags('wishlist', utils.MODE.STANDARD).keys()), ['a11y', 'lfs', 'l10n', 'd-i', 'upstream', 'ipv6', 'patch', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('critical', utils.MODE_ADVANCED).keys()), + self.assertCountEqual(list(debbugs.get_tags('critical', utils.MODE.ADVANCED).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('grave', utils.MODE_ADVANCED).keys()), + self.assertCountEqual(list(debbugs.get_tags('grave', utils.MODE.ADVANCED).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('serious', utils.MODE_ADVANCED).keys()), + self.assertCountEqual(list(debbugs.get_tags('serious', utils.MODE.ADVANCED).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('important', utils.MODE_ADVANCED).keys()), + self.assertCountEqual(list(debbugs.get_tags('important', utils.MODE.ADVANCED).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('does-not-build', utils.MODE_ADVANCED).keys()), + self.assertCountEqual(list(debbugs.get_tags('does-not-build', utils.MODE.ADVANCED).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('normal', utils.MODE_ADVANCED).keys()), + self.assertCountEqual(list(debbugs.get_tags('normal', utils.MODE.ADVANCED).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('non-critical', utils.MODE_ADVANCED).keys()), + self.assertCountEqual(list(debbugs.get_tags('non-critical', utils.MODE.ADVANCED).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('minor', utils.MODE_ADVANCED).keys()), + self.assertCountEqual(list(debbugs.get_tags('minor', utils.MODE.ADVANCED).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('wishlist', utils.MODE_ADVANCED).keys()), + self.assertCountEqual(list(debbugs.get_tags('wishlist', utils.MODE.ADVANCED).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('critical', utils.MODE_EXPERT).keys()), + self.assertCountEqual(list(debbugs.get_tags('critical', utils.MODE.EXPERT).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('grave', utils.MODE_EXPERT).keys()), + self.assertCountEqual(list(debbugs.get_tags('grave', utils.MODE.EXPERT).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('serious', utils.MODE_EXPERT).keys()), + self.assertCountEqual(list(debbugs.get_tags('serious', utils.MODE.EXPERT).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('important', utils.MODE_EXPERT).keys()), + self.assertCountEqual(list(debbugs.get_tags('important', utils.MODE.EXPERT).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('does-not-build', utils.MODE_EXPERT).keys()), + self.assertCountEqual(list(debbugs.get_tags('does-not-build', utils.MODE.EXPERT).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('normal', utils.MODE_EXPERT).keys()), + self.assertCountEqual(list(debbugs.get_tags('normal', utils.MODE.EXPERT).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('non-critical', utils.MODE_EXPERT).keys()), + self.assertCountEqual(list(debbugs.get_tags('non-critical', utils.MODE.EXPERT).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('minor', utils.MODE_EXPERT).keys()), + self.assertCountEqual(list(debbugs.get_tags('minor', utils.MODE.EXPERT).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) - self.assertCountEqual(list(debbugs.get_tags('wishlist', utils.MODE_EXPERT).keys()), + self.assertCountEqual(list(debbugs.get_tags('wishlist', utils.MODE.EXPERT).keys()), ['a11y', 'l10n', 'd-i', 'ipv6', 'patch', 'lfs', 'upstream', 'security', 'newcomer', 'ftbfs']) diff -Nru reportbug-12.0.0ubuntu1/test/test_mailer.py reportbug-13.0.1ubuntu1/test/test_mailer.py --- reportbug-12.0.0ubuntu1/test/test_mailer.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/test/test_mailer.py 2024-02-29 17:19:31.000000000 +0000 @@ -24,6 +24,10 @@ self.assertTrue(mailer.mua_exists(mailer.MUA[mua])) self.assertTrue(mailer.mua_exists(mua)) + def test_mua_name(self): + for mua in mailer.MUA.values(): + self.assertTrue(mua.name != "") + message = textwrap.dedent(r""" Content-Type: text/plain; charset="utf-8" diff -Nru reportbug-12.0.0ubuntu1/test/test_utils.py reportbug-13.0.1ubuntu1/test/test_utils.py --- reportbug-12.0.0ubuntu1/test/test_utils.py 2023-11-28 11:02:33.000000000 +0000 +++ reportbug-13.0.1ubuntu1/test/test_utils.py 2024-02-29 17:19:31.000000000 +0000 @@ -444,6 +444,7 @@ message = """Subject: unblock: reportbug/4.12.6 Package: release.debian.org +Usertags: duplicate User: release.debian.org@packages.debian.org Usertags: unblock random text between pseudoheader lines @@ -452,6 +453,7 @@ Severity: normal Morph: cool Control: testcontrol1 +User: ftp.debian.org@packages.debian.org source: reportbug Control: testcontrol2 Continuation: @@ -521,11 +523,13 @@ 'Source: reportbug', 'Severity: normal', 'Justification: line with too long content', - 'User: release.debian.org@packages.debian.org', - 'Usertags: unblock', 'X-Debbugs-Cc: debian-reportbug@lists.debian.org, root@localhost', 'Morph: cool', + 'Usertags: duplicate', + 'User: release.debian.org@packages.debian.org', + 'Usertags: unblock', 'Control: testcontrol1', + 'User: ftp.debian.org@packages.debian.org', 'Control: testcontrol2', ] cleanmessage = """some text before further head-like line