Skip to content

Fix AstropyDeprecationWarning: use .name instead of .get_name()#68

Open
hombit wants to merge 1 commit intogregreen:masterfrom
hombit:fix-get-name-deprecation
Open

Fix AstropyDeprecationWarning: use .name instead of .get_name()#68
hombit wants to merge 1 commit intogregreen:masterfrom
hombit:fix-get-name-deprecation

Conversation

@hombit
Copy link
Copy Markdown
Contributor

@hombit hombit commented Apr 18, 2026

representation_type.get_name() was deprecated in astropy v7.1 in favour of the .name class attribute. Use .name when available (astropy >= 7.1), falling back to .get_name() for older versions that predate .name.

Tested with astropy 5.0.5 (oldest with aarch64 wheels, Python 3.8) and astropy 7.1.0 (Python 3.11) with -W error::DeprecationWarning.

representation_type.get_name() was deprecated in astropy v7.1 in favour
of the .name class attribute. Use .name when available (astropy >= 7.1),
falling back to .get_name() for older versions that predate .name.

Tested with astropy 5.0.5 (oldest with aarch64 wheels, Python 3.8) and
astropy 7.1.0 (Python 3.11) with -W error::DeprecationWarning.
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