On Wed, 2007-08-15 at 21:04 -0600, Norman Harman wrote: > ticket 3310 http://code.djangoproject.com/ticket/3310 > manage.py test does not work if there is not a model.py in the application > > The 6mo patch doesn't apply anymore. Is there a reason it was never applied? > Apps > without models seem valid to me. I have a couple django apps that don't use > db at all, > and my current django project has a 'main' app with views for about, help and > other non-db > backed pages. > > On quick examination of patch2 it did seem to arbitrarily change some names > and I don't > think I'd keep the clutter of old logic for returning just apps with models > around. It > also lacked tests, are there tests for the test runner framework? Seems like > a risk of > infinite recursion.
One obvious test would have been to create a test directory that didn't contain a models file but did contain a tests.py file. > > I'd like this to be fixed. I'd like to update the patch incorporating any > concerns the > list might have. I wouldn't like there to be someone else posting a similar > email as this > one in 6mo wondering why my patch was never applied. I think one reason the patch hasn't been applied is that it's in a slightly tricky area of the code and it's not an urgent necessity. Typing "touch models.py" to generate an empty models file is the current workaround. It's not really a showstopper. I just had a quick read of the patch (I think I may have read it before and had similar feelings to what follows) and it doesn't strike me as the best we can do. For a start, introducing yet another module-level variable into loading.py looks like something to avoid. It's also quite possible that file will eventually look quite different to what it does now, internally. This is because of #1796 (which has been around much longer than #3310). Fixing #1796 might require a large-scale reworking of the internals of loading.py, so anything that tweaks that file at the moment, at least when I look it, is likely to be put on hold if it doesn't fix a high-impact bug. Right now, the patch makes me feel a bit uncomfortable. Maybe there's another way to write it that is less intrusive. In any case, I'm personally likely to leave it until after I know how #1796 will pan out so as not to have to worry about retaining compatibility with yet another feature in loading.py if I need to rewrite the internals. Once we add something, removing it is very, very difficult. So we are naturally cautious about adding it. I realise this might be frustrating, but put the impact in perspective a bit. There are might higher priority issues in Trac at the moment than this one and whilst lower-priority items get fixed all the time, they don't typically touch fragile parts of the internals quite as much (whether we like it or not, loading.py is unintentionally fragile). Regards, Malcolm -- If it walks out of your refrigerator, LET IT GO!! http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---