Emacs Python Development Environment

Related tags

Editor Plugins elpy
Overview
https://github.com/jorgenschaefer/elpy/workflows/Tests/badge.svg?branch=master Documentation Status https://coveralls.io/repos/jorgenschaefer/elpy/badge.svg?branch=master

Elpy, the Emacs Python IDE

Elpy is an Emacs package to bring powerful Python editing to Emacs. It combines and configures a number of other packages, both written in Emacs Lisp as well as Python. Elpy is fully documented at Readthedocs.

Features

Installation

Elpy is available on Melpa, the most straightforward way to install it is to use use-package:

(use-package elpy
  :ensure t
  :init
  (elpy-enable))

For other installation alternatives, see the documentation.

Quickstart

Once installed, Elpy will automatically provide code completion, syntax error highlighting and code hinting (in the modeline) for python files. Elpy offers a lot of features, but the following keybindings should be enough to get started:

  • C-c C-c evaluates the current python script (or region if something is selected) in an interactive python shell. The python shell is automatically displayed aside of your script.
  • C-RET evaluates the current statement (current line plus the following nested lines).
  • C-c C-z switches between your script and the interactive shell.
  • C-c C-d displays documentation for the thing under cursor. The documentation will pop in a different buffer, that can be closed with q.

Please have a look at the documentation at Readthedocs if you want to know more about what Elpy can do.

External resources

Contact

For questions regarding Elpy, do not hesitate to open an issue on github or visit us on IRC, channel #emacs-elpy on irc.freenode.net.

If you would like to support this work, you can become a patreon: https://www.patreon.com/jorgenschaefer Please note that this is completely voluntary, and does not make you more important than others when it comes to issues, feature requests or anything. I appreciate donations, but do not feel compelled to spend money, and do not feel bad if you don't.

