In the hope that I have allayed this group's initial concerns, I have 
created ticket #32302 <https://code.djangoproject.com/ticket/32302> and 
pull request GH-13820 <https://github.com/django/django/pull/13820>. If you 
still have reservations, I am happy to discuss this matter further. Getting 
this merged in time for Django 3.2 would be a huge relief!

On Tuesday, December 22, 2020 at 4:27:53 PM UTC-6 William Schwartz wrote:

> 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/cb2d9b0d-99d8-4833-8bcc-015d5e2fe616n%40googlegroups.com.

Reply via email to