GNU bug report logs -
#70815
[PATCH] ; Enahnce python-tests.el to adapt different python interpreters
Previous Next
Reported by: Lin Sun <sunlin7.mail <at> gmail.com>
Date: Tue, 7 May 2024 06:54:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #109 received at 70815 <at> debbugs.gnu.org (full text, mbox):
Mattias EngdegÄrd wrote:
>
> 27 maj 2024 kl. 14.33 skrev kobarity <kobarity <at> gmail.com>:
>
> > We probably have found the bug with Python 2 on Mac, unless
> > there is a bug on the ERTs.
>
> It could just be a mismatch of expectations. With python-shell-interpreter set to "python2", tab-completion in the Python interactive shell works but in a diminished capacity. For example, 'pri<TAB>' completes to 'print' but 'math.sq<TAB>' does not complete to 'math.sqrt(' as it does in Python 3.
I think it is a "bug". Because it is working with Python 2 on Linux
(with native and non-native completions), and I believe many would
expect it to work.
In any case, to accommodate the ERTs for such differences, a mechanism
to skip an ERT based on the interpreter version (or some other
property) is needed.
> > Changing the order of the interpreters to find or skipping
> > some ERTs does not solve the problem.
>
> But it does fix a different problem: it tests python-mode with Python 3, which is more important.
As I mentioned before, I am not opposed to prioritize "python3". I
don't think anyone is arguing that "python" should precede "python3"
anymore.
> > However, it seems that only a
> > limited number of people can pursue the problem on Mac, and fewer
> > people will have trouble with Python 2 issues. So for now, I think it
> > is better to skip these ERTs for Python 2 on Mac only.
>
> We can probably agree that absent explicit information about what version the user wants tested, we should test python-mode with Python 3 on macOS and other platforms.
>
> If you think it is important we can also test it with Python 2 if available. Rejigging the tests to run for multiple Python versions is certainly possible but would be some work.
>
> Meanwhile I'm just going to make the tests use the same logic as python.el for selecting the binary to use, as there does not seem to be a reason why this would make anything worse.
>
You have an option to set EMACS_PYTHON_INTERPRETER environment
variable to "python3", just for now.
This bug report was last modified 1 year and 40 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.