[IMP] Workaround for genshi DeprecationWarning that makes runbot build red

Co-authored-by: Nils Hamerlinck <nilshamerlinck@users.noreply.github.com>
This commit is contained in:
Elmeri Niemelä
2021-11-07 14:00:56 +02:00
committed by GitHub
parent 82e1480036
commit 779da4f952

View File

@@ -21,7 +21,11 @@ from ._py3o_parser_context import Py3oParserContext
logger = logging.getLogger(__name__)
try:
from py3o.template import Template
# workaround for https://github.com/edgewall/genshi/issues/15
# that makes runbot build red because of the DeprecationWarning
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
from py3o.template import Template
from py3o import formats
except ImportError:
logger.debug("Cannot import py3o.template")