Skip to content

deprecate _naxis1/2 - #7973

Merged
astrofrog merged 3 commits into
astropy:masterfrom
nden:wcs-deprecate-naxis
Oct 26, 2018
Merged

astrofrog merged 3 commits into
astropy:masterfrom
nden:wcs-deprecate-naxis

Conversation

@nden

@nden nden commented Oct 25, 2018

Copy link
Copy Markdown
Contributor

Note: This depends on #7962 and astrofrog#75.

This deprecates Wcs._naxis1 and Wcs._naxis2 in favor of WCS.pixel_shape.
Resolves #5461 and #4669 where there's a description of the problem.

@astropy-bot

astropy-bot Bot commented Oct 25, 2018 •

Copy link
Copy Markdown

Hi there @nden 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃.

Everything looks good from my point of view! 👍

If there are any issues with this message, please report them here.

@nden nden added the wcs label Oct 25, 2018
@nden nden added this to the v3.1 milestone Oct 25, 2018
Comment thread astropy/wcs/wcs.py Outdated
__doctest_skip__ = ['WCS.all_world2pix']

naxis_deprecated_message = """
Private attributes "_naxis1" and "naxis2" have been deprecated since v 3.1.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove space between v and 3.1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread astropy/wcs/wcs.py Outdated

@property
def _naxis1(self):
warnings.warn(naxis_deprecated_message, AstropyDeprecationWarning)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need to deprecate this? I mean this was supposed to be private rather than in the public API, so no one should have used it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been used for lack of a public property. It's used in STScI software and I believe someone else mentioned in a different issue they are using it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've used it too...there really wan't any other way to get at the information, unfortunately.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's very little cost to including the deprecation warning, so I'm in favor 👍

@nden
nden force-pushed the wcs-deprecate-naxis branch from 6e8d64f to a2b2ef1 Compare October 26, 2018 15:23
@nden

nden commented Oct 26, 2018

Copy link
Copy Markdown
Contributor Author

Perhaps @MSeifert04 or @saimn can review as they have looked into this issue before.

@astrofrog astrofrog left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me, just one minor comment

Comment thread astropy/wcs/wcs.py Outdated

__doctest_skip__ = ['WCS.all_world2pix']

naxis_deprecated_message = """

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: make this uppercase to make it clear it's a top-level constant

@astrofrog

Copy link
Copy Markdown
Member

This is pretty straightforward, so I'll go ahead and merge - thanks @nden!

@astrofrog
astrofrog merged commit dc6030a into astropy:master Oct 26, 2018
jamienoss added a commit to jamienoss/drizzle that referenced this pull request Nov 8, 2018
jamienoss added a commit to jamienoss/drizzle that referenced this pull request Nov 8, 2018
@nden
nden deleted the wcs-deprecate-naxis branch December 27, 2018 19:22
davidgegiya added a commit to davidgegiya/agent-orchestrator that referenced this pull request Nov 8, 2026
Pin 4fc9f31af6c5659c3a59b66a387894c12203c946 and its regression selectors for reproducible runs.

Source: astropy/astropy#7973
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants