On 16.08.2012, at 23:26, Adrian Holovaty <adr...@holovaty.com> wrote:

> I'd like to move all Django localflavor code into a separate package,
> distributed separately from Django the framework.

+1

> PROPOSED SOLUTION
> 
> I think it makes most sense for there to be country-specific packages,
> such as django-forms-us or django-forms-es, that are distributed
> independently. These would be very easy to install (via pip), and
> people outside of the Django core team could maintain them and take
> full responsibility for them.
> 
> Considering backwards-compatibility, we could jumpstart these
> country-specific packages by (1) creating them in the first place and
> (2) replacing the django.contrib.localflavor code with code that
> imports from the correct third-party library (e.g., djangoforms_us),
> as a shim. For Django 1.5, we'd tell people to install the appropriate
> django-forms-* packages for their sites, and their code referencing
> django.contrib.localflavor would still work (with a
> DeprecationWarning).

Given the number of packages in the localflavor app I'd rather strongly
recommend making a clear cut here, removing the apps from django/contrib/,
*not* providing a shim around the packages and advise users of the apps
to import it from the new packages instead. Breaking code backwards
compatibility is of course an issue, but the alternative to forever to have
to maintain every localflavor namespace doesn't sound better at all.

Python namespace packages are a mess, implementation wise (e.g. with setuptools
having its own implementation) and usage wise. We'd have to start down that
road for all other packages in contrib, which I'm certain the localflavor
isn't the right reason for. Python's own pkgutil.extend_path isn't useful
enough in every day

Instead let's provide a good working packaging template for
localflavor app maintainers (I volunteer to provide it if nobody else does)
that uses the names:

- a fake namespace django_localflavor_<countrycode> as the package (the 
directory)
- django-localflavor-<countrycode> as the distribution name (in setup.py)

Jannis

-- 
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.

Reply via email to