You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Nathan Hartman <ha...@gmail.com> on 2019/11/01 05:23:57 UTC
Re: Issue tracker housecleaning: SVN-1722
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?
Re: Issue tracker housecleaning: SVN-1722
Posted by Julian Foad <ju...@apache.org>.
Branko Čibej wrote:
> Yasuhito FUTATSUKI wrote:
>> However, it seems there is more general question, "What versions
>> do we support on Python 3?" [...]
>
> To be honest, I wouldn't care about any Python 3 older than 3.5 [...]
Let's move this to a new email thread. I'll open one. Subject: "What
versions of Python 3 do we support?"
- Julian
Re: Issue tracker housecleaning: SVN-1722
Posted by Branko Čibej <br...@apache.org>.
On 01.11.2019 09:58, Yasuhito FUTATSUKI wrote:
> On 2019/11/01 14:23, Nathan Hartman wrote:
>> 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.
>
> 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.
To be honest, I wouldn't care about any Python 3 older than 3.5. IMO it
took the 3.x series quite a while to mature from "wow, a new major
version!" to "a better scripting language". 3.5 or thereabouts was the
turning point.
-- Brane
Re: Issue tracker housecleaning: SVN-1722
Posted by Yasuhito FUTATSUKI <fu...@poem.co.jp>.
On 2019/11/01 14:23, Nathan Hartman wrote:
> 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.
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 <fu...@poem.co.jp>