* stage: Someday/Maybe => Accepted
Comment:
Whoop! The time has come. New [https://github.com/django/django/pull/16468
PR].
--
Ticket URL: <https://code.djangoproject.com/ticket/32528#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> In Python 3.9 we have a new standard library module,
> [https://docs.python.org/3/library/graphlib.html graphlib], that includes
> a topological sort implementation.
> Let's use this instead of our custom implementation in
> `django.utils.topological_sort`.
>
> This will require a backport for Python 3.8, the minimum supported
> version for Django 4.0, but when support for Python 3.8 is removed we can
> simply drop the backport. When using Python 3.9+ we'll just use the
> module direct from the standard library.
New description:
In Python 3.9 we have a new standard library module,
[https://docs.python.org/3/library/graphlib.html graphlib], that includes
a topological sort implementation.
Let's use this instead of our custom implementation in
`django.utils.topological_sort`.
~~This will require a backport for Python 3.8, the minimum supported
version for Django 4.0, but when support for Python 3.8 is removed we can
simply drop the backport. When using Python 3.9+ we'll just use the module
direct from the standard library.~~
--
--
Ticket URL: <https://code.djangoproject.com/ticket/32528#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32528#comment:6>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"1e62a6420230c512b78433265ae8003f27c6eaeb" 1e62a642]:
{{{
#!CommitTicketReference repository=""
revision="1e62a6420230c512b78433265ae8003f27c6eaeb"
Refs #32528 -- Simplified Media.merge().
This avoids building up a second datastructure for the duplicate files
warning case and simply flatten and strip duplicates if that case ever
arises.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32528#comment:8>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"1282b5e4207440af659ef0e0e0c486fdfba8e7b7" 1282b5e]:
{{{
#!CommitTicketReference repository=""
revision="1282b5e4207440af659ef0e0e0c486fdfba8e7b7"
Fixed #32528 -- Replaced django.utils.topological_sort with
graphlib.TopologicalSort().
graphlib.TopologicalSort() is available since Python 3.9.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32528#comment:7>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"39f83765e12b0e5d260b7939fc3fe281d879b279" 39f8376]:
{{{
#!CommitTicketReference repository=""
revision="39f83765e12b0e5d260b7939fc3fe281d879b279"
Refs #32528 -- Simplified MigrationAutodetector._sort_migrations().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32528#comment:9>