xcbgen: Use math.gcd() for Python >= 3.5.

fractions.gcd() has been deprecated since Python 3.5, and
was finally dropped in Python 3.9.  It is recommended to
use math.gcd() instead.

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
This commit is contained in:
Björn Esser 2020-06-01 12:24:16 +02:00
parent 2b3559c10c
commit 426ae35bee

View file

@ -2,7 +2,12 @@
This module contains helper classes for alignment arithmetic and checks
'''
from fractions import gcd
from sys import version_info
if version_info[:2] >= (3, 5):
from math import gcd
else:
from fractions import gcd
class Alignment(object):