Re: [Django] #21711: Check for duplicate model names

2014-01-05 Thread Django
#21711: Check for duplicate model names
--+
 Reporter:  aaugustin |Owner:  nobody
 Type:  Bug   |   Status:  closed
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:  fixed
 Keywords:  app-loading   | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Aymeric Augustin ):

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


Comment:

 In [changeset:"f630373b929bc62bf4d66d60c532f7832e5fbe67"]:
 {{{
 #!CommitTicketReference repository=""
 revision="f630373b929bc62bf4d66d60c532f7832e5fbe67"
 Fixed #21711 -- Enforced unicity of model names.
 }}}

-- 
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/067.ecd8f5801a8d3cb1744a55db54c90bdc%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21711: Check for duplicate model names

2014-01-04 Thread Django
#21711: Check for duplicate model names
--+
 Reporter:  aaugustin |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  app-loading   | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by aaugustin):

 This will also prevent importing twice the same models through different
 paths.

-- 
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/067.fe0ffaadbb600ab54221db49a61ffe0f%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21711: Check for duplicate model names

2014-01-01 Thread Django
#21711: Check for duplicate model names
--+
 Reporter:  aaugustin |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  app-loading   | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by aaugustin):

 Yes yes yes. In fact I'd like to avoid storing these models in the app
 registry entirely.

-- 
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/067.e67f3996272f52d9ab7b1d240f9d3d2f%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21711: Check for duplicate model names

2014-01-01 Thread Django
#21711: Check for duplicate model names
--+
 Reporter:  aaugustin |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  app-loading   | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by akaariai):

 We could cache the deferred classes in deferred_class_factory.

-- 
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/067.039c4c6f621603017d7cf3454d8ac620%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21711: Check for duplicate model names

2014-01-01 Thread Django
#21711: Check for duplicate model names
--+
 Reporter:  aaugustin |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  app-loading   | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by aaugustin):

 This will likely be a problem for deferred queries.

-- 
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/067.0f49592e62211174f9a9aff649f0e576%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Django] #21711: Check for duplicate model names

2013-12-30 Thread Django
#21711: Check for duplicate model names
+-
   Reporter:  aaugustin |  Owner:  nobody
   Type:  Bug   | Status:  new
  Component:  Core (Other)  |Version:  master
   Severity:  Normal|   Keywords:  app-loading
   Triage Stage:  Accepted  |  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+-
 (Extracted from #21681.)

 `ModelBase.__new__` has an interesting behavior: it checks for a model
 class with the target name in the app registry and return it instead of
 creating a new class if found.

 {{{
 # myapp/models.py

 from django.db import models

 class MyModel(models.Model):
 pass

 first_model_class = MyModel  # save a reference

 class MyModel(models.Model):
 pass

 second_model_class = MyModel  # save a reference

 if second_model_class is first_model_class:
 raise RuntimeError("WTF")
 }}}

 It would be better to raise an error in that case than silently return the
 first model. See also #21679 which is essentially the same issue for
 applications.

-- 
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/052.b0bc4e9d9740f403f88bd600379fc2cb%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.