public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [Attn: mercurial maintainer] hg fails with python3.9
@ 2022-04-28 14:27 Ken Brown
  2022-04-29  9:46 ` Jari Aalto
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Brown @ 2022-04-28 14:27 UTC (permalink / raw)
  To: cygwin; +Cc: Jari Aalto

/usr/bin/hg specifies /usr/bin/python3 in its shebang, but further down it has

   libdir = '../lib/python3.8/site-packages'

This causes hg to fail as follows if /usr/bin/python3 points to python3.9:

$ hg
Traceback (most recent call last):
   File "/usr/lib/python3.8/site-packages/mercurial/policy.py", line 69, in 
_importfrom
     fakelocals[modname] = mod = getattr(pkg, modname)
   File "/usr/lib/python3.8/site-packages/mercurial/pycompat.py", line 317, in w
     return f(object, sysstr(name), *args)
AttributeError: module 'mercurial.cext' has no attribute 'parsers'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "/usr/bin/hg", line 61, in <module>
     dispatch.run()
   File "/usr/lib/python3.9/importlib/util.py", line 245, in __getattribute__
     self.__spec__.loader.exec_module(self)
   File "<frozen importlib._bootstrap_external>", line 850, in exec_module
   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
   File "/usr/lib/python3.8/site-packages/mercurial/dispatch.py", line 21, in 
<module>
     from .i18n import _
   File "/usr/lib/python3.9/importlib/util.py", line 245, in __getattribute__
     self.__spec__.loader.exec_module(self)
   File "/usr/lib/python3.8/site-packages/mercurial/i18n.py", line 123, in <module>
     if _plain():
   File "/usr/lib/python3.8/site-packages/mercurial/i18n.py", line 115, in _plain
     b'HGPLAIN' not in encoding.environ
   File "/usr/lib/python3.9/importlib/util.py", line 245, in __getattribute__
     self.__spec__.loader.exec_module(self)
   File "/usr/lib/python3.8/site-packages/mercurial/encoding.py", line 41, in 
<module>
     charencode = policy.importmod('charencode')
   File "/usr/lib/python3.8/site-packages/mercurial/policy.py", line 116, in 
importmod
     mod = _importfrom(pn, mn)
   File "/usr/lib/python3.8/site-packages/mercurial/policy.py", line 71, in 
_importfrom
     raise ImportError('cannot import name %s' % modname)
ImportError: cannot import name parsers

Ken

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-02 14:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 14:27 [Attn: mercurial maintainer] hg fails with python3.9 Ken Brown
2022-04-29  9:46 ` Jari Aalto
     [not found]   ` <4615caa2-972c-6f9e-1fc0-3d2bfbe3083c@dronecode.org.uk>
2022-04-29 14:11     ` Jari Aalto
2022-04-30 14:16       ` Jon Turney
2022-05-02 14:57         ` Jari Aalto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).