Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#35666 closed Cleanup/optimization (fixed)

Test stack level of deprecation warnings

Reported by: Simon Charette Owned by: Simon Charette
Component: Testing framework Version: 5.1
Severity: Release blocker Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

With another improperly set instance of stacklevel and few others behind our belt I think it's worth documenting and adjusting our test suite to systematically test against the assertWarnsMessage.filename to ensure is it properly assigned.

Change History (9)

comment:1 by Natalia Bidart, 4 months ago

Owner: set to Simon Charette
Severity: NormalRelease blocker
Status: newassigned
Triage Stage: UnreviewedAccepted

Thank you Simon, I agree with your rationale.

I think some of the commits from your PR should be backported to 5.1 so I'll be marking this as a release blocker for 5.1.

comment:2 by Natalia Bidart, 4 months ago

Has patch: set

comment:3 by Natalia Bidart, 4 months ago

Related PR from Adam that does not show in review queue so I'm adding it here for visibility.

comment:4 by Adam Johnson, 4 months ago

Summary: Stack level of deprecation warnings should be testedTest stack level of deprecation warnings

comment:5 by Natalia Bidart, 4 months ago

Needs documentation: set
Patch needs improvement: set

comment:6 by Simon Charette, 4 months ago

Needs documentation: unset
Patch needs improvement: unset

Feedback addressed on Github. Feel free to re-organize the commits how you see fit Natalia.

comment:7 by Natalia Bidart, 4 months ago

Triage Stage: AcceptedReady for checkin

comment:8 by nessita <124304+nessita@…>, 4 months ago

Resolution: fixed
Status: assignedclosed

In 57307bbc:

Fixed #35666 -- Documented stacklevel usage and testing, and adjusted test suite accordingly.

Over the years we've had multiple instances of hit and misses when
emitting warnings: either setting the wrong stacklevel or not setting
it at all.

This work adds assertions for the existing warnings that were declaring
the correct stacklevel, but were lacking tests for it.

comment:9 by Natalia <124304+nessita@…>, 4 months ago

In 9a461cae:

[5.1.x] Fixed #35666 -- Documented stacklevel usage and testing, and adjusted test suite accordingly.

Over the years we've had multiple instances of hit and misses when
emitting warnings: either setting the wrong stacklevel or not setting
it at all.

This work adds assertions for the existing warnings that were declaring
the correct stacklevel, but were lacking tests for it.

Backport of 57307bbc7d88927989cf5b314f16d6e13ade04e6 from main.

Note: See TracTickets for help on using tickets.
Back to Top