#36967: Use graphlib's TopologicalSorter to handle circular imports similar to
migrations
------------------------+------------------------------------------------
Reporter: blighj | Type: Cleanup/optimization
Status: new | Component: contrib.staticfiles
Version: 6.0 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------------------
When ManifestStaticFilesStorage post processes files, it handles
dependency chains by looping until it sees no more changes in the files.
If there is a circular loop it will only try for 5 cycles by default and
then throw an error. This can be changed with the
`max_post_process_passes` attribute.
I propose we replace the looping approach with graphlib's
TopologicalSorter similar to the way it is used in migrations, this way
every file will only need to be processed once and we can detect and
handle circular imports without having to throw an error.
--
Ticket URL: <https://code.djangoproject.com/ticket/36967>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019cba9ab27c-7c66ced2-3bfb-4f17-aaad-5d1a4e39853b-000000%40eu-central-1.amazonses.com.