This revision was automatically updated to reflect the committed changes.
Closed by commit rHG92ac9cf78dba: pathencode: fix importing hashlib on Python 3
(authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3587?vs=8749&id=8
yuja added a comment.
Queued, thanks.
> if (name == NULL)
> return -1;
>
>
> - hashlib = PyImport_Import(name); +hashlib =
PyImport_ImportModule("hashlib"); Py_DECREF(name);
Nit: `name` is no longer used.
REPOSITO
Queued, thanks.
> if (name == NULL)
> return -1;
>
> - hashlib = PyImport_Import(name);
> + hashlib = PyImport_ImportModule("hashlib");
> Py_DECREF(name);
Nit: `name` is no longer used.
___
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 s