Bug#927086: marked as done (elpa-elpy: Please enable Python 2 support)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bug#927086: marked as done (elpa-elpy: Please enable Python 2 support)

Debian Bug Tracking System
Your message dated Sun, 11 Aug 2019 21:20:10 -0400
with message-id <[hidden email]>
and subject line Re: elpa-elpy: Please enable Python 2 support
has caused the Debian Bug report #927086,
regarding elpa-elpy: Please enable Python 2 support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [hidden email]
immediately.)


--
927086: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=927086
Debian Bug Tracking System
Contact [hidden email] with problems

Package: elpa-elpy
Version: 1.28.0-1
Severity: normal

Dear Maintainer,

I've been struggling with getting elpy to work on Debian stable.

For right now, some comments and suggestions about README.Debian.

1) There's a typo in your code:

    (setq python-shell-interpreter "python"
              python-shell-interpreter-args "-i")
              elpy-rpc-python-command "python")

It should be:

    (setq python-shell-interpreter "python"
              python-shell-interpreter-args "-i"
              elpy-rpc-python-command "python")

2) You should mention that elpy isn't loaded by default, and indicate
how to load it. Historically, Debian packages autoload modes once
installed, and personally I find that more convenient. But I
understand if you don't load it to preserce compatibility with
upstream EPLA.

The elpy manual mentions in
https://elpy.readthedocs.io/en/latest/introduction.html that elpy
should be enabled with

    (package-initialize)
    (elpy-enable)

Just the second line works for me here. I'm not sure what the first
part does. Some sort of global enable, apparently.

3) I suggest mentioning the upstream manual in README.Debian. Namely,
https://elpy.readthedocs.io/en/latest/

4) And if I were writing the README.Debian, I'd also mention that C-c
C-c runs the buffer, and that you need C-c C-z to open up a Python
interpreter buffer. This would help people to get going quickly,
instead of flailing around trying to figure out what to do.

These commands are both in
https://elpy.readthedocs.io/en/latest/ide.html

    C-c C-y r (elpy-shell-send-region-or-buffer)
    [...]
    Also bound to C-c C-c.

and

    C-c C-z (elpy-shell-switch-to-shell)

There are a ton of commands in that manual, and it's really
confusing. But you really only need a couple to get going. That manual
really needs a quickstart page.

Do you happen to know if it is possible to configure emacs to open a
Python buffer in elpy mode by default and skip the C-c C-z?

5) I'm also running into the error message mentioned in
https://github.com/jorgenschaefer/elpy/issues/1521

Should I report it here? Or just upstream? I added a comment to that
thread.

6) Your bug report template should include the output of
elpy-config. I've included mine at the bottom. I'm not sure what is going on with

    Elpy..............: Not found (Python), 1.28.0 (Emacs Lisp)

though. What's the difference between those two cases?

7) I suggest adding Python 2 packages to the package
dependencies/recommends/suggests too. Like for Jedi. People are still
using Python 2, and are likely to be doing so for awhile.

Regards, Faheem Mitha

-- System Information:
Debian Release: 9.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (50, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-8-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages elpa-elpy depends on:
ii  elpa-company                0.9.9-2
ii  elpa-find-file-in-project   5.7.3-1
ii  elpa-highlight-indentation  0.7.0-1
ii  elpa-pyvenv                 1.20-1
ii  elpa-s                      1.12.0-2
ii  elpa-yasnippet              0.11.0-2
ii  emacsen-common              2.0.8
ii  flake8                      3.2.1-1
ii  python3                     3.5.3-1
ii  python3-flake8              3.2.1-1

Versions of packages elpa-elpy recommends:
ii  emacs         46.1
ii  python3-jedi  0.10.0~git1+f05c071-1

Versions of packages elpa-elpy suggests:
pn  black                    <none>
ii  python3-autopep8         1.4.3-1
ii  python3-jupyter-console  5.0.0-1
ii  python3-pip              9.0.1-2
pn  yapf3                    <none>

-- debconf-show failed

############################################
Output of M-x elpy-config
############################################
Elpy Configuration

Virtualenv........: None
RPC Python........: 2.7.13 (/usr/bin/python)
Interactive Python: python (/usr/bin/python)
Emacs.............: 25.1.1
Elpy..............: Not found (Python), 1.28.0 (Emacs Lisp)
Jedi..............: 0.12.0
Rope..............: 0.10.3
Autopep8..........: 0.9.1
Yapf..............: Not found
Black.............: Not found
Syntax checker....: flake8 (/usr/bin/flake8)

You have not activated a virtual env. While Elpy supports this, it is
often a good idea to work inside a virtual env. You can use M-x
pyvenv-activate or M-x pyvenv-workon to activate a virtual env.

The directory ~/.local/bin/ is not in your PATH. As there is no active
virtualenv, installing Python packages locally will place executables
in that directory, so Emacs won't find them. If you are missing some
commands, do add this directory to your PATH -- and then do
`elpy-rpc-restart'.

The Python interpreter could not find the elpy module. Make sure the
module is installed.

[run] easy_install --user elpy

The yapf package is not available. Commands using this will not work.

[run] easy_install --user yapf

The black package is not available. Commands using this will not work.

[run] easy_install --user black

Options

Square brackets indicate buttons; type RET or click mouse-1 on a
button to invoke its action.  Invoke [+] to expand a group, and [-] to
collapse an expanded group.  Invoke the [Group], [Face], and [Option]
buttons below to edit that item in another window.

[+]-- [Group] Elpy
[+]-- [Group] Python
[+]-- [Group] Virtual Environments (Pyvenv)
[+]-- [Group] Completion (Company)
[+]-- [Group] Call Signatures (ElDoc)
[+]-- [Group] Inline Errors (Flymake)
[+]-- [Group] Snippets (YASnippet)
[+]-- [Group] Directory Grep (rgrep)
[+]-- [Group] Search as You Type (ido)
[+]-- [Group] Django extension
[+]-- [Group] Autodoc extension

Hi Faheem,

Removal of Python 2 modules and applications is underway unstable/sid
and testing/bullseye (Debian 11):
  https://wiki.debian.org/Python/2Removal
  https://www.mail-archive.com/debian-python@.../msg16709.html

So I believe that now is the appropriate time to close this bug as
"wontfix".  If necessary, see links above for why.

Sincerely,
Nicholas