Closed mikhainin closed 2 months ago
Reproduce-case betterproto-repro.zip
Can you try again with the latest version of betterproto (last commit on the master branch)? It seems to be the same problem as in https://github.com/danielgtaylor/python-betterproto/issues/606 , which was fixed yesterday.
Hi @AdrienVannson,
Thanks for taking the time to look at this. Yes, the latest master works well
betterproto = { git = "https://github.com/danielgtaylor/python-betterproto.git", rev = "1161803" }
$ poetry lock
$ poetry install
Installing dependencies from lock file
Package operations: 0 installs, 1 updates, 0 removals
- Updating betterproto (2.0.0b7 -> 2.0.0b7 1161803)
$ poetry run python src/main.py
ok
Summary
AttributeError on serializing pydantic message with inner message
Reproduction Steps
Having the following project structure
src/test.proto
Compile command
And finally,
src/main.py
Expected Results
Seeing "ok"
Actual Results
System Information
libprotoc 27.3 Python 3.11.9 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: danielgtaylor@gmail.com License: MIT Location: /Users/mikhailgalanin/Library/Caches/pypoetry/virtualenvs/betterproto-repro-O0YfRvug-py3.11/lib/python3.11/site-packages Requires: grpclib, python-dateutil, typing-extensions Required-by: betterproto-repro
Checklist
pip install -U --pre betterproto
, if possible.