Home
last modified time | relevance | path

Searched hist:2067 (Results 1 – 2 of 2) sorted by relevance

/unit/src/python/
H A Dnxt_python_asgi.cdiff 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 Dchanges.xmldiff 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.