Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevOps: Pin version of setuptools as it breaks dependencies #5782

Merged
merged 1 commit into from
Nov 19, 2022

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Nov 19, 2022

The last version setuptools==65.6.0 that was released today, breaks a number of packages, e.g., numpy, because it removed the Log resource from the distutils.log module. We temporarily pin the version to setuptools==65.5.0 in the CI pipeline until a more permanent fix upstream is released.

The last version `setuptools==65.6.0` that was released today, breaks a
number of packages, e.g., `numpy`, because it removed the `Log` resource
from the `distutils.log` module. We temporarily pin the version to
`setuptools==65.5.0` in the CI pipeline until a more permanent fix
upstream is released.
@sphuber
Copy link
Contributor Author

sphuber commented Nov 19, 2022

See pypa/setuptools#3693

@sphuber
Copy link
Contributor Author

sphuber commented Nov 19, 2022

See https://github.com/sphuber/aiida-core/actions/runs/3502637618/jobs/5867158356 for example failed run.


During handling of the above exception, another exception occurred:

    def test_validate_registered_entry_points():
        """Test the ``validate_registered_entry_points`` function."""
>       validate_registered_entry_points()

tests/plugins/test_entry_point.py:23: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
aiida/plugins/entry_point.py:125: in validate_registered_entry_points
    factory(entry_point.name)
aiida/plugins/factories.py:147: in DbImporterFactory
    entry_point = BaseFactory(entry_point_group, entry_point_name, load=load)
aiida/plugins/factories.py:61: in BaseFactory
    return load_entry_point(group, name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = 'aiida.tools.dbimporters', name = 'core.materialsproject'

    def load_entry_point(group: str, name: str) -> Any:
        """
        Load the class registered under the entry point for a given name and group
    
        :param group: the entry point group
        :param name: the name of the entry point
        :return: class registered at the given entry point
        :raises TypeError: if the entry_point_string is not a string type
        :raises ValueError: if the entry_point_string cannot be split into two parts on the entry point string separator
        :raises aiida.common.MissingEntryPointError: entry point was not registered
        :raises aiida.common.MultipleEntryPointError: entry point could not be uniquely resolved
        :raises aiida.common.LoadingEntryPointError: entry point could not be loaded
        """
        entry_point = get_entry_point(group, name)
    
        try:
            loaded_entry_point = entry_point.load()
        except ImportError:
>           raise LoadingEntryPointError(f"Failed to load entry point '{name}':\n{traceback.format_exc()}")
E           aiida.common.exceptions.LoadingEntryPointError: Failed to load entry point 'core.materialsproject':
E           Traceback (most recent call last):
E             File "/home/runner/work/aiida-core/aiida-core/aiida/plugins/entry_point.py", line 235, in load_entry_point
E               loaded_entry_point = entry_point.load()
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 194, in load
E               module = import_module(match.group('module'))
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/importlib/__init__.py", line 127, in import_module
E               return _bootstrap._gcd_import(name[level:], package, level)
E             File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
E             File "<frozen importlib._bootstrap>", line 991, in _find_and_load
E             File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
E             File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
E             File "<frozen importlib._bootstrap_external>", line 843, in exec_module
E             File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
E             File "/home/runner/work/aiida-core/aiida-core/aiida/tools/dbimporters/plugins/materialsproject.py", line 14, in <module>
E               from pymatgen.ext.matproj import MPRester
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/pymatgen/ext/matproj.py", line 36, in <module>
E               from pymatgen.entries.exp_entries import ExpEntry
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/pymatgen/entries/exp_entries.py", line 20, in <module>
E               from pymatgen.analysis.phase_diagram import PDEntry
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/pymatgen/analysis/phase_diagram.py", line 22, in <module>
E               from scipy.optimize import minimize
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/scipy/optimize/__init__.py", line 401, in <module>
E               from ._minimize import *
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/scipy/optimize/_minimize.py", line 27, in <module>
E               from ._trustregion_constr import _minimize_trustregion_constr
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py", line 4, in <module>
E               from .minimize_trustregion_constr import _minimize_trustregion_constr
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py", line 5, in <module>
E               from .._constraints import (
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/scipy/optimize/_constraints.py", line 8, in <module>
E               from numpy.testing import suppress_warnings
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/numpy/testing/__init__.py", line 12, in <module>
E               from ._private import extbuild, decorators as dec
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/numpy/testing/_private/extbuild.py", line 11, in <module>
E               from numpy.distutils.ccompiler import new_compiler
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/numpy/distutils/__init__.py", line 24, in <module>
E               from . import ccompiler
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/numpy/distutils/ccompiler.py", line 20, in <module>
E               from numpy.distutils import log
E             File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/numpy/distutils/log.py", line 4, in <module>
E               from distutils.log import Log as old_Log
E           ImportError: cannot import name 'Log' from 'distutils.log' (/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/setuptools/_distutils/log.py)

@sphuber sphuber merged commit 865c30e into aiidateam:main Nov 19, 2022
@sphuber sphuber deleted the fix/pin-setuptools branch November 19, 2022 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant