Searched hist:2067 (Results 1 – 2 of 2) sorted by relevance
/unit/src/python/ |
H A D | nxt_python_asgi.c | diff 2067:78864c9d5ba8 Mon Feb 07 21:04:00 UTC 2022 Max Romanov <max.romanov@nginx.com> Python: fixing incorrect function object dereference.
The __call__ method can be native and not be a PyFunction type. A type check is thus required before accessing op_code and other fields.
Reproduced on Ubuntu 21.04, Python 3.9.4 and Falcon framework: here, the App.__call__ method is compiled with Cython, so accessing op_code->co_flags is invalid; accidentally, the COROUTINE bit is set which forces the Python module into the ASGI mode.
The workaround is explicit protocol specification.
Note: it is impossible to specify the legacy mode for ASGI.
|
/unit/docs/ |
H A D | changes.xml | diff 2067:78864c9d5ba8 Mon Feb 07 21:04:00 UTC 2022 Max Romanov <max.romanov@nginx.com> Python: fixing incorrect function object dereference.
The __call__ method can be native and not be a PyFunction type. A type check is thus required before accessing op_code and other fields.
Reproduced on Ubuntu 21.04, Python 3.9.4 and Falcon framework: here, the App.__call__ method is compiled with Cython, so accessing op_code->co_flags is invalid; accidentally, the COROUTINE bit is set which forces the Python module into the ASGI mode.
The workaround is explicit protocol specification.
Note: it is impossible to specify the legacy mode for ASGI.
|