Re: [Django] #33586: Applying RunPython backward results in ValueError when involved models are referenced through multiple foreign keys

11 views
Skip to first unread message

Django

unread,
Feb 6, 2025, 8:50:01 AM2/6/25
to django-...@googlegroups.com
#33586: Applying RunPython backward results in ValueError when involved models are
referenced through multiple foreign keys
-------------------------------+------------------------------------
Reporter: Jeremy Poulin | Owner: (none)
Type: Bug | Status: new
Component: Migrations | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Enrico Zini):

* cc: Enrico Zini (added)

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

Django

unread,
Sep 13, 2025, 12:18:30 PM9/13/25
to django-...@googlegroups.com
#33586: Applying RunPython backward results in ValueError when involved models are
referenced through multiple foreign keys
-------------------------------+------------------------------------
Reporter: Jeremy Poulin | Owner: (none)
Type: Bug | Status: new
Component: Migrations | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Comment (by Tanishq):

Hey,

I was able to reproduce this locally. Noticed PR #16147 mentioned, but it
hasn’t been updated in a while and isn’t linked here.
Is this still open for new ideas/PRs? Happy to build on that one or just
put together a fresh patch with a test + perf notes, whichever helps most.
--
Ticket URL: <https://code.djangoproject.com/ticket/33586#comment:31>

Django

unread,
Sep 15, 2025, 11:07:38 AM9/15/25
to django-...@googlegroups.com
#33586: Applying RunPython backward results in ValueError when involved models are
referenced through multiple foreign keys
-------------------------------+------------------------------------
Reporter: Jeremy Poulin | Owner: (none)
Type: Bug | Status: new
Component: Migrations | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Comment (by Jacob Walls):

That PR was closed with a link to comment:19. Yes, a new PR is welcome--as
always, be sure to take previous feedback into account.
--
Ticket URL: <https://code.djangoproject.com/ticket/33586#comment:32>

Django

unread,
Sep 16, 2025, 8:53:44 AM9/16/25
to django-...@googlegroups.com
#33586: Applying RunPython backward results in ValueError when involved models are
referenced through multiple foreign keys
-------------------------------+------------------------------------
Reporter: Jeremy Poulin | Owner: (none)
Type: Bug | Status: new
Component: Migrations | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Comment (by Tanishq):

Thank you for the go-ahead, Jacob. I'll begin working on the new PR
shortly and make sure to keep the previous feedback in mind while
preparing the patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/33586#comment:33>

Django

unread,
Jan 2, 2026, 9:25:32 PMJan 2
to django-...@googlegroups.com
#33586: Applying RunPython backward results in ValueError when involved models are
referenced through multiple foreign keys
-------------------------------+------------------------------------
Reporter: Jeremy Poulin | Owner: (none)
Type: Bug | Status: new
Component: Migrations | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by mag123c):

* cc: mag123c (added)

Comment:

Hi @Tanishq1030, are you still working on this? If not, I'd be happy to
pick this up and prepare a patch with the required tests and performance
benchmarks.
--
Ticket URL: <https://code.djangoproject.com/ticket/33586#comment:34>

Django

unread,
Jan 2, 2026, 9:26:49 PMJan 2
to django-...@googlegroups.com
#33586: Applying RunPython backward results in ValueError when involved models are
referenced through multiple foreign keys
-------------------------------+------------------------------------
Reporter: Jeremy Poulin | Owner: (none)
Type: Bug | Status: new
Component: Migrations | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Comment (by mag123c):

Hi Tanishq1030, are you still working on this?

If not, I'd be happy to pick this up and prepare a patch with the required
tests and performance benchmarks.
--
Ticket URL: <https://code.djangoproject.com/ticket/33586#comment:35>
Reply all
Reply to author
Forward
0 new messages