|
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 |
@@ -149,18 +148,6 @@ class AsyncProtobufSerializer(AsyncBaseSerializer): |
149 | 148 | | ``schema.id.serializer`` | callable | Defines how the schema id/guid is serialized. | |
150 | 149 | | | | Defaults to prefix_schema_id_serializer. | |
151 | 150 | +-------------------------------------+----------+------------------------------------------------------+ |
152 | | - | ``use.deprecated.format`` | bool | Specifies whether the Protobuf serializer should | |
153 | | - | | | serialize message indexes without zig-zag encoding. | |
154 | | - | | | This option must be explicitly configured as older | |
155 | | - | | | and newer Protobuf producers are incompatible. | |
156 | | - | | | If the consumers of the topic being produced to are | |
157 | | - | | | using confluent-kafka-python <1.8 then this property | |
158 | | - | | | must be set to True until all old consumers have | |
159 | | - | | | have been upgraded. | |
160 | | - | | | | |
161 | | - | | | Warning: This configuration property will be removed | |
162 | | - | | | in a future version of the client. | |
163 | | - +-------------------------------------+----------+------------------------------------------------------+ |
164 | 151 |
|
165 | 152 | Schemas are registered against subject names in Confluent Schema Registry that |
166 | 153 | define a scope in which the schemas can be evolved. By default, the subject name |
@@ -260,14 +247,7 @@ async def __init__( |
260 | 247 | if not isinstance(self._use_deprecated_format, bool): |
261 | 248 | raise ValueError("use.deprecated.format must be a boolean value") |
262 | 249 | if self._use_deprecated_format: |
263 | | - warnings.warn("ProtobufSerializer: the 'use.deprecated.format' " |
264 | | - "configuration property, and the ability to use the " |
265 | | - "old incorrect Protobuf serializer heading format " |
266 | | - "introduced in confluent-kafka-python v1.4.0, " |
267 | | - "will be removed in an upcoming release in 2021 Q2. " |
268 | | - "Please migrate your Python Protobuf producers and " |
269 | | - "consumers to 'use.deprecated.format':False as " |
270 | | - "soon as possible") |
| 250 | + raise ValueError("use.deprecated.format is no longer supported") |
271 | 251 |
|
272 | 252 | self._subject_name_func = conf_copy.pop('subject.name.strategy') |
273 | 253 | if not callable(self._subject_name_func): |
@@ -499,17 +479,6 @@ class AsyncProtobufDeserializer(AsyncBaseDeserializer): |
499 | 479 | | ``schema.id.deserializer`` | callable | Defines how the schema id/guid is deserialized. | |
500 | 480 | | | | Defaults to dual_schema_id_deserializer. | |
501 | 481 | +-------------------------------------+----------+------------------------------------------------------+ |
502 | | - | ``use.deprecated.format`` | bool | Specifies whether the Protobuf deserializer should | |
503 | | - | | | deserialize message indexes without zig-zag encoding.| |
504 | | - | | | This option must be explicitly configured as older | |
505 | | - | | | and newer Protobuf producers are incompatible. | |
506 | | - | | | If Protobuf messages in the topic to consume were | |
507 | | - | | | produced with confluent-kafka-python <1.8 then this | |
508 | | - | | | property must be set to True until all old messages | |
509 | | - | | | have been processed and producers have been upgraded.| |
510 | | - | | | Warning: This configuration property will be removed | |
511 | | - | | | in a future version of the client. | |
512 | | - +-------------------------------------+----------+------------------------------------------------------+ |
513 | 482 |
|
514 | 483 |
|
515 | 484 | See Also: |
@@ -566,14 +535,7 @@ async def __init__( |
566 | 535 | if not isinstance(self._use_deprecated_format, bool): |
567 | 536 | raise ValueError("use.deprecated.format must be a boolean value") |
568 | 537 | if self._use_deprecated_format: |
569 | | - warnings.warn("ProtobufDeserializer: the 'use.deprecated.format' " |
570 | | - "configuration property, and the ability to use the " |
571 | | - "old incorrect Protobuf serializer heading format " |
572 | | - "introduced in confluent-kafka-python v1.4.0, " |
573 | | - "will be removed in an upcoming release in 2022 Q2. " |
574 | | - "Please migrate your Python Protobuf producers and " |
575 | | - "consumers to 'use.deprecated.format':False as " |
576 | | - "soon as possible") |
| 538 | + raise ValueError("use.deprecated.format is no longer supported") |
577 | 539 |
|
578 | 540 | descriptor = message_type.DESCRIPTOR |
579 | 541 | self._msg_class = GetMessageClass(descriptor) |
|
0 commit comments