jorgenschaefer/elpy

Elpy auto-completion of numpy missing classes/funcs in newer numpy versions

Opened this issue · 1 comments

Summary

Elpy auto-completion does not list many of the functions/classes in latest numpy versions. This issue seems to stem from numpy itself, but I am wondering if there is something in the implementation detail or configuration of elpy that can be adjusted to work around the internal changes in numpy.

Steps to reproduce

  1. Install the latest version of numpy (1.23.0 as of this writing)
pip install numpy==1.23.0
  1. Open a new file and try to auto complete numpy's array
import numpy as np
np.arr

provided completions are abs, all, any, ... (See screenshot below)

image

(Note: array is not listed, but it does actually still exist in numpy 1.23.0)

Downgrading numpy to version 1.21.4 works as expected:

image

My configuration

  • OS: OpenSUSE TW 20220619
  • Emacs: 28.1
  • Python: 3.10.5

Result of (elpy-config)

Emacs.............: 28.1
Elpy..............: 1.35.0
Virtualenv........: None
Interactive Python: python3 3.10.5 (/home/username/projects/elpy/_venv/bin/python3)
RPC virtualenv....: rpc-venv (/home/username/.emacs.d/elpy/rpc-venv)
 Python...........: python3 3.10.5 (/home/username/.emacs.d/elpy/rpc-venv/bin/python3)
 Jedi.............: 0.18.1
 Autopep8.........: 1.6.0
 Yapf.............: 0.32.0
 Black............: 22.3.0 (22.6.0 available)
Syntax checker....: Not found (flake8)

Elpy configuration in my init.el

(defun hf/python-mode-hook ()
  (require 'pyvenv)
  (elpy-enable)
  (setq elpy-rpc-python-command "python3")
  )
(setq elpy-rpc-maximum-buffer-age 60)

(add-hook 'python-mode-hook 'hf/python-mode-hook)

I have exactly the same problem.