[MacPorts] #30199: Mercurial 1.9 broken, cannot import readauthforuri
#30199: Mercurial 1.9 broken, cannot import readauthforuri -------------------------------------------------------+-------------------- Reporter: m@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: mercurial push pull import readauthforuri | Port: mercurial @1.9 (devel, python) -------------------------------------------------------+-------------------- I upgraded to Mercurial 1.9, unfortunately pull and push does not work anymore: {{{ $ hg pull abort: cannot import name readauthforuri! }}} -- Ticket URL: <https://trac.macports.org/ticket/30199> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30199: Mercurial 1.9 broken, cannot import readauthforuri -------------------------------------------------------+-------------------- Reporter: m@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: mercurial push pull import readauthforuri | Port: mercurial @1.9 (devel, python) -------------------------------------------------------+-------------------- Comment(by m@…): Maybe related to py26-mercurial_keyring? {{{ Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/dispatch.py", line 87, in _runcatch return _dispatch(req) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/dispatch.py", line 675, in _dispatch cmdpats, cmdoptions) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/dispatch.py", line 454, in runcommand ret = _runcommand(ui, options, cmd, d) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/dispatch.py", line 729, in _runcommand return checkargs() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/dispatch.py", line 683, in checkargs return cmdfunc() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/dispatch.py", line 672, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/util.py", line 385, in check return func(*args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/extensions.py", line 137, in wrap util.checksignature(origfn), *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/util.py", line 385, in check return func(*args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/hgext/rebase.py", line 577, in pullrebase orig(ui, repo, *args, **opts) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/util.py", line 385, in check return func(*args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/extensions.py", line 137, in wrap util.checksignature(origfn), *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/util.py", line 385, in check return func(*args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/hgext/mq.py", line 3218, in mqcommand return orig(ui, repo, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/util.py", line 385, in check return func(*args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/commands.py", line 3772, in pull other = hg.peer(repo, opts, source) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/hg.py", line 104, in peer return repository(rui, path, create) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/hg.py", line 93, in repository repo = _peerlookup(path).instance(ui, path, create) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/httprepo.py", line 230, in instance inst._fetchcaps() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/httprepo.py", line 56, in _fetchcaps self.caps = set(self._call('capabilities').split()) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/httprepo.py", line 163, in _call fp = self._callstream(cmd, **args) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/httprepo.py", line 113, in _callstream resp = self.urlopener.open(req) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 875, in http_error_401 url, req, headers) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial/url.py", line 419, in http_error_auth_reqed self, auth_header, host, req, headers) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 853, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 856, in retry_http_basic_auth user, pw = self.passwd.find_user_password(realm, host) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial_keyring.py", line 294, in find_user_password return self._pwd_handler.find_auth(self, realm, authuri) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial_keyring.py", line 123, in find_auth auth_user, pwd, prefix_url = self.load_hgrc_auth(ui, base_url) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages/mercurial_keyring.py", line 237, in load_hgrc_auth from mercurial.url import readauthforuri ImportError: cannot import name readauthforuri abort: cannot import name readauthforuri! }}} -- Ticket URL: <https://trac.macports.org/ticket/30199#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30199: Mercurial 1.9 broken, cannot import readauthforuri -------------------------------------------------------+-------------------- Reporter: m@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: mercurial push pull import readauthforuri | Port: mercurial @1.9 (devel, python) -------------------------------------------------------+-------------------- Comment(by m@…): Macports installs mercurial_keyring version 0.4.4, version 0.4.5 contains the following fix: {{{ # HG changeset patch -- Bitbucket.org # Project mercurial_keyring # URL https://bitbucket.org/Mekk/mercurial_keyring/overview # User Steve Borho <steve@borho.org> # Date 1304917199 18000 # Node ID a6e455012d1406f694365155941aa7dc3dad5d11 # Parent 04cd5a463bf754f5ee2d73d2238fa2c42038e7ce readauthforuri has been moved into new httpconnection module --- a/mercurial_keyring.py +++ b/mercurial_keyring.py @@ -233,8 +233,12 @@ class HTTPPasswordHandler(object): local_passwordmgr = passwordmgr(local_ui) auth_token = local_passwordmgr.readauthtoken(base_url) except AttributeError: - # hg 1.8 - from mercurial.url import readauthforuri + try: + # hg 1.8 + from mercurial.url import readauthforuri + except ImportError: + # hg 1.9 + from mercurial.httpconnection import readauthforuri res = readauthforuri(local_ui, base_url) if res: group, auth_token = res }}} I think the outdated keyring extension is the culprit... -- Ticket URL: <https://trac.macports.org/ticket/30199#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30199: Mercurial 1.9 broken, cannot import readauthforuri -------------------------------------------------------+-------------------- Reporter: m@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: mercurial push pull import readauthforuri | Port: mercurial @1.9 (devel, python) -------------------------------------------------------+-------------------- Comment(by m@…): I created Ticket #30200 which refers to the correct port for this issue. -- Ticket URL: <https://trac.macports.org/ticket/30199#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30199: Mercurial 1.9 broken, cannot import readauthforuri ------------------------------+--------------------------------------------- Reporter: m@… | Owner: deric@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: mercurial ------------------------------+--------------------------------------------- Changes (by jmr@…): * keywords: mercurial push pull import readauthforuri => * owner: macports-tickets@… => deric@… * port: mercurial @1.9 (devel, python) => mercurial -- Ticket URL: <https://trac.macports.org/ticket/30199#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30199: Mercurial 1.9 broken, cannot import readauthforuri ------------------------------+--------------------------------------------- Reporter: m@… | Owner: deric@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: mercurial ------------------------------+--------------------------------------------- Comment(by and.damore@…): Please check #30200 and confirm this ticket is fixed. -- Ticket URL: <https://trac.macports.org/ticket/30199#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30199: Mercurial 1.9 broken, cannot import readauthforuri ------------------------------+--------------------------------------------- Reporter: m@… | Owner: deric@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: mercurial ------------------------------+--------------------------------------------- Comment(by m@…): Works now as expected. Thanks! -- Ticket URL: <https://trac.macports.org/ticket/30199#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30199: Mercurial 1.9 broken, cannot import readauthforuri -------------------------------+-------------------------------------------- Reporter: m@… | Owner: deric@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: fixed | Keywords: Port: mercurial | -------------------------------+-------------------------------------------- Changes (by jmr@…): * status: new => closed * resolution: => fixed -- Ticket URL: <https://trac.macports.org/ticket/30199#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts