Fix code to work with Python 3.9

Aurélien Lubert requested to merge topic/default/python-3.9 into branch/default

Merge request reports