[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Issue tracker housecleaning: SVN-1722

From: Yasuhito FUTATSUKI <futatuki_at_poem.co.jp>
Date: Fri, 1 Nov 2019 17:58:03 +0900

On 2019/11/01 14:23, Nathan Hartman wrote:
> On Fri, Oct 18, 2019 at 9:22 AM Branko Čibej <brane_at_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.

I saw them in build tree, however they were not our code but the code
generated by SWIG (< 4.0) for swig Python bindings.
  
> '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?

In this case, if you can rewrite it with importlib.import_module()
for Python 2.7 and Python 3.1, perhaps it will also work with
Python 3.2 and later.

However, it seems there is more general question, "What versions
do we support on Python 3?"

It seems we don't promise to support any version of Python 3 yet.
So I think we can restrict version to support for Python 3,
comparatively safely.

Python 3.4 had reached end of life[1]. And developers might not
have test environment with older Python 3.

[1] Python 3.4.10
https://www.python.org/downloads/release/python-3410/

Actually, the code I wrote for Python 3 may not work with Python 3.5
and prior, because I tested with Python 3.6 and Python 3.7 only,
although I intend to care backward comatibility (and perhaps
sometimes I ignore compatibility with Python 3.3 and prior,
but I don't remember, sorry).

Anyway, I think if we can't test with older version of Python 3,
we can't support it (as just same I said for SWIG).

Cheers,

-- 
Yasuhito FUTATSUKI <futatuki_at_yf.bsdclub.org>/<futatuki_at_poem.co.jp>
Received on 2019-11-01 09:58:34 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.