D3587: pathencode: fix importing hashlib on Python 3

2018-05-18 Thread durin42 (Augie Fackler)
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

D3587: pathencode: fix importing hashlib on Python 3

2018-05-18 Thread yuja (Yuya Nishihara)
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

Re: D3587: pathencode: fix importing hashlib on Python 3

2018-05-18 Thread Yuya Nishihara
Queued, thanks. > if (name == NULL) > return -1; > > - hashlib = PyImport_Import(name); > + hashlib = PyImport_ImportModule("hashlib"); > Py_DECREF(name); Nit: `name` is no longer used. ___

D3587: pathencode: fix importing hashlib on Python 3

2018-05-18 Thread durin42 (Augie Fackler)
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