Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing Tab key for code completion repeats previous text with IPython 8.8+ #20393

Closed
7 of 9 tasks
physici opened this issue Jan 18, 2023 · 10 comments
Closed
7 of 9 tasks

Comments

@physici
Copy link

physici commented Jan 18, 2023

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • [?] Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

When using TAB in the IPython console, auto completion repeats the previously entered characters. E.g. in case a variable should be assigned the result of a function call then autocomplete repeats the variable and the equals-sign before inserting the result of the autocomplete.

What steps reproduce the problem?

  1. import any module, e.g. pandas as pd
  2. enter "test = pd.con"
  3. press TAB for completion (pd.concat)
  4. completion will return "test = pd.concat" resulting in the line "test = test = pd.concat"

2023-01-18_07-45-52

What is the expected output? What do you see instead?

The completed line should read "test = pd.concat", not "test = test = pd.concat"

Paste Traceback/Error Below (if applicable)

PASTE TRACEBACK HERE

Versions

  • Spyder version: 5.4.1
  • Python version: 3.10.9
  • IPython version: 8.8.0
  • Qt version:
  • PyQt version:
  • Operating System name/version: Win10 22H2

Dependencies

PASTE DEPENDENCIES HERE
@ccordoba12
Copy link
Member

Hey @physici, thanks for reporting. Did you change any option in

Preferences > IPython console > Advanced settings

from its default values?

Also, what's your IPython version? You didn't attach it to your report above.

@physici
Copy link
Author

physici commented Jan 19, 2023

I've updated the bug report: IPython version 8.8.0.

I've also tried it with a different setup. The problem doesn't show up with the following configuration:
Python 3.10.6
Spyder 5.4.0
IPython 7.3.4

Advanced Settings for the IPython-Console:
Jedi -> off
Greedy -> off
Autocall -> off
Symbolic math -> off
Prompts: empty
Window adjustments -> On

@ccordoba12
Copy link
Member

ccordoba12 commented Jan 19, 2023

Thanks for the additional details @physici. I can confirm this bug with IPython 8.8.0, but not with 8.7.0. So please downgrade to that version for now because it's going to take us some time to fix it.

@ccordoba12
Copy link
Member

Note: This probably needs to be solved in Qtconsole.

@physici
Copy link
Author

physici commented Jan 20, 2023

I've downgraded to IPython 8.7.0 as suggested and it solves the issue for me as well.

@juliangilbey
Copy link
Contributor

Unfortunately, the Spyder 5.4.2 macOS version on GitHub has IPython 8.8.0 bundled with it, so exhibits this bug.

@ccordoba12 ccordoba12 changed the title TAB for code completion repeats previous inputs (like variables) Pressing Tab key for code completion repeats previous inputs (IPython console) Jan 22, 2023
@stymbhrdwj
Copy link

I am still experiencing this bug with IPython 8.10.0 as well

@ccordoba12 ccordoba12 changed the title Pressing Tab key for code completion repeats previous inputs (IPython console) Pressing Tab key for code completion repeats previous inputs with IPython 8 Feb 24, 2023
@ccordoba12
Copy link
Member

ccordoba12 commented Feb 24, 2023

Hi @krassowski, sorry for the ping but I saw that you are involved in many completion PRs on IPython lately. So, I'd like to ask you: is this something we need to address in Qtconsole? Or is it going to be fixed in a future release in IPython?

@krassowski
Copy link

krassowski commented Feb 24, 2023

Happy you pinged me. The fix was already merged: ipython/ipython#13943

Edit: it was not released yet, contrary to what I stated previously, it appears that it was merged after the latest release.

@ccordoba12
Copy link
Member

Ok, great! Thanks for the good news 👍🏽

@ccordoba12 ccordoba12 changed the title Pressing Tab key for code completion repeats previous inputs with IPython 8 Pressing Tab key for code completion repeats previous inputs with IPython 8.8+ Feb 25, 2023
@ccordoba12 ccordoba12 changed the title Pressing Tab key for code completion repeats previous inputs with IPython 8.8+ Pressing Tab key for code completion repeats previous text with IPython 8.8+ Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants