This is an archive of the discontinued Mercurial Phabricator instance.

doc: use an absolute path in sys.path to work around a python DLL loading bug
ClosedPublic

Authored by mharbison72 on May 2 2022, 10:07 PM.

Details

Summary

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

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.May 2 2022, 10:07 PM
Alphare accepted this revision.May 3 2022, 4:30 AM
Alphare added a subscriber: Alphare.

I feel like this should be on stable?

This revision is now accepted and ready to land.May 3 2022, 4:30 AM

I feel like this should be on stable?

Good call. I noticed this building the thg installer (which needs default), but it also affects PyOxidizer builds.