rest-framework
rest-framework copied to clipboard
[17.0] Circular imports when installing fastapi
Module
fastapi
Describe the bug
When I install this module and I have fastapi already installed in the virtual environment, I get circular import errors.
ImportError: cannot import name 'APIRouter' from partially initialized module 'fastapi' (most likely due to a circular import) (odoo_addons/fastapi/__init__.py) 2025-09-23 09:59:30,831 1537745 INFO odoo_prod werkzeug: 127.0.0.1 - - [23/Sep/2025 09:59:30] "POST /web/dataset/call_button HTTP/1.1" 200 - 1570 0.423 0.980
To Reproduce
Affected versions:
Steps to reproduce the behavior:
- Extract the fastapi folder to the addons directory
- Install the module
Expected behavior I don´t understand why the exact same name is chosen for the odoo module as the library it all originates from. This is asking for trouble.