Re: [Django] #35667: Switch usage to skip_file_prefixes instead of stacklevel when it makes sense

14 views
Skip to first unread message

Django

unread,
Aug 12, 2024, 9:41:08 AM8/12/24
to django-...@googlegroups.com
#35667: Switch usage to skip_file_prefixes instead of stacklevel when it makes
sense
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: deprecation | Triage Stage: Accepted
stacklevel |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* keywords: => deprecation stacklevel
* stage: Unreviewed => Accepted
* version: 5.1 => dev

Comment:

Hello Simon, as always thank you for your detailed and thorough report.

I agree with your proposal, I think this would help reducing the mistakes
and overall improve the contributing experience. I'm setting this version
to `dev` since this new feature should target `5.2` at this point.
--
Ticket URL: <https://code.djangoproject.com/ticket/35667#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 13, 2024, 9:18:36 AM8/13/24
to django-...@googlegroups.com
#35667: Switch usage to skip_file_prefixes instead of stacklevel when it makes
sense
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: deprecation | Triage Stage: Accepted
stacklevel |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mohammad Salehi):

Hello, If you agree, I would like to review this issue and start working
on it ?
Thank you.
--
Ticket URL: <https://code.djangoproject.com/ticket/35667#comment:3>

Django

unread,
Aug 26, 2024, 11:26:50 PM8/26/24
to django-...@googlegroups.com
#35667: Switch usage to skip_file_prefixes instead of stacklevel when it makes
sense
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: deprecation | Triage Stage: Accepted
stacklevel |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):

I think we might want to wait for the patch for #35666 to land before
committing efforts here Mohammad.
--
Ticket URL: <https://code.djangoproject.com/ticket/35667#comment:4>

Django

unread,
Sep 18, 2024, 6:12:41 AM9/18/24
to django-...@googlegroups.com
#35667: Switch usage to skip_file_prefixes instead of stacklevel when it makes
sense
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Jae Hyuck
Type: | Sa
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: deprecation | Triage Stage: Accepted
stacklevel |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jae Hyuck Sa ):

* owner: (none) => Jae Hyuck Sa
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/35667#comment:5>

Django

unread,
Sep 18, 2024, 9:13:06 AM9/18/24
to django-...@googlegroups.com
#35667: Switch usage to skip_file_prefixes instead of stacklevel when it makes
sense
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Jae Hyuck
Type: | Sa
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: deprecation | Triage Stage: Accepted
stacklevel |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jae Hyuck Sa ):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35667#comment:6>

Django

unread,
Nov 27, 2024, 12:52:20 PM11/27/24
to django-...@googlegroups.com
#35667: Switch usage to skip_file_prefixes instead of stacklevel when it makes
sense
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Jae Hyuck
Type: | Sa
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: deprecation | Triage Stage: Accepted
stacklevel |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1

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

Django

unread,
Dec 2, 2024, 3:29:22 AM12/2/24
to django-...@googlegroups.com
#35667: Switch usage to skip_file_prefixes instead of stacklevel when it makes
sense
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner:
Type: | JaeHyuckSa
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: deprecation | Triage Stage: Accepted
stacklevel |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by JaeHyuckSa):

* owner: Jae Hyuck Sa => JaeHyuckSa

--
Ticket URL: <https://code.djangoproject.com/ticket/35667#comment:8>

Django

unread,
Sep 3, 2025, 4:50:55 PM (4 days ago) Sep 3
to django-...@googlegroups.com
#35667: Switch usage to skip_file_prefixes instead of stacklevel when it makes
sense
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner:
Type: | JaeHyuckSa
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: deprecation | Triage Stage: Accepted
stacklevel |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

Just noting we have a someday/maybe ticket to favor `importlib.resources`
over `__file__` to better support byte-compiled Django: #30950. Should we
be using that when developing this feature?
--
Ticket URL: <https://code.djangoproject.com/ticket/35667#comment:9>

Django

unread,
Sep 4, 2025, 12:19:31 PM (4 days ago) Sep 4
to django-...@googlegroups.com
#35667: Switch usage to skip_file_prefixes instead of stacklevel when it makes
sense
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner:
Type: | JaeHyuckSa
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: deprecation | Triage Stage: Accepted
stacklevel |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):

In [changeset:"34bd3ed944bf38792c631b55e581963d44d52284" 34bd3ed]:
{{{#!CommitTicketReference repository=""
revision="34bd3ed944bf38792c631b55e581963d44d52284"
Refs #36559, #35667 -- Used skip_file_prefixes in PartialTemplate.source
warning.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35667#comment:10>
Reply all
Reply to author
Forward
0 new messages