On Fri, Oct 18, 2019 at 9:22 AM Branko Čibej <br...@apache.org> wrote:

> Running the build scripts and tests with Python3 works now on trunk,
> with the latest fixes. Except for this warning:
>
> .../run_tests.py:53: DeprecationWarning: the imp module is deprecated in
> favour of importlib; see the module's documentation for alternative uses
>   import optparse, subprocess, imp, threading, traceback
>
>
> I know we make 'imp' vs. 'importlib' choices elsewhere in the code, we
> probably just missed a case here.
>

Where?

I searched but did not find any other 'imp' vs 'importlib' choices in
any of the *.py files, neither on trunk nor on the branch swig-py3,
except for the instance you note above in run_tests.py.

'imp' is only used in TestHarness._run_py_test to call
imp.load_module. In that function, there is one version of the call
for Py < 3.0, another for Py >= 3.0.

But imp was deprecated in Py 3.4, not 3.0, and imp.PY_SOURCE was
deprecated in 3.3, so there are too many different versions at play
here.

Suggestions?

Reply via email to