Skip to content

load methods: support memoryview additionally to bytes #201

Open

Description

@ThomasWaldmann

Similar to #200, but for the return value of the load methods.

We would need to unit-test and document this for the return types of:

  • Store.load(name)
  • backend.load(name) for all backends

This is slightly more problematic than the store methods, because the caller then needs to be able to deal with memoryview or bytes (we can't just handle this internally).

Ideas:

  • it could just be documented that the return value might be memoryview or bytes - then it is just the caller's task to handle this. Could lead to rather ugly boilerplate in the caller code.
  • or there could be a flag in the Store and in the backends whether they are allowed to return both types or just bytes.

Activity

  1. added this to the 0.5.6 milestone on Jul 27, 2026
  2. changed the title [-]store methods: support memoryview additionally to bytes[/-] [+]load methods: support memoryview additionally to bytes[/+] on Jul 27, 2026
  3. ThomasWaldmann commented on Jul 30, 2026

    @ThomasWaldmann
    MemberAuthor

    A memoryview must be released after one is finished with it.

    At least on PyPy it leaks badly if one does not.

  4. removed this from the 0.6.0 milestone on Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions