Replace deprecated astropy affiliated-package boilerplate#72
Open
museleie wants to merge 1 commit into
Open
Conversation
_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes import failure on astropy >= 6.0.0 by replacing the deprecated
_astropy_init.pyboilerplate with a minimal version stub.What broke
_astropy_init.pyimportedupdate_default_configfromastropy.config.configuration, which was removed in astropy 6.0.0 (released 2023-11-27). Any freshpip install servicemonafter 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.