Comments
  • elpy-shell-send-region-or-buffer show strange letters ^G

    elpy-shell-send-region-or-buffer show strange letters ^G

    Summary

    I cannot use C-c C-c to send region to shell.

    Steps to reproduce

    test.py

    alist = [i for i in range(3)]
    numbers = [-1, -2, -3]
    
    1. elpy-shell-switch-to-shell
    2. python-shell-send-region it works as expected.
    3. elpy-shell-send-region-or-buffer shell pended as beblow:
    In [14]: alist = [i for i in range(3)]
        ...: numbers = [-1, -2, -3]
    ^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G
    
    

    My configuration

    OS

    macos 10.14.2

    Result of (elpy-config)

    Virtualenv........: None
    RPC Python........: 3.7.2 (/usr/local/bin/python3)
    Interactive Python: jupyter (/usr/local/bin/jupyter)
    Emacs.............: 26.1
    Elpy..............: 1.28.0
    Jedi..............: 0.13.3
    Rope..............: 0.12.0
    Autopep8..........: 1.4.3
    Yapf..............: 0.26.0
    Black.............: Not found (18.9b0 available)
    Syntax checker....: flake8 (/Users/urugang/Library/Python/3.7/bin/flake8)
    
    

    Elpy configuration in my init.el

    (use-package elpy
      :ensure t
      :config (setq python-shell-interpreter "python3")
    
      (put 'set-goal-column 'disabled nil)
      (elpy-enable)
      (setq elpy-rpc-ignored-buffer-size (* 1024 1024 1024))
    
    
      ;; interactive python
      (setq python-shell-interpreter-args "-i"
            elpy-rpc-python-command "python3")
    
      (setq python-shell-interpreter "jupyter"
            python-shell-interpreter-args "console --simple-prompt"
            python-shell-prompt-detect-failure-warning nil)
      (setq python-indent-guess-indent-offset t)
      (setq python-indent-guess-indent-offset-verbose nil)
      (add-to-list 'python-shell-completion-native-disabled-interpreters
                 "jupyter"))
    
    OSX-related 
    opened by urugang 61
  • fix a bug: elpy-find-file does not prune enough

    fix a bug: elpy-find-file does not prune enough

    (elpy-project-ignored-directories): extend the standard vc-directory-exclusion-list

    (elpy-ffip-prune-patterns): extend ffip-prune-patterns using elpy-project-ignored-directories and completion-ignored-extensions

    (elpy-find-file): bind ffip-prune-patterns to elpy-ffip-prune-patterns

    Enhancement 
    opened by sam-s 60
  • 100% CPU Utilization

    100% CPU Utilization

    When I move around in the dir2pi() function in libpip2pi/commands.py of pip2pi, I reliably get 100% CPU utilization. Elpy 1.0 on Emacs 24.3.1 on OS X 10.7

    I set debug-on-quit and got the traceback below. It's gzipped, then base64-encoded. Sorry, but when I pasted the raw text in, Github Issues failed to save it—undoubtedly because of the 29,000-character lines. And there's no way to attach an arbitrary file.

    H4sICHSdslE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L18v46REBDzEqjVGWTDytt4s7cRuL2Xq9
    YF3u58952aaZtN9526znq2xYmdL5uHo7eneRj8W3zrth0RQYiDcciHI8HuY1ug9R
    rDdNHj5eIVAN+Y/dTC7GqlSpQ3WDRsx2waU8B3Z/tinm12XhX/z4zbf//s3vv7v5
    7fc/lac7/3yLVsniPFDsh1gZgNC73Czi1wJhFpXebBfSHjNt1zdVhwcn6OrtDA0T
    o32wgiT52NhiLEokIvh5KgaDOVriebBNFsOqo+pP36TpdinLiX4oFQ/9tMqmcwzX
    qbjdrjBeMSSmyewRES6VU/eu6ui8CD7VGYrgey568bOQMccd7iOYWCcK/hCyPEa6
    25/d835j0d9w9CynH4pWXq4xbtN4hXZAF5erArPDiESV5nexmFZ9PcW3aZyg1Gi6
    wuIxu1vP0kO7D9Uu/h0md/w8ZS9eqp/xz6/FIhX7tVX/fBf/i8hfgy+GWYOPX2Me
    cfwct+jyUVtJ9obFmG23gMeOVnKYDh+z5aKb/bGy5rO1FLQ575mH9HaLFJYPNCiW
    Ik59xJB9OOD6skaqM80eh/MUNr3ctF+KDFqwvz5brZGqYGLoK0gOx2pWeTL94+mL
    6fL2bip+83y5f+hfEfP2oN8893ejKc+rhskyS+K4d/CCh+ctggpfiPnDap3ENzKp
    TK/eJNu4eCzcLz8cqqMi94/hKiVXZIRuYLgA1DcCNDc0LGpSW3x+XuoFrXn5ea/s
    qK8s0gw889U2rj6Wi7JMtA6P3al6+iPLiGGKoZKljI2o/RAV7/RAQi/kvxKseEX6
    U06yys+4KLq4X/WRD7fa1r/YP+R4Y2H0plnaKzypxS737o3+7FX8VG40uUDmPfVW
    r967yrxZYvfx4Qathi1FTTffyH5Wn1HjIV1vk1msekAxhq/x/10b1DiAfeGjV/V1
    oZSuhLnf8EEbrOz15T0/BJpzTJrz6XkFPHxKsBXqnX81FY9JfH91ffYqvT77+lX6
    1evp19g1nItXoqfWudSJVWezxTrF/o0TLE9IuK1Cmt0hI/lKeJ+QkBT+xQ9/fvPj
    n99w1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8U9HOVq90b6OCPy8BY
    Pyiiyh1/wl10CYLQFkSqIPyTrv0TD2GSNdAa4qT76xLvqtcM+rnKNb9MICGufp1A
    qiCM00hC3ImrpZFUuZOWt4213UiQO9EuGkuVOzG+aiwhENqwoArCOE8iBEILSlR5
    o9qtbnONJcgbOapHqYI46ZcRJN4b1b5JOgqBNURw2nOB90ZaeiBVEKbpgYRAaL/b
    SBWE6U5ZQjz1EkQ/V0GY7n8kBEKNt1IFYRpvJcRTf02xn6sgzNMhCYLQWpAqiOaE
    vLobleae42mtR5UnLx+cMHSI99puFygQX0JOivES7+nvE6UK4rR5SLyn/pplG4SN
    HJz0u2MSD6H3VMCeqn1J2jguCYHQxjlVEMbjnBDPCdVwL1Wec9ovzkm8Z/TrntLa
    O/EXPiXec11tqlEFYRysCIHQGokqT/3lyy7+APHUV4f9XAVhsjeX5p6rHZxLFUTz
    y4a6O0IS5KnvCvu5CsI055EQCDXnkSrPbUk11dqOWauxtqxRBWFyCC/NPVdfMqiC
    MJ5KhHievmRQBWGaoksIhNYPVEEYjRKae56e41AFcdJvuEm855ncEZLWXv3J0TEI
    rb1x7WWGYxBaQ5y045d4T70/389VEMbDhBBvrL1tlCoI42FCCIQ2vahCMxu9L5b2
    nrod7+cqCNNTKgnx1O14P1d59b8e0JJGEeSNQy22UwVhHNsJgdBiO1XeuGWEKrNs
    LIdopC32VEGYvGCV5t5EjyZUQbBcrXWbcOhOZMrZbss1biJ7vt2W69fE29m29Ngk
    dChczbo0z/RJ2c8x3iQKmoD93AIiNPfPBSjf6rZXmQEr3642dZs/wiyG6NI9MPMp
    unSPz32bn+/b2m1D+g27+Q3HEHJxbu9K30FAhdBboaWpJcZ3nEZgP7eAaOzxev9Y
    x/z822Baq8xLn74js7YuVQ749T2B8eiSGD+/Ut1Y5ZClMZ8dPi9F+k63Xnb4RRHO
    uLEs9Q8Zs3Q1w16pxJhlGX9Cv/GbJ/L706ZAjFtn0lqwCQs2+YSC8Yso8iuapkAU
    LP+amKaC0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/7P/B4Nz2ogmWQEA
    
    Bug (high priority) Can't reproduce 
    opened by georgevreilly 56
  • elpy spawns non-finishing sub-processes

    elpy spawns non-finishing sub-processes

    Summary

    elpy spawns non-finishing sub-processes which after a while take all the RAM.

    amanol   27432 27296  0 22:36 ?        00:00:00 /usr/bin/python -W ignore -m elpy.__main__
    amanol   27435 27432  0 22:36 ?        00:00:00 /usr/bin/python /home/amanol/.local/lib/python2.7/site-packages/jedi/evaluate/compiled/subprocess/__main__.py /usr/lib/python2.7/site-packages 2.7.15
    amanol   27497 27432  0 22:37 ?        00:00:00 /usr/bin/python /home/amanol/.local/lib/python2.7/site-packages/jedi/evaluate/compiled/subprocess/__main__.py /usr/lib/python2.7/site-packages 2.7.15
    amanol   27501 27432  0 22:37 ?        00:00:00 /usr/bin/python /home/amanol/.local/lib/python2.7/site-packages/jedi/evaluate/compiled/subprocess/__main__.py /usr/lib/python2.7/site-packages 2.7.15
    amanol   27505 27432  0 22:37 ?        00:00:00 /usr/bin/python /home/amanol/.local/lib/python2.7/site-packages/jedi/evaluate/compiled/subprocess/__main__.py /usr/lib/python2.7/site-packages 2.7.15
    amanol   27509 27432  0 22:37 ?        00:00:00 /usr/bin/python /home/amanol/.local/lib/python2.7/site-packages/jedi/evaluate/compiled/subprocess/__main__.py /usr/lib/python2.7/site-packages 2.7.15
    amanol   27513 27432  0 22:37 ?        00:00:00 /usr/bin/python /home/amanol/.local/lib/python2.7/site-packages/jedi/evaluate/compiled/subprocess/__main__.py /usr/lib/python2.7/site-packages 2.7.15
    amanol   27517 27432  0 22:37 ?        00:00:00 /usr/bin/python /home/amanol/.local/lib/python2.7/site-packages/jedi/evaluate/compiled/subprocess/__main__.py /usr/lib/python2.7/site-packages 2.7.15
    
    gdb   27435
    GNU gdb (GDB) Fedora 8.1.1-3.fc28
    ....
    missing separate debuginfos, use: dnf debuginfo-install python2-2.7.15-3.fc28.x86_64
    (gdb) bt
    #0  0x00007fb0bce2de21 in read () from /lib64/libc.so.6
    #1  0x00007fb0bcdbf6e0 in __GI__IO_file_underflow () from /lib64/libc.so.6
    #2  0x00007fb0bcdbe768 in __GI__IO_file_xsgetn () from /lib64/libc.so.6
    #3  0x00007fb0bcdb38e7 in fread () from /lib64/libc.so.6
    #4  0x00007fb0adc29bd6 in read_file () from /usr/lib64/python2.7/lib-dynload/cPickle.so
    #5  0x00007fb0adc24a9e in load () from /usr/lib64/python2.7/lib-dynload/cPickle.so
    #6  0x00007fb0adc2b9e8 in cpm_load () from /usr/lib64/python2.7/lib-dynload/cPickle.so
    #7  0x00007fb0bdc2d8f3 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
    #8  0x00007fb0bdc2d25c in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
    #9  0x00007fb0bdc2d25c in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
    #10 0x00007fb0bdc2e9b2 in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
    #11 0x00007fb0bdc2ec4d in PyEval_EvalCode () from /lib64/libpython2.7.so.1.0
    #12 0x00007fb0bdc34bcf in run_mod () from /lib64/libpython2.7.so.1.0
    #13 0x00007fb0bdc34b80 in PyRun_FileExFlags () from /lib64/libpython2.7.so.1.0
    #14 0x00007fb0bdc3498c in PyRun_SimpleFileExFlags () from /lib64/libpython2.7.so.1.0
    #15 0x00007fb0bdc3a4c8 in Py_Main () from /lib64/libpython2.7.so.1.0
    #16 0x00007fb0bcd6611b in __libc_start_main () from /lib64/libc.so.6
    #17 0x0000556d0733484a in _start ()
    (gdb) 
    
    

    Steps to reproduce

    1. open a python file
    2. run M-x elpy-enable
    3. reload the file
    4. anything related with the code check spawns some python process

    My configuration

    OS

    fedora 28 64bit, emacs 26.1

    Result of (elpy-config)

    Elpy Configuration
    
    Virtualenv........: None
    RPC Python........: 2.7.15 (/usr/bin/python)
    Interactive Python: python (/usr/bin/python)
    Emacs.............: 26.1
    Elpy..............: 1.25.0
    Jedi..............: 0.13.1
    Rope..............: 0.11.0
    Autopep8..........: 1.4
    Yapf..............: 0.24.0
    Black.............: Not found
    Syntax checker....: flake8 (/home/amanol/.local/bin/flake8)
    
    

    Elpy configuration in my init.el

    Nothing, just run
    M-x elpy-enable
    
    
    opened by apmanol 46
  • Backend error

    Backend error

    When I open a python file and move the cursor in the buffer, a new pane appears with the following output:

    Error initializing Elpy
    
    There was an error when trying to start the backend. Elpy can not work
    until this problem is solved. The following lines were received from
    Python, and might help identifying the problem.
    
    Unhandled exception in thread started by 
    

    What can I do to find the root cause?

    Bug (high priority) 
    opened by spacecowboy 42
  • Add support for import manipulation with importmagic

    Add support for import manipulation with importmagic

    • Add a class that bridges to an importmagic symbol index

    • Add RPC calls to fixup imports, or add a single import

    • Add Elisp functions to use these features.

      (elpy-importmagic-add-import): Query user for a name to import and the module to import it from. A list of candidate modules is fetched from the symbol index. The import block is updated automatically.

      (elpy-importmagic-fixup): Fixup imports (remove unneeded imports and add imports for unresolved identifiers). [This feature seems to be a bit broken in importmagic.]

    Related to #330.

    Enhancement 
    opened by birkenfeld 39
  • Flymake: Configuration error

    Flymake: Configuration error

    Dear all,

    I installed elpy as instructed on https://github.com/jorgenschaefer/elpy but I am having problems with Flymake.

    Initially I was getting a 'command not found' as described here https://github.com/jorgenschaefer/elpy/issues/71

    Then I did M-x customize-variable RET python-check-command RET and set it to the full path (which is not a conventional path: I have all packages installed through pip in a personal directory, e.g. ~/mypips/pyflakes/scripts/pyflakes.py)

    Now I am getting
    "Flymake: Configuration error has occured while running (fullpath/pyflakes/scripts/pyflakes.py test_flymake.py) Flymake will be switched off."

    Certainly the file 'test_flymake.py' is absent, what I really have is 'test.py'.

    I'l appreciate some hints to fix my installation, Thanks, Temok

    Question More Info Needed 
    opened by temok-cse 34
  • org-mode compatibility

    org-mode compatibility

    Perhaps related to #130

    Current elpy and python in Org don't play well together. I'm having trouble getting a simple example demonstrating this, but in my non-trivial .emacs setup if I have (elpy-enable) then I can't run python babel block correctly.

    Currently I load elpy like this:

    (add-to-list 'auto-mode-alist '("\\.py" . python-mode))
    (autoload 'python-mode "python-kdm" nil t)
    

    And then in python-kdm.el I have

    (elpy-enable)
    (elpy-use-ipython)
    (elpy-clean-modeline)
    (setq elpy-rpc-backend "rope")
    

    If I comment those out, everything works. Is there a way to load elpy only when I'm editing a .py that isn't loaded auto-magically from inside Org mode?

    I know you don't use Org and this is a bit outside the scope of this project, but it would be very nice if I could use elpy for my bigger python code scripts and still use Org for small snippets run inside Org.

    Enhancement More Info Needed 
    opened by mankoff 32
  • Tiresome errors from elpy RPC backend

    Tiresome errors from elpy RPC backend

    Hi,

    I'm getting heaps of the same 2 error messages while using elpy. Message is:

    error in process filter: elpy-rpc--default-error-callback: Wrong type argument: stringp, nil
    error in process filter: Wrong type argument: stringp, nil
    error in process filter: elpy-rpc--default-error-callback: Wrong type argument: stringp, nil
    error in process filter: Wrong type argument: stringp, nil
    error in process filter: elpy-rpc--default-error-callback: Wrong type argument: stringp, nil
    error in process filter: Wrong type argument: stringp, nil
    error in process filter: elpy-rpc--default-error-callback: Wrong type argument: stringp, nil
    error in process filter: Wrong type argument: stringp, nil
    error in process filter: elpy-rpc--default-error-callback: Wrong type argument: stringp, nil
    error in process filter: Wrong type argument: stringp, nil
    error in process filter: elpy-rpc--default-error-callback: Wrong type argument: stringp, nil
    error in process filter: Wrong type argument: stringp, nil
    error in process filter: elpy-rpc--default-error-callback: Wrong type argument: stringp, nil
    error in process filter: Wrong type argument: stringp, nil
    

    With

    M-x toggle-debug-upon-error

    
    Debugger entered--Lisp error: (wrong-type-argument stringp nil)
      signal(wrong-type-argument (stringp nil))
      elpy-rpc--default-error-callback((wrong-type-argument stringp nil))
      elpy-promise-reject([*elpy-promise* #[257 "\303 \210\301\203�\304\300\"\202 �\300G\nV\203�\305\306\307\300\"!\202 �\310!\207" [#("total_score" 0 11 (fontified t)) #[257 "\211\203�\301\242\307=\204�\301\240\207\306\f\300\310!BC
    \311\312DC\216\313\302\303\304\305$)\207" [#("total_score" 0 11 (fontified t)) (done) #<buffer models.py<app>> #<window 3 on models.py<app>> 158385 5861 elpy-company-backend done company--preprocess-candidates funcall #[0 "?\205\n�\303\211\211\207" [company-candidates company-backend company-candidates-cache nil] 3 "\n\n(fn)"] company-idle-begin company-backend company-candidates-cache] 6 "\n\n(fn CANDIDATES)"] company-minimum-prefix-length elpy-company--cache-clear elpy-company--cache-completions elpy--sort-and-strip-duplicates company-dabbrev-code candidates nil] 6 "\n\n(fn RESULT)"] elpy-rpc--default-error-callback #<buffer models.py<app>> nil] (wrong-type-argument stringp nil))
      #[257 "\301\300\"\207" [[*elpy-promise* #[257 "\303 \210\301\203�\304\300\"\202 �\300G\nV\203�\305\306\307\300\"!\202 �\310!\207" [#("total_score" 0 11 (fontified t)) #[257 "\211\203�\301\242\307=\204�\301\240\207\306\f\300\310!BC
    \311\312DC\216\313\302\303\304\305$)\207" [#("total_score" 0 11 ...) (done) #<buffer models.py<app>> #<window 3 on models.py<app>> 158385 5861 elpy-company-backend done company--preprocess-candidates funcall #[0 "?\205\n�\303\211\211\207" [company-candidates company-backend company-candidates-cache nil] 3 "\n\n(fn)"] company-idle-begin company-backend company-candidates-cache] 6 "\n\n(fn CANDIDATES)"] company-minimum-prefix-length elpy-company--cache-clear elpy-company--cache-completions elpy--sort-and-strip-duplicates company-dabbrev-code candidates nil] 6 "\n\n(fn RESULT)"] elpy-rpc--default-error-callback #<buffer models.py<app>> nil] elpy-promise-reject] 4 "\n\n(fn ERR)"]((wrong-type-argument stringp nil))
      funcall(#[257 "\301\300\"\207" [[*elpy-promise* #[257 "\303 \210\301\203�\304\300\"\202 �\300G\nV\203�\305\306\307\300\"!\202 �\310!\207" [#("total_score" 0 11 (fontified t)) #[257 "\211\203�\301\242\307=\204�\301\240\207\306\f\300\310!BC
    \311\312DC\216\313\302\303\304\305$)\207" [#("total_score" 0 11 ...) (done) #<buffer models.py<app>> #<window 3 on models.py<app>> 158385 5861 elpy-company-backend done company--preprocess-candidates funcall #[0 "?\205\n�\303\211\211\207" [company-candidates company-backend company-candidates-cache nil] 3 "\n\n(fn)"] company-idle-begin company-backend company-candidates-cache] 6 "\n\n(fn CANDIDATES)"] company-minimum-prefix-length elpy-company--cache-clear elpy-company--cache-completions elpy--sort-and-strip-duplicates company-dabbrev-code candidates nil] 6 "\n\n(fn RESULT)"] elpy-rpc--default-error-callback #<buffer models.py<app>> nil] elpy-promise-reject] 4 "\n\n(fn ERR)"] (wrong-type-argument stringp nil))
      elpy-promise-resolve([*elpy-promise* #[257 "\303 \210\301\203�\304\300\"\202 �\300G\nV\203�\305\306\307\300\"!\202 �\310!\207" [#("total_score" 0 11 (fontified t)) #[257 "\211\203�\301\242\307=\204�\301\240\207\306\f\300\310!BC
    \311\312DC\216\313\302\303\304\305$)\207" [#("total_score" 0 11 (fontified t)) (done) #<buffer models.py<app>> #<window 3 on models.py<app>> 158385 5861 elpy-company-backend done company--preprocess-candidates funcall #[0 "?\205\n�\303\211\211\207" [company-candidates company-backend company-candidates-cache nil] 3 "\n\n(fn)"] company-idle-begin company-backend company-candidates-cache] 6 "\n\n(fn CANDIDATES)"] company-minimum-prefix-length elpy-company--cache-clear elpy-company--cache-completions elpy--sort-and-strip-duplicates company-dabbrev-code candidates nil] 6 "\n\n(fn RESULT)"] elpy-rpc--default-error-callback #<buffer models.py<app>> nil] nil)
      elpy-rpc--handle-json(((id . 13) (result)))
      elpy-rpc--filter(#<process  *elpy-rpc [project:~/src/app/ python:/Users/svithlani/src/app/bin/python]*> "{\"result\": [], \"id\": 13}\n")
    

    Elpy version is 1.14.1.

    Any idea?

    Sawan

    Bug (high priority) 
    opened by sawan 31
  • Test commands do not need quote escapes on Windows

    Test commands do not need quote escapes on Windows

    Another one for Windows compatibility. In essence, on Windows we do not need to escape quotes in the test run command. Test commands started from elpy will fail.

    My approach was to let bind the correct function depending on OS and leave the mapping in. For Windows the identity function is mapped.

    The Travis CI results show that this does not work on Emacs version 24.3. Any ideas why it is just failing for that version?

    Also, I was trying to add a test for this, but found no test-quote-escape-in-test-run or similar in the test suite. Also, I do not quite know how I would go about to test this function. Should we refactor the quote escape mapping to a separate function that just returns the test command string (so we can test it separately)?

    Bug (high priority) 
    opened by fleimgruber 31
  • Emacs RPC communication on windows freezes Emacs

    Emacs RPC communication on windows freezes Emacs

    I'm having Emacs freeze totally periodically after adding elpy -- I'm using the package elpy-20140213.1028 (version 1.3.0, according to elpy.el).

    It happens when I'm just typing -- looks like autocomplete gets triggered, but then there is a total freeze, so I can't tell you what elpy-rpc says.

    Bug (high priority) Can't reproduce 
    opened by adamc55 29
  • elpy-black-fix-code ignores black configuration if python package `toml` is not installed

    elpy-black-fix-code ignores black configuration if python package `toml` is not installed

    Since https://github.com/jorgenschaefer/elpy/pull/1611, elpy relies on the toml package to read black configuration files, which was a dependency of black at the time.

    However, since version 21.7b0, black does not depend on toml anymore (cf https://github.com/psf/black/pull/2301), thus toml is not installed automatically. If toml is not found, the black configuration file is ignored by elpy-black-fix-code.

    I stumbled upon this after recreating the RPC venv for elpy, and it took me quite some time to understand why my code was not formatted according to my configuration, so I thought I'd let you know.

    Workaround

    Install toml in the elpy RPC venv:

    source $HOME/.emacs.d/elpy/rpc-venv/bin/activate
    pip install toml
    

    Additional notes

    Might be relevant: black now uses tomli to read toml files for python < 3.11, and the standard module tomllib for python >= 3.11.

    opened by marc-legendre 1
  • Recognize Breakpoints in Multiple Buffers

    Recognize Breakpoints in Multiple Buffers

    With this feature debugger will not just interrupt execution at breakpoints in the buffer it was called on (main buffer) but also on breakpoints that were set in other buffers that whose code has been executed by main buffer.

    Thus when we set a breakpoint inmain.py buffer and one in submodule/mod.pybuffer starting the debugger in main will interrupt on execution of main but recognize the breakpoint in submodule/mod.py and interrupt execution.

     main.py
     -- submodule/mod.py
    
    opened by pweibert 0
  • The Python interpreter could not find the elpy module.

    The Python interpreter could not find the elpy module.

    Hi,

    My environment:

    OS: Linux Ubuntu 22.04.01 (64 bits)
    Kernel version: 5.15.0-56-generic
    Emacs version: 28.2
    Python version: 3.11.1 (64 bits)
    GCC version: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
    
    

    When I run M-elpy-config in Emacs, here is what I see:

    Elpy Configuration
    
    Emacs.............: 28.2
    Elpy..............: Not found (Python), 1.35.0 (Emacs Lisp)
    Virtualenv........: 3.11_ve_01 (/home/training/Documents/python_venvs/3.11_ve_01)
    Interactive Python: python 3.11.1 (/home/training/Documents/python_venvs/3.11_ve_01/bin/python)
    RPC virtualenv....: 3.11_ve_01 (/home/training/Documents/python_venvs/3.11_ve_01)
     Python...........: python nil (/home/training/Documents/python_venvs/3.11_ve_01/bin/python)
     Jedi.............: Not found
     Autopep8.........: Not found
     Yapf.............: Not found
     Black............: Not found
    Syntax checker....: flake8 (/home/training/Documents/python_venvs/3.11_ve_01/bin/flake8)
    
    Warnings
    
    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. Please report
    to: https://github.com/jorgenschaefer/elpy/issues/new.
    
    There was an unexpected problem starting the RPC process. Please check
    the following output to see if this makes sense to you. To me, it
    doesn't.
    
    Objects/typeobject.c:6064: type_ready_pre_checks: Assertion "type->tp_call != ((void *)0)" failed
    Enable tracemalloc to get the memory block allocation traceback
    
    object address  : 0x5645b86087e0
    object refcount : 1
    object type     : 0x7fafaca71aa0
    object type name: type
    object repr     : 
    
    Elpy could not connect to Pypi (or at least not quickly enough) and
    check if the python packages were up-to-date. You can still try to
    update all of them:
    
    [Update python packages]
    
    The Jedi package is not currently installed. This package is needed
    for code completion, code navigation and access to documentation.
    
    [Install jedi]
    
    No autoformatting package is currently installed. At least one is
    needed (Autopep8, Yapf or Black) to perform autoformatting (`C-c C-r
    f` in a python buffer).
    
    [Install autopep8]
    [Install yapf]
    [Install black]
    
    Options
    
    `Raised' text indicates 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 Code folding (hideshow)
    [+]-- Group Snippets (YASnippet)
    [+]-- Group Directory Grep (rgrep)
    [+]-- Group Search as You Type (ido)
    [+]-- Group Django extension
    [+]-- Group Autodoc extension
    
    

    I always start my python virtual environment in a terminal and then within the same terminal I run emacs &. Therefore when I run M-elpy-config, there is already a running Python virtual environment in which I have already installed (via pip install): Jedi, Autopep8, Yapf, Black. So I don't really understand why it says that these tools have not been installed. Moreover the following portion of the above error/warning messages is completely new to me:

    Objects/typeobject.c:6064: type_ready_pre_checks: Assertion "type->tp_call != ((void *)0)" failed
    Enable tracemalloc to get the memory block allocation traceback
    
    object address  : 0x5645b86087e0
    object refcount : 1
    object type     : 0x7fafaca71aa0
    object type name: type
    object repr     : 
    
    

    Am I missing something?

    opened by parvizfarnia 0
  • Virtualenv has something wrong

    Virtualenv has something wrong

    Summary

    I think Jedi not working with virtualenv. When i set the environment variable WORKON_HOME = $HOME/.virtualenvs, Elpy becomes error and can't use the workon command. Is there any other way i can use other virtual environments in this case. Thank you!

    Steps to reproduce

    My configuration

    OS

    Window 10 Pro

    Result of (elpy-config)

    Emacs.............: 28.2
    Elpy..............: 1.35.0
    Virtualenv........: None
    Interactive Python: ipython3 8.7.0 (c:/Users/THAY PHACH/AppData/Local/Programs/Python/Python39/Scripts/ipython3.exe)
    RPC virtualenv....: rpc-venv (c:/Users/THAY PHACH/AppData/Roaming/.emacs.d/elpy/rpc-venv)
     Python...........: c:/Windows/py.exe 3.9.2 (c:/Windows/py.exe)
     Jedi.............: 0.18.2
     Autopep8.........: 2.0.1
     Yapf.............: 0.32.0
     Black............: 22.12.0
    Syntax checker....: flake8.exe (c:/Users/THAY PHACH/AppData/Local/Programs/Python/Python39/Scripts/flake8.exe)
    
    

    Elpy configuration in my init.el

    
    
    opened by duksosleepy 0
  • toml rpv venv dependency is undocumented and causes behaviour change

    toml rpv venv dependency is undocumented and causes behaviour change

    Summary

    The toml module dependency is used to optionally read the line-length and skip-string-normalization options from pyproject.toml. However, reading and applying those optins is contingent on the toml module being installed into the elpy RPV venv, or they are silently skipped.

    This can lead to quite confusing behaviour, where two computers which, to elpy-config, appear to have equivalent configs, will have differing behaviour in the wrapping they create when they run black.

    We should either make toml a requirement when installing black, or document that the behaviour of elpy-black-fix-code depends on if toml is installed in the venv.

    Steps to reproduce

    1. Clean out the RPV venv (rm -rf ~/.emacs.d/elpy/rpc-venv
    2. Install black into the fresh venv
    3. Create a pyproject.toml with:
      [tool.black]
      line-length = 50
      
    4. Run elpy-black-fix-code on some code, see it use the default 88-character limit
    5. Install toml into the venv
    6. Re-run elpy-black-fix-code, and watch the line-lengths change to pick up the 50-character limit
    opened by alexmv 0
  • Emacs/Elpy freezes on open string

    Emacs/Elpy freezes on open string

    Summary

    When I enter a string, starting with a single quote, under some circumstances, this will freeze Emacs, presumably because Elpy freezes or otherwise stalls.

    At that point, I can exit emacs with C-g C-g (running in non-window mode), then kill the current process (i.e., emacs) from the command line, but nothing otherwise afaict. Since this is not the normal way to suspend or stop Emacs, I assume it's a running background process that causes Emacs to hang.

    Steps to reproduce

    I've managed to trace it to the following minimal Python code to open in Emacs:

    def main():
    
        text = """Text"""
        f()
        g('')
    

    Now, typing a single quote, ', on the empty line above text = ..., at the same indentation, and waiting a second, will cause Emacs to freeze. One way to prevent this seems to be to type '' quickly enough that Elpy doesn't kick in, then fill in the actual string contents. Also, a single double opening quote doesn't cause this either.

    I do seem to need the lines with the triple quotes, single function call, and function call with the empty string.

    My configuration & OS

    I'm running Emacs on macOS 13.0.1, through a Homebrew installation, in iTerm (same issue in Terminal, not surprisingly). My Python interpreter is installed with PyEnv; no idea how relevant this is.

    I have tried this on Ubuntu 22.04 as well, but there is no problem there. So it seems to be related to macOS or my specific setup there.

    I have seen a few possibly related, but older issues, on freezes (one specifically Macos related), but I can't tell whether that amounts to the same thing. I'm unfortunately too unfamiliar with Emacs and the Emacs package eco-system to be able to debug this further.

    Result of (elpy-config)

    Emacs.............: 28.2
    Elpy..............: 1.35.0
    Virtualenv........: None
    Interactive Python: python3 3.8.14 (/Users/evert/.pyenv/shims/python3)
    RPC virtualenv....: rpc-venv (/Users/evert/.emacs.d/elpy/rpc-venv)
     Python...........: python 3.8.14 (/Users/evert/.emacs.d/elpy/rpc-venv/bin/python)
     Jedi.............: Not found (0.18.2 available)
     Rope.............: Not found (1.5.1 available)
     Autopep8.........: Not found (2.0.0 available)
     Yapf.............: Not found (0.32.0 available)
     Black............: Not found (22.10.0 available)
    Syntax checker....: flake8 (/Users/evert/.pyenv/shims/flake8)
    

    Elpy configuration in my init.el

    This is the full, minimal, init.el that I need to reproducce this problem.

    (require 'package)
    (add-to-list 'package-archives
                 '("melpa-stable" . "https://stable.melpa.org/packages/"))
    (custom-set-variables
     ;; custom-set-variables was added by Custom.
     ;; If you edit it by hand, you could mess it up, so be careful.
     ;; Your init file should contain only one such instance.
     ;; If there is more than one, they won't work right.
     '(package-selected-packages '(elpy)))
    (custom-set-faces
     ;; custom-set-faces was added by Custom.
     ;; If you edit it by hand, you could mess it up, so be careful.
     ;; Your init file should contain only one such instance.
     ;; If there is more than one, they won't work right.
     )
    
    (package-initialize)
    (elpy-enable)
    
    opened by evertrol 0
Owner
Jorgen Schäfer
Jorgen Schäfer
A small, simple editor for beginner Python programmers. Written in Python and Qt5.

Mu - A Simple Python Code Editor Mu is a simple code editor for beginner programmers based on extensive feedback from teachers and learners. Having sa

Mu 1.2k Jan 3, 2023
Python-Text-editor: a simple text editor on Python and Tkinter

Python-Text-editor This is a simple text editor on Python and Tkinter. The proje

Innokentie 1 Jan 3, 2022
awesome Python autocompletion with SublimeText

SublimeJEDI SublimeJEDI is a Sublime Text 3 and Sublime Text 2 and plugin to the awesome autocomplete library Jedi Python Version Support Sublime Jedi

Serhii Ruskykh 933 Dec 8, 2022
Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box.

Python-mode, a Python IDE for Vim This project needs contributors. Documentation: :help pymode https://github.com/python-mode/python-mode/wiki Importa

The Python-Mode 5.4k Jan 1, 2023
Python Tools for Visual Studio

Python tools for Visual Studio Python support for Visual Studio is developed and managed here. Visit our product overview and downloads page, read our

Microsoft 2.4k Dec 30, 2022
The uncompromising Python code formatter

The Uncompromising Code Formatter “Any color you like.” Black is the uncompromising Python code formatter. By using it, you agree to cede control over

Python Software Foundation 30.7k Jan 2, 2023
Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.

Komodo Edit This readme explains how to get started building, using and developing with the Komodo Edit source base. Whilst the main Komodo Edit sourc

ActiveState Komodo 2k Dec 28, 2022
Leo is an Outliner, Editor, IDE and PIM written in 100% Python.

Leo 6.3, http://leoeditor.com, is now available on GitHub. Leo is an IDE, outliner and PIM. The highlights of Leo 6.3 leoAst.py: The unification of Py

Leo Editor 1.4k Dec 27, 2022
Python IDE for beginners

Thonny Thonny is a Python IDE meant for learning programming. End users See https://thonny.org and wiki for more info. Contributors Contributions are

Thonny, Python IDE for beginners 2.1k Jan 2, 2023
A simple Notepad-like editor written in Python

monkepad A simple Notepad-like editor written in Python Since MonkePad is written in one file, all your customization can be done without much trouble

null 5 Dec 28, 2021
A free Python source code editor and Notepad replacement for Windows

Website Download Features Toolbar Wide array of view options Syntax highlighting support for Python Usable accelerator keys for each function (Ctrl+N,

Mohamed Ahmed 7 Feb 16, 2022
A very simple Editor.js parser written in pure Python

pyEditor.js A very simple Editor.js parser written in pure Python. Soon-to-be published on PyPI. Features: Automatically convert Editor.js's JSON outp

Kevo 7 Nov 1, 2022
A basic Python IDE made by Anh Đức

Python IDE by Anh Đức A basic Python IDE made with python module tkinter. Hope you enjoy this IDE! V 1.3 "Open Terminal from IDE" feature V 1.2 Now yo

null 1 May 30, 2022
A Python code editor that looks like GNU Emacs.

?? WARNING ?? : Under development... Testing is not recommended! Welcome to Snake Editor! Hi! This is our repository, we are here to present our new p

Marcio Dantas 5 May 20, 2022
Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser

Live Coding in Python Visualize your Python code while you type it in PyCharm, Emacs, Sublime Text, or even your browser. To see how to use one of the

Don Kirkby 256 Dec 14, 2022
An open-source, mini imitation of GitHub Copilot for Emacs.

Second Mate An open-source, mini imitation of GitHub Copilot using EleutherAI GPT-Neo-2.7B (via Huggingface Model Hub) for Emacs. This is a much small

Sam Rawal 238 Dec 27, 2022
RSS Reader application for the Emacs Application Framework.

EAF RSS Reader RSS Reader application for the Emacs Application Framework. Load application (add-to-list 'load-path "~/.emacs.d/site-lisp/eaf-rss-read

EAF 15 Dec 7, 2022
Bringing emacs' greatest feature to neovim - Tetris!

nvim-tetris Bringing emacs' greatest feature to neovim - Tetris! This plugin is written in Fennel using Olical's project Aniseed for creating the proj

null 129 Dec 26, 2022
Fastest Git client for Emacs.

EAF Git Client EAF Git is git client application for the Emacs Application Framework. The advantages of EAF Git are: Large log browse: support 1 milli

Emacs Application Framework 31 Dec 2, 2022