Hi,

i have created a module for django that basically gives me shadow db with 
all deleted data and hides all that from django by the use of a custom (not 
deleted) data manager.
So far so good - this works really well, but lately i finally wrote some 
tests for this project and discovered a weird bug where the custom manager 
will not be present on the model.

This is the workaround ( custom manager definition 
<https://github.com/kakulukia/django-undeletable/blob/e9921c2dd6d6e71e5262fc22f7965f0eb5ae669a/django_undeletable/models.py#L92>
 
) but if i rewrite this to the old version of data = objects = 
DataManager() it will most certainly fail under python2 and (thats the 
weirdes part) fail sometimes under python 3. Have a look at the build 
history at https://travis-ci.org/kakulukia/django-undeletable/builds (#17 - 
#40). I tried a lot of stuff until i found the solution to actually make 
the tests work.

But now id like to know what was happening? Why was that failing SOMETIMES? 
Like totally random on python3?
Does somebody have an explaination for the weird behaviour?

Im using that django-undeletable module in my projects for tha last 4 years 
now and the above problem never occured in a real code base - just those 
noew tests. I really like to understand that weird manager magic that faild 
to add the defined manager to the test model.

Wile debugging i saw that the objects DataManager was there, but not the 
deafult one name data.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2db875e6-5ea2-4ef7-876d-2e4e63db6e93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to