Skip to content

Commit 4a196e8

Browse files
committed
Update codegen/README.md to match removal of protobuf 3 code
1 parent d116710 commit 4a196e8

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

codegen/README.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,8 @@ This will output the code in `src/` at the root of the repository.
2323
./generate-proto.sh
2424
```
2525

26-
This command builds and runs two separate docker containers that generate protobuf code
27-
using toolchains compatible with protobuf==3.19.6 and protobuf==5.29.4 (effectively protobuf 4+).
26+
This command builds and runs a Docker container that generates protobuf code
27+
using toolchains compatible with protobuf==5.29.4 (effectively protobuf 4+).
2828

2929
We run the generation tools in a docker container, to ensure specific versions: grpcio-tools
3030
and Python in particular.
31-
32-
## Compatibility layer
33-
34-
The generated code lands in the following directories:
35-
36-
Protobuf 3: `src/neptune_api/proto/protobuf_v3`
37-
Protobuf 4+: `src/neptune_api/proto/protobuf_v4plus`
38-
39-
There is a simple compatibility layer in `neptune_api/proto/__init__.py` that loads the
40-
correct module based on the installed `protobuf` version.
41-
42-
The `.pyi` files in the `proto` directories use the v3 versions, to minimize potential
43-
compatibility risks. It is an arbitrary choice. You can point your IDE to the v4+
44-
version if you prefer.
45-
46-
# Why keep two versions?
47-
48-
* We want to have as broad range of compatibility as possible.
49-
* Version 4+ uses upb, which is a more efficient serialization format.
50-
* We cannot be sure whether the code generated by old grpcio will always take advantage
51-
of changes introduced in newer protobuf versions.

0 commit comments

Comments
 (0)