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 2021/05/28 21:35:45 UTC

[GitHub] [avro] kojiromike commented on a change in pull request #1181: AVRO-1938: Add fingerprinting support to Python implementation

kojiromike commented on a change in pull request #1181:
URL: https://github.com/apache/avro/pull/1181#discussion_r641825671



##########
File path: lang/py/avro/schema.py
##########
@@ -158,7 +159,77 @@ def canonical_properties(self):
             if key in props)
 
 
-class Schema(abc.ABC, CanonicalPropertiesMixin):
+class FingerprintMixin:
+    """
+    A Mixin to generate schema fingerprints for supported algorithms
+    """
+    _FP_TABLE = None
+    _EMPTY64 = 0xc15d213aa4d7a795
+
+    # All algorithms guaranteed by hashlib are supported
+    SUPPORTED_ALGORITHMS = set(hashlib.algorithms_guaranteed)

Review comment:
       1. I think they should all be allowed.
   2. This value is already a set. If you want to ensure it can't be mutated, better change it to a `frozenset`.
   3. _Are there algorithm name variations to be supported for compatibility with other language implementations?_ I don't know.




-- 
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