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

DeprecationWarning: Do not import 'is_wide_char' from urwid.urwid.util, import it from 'urwid'. #27

Open
sylvain-vq opened this issue Jul 25, 2024 · 2 comments

Comments

@sylvain-vq
Copy link

sylvain-vq commented Jul 25, 2024

I'm getting this warning with urwid-readline 0.14 and urwid 2.6.15. It comes from readline_edit.py:

def _is_valid_key(char):
    return urwid.util.is_wide_char(char, 0) or (
        len(char) == 1 and ord(char) >= 32
    )

urwid.util.is_wide_char should be changed for urwid.is_wide_char though I don't know if this would also work with older versions of urwid.

@nikhilweee
Copy link

nikhilweee commented Aug 11, 2024

Came here to report the same issue. Although for me I see these warnings while using pudb.
@rr- I believe this was fixed in #23, and this package is due for a new version on pypi.

Until then one can use the following in requirements.txt or when using pip install:

urwid-readline @ git+https://github.com/rr-/urwid_readline@master

@neiljp
Copy link
Collaborator

neiljp commented Aug 13, 2024

Zulip-terminal will run into this issue shortly, so it would be great to have this released from our point of view too.

My only concern would be how much it is backwards compatible, and while we could introduce a matrix of urwid versions, would the existing tests cover it, to tell us that? (I've not checked)

It's been great to see the uptake in Urwid development again - though rather rapidly at this point, so testing over select Urwid versions may be an idea in any case, since it might pick up aspects like this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants