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

Unable to use --pdb --pdbcls=pudb.debugger:Debugger with latest versions of urwid #617

Closed
mvanderkamp opened this issue Oct 10, 2023 · 2 comments
Labels

Comments

@mvanderkamp
Copy link
Contributor

mvanderkamp commented Oct 10, 2023

Describe the bug
I tried using pytest --pdb --pdbcls=pudb.debugger:Debugger and received the following error:

ERROR: --pdbcls: could not import 'pudb.debugger:Debugger': 'urwid.wimp' is not expected to be imported directly. Please use public access from "urwid" package. Module 'urwid.wimp' is deprecated and will be removed in the future.

After downgrading urwid to 2.1.2 it worked again.

This obviously stems from an urwid issue, but there might be a way for us to address it. Unfortunately this doesn't just happen with the latest pudb release, since we don't have an upper bound on which versions of urwid are acceptable, so this can affect users whose setup specifies an old version of pudb but doesn't specify which version of urwid to use. The solution in that case is for those users needing an old pudb version to restrict urwid to <2.2.0.

To Reproduce
Steps to reproduce the behavior:

  1. Install pytest. I have version 7.2.1
  2. Do a fresh install of pudb, any recent version will do though. Make sure that the version of urwid that gets installed with it is >=2.0.0.
  3. Try debugging the failing test with pytest --pdb --pdbcls=pudb.debugger:Debugger

Expected behavior
The debugger should open on the exception that causes the test to fail.

Versions

  • Python: 3.11.2
  • PuDB: v2023.1
  • Urwid: >= 2.0.0
  • Pytest: 7.2.1
@inducer
Copy link
Owner

inducer commented Oct 11, 2023

Who is importing urwid.wimp? git grep wimp in pudb comes up empty.

@mvanderkamp
Copy link
Contributor Author

Oh it's an urwid internal import. Fixed but not released: urwid/urwid#644

Guess we can just wait it out for them to release the next version, unless you want to put special handling for versions in setup.py but I'm not sure it's worth it.

@mvanderkamp mvanderkamp closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants