# See http://allmydata.org/trac/tahoe/ticket/859 and
# http://divmod.org/trac/ticket/2994 .
import warnings
+warnings.filterwarnings("ignore", category=DeprecationWarning,
+ message="the sha module is deprecated; use the hashlib module instead",
+ append=True)
warnings.filterwarnings("ignore", category=DeprecationWarning,
message="object.__new__\(\) takes no parameters",
append=True)
warnings.filterwarnings("ignore", category=DeprecationWarning,
message="the md5 module is deprecated; use hashlib instead",
append=True)
-warnings.filterwarnings("ignore", category=DeprecationWarning,
- message="the sha module is deprecated; use the hashlib module instead",
- append=True)
warnings.filterwarnings("ignore", category=DeprecationWarning,
message="twisted.web.error.NoResource is deprecated since Twisted 9.0. See twisted.web.resource.NoResource.",
append=True)
warnings.filters.pop()
warnings.filters.pop()
warnings.filters.pop()
- warnings.filters.pop()
+ # Don't pop the filter for the sha module warning because it is also generated
+ # by pycrypto (which we don't want to import unless needed).
+ # warnings.filters.pop()
# This warning is generated by twisted, PyRex, and possibly other packages,
# but can happen at any time, not only when they are imported. See