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

Co-authored-by: Nils Hamerlinck <nilshamerlinck@users.noreply.github.com>
pull/744/head
Elmeri Niemelä 2021-11-07 14:00:56 +02:00 committed by Alexandre D. Díaz
parent 7fca010e97
commit a4ca06509c
1 changed files with 5 additions and 1 deletions

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")