Re: #25897 - managers defined on non-abstract base classes inherited by child classes

2016-02-07 Thread Shai Berger
On Sunday 07 February 2016 19:47:48 Alex Poleha wrote: > I apply my condition to default managers indeed and I see no problem here. > Default manager is just first manager defined on class(or on it's non > concrete base). It has no additional magic. > Well, I was using wrong terminology, sorry; w

Re: #25897 - managers defined on non-abstract base classes inherited by child classes

2016-02-07 Thread Alex Poleha
I apply my condition to default managers indeed and I see no problem here. Default manager is just first manager defined on class(or on it's non concrete base). It has no additional magic. About your example. I would never have suggested such a thing. And there will be no need to redeclare 'obj

Re: #25897 - managers defined on non-abstract base classes inherited by child classes

2016-02-07 Thread Shai Berger
Reading your description again, it seems like you apply the condition to default managers as well. Default managers are not "specific to the class they are defined on", and I see no problem in their inheritance. In particular: class BaseComment(models.Model): ... some fie

Re: #25897 - managers defined on non-abstract base classes inherited by child classes

2016-02-06 Thread Alex Poleha
Thank you for the suggestion. Pull request is adjusted to give deprecation warning instead of raising AttributeError. Yes, to silence the warning manager need to be be added to any subclass explicitly. It is explained in documentation

Re: #25897 - managers defined on non-abstract base classes inherited by child classes

2016-02-03 Thread Tim Graham
Could this go through a deprecation where any use of the inherited managers to be removed will raise a warning for a couple releases? If anyone is relying on the behavior, they just need to add the managers to any subclasses, correct? On Wednesday, February 3, 2016 at 9:16:41 AM UTC-5, Alex Pol

#25897 - managers defined on non-abstract base classes inherited by child classes

2016-02-03 Thread Alex Poleha
Hi. According to documentation managers defined on non-abstract base classes are not inherited by child classes. In fact they're inherited via python MRO. I made pull request