Changes between Initial Version and Version 1 of Ticket #34807
- Timestamp:
- Aug 31, 2023, 2:40:00 PM (15 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34807
- Property Severity Normal → Release blocker
- Property Triage Stage Unreviewed → Accepted
-
Ticket #34807 – Description
initial v1 1 1 circular import between forms and models and choices. 2 2 3 before 500e01073adda32d514962you could import forms just fine.3 before [500e01073adda32d514962] you could import forms just fine. 4 4 5 5 {{{ … … 10 10 11 11 12 but since 500e01073adda32d514962this hasn't worked due to circular import.12 but since [500e01073adda32d514962] this hasn't worked due to circular import. 13 13 14 14 {{{ … … 62 62 Models has always had a dependency on Forms, but now Models depends on Forms depends on `utils.choices` which depend on `models.enums.ChoicesMeta` 63 63 64 Summary of the circle: `django.forms` -> 'forms.widgets` -> `django.utils.choices` -> `django.db.models.enums` -> `models.__init__` -> `models.aggregates` -> `models.fields` -> `django.forms`64 Summary of the circle: `django.forms` -> `forms.widgets` -> `django.utils.choices` -> `django.db.models.enums` -> `models.__init__` -> `models.aggregates` -> `models.fields` -> `django.forms`. 65 65 66 If `django.db.models` is imported before forms then it happens to import fine because the order of imports happens to lines up perfectally, but it's very very fragile. `models.__init__` -> `models.aggregates` -> `models.fields` -> `django.forms` -> 'forms.widgets` -> `django.utils.choices` -> `django.db.models.enums`.66 If `django.db.models` is imported before forms then it happens to import fine because the order of imports happens to lines up perfectally, but it's very very fragile. `models.__init__` -> `models.aggregates` -> `models.fields` -> `django.forms` -> `forms.widgets` -> `django.utils.choices` -> `django.db.models.enums`. 67 67 68 68