Opened 5 years ago

Closed 5 years ago

#6323 defect closed fixed (fixed)

twisted.python.test.test_reflect emits DeprecationWarning

Reported by: Tom Prince Owned by: Tom Prince
Priority: normal Milestone:
Component: core Keywords: easy
Cc: Branch: branches/test_reflect-emits-DeprecationWarning-6323
branch-diff, diff-cov, branch-cov, buildbot
Author: tomprince

Description

twisted.python.reflect.Accessor and twisted.python.reflect.PropertyAccessor are deprecated, but need to be tested. Mask the deprecation warnings until they can be removed.

Change History (6)

comment:1 Changed 5 years ago by Tom Prince

Author: tomprince
Branch: branches/test_reflect-emits-DeprecationWarning-6323

(In [37221]) Branching to test_reflect-emits-DeprecationWarning-6323.

comment:2 Changed 5 years ago by Tom Prince

Keywords: easy review added
Type: enhancementdefect

comment:3 Changed 5 years ago by Richard Wall

Owner: set to Richard Wall
Status: newassigned

Reviewing...

comment:4 Changed 5 years ago by Richard Wall

Keywords: review removed
Owner: changed from Richard Wall to Tom Prince
Status: assignednew

Code Review

The changes look fine and it was interesting to learn about warnings.catch_warnings context manager.

But it's not clear to me why this change is necessary.

I ran trial twisted.test.test_reflect against trunk and all tests pass without any warnings.

The buildbot trunk builds don't show any deprecation warnings:

How do I recreate the problem?

I can see there are a couple of related tickets #6324 and #6326 so I guess there's a good reason.

Maybe add a short comment to this and the related tickets explaining the motivation.

Here's what I checked:

Please merge if you're sure there's a good reason for the change.

-RichardW.

comment:5 Changed 5 years ago by Tom Prince

Unfortunately, python 2.7 ignores DeprecationWarnings by default, so to see them on 2.7, you need to run trial with python -Walways or something to see them (#6348).

You can see them in various 2.6 builders like this one.

comment:6 Changed 5 years ago by Tom Prince

Resolution: fixed
Status: newclosed

(In [37370]) Merge test_reflect-emits-DeprecationWarning-6323: Filter expected DeprecationWarnings from twisted.python.test.test_reflect.

Author: tom.prince Reviewers: rwall Fixes: #6323

twisted.python.reflect.Accessor and twisted.python.reflect.PropertyAccessor are deprecated, but need to be tested. Mask the deprecation warnings until they can be removed.

Note: See TracTickets for help on using tickets.