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

Import issue with astropy 6.0 #344

Closed
segasai opened this issue Dec 5, 2023 · 3 comments · Fixed by #345
Closed

Import issue with astropy 6.0 #344

segasai opened this issue Dec 5, 2023 · 3 comments · Fixed by #345

Comments

@segasai
Copy link

segasai commented Dec 5, 2023

Hi,

The gala imports fail with astropy 6.0 due to a function that was removed in astropy
astropy/astropy@bb7de42

In [1]: import gala
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[1], line 1
----> 1 import gala

File ~/pyenv310/lib/python3.10/site-packages/gala/__init__.py:9
      5 import sys
      7 __author__ = 'adrn <[email protected]>'
----> 9 from ._astropy_init import *
     11 # Enforce Python version check during package import.
     12 # This is the same check as the one at the top of setup.py
     13 __minimum_python_version__ = "3.7"

File ~/pyenv310/lib/python3.10/site-packages/gala/_astropy_init.py:21
     19 import os
     20 from warnings import warn
---> 21 from astropy.config.configuration import (
     22     update_default_config,
     23     ConfigurationDefaultMissingError,
     24     ConfigurationDefaultMissingWarning)
     26 # Create the test function for self test
     27 from astropy.tests.runner import TestRunner

ImportError: cannot import name 'update_default_config' from 'astropy.config.configuration' (/home/skoposov/pyenv310/lib/python3.10/site-packages/astropy/config/configuration.py)

TBH it's not clear to me what _astropy_init.py's purpose is anyway...

Thanks
S

@segasai segasai changed the title astropy=6.0 issue Import issue with astropy 6.0 Dec 5, 2023
@adrn
Copy link
Owner

adrn commented Dec 5, 2023

Yes I need to redo the packaging layout of gala - this is mostly vestigial! Thanks for the issue - I just opened #345 which should hopefully fix the compatibility with astropy 6.0!

@segasai
Copy link
Author

segasai commented Dec 5, 2023

Thanks for the quick fix! I'll try to test it soonish.
(I've switched back to astropy5.3 for the time being)

@adrn
Copy link
Owner

adrn commented Dec 5, 2023

Ah ok, no worries. I just found another issue that will take a little longer to solve, so I'll let you know when things are actually working again!

@adrn adrn closed this as completed in #345 Dec 13, 2023
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 a pull request may close this issue.

2 participants