Issue
The file queue_job/controllers/main.py uses Python 3.10+ union operator (|) syntax for type hints, which is incompatible with Python 3.9 that Odoo 16.0 targets.
Location
- Line 30:
def _acquire_job(cls, env: api.Environment, job_uuid: str) -> Job | None:
Details
The union operator (|) for type hints was introduced in PEP 604 for Python 3.10. For Python 3.9 compatibility, this should use the Optional type from the typing module or the older Union syntax.
Issue
The file
queue_job/controllers/main.pyuses Python 3.10+ union operator (|) syntax for type hints, which is incompatible with Python 3.9 that Odoo 16.0 targets.Location
def _acquire_job(cls, env: api.Environment, job_uuid: str) -> Job | None:Details
The union operator (
|) for type hints was introduced in PEP 604 for Python 3.10. For Python 3.9 compatibility, this should use theOptionaltype from thetypingmodule or the olderUnionsyntax.