The Python callers detect if we have cpython or
direct-ffi bindings and fallback to the Python
implementation if none is present.
This intermediate state allows to compare the
three possibilities.
indygreg |
hg-reviewers |
The Python callers detect if we have cpython or
direct-ffi bindings and fallback to the Python
implementation if none is present.
This intermediate state allows to compare the
three possibilities.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
+try:
+ from . import rustext
+except ImportError:
+ rustext = None
Need to access to e.g. rustext.doc to trigger ImportError here.
+try:
+ from . import rustext
Touch e.g. rustext.doc here to get around the lazy importer.
@yuja about the lazy importer, and just to clarify: so you're saying it's not worth it to delay until rustext is actually used. I'm fine with that, will do it.
I didn't amend that patch yet, but you might have received notifications due to evolve of the whole stack.