New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider deprecating BaseCoordinateFrame.representation in favor of representation_cls #6247
Comments
👍 for deprecating anything in 2.0, it will be much nicer to support the LTS if the deprecation is already in there. |
I agree that |
👎 for doing this in a hurry without time for a considered discussion. While it is true that some people (mostly developers) might expect
Agreed that the API is not perfect -- we have a representation object which is named Having written this out I would need a lot more convincing for this API change. We really cannot take such changes lightly as each one is a PITA for our community. |
I'm 👍 for deprecating this in 2.0. I have never encountered anyone who actually uses More generally, I think most people who've actually used this "in the wild" have probably spent enough time thinking about it that they understand why this is needed and can update. This is the sort of 95% (maybe 99%?) power-users... but it's a premium here on making this change because the coordinates stuff is (intrinsically, not just the code) so darn complex. That said, I am sympathetic with @taldcroft's
what I don't see is the downside in deprecating. I am not averse to deprecating this and then leaving it in for a longer time than the usual deprecation cycle... Or making a more active effort than we usually do to ensure this isn't a problem for folks... Or even saying "deprecated, but with no clear removal date"... That makes it clear that it should not be used in the future but we might still not need to break old code. |
@adrn - as I understand it, your suggestion is also to deprecate the
So, the instruction to the user is actually that p.s. In |
A good start would be sending email to astropy-dev with an complete description of the API change and allowing at least a week for commentary. I really think that introducing this idea a day after the 2.0 branching is the wrong thing. Question - will this remove the ability to set Sorry for putting up resistance, but this is a very visible part of the API that has been stable for nearly 3 years. |
I think I agree with @taldcroft on this, that deprecating this for 2.0 is too soon. It would require quite a few changes in SunPy to prevent our users being hit with a lot of deprecation warnings when they create any of our frames. I think I am more in favour of keeping the |
Definitely agree that setting with strings should continue to be possible; I don't like having to import those representation classes unnecessarily. Could we have the best of both worlds and continue to allow setting @Cadair - just to be explicit: sunpy users would be hit with warnings because it uses the setting of representation with a string/class internally, right? I think that does strongly argue for at most having a pending deprecation warning, which is not visible by default. @adrn - It seems to me the answer is indeed that we should wait. This probably even more now that your velocity work has shown real short-comings of the current mechanism -- which I don't think we quite know how to solve yet. This suggests it is better to shake that out first, to ensure that any changes are useful. p.s. Somewhat relatedly, I've gotten some ways in refactoring the |
@mhvk Yeah we set |
For what it's worth, I was just suggesting Since making this issue, I've found a number of other problematic API features that we'll probably want to break (for v3.0) to make the differentials/velocity support cleaner and more natural (there is some discussion in #6219). So I agree that we should wait until we know the full scope of proposed changes, and make sure we're certain about the changes. Re-milestoning to v3.0. |
Actually, this is about the property, not the initializer. That's why all of this is so confusing: in the initializer All that said, I'm ok with not doing this in 2.0 - I agree more notice is a good idea. I do think we want to keep |
Closing this in favor of #6591 (which is more concrete), but if we reject that this should be re-opened. |
I've always found it confusing that
frame.representation
points to a class of the representation. I propose we deprecate this attribute in favor offrame.representation_cls
.I've already implemented the new attribute in #6219 (which supports and can handle either
.representation
or.representation_cls
), but we should decide if I should put a deprecation warning in there for v2.0 or wait. My vote is that we put it in v2.0Milestoned for 2.0 so we make a decision.
cc @eteq @mhvk @taldcroft
The text was updated successfully, but these errors were encountered: