Re: [Django] #35666: Test stack level of deprecation warnings

9 views
Skip to first unread message

Django

unread,
Aug 16, 2024, 9:50:04 AM8/16/24
to django-...@googlegroups.com
#35666: Test stack level of deprecation warnings
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1
* needs_docs: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35666#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 26, 2024, 11:55:06 PM8/26/24
to django-...@googlegroups.com
#35666: Test stack level of deprecation warnings
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* needs_better_patch: 1 => 0
* needs_docs: 1 => 0

Comment:

Feedback addressed on Github. Feel free to re-organize the commits how you
see fit Natalia.
--
Ticket URL: <https://code.djangoproject.com/ticket/35666#comment:6>

Django

unread,
Aug 28, 2024, 10:10:37 AM8/28/24
to django-...@googlegroups.com
#35666: Test stack level of deprecation warnings
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/35666#comment:7>

Django

unread,
Aug 28, 2024, 10:44:15 AM8/28/24
to django-...@googlegroups.com
#35666: Test stack level of deprecation warnings
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: closed
Component: Testing framework | Version: 5.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by nessita <124304+nessita@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"57307bbc7d88927989cf5b314f16d6e13ade04e6" 57307bbc]:
{{{#!CommitTicketReference repository=""
revision="57307bbc7d88927989cf5b314f16d6e13ade04e6"
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.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35666#comment:8>

Django

unread,
Aug 28, 2024, 10:48:15 AM8/28/24
to django-...@googlegroups.com
#35666: Test stack level of deprecation warnings
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: closed
Component: Testing framework | Version: 5.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia <124304+nessita@…>):

In [changeset:"9a461cae3e5536cbacafa53dbd290ff68df22e67" 9a461cae]:
{{{#!CommitTicketReference repository=""
revision="9a461cae3e5536cbacafa53dbd290ff68df22e67"
[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.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35666#comment:9>
Reply all
Reply to author
Forward
0 new messages