threeML / astromodels

Spatial and spectral models for astrophysics
BSD 3-Clause "New" or "Revised" License
43 stars 44 forks source link

Fix installation in Python 3.12 #208

Closed israelmcmc closed 3 months ago

israelmcmc commented 3 months ago

From Python 12 release notes

configparser no longer has a SafeConfigParser class. Use the shorter ConfigParser name instead. configparser.ConfigParser no longer has a readfp method. Use read_file() instead.

I changed those names, and now it works. These were marked as deprecated since Python 3.2, so this change doesn't break the installation for the previous Python version (I checked with Python>=3.9)

Closes #204

israelmcmc commented 3 months ago

Same in threeMLl: https://github.com/threeML/threeML/pull/631

israelmcmc commented 3 months ago

Note that I needed to use pip install --use-pep517 to test this, as explained on #209, which is an unrelated issue.

omodei commented 3 months ago

Thanks for fixing this!