#15062: r14389 breaks getattr on Manager subclasses
---------------------------------------------------+------------------------
Reporter: clelland | Owner: nobody
Status: closed | Milestone: 1.3
Component: Database layer (models, ORM) | Version: SVN
Resolution: worksforme | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by lukeplant):
* status: new => closed
* needs_better_patch: => 0
* resolution: => worksforme
* needs_tests: => 0
* needs_docs: => 0
Comment:
I have followed this as exactly as I could, with a new project, and cannot
reproduce it. For reference, I put the snippet directly in a single
models.py, like this, just in case it makes a difference:
{{{
#!python
from django.db import models
from django.contrib.auth.models import User
class QuerySetManager(models.Manager):
def get_query_set(self):
return self.model.QuerySet(self.model)
class TestModel(models.Model):
user = models.ForeignKey(User)
string = models.CharField(max_length=64, null=True, blank=True)
objects = QuerySetManager()
class QuerySet(models.query.QuerySet):
pass
}}}
I tried the example code both using "./manage.py shell", and using
DJANGO_SETTINGS_MODULE and normal path stuff (I thought this might be
relevant, given the points below) and both ways worked fine.
I notice 2 very strange things in your stacktrace:
1) You have django/db/models/fields/related.py from two different places
- /Users/ian/.virtualenvs/'''testcode'''/lib/python2.6/site-packages/ and
/Users/ian/.virtualenvs/'''egather'''/lib/python2.6/site-packages/
2) The maximum recursion depth exception appears to come after a section
of stracktrace which doesn't seem to be exhibiting the mutual recursion
that is displayed earlier.
It seems like something very funny is going on. So I'm going to close
WORKSFORME - please re-open if you can provide more details that would
allow us to reproduce this.
--
Ticket URL: <http://code.djangoproject.com/ticket/15062#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.