Hey Simon, I looked through your PR and added a couple comments. The main thing is I think we can actually ignore the field context on "RemoveField", if only because the executor doesn't need it. Even though the field might be pointing to a related model, that doesn't prevent being optimized through.
This is hard to explain, but intuitively, each "RemoveField" is paired with an "AddField" or "CreateModel" that *does *depend on the related model. So if we have a potentially dangerous optimization, those initial operations will "protect" the causal order, not "RemoveField". Raphael -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/9dfdcec6-b98c-44f2-86af-99aaa8857cc9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.