bpo-46841: Use a `bytes` object for `_co_code_adaptive` by brandtbucher · Pull Request #32205 · python/cpython
The memoryview was a fun idea, but it actually creates some subtle memory management issues (since it can possibly outlive the code object it references).
While we could fix this by hacking around inside of the returned memoryview or giving code objects full buffer protocol support, a bytes object is totally fine here (and it even makes disassembly a bit easier).