#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: Ready for
frozen, cx_Freeze | checkin
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Dan Watson):
The only time I could see `.pyc` files hanging around is if you're sharing
a local copy of a third-party application between two different versions
of Python (i.e. `pip install -e` in both environments). And presumably the
main motivation behind the original decision to ignore `.pyc` files
(switching branches leaving stale files) does not apply nearly as much to
third-party apps you are using as code you are developing. But like
Carlton said, programming is weird and wonderful, so nothing would
surprise me.
I think the biggest "risk" in reverting
51673c146e48ff6230eace39bac18fd555607bee is for a project initially
switching to Python 3 (and Django 2.x), where the migrations directories
may already contain stale `.pyc` files. Seems like a documentation note
about clearing out `.pyc` files might be in order. If I'm not mistaken, we
have similar issues with templatetags - the templatetags loader uses
`pkgutil`:
https://github.com/django/django/blob/master/django/template/backends/django.py#L114
So I think a note about clearing out `.pyc` files is a good idea
regardless. Obviously I'm biased, but I think the fact that this has been
an issue for 3-4 years is not a good reason to wait 2 more years to rip
off the bandaid. Unless Django as a project decides it doesn't want to
officially "support" frozen/sourceless environments, which I think would
also be a shame, given how close it already is.
--
Ticket URL: <https://code.djangoproject.com/ticket/23406#comment:35>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.be34be55af421826044911a1bcf9b80c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.