Skip to content

bpython-curses is not working on windows 10: it deletes the current line and returns back at the start of the history #859

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

Closed
giuliohome opened this issue Nov 6, 2020 · 7 comments

Comments

@giuliohome
Copy link

giuliohome commented Nov 6, 2020

If you type and underscore in the name of a function

def public_` # I want def public_ip():

it deletes the current line and returns back at the start of the history.

after I have typed a dot it shows the possible completions but when I digit a capital P it deletes the current line and returns back at the start of the history.

http = urllib3.P # I want http = urllib3.PoolManager()

Note
Actually this is a big problem of bpython-curses also on Linux (I've tested it on my Fedora 32, last version) and indeed it is deprecated, but the crucial point is that the real bpython is running on Linux but not on Windows.

@giuliohome giuliohome changed the title bpython-curses is not working on windows 10: it deletes the current line and returns back at the start of the hystory bpython-curses is not working on windows 10: it deletes the current line and returns back at the start of the history Nov 6, 2020
@sebastinas sebastinas added this to the release-0.21 milestone Nov 8, 2020
supakeen pushed a commit that referenced this issue Nov 10, 2020
@bjhend
Copy link

bjhend commented Nov 18, 2020

I've observed the same behavior with bpython-curses but not only with underscore and capital P. In addition this happens also with A, E, G, K, N, and Y (all capital).

Versions:
Python 3.8.3
bcrypt 3.2.0
blessings 1.7
bpython 0.20
certifi 2020.11.8
cffi 1.14.3
chardet 3.0.4
cryptography 3.2.1
curtsies 0.3.4
greenlet 0.4.17
idna 2.10
paramiko 2.7.2
pip 20.2.4
pycparser 2.20
Pygments 2.7.2
PyNaCl 1.4.0
requests 2.24.0
setuptools 41.2.0
six 1.15.0
urllib3 1.25.11
wcwidth 0.2.5
windows-curses 2.2.0

@giuliohome
Copy link
Author

giuliohome commented Nov 18, 2020

@bjhend I've upgraded to the latest version of the package and I confirm that this bug has been fixed.
Thanks to the developers

@giuliohome
Copy link
Author

giuliohome commented Nov 18, 2020

I've observed the same behavior with bpython-curses but not only with underscore and capital P. In addition this happens also with A, E, G, K, N, and Y (all capital).

Of course, it is all the letters in "KEY_NPAGE" and "KEY_PPAGE", have you seen the fiix?

elif key in ("KEY_NPAGE",)

the comma (added as a fix) transforms what was wrongly a string (a list of chars) into a correct tuple, in this case a one-element tuple

Versions:

bpython 0.20

@bjhend
Please upgrade to bpython 0.20.1

@bjhend
Copy link

bjhend commented Nov 18, 2020

Upgrading solved it for me as well, thanks.

@bjhend
Copy link

bjhend commented Nov 18, 2020

Yes, I've looked at the fix (tried it manually first) but didn't compare the letters. Sometimes bugs have funny effects.

@giuliohome
Copy link
Author

immagine

@bjhend
Copy link

bjhend commented Nov 18, 2020

Thanks for the hint. As I said, after upgrading to bpython 0.20.1 as well as after applying the fix manually beforehand, it worked or me.

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

3 participants