b2sdk: create_file prioritization should accept an enum, not a string
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 22/100
Direção de pesquisa
Start with Bucket.create_file and Bucket.create_file_stream in the b2sdk bucket module, and the .. TODO:: note in doc/source/advanced.rst that describes the current string values local, remote and local_verification. The design choices are open: the enum's member names, how strings stay accepted for backwards compatibility, and what an unknown value should raise. Settle those with a maintainer before coding. Done means both methods take the enum, the string values still work, and the typo case in the reproduction fails at the call site.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Description
Bucket.create_file and Bucket.create_file_stream accept source prioritization as a string, with the supported values being local, remote and local_verification. An enum would make the valid values discoverable through the type system and turn a typo into an immediate error rather than a silently different plan.
This was recorded as a .. TODO:: directive in doc/source/advanced.rst, where it was invisible in published builds and carried no owner or acceptance criteria. It is tracked here instead, as part of #601.
Note that this is an API design change rather than a documentation change, so it is filed separately from the documentation work in #601.
Steps to reproduce
bucket.create_file(input_sources, remote_name, file_info, prioritize='local')
bucket.create_file(input_sources, remote_name, file_info, prioritize='locol') # typo, not rejected at the call site
Expected behavior
Prioritization should be expressed as an enum, with the string values continuing to be accepted for backwards compatibility within the current interface version.
Actual behavior
Only strings are accepted, and an unrecognised value is not caught at the call site.
Environment
- Python version: Any supported version
- b2sdk version:
masteratf3ab7b71 - OS: Any
- Linguagem predominante
- Python
- Estrelas
- 214
- Forks
- 68
- Merge médio
- 51min
- PRs com merge (30d)
- 6
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Backblaze/b2-sdk-python
-
Download and copy sync actions print remote file names without escape_control_charsTalvez já em andamento @dreyfus92 assumiu há 15 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Backblaze/b2-sdk-python#631 ·
Mantenedores costumam responder em até 1 dia
-
SqliteAccountInfo profile name validation uses "re.match", so only the first character is checkedTalvez já em andamento @nazarli-shabnam assumiu há 9 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Backblaze/b2-sdk-python#629 ·
Mantenedores costumam responder em até 1 dia
-
Adopt the AI-native SDLC and repository policiesTalvez já em andamento @goanpeca assumiu há 18 dias. Abertaenhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 20/100
Backblaze/b2-sdk-python#634 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 50/100
Backblaze/b2-sdk-python#630 ·
Mantenedores costumam responder em até 1 dia
-
ci: cli-compat fails — 4 sse/sync integration tests broken in B2_Command_Line_Tool (all environments)Talvez livre de novo @ffumero2003 assumiu há 37 dias e não há nenhum pull request aberto. Abertabug testing
Backblaze/b2-sdk-python#627 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de Backblaze/b2-sdk-python
Issues semelhantes
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
btclib-org/btclib-node#2505 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
open-webui/open-webui#34462 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
gorakhargosh/watchdog#1462 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
openwisp/openwisp-monitoring#889 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
IETF-Hackathon/pqc-certificates#351 ·
Mantenedores costumam responder em até 2 dias