On 2021-03-07, Marco Atzeri via Cygwin wrote:

> Mercurial has been just updated to version 5.7
> https://cygwin.com/packages/summary/mercurial.html
>
> and it now depends on python3.8

Just updated:

  $ grep mercurial /var/log/setup.log.full

  Installing file 
cygfile:///usr/lib/python3.8/site-packages/mercurial-5.7-py3.8.egg-info

and had a problem:

  $ hg status

Traceback (most recent call last):
  File "/usr/bin/hg", line 59, in <module>
    dispatch.run()
  File "/usr/lib/python3.8/site-packages/hgdemandimport/demandimportpy2.py", 
line 157, in __getattr__
    self._load()
  File "/usr/lib/python3.8/site-packages/hgdemandimport/demandimportpy2.py", 
line 97, in _load
    _origimport, head, globals, locals, None, level
  File "/usr/lib/python3.8/site-packages/hgdemandimport/demandimportpy2.py", 
line 44, in _hgextimport
    return importfunc(name, globals, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/mercurial/dispatch.py", line 21, in 
<module>
    from .i18n import _
  File "/usr/lib/python3.8/site-packages/hgdemandimport/demandimportpy2.py", 
line 257, in _demandimport
    _origimport, name, globals, locals, level=level
  File "/usr/lib/python3.8/site-packages/hgdemandimport/demandimportpy2.py", 
line 44, in _hgextimport
    return importfunc(name, globals, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/mercurial/i18n.py", line 15, in 
<module>
    from .pycompat import getattr
  File "/usr/lib/python3.8/site-packages/hgdemandimport/demandimportpy2.py", 
line 257, in _demandimport
    _origimport, name, globals, locals, level=level
  File "/usr/lib/python3.8/site-packages/hgdemandimport/demandimportpy2.py", 
line 44, in _hgextimport
    return importfunc(name, globals, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/mercurial/pycompat.py", line 38, in 
<module>
    from .thirdparty.concurrent import futures
  File "/usr/lib/python3.8/site-packages/hgdemandimport/demandimportpy2.py", 
line 257, in _demandimport
    _origimport, name, globals, locals, level=level
  File "/usr/lib/python3.8/site-packages/hgdemandimport/demandimportpy2.py", 
line 44, in _hgextimport
    return importfunc(name, globals, *args, **kwargs)
ImportError: No module named concurrent

Fixed with:

  bash# update-alternatives --config python

  There are 3 programs which provide 'python'.

    Selection    Command
  -----------------------------------------------
   + 1           /usr/bin/python2.7
     2           /usr/bin/python3.6
  *  3           /usr/bin/python3.8

  Enter to keep the current selection[+], or type selection number: 3

That would be avoided (or problem delayed until impacted another utility) if
/usr/bin/hg had shebang /usr/bin/python3 instead of /usr/bin/python.

Thx for stabilizing Mercurial!

-- 
http://defun.work/

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to