# HG changeset patch # User Matt Harbison # Date 1651543499 14400 # Node ID 1b6e381521c5288b9223443b42321220c0839233 # Parent f2ef6a4f918f59f2ff01e5d4dc01c94ea35bd32f doc: use an absolute path in sys.path to work around a python DLL loading bug This bug[1] was causing the zstd entry under "Available Compression Engines" to be omitted from the documentation for some versions of python3. I could upgrade, but past upgrades have broken venvs and clobbered installed packages. It's a trivial workaround, so there's no sense in leaving this subtle issue. It was flushed out by changing the module policy here from 'allow' to 'c', and seeing this error: ImportError: DLL load failed while importing parsers: The parameter is incorrect. [1] https://github.com/python/cpython/issues/87271 Differential Revision: https://phab.mercurial-scm.org/D12599 diff -r f2ef6a4f918f -r 1b6e381521c5 doc/gendoc.py --- a/doc/gendoc.py Mon Apr 25 16:45:03 2022 +0200 +++ b/doc/gendoc.py Mon May 02 22:04:59 2022 -0400 @@ -22,7 +22,7 @@ # available. Relax C module requirements. os.environ['HGMODULEPOLICY'] = 'allow' # import from the live mercurial repo -sys.path.insert(0, "..") +sys.path.insert(0, os.path.abspath("..")) from mercurial import demandimport demandimport.enable()