Use of deprecated 'imp' module
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apport |
Fix Released
|
Medium
|
Unassigned | ||
apport (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Jammy |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Impact
------
The deprecation warning is just a warning, but it clutters the output and can lead to misattributions in case something does not work as expected.
Test Case
---------
1. apt install apport
2. Execute following command:
python3 -Wonce -c "import apport.report"
3. There should be no output.
Where problems could occur
-------
Except for changes to the test cases, _check_interpreted is the only consumer for the changed code. Breakage in this code paths can lead to wrongly assume that the crashing Python code is an interpreted script or not. This can lead to reports that have only ExecutablePath set (and not InterpreterPath).
Original Description
-------
Code using apport/report.py will see the following warning:
$ python3 -Wonce -c "import apport.report"
/usr/lib/
/usr/
import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat
The 'imp' module is slated for removal in Python 3.12.
https:/
Changed in apport: | |
milestone: | none → 2.22.0 |
status: | New → Triaged |
importance: | Undecided → Medium |
description: | updated |
Changed in apport: | |
status: | Fix Committed → Fix Released |
description: | updated |
description: | updated |
description: | updated |
Changed in apport (Ubuntu): | |
importance: | Undecided → Medium |
Changed in apport (Ubuntu Jammy): | |
importance: | Undecided → Medium |
Fixed: https:/ /github. com/canonical/ apport/ commit/ 44d1c43231d70c2 da9e51f3bd96ce8 151902b354