From 480daf1553912f3665f3609396eae27f7fe4a346 Mon Sep 17 00:00:00 2001 From: scoder Date: Sun, 13 Feb 2022 00:07:06 +0100 Subject: [PATCH] Avoid leaking the 'math' import into the module dict. --- src/lxml/objectify.pyx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lxml/objectify.pyx b/src/lxml/objectify.pyx index 1eb565de0..376695a8b 100644 --- a/src/lxml/objectify.pyx +++ b/src/lxml/objectify.pyx @@ -38,9 +38,8 @@ import_lxml__etree() __version__ = etree.__version__ -import math -cdef object _float_is_inf = math.isinf -cdef object _float_is_nan = math.isnan +cdef object _float_is_inf, _float_is_nan +from math import isinf as _float_is_inf, isnan as _float_is_nan cdef object re import re