Mariusz, Thanks for your response!
*> I have the impression that more changes are needed to support "freezers".... Are we sure this is the only change that is needed?* Django will indeed require changes beyond today's proposal for full freezer support. I am pursuing an incremental approach here—apologies for being unclear on this point. My intention for this proposal, like the one in #32177 <https://code.djangoproject.com/ticket/32177> whose PR you merged, is to remove one failure mode for frozen Django apps without adversely affecting any other users. I led with this proposal rather than others that would make progress on freezer support because it makes Django more correct and compliant with Python's import API without affecting any existing users. That is, I believe the patch strictly improves Django regardless of PyOxidizer. (If there's interest, I would be happy to start a new thread to explain what I patched/overrode in Django to get my Django app working in PyOxidizer.) *> how we can avoid regressions and don't break this in the future?* My PR will add the following test case to tests/migrations/test_loader.py:LoaderTests. *def* test_loading_package_without__file__(self): """Migrations can be found even if the package's __file__ is undefined.""" *from* migrations *import* test_migrations # __file__ == __spec__.origin or the latter is None and former undefined file = test_migrations.__file__ origin = test_migrations.__spec__.origin has_location = test_migrations.__spec__.has_location *try*: *del* test_migrations.__file__ test_migrations.__spec__.origin = None test_migrations.__spec__.has_location = False self.test_load() *finally*: test_migrations.__file__ = file test_migrations.__spec__.origin = origin test_migrations.__spec__.has_location = has_location No changes to the existing LoaderTests.test_loading_namespace_package are required. On Tuesday, December 22, 2020 at 1:28:41 PM UTC-6 Mariusz Felisiak wrote: > Hi, > > Thanks for extra details. It's not about the number of LOC. I have the > impression that more changes are needed to support "freezers" , see the > previous discussion about PyOxidizer > <https://groups.google.com/g/django-developers/c/V2Kyah9MoXY/m/-7_kwGcgCAAJ>. > Are we sure this is the only change that is needed? and how we can avoid > regressions and don't break this in the future? > > Best, > Mariusz > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/62cf1683-3543-48a0-9363-dc3260b34ac0n%40googlegroups.com.