Re: Import problem starting with r12977

2010-04-19 Thread Erik Stein

thanks for pointing this out.

I attached a symptomatic patch to ticket #13366.

best
-- erik


Am 17.04.2010 um 14:33 schrieb Ramiro Morales:

> On Sat, Apr 17, 2010 at 4:38 AM, Erik Stein  wrote:
>> I'd would definetly consider this a bug in django, but I've no idea how to 
>> design a regression test for this, sorry. I'll try to understand what these 
>> app loading changes do.
> 
> I think this has already been reported in ticket 13366, Comment is a
> model that inherits from an abstract base class that has fields
> (BaseCommentAbstractModel).

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: Import problem starting with r12977

2010-04-17 Thread Ramiro Morales
On Sat, Apr 17, 2010 at 4:38 AM, Erik Stein  wrote:
>
> I'm was digging around more, too, and finally i've set up a small test 
> environment with django (r12955), just an project with a single app:

You meant r12995 here,  right?

>
> django-admin.py startproject mytest
> cd mytest
> django-admin.py startapp blog
>
>
> INSTALLED_APPS = (
>    'django.contrib.auth',
>    'django.contrib.comments', # <-- Added comments app
>    'django.contrib.contenttypes',
>    'django.contrib.sessions',
>    'django.contrib.sites',
>    'django.contrib.messages',
>    'blog',
> )
>
> blog/models.py:
>
>        from django.db import models
>        from django.contrib.comments.models import Comment
>
>
> c-y:mytest erik$ ./manage.py validate
> Error: cannot import name Comment
>
> I'd would definetly consider this a bug in django, but I've no idea how to 
> design a regression test for this, sorry. I'll try to understand what these 
> app loading changes do.

I think this has already been reported in ticket 13366, Comment is a
model that inherits from an abstract base class that has fields
(BaseCommentAbstractModel).

-- 
Ramiro Morales  |  http://rmorales.net

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: Import problem starting with r12977

2010-04-17 Thread Erik Stein

I'm was digging around more, too, and finally i've set up a small test 
environment with django (r12955), just an project with a single app:

django-admin.py startproject mytest
cd mytest
django-admin.py startapp blog


INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.comments', # <-- Added comments app
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'blog',
)

blog/models.py:

from django.db import models
from django.contrib.comments.models import Comment


c-y:mytest erik$ ./manage.py validate
Error: cannot import name Comment

I'd would definetly consider this a bug in django, but I've no idea how to 
design a regression test for this, sorry. I'll try to understand what these app 
loading changes do.

greetings
-- erik

Am 17.04.2010 um 02:09 schrieb Derek Hoy:

> On Sat, Apr 17, 2010 at 12:36 AM, Derek Hoy  wrote:
>> 
>> I'll dig around a bit more.
> 
> The problems seemed to come from the same models.py that was shared
> across the projects. I moved a couple of imports and it seems fine
> with trunk (r12996).
> 
> So it looks like it's the change in the error handling that is showing
> up problems in the code.
> 
> And that means we should be in django-users :)
> 
> Derek

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: Import problem starting with r12977

2010-04-16 Thread Derek Hoy
On Sat, Apr 17, 2010 at 12:36 AM, Derek Hoy  wrote:
>
> I'll dig around a bit more.

The problems seemed to come from the same models.py that was shared
across the projects. I moved a couple of imports and it seems fine
with trunk (r12996).

So it looks like it's the change in the error handling that is showing
up problems in the code.

And that means we should be in django-users :)

Derek

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: Import problem starting with r12977

2010-04-16 Thread Derek Hoy
Strange, I had the same problem and rolling back to 12976 fixed it.
But another project still failed. It worked when I rolled back to
r12949.

http://code.djangoproject.com/changeset/12950 is the first of a few
that deal with app loading. It may be our projects had import errors
that weren't being reported I suppose.

I'll dig around a bit more.

Derek

On Fri, Apr 16, 2010 at 5:55 PM, Erik Stein  wrote:
>
> Hello --
>
> I hope that's the correct place to ask, else point me to django-users.
>
> Starting with changeset
>
>        http://code.djangoproject.com/changeset/12977 (Fixed #13328 -- Added a 
> getstate/setstate pair to fields so that callable default values aren't 
> pickled. Thanks to bkonkle for the report, and Vitaly Babiy for the patch.)
>
> I get import errors which are very difficult to debug (at least for me). I'm 
> hangling from file to file. It seems to boil down to
>
>        self.model = cls
>
> in fields/__init__.py.
>
> It may be related to some non-obvious circular import on my side, but what 
> exactly am I supposed to do concerning r12977? File a new bug or just try to 
> fix my code?
>
> best
> -- erik
>
>
>
> Erik Stein
> Programmierung, Grafik
>       Oranienstr. 32   10999 Berlin, Germany
>       fon +49 30 69201880   fax +49 30 692018809
>       email e...@classlibrary.net
>
>
>
>
>
> Erik Stein
> Programmierung, Grafik
>        Oranienstr. 32   10999 Berlin, Germany
>        fon +49 30 69201880   fax +49 30 692018809
>        email e...@classlibrary.net
>
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django developers" group.
> To post to this group, send email to django-develop...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-developers+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-developers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Import problem starting with r12977

2010-04-16 Thread Erik Stein

Hello --

I hope that's the correct place to ask, else point me to django-users.

Starting with changeset

http://code.djangoproject.com/changeset/12977 (Fixed #13328 -- Added a 
getstate/setstate pair to fields so that callable default values aren't 
pickled. Thanks to bkonkle for the report, and Vitaly Babiy for the patch.)

I get import errors which are very difficult to debug (at least for me). I'm 
hangling from file to file. It seems to boil down to

self.model = cls

in fields/__init__.py.

It may be related to some non-obvious circular import on my side, but what 
exactly am I supposed to do concerning r12977? File a new bug or just try to 
fix my code?

best
-- erik



Erik Stein
Programmierung, Grafik
   Oranienstr. 32   10999 Berlin, Germany
   fon +49 30 69201880   fax +49 30 692018809
   email e...@classlibrary.net





Erik Stein
Programmierung, Grafik
Oranienstr. 32   10999 Berlin, Germany
fon +49 30 69201880   fax +49 30 692018809
email e...@classlibrary.net



-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.