@@ -727,12 +727,12 @@ See also:
727727
728728 cls.def (
729729 " __contains__" ,
730- [](const Self& self, std::string_view key) -> bool {
730+ [](const Self& self, StrOrBytesView key) -> bool {
731731 kvstore::ReadOptions options;
732732 options.byte_range = OptionalByteRangeRequest::Stat ();
733733 auto result = ValueOrThrow (InterruptibleWait ([&]() {
734734 ScopedPyCriticalSection cs (reinterpret_cast <const PyObject*>(&self));
735- return kvstore::Read (self.value , key, std::move (options));
735+ return kvstore::Read (self.value , key. value , std::move (options));
736736 }()));
737737 return result.has_value ();
738738 },
@@ -904,10 +904,10 @@ See also:
904904
905905 cls.def (
906906 " __delitem__" ,
907- [](const Self& self, std::string_view key) {
907+ [](const Self& self, StrOrBytesView key) {
908908 ValueOrThrow (InterruptibleWait ([&]() {
909909 ScopedPyCriticalSection cs (reinterpret_cast <const PyObject*>(&self));
910- return kvstore::Write (self.value , key, std::nullopt );
910+ return kvstore::Write (self.value , key. value , std::nullopt );
911911 }()));
912912 },
913913 py::arg (" key" ), R"(
@@ -1353,9 +1353,9 @@ Modifies a spec.
13531353 ScopedPyCriticalSection cs (reinterpret_cast <const PyObject*>(&self));
13541354 return self.value .path ;
13551355 },
1356- [](Self& self, std::string_view path) {
1356+ [](Self& self, StrOrBytesView path) {
13571357 ScopedPyCriticalSection cs (reinterpret_cast <PyObject*>(&self));
1358- self.value .path = path;
1358+ self.value .path = path. value ;
13591359 },
13601360 R"(
13611361Path prefix within the base key-value store.
@@ -1395,10 +1395,10 @@ Path prefix within the base key-value store.
13951395
13961396 cls.def (
13971397 " __add__" ,
1398- [](const Self& self, std::string_view suffix) -> kvstore::Spec {
1398+ [](const Self& self, StrOrBytesView suffix) -> kvstore::Spec {
13991399 ScopedPyCriticalSection cs (reinterpret_cast <const PyObject*>(&self));
14001400 auto new_spec = self.value ;
1401- new_spec.AppendSuffix (suffix);
1401+ new_spec.AppendSuffix (suffix. value );
14021402 return new_spec;
14031403 },
14041404 py::arg (" suffix" ), R"(
@@ -1421,10 +1421,10 @@ ensure there is a :python:`'/'` separator, use :py:obj:`.__truediv__` instead.
14211421
14221422 cls.def (
14231423 " __truediv__" ,
1424- [](const Self& self, std::string_view component) -> kvstore::Spec {
1424+ [](const Self& self, StrOrBytesView component) -> kvstore::Spec {
14251425 ScopedPyCriticalSection cs (reinterpret_cast <const PyObject*>(&self));
14261426 auto new_spec = self.value ;
1427- new_spec.AppendPathComponent (component);
1427+ new_spec.AppendPathComponent (component. value );
14281428 return new_spec;
14291429 },
14301430 py::arg (" component" ), R"(
0 commit comments