Re: Help wanted testing proposal for the Migration Graph algorithm

2018-08-14 Thread Carlton Gibson
Thanks Jeff. Super. 

(PR is fine )

-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/47b62016-c689-41fe-a66f-d64b8b43e711%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help wanted testing proposal for the Migration Graph algorithm

2018-08-14 Thread Jeffrey Yancey
Hi Carlton, 

I think I have a reasonable candidate for this and will try to find some 
time to do the comparison this week. I'll post results on the PR, or here 
if you prefer, upon completion.

Jeff

On Thursday, July 26, 2018 at 7:45:45 AM UTC-6, Carlton Gibson wrote:
>
> Hi all.
>
> Do you have a project with a slow and complicated migration history?
>
> If so, any chance you could lend a brief hand testing?
>
> See https://github.com/django/django/pull/9804 
>
> This refactors the migration graph algorithm and in principle should make 
> it significantly faster. 
> (More or less linear vs currently exponential.)
>
> Two questions: 
>
> 1. Is it correct with very complicated histories?
> 2. Is it a lot quicker? 
>
> To answer this could you profile the following script on your complicated 
> project against the PR vs against master
> (or any recent version of Django really)?
>
> Are there any errors with the PR that you don't see otherwise? 
> What's the speedup, if any?
>
> Thanks for your help! 
>
> Kind Regards,
>
> Carlton
>
>
>
> The scipt: 
> ===
>
> All it does is calculate the full forwards and backwards migration plan 
> for 
> each app in your project. It doesn't apply anything. 
>
> Dev environment should be fine. (It's the migrations, not the applied 
> state that's in play.) 
>
> As ever, please read it before running it. You can do anything similar if 
> you want.
>
> I used IPython from `django-admin shell`: 
>
> %timeit %run ./migration_graph_timing.py 
>
> If that doesn't work for you and you want me to make it actually run as a 
> stand-alone, let me know. 
>
> 
> import sys
>
> from django.db import connection
> from django.db.migrations.loader import MigrationLoader
>
> loader = MigrationLoader(connection)
>
> backwards = loader.graph.root_nodes()
> forwards = loader.graph.leaf_nodes()
>
> print('Calculating backward plans:')
> for root in backwards:
> loader = MigrationLoader(connection)
> sys.stdout.write('.')
> #print(loader.graph.backwards_plan(root))
> sys.stdout.write('\n')
> print('Calculating forward plans:')
> for leaf in forwards:
> loader = MigrationLoader(connection)
> sys.stdout.write('.')
> # print(loader.graph.forwards_plan(leaf))
>
> sys.stdout.write('\nRun Done\n\n')
> 
>
>

-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/3849a1e5-2088-4d6d-9261-cded283c930d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: #24483 fix breaks dynamic choices

2018-08-14 Thread Carlton Gibson

It's not clear from your OP what you mean by "dynamic choices" (I can still 
provide a callable; is that not "dynamic"?) 

Your best bet it to draw up a reproducible example (or even better a test 
case) of exactly the behaviour that used to work but now doesn't. 
I'd suggest putting that in a new Trac ticket referencing #24483. 

Then we've got something concrete to go on. 

Kind Regards,

Carlton

-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/0ede9c71-5946-4f85-abc5-e1073647438e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Compilemessages and percent char in msgids

2018-08-14 Thread Marcin Nowak
BUMP

-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/06006ec4-5b30-4b74-a756-6fa420655c08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: #24483 fix breaks dynamic choices

2018-08-14 Thread Marcin Nowak


>
> Fix of #24483 breaks possibility to declare dynamic choices for model's 
> fields.
> I read the ticket and I understand the initial problem, but it was used 
> frequently to support dynamic choices.
>
> Now we have always consistent but static choices, tests are passing, 
> migrations have consistent choices list (never used, but they are there), 
> but we lost an important functionality. 
>
> It would be nice to bring back previous behaviour and fix the problem on 
> the migrations/keepdb side, not in models.
>
>
BUMP

-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/3347abe8-9474-4b0a-ab04-e952c4623808%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.