[Bug 1947425] Re: Use of deprecated 'imp' module

Benjamin Drung 1947425 at bugs.launchpad.net
Mon Jun 27 19:49:28 UTC 2022


Since the SRU for jammy included several fixes, I put my comment in this
bug report only.

For the SRU I cherry-picked the important fixes from apport 2.21.0 and
2.22.0 to jammy. You can see the individual commits in
https://git.launchpad.net/~ubuntu-core-
dev/ubuntu/+source/apport/log/?h=ubuntu/jammy

I had to cherry-pick several fixes for the test suite so that the test
suite runs successfully during package build with sbuild and the QEMU
autopkgtest runner (and not only the in the autopkgtest setup on
Launchpad).

Attached a full debdiff and a debdiff which excludes the changes to the
test directory.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1947425

Title:
  Use of deprecated 'imp' module

Status in Apport:
  Fix Released
Status in apport package in Ubuntu:
  Fix Released
Status in apport source package in Jammy:
  New

Bug description:
  Test Case
  ---------

  1. Execute following command:
  python3 -Wonce -c "import apport.report"
  2. There should be no output.

  Original Description
  --------------------

  Code using apport/report.py will see the following warning:

  $ python3 -Wonce -c "import apport.report"
  /usr/lib/python3/dist-packages/apport/report.py:13
    /usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
      import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat

  The 'imp' module is slated for removal in Python 3.12.
  https://github.com/python/cpython/blob/main/Lib/imp.py#L31

To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/1947425/+subscriptions




More information about the foundations-bugs mailing list