mirror of
https://gitlab.freedesktop.org/xorg/proto/xcbproto.git
synced 2026-05-05 20:28:22 +02:00
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:
parent
2b3559c10c
commit
426ae35bee
1 changed files with 6 additions and 1 deletions
|
|
@ -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):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue