gracinet created this revision.
Herald added a reviewer: indygreg.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
The Python callers detect if we have cpython or
direct-ffi bindings and fallback to the Python
implementation if none is pres
yuja added a comment.
> +try:
> +from . import rustext
> +except ImportError:
> +rustext = None
Need to access to e.g. rustext.__doc__ to trigger ImportError here.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5442
To: gracinet, indygreg,
yuja added a comment.
> +try:
> +from . import rustext
Touch e.g. rustext.__doc__ here to get around the lazy importer.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5442
To: gracinet, indygreg, #hg-reviewers
Cc: yuja, mercurial-devel
__
gracinet added a comment.
@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 sta
gracinet updated this revision to Diff 13008.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5442?vs=12879&id=13008
REVISION DETAIL
https://phab.mercurial-scm.org/D5442
AFFECTED FILES
mercurial/revlog.py
CHANGE DETAILS
diff --git a/mercurial/revlog.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG536c83535cbd: rust-cpython: using the new bindings from
Python (authored by gracinet, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5442?vs=13008
> +try:
> +from . import rustext
> +except ImportError:
> +rustext = None
Need to access to e.g. rustext.__doc__ to trigger ImportError here.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman
> +try:
> +from . import rustext
Touch e.g. rustext.__doc__ here to get around the lazy importer.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
On Thu, 27 Dec 2018 19:49:46 +, gracinet (Georges Racinet) wrote:
> @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.
Yes. I don't think importing a cext module would be significant overhead.
And the policy impo