Re: Proposal: Add support for PEP 302 importers

2012-06-29 Thread Russell Keith-Magee
On Fri, Jun 29, 2012 at 7:33 PM, bhuztez  wrote:
> Django makes assumptions about the filesystem layout of python
> packages here and there, and will silently skip any app which does not
> meet Django's assumptions without raise up any warning. I had been
> bitten by this many times before I learned that Django and Django apps
> should never be packaged as zip-archived eggs.
>
> IMHO, all these problems can be solved by adding support for PEP 302
> importers. And I found that there are three different kinds of
> problems.
>
> 1. find submodules before importing the package: finding management
> commands
> 2. find submodules after importing the package: finding template tags
> and listing available database backends
> 3. find resource files after importing the package: template files,
> static files, fixtures and translation files
>
> Finding template tags in zip-archived eggs has already been solved by
> #13334. and I have been working on solve remaining problems in the
> past few months, and have all but 2 related regression tests passed,
> and code is now available on Github: 
> https://github.com/bhuztez/django/compare/master...pep-302
>
> How many tickets should I open on trac? a single ticket for all, or
> one ticket for each problem, or one ticket for each related parts of
> code which would be six or more?

The only reason to break up the tickets is if the problems are
orthogonal -- i.e., if there's a possibility we might accept ticket 1
as a good idea, but not ticket 2; or, if ticket 1 is trivial, but
ticket 2 is complex, and so it's much easier to get ticket 1 into a
release.

It sounds to me like this probably a one ticket problem -- we've
engaged in various forms of black magic around importing, and we've
Done It Wrong™. Ideally, the solution will be a generic utility for
discovering and loading features out of app modules, which we then use
in the various places it is needed.

Yours,
Russ Magee %-)

-- 
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 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Proposal: Add support for PEP 302 importers

2012-06-29 Thread bhuztez
Django makes assumptions about the filesystem layout of python
packages here and there, and will silently skip any app which does not
meet Django's assumptions without raise up any warning. I had been
bitten by this many times before I learned that Django and Django apps
should never be packaged as zip-archived eggs.

IMHO, all these problems can be solved by adding support for PEP 302
importers. And I found that there are three different kinds of
problems.

1. find submodules before importing the package: finding management
commands
2. find submodules after importing the package: finding template tags
and listing available database backends
3. find resource files after importing the package: template files,
static files, fixtures and translation files

Finding template tags in zip-archived eggs has already been solved by
#13334. and I have been working on solve remaining problems in the
past few months, and have all but 2 related regression tests passed,
and code is now available on Github: 
https://github.com/bhuztez/django/compare/master...pep-302

How many tickets should I open on trac? a single ticket for all, or
one ticket for each problem, or one ticket for each related parts of
code which would be six or more?

Any ideas?

-- 
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 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



add support for PEP 302 importers

2012-03-26 Thread bhuztez
I am working on fixing #14087. I think the biggest problem is that
django do not support PEP 302 importers. Also,  because of this,
tickets are marked as won't fix or fixed by introducing much more
implementation detail. It is not hard to find many of them, #582 #596
#8238 #8280 #12206 #13587 #16718 #17331. #13334 might be the only
exception. Add support for PEP 302 importers should fix most of them,
if not all.

-- 
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 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.