I am a little confused, Colin. I am running django 1.7.4, but seem to have 
come across an issue whereby lingering *.pyc files broke the "python 
manage.py migrate" command. But the ticket suggests that bytecode is in 
fact currently ignored. Do you know what's up here? Don't want to clutter 
up the ticket with yet another comment necessarily.

On Wednesday, February 11, 2015 at 1:06:05 PM UTC-8, Collin Anderson wrote:
>
> Hah. Check out this ticket :) https://code.djangoproject.com/ticket/23406
>
> On Wed, Feb 11, 2015 at 4:04 PM, abhillman <[email protected] 
> <javascript:>> wrote:
>
>> I have gotten bitten by lingering bytecode in migrations on several 
>> occasions. Steps to reproduce are a little bit complex, but here is an 
>> rough example:
>>
>> Local Box:
>> — have *.pyc rule in .gitignore
>> — create some migrations
>> — commit them
>>
>> Server Box:
>> — pull repository
>> — execute migrations
>>
>> Local Box:
>> — remove migrations
>> — commit
>> — create new initial migration
>>
>> Server Box:
>> — pull repository
>> — remove migrations history from db
>> — run fake initial migration — get an error here
>>
>> At this point, the server box has a migrations directory that looks 
>> something like this (bytecode is still around because it was in the 
>> gitignore):
>> — migrations 
>>     — __init__.py
>>     — 0001_initial.py
>>     — 0001_initial.pyc
>>     — 0002_second.pyc
>>     — 0003_third.pyc
>>
>> When running "python manage migrate" the bytecode appears to be 
>> referenced, which often causes errors when running the migrations. When 
>> using git, for example "git clean -df" clears out the problem. What I am 
>> wondering is if it might make sense to make a deliberate attempt to ignore 
>> bytecode without accompanying *.py files. This appears to be an issue 
>> because of the way that migrations dynamically import python code, but I am 
>> not sure. Perhaps the problem is more subtle as I am not deeply familiar 
>> with the way that migrations work.
>>
>> aryeh
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/1dbf1434-b24a-47c9-b45b-ae04530d7867%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-developers/1dbf1434-b24a-47c9-b45b-ae04530d7867%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/fbe29111-2f57-4d1a-a7e3-8837956d0aff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to