bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70815: [PATCH] ; Enahnce python-tests.el to adapt different python i


From: Lin Sun
Subject: bug#70815: [PATCH] ; Enahnce python-tests.el to adapt different python interpreters
Date: Mon, 20 May 2024 17:51:23 +0000

On Mon, May 20, 2024 at 3:53 PM kobarity <kobarity@gmail.com> wrote:
> Eli Zaretskii wrote:
> > > Cc: kobarity <kobarity@gmail.com>
> > > From: Stefan Kangas <stefankangas@gmail.com>
> > > Date: Sat, 18 May 2024 22:20:44 +0000
> > >
> > > It makes sense to look for "python3", but is it really useful to look
> > > for "python2" at this point?
> > I don't think we want to drop Python 2.x support, not yet.
>
> I don't want to drop Python 2 support either, but I don't think the
> addition of the "python2" command is mandatory.  As the current master
> does not run the "python2" command either.  However, I don't think it
> is a bad idea to add the "python2" command.
>
> Lin Sun wrote:
> > Hi,
> > I attached the latest patch, hope it resolved all your concerns.
>
> Hi Lin,
> There is still a typo "Enahnce" in the summary line, and there is a
> typo in the docstring of `python-tests-get-shell-interpreter' as well.
>
> > > If there is only python2 in the PATH and no python or python3, some tests 
> > > will fail.
> > It's caused by the python.el didn't search "python2", so it may need
> > another patch to change python.el.
>
> I don't think so.  Attached is a diff to your patch to resolve this
> issue.  It let-binds `python-shell-interpreter' in some ERTs.  It
> also includes the fix of the typo in the docstring of
> `python-tests-get-shell-interpreter'.
>
> Without these modifications, EMACS_PYTHON_INTERPRETER will not work as
> expected either on those ERTs.
>
> As for EMACS_PYTHON_INTERPRETER, I am a little doubtful that it is the
> right thing to introduce.  It allows the ERT runner to specify the
> interpreter.  It's OK for ERTs that can be run on both Python 2 and 3,
> but you may want to write an ERT that can only be run on Python 3.

Thank you for the comments, now get your points and agree with you.
I merged your patch together, also corrected the typo in the commit message.
Please help review the attached patch. Thank you !

Attachment: 0001-Enhance-python-tests.el-to-adapt-different-python-in.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]