public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin <cygwin@cygwin.com>
Cc: Jari Aalto <jari.aalto@cante.net>
Subject: [Attn: mercurial maintainer] hg fails with python3.9
Date: Thu, 28 Apr 2022 10:27:17 -0400	[thread overview]
Message-ID: <257359ee-9899-47c9-a158-fb79ef4890a3@cornell.edu> (raw)

/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

             reply	other threads:[~2022-04-28 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 14:27 Ken Brown [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=257359ee-9899-47c9-a158-fb79ef4890a3@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin@cygwin.com \
    --cc=jari.aalto@cante.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).