Regenerating the proto files make the tests fail
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- build-system, compilers, testing
Línea de trabajo
Empieza con el comando de regeneración de README, luego ejecuta poe generate y poe test para reproducir el fallo test_struct. Inspecciona src/betterproto/lib/std/google/protobuf/__init__.py, especialmente los métodos generados Struct to_dict y from_dict. Se considera terminado cuando los archivos regenerados conservan el comportamiento esperado y la suite de tests pasa.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Regenerating the proto files make the tests fail
Reproduction Steps
Re-generate the files used in the compiler, as documented in the README:
protoc \
--plugin=protoc-gen-custom=src/betterproto/plugin/main.py \
--custom_opt=INCLUDE_GOOGLE \
--custom_out=src/betterproto/lib/std \
-I /usr/include/ \
/usr/include/google/protobuf/*.proto
Then, run poe generate and poe test
Expected Results
The tests should pass.
Actual Results
The test_struct test actually fails.
My guess is that the output files of the compiler have been manually edited to change the to_dict and from_dict methods of Struct (see https://github.com/danielgtaylor/python-betterproto/blame/master/src/betterproto/lib/std/google/protobuf/__init__.py#L2225 )
System Information
libprotoc 3.12.4
Python 3.12.6
Name: betterproto
Version: 2.0.0b7
Summary: A better Protobuf / gRPC generator & library
Home-page: https://github.com/danielgtaylor/python-betterproto
Author: Daniel G. Taylor
Author-email: [email protected]
License: MIT
Location: /[...]/.venv/lib/python3.12/site-packages
Editable project location: [...]
Requires: grpclib, python-dateutil, typing-extensions
Required-by:
Checklist
- I have searched the issues for duplicates.
- I have shown the entire traceback, if possible.
- I have verified this issue occurs on the latest prelease of betterproto which can be installed using
pip install -U --pre betterproto, if possible.
- Lenguaje dominante
- Python
- Estrellas
- 1.8k
- Forks
- 235
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 danielgtaylor/python-betterproto
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
-
bug investigation needed
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
-
bug investigation needed
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
bug investigation needed
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
danielgtaylor/python-betterproto#676 · 3 comentarios ·
Todos los issues de danielgtaylor/python-betterproto
Issues similares
-
[Bug]: IndexHandler.post crashes with HTTP 500 on malformed payloads, missing credentials, or when login is disabledPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 6 días
-
Bump zizmor to 1.31.1+Abiertogithub_actions
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
collective/icalendar#2003 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
openzim/python-scraperlib#360 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
volcengine/OpenViking#6445 ·
Los mantenedores suelen responder en 1 día