Re: Problem migrating from South to Django migrations for Linux distributions
Hi Brian, On Fri, 25 Jul 2014, Brian May wrote: I can't help but think this might be unrealistic (?). Changes required for new versions of Django often break compatibility with old versions, and 1.4.5 is really old now. Just because many packages don't have versioned dependencies on Django (or a versioned dependency on a really old version) doesn't necessarily mean they will work with any 1.4.5. Anyone want to test every Django package in Debian sid against the Django in wheezy? I agree with you that this is not realistic. A better alternate solution is to document the process of how to execute the South migrations with Django 1.6 in a virtualenv after having done the upgrade to Debian 8. Cheers, -- Raphaël Hertzog ◈ Debian Developer Discover the Debian Administrator's Handbook: → http://debian-handbook.info/get/ -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140725074344.ga15...@x230-buxy.home.ouaza.com
Re: Problem migrating from South to Django migrations for Linux distributions
Hi Andrew, thanks for your quick answer. On Thu, 24 Jul 2014, Andrew Godwin wrote: There is no way around this; it's unfortunate that the packaging situation means that Django will get auto-upgraded as part of a distribution upgrade; I'm surprised that Debian hasn't had this with packages before? (Version upgrades that break installed but non-packaged things) We probably had this kind of things before and the best we can do for non-packaged things is usally to document this in the release notes. But for packaged things, we try usually hard to get things to just work without any human intervention. Hence my question. Neither of your suggested ways to go forward will work; the two history models are very different, so the tagging of positions isn't going to work, and Django 1.7 has changed substantially enough internally that porting South 1.x up to it would be a very large amount of work. OK. Also, what are the applications in particular that this will be a problem for? I'm curious to know what Django + South things Debian is shipping these days. Applications that depend on South and have different upstream versions in Debian 7 and Debian 8 are: http://tracker.debian.org/pkg/python-django-voting http://tracker.debian.org/pkg/python-django-threadedcomments http://tracker.debian.org/pkg/python-django-reversion http://tracker.debian.org/pkg/python-django-picklefield http://tracker.debian.org/pkg/bcfg2 Given the package names, it probably means only a single end-user application. The others are Django extensions for use in non-packaged applications. And looking more closely the case of bcfg2, the package in Debian 7 does not use South, it started using South in the version in Jessie so it should be easy to deal with. For the 4 others, they should provide some NEWS.Debian entry warning users of the potential upgrade problem. (Bccing the 5 relevant bug reports to keep a record of this) Cheers, -- Raphaël Hertzog ◈ Debian Developer Discover the Debian Administrator's Handbook: → http://debian-handbook.info/get/ -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140725080457.gc15...@x230-buxy.home.ouaza.com
Re: Problem migrating from South to Django migrations for Linux distributions
Not CCing Django-Developers, my emails bounce, possibly because I am not subscribed. Feel free to repost if you feel it might help. On 25 July 2014 18:04, Raphael Hertzog hert...@debian.org wrote: Applications that depend on South and have different upstream versions in Debian 7 and Debian 8 are: http://tracker.debian.org/pkg/python-django-voting http://tracker.debian.org/pkg/python-django-threadedcomments http://tracker.debian.org/pkg/python-django-reversion http://tracker.debian.org/pkg/python-django-picklefield http://tracker.debian.org/pkg/bcfg2 There are several libraries that we might need to watch out for with Django migrations: In sid, if I do apt-file search '/migrations/' and rule out anything that doesn't look like Django migrations, I get: bcfg2-server lava-server python-django-celery python-django-extensions python-django-guardian python-django-longerusername python-django-oauth-plus python-django-reversion python-django-sitetree python-django-social-auth python-django-taggit python-django-threadedcomments python-django-voting python-djangorestframework python-kombu python-tastypie some of these are not in wheezy, so I removed them. I also removed python-kombu, as the migrations haven't changed. bcfg2-server python-django-celery python-django-reversion python-django-social-auth python-django-threadedcomments python-django-voting python-tastypie python-kombu was a concern when I saw it (openstack uses it), but there are no new migrations from wheezy, so it looks ok to me. If I lookup reverse depends on these, I don't get anything substantial: Reverse Depends: bcfg2-web python-django-celery Reverse Depends: python-django-reversion Reverse Depends: python-django-social-auth Reverse Depends: python-django-threadedcomments Reverse Depends: python-django-voting Reverse Depends: python-tastypie Reverse Depends: python-django-picklefield appears to not have any migrations, so is ok. python-django-taggit appears to be the only package in Debian that comes with a south_migrations directory - it appears to be Django 1.7 compliant already; it wasn't in wheezy. -- Brian May br...@microcomaustralia.com.au
Problem migrating from South to Django migrations for Linux distributions
[ Please keep me in CC ] Hello, I'm one of the python-django Debian package maintainers and I have been working on preparing the field for Django 1.7... and we have one problem that we don't know how to handle. Consider that Debian contains Django but also Django applications using South. When our users will upgrade from Debian 7 to Debian 8 they will upgrade at the same time Django itself and the Django applications. The new versions of the Django applications are likely to have unapplied schema migrations managed by South but the system will have Django 1.7 and we have no means to let the users apply those schema changes. I see two ways to go forward: - either we find a way to apply South migrations with Django 1.7 - or we enhance Django migrations to be able to tag some point in the Django migrations as equivalent to some other point in the South migrations, that way we can recreate the supposedly-unapplied South migrations with Django 1.7 and mark those as unneeded if all South migrations were already applied How can we solve this problem? Thank you for your help! -- Raphaël Hertzog ◈ Writer/Consultant ◈ Debian Developer Discover the Debian Administrator's Handbook: → http://debian-handbook.info/get/ -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140724202733.ga8...@x230-buxy.home.ouaza.com
Re: Problem migrating from South to Django migrations for Linux distributions
Normally, in development with south. If the migrations get to the point were they're out of sync. The lead Dev removed the conflicting migrations and runs the schema migration command. As for the django 1.7 flow of migrations, I cannot comment on it, but I would go into this problem with the assumption: I should be able to create an initial migration and go from there. One complication I see with this, is that only the django runtime knows about south which makes it near impossible to detect this in your packaging. My question now would be, can django migrations and south migrations co-exist and can I turn off django migrations? Cheers, -Joseph Curtin On Jul 24, 2014 1:27 PM, Raphael Hertzog raph...@ouaza.com wrote: [ Please keep me in CC ] Hello, I'm one of the python-django Debian package maintainers and I have been working on preparing the field for Django 1.7... and we have one problem that we don't know how to handle. Consider that Debian contains Django but also Django applications using South. When our users will upgrade from Debian 7 to Debian 8 they will upgrade at the same time Django itself and the Django applications. The new versions of the Django applications are likely to have unapplied schema migrations managed by South but the system will have Django 1.7 and we have no means to let the users apply those schema changes. I see two ways to go forward: - either we find a way to apply South migrations with Django 1.7 - or we enhance Django migrations to be able to tag some point in the Django migrations as equivalent to some other point in the South migrations, that way we can recreate the supposedly-unapplied South migrations with Django 1.7 and mark those as unneeded if all South migrations were already applied How can we solve this problem? Thank you for your help! -- Raphaël Hertzog ◈ Writer/Consultant ◈ Debian Developer Discover the Debian Administrator's Handbook: → http://debian-handbook.info/get/ -- You received this message because you are subscribed to the Google Groups Django developers group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-develop...@googlegroups.com. 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/20140724202733.GA8255%40x230-buxy.home.ouaza.com . For more options, visit https://groups.google.com/d/optout.
Re: Problem migrating from South to Django migrations for Linux distributions
On Thu, Jul 24, 2014 at 4:44 PM, Joseph Curtin 4...@jbcurtin.io wrote: My question now would be, can django migrations and south migrations co-exist and can I turn off django migrations? No, migrations is a required feature of Django and cannot be turned off. The best you could do is generate the SQL from the migrations and manually apply to the database. Regards, Michael Manfre
Re: Problem migrating from South to Django migrations for Linux distributions
So, South migrations will not work with Django 1.7. Period. There is no way around this; it's unfortunate that the packaging situation means that Django will get auto-upgraded as part of a distribution upgrade; I'm surprised that Debian hasn't had this with packages before? (Version upgrades that break installed but non-packaged things) Neither of your suggested ways to go forward will work; the two history models are very different, so the tagging of positions isn't going to work, and Django 1.7 has changed substantially enough internally that porting South 1.x up to it would be a very large amount of work. How has Debian dealt with breaking changes like this in the past? Things like Rails upgrades come to mind. This change isn't as bad - nothing will actually _break_ when you upgrade, and apps will still run, but migrate will instead fall back to non-migration mode (which won't destroy any tables, but will fail to apply any table alterations). Also, what are the applications in particular that this will be a problem for? I'm curious to know what Django + South things Debian is shipping these days. Andrew On Thu, Jul 24, 2014 at 1:27 PM, Raphael Hertzog raph...@ouaza.com wrote: [ Please keep me in CC ] Hello, I'm one of the python-django Debian package maintainers and I have been working on preparing the field for Django 1.7... and we have one problem that we don't know how to handle. Consider that Debian contains Django but also Django applications using South. When our users will upgrade from Debian 7 to Debian 8 they will upgrade at the same time Django itself and the Django applications. The new versions of the Django applications are likely to have unapplied schema migrations managed by South but the system will have Django 1.7 and we have no means to let the users apply those schema changes. I see two ways to go forward: - either we find a way to apply South migrations with Django 1.7 - or we enhance Django migrations to be able to tag some point in the Django migrations as equivalent to some other point in the South migrations, that way we can recreate the supposedly-unapplied South migrations with Django 1.7 and mark those as unneeded if all South migrations were already applied How can we solve this problem? Thank you for your help! -- Raphaël Hertzog ◈ Writer/Consultant ◈ Debian Developer Discover the Debian Administrator's Handbook: → http://debian-handbook.info/get/
Re: Problem migrating from South to Django migrations for Linux distributions
On 25 July 2014 06:27, Raphael Hertzog raph...@ouaza.com wrote: How can we solve this problem? This isn't really a good solution, but the best I can think of right now. The system administrator for every site does the following: 1. Manually pins python-django to less then 1.7 - can somebody please check? Package: python-django Pin: version 1.7.* Pin-Priority: 50 (is priority 50 appropriate? causes a version to be installed only if there is no installed version of the package) 2. apt-get dist-upgrade. System administrator makes sure that python-django-south is upgraded to 1.0 in the process. 3. Checks that *all* migrations for all applications have been run. 4. Remove the pinning, and upgrade. For this to work correctly, all packages with migrations must continue to work properly with Django in Wheezy, which in Django 1.4.5. As in the package doesn't need to be fully functional, it does need to be installable, and the migrations must run ok. If the package does work properly this will minimize downtime. I can't help but think this might be unrealistic (?). Changes required for new versions of Django often break compatibility with old versions, and 1.4.5 is really old now. Just because many packages don't have versioned dependencies on Django (or a versioned dependency on a really old version) doesn't necessarily mean they will work with any 1.4.5. Anyone want to test every Django package in Debian sid against the Django in wheezy? So we might need to supply Django 1.6 somewhere (doesn't need to be in the archive) as a stepping stone to manually install (before?) then apt-get dist-upgrade in order to allow the packages to install correctly and the migrations to run. Obviously this means packages need to work with Django 1.6 and 1.7, that is a lot easier then trying to support 1.4.5 and 1.7 however. Nothing here is final or official or anything, still trying to think this process through. If there are no migrations, there is no problem, the user can upgrade everything in one go. In a practical sense, I think the most likely problem will be locally installed Django apps that are not part of Debian [need some sort of evidence to back up this claim]. (as an aside, I have users of my Django app who are still running a really old version on Debian squeeze :-( ). -- Brian May br...@microcomaustralia.com.au
Re: Problem migrating from South to Django migrations for Linux distributions
On 25 July 2014 08:00, Andrew Godwin and...@aeracode.org wrote: So, South migrations will not work with Django 1.7. Period. I haven't been able to find an official statement of this, but have had some trial runs, where this looked very much like it was the case. Might be possible to hack it to work, I don't think I would trust it. -- Brian May br...@microcomaustralia.com.au