diff --git a/CHANGES.rst b/CHANGES.rst index 449e7f44..71a51ec5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,7 @@ 0.10 (unreleased) ----------------- +- Fix compatibility with astropy v6.0. 0.9.1 (2023-09-20) ------------------ diff --git a/astroplan/__init__.py b/astroplan/__init__.py index ceb480f5..c5ce9258 100644 --- a/astroplan/__init__.py +++ b/astroplan/__init__.py @@ -12,21 +12,18 @@ * Docs: https://astroplan.readthedocs.io/ """ -# Affiliated packages may add whatever they like to this file, but -# should keep this content at the top. -# ---------------------------------------------------------------------------- -from ._astropy_init import * -# ---------------------------------------------------------------------------- +try: + from .version import version as __version__ +except ImportError: + __version__ = '' -# For egg_info test builds to pass, put package imports here. -if not _ASTROPY_SETUP_: - from .utils import * - from .observer import * - from .target import * - from .exceptions import * - from .moon import * - from .constraints import * - from .scheduling import * - from .periodic import * +from .utils import * +from .observer import * +from .target import * +from .exceptions import * +from .moon import * +from .constraints import * +from .scheduling import * +from .periodic import * - download_IERS_A() +download_IERS_A() diff --git a/astroplan/_astropy_init.py b/astroplan/_astropy_init.py deleted file mode 100644 index fa37a637..00000000 --- a/astroplan/_astropy_init.py +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst - -__all__ = ['__version__'] - -# this indicates whether or not we are in the package's setup.py -try: - _ASTROPY_SETUP_ -except NameError: - import builtins - builtins._ASTROPY_SETUP_ = False - -try: - from .version import version as __version__ -except ImportError: - __version__ = '' - - -if not _ASTROPY_SETUP_: # noqa - import os - - # Create the test function for self test - from astropy.tests.runner import TestRunner - test = TestRunner.make_test_runner_in(os.path.dirname(__file__)) - test.__test__ = False - __all__ += ['test']