borgbackup / borgbackup/borgstore

load methods: support memoryview additionally to bytes

Open
#201 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
25
Forks
8
Avg merge
16m
Merged PRs (30d)
8

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading Store.load(name) and backend.load(name) across all backends, then inspect the existing unit tests and documentation for load return types. Decide whether the project should document both memoryview and bytes or add a bytes-only option, and cover the chosen behavior for every backend in tests and docs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.