'module' object has no attribute 'ignore' with Mercurial 4.7
Created originally on Bitbucket by cronik (Kyle Cronin)
After upgrading to Mercurial 4.7 mercurial keyring fails with the following stack trace.
** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring
** which supports versions unknown of Mercurial.
** Please disable mercurial_keyring and try your action again.
** If that fixes the bug please report it to https://bitbucket.org/Mekk/mercurial_keyring/issues
** Python 2.7.15 (default, Jun 18 2018, 11:44:54) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
** Mercurial Distributed SCM (version 4.7)
** Extensions loaded: churn, convert, mercurial_keyring, rebase, purge, record, shelve, strip, eol, extdiff
Traceback (most recent call last):
File "/usr/local/bin/hg", line 41, in <module>
dispatch.run()
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 90, in run
status = dispatch(req)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 213, in dispatch
ret = _runcatch(req) or 0
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 354, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 362, in _callcatch
return scmutil.callcatch(ui, func)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/scmutil.py", line 161, in callcatch
return func()
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 344, in _runcatchfunc
return _dispatch(req)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 984, in _dispatch
cmdpats, cmdoptions)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 730, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 992, in _runcommand
return cmdfunc()
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 981, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/util.py", line 1528, in check
return func(*args, **kwargs)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/commands.py", line 4369, in push
opargs=opargs)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/exchange.py", line 528, in push
_pushbundle2(pushop)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/exchange.py", line 1110, in _pushbundle2
'url': pushop.remote.url(),
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/thirdparty/concurrent/futures/_base.py", line 457, in result
return self.__get_result()
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/wireprotov1peer.py", line 210, in sendcommands
result = fn(**pycompat.strkwargs(args))
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/wireprotov1peer.py", line 480, in unbundle
stream = self._calltwowaystream('unbundle', bundle, heads=heads)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 533, in _calltwowaystream
return self._callstream(cmd, data=fp_, headers=headers, **args)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 462, in _callstream
resp = sendrequest(self.ui, self._urlopener, req)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 311, in sendrequest
res = opener.open(req)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 909, in http_error_401
url, req, headers)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/url.py", line 463, in http_error_auth_reqed
self, auth_header, host, req, headers)
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 565, in basic_http_error_auth_reqed
return basic_http_error_auth_reqed.orig(self, authreq, host, req, headers)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 887, in http_error_auth_reqed
return self.retry_http_basic_auth(host, req, realm)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/url.py", line 467, in retry_http_basic_auth
realm, urllibcompat.getfullurl(req))
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 556, in find_user_password
return self._pwd_handler.find_auth(self, realm, authuri, req)
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 386, in find_auth
pwmgr, realm, authuri, skip_caches=after_bad_auth)
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 349, in get_credentials
keyring_pwd = password_store.get_http_password(keyring_url, actual_user)
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 164, in get_http_password
self._format_http_key(url, username))
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 205, in _read_password_from_keyring
keyring = import_keyring()
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 136, in import_keyring
"fs.opener",
File "/usr/local/lib/python2.7/site-packages/mercurial_extension_utils.py", line 1013, in direct_import_ext
if blocked_module not in demandimport.ignore:
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/hgdemandimport/demandimportpy2.py", line 146, in __getattr__
return getattr(self._module, attr)
AttributeError: 'module' object has no attribute 'ignore'
Installed mercurial_keyring info
pip show mercurial_keyring
Name: mercurial-keyring
Version: 1.1.8
Summary: Mercurial Keyring Extension
Home-page: http://bitbucket.org/Mekk/mercurial_keyring
Author: Marcin Kasperski
Author-email: Marcin.Kasperski@mekk.waw.pl
License: BSD
Location: /usr/local/lib/python2.7/site-packages
Requires: mercurial-extension-utils, keyring
Required-by: