ljvmiranda921 / pyswarms

A research toolkit for particle swarm optimization in Python

Home Page:https://pyswarms.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests fail with Matplotlib 3.7

QuLogic opened this issue · comments

Describe the bug
When using Matplotlib 3.7, tests fail to collect due to using private API:

____________ ERROR collecting tests/utils/plotters/test_plotters.py ____________
ImportError while importing test module '/builddir/build/BUILD/pyswarms-1.3.0/tests/utils/plotters/test_plotters.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/utils/plotters/test_plotters.py:17: in <module>
    from matplotlib.axes._subplots import SubplotBase
E   ModuleNotFoundError: No module named 'matplotlib.axes._subplots'
------------------------------- Captured stdout --------------------------------
No display found. Using non-interactive Agg backend.

To Reproduce
Steps to reproduce the behavior:

  1. Install pyswarms, its dependencies and Matplotlib 3.7.
  2. Run pysarms tests.

Expected behavior
Tests pass.

Environment (please complete the following information):

  • OS: Fedora
  • Version: Rawhide
  • PySwarms Version: 1.3.0
  • Python Version: 3.11.2