Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ All exceptions inherit from `TeslaFleetError(BaseException)`.

### Protobuf

Generated protobuf files live in `tesla/vehicle/proto/` and are excluded from ruff and pyright. Do not edit these directly.
Generated protobuf files live in `tesla/vehicle/proto/` and are excluded from ruff and pyright. Do not edit these directly — regenerate them with `tools/regenerate_protos.sh` (needs `protoc` on `PATH`).

**Runtime-version pin (Home Assistant compatibility).** The gencode stamps a `ValidateProtobufRuntimeVersion(major, minor, patch, …)` call, and protobuf refuses to load gencode that is *newer* than the installed runtime (`gencode X > runtime` → `VersionError`). Home Assistant core pins `protobuf==6.32.0`, so the gencode must be stamped **≤ 6.32.0** or it breaks in HA. The generator version is the `protoc` version: under unified protobuf versioning, `protoc vX.Y` (`libprotoc X.Y`) stamps Python gencode `6.X.Y`. So to target runtime 6.32.0, regenerate with **protoc v32.0** (`protoc-32.0-linux-x86_64.zip` from the protobuf GitHub releases). The `protobuf>=6.32.0` floor in `pyproject.toml` must match the gencode version — never set it below the stamped version, or installs that resolve an older protobuf will hit `VersionError` at import.

## Code Style

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires = ["setuptools>=77.0"]

[project]
name = "tesla_fleet_api"
version = "1.5.1"
version = "1.5.2"
license = "Apache-2.0"
description = "Tesla Fleet API library for Python"
readme = "README.md"
Expand All @@ -21,7 +21,7 @@ dependencies = [
"aiofiles>=24",
"aiolimiter>=1",
"cryptography>=43",
"protobuf>=6.31.1",
"protobuf>=6.32.0",
"bleak>=0.22",
"bleak-retry-connector>=3.9",
]
Expand Down
4 changes: 2 additions & 2 deletions tesla_fleet_api.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: tesla_fleet_api
Version: 1.5.1
Version: 1.5.2
Summary: Tesla Fleet API library for Python
Author-email: Brett Adams <hello@teslemetry.com>
License-Expression: Apache-2.0
Expand All @@ -16,7 +16,7 @@ Requires-Dist: aiohttp>=3
Requires-Dist: aiofiles>=24
Requires-Dist: aiolimiter>=1
Requires-Dist: cryptography>=43
Requires-Dist: protobuf>=6.31.1
Requires-Dist: protobuf>=6.32.0
Requires-Dist: bleak>=0.22
Requires-Dist: bleak-retry-connector>=3.9
Dynamic: license-file
Expand Down
2 changes: 1 addition & 1 deletion tesla_fleet_api.egg-info/requires.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ aiohttp>=3
aiofiles>=24
aiolimiter>=1
cryptography>=43
protobuf>=6.31.1
protobuf>=6.32.0
bleak>=0.22
bleak-retry-connector>=3.9
2 changes: 1 addition & 1 deletion tesla_fleet_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Tesla Fleet API"""

__author__ = "hello@teslemetry.com"
__version__ = "1.5.1"
__version__ = "1.5.2"

from tesla_fleet_api.const import Region, is_valid_region
from tesla_fleet_api.tesla.bluetooth import TeslaBluetooth
Expand Down
6 changes: 3 additions & 3 deletions tesla_fleet_api/tesla/vehicle/proto/car_server_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tesla_fleet_api/tesla/vehicle/proto/common_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tesla_fleet_api/tesla/vehicle/proto/errors_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tesla_fleet_api/tesla/vehicle/proto/keys_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tesla_fleet_api/tesla/vehicle/proto/managed_charging_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tesla_fleet_api/tesla/vehicle/proto/signatures_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tesla_fleet_api/tesla/vehicle/proto/universal_message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tesla_fleet_api/tesla/vehicle/proto/vcsec_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tesla_fleet_api/tesla/vehicle/proto/vehicle_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion tools/regenerate_protos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
# Usage:
# tools/regenerate_protos.sh
#
# Requirements: protoc (>= 3) on PATH.
# Requirements: protoc on PATH. The protoc version determines the version
# stamped into the generated gencode: under unified protobuf versioning,
# protoc vX.Y emits Python gencode 6.X.Y. Because protobuf refuses to load
# gencode newer than the installed runtime, and Home Assistant core pins
# protobuf==6.32.0, regenerate with protoc v32.0 (-> gencode 6.32.0) and keep
# the protobuf floor in pyproject.toml in sync with the stamped version. See
# the "Protobuf" section of AGENTS.md for the full rationale.

set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion upgradeProtoc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROTOC_VERSION=31.1
PROTOC_VERSION=32.0

protoc --version
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
Expand Down
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading