Documentation
See relevant discussion on PyO3/pyo3#5906 and the discussion linked from that.
PyBytesWriter_Resize may need to reallocate the buffer to grow it. If this happens, any pointer previously returned by PyBytesWriter_GetData will be invalidated, but this is not documented -- only PyBytesWriter_Finish and PyBytesWriter_Discard are documented to invalidate previous data pointers.
I am happy to submit a PR for this issue if that would be helpful. (I assume I only need to modify Doc/c-api/bytes.rst?)