sugarlabs / sugar

Sugar GTK shell
GNU General Public License v3.0
253 stars 241 forks source link

DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses #873

Closed quozl closed 4 years ago

quozl commented 4 years ago

Warning appears during "make install".

manangoel99 commented 4 years ago

Can I work on this issue?

aperezbios commented 4 years ago

Please don't ask if you can work on it, or anything else related to Sugar; just do the work, and submit a pull request :)

chimosky commented 4 years ago

I can't find a use of imp in any file, but they're uses of importlib.

quozl commented 4 years ago

Related to https://github.com/sugarlabs/sugar-datastore/issues/19.

A good example of the warnings is in sugar-live-build:/usr/src/*.log, where the context shows;

Making install in controlpanel
make[3]: Entering directory '/usr/src/sugar/src/jarabe/controlpanel'
make[4]: Entering directory '/usr/src/sugar/src/jarabe/controlpanel'
make[4]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/usr/lib/python3.7/site-packages/jarabe/controlpanel'
 /bin/install -c -m 644 __init__.py cmd.py gui.py inlinealert.py sectionview.py toolbar.py '/usr/lib/python3.7/site-packages/jarabe/controlpanel'
Byte-compiling python modules...
__init__.pycmd.pygui.pyinlinealert.pysectionview.pytoolbar.py
-c:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
Byte-compiling python modules (optimized versions) ...
__init__.pycmd.pygui.pyinlinealert.pysectionview.pytoolbar.py
make[4]: Leaving directory '/usr/src/sugar/src/jarabe/controlpanel'
make[3]: Leaving directory '/usr/src/sugar/src/jarabe/controlpanel'

/usr/src/sugar/py-compile is generated by Autoconf, and contains;

$PYTHON -c "
import sys, os, py_compile, imp

Cause of the message is within Autoconf, not Sugar. Closing.