diff --git a/betterproto2_compiler/pyproject.toml b/betterproto2_compiler/pyproject.toml index 28b87fb..c21b2f2 100644 --- a/betterproto2_compiler/pyproject.toml +++ b/betterproto2_compiler/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "betterproto2_compiler" -version = "0.10.0" +version = "0.10.1" description = "Compiler for betterproto2" authors = [ { name = "Adrien Vannson", email = "adrien.vannson@protonmail.com" }, @@ -15,7 +15,7 @@ keywords = [ requires-python = ">=3.10,<4.0" dependencies = [ # TODO use the version from the current repo? - "betterproto2>=0.9.0,<0.10", + "betterproto2~=0.10.0", # "betterproto2", "ruff>=0.9.3", "jinja2>=3.0.3", diff --git a/betterproto2_compiler/src/betterproto2_compiler/lib/__init__.py b/betterproto2_compiler/src/betterproto2_compiler/lib/__init__.py index 4b74c7a..215d309 100644 --- a/betterproto2_compiler/src/betterproto2_compiler/lib/__init__.py +++ b/betterproto2_compiler/src/betterproto2_compiler/lib/__init__.py @@ -8,5 +8,5 @@ import betterproto2 -_COMPILER_VERSION = "0.9.0" +_COMPILER_VERSION = "0.10.1" betterproto2.check_compiler_version(_COMPILER_VERSION) diff --git a/betterproto2_compiler/src/betterproto2_compiler/lib/google/protobuf/__init__.py b/betterproto2_compiler/src/betterproto2_compiler/lib/google/protobuf/__init__.py index bee52d7..9652c5f 100644 --- a/betterproto2_compiler/src/betterproto2_compiler/lib/google/protobuf/__init__.py +++ b/betterproto2_compiler/src/betterproto2_compiler/lib/google/protobuf/__init__.py @@ -89,16 +89,16 @@ import datetime import re import typing -from typing_extensions import Self import warnings from dataclasses import dataclass import betterproto2 import dateutil.parser +from typing_extensions import Self from ...message_pool import default_message_pool -_COMPILER_VERSION = "0.9.0" +_COMPILER_VERSION = "0.10.1" betterproto2.check_compiler_version(_COMPILER_VERSION) @@ -2966,15 +2966,13 @@ class MethodDescriptorProto(betterproto2.Message): @dataclass(eq=False, repr=False) class MethodOptions(betterproto2.Message): + deprecated: "bool" = betterproto2.field(33, betterproto2.TYPE_BOOL) """ Note: Field numbers 1 through 32 are reserved for Google's internal RPC framework. We apologize for hoarding these numbers to ourselves, but we were already using them long before we decided to release Protocol Buffers. - """ - deprecated: "bool" = betterproto2.field(33, betterproto2.TYPE_BOOL) - """ Is this method deprecated? Depending on the target platform, this can emit Deprecated annotations for the method, or it will be completely ignored; in the very least, @@ -3644,7 +3642,7 @@ def to_dict( # If the output format is PYTHON, we should have kept the wraped type without building the real class assert output_format == betterproto2.OutputFormat.PROTO_JSON - return self.timestamp_to_json(self.to_datetime()) + return Timestamp.timestamp_to_json(self.to_datetime()) @staticmethod def from_wrapped(wrapped: datetime.datetime) -> "Timestamp": diff --git a/betterproto2_compiler/src/betterproto2_compiler/lib/google/protobuf/compiler/__init__.py b/betterproto2_compiler/src/betterproto2_compiler/lib/google/protobuf/compiler/__init__.py index e48e0bf..313ad11 100644 --- a/betterproto2_compiler/src/betterproto2_compiler/lib/google/protobuf/compiler/__init__.py +++ b/betterproto2_compiler/src/betterproto2_compiler/lib/google/protobuf/compiler/__init__.py @@ -17,7 +17,7 @@ from ....message_pool import default_message_pool -_COMPILER_VERSION = "0.9.0" +_COMPILER_VERSION = "0.10.1" betterproto2.check_compiler_version(_COMPILER_VERSION) diff --git a/betterproto2_compiler/uv.lock b/betterproto2_compiler/uv.lock index 3dd36d5..dd38627 100644 --- a/betterproto2_compiler/uv.lock +++ b/betterproto2_compiler/uv.lock @@ -26,20 +26,20 @@ wheels = [ [[package]] name = "betterproto2" -version = "0.9.1" +version = "0.10.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "python-dateutil" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ac/02/4ae507aa18b8aa1681ea6e9f0dec08fabd610a94ade584fd9b071d286bf1/betterproto2-0.9.1.tar.gz", hash = "sha256:59d518cfbdd316e216c3d7f53448a6956432c7bd86ab9918fd8793c88c623cce", size = 143980, upload-time = "2025-10-15T09:36:24.425Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c4/88/7249571b6d525968afbc70f4fc7774cee5cdd55ecebe084a0d49f75513cb/betterproto2-0.10.0.tar.gz", hash = "sha256:fa0bcc3b87b6fd9151cd0058c153e480830f55fddb5afe3fef92e842490be266", size = 16997, upload-time = "2026-05-10T13:02:19.29Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3e/a3/44f9d1188ee3802d2402efb121e7a9ce4c825eaa34ca739fbfb8979526a2/betterproto2-0.9.1-py3-none-any.whl", hash = "sha256:de0544b4b2b6b5a05ce0c1bfac36d232f745087b02907e748f31466becfc3dbd", size = 19562, upload-time = "2025-10-15T09:36:23.169Z" }, + { url = "https://files.pythonhosted.org/packages/56/e8/596fde3196b253cee2c7a94df2d434b043d99c5a565fb3110468501b2562/betterproto2-0.10.0-py3-none-any.whl", hash = "sha256:be80a0cb1aee34f1b5e424db43884bde659ce1dbc323676aa0d47930e70a898b", size = 19904, upload-time = "2026-05-10T13:02:17.757Z" }, ] [[package]] name = "betterproto2-compiler" -version = "0.10.0" +version = "0.10.1" source = { editable = "." } dependencies = [ { name = "betterproto2" }, @@ -65,7 +65,7 @@ test = [ [package.metadata] requires-dist = [ - { name = "betterproto2", specifier = ">=0.9.0,<0.10" }, + { name = "betterproto2", specifier = "~=0.10.0" }, { name = "jinja2", specifier = ">=3.0.3" }, { name = "ruff", specifier = ">=0.9.3" }, { name = "strenum", marker = "python_full_version == '3.10.*'", specifier = ">=0.4.15,<0.5" },