Re: [Django] #34765: call_command reuses already loaded command causing stale class variable value usage

7 views
Skip to first unread message

Django

unread,
Aug 4, 2023, 2:13:25 PM8/4/23
to django-...@googlegroups.com
#34765: call_command reuses already loaded command causing stale class variable
value usage
-------------------------------------+-------------------------------------
Reporter: MaziyarMK | Owner: nobody
Type: Bug | Status: closed
Component: Core (Management | Version: 4.2
commands) |
Severity: Normal | Resolution: invalid
Keywords: call_command | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by MaziyarMK):

* status: new => closed
* resolution: => invalid


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

Django

unread,
Aug 4, 2023, 2:15:51 PM8/4/23
to django-...@googlegroups.com
#34765: call_command reuses already loaded command causing stale class variable
value usage
-------------------------------------+-------------------------------------
Reporter: MaziyarMK | Owner: nobody
Type: Bug | Status: closed
Component: Core (Management | Version: 4.2
commands) |
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:

| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* keywords: call_command =>


Comment:

Hello,

Thank you for report, though the issue you are describing is how class
variables work in Python. This is not a Django specific issue, perhaps you
should consider storing you state-data as an instance variable instead.

If you need further help, please consider using any of the user support
channels from [https://docs.djangoproject.com/en/dev/faq/help/#how-
do-i-do-x-why-doesn-t-y-work-where-can-i-go-to-get-help this link].

--
Ticket URL: <https://code.djangoproject.com/ticket/34765#comment:3>

Reply all
Reply to author
Forward
0 new messages