durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I'm curious why PyImport_Import is returning NULL, but
  PyImport_ImportModule bypasses some of the regular import path,
  probably including demandimport, which I suspect is the issue here.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3587

AFFECTED FILES
  mercurial/cext/pathencode.c

CHANGE DETAILS

diff --git a/mercurial/cext/pathencode.c b/mercurial/cext/pathencode.c
--- a/mercurial/cext/pathencode.c
+++ b/mercurial/cext/pathencode.c
@@ -660,7 +660,7 @@
                if (name == NULL)
                        return -1;
 
-               hashlib = PyImport_Import(name);
+               hashlib = PyImport_ImportModule("hashlib");
                Py_DECREF(name);
 
                if (hashlib == NULL) {



To: durin42, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to