-
Notifications
You must be signed in to change notification settings - Fork 576
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
Refactor to avoid cycle #423
Conversation
Note — the most important change for demonstrating the improvement is in |
LGTM, but need rebase. |
from .base import (export, get_exporter, | ||
get_export_names , ExporterNameError) | ||
|
||
from .exporter import Exporter |
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.
Nitpicking: Exporter is unused, but I guess that would brea API to remove it ?
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.
Exactly. So should we keep it?
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.
Sure. Let's merge once you get your rebase right.
fb52cf4
to
5eaddad
Compare
BTW mike can you try to install this |
done! |
[This change in nbconvert](jupyter/nbconvert#1273) meant that importing `from nbconvert.nbconvertapp import NbConvertApp` in the global scope causes a circular import. That change seems to undo the efforts of jupyter/nbconvert#423, so there might be case to be made to clean it up on the nbconvert side, but this change should at least make this module workable with nbconvert 6 for now.
So this addresses the same issues as #417 but tries to do so by abstracting the hardcoded, deprecated exporter locating into a separate module from the entrypoint based exporter functionality which is not deprecated and instead is maintained in
base.py
.The only thing I don't like is that it introduces a new file that is strictly speaking deprecated because thought it is only acting as a shim for the export module that doesn't conflict with the name-space, all of its contents are deprecated.
Another solution would be to just leave all the deprecated functionality inside
export.py
since it's deprecated anyway. I just worry that people might still use export and as a result be confused (and the ambiguity will strictly speaking continue to be present either way). I can make that change but it's not what I'd originally proposed, so I'll make the PR originally of what I proposed, and then will change it if that accords with others' intuitions about which is better.