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

Fix for the gf shell. Supports newer versions of IPython, v3.11+ #414

Merged

Conversation

RichardEWillis
Copy link
Contributor

IPython.terminal broke the greatfet shell such that any attempt to use it resulted in an exception ending in:
Exception 'NoneType' object has no attribute 'check_complete'

This was traced to a change in IPython, version 8.11 and has broken other projects as well, refer to this issue in the IPython project: ipython/ipython#13966

This PR fixes the problem, as suggested in the issue report (linked above). It should be compatible with IPython v8.11 and later, and also backwards compatible for earlier versions of the library as well (as per the above issues last comment).

I tested the raw Python script (greatefet_shell.py) but have not managed to generate an install (.egg ?) using the README instructions. The .py file, when run directly, no longer creates an exception and the shell runs normally.

Please review for a merge or copy the simple change to your repo...

Alternatively, you could mention in the Docs that this issue can be fixed by rolling back IPython to an earlier version using pip3, (ver 8.10) although this is a sub-optimal alternative as all other, non greatfet, Python3 user scripts will now be forced to use the same older version of the library.

…ter. Backwards compatible with v3.10 and earlier.
Copy link
Member

@antoinevg antoinevg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR, thank you! Only change required is the above-mentioned duplication of information from the PR in the code. 👍

@@ -69,7 +68,12 @@ def main():


# Create a new shell, and give it access to our created GreatFET object.
shell = TerminalInteractiveShell()
# Apr 18 2023 - Changed method for creating the shell, to support changes in IPython v8.11+
# - ref. https://github.com/ipython/ipython/issues/13966
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've already done a great job of documenting this in the PR itself so it doesn't need to be in the code as well.

Copy link
Contributor Author

@RichardEWillis RichardEWillis May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the PR, Python comment removed. Please review and close this PR comment if it looks good.

Copy link
Member

@antoinevg antoinevg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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

Successfully merging this pull request may close these issues.

2 participants