Skip to content
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

DM-18544: Add python-level deprecation warnings for Calib interface #448

Merged
merged 2 commits into from Apr 13, 2019

Conversation

parejkoj
Copy link
Contributor

No description provided.

from .photoCalib import PhotoCalib


@continueClass # noqa F811
Copy link
Member

Choose a reason for hiding this comment

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

I think this should formally be noqa: F811 (the colon is important to flake8 since it tells it to only mask F811 rather than ignoring all warnings).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like we get this wrong all over in afw: I find 33 uses of noqa (space) vs. 8 uses of noqa: (colon space).

# return self._setCalib(*args, **kwargs)
@deprecated(reason="Replaced with setPhotoCalib (will be removed after v18)", category=FutureWarning)
def setCalib(self, *args, **kwargs):
self._setCalib(*args, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

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

Why force the wrapped methods to be all underscores instead of just following the style guide

setCalib = deprecated(reason="Replaced with setPhotoCalib (will be removed after v18)", category=FutureWarning)(setCalib)

You had to make a lot of changes in the C++ file...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because that doesn't work for methods on classes due to a docstring overwriting problem. @ktlim has what he thinks is a fix for upstream deprecate, but getting that into the stack is a problem because of upgrading the conda env being complicated.

@parejkoj parejkoj changed the title Add python-level deprecation warnings for Calib interface DM-18544: Add python-level deprecation warnings for Calib interface Apr 11, 2019
PhotoCalib deprecations handled in a continueClass, which can be removed
entirely when we remove all of these deprecations.
Without the colon, they cause flake8 to ignore everything. We want to ignore
specific lint, not lint in general.
@parejkoj parejkoj merged commit 594ab8d into master Apr 13, 2019
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.

None yet

4 participants