[Request] [+ ] D11299: pyoxidized: silence the fuzzywuzzy warning about python-Levenshtein
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Wed Aug 18 13:25:04 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
I don't think we need the fast implementation for the test so lets ignore it for
now.
REPOSITORY
rHG Mercurial
BRANCH
stable
REVISION DETAIL
https://phab.mercurial-scm.org/D11299
AFFECTED FILES
hgext/releasenotes.py
CHANGE DETAILS
diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py
--- a/hgext/releasenotes.py
+++ b/hgext/releasenotes.py
@@ -39,9 +39,22 @@
command = registrar.command(cmdtable)
try:
- import fuzzywuzzy.fuzz as fuzz
+ # Silence a warning about python-Levenshtein.
+ #
+ # We don't need the the performance that much and it get anoying in tests.
+ import warnings
- fuzz.token_set_ratio
+ with warnings.catch_warnings():
+ warnings.filterwarnings(
+ action="ignore",
+ message=".*python-Levenshtein.*",
+ category=UserWarning,
+ module="fuzzywuzzy.fuzz",
+ )
+
+ import fuzzywuzzy.fuzz as fuzz
+
+ fuzz.token_set_ratio
except ImportError:
fuzz = None
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210818/1c9d298d/attachment.html>
More information about the Mercurial-patches
mailing list