Re: [Django] #27832: contenttypes migration not following the doc on hints naming

2017-02-13 Thread Django
#27832: contenttypes migration not following the doc on hints naming
-+-
 Reporter:  Hervé Cauwelier  |Owner:  Hervé
 |  Cauwelier
 Type:  Bug  |   Status:  closed
Component:   |  Version:  1.10
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Hervé Cauwelier):

 * status:  assigned => closed
 * resolution:   => invalid


Comment:

 OK I missed the point when hints contains "model_name" and it's extracted
 and passed as an argument to allow_migration().

 So yes indeed it was triggering the code path in my router when
 "model_name" is defined.

 This patch in django just prevented passing a "model_name" argument in the
 first place, but any name would do, even "foobar".

 Closing this ticket, thank you for your time.

--
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/063.39e906dca4334cd0021ac27376bb3e77%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27832: contenttypes migration not following the doc on hints naming

2017-02-13 Thread Django
#27832: contenttypes migration not following the doc on hints naming
-+-
 Reporter:  Hervé Cauwelier  |Owner:  Hervé
 |  Cauwelier
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.10
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Hervé Cauwelier):

 Oops! I've added some print()s in my code to discover it was just a
 coincidence if the router didn't choke on KeyError. With the patch, it's
 trigerring another code path or something, let me sort this out first.

--
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/063.659153eabe1d7550ac695d31c5a93458%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27832: contenttypes migration not following the doc on hints naming

2017-02-13 Thread Django
#27832: contenttypes migration not following the doc on hints naming
-+-
 Reporter:  Hervé Cauwelier  |Owner:  Hervé
 |  Cauwelier
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.10
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Hervé Cauwelier):

 I always assumed you meant Django 1.10 and later. Django 1.8 and 1.9
 happily lived with this typo. :-)

 So we could just leave both keys without a deprecation path and that
 migration will naturally disappear when migrations are squashed?

 As for the added value of this fix, it would avoid me to write a special
 case in my database router when "model_name" is "contenttype".

--
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/063.5f96b01af57f9c561696a0ff19f9100b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27832: contenttypes migration not following the doc on hints naming

2017-02-13 Thread Django
#27832: contenttypes migration not following the doc on hints naming
-+-
 Reporter:  Hervé Cauwelier  |Owner:  Hervé
 |  Cauwelier
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.10
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * severity:  Release blocker => Normal


Comment:

 Now that I see that migration was added in Django 1.8, I'm not sure if
 there's much value in fixing this. 1.8/1.9 only receive security fixes at
 this point. Does the fix have some value if it's changed in later versions
 of Django?

 Separately, we might consider a strategy for squashing contrib app
 migrations so we can eventually remove obsolete migrations like that one.

--
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/063.53a8d6686a05d797bbee969f217da449%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27832: contenttypes migration not following the doc on hints naming

2017-02-13 Thread Django
#27832: contenttypes migration not following the doc on hints naming
-+-
 Reporter:  Hervé Cauwelier  |Owner:  Hervé
 |  Cauwelier
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.10
  contrib.contenttypes   |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Hervé Cauwelier):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/8058 PR]

--
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/063.568eff24b1b6d790b6001fa8464a444c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27832: contenttypes migration not following the doc on hints naming

2017-02-13 Thread Django
#27832: contenttypes migration not following the doc on hints naming
-+-
 Reporter:  Hervé Cauwelier  |Owner:  Hervé
 |  Cauwelier
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.10
  contrib.contenttypes   |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Hervé Cauwelier):

 * owner:  nobody => Hervé Cauwelier
 * status:  new => assigned


Comment:

 I guess it's a low-hanging fruit for a newcomer like me, assigning it to
 myself.

--
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/063.9d84ac14b1ea57ccd7e5dac21f975fb6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27832: contenttypes migration not following the doc on hints naming

2017-02-13 Thread Django
#27832: contenttypes migration not following the doc on hints naming
--+
 Reporter:  Hervé Cauwelier   |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.contenttypes  |  Version:  1.10
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham):

 * component:  Migrations => contrib.contenttypes
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 For backwards compatibility at this point, I guess we should add `'model'`
 there instead of renaming `'model_name'`.

--
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/063.8ba46f5520f463d87d3819e3cf6a01a6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27832: contenttypes migration not following the doc on hints naming

2017-02-13 Thread Django
#27832: contenttypes migration not following the doc on hints naming
---+
   Reporter:  Hervé Cauwelier  |  Owner:  nobody
   Type:  Bug  | Status:  new
  Component:  Migrations   |Version:  1.10
   Severity:  Normal   |   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  0
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+
 Hi,

 The second migration for contenttypes provides a RunPython operation:
 
https://github.com/django/django/blob/master/django/contrib/contenttypes/migrations/0002_remove_content_type_name.py#L33

 As you can see on the highlighted line, the hint is named "model_name".

 But the doc suggests the key should be "model":
 https://docs.djangoproject.com/en/1.10/topics/db/multi-db/#allow_migrate

 Not a big issue but I ran into this when writing the "allow_migrate"
 method of a database router.

--
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/048.16beec9838e3a627129f7a675d124886%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.