Browse Source

ref: upgrade mmh3 (#50669)

<!-- Describe your PR here. -->
anthony sottile 1 year ago
parent
commit
d226125b25

+ 0 - 1
pyproject.toml

@@ -109,7 +109,6 @@ module = [
     "isodate.*",
     "kombu.*",
     "mistune.*",
-    "mmh3.*",
     "onelogin.saml2.auth.*",
     "onelogin.saml2.constants.*",
     "onelogin.saml2.idp_metadata_parser.*",

+ 1 - 1
requirements-base.txt

@@ -32,7 +32,7 @@ jsonschema>=3.2.0
 lxml>=4.9.1
 maxminddb>=2.3
 mistune>=2.0.3
-mmh3>=3.0.0
+mmh3>=4.0.0
 packaging>=21.3
 parsimonious>=0.8.0
 petname>=2.6

+ 1 - 1
requirements-dev-frozen.txt

@@ -93,7 +93,7 @@ maxminddb==2.3.0
 mccabe==0.7.0
 milksnake==0.1.5
 mistune==2.0.4
-mmh3==3.0.0
+mmh3==4.0.0
 more-itertools==8.13.0
 msgpack==1.0.4
 msgpack-types==0.2.0

+ 1 - 1
requirements-frozen.txt

@@ -68,7 +68,7 @@ lxml==4.9.1
 maxminddb==2.3.0
 milksnake==0.1.5
 mistune==2.0.4
-mmh3==3.0.0
+mmh3==4.0.0
 msgpack==1.0.4
 multidict==6.0.4
 oauthlib==3.1.0

+ 0 - 0
src/bitfield/py.typed


+ 0 - 0
src/django_picklefield/py.typed


+ 6 - 2
src/sentry/similarity/signatures.py

@@ -1,12 +1,16 @@
+from __future__ import annotations
+
+from typing import Iterable
+
 import mmh3
 
 
 class MinHashSignatureBuilder:
-    def __init__(self, columns, rows):
+    def __init__(self, columns: int, rows: int) -> None:
         self.columns = columns
         self.rows = rows
 
-    def __call__(self, features):
+    def __call__(self, features: Iterable[str]) -> list[int]:
         return [
             min(mmh3.hash(feature, column) % self.rows for feature in features)
             for column in range(self.columns)

+ 0 - 0
src/sentry_plugins/py.typed


+ 0 - 0
src/social_auth/py.typed


+ 0 - 0
src/sudo/py.typed


Some files were not shown because too many files changed in this diff