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
Add ability to use ipdb/pdb #263
Comments
The work around I found is to run tests via python rather than with run function. Some sample code is in my work around for issue #264. |
I feel like I've run into this myself, tho that might have been in my test runner (spec) - then again since I actually run it via Invoke tasks, it's probably Invoke's fault. My worry is that ipdb & friends are doing something overly clever which our "hi I'm a pty except not really" approach is tripping up, but we'll have to dig. I can't prioritize this but it's definitely a thing so leaving open. Thanks! |
Definitely want to |
@nkantar assuming you're Re: @epicserve's original request, it's not clear to me why neither of us discussed |
@bitprophet Thanks, I worked that out — appreciate the help. Regarding the issue at hand, though, For reference: Python 2.7.6, Invoke 0.11.1, Django 1.6.11, zsh 5.0.2, Ubuntu 14.04 |
Support depends entirely on what exactly is causing ipdb and similar things to not work right. I certainly want that to be possible - in an ideal world, a base-case tasks file with nothing but some Issue is just that this is difficult without sacrificing the 'middleware' features that make this software what it is - capturing output, auto-responding to it, etc. But it's the goal. The IO stream handling got a big overhaul in the |
Random thought ... what about adding an argument to |
@epicserve In this case, the stdin mirroring isn't even present in master and the version you were using when this ticket got filed...so turning it off is unlikely to help. Turning off the stdout/stderr capturing, tho, so that all 3 streams are hooked up direct - that's worth testing at least. Especially since "capture the stdout for examination" and "do interactive things" are almost certainly orthogonal most of the time. May not help (as) much with the fully abstract use case (e.g., sub use cases like Fabric's, where there IS no ability to attach directly to the process' pipes) but still. |
@epicserve Good news! On a whim I tried out ipdb with aforementioned branch, and it seems to actually work now (again as long as Specifically, some other Python app/script that does a few random things and then calls I confirmed that it does not work under master: the IPDB session starts, and I see a prompt, but upon entering anything at the prompt, things just stop happening, i.e.:
But in
I'm actually not sure why this is - why is a branch that interferes more with stdin & friends better at this than a branch that doesn't? (though, given my experiments with vim in the branch's own ticket, it's still much better at vim now than in master, despite still having some hangups...) That may or may not impact the tentative plans to turn off all middleware behavior, I guess. |
That sounds like progress! Any sort of an estimate on when the |
As soon as I get some Fabric 2 sudo support nailed down (working on that today) I'll merge |
@bitprophet I'm personally in no hurry, I was more just curious what your plans were. Thanks for all your work! |
No worries, those were my actual plans :) I really have been sitting on some stuff in Invoke that I was going to release either way, so. If you have the ability to nab that branch and try it out sometime soon that would be cool too, I'd hate to close this and then find out it actually still doesn't work in your case! |
I did the following to test:
Then for a control test I did the following:
Which outputs:
However when I run I get a
|
You forgot |
Oopps. After I made that change it worked. |
OK noting this in changelog entry for #289 and closing, thanks for the prompt feedback @epicserve :) sorry this took so bloody long to semi-accidentally fix! |
Also, merged to master just now, for whatever that's worth. May shit out a release today just to clear the pipes, keep an eye out. |
@bitprophet was "shit" out a release a typo or on purpose? :) |
Self-deprecating sarcasm :) |
lol |
Is it possible to add the ability to use ipdb/pdb. If I setup a tasks file like this:
And then add this inside a test:
I'm not able to run commands and I don't get a ipdb prompt. I was using Invoke 0.10.1 and Python 2.7.9.
The text was updated successfully, but these errors were encountered: