Re: [Django] #22277: migrations: a migration that depends on itself causing

2014-04-28 Thread Django
#22277: migrations: a migration that depends on itself causing
-+-
 Reporter:  Marcin Szamotulski   |Owner:  nobody
  |   Status:  closed
 Type:  Bug  |  Version:  master
Component:  Migrations   |   Resolution:  duplicate
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by timo):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Closing as duplicate per previous comment.

-- 
Ticket URL: 
Django 
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/096.67583250c220535ab9702e3b278d11fb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22277: migrations: a migration that depends on itself causing

2014-03-24 Thread Django
#22277: migrations: a migration that depends on itself causing
-+-
 Reporter:  Marcin Szamotulski   |Owner:  nobody
  |   Status:  new
 Type:  Bug  |  Version:  master
Component:  Migrations   |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by nliberg):

 I submitted a patch for #22325. It looks like both tickets describe the
 same problem.

-- 
Ticket URL: 
Django 
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/096.4e8f717e48b25e6205111f37b785510d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22277: migrations: a migration that depends on itself causing

2014-03-20 Thread Django
#22277: migrations: a migration that depends on itself causing
-+-
 Reporter:  Marcin Szamotulski   |Owner:  nobody
  |   Status:  new
 Type:  Bug  |  Version:  master
Component:  Migrations   |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by aaugustin):

 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
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/096.9af6d9958eb34c1eed2781d0256711df%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22277: migrations: a migration that depends on itself causing

2014-03-16 Thread Django
#22277: migrations: a migration that depends on itself causing
-+-
 Reporter:  Marcin Szamotulski   |Owner:  nobody
  |   Status:  new
 Type:  Bug  |  Version:  master
Component:  Migrations   |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Marcin Szamotulski ):

 That looks much better. Thanks for the tip.

-- 
Ticket URL: 
Django 
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/096.25a7fbaa852769377d5dcc6e34515218%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22277: migrations: a migration that depends on itself causing

2014-03-16 Thread Django
#22277: migrations: a migration that depends on itself causing
-+-
 Reporter:  Marcin Szamotulski   |Owner:  nobody
  |   Status:  new
 Type:  Bug  |  Version:  master
Component:  Migrations   |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timo):

 * needs_better_patch:   => 0
 * component:  Uncategorized => Migrations
 * needs_tests:   => 0
 * needs_docs:   => 0
 * type:  Uncategorized => Bug


Old description:

> I have this list of migrations (migrations.loader line 196):
> for i in normal.items(): print(i)
> (('taggit', '0001_initial'), )
> (('accounts', '0003_image'), )
> (('social_feel', '0008_post_editors'),  social_feel.0008_post_editors>)
> (('social_feel', '0009_post_authors'),  social_feel.0009_post_authors>)
> (('social_feel', '0006_postimagecomment'),  social_feel.0006_postimagecomment>)
> (('accounts', '0001_initial'), )
> (('social_feel', '0010_postrevision_modified_by'),  social_feel.0010_postrevision_modified_by>)
> (('social_feel', '0005_postimage'),  social_feel.0005_postimage>)
> (('social_feel', '0003_postcomment'),  social_feel.0003_postcomment>)
> (('social_feel', '0002_postauthor'),  social_feel.0002_postauthor>)
> (('accounts', '0002_account'), )
> (('social_feel', '0007_postrevision'),  social_feel.0007_postrevision>)
> (('social_feel', '0001_initial'), )
> (('social_feel', '0004_posteditor'),  social_feel.0004_posteditor>)
>
> When the loops (django.db.migrations.loader 196):
> for key, migration in normal.items():
> for parent in migration.dependencies:
> are building dependencies for key = ('accounts', '0003_image')
> there are no dependencies yet in self.graph, and the parent of this key
> is set to ('accounts', '__first__').
> Then this parent is resolved by the line 230:
> parent = list(self.graph.root_nodes(parent[0]))[0]
>
> In pdb I can see that
> self.graph.root_nodes(parent[0]) returns:
> set([('accounts', '0003_image'), ('accounts', '0001_initial'),
> ('accounts', '0002_account')])
> also self.graph.dependencies returns:
> {}
>
> And then the parent (by the line 230) is set to ('accounts',
> '0003_image'), i.e. it is equal to key.
> At the end of this loop iteration this line is executed:
> self.graph.add_dependency(key, parent)
> which adds ('accounts', '0003_image') as a dependency of itself.
> Later on I can see this error:
> Traceback (most recent call last):
>   File "./manage.py", line 7, in 
> execute_from_command_line(sys.argv)
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/core/management/__init__.py",
> line 427, in execute_from_command_line
> utility.execute()
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/core/management/__init__.py",
> line 419, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/core/management/base.py",
> line 288, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/core/management/base.py",
> line 337, in execute
> output = self.handle(*args, **options)
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/core/management/commands/makemigrations.py",
> line 80, in handle
> loader.graph.project_state(),
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/db/migrations/graph.py",
> line 138, in project_state
> for migration in self.forwards_plan(node):
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/db/migrations/graph.py",
> line 53, in forwards_plan
> return self.dfs(node, lambda x: self.dependencies.get(x, set()))
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/db/migrations/graph.py",
> line 119, in dfs
> return _dfs(start, get_children, [])
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/db/migrations/graph.py",
> line 111, in _dfs
> results = _dfs(n, get_children, path) + results
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/db/migrations/graph.py",
> line 111, in _dfs
> results = _dfs(n, get_children, path) + results
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/db/migrations/graph.py",
> line 111, in _dfs
> results = _dfs(n, get_children, path) + results
>   File
> "/home/coot/webapps/social_feel/venv/src/django/django/db/migrations/graph.py",
> line 111, in _dfs
> results =