Bug 1990769 - python-elephant fails to build with Python 3.10: ImportError: cannot import name 'fake_neo' from 'neo.test.generate_datasets'
Summary: python-elephant fails to build with Python 3.10: ImportError: cannot import n...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-elephant
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10 F35FTBFS F36FTBFS F37FTBFS
TreeView+ depends on / blocked
 
Reported: 2021-08-06 08:01 UTC by Tomáš Hrnčiar
Modified: 2022-04-21 13:24 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-21 13:24:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github NeuralEnsemble elephant issues 428 0 None None None 2021-08-07 15:00:37 UTC

Description Tomáš Hrnčiar 2021-08-06 08:01:22 UTC
python-elephant fails to build with Python 3.10.0rc1.

==================================== ERRORS ====================================
_______________ ERROR collecting elephant/test/test_neo_tools.py _______________
ImportError while importing test module '/builddir/build/BUILD/elephant-0.10.0/elephant/test/test_neo_tools.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
elephant/test/test_neo_tools.py:14: in <module>
    from neo.test.generate_datasets import fake_neo, get_fake_values
E   ImportError: cannot import name 'fake_neo' from 'neo.test.generate_datasets' (/usr/lib/python3.10/site-packages/neo/test/generate_datasets.py)
_____________ ERROR collecting elephant/test/test_pandas_bridge.py _____________
ImportError while importing test module '/builddir/build/BUILD/elephant-0.10.0/elephant/test/test_pandas_bridge.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
elephant/test/test_pandas_bridge.py:18: in <module>
    from neo.test.generate_datasets import fake_neo
E   ImportError: cannot import name 'fake_neo' from 'neo.test.generate_datasets' (/usr/lib/python3.10/site-packages/neo/test/generate_datasets.py)
=============================== warnings summary ===============================
../../../../usr/lib/python3.10/site-packages/joblib/backports.py:7
  /usr/lib/python3.10/site-packages/joblib/backports.py:7: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
    from distutils.version import LooseVersion
elephant/test/test_cell_assembly_detection.py:8
  /builddir/build/BUILD/elephant-0.10.0/elephant/test/test_cell_assembly_detection.py:8: DeprecationWarning: Importing from numpy.testing.utils is deprecated since 1.15.0, import from numpy.testing instead.
    from numpy.testing.utils import assert_array_equal
elephant/parallel/__init__.py:47
  /builddir/build/BUILD/elephant-0.10.0/elephant/parallel/__init__.py:47: UserWarning: mpi4py package is missing. Please run 'pip install mpi4py' in a terminal to activate MPI features.
    warnings.warn("mpi4py package is missing. Please run 'pip install mpi4py' "
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
ERROR elephant/test/test_neo_tools.py
ERROR elephant/test/test_pandas_bridge.py
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
================= 4 deselected, 3 warnings, 2 errors in 3.93s ==================

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/02359843-python-elephant/

For all our attempts to build python-elephant with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-elephant/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 is already included in Fedora 35. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Ankur Sinha (FranciscoD) 2021-08-07 14:58:06 UTC
This isn't Python 3.10 related. The latest update of Neo seems to have removed this function. Filing a bug upstream first, and then I'll see if we can do a fix downstream.

Comment 2 Ankur Sinha (FranciscoD) 2021-08-07 15:00:38 UTC
Reported upstream: https://github.com/NeuralEnsemble/elephant/issues/428

Comment 3 Ben Cotton 2021-08-10 13:35:51 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 4 Ankur Sinha (FranciscoD) 2022-03-14 09:40:10 UTC
Looks to be fixed upstream, so we can package a snapshot to fix the package in the meantime:

https://github.com/NeuralEnsemble/elephant/pull/446

On my TODO list, will hopefully get it done this week.

Cheers,


Note You need to log in before you can comment on or make changes to this bug.