Skip to content

MAINT: shape setting should be deprecated in astropy container classes. #19168

Open

Description

@mhvk

Instead of using the private _set_shape method, we should just deprecate setting shapes where possible (probably everywhere except Masked).

Activity

  1. added this to the v7.2.1 milestone on Jan 16, 2026
  2. added
    API changePRs and issues that change an existing API, possibly requiring a deprecation period
    on Jan 16, 2026
  3. neutrinoceros commented on Jan 22, 2026

    @neutrinoceros
    Contributor

    incidentally, it seems to me your suggestion for #19182 provides a great migration path for us to resolve this issue; we can split every shape property setter into a deprecated public interface, and a (semi) private _set_shape override. WDYT ?

  4. mhvk commented on Jan 22, 2026

    @mhvk
    ContributorAuthor

    Yes, agreed, we can simply mimic what numpy offers, allowing people to keep setting shapes if they really need to. And that also allows us to yield our own deprecation warnings (maybe starting in 8.0).

  5. neutrinoceros commented on Feb 2, 2026

    @neutrinoceros
    Contributor

    note: I consider this blocked by #19217, because we currently can't really see anything in devdeps CI
    If this issue is still open when time comes to prepare 7.2.1, I expect it should be trivial to fix properly, so please do ping us before moving the ticket to the next milestone.

  6. Iquecs2005 commented on May 19, 2026

    @Iquecs2005
    Contributor

    Hi, is this issue open for work now that #19217 is closed?
    And just to make sure, when you mentioned everywhere except Masked you meant the Masked family of classes and not only the Masked class correct?

  7. modified the milestones: v7.2.1, v9.0.0 on May 19, 2026
  8. pllim commented on May 19, 2026

    @pllim
    Member

    Not sure why this was milestoned to v7.2.1 originally. I don't think we can deprecate anything now until main is set for v9.0.dev?

  9. Iquecs2005 commented on May 19, 2026

    @Iquecs2005
    Contributor

    Can i make a PR, draft or not, that will close this issue even if it will only be merged when 9.0 rolls around?

  10. pllim commented on May 19, 2026

    @pllim
    Member

    Yes, you can make a draft PR but it would sit open for a while.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    API changePRs and issues that change an existing API, possibly requiring a deprecation periodutils.masked

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions