inducer / pudb

Full-screen console debugger for Python
https://documen.tician.de/pudb/
Other
3k stars 230 forks source link

[fix] find HOME value when abstent using os.path.expanduser #453

Closed Psycojoker closed 3 years ago

Psycojoker commented 3 years ago

Hello,

This fix might appear in a weird context for you, the situation is:

So to handle this situation I'm using the os.path.expanduser("~") way to still get the user's home (maybe there's a better way?)

But to be honest I'm not sure where this need to be fixed?

You can do this in every tox file but it's a bit annoying to modify it only for debugging:

[testenv]
setenv =
  HOME={homedir}

Or maybe it should be fixed in pytest-pudb?

Or maybe directly in pudb because this will be a broader fix for more people?

I'm not sure

Nevertheless thanks a lot for this debugger, it really help me a lot!

Kind regards,

inducer commented 3 years ago

Thanks for your contribution, and for the thorough explanation! What you describe makes sense to me, and I'm happy to accommodate the use case. I added a comment from the code back to this PR so that the rationale for the slightly weird-looking code sticks around. (5ae6579)

Psycojoker commented 3 years ago

Thanks for the quick merge!