GNU bug report logs - #25025
python-shell-calculate-command is wrong

Previous Next

Package: emacs;

Reported by: Fabrice Popineau <fabrice.popineau <at> gmail.com>

Date: Fri, 25 Nov 2016 06:26:01 UTC

Severity: normal

Tags: confirmed, fixed

Merged with 20744

Found in version 25.1

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #114 received at 25025 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Clément Pit--Claudel <clement.pit <at> gmail.com>
Cc: 25025 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#25025: python-shell-calculate-command is wrong
Date: Wed, 16 Aug 2017 07:08:55 -0400
[Message part 1 (text/plain, inline)]
npostavs <at> users.sourceforge.net writes:

> Okay, it looks like the consensus is that we should apply the
> `combine-and-quote-strings' fix for now, and possibly in future switch
> to something more shell based.
>
> I've pushed it to master as 8f611e5e2309 "Fix bad quoting of
> python-shell-interpreter", and I'm closing this bug.

This broke the test python-shell-calculate-command-1 on Windows.  We
could update the test to match the new python-shell-calculate-command
implementation, but since the test body is basically just a copy of that
function, it looks pretty useless to me.  I think we should just remove
that test.

[0001-Remove-python-shell-calculate-command-1-test.patch (text/x-diff, inline)]
From 1173da346a388a7258a8b462ef5a5d9416781245 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Wed, 16 Aug 2017 07:06:38 -0400
Subject: [PATCH] ; Remove python-shell-calculate-command-1 test

* test/lisp/progmodes/python-tests.el
(python-shell-calculate-pythonpath-1): Remove, it merely reprises the
body of `python-shell-calculate-command' and it has been broken on w32
since the fix for Bug#25025 was applied.
---
 test/lisp/progmodes/python-tests.el | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index 8795da4ef4..1a8c6a4e8c 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -2546,20 +2546,6 @@ python-tests-shell-interpreter
    (should (string= (python-shell-internal-get-process-name)
                     (format "%s[%s]" python-shell-internal-buffer-name (buffer-name))))))
 
-(ert-deftest python-shell-calculate-command-1 ()
-  "Check the command to execute is calculated correctly.
-Using `python-shell-interpreter' and
-`python-shell-interpreter-args'."
-  (skip-unless (executable-find python-tests-shell-interpreter))
-  (let ((python-shell-interpreter (executable-find
-                                   python-tests-shell-interpreter))
-        (python-shell-interpreter-args "-B"))
-    (should (string=
-             (format "%s %s"
-                     (shell-quote-argument python-shell-interpreter)
-                     python-shell-interpreter-args)
-             (python-shell-calculate-command)))))
-
 (ert-deftest python-shell-calculate-pythonpath-1 ()
   "Test PYTHONPATH calculation."
   (let ((process-environment '("PYTHONPATH=/path0"))
-- 
2.14.1


This bug report was last modified 7 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.