[16.0][ADD] fastapi_log
In the past months we have been proposing many improvements to https://github.com/OCA/rest-framework/pull/501 with https://github.com/akretion/rest-framework/pull/8.
From more than a month ago, the branch is outdated (https://github.com/akretion/rest-framework/pull/8#issuecomment-3018665362) and it is causing conflicts in https://github.com/akretion/rest-framework/pull/8.
Here we are proposing all those improvements to OCA directly.
@simahawk here I addressed your latest comments https://github.com/akretion/rest-framework/pull/8#discussion_r2204278496 and https://github.com/akretion/rest-framework/pull/8#issuecomment-3068521632, please have a look
The error in the tests (https://github.com/OCA/rest-framework/actions/runs/17124124402/job/48571725570?pr=554#step:8:120) does not seem to be related to these changes
Stack
2025-08-21 10:24:04,335 340 INFO odoo odoo.modules.loading: Loading module graphql_base (12/53)
2025-08-21 10:24:04,475 340 CRITICAL odoo odoo.modules.module: Couldn't load module graphql_base
2025-08-21 10:24:04,475 340 CRITICAL odoo odoo.modules.module: cannot import name 'HttpQueryError' from 'graphql_server' (/opt/odoo-venv/lib/python3.10/site-packages/graphql_server/__init__.py)
2025-08-21 10:24:04,477 340 WARNING odoo odoo.modules.loading: Transient module states were reset
2025-08-21 10:24:04,477 340 ERROR odoo odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/opt/odoo/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/opt/odoo/odoo/modules/loading.py", line 493, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/opt/odoo/odoo/modules/loading.py", line 374, in load_marked_modules
loaded, processed = load_module_graph(
File "/opt/odoo/odoo/modules/loading.py", line 190, in load_module_graph
load_openerp_module(package.name)
File "/opt/odoo/odoo/modules/module.py", line 471, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "/__w/rest-framework/rest-framework/graphql_base/__init__.py", line 4, in
from .controllers import GraphQLControllerMixin
File "/__w/rest-framework/rest-framework/graphql_base/controllers/__init__.py", line 1, in
from .main import GraphQLControllerMixin
File "/__w/rest-framework/rest-framework/graphql_base/controllers/main.py", line 6, in
from graphql_server import (
ImportError: cannot import name 'HttpQueryError' from 'graphql_server' (/opt/odoo-venv/lib/python3.10/site-packages/graphql_server/__init__.py)
2025-08-21 10:24:04,478 340 CRITICAL odoo odoo.service.server: Failed to initialize database `odoo`.
Traceback (most recent call last):
File "/opt/odoo/odoo/service/server.py", line 1333, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "", line 2, in new
File "/opt/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/opt/odoo/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/opt/odoo/odoo/modules/loading.py", line 493, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/opt/odoo/odoo/modules/loading.py", line 374, in load_marked_modules
loaded, processed = load_module_graph(
File "/opt/odoo/odoo/modules/loading.py", line 190, in load_module_graph
load_openerp_module(package.name)
File "/opt/odoo/odoo/modules/module.py", line 471, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "/__w/rest-framework/rest-framework/graphql_base/__init__.py", line 4, in
from .controllers import GraphQLControllerMixin
File "/__w/rest-framework/rest-framework/graphql_base/controllers/__init__.py", line 1, in
from .main import GraphQLControllerMixin
File "/__w/rest-framework/rest-framework/graphql_base/controllers/main.py", line 6, in
from graphql_server import (
ImportError: cannot import name 'HttpQueryError' from 'graphql_server' (/opt/odoo-venv/lib/python3.10/site-packages/graphql_server/__init__.py)
Rebased to check if this is affected by https://github.com/fastapi/fastapi/commit/51ad909ffe9f5b2d5c9315554e75e39a8a2d725c. It still looks good :sunglasses: