Skip to content

Replace deprecated astropy affiliated-package boilerplate#72

Open
museleie wants to merge 1 commit into
NASA-NAVO:mainfrom
museleie:fix/minimal-astropy-init
Open

Replace deprecated astropy affiliated-package boilerplate#72
museleie wants to merge 1 commit into
NASA-NAVO:mainfrom
museleie:fix/minimal-astropy-init

Conversation

@museleie
Copy link
Copy Markdown

Summary

Fixes import failure on astropy >= 6.0.0 by replacing the deprecated _astropy_init.py boilerplate with a minimal version stub.

What broke

_astropy_init.py imported update_default_config from astropy.config.configuration, which was removed in astropy 6.0.0 (released 2023-11-27). Any fresh pip install servicemon after that date crashes on import before any code runs.

The fix

The old 53-line file imported config management, test runner setup, and a setup guard — none of which servicemon uses. The only line that mattered was setting __version__. Replaced with a 7-line version stub.

Verification

Tested on macOS, Python 3.11.9 with fully unpinned modern dependencies (astropy 7.2.0, numpy 2.4.4, pyvo 1.8.1, ec2_metadata 3.0.0). Both ConeSearch and async TAP queries return real data from IRSA.

_astropy_init.py imported update_default_config from
astropy.config.configuration, which was removed in astropy 6.0.0
(released 2023-11-27). This crashes servicemon on import with any
astropy >= 6.0.

The old code's only useful function was setting __version__. The
config update, test runner registration, and _ASTROPY_SETUP_ guard
were unnecessary for servicemon.

Replaced with a minimal version stub.
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 this pull request may close these issues.

1 participant