* lisp/progmodes/python.el (python-shell-completion-at-point):
Check the PROCESS argument at the beginning of the function.
(Bug#70707)
(cherry picked from commit
751e21af42e905d0448baa7be4a7ae6d6ae6734a)
Optional argument PROCESS forces completions to be retrieved
using that one instead of current buffer's process."
(setq process (or process (get-buffer-process (current-buffer))))
+ (unless process
+ (user-error "No active python inferior process"))
(let* ((is-shell-buffer (derived-mode-p 'inferior-python-mode))
(line-start (if is-shell-buffer
;; Working on a shell buffer: use prompt end.