File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,23 @@ def _dummy_getEffectiveLevel(self):
2222 aq_logger_mod .DummyLogger .getEffectiveLevel = _dummy_getEffectiveLevel
2323except Exception :
2424 pass
25+ # Monkey patch for astroquery.logger._init_log to support astropy >= 6.0
26+ try :
27+ import importlib
28+ from astropy .logger import AstropyLogger
29+ aq_logger_mod = importlib .import_module ("astroquery.logger" )
30+
31+ def _new_init_log ():
32+ """Initializes the log, including the log levels and log writer."""
33+ log = AstropyLogger ('astroquery' )
34+ # log._set_defaults() # This line is removed as it's deprecated in astropy 6.0
35+ return log
36+
37+ if hasattr (aq_logger_mod , '_init_log' ):
38+ aq_logger_mod ._init_log = _new_init_log
39+
40+ except Exception :
41+ pass
2542from io import StringIO
2643from contextlib import redirect_stdout
2744from astropy .config import get_config_dir , get_config
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " astroquery_cli"
3- version = " 0.13 .0"
3+ version = " 0.14 .0"
44description = " CLI for astroquery modules with autocompletion."
55authors = [" inoribea <inoribea@outlook.com>" ]
66readme = " README.md"
You can’t perform that action at this time.
0 commit comments