From 8e163a6e3b63fb49fe582a04a831ee1f16bc6dcf Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sat, 21 Aug 2021 13:26:10 -0400 Subject: [PATCH] Update memoryview-related comments Co-authored-by: Benedikt --- beets/dbcore/types.py | 2 +- beets/library.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/beets/dbcore/types.py b/beets/dbcore/types.py index a5c06bac0..fc1f6e74e 100644 --- a/beets/dbcore/types.py +++ b/beets/dbcore/types.py @@ -98,7 +98,7 @@ class Type(object): https://docs.python.org/2/library/sqlite3.html#sqlite-and-python-types Flexible fields have the type affinity `TEXT`. This means the - `sql_value` is either a `buffer`/`memoryview` or a `unicode` object` + `sql_value` is either a `memoryview` or a `unicode` object` and the method must handle these in addition. """ if isinstance(sql_value, memoryview): diff --git a/beets/library.py b/beets/library.py index 54911488a..f2e92af5b 100644 --- a/beets/library.py +++ b/beets/library.py @@ -38,7 +38,7 @@ from beets.dbcore import types import beets # To use the SQLite "blob" type, it doesn't suffice to provide a byte -# string; SQLite treats that as encoded text. Wrapping it in a tells it +# string; SQLite treats that as encoded text. Wrapping it in a `memoryview` tells it # that we actually mean non-text data. BLOB_TYPE = memoryview