When using a frozen binary with py3 < 3.7, there's no
importlib.resources module, so we use the code path that reads the
resources from the file system. That code path expects bytes for
package name and resource name.
Details
Details
- Reviewers
marmoute pulkit - Group Reviewers
hg-reviewers - Commits
- rHGe53a3d0ef416: templater: fix reading of templates in frozen binaries with py3 < 3.7
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
Comment Actions
Yes, it works on python >= 3.7 already before this patch. Then it uses importlib.resources. I tested the original patch that introduced this support for reading from resources using PyOxidizer (which uses >=3.7). I noticed that I had not gotten the < 3.7 case right only when I tried to run this code with our e2e tests at work, where we use a non-PyOxidizer way of freezing binaries with Python 3.6.
Comment Actions
looks good. As an unrelated change, maybe add a comment on the previous block to indicate it is relevant for all python starting from 3.9+