MAINT: Pin `mpmath` to version 1.3.0
nawtrey opened this issue · comments
Nik Awtrey commented
When running python setup.py test
on a fresh install of kda
an issue arises where sympy
installs a pre-release of mpmath
(see my comment):
Here is the output:
Test output
$ python setup.py test
C:\Users\nikol\Anaconda3\envs\kda_fresh\Lib\site-packages\setuptools\__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
C:\Users\nikol\Anaconda3\envs\kda_fresh\Lib\site-packages\setuptools\dist.py:314: InformationOnly: Normalizing 'v0.2.0+4.g533d243' to '0.2.0+4.g533d243'
self.metadata.version = self._normalize_version(
running pytest
C:\Users\nikol\Anaconda3\envs\kda_fresh\Lib\site-packages\setuptools\command\test.py:193: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
ir_d = dist.fetch_build_eggs(dist.install_requires)
C:\Users\nikol\Anaconda3\envs\kda_fresh\Lib\site-packages\setuptools\command\test.py:194: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
tr_d = dist.fetch_build_eggs(dist.tests_require or [])
C:\Users\nikol\Anaconda3\envs\kda_fresh\Lib\site-packages\setuptools\command\test.py:195: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
er_d = dist.fetch_build_eggs(
running egg_info
writing kda.egg-info\PKG-INFO
writing dependency_links to kda.egg-info\dependency_links.txt
writing requirements to kda.egg-info\requires.txt
writing top-level names to kda.egg-info\top_level.txt
reading manifest file 'kda.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
adding license file 'LICENSE'
writing manifest file 'kda.egg-info\SOURCES.txt'
running build_ext
============================= test session starts =============================
platform win32 -- Python 3.11.8, pytest-8.0.2, pluggy-1.4.0
rootdir: C:\Users\nikol\OneDrive\projects\kinetic_diagram_analysis\packages\kda
plugins: cov-4.1.0, xdist-3.5.0, hypothesis-6.98.17
collected 21 items / 1 error
=================================== ERRORS ====================================
___________________ ERROR collecting kda/tests/test_kda.py ____________________
kda\tests\test_kda.py:13: in <module>
from kda import calculations, diagrams, graph_utils, expressions, ode, svd
kda\calculations.py:25: in <module>
from sympy import logcombine
c:\users\nikol\anaconda3\envs\kda_fresh\lib\site-packages\sympy-1.12-py3.11.egg\sympy\__init__.py:30: in <module>
from sympy.core.cache import lazy_function
c:\users\nikol\anaconda3\envs\kda_fresh\lib\site-packages\sympy-1.12-py3.11.egg\sympy\core\__init__.py:9: in <module>
from .expr import Expr, AtomicExpr, UnevaluatedExpr
c:\users\nikol\anaconda3\envs\kda_fresh\lib\site-packages\sympy-1.12-py3.11.egg\sympy\core\expr.py:4159: in <module>
from .mul import Mul
c:\users\nikol\anaconda3\envs\kda_fresh\lib\site-packages\sympy-1.12-py3.11.egg\sympy\core\mul.py:2193: in <module>
from .numbers import Rational
c:\users\nikol\anaconda3\envs\kda_fresh\lib\site-packages\sympy-1.12-py3.11.egg\sympy\core\numbers.py:4567: in <module>
_sympy_converter[type(mpmath.rational.mpq(1, 2))] = sympify_mpmath_mpq
E AttributeError: module 'mpmath' has no attribute 'rational'
============================== warnings summary ===============================
..\..\..\..\..\anaconda3\envs\kda_fresh\lib\site-packages\mpmath-1.4.0a0-py3.11.egg\mpmath\ctx_mp.py:28
c:\users\nikol\anaconda3\envs\kda_fresh\lib\site-packages\mpmath-1.4.0a0-py3.11.egg\mpmath\ctx_mp.py:28: DeprecationWarning: mpnumeric is deprecated
warnings.warn(f"{name} is deprecated", DeprecationWarning)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ===========================
ERROR kda/tests/test_kda.py - AttributeError: module 'mpmath' has no attribut...
!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 1 error in 4.29s =========================
As a temporary solution I'm going to pin mpmath
to v1.3.0
so the tests can run successfully and we can finally resolve #70.
Nik Awtrey commented
This ended up being an issue with using the deprecated python setup.py install
, so I will close this.