Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSomething about boto3 crashes bpython #653
Comments
|
Thanks @RichardBronosky, I have an idea of what's going on here. @dputtick do you want to take a look? |
|
This also happens with Thanks for looking into this! |
|
@RichardBronosky I've fixed this in master, so you can
to keep working :) Issue not closed because we should:
@dputtick if you're interested in these two things let me know, I'll wait a couple days. |
|
For later reference, I assume the problem was that |
|
You're close. Now I'm getting:
|
|
Ah I was using a different version of curtsies, whoops. Taking a look now. |
|
What version of curtsies? I can try to upgrade. That error case is really weird to me considering...
|
|
No I was accidentally using an older one that allows formatstrings to be bytes, the current one that we now both have requires they be unicode. Now the problem is that the I should have checked this more carefully, |
|
Since https://github.com/thomasballinger/curtsies/branches/all shows that master has the most recent commits, I tried |
|
Gotcha. |
|
Learning my lesson this time, I'm going to be more rigorous about this, so don't expect a fix in the next 20 minutes or so :) |
|
it looks like some boto3 docstrings are ActionDocstrings and we need to figure out how to deal with them.
|
|
Ah great, I can reproduce in Python 2 with
so we must have implicit conversion happening (caused by this |
|
Still working on this? Replicated it, would be interested in poking around tomorrow or this weekend. Also happy to write tests. |
|
@dputtick Yeah I'm not going to finish this anytime soon. Here are some tests that we should make pass in python 2:
(added to The thing I don't understand yet is the LazyLoadedDocstring class in the library botocore, in botocore/docs/docstring.py. Our goal should be to change formatted_docstring in bpython/curtsiesfrontend/replpainter.py so that it works with these funny boto docstring objects, but I think all we have to do is check the type of the docstring argument we're handed and do something like
|
|
I think this does it, but I'm not sure. I can finish this up too, just not going to get to it tonight. |
|
Sorry I meant to leave this, but then I felt bad for @RichardBronosky :) |
|
|
|
Fixed by #656 |
|
@RichardBronosky You can try this branch
if you want. I sort of want to say this is actually a bug in boto. |
|
That did it! Thank you so much for taking this so personal. Now I can see the docstring. Though I don't know what was breaking the world here:
|
|
And in case it mattered. I just confirmed that all is well using python 3.5.2 installed via homebrew. BTW, is there a better way to have access the both 2.7 and 3.5 bpython other than |
|
Two good options would to use aliases as described at http://docs.bpython-interpreter.org/tips.html, or to use something like pyenv or virtualenvs to manage your Python versions. |
|
@RichardBronosky What you've described is what I do, plus the alias thing @dputtick points to. I figured we had a issue for making a bpython3 executable, but I don't see one. I think there was packaging discussion around this. I believe this has been decided already, but if it hasn't I'm in favor of a separate bpython3 executable to mirror that most of us are typing in |
|
#656 has been merged. |
I don't know enough to debug this further. I'm hoping someone can help because I really rely on bpython to explore and develop using libraries I don't know.
Steps to reproduce:
That crash happens as soon as you strike the ( key. You don't have to hit enter.