https://bz.mercurial-scm.org/show_bug.cgi?id=6268
Bug ID: 6268 Summary: hgweb with py3 error when enabling demandimport Product: Mercurial Version: 5.3 Hardware: PC OS: Linux Status: UNCONFIRMED Severity: bug Priority: wish Component: hgweb Assignee: bugzi...@mercurial-scm.org Reporter: philippe.pep...@logilab.fr CC: mercurial-devel@mercurial-scm.org Python Version: --- Hi, We have an issue when upgrading our mercurial hgweb server from 5.2.2 to 5.3 Here is how to reproduce the issue with gunicorn wsgi server: # cat << EOF > hgweb.config [paths] / = * EOF # cat << EOF > hgweb.py from mercurial import demandimport demandimport.enable() from mercurial.hgweb import hgweb application = hgweb(b"/tmp/hgweb.config") EOF # gunicorn3 hgweb:application [2020-02-11 15:03:17 +0100] [23266] [INFO] Starting gunicorn 19.9.0 [2020-02-11 15:03:17 +0100] [23266] [INFO] Listening at: http://127.0.0.1:8000 (23266) [2020-02-11 15:03:17 +0100] [23266] [INFO] Using worker: sync [2020-02-11 15:03:17 +0100] [23269] [INFO] Booting worker with pid: 23269 [2020-02-11 15:03:17 +0100] [23269] [ERROR] Exception in worker process Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gunicorn/arbiter.py", line 583, in spawn_worker worker.init_process() File "/usr/lib/python3/dist-packages/gunicorn/workers/base.py", line 129, in init_process self.load_wsgi() File "/usr/lib/python3/dist-packages/gunicorn/workers/base.py", line 138, in load_wsgi self.wsgi = self.app.wsgi() File "/usr/lib/python3/dist-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/usr/lib/python3/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load return self.load_wsgiapp() File "/usr/lib/python3/dist-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/lib/python3/dist-packages/gunicorn/util.py", line 375, in import_app __import__(module) File "/tmp/hgweb.py", line 4, in <module> application = hgweb(b"/tmp/hgweb.config") File "/usr/lib/python3/dist-packages/mercurial/hgweb/__init__.py", line 50, in hgweb return hgwebdir_mod.hgwebdir(config, baseui=baseui) File "/usr/lib/python3.7/importlib/util.py", line 245, in __getattribute__ self.__spec__.loader.exec_module(self) File "/usr/lib/python3/dist-packages/mercurial/hgweb/hgwebdir_mod.py", line 17, in <module> from .common import ( ImportError: cannot import name 'ErrorResponse' from 'mercurial.hgweb.common' (/usr/lib/python3/dist-packages/mercurial/hgweb/common.py) [2020-02-11 15:03:17 +0100] [23269] [INFO] Worker exiting (pid: 23269) [2020-02-11 15:03:17 +0100] [23266] [INFO] Shutting down: Master [2020-02-11 15:03:17 +0100] [23266] [INFO] Reason: Worker failed to boot. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel