b2sdk: create_file prioritization should accept an enum, not a string
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 22/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 214
- Forks
- 68
- Merge medio
- 51 min
- PR fusionados (30 d)
- 6
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Backblaze/b2-sdk-python
-
Download and copy sync actions print remote file names without escape_control_charsPosiblemente ocupada @dreyfus92 la tomó hace 15 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Backblaze/b2-sdk-python#631 ·
Los mantenedores suelen responder en 1 día
-
SqliteAccountInfo profile name validation uses "re.match", so only the first character is checkedPosiblemente ocupada @nazarli-shabnam la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Backblaze/b2-sdk-python#629 ·
Los mantenedores suelen responder en 1 día
-
Adopt the AI-native SDLC and repository policiesPosiblemente ocupada @goanpeca la tomó hace 18 días. Abiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
Backblaze/b2-sdk-python#634 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 50/100
Backblaze/b2-sdk-python#630 ·
Los mantenedores suelen responder en 1 día
-
ci: cli-compat fails — 4 sse/sync integration tests broken in B2_Command_Line_Tool (all environments)Quizá libre de nuevo @ffumero2003 la tomó hace 37 días y no hay ningún pull request abierto. Abiertobug testing
Backblaze/b2-sdk-python#627 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Backblaze/b2-sdk-python
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
btclib-org/btclib-node#2505 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
open-webui/open-webui#34462 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
gorakhargosh/watchdog#1462 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
openwisp/openwisp-monitoring#889 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
IETF-Hackathon/pqc-certificates#351 ·
Los mantenedores suelen responder en 2 días