mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-21 05:53:12 +00:00
Fix the integration test failure.
This commit is contained in:
parent
fe6917b48b
commit
b60cd13054
@ -4,7 +4,6 @@ Monkey-patching of third party libraries.
|
||||
Ported to Python 3.
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
@ -14,6 +13,8 @@ from future.utils import PY2
|
||||
if PY2:
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
|
||||
|
||||
from warnings import catch_warnings
|
||||
|
||||
|
||||
def patch():
|
||||
"""Path third-party libraries to make Tahoe-LAFS work."""
|
||||
@ -25,7 +26,13 @@ def patch():
|
||||
# 2. Foolscap is dropped as a dependency.
|
||||
# 3. Tahoe-LAFS drops Python 2 support.
|
||||
|
||||
if PY2:
|
||||
if not PY2:
|
||||
# Python 3 doesn't need to monkey patch Foolscap
|
||||
return
|
||||
|
||||
# We need to suppress warnings so as to prevent unexpected output from
|
||||
# breaking some integration tests.
|
||||
with catch_warnings(record=True):
|
||||
# Only tested with this version; ensure correctness with new releases,
|
||||
# and then either update the assert or hopefully drop the monkeypatch.
|
||||
from foolscap import __version__
|
||||
|
Loading…
Reference in New Issue
Block a user