Friday, September 19, 2014

Re: Possible bug introduced in Django 1.7 admin/docs?


On Sat, Sep 20, 2014 at 2:17 AM, Christopher Welborn <cjwelborn@live.com> wrote:
On 09/18/2014 10:50 PM, James Bennett wrote:
> Are you using any third-party libraries which were installed as eggs?
>

Sorry, but was that supposed to be a hint to say "Don't use eggs"? I can
see why it may fail looking for '__file__', but I don't understand
why that is acceptable. Surely there should be some graceful error
handling in the case that '__file__' is not available, instead of a
hard 500 internal server error.

Like if a third-party extension errors while looking for tags and
filters, the extension would be skipped instead of halting.

This is what made me think it was a bug. I don't want to file one if
it's not though, so could someone enlighten me please? I am being
sincere. Maybe I could even offer a patch for it.

Everything you say is true. Errors of this nature *can* be caught, and *could* be worked around. This sort of error *could* be considered a bug.

However, the experience of the Django core team over the last 9 years has been that eggs are just more trouble than they're worth. We've tried to accommodate them in the past in various ways  - there is, for example an egg-based template loader. 

I doubt we'd close egg-related issues as a wontfix - but they're also not getting a whole lot of attention, either. We don't pre-emptively do a whole lot of specific testing for egg-related problems. If someone reports a problem and provides a fix and test, we'll include it in our codebase; but actively looking for egg-related issues isn't high on the priority list.

This is then compounded by the fact that the use of eggs is generally decreasing. They were popular 10 years ago when easy_install was king; these days, we use pip install, and wheels are the endorsed Python way for installing packages.

So - James' comment should be interpreted as "Are you using eggs? Well, there's your first problem". If you're actually using eggs, I'd strongly encourage you to consider why, because there's almost certainly a better way to distribute your code, and that way won't involve the random bugs that eggs introduce.

Also - to clarify; existence of an .egg-info file doesn't *necessarily* mean you're using an egg - for historical reasons, the .egg-info file is used for other packaging purposes.

Yours,
Russ Magee %-)

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJxq849_zqUG07ViT%3D06pNY5cmSQgmz1NyvqTAb6PL-EiWQzwA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment