This is an archive of the discontinued Mercurial Phabricator instance.

templater: make open_template() read from resources if in frozen binary
ClosedPublic

Authored by martinvonz on Aug 5 2020, 12:26 PM.

Details

Summary

This takes the number of failing tests with PyOxidizer from 87 to 72.

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

martinvonz created this revision.Aug 5 2020, 12:26 PM
indygreg accepted this revision.Aug 5 2020, 8:31 PM
This revision is now accepted and ready to land.Aug 5 2020, 8:31 PM
indygreg added inline comments.Aug 5 2020, 9:00 PM
mercurial/templater.py
1098

pyflakes is complaining about undefined symbols on Python 2. I'm not sure how to best handle this though. I'll leave this queued for now because it doesn't seem to be harming tests otherwise. But it may have impact for non-PyOxidizer Windows py2exe builds.

martinvonz added inline comments.Aug 6 2020, 1:11 AM
mercurial/templater.py
1098

Oops, sorry about that, I've only been running py3 tests lately. It's probably fine to simply catch the broader classes ImportError and OSError. I'll send a patch for that.