From: Zooko O'Whielacronx Date: Wed, 17 Aug 2011 20:31:34 +0000 (-0700) Subject: suppress warning emitted by newer zope.interface with Nevow 0.10 X-Git-Tag: pre-393~11 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/frontends/(%5B%5E?a=commitdiff_plain;h=f627af3b9fbe297599f3a47f39bd997501b4e6fe;p=tahoe-lafs%2Ftahoe-lafs.git suppress warning emitted by newer zope.interface with Nevow 0.10 refs #1435 --- diff --git a/src/allmydata/__init__.py b/src/allmydata/__init__.py index e57b5e62..06f8e15c 100644 --- a/src/allmydata/__init__.py +++ b/src/allmydata/__init__.py @@ -144,7 +144,8 @@ def normalized_version(verstr, what=None): def get_package_versions_and_locations(): import warnings - from _auto_deps import package_imports, deprecation_messages, deprecation_imports + from _auto_deps import package_imports, deprecation_messages, \ + deprecation_imports, user_warning_messages def package_dir(srcfile): return os.path.dirname(os.path.dirname(os.path.normcase(os.path.realpath(srcfile)))) @@ -161,11 +162,14 @@ def get_package_versions_and_locations(): message="BaseException.message has been deprecated as of Python 2.6", append=True) - # This is to suppress various DeprecationWarnings that occur when modules are imported. - # See http://allmydata.org/trac/tahoe/ticket/859 and http://divmod.org/trac/ticket/2994 . + # This is to suppress various DeprecationWarnings and UserWarnings that + # occur when modules are imported. See #859, #1435 and + # http://divmod.org/trac/ticket/2994 . for msg in deprecation_messages: warnings.filterwarnings("ignore", category=DeprecationWarning, message=msg, append=True) + for msg in user_warning_messages: + warnings.filterwarnings("ignore", category=UserWarning, message=msg, append=True) try: for modulename in deprecation_imports: try: @@ -175,6 +179,8 @@ def get_package_versions_and_locations(): finally: for ign in deprecation_messages: warnings.filters.pop() + for ign in user_warning_messages: + warnings.filters.pop() packages = [] diff --git a/src/allmydata/_auto_deps.py b/src/allmydata/_auto_deps.py index 68ef9f68..077c957b 100644 --- a/src/allmydata/_auto_deps.py +++ b/src/allmydata/_auto_deps.py @@ -15,8 +15,7 @@ install_requires = [ "simplejson >= 1.4", # zope.interface 3.6.3 and 3.6.4 are incompatible with Nevow (#1435). - # 3.6.5 is compatible but fails tests due to an unsuppressed warning. - "zope.interface <= 3.6.2, >= 3.6.6", + "zope.interface <= 3.6.2, >= 3.6.5", # On Windows we need at least Twisted 9.0 to avoid an indirect dependency on pywin32. # On Linux we need at least Twisted 10.1.0 for inotify support used by the drop-upload @@ -124,3 +123,7 @@ deprecation_imports = [ 'twisted.python.filepath', 'Crypto.Hash.SHA', ] + +user_warning_messages = [ + "Hashing uninitialized InterfaceClass instance", +]