choderalab / pymbar

Python implementation of the multistate Bennett acceptance ratio (MBAR)
http://pymbar.readthedocs.io
MIT License
240 stars 93 forks source link

Update to Python 3.12 #526

Closed Lnaden closed 8 months ago

Lnaden commented 8 months ago

Closes #516 by retrying it. Easier to make a new PR for it. We'll need to do this to make PyMBAR 3.12 viable on Conda-Forge due to the versioneer changes. Python 3.8 and 3.12 pass locally.

Thanks to @mattwthompson who made the initial PR which this just uses that code directly.

Lnaden commented 8 months ago

This also closes #524 by fixing the Jax config import. That PR would have fixed the problem for most other codes, but JAX does something weird under the hood where the try...except around from jax.config import config would wind up mangling the namespace for config which removed the ability to check for x64_enabled. The change on this PR fixes that by providing a single call which works in pre and post 0.3.25.

Lnaden commented 8 months ago

I do also want to credit and thank @nielskm for opening the PR which called attention to the JAX issue.