-
Notifications
You must be signed in to change notification settings - Fork 18
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 Bug When Importing Roundtrip #127
Conversation
hatchet/external/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cscully-allison I made a change here to the import, because roundtrip was being imported before checking the IPython.__version__
. I think that is part of why the error happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is an IPython API issue, then yes.
By switching the order, the error should not occur at all.
These look good to me. Not sure why the unit tests are failing, but I couldn't see any side effects this would case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I have one minor suggestion to make the event handler that you changed more flexible and resilient to future IPython API changes, but that suggestion is not strictly needed at this time.
Also, regarding the CI failing, the cause has to do with the fact that Python 3.7 is EOL. Since flake8
is created by the Python Software Foundation, they frequently change the code so that it's only guaranteed to work with the oldest non-EOL version of Python or above. As a result, flake8
now makes use of the "walrus operator" (i.e., :=
) internally, which will cause errors when run under Python 3.7. I've fixed this CI error in #129 by bumping the Python version that we use for black
and flake8
checks to 3.9. You can either rebase on top of #129 or copy the relevant changes.
@michaelmckinsey1 please rebase on |
3ea0ea6
to
4b94e5b
Compare
Currently, Hatchet prints a
TypeError
in each Jupyter cell due to a missing positional argument inmanage_jupter_change()
inhatchet/external/roundtrip/roundtrip/manager.py
. By adding and optional positional argument to the function, we avoid the error when this line is ran.Additionally, the import statements are re-arranged to avoid importing the roundtrip module unintentionally, which is happening in the below image.