On Sunday, 11 July 2021 17.11.28 WEST Pavel Sanda wrote:
> Hi,
> 
> this is what I see after make install:
> 
>  DeprecationWarning: the imp module is deprecated in favour of importlib;
> see the module's documentation for alternative uses
> 
> Perhaps some pythonst should check...
> 
> Pavel
> 
> log:
> make[2]: Entering directory '/tmp/lyx-2.4.0dev/lib/lyx2lyx'
> make[2]: Nothing to be done for 'install-exec-am'.
>  /usr/bin/mkdir -p '/tmp/gugi/share/lyx/lyx2lyx'
>  /usr/bin/install -c -m 644 lyx2lyx lyx2lyx_version.py lyx2lyx_lang.py
> generate_encoding_info.py parser_tools.py lyx2lyx_tools.py
> unicode_symbols.py LyX.py lyx_0_06.py lyx_0_08.py lyx_0_10.py lyx_0_12.py
> lyx_1_0.py lyx_1_1.py lyx_1_1_5.py lyx_1_1_6_0.py lyx_1_1_6_3.py lyx_1_2.py
> lyx_1_3.py lyx_1_4.py lyx_1_5.py lyx_1_6.py lyx_2_0.py lyx_2_1.py
> lyx_2_2.py lyx_2_3.py lyx_2_4.py profiling.py test_parser_tools.py
> '/tmp/gugi/share/lyx/lyx2lyx' -c:2: DeprecationWarning: the imp module is
> deprecated in favour of importlib; see the module's documentation for
> alternative uses Byte-compiling python modules...
> lyx2lyx_version.pylyx2lyx_lang.pygenerate_encoding_info.pyparser_tools.pylyx
> 2lyx_tools.pyunicode_symbols.pyLyX.pylyx_0_06.pylyx_0_08.pylyx_0_10.pylyx_0_
> 12.pylyx_1_0.pylyx_1_1.pylyx_1_1_5.pylyx_1_1_6_0.pylyx_1_1_6_3.pylyx_1_2.pyl
> yx_1_3.pylyx_1_4.pylyx_1_5.pylyx_1_6.pylyx_2_0.pylyx_2_1.pylyx_2_2.pylyx_2_3
> .pylyx_2_4.pyprofiling.pytest_parser_tools.py Byte-compiling python modules
> (optimized versions) ...
> lyx2lyx_version.pylyx2lyx_lang.pygenerate_encoding_info.pyparser_tools.pylyx
> 2lyx_tools.pyunicode_symbols.pyLyX.pylyx_0_06.pylyx_0_08.pylyx_0_10.pylyx_0_
> 12.pylyx_1_0.pylyx_1_1.pylyx_1_1_5.pylyx_1_1_6_0.pylyx_1_1_6_3.pylyx_1_2.pyl
> yx_1_3.pylyx_1_4.pylyx_1_5.pylyx_1_6.pylyx_2_0.pylyx_2_1.pylyx_2_2.pylyx_2_3
> .pylyx_2_4.pyprofiling.pytest_parser_tools.py

Thank you Pavel.

This is related with out use of __import__:
https://docs.python.org/3/library/functions.html#__import__

The alternative is to use
https://docs.python.org/3/library/importlib.html#importlib.import_module

I will do it for the next development cycle when we drop python 2 support. 
importlib was introduced in Python 3.1.

It is not that it can be done now, the issue is that we need to ensure that 
this works correctly in Python 2. Honestly I suspect that the task is simple 
but since this is a deprecation warning I will ignore it for this cycle.

Best regards,
-- 
José Abílio
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to