[FIX] core: wsgi application entrypoint moved
The wsgi application entrypoint moved during the [httpocalypse]. Some clients don't use the odoo builtin wsgi server and have troubles upgrading from 15.0 to 16.0 because the `odoo.service.wsgi_server` module doesn't exist anymore. [httpocalypse]: https://github.com/odoo/odoo/pull/78857 closes odoo/odoo#106187 X-original-commit: 4e5d7d2e93fcd082bd1b3a9e76cedab85b46f456 Signed-off-by: Julien Castiaux <juc@odoo.com>
This commit is contained in:
@@ -5,6 +5,9 @@ from . import db
|
||||
from . import model
|
||||
from . import server
|
||||
|
||||
# deprecated since 15.3
|
||||
from . import wsgi_server
|
||||
|
||||
#.apidoc title: RPC Services
|
||||
|
||||
""" Classes of this module implement the network protocols that the
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import warnings
|
||||
import odoo.http
|
||||
|
||||
|
||||
def application(environ, start_response):
|
||||
|
||||
warnings.warn("The WSGI application entrypoint moved from "
|
||||
"odoo.service.wsgi_server.application to odoo.http.root "
|
||||
"in 15.3.",
|
||||
DeprecationWarning, stacklevel=1)
|
||||
return odoo.http.root(environ, start_response)
|
||||
@@ -25,8 +25,7 @@ conf = odoo.tools.config
|
||||
|
||||
# Path to the OpenERP Addons repository (comma-separated for
|
||||
# multiple locations)
|
||||
|
||||
conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons'
|
||||
#conf['addons_path'] = './odoo/addons,./addons'
|
||||
|
||||
# Optional database config if not using local socket
|
||||
#conf['db_name'] = 'mycompany'
|
||||
@@ -38,7 +37,7 @@ conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons'
|
||||
#----------------------------------------------------------
|
||||
# Generic WSGI handlers application
|
||||
#----------------------------------------------------------
|
||||
application = odoo.service.wsgi_server.application
|
||||
application = odoo.http.root
|
||||
|
||||
odoo.service.server.load_server_wide_modules()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user