|
16 | 16 | # limitations under the License.
|
17 | 17 |
|
18 | 18 | import io
|
19 |
| -import warnings |
20 | 19 | from typing import Set, List, Union, Optional, Tuple
|
21 | 20 |
|
22 | 21 | from google.protobuf import json_format, descriptor_pb2
|
@@ -147,18 +146,6 @@ class ProtobufSerializer(BaseSerializer):
|
147 | 146 | | ``schema.id.serializer`` | callable | Defines how the schema id/guid is serialized. |
|
148 | 147 | | | | Defaults to prefix_schema_id_serializer. |
|
149 | 148 | +-------------------------------------+----------+------------------------------------------------------+
|
150 |
| - | ``use.deprecated.format`` | bool | Specifies whether the Protobuf serializer should | |
151 |
| - | | | serialize message indexes without zig-zag encoding. | |
152 |
| - | | | This option must be explicitly configured as older | |
153 |
| - | | | and newer Protobuf producers are incompatible. | |
154 |
| - | | | If the consumers of the topic being produced to are | |
155 |
| - | | | using confluent-kafka-python <1.8 then this property | |
156 |
| - | | | must be set to True until all old consumers have | |
157 |
| - | | | have been upgraded. | |
158 |
| - | | | | |
159 |
| - | | | Warning: This configuration property will be removed | |
160 |
| - | | | in a future version of the client. | |
161 |
| - +-------------------------------------+----------+------------------------------------------------------+ |
162 | 149 |
|
163 | 150 | Schemas are registered against subject names in Confluent Schema Registry that
|
164 | 151 | define a scope in which the schemas can be evolved. By default, the subject name
|
@@ -258,14 +245,7 @@ def __init__(
|
258 | 245 | if not isinstance(self._use_deprecated_format, bool):
|
259 | 246 | raise ValueError("use.deprecated.format must be a boolean value")
|
260 | 247 | if self._use_deprecated_format:
|
261 |
| - warnings.warn("ProtobufSerializer: the 'use.deprecated.format' " |
262 |
| - "configuration property, and the ability to use the " |
263 |
| - "old incorrect Protobuf serializer heading format " |
264 |
| - "introduced in confluent-kafka-python v1.4.0, " |
265 |
| - "will be removed in an upcoming release in 2021 Q2. " |
266 |
| - "Please migrate your Python Protobuf producers and " |
267 |
| - "consumers to 'use.deprecated.format':False as " |
268 |
| - "soon as possible") |
| 248 | + raise ValueError("use.deprecated.format is no longer supported") |
269 | 249 |
|
270 | 250 | self._subject_name_func = conf_copy.pop('subject.name.strategy')
|
271 | 251 | if not callable(self._subject_name_func):
|
@@ -496,17 +476,6 @@ class ProtobufDeserializer(BaseDeserializer):
|
496 | 476 | | ``schema.id.deserializer`` | callable | Defines how the schema id/guid is deserialized. |
|
497 | 477 | | | | Defaults to dual_schema_id_deserializer. |
|
498 | 478 | +-------------------------------------+----------+------------------------------------------------------+
|
499 |
| - | ``use.deprecated.format`` | bool | Specifies whether the Protobuf deserializer should | |
500 |
| - | | | deserialize message indexes without zig-zag encoding.| |
501 |
| - | | | This option must be explicitly configured as older | |
502 |
| - | | | and newer Protobuf producers are incompatible. | |
503 |
| - | | | If Protobuf messages in the topic to consume were | |
504 |
| - | | | produced with confluent-kafka-python <1.8 then this | |
505 |
| - | | | property must be set to True until all old messages | |
506 |
| - | | | have been processed and producers have been upgraded.| |
507 |
| - | | | Warning: This configuration property will be removed | |
508 |
| - | | | in a future version of the client. | |
509 |
| - +-------------------------------------+----------+------------------------------------------------------+ |
510 | 479 |
|
511 | 480 |
|
512 | 481 | See Also:
|
@@ -563,14 +532,7 @@ def __init__(
|
563 | 532 | if not isinstance(self._use_deprecated_format, bool):
|
564 | 533 | raise ValueError("use.deprecated.format must be a boolean value")
|
565 | 534 | if self._use_deprecated_format:
|
566 |
| - warnings.warn("ProtobufDeserializer: the 'use.deprecated.format' " |
567 |
| - "configuration property, and the ability to use the " |
568 |
| - "old incorrect Protobuf serializer heading format " |
569 |
| - "introduced in confluent-kafka-python v1.4.0, " |
570 |
| - "will be removed in an upcoming release in 2022 Q2. " |
571 |
| - "Please migrate your Python Protobuf producers and " |
572 |
| - "consumers to 'use.deprecated.format':False as " |
573 |
| - "soon as possible") |
| 535 | + raise ValueError("use.deprecated.format is no longer supported") |
574 | 536 |
|
575 | 537 | descriptor = message_type.DESCRIPTOR
|
576 | 538 | self._msg_class = GetMessageClass(descriptor)
|
|
0 commit comments