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

Spyder 5.3.3 IPython-console not properly doing input() on Mac #19888

Closed
a2-c-martin opened this issue Oct 19, 2022 · 6 comments
Closed

Spyder 5.3.3 IPython-console not properly doing input() on Mac #19888

a2-c-martin opened this issue Oct 19, 2022 · 6 comments

Comments

@a2-c-martin
Copy link

a2-c-martin commented Oct 19, 2022

Problem Description

In spyder 5.3.3 the execution of input() on silicon Macs does not work properly
->spyder 5.2.2 is working perfect

What steps reproduce the problem?

while True:
    print(input("Enter something:"))

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

EXPECTED:

Enter something:1
1

Enter something:1
1

Enter something:1
1

WHATS HAPPENING:

Enter something:1
1Enter something:
111

Paste Traceback/Error Below (if applicable)

no errors

Versions

  • Spyder version: 5.2.2
  • Python version: 3.9
  • Qt version: 5.15.2
  • PyQt version: PyQt5 5.15.7
  • Operating System name/version: MacOS 12.5.1

Dependencies

PASTE DEPENDENCIES HERE
@ccordoba12 ccordoba12 changed the title Spyder 5.3.3 IPython-console not properly doing input() on silicon Macs Spyder 5.3.3 IPython-console not properly doing input() on Mac Oct 19, 2022
@ccordoba12 ccordoba12 changed the title Spyder 5.3.3 IPython-console not properly doing input() on Mac Spyder 5.3.3 IPython-console not properly doing input() on Mac Oct 19, 2022
@ccordoba12
Copy link
Member

Hey @a2-c-martin, thanks for reporting. I thought this was fixed already, but we'll take a look at it.

@mrclary, could you check if you're getting the same problem on Mac? Thanks!

@a2-c-martin
Copy link
Author

a2-c-martin commented Oct 19, 2022 via email

@mrclary
Copy link
Contributor

mrclary commented Oct 19, 2022

I tested on
Okay, I can confirm the following running from bootstrap on the latest 5.x commit:

  • this issue does manifest on macOS 12.6 (Intel)
  • this issues does not manifest on my Windows 10 or Ubuntu 20.04 VM

Note that the number of successful input handlings can vary. I found as little as 2 and as many as 14 in some cases.

Race condition of some kind?

issue-19888

@ccordoba12
Copy link
Member

@mrclary, could you check if removing this if and leaving the line below fixes the problem on Mac?

if not sys.platform == 'darwin':
QtCore.QCoreApplication.processEvents()

@mrclary
Copy link
Contributor

mrclary commented Oct 20, 2022

@mrclary, could you check if removing this if and leaving the line below fixes the problem on Mac?

if not sys.platform == 'darwin':
QtCore.QCoreApplication.processEvents()

That does solve the issue!

@ccordoba12
Copy link
Member

ccordoba12 commented Oct 20, 2022

Ok, thanks for the confirmation @mrclary. I added that if because I thought it was not needed on Mac. Furthermore, that processEvents is making both Qtconsole and Spyder test suites hang on Mac.

But I'll add a workaround so that it's not called while running tests but it is in regular use.

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

4 participants