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

Python 3.9 test fails due jax not properly declaring its python compatibility #286

Closed
orbeckst opened this issue Oct 10, 2024 · 2 comments · Fixed by #290
Closed

Python 3.9 test fails due jax not properly declaring its python compatibility #286

orbeckst opened this issue Oct 10, 2024 · 2 comments · Fixed by #290
Labels
Milestone

Comments

@orbeckst
Copy link
Member

orbeckst commented Oct 10, 2024

Under Python 3.9, tests are not even collected because the jax package (via pymbar) did not correctly declare that it needs Python 3.10 due to their use of unions in their Type hints:

___________________ ERROR collecting mdpow/tests/test_fep.py ___________________
mdpow/tests/test_fep.py:11: in <module>
    import mdpow.fep
mdpow/fep.py:160: in <module>
    from alchemlyb.estimators import TI, BAR, MBAR
../../../micromamba/envs/test/lib/python3.9/site-packages/alchemlyb/estimators/__init__.py:1: in <module>
    from .bar_ import BAR
../../../micromamba/envs/test/lib/python3.9/site-packages/alchemlyb/estimators/bar_.py:3: in <module>
    from pymbar.other_estimators import bar as BAR_
../../../micromamba/envs/test/lib/python3.9/site-packages/pymbar/__init__.py:32: in <module>
    from .mbar import MBAR
../../../micromamba/envs/test/lib/python3.9/site-packages/pymbar/mbar.py:44: in <module>
    from pymbar import mbar_solvers
../../../micromamba/envs/test/lib/python3.9/site-packages/pymbar/mbar_solvers.py:24: in <module>
    from jax import config
../../../micromamba/envs/test/lib/python3.9/site-packages/jax/__init__.py:25: in <module>
    from jax._src.cloud_tpu_init import cloud_tpu_init as _cloud_tpu_init
../../../micromamba/envs/test/lib/python3.9/site-packages/jax/_src/cloud_tpu_init.py:37: in <module>
    def get_tpu_library_path() -> str | None:
E   TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
@orbeckst
Copy link
Member Author

see alchemistry/alchemlyb#327

@orbeckst
Copy link
Member Author

We might just punt and drop 3.9 if it's not immediately clear how to deal with jax or what version to pin (just for 3.9... might just not be worth the effort). Instead add 3.11 and 3.12 ... #283

orbeckst added a commit that referenced this issue Oct 10, 2024
- close #283 #286
- added: Python 3.11, 3.12
- removed: Python 3.9
@orbeckst orbeckst added this to the 0.9.0 milestone Oct 10, 2024
@orbeckst orbeckst linked a pull request Oct 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant