Skip to content

Commit c928e2b

Browse files
committed
Embed runtime protobuf dependency
This embeds the sources of the protobuf dependency in our own project, thus avoiding issues with other packages that may depend on different versions of protobuf. (The version of the generated proto sources must be kept close to that of the protobuf dependency)
1 parent 421a699 commit c928e2b

118 files changed

Lines changed: 16538 additions & 321 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pyrightconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"ignore": [
3-
"**/*_pb2.py"
3+
"src/yamcs/api/*_pb2.py",
4+
"src/yamcs/protobuf/_vendor",
5+
"src/yamcs/protobuf/*_pb2.py"
46
],
57
"reportAttributeAccessIssue": false,
68
"reportInvalidTypeForm": "none"

yamcs-client/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ clean:
44
rm -rf build dist *.egg-info
55

66
lint:
7-
flake8 src --exclude '*pb2.py' --count --show-source --statistics
7+
flake8 src --exclude '*pb2.py,_vendor' --count --show-source --statistics
88

99
build_legacy: lint
1010
python setup.py sdist bdist_wheel

yamcs-client/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,10 @@ Install with pip
2424
## License
2525

2626
LGPL-3.0. See [LICENSE](https://github.com/yamcs/python-yamcs-client/blob/master/LICENSE)
27+
28+
29+
## Third-Party Software
30+
31+
This project vendors the following third-party libraries:
32+
33+
- **protobuf** (BSD-3-Clause) - Copyright 2008 Google Inc. Located in `src/yamcs/protobuf/_vendor`.

yamcs-client/examples/modify_dump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import struct
22

3-
from google.protobuf.internal.encoder import _VarintBytes
43
from yamcs.client import split_protobuf_stream
4+
from yamcs.protobuf._vendor.google.protobuf.internal.encoder import _VarintBytes
55
from yamcs.protobuf.table import table_pb2
66

77
"""

yamcs-client/setup.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@
4040
],
4141
platforms="Posix; MacOS X; Windows",
4242
install_requires=[
43-
# Protobuf 4 is very different: https://protobuf.dev/news/2022-05-06/
44-
# We should only run with it, once generating with protoc 3.19
45-
"protobuf>=3.11,<4",
4643
"requests",
4744
"setuptools",
4845
"websocket-client",

yamcs-client/src/yamcs/api/annotations_pb2.py

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yamcs-client/src/yamcs/api/exception_pb2.py

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yamcs-client/src/yamcs/api/httpbody_pb2.py

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yamcs-client/src/yamcs/api/websocket_pb2.py

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yamcs-client/src/yamcs/client/archive/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import datetime
22
from typing import Any, List, Optional
33

4-
from google.protobuf.internal.decoder import _DecodeVarint32
54
from yamcs.client.core.helpers import (
65
parse_server_time,
76
parse_server_timestring,
87
parse_value,
98
)
9+
from yamcs.protobuf._vendor.google.protobuf.internal.decoder import _DecodeVarint32
1010
from yamcs.protobuf.table import table_pb2
1111

1212
__all__ = [

0 commit comments

Comments
 (0)