You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2020/08/17 21:39:33 UTC

[GitHub] [avro] cewing commented on a change in pull request #936: AVRO-2906: Traversal validation

cewing commented on a change in pull request #936:
URL: https://github.com/apache/avro/pull/936#discussion_r471638086



##########
File path: lang/py/avro/schema.py
##########
@@ -221,6 +232,18 @@ def to_json(self, names):
         """
         raise Exception("Must be implemented by subclasses.")
 
+    def validate(self, datum):

Review comment:
       @kojiromike, I was following the pattern of the `to_json` method above this, which i guess might also want to be an abstract method.  Is it possible to add `abstractmethod`s to non-ABC classes?

##########
File path: lang/py/avro/schema.py
##########
@@ -493,6 +516,17 @@ def __eq__(self, that):
 class PrimitiveSchema(Schema):
     """Valid primitive types are in PRIMITIVE_TYPES."""
 
+    _validators = {

Review comment:
       yeah, I'd like that.  




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org