Skip to content

Commit 6b64c23

Browse files
maxouelletfacebook-github-bot
authored andcommitted
Rename "Buffer" to "ContentBuffer"
Summary: This is a flaw in pyvrs2: it uses "Buffer" as the name for a content buffer. Unfortunately the name conflicts with the Buffer type annotation, and ends up creating broken python stubs I think the only sane fix forward is to just not name this "Buffer", unfortunately. I understand this is a breaking change, but I really don't have another good way forward here.... Reviewed By: georges-berenger Differential Revision: D69143136 fbshipit-source-id: fa5af362926240a9f3ffd4e590b76d414dfd2f73
1 parent 4e5072c commit 6b64c23

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

csrc/utils/PyBuffer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ void pybind_buffer(py::module& m) {
616616
image.recordIndex);
617617
});
618618

619-
py::class_<pyvrs::ContentBlockBuffer>(m, "Buffer", py::buffer_protocol())
619+
py::class_<pyvrs::ContentBlockBuffer>(m, "ContentBuffer", py::buffer_protocol())
620620
.def("jxl_compress", &pyvrs::ContentBlockBuffer::jxlCompress)
621621
.def("jpg_compress", &pyvrs::ContentBlockBuffer::jpgCompress)
622622
.def("decompress", &pyvrs::ContentBlockBuffer::decompress)

pyvrs/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
AudioSpec,
2020
AwaitableRecord,
2121
BinaryBuffer,
22-
Buffer,
2322
CompressionPreset,
2423
ContentBlock,
24+
ContentBuffer,
2525
extract_audio_track,
2626
FileSpec,
2727
ImageBuffer,
@@ -53,9 +53,9 @@
5353
"AudioSpec",
5454
"AwaitableRecord",
5555
"BinaryBuffer",
56-
"Buffer",
5756
"CompressionPreset",
5857
"ContentBlock",
58+
"ContentBuffer",
5959
"extract_audio_track",
6060
"FileSpec",
6161
"ImageBuffer",

0 commit comments

Comments
 (0)