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

Numpy 2,0 support #395

Merged
merged 5 commits into from
Sep 26, 2024
Merged

Numpy 2,0 support #395

merged 5 commits into from
Sep 26, 2024

Conversation

jreadey
Copy link
Member

@jreadey jreadey commented Sep 24, 2024

Changes:

  • Updates to support numpy 2.0
  • Moved base image to python 3.12
  • Moved to importlib_resources to access config.yml
  • Removed support for Python 3.8

@mattjala
Copy link
Contributor

The python 3.12 workflows are failing due to an import error:

________________ ERROR collecting tests/unit/chunk_util_test.py ________________
ImportError while importing test module '/home/runner/work/hsds/hsds/tests/unit/chunk_util_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/chunk_util_test.py:18: in <module>
    from hsds.util.dsetUtil import getHyperslabSelection
hsds/util/dsetUtil.py:16: in <module>
    from .. import hsds_logger as log
hsds/hsds_logger.py:19: in <module>
    from .util.domainUtil import getDomainFromRequest
hsds/util/domainUtil.py:17: in <module>
    from .. import config
hsds/config.py:15: in <module>
    from pkg_resources import resource_filename
E   ModuleNotFoundError: No module named 'pkg_resources'

Looks like something became deprecated - maybe try the solution here?

@jreadey
Copy link
Member Author

jreadey commented Sep 26, 2024

Looks like pgk_resources was removed in Python 3.12. Have replaced with importlib_resouces.

@jreadey jreadey merged commit fbbb3d4 into master Sep 26, 2024
38 checks passed
@jreadey jreadey deleted the numpy20 branch September 26, 2024 12:53
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.

2 participants