#23406: Migrations not found when only .pyc files are available (e.g. in a 
frozen
environment)
-------------------------------------+-------------------------------------
     Reporter:  Daniel Menzel        |                    Owner:  Dan
                                     |  Watson
         Type:  Bug                  |                   Status:  assigned
    Component:  Migrations           |                  Version:  1.7
     Severity:  Normal               |               Resolution:
     Keywords:  migrations, .pyc,    |             Triage Stage:  Accepted
  frozen, cx_Freeze                  |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Dan Watson):

 It's true that by default, pyc files are compiled into `__pycache__`
 directories, but there are explicit affordances made to import pyc files
 that exist **in place of** the original py file. See
 https://www.python.org/dev/peps/pep-3147/#case-4-legacy-pyc-files-and-
 source-less-imports

 This is the case for frozen or sourceless distributions. There are
 switches in `compileall` to output legacy pyc files for this purpose (and
 in fact this is what the unit test does). Whether frozen or sourceless
 distributions are a good idea is a much more subjective and (seemingly)
 controversial issue, but they are still possible, and this is how.

 This setting is pretty narrow in scope, just to allow frozen distributions
 (and is off by default with a warning in the docs about the problems it
 may cause).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23406#comment:23>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.c0c9f33cea5f806cd0d37ba593550edf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to