This is an archive of the discontinued Mercurial Phabricator instance.

resourceutil: force filesystem access to resources when using py2exe
AcceptedPublic

Authored by mharbison72 on Wed, Apr 13, 6:48 PM.

Details

Reviewers
Alphare
Group Reviewers
hg-reviewers
Summary

I don't know why it doesn't work, but it avoids this fatal error on startup:

> hg debugshell
Traceback (most recent call last):
  File "hg", line 58, in <module>
  File "mercurial\dispatch.pyc", line 143, in run
  File "mercurial\dispatch.pyc", line 232, in dispatch
  File "mercurial\dispatch.pyc", line 254, in _rundispatch
  File "mercurial\ui.pyc", line 316, in load
  File "mercurial\rcutil.pyc", line 98, in rccomponents
  File "mercurial\rcutil.pyc", line 68, in default_rc_resources
  File "mercurial\utils\resourceutil.pyc", line 102, in contents
  File "<frozen zipimport>", line 775, in contents
AssertionError

I assume the py2 version of py2exe never hit this because importlib.resources
failed to import.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

mharbison72 created this revision.Wed, Apr 13, 6:48 PM
Alphare accepted this revision.Thu, Apr 14, 4:47 AM
Alphare added a subscriber: Alphare.

The setup.py transition to modern Python packaging is going to be fun!

This revision is now accepted and ready to land.Thu, Apr 14, 4:47 AM