On 2023/10/05 5:28, Nathan Hartman wrote:
On Wed, Oct 4, 2023 at 10:59 AM Yasuhito FUTATSUKI <futat...@yf.bsdclub.org>
wrote:

Nothing but I don't want that we actively drop Python 2 support,
at least SWIG Python bindings even in trunk, at least now.


I agree we shouldn't break Python 2 support if it's currently working. At
least, let's delay breaking it until 1.14.x is EOL, to avoid breakage on
very long term support OS. (I think that if we start removing Py2 compat on
trunk now, we risk mistakenly backporting the changes to 1.14.x at some
later time.)

More over, I know and perhaps we all know one large site that is still using
Python 2 bindings through ViewVC 1.1.x, although I don't know what version
of Subversion it uses.

However, I see the point that it would be nice to make the code clear and
not require us to remember that OSError needs to change to
FileNotFoundError in the future.

We could add a Python2 check and handle it differently. In the future when
we decide to actively remove Python2 support, we can grep for all the
Python2 checks and remove that code. I know it makes the code long-winded.
:-/

Or just note it in a comment, then it does not need extra cost in execution.

Clean up of Python2 support code is like a conversion from pure Python 2 code
to Python 2/Python 3 dual support code, especially in SWIG Python bindings,
because it uses py3c, Python C API wrapper to absorb difference between for
Python 2 and for Python 3. To remove py3c dependency, we should use native
Python 3 C APIs. Anyways it need a whole code review, not just grep the
markers, although the markers will help us greatly.

Cheers,
--
Yasuhito FUTATSUKI <futat...@yf.bsdclub.org>

Reply via email to