mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
suppress warning emitted by newer zope.interface with Nevow 0.10
refs #1435
This commit is contained in:
parent
33461a775e
commit
f627af3b9f
@ -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 = []
|
||||
|
||||
|
@ -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",
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user