Skip to content

Finalize decision on whether SkyCoord initializer should be bypassed for internal methods #7029

Closed

Description

@eteq

This is prompted by the work in #6941 . See the discussion there for more detail on this, but the basic question is: are we ok with the subtle change in #6941 where the SkyCoord initializer is bypassed for some of the internal replicate/copy/etc methods. @Cadair pointed out that SunPy overrides the __init__ to do various things, so we would potentially break such code this way.

Ideally, cleaning up the SkyCoord initializer will make this a moot point by making it so that the bypassing isn't needed. The backup plan is something like the items discussed in #6941 of a "make sanitized SkyCoord". This would then make the "bypass initializer" decision permanent.

cc @mhvk @Cadair @astrofrog @adrn

Activity

  1. added this to the v3.1 milestone on Dec 23, 2017
  2. adrn commented on Oct 18, 2018

    @adrn
    Member

    IMO it's ok to bypass the SkyCoord initializer internally, but we shouldn't bypass the Frame initializer or it will break various SunPy magic. Also, this particular ship has sailed with #6941...

  3. eteq commented on Oct 18, 2018

    @eteq
    MemberAuthor

    @adrn and I discussed this out-of-band and concluded that #6941 actually improves the situation because previously replicate/copy/etc went through the SkyCoord initializer rather than the __class__ initializer. Now you at least can potentially get the right kind of object out. And if someone wants to subclass SkyCoord and get all of these methods to work they really have to know what to do with apply anyway, so it's not a big of an extra hump to make them have to override this method.

    On that basis, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions