Opened 4 years ago

Closed 9 months ago

#6266 enhancement closed fixed (fixed)

Removetwisted.python.test.test_util._getDeprecationSuppression.

Reported by: Tom Prince Owned by: Adi Roiban
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch: branches/getDeprecationSuppression-removal-6266
branch-diff, diff-cov, branch-cov, buildbot
Author:

Description (last modified by Tom Prince)

According to #5645, when deprecating something, the tests of that functionality need to remain, but not emit deprecation warnings.

In #5544, a private function _getDeprecationSuppression was added to generate an approriate narrow suppression (to pass to .suppress of a test case or method).

This function should be made public.

Change History (5)

comment:1 Changed 4 years ago by Tom Prince

Description: modified (diff)

(fix ticket link in description)

comment:2 Changed 9 months ago by Adi Roiban

Branch: branches/getDeprecationSuppression-removal-6266
Keywords: review added

I think that this API is no longer valid and the whole suppression thing is no longer valid.

I have removed the api to clean the code.

please review.

thanks!

comment:3 Changed 9 months ago by Glyph

Keywords: review removed
Owner: set to Adi Roiban
Summary: Test, document and make public twisted.python.test.test_util._getDeprecationSuppression.Removetwisted.python.test.test_util._getDeprecationSuppression.

I think that this API is no longer valid and the whole suppression thing is no longer valid.

Just out of curiosity, is there documentation someplace about the right way to do this now, if it's not using suppressions?

I have removed the api to clean the code.

LGTM. If you can fix the pyflakes error that would be nice, or file a bug on braid or something if it's spurious.

please review.

Looks like this is just deleting totally unused and untested code, so: go for it!

comment:4 Changed 9 months ago by Adi Roiban

Thanks for the review.


I hope that this is covered by current documentation here https://github.com/twisted/twisted/blob/trunk/docs/core/development/policy/compatibility-policy.rst#testing-deprecation-code

Not sure if this is the same thing, since the removed code is never used and I am not sure if this is about the same thing.


pyflakes error is valid... pyflakes is most of the time right :)

I hope that soon we will have a twisted helper to run pyflakes on local branches.


will merge

comment:5 Changed 9 months ago by Adi Roiban

Resolution: fixed
Status: newclosed

(In [47345]) Merge getDeprecationSuppression-removal-6266: Remove t.p.test.test_util._getDeprecationSuppression.

Author: adiroiban Reviewer: glyph Fixes: #6266

Note: See TracTickets for help on using tickets.