GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Regression in Django with singledispatchmethod on models · Issue #127750 · python/cpython Closed Labels 3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:Also reported upstream to Django here. The following code works on Python 3.12 and I believe #85160 is the cause. When traversing a relationship and then calling a class Test(models.Model): ... class Test2(models.Model): relationship = models.ForeignKey("Test", on_delete=models.CASCADE) @singledispatchmethod def bug(self, x): print(">", id(self)) @bug.register def _(self, x: int): print(">", id(self)) and then it's pretty easy to trigger: for t in test.test2_set.all(): print("id:", id(t)) # always changes t.bug(4) # only ever prints a single id CPython versions tested on:3.13 Operating systems tested on:macOS Linked PRs
Activity
MetadataMetadataAssigneesLabels3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |