Skip to content

Commit

Permalink
Use distutils.version.LooseVersion to avoid issue #312
Browse files Browse the repository at this point in the history
  • Loading branch information
robbmcleod committed Aug 15, 2018
1 parent b8f0d8d commit 4f4bb49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Changes from 2.6.7 to 2.6.8

- Add check to make sure that `f_locals` is not actually `f_globals` when we
do the `f_locals` clear to avoid the #310 memory leak issue.
- Compare NumPy versions using `distutils.version.LooseVersion` to avoid issue
#312 when working with NumPy development versions.

Changes from 2.6.6 to 2.6.7
---------------------------
Expand Down
4 changes: 2 additions & 2 deletions numexpr/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import numpy
# numpy's behavoir sometimes changes with versioning, especially in regard as
# to when ints are cast to floats.
from distutils.version import StrictVersion
_np_version_forbids_neg_powint = StrictVersion(numpy.__version__) >= StrictVersion('1.12.0b1')
from distutils.version import LooseVersion
_np_version_forbids_neg_powint = LooseVersion(numpy.__version__) >= LooseVersion('1.12.0b1')

# Declare a double type that does not exist in Python space
double = numpy.double
Expand Down

0 comments on commit 4f4bb49

Please sign in to comment.