On Wed, May 26, 2010 at 8:06 AM, Wyatt Baldwin
<[email protected]> wrote:
> Not every Pylons-based app needs WebHelpers. For example, I have a web
> services package that renders only JSON, so there are no templates, no
> public files, no helpers, etc. I'm not sure whether Pylons uses
> WebHelpers internally (sorry, can't grep from here). If not, I'd say
> that the dependency should be *removed* from Pylons itself (i.e., from
> its setup.py) and let application developers decide whether they need
> it (though it could still be part of the default template when using
> `paster create`).
>
> The same thing is true of, for example, Routes. Pylons doesn't
> strictly depend on Routes (as far as I know); it depends on certain
> values being present in the environ. If I decide to swap Routes for
> something else, I don't want to be forced to download and install
> Routes. This could be handled with the `paster create` template, too--
> the default dependencies would be injected into the new project's
> setup.py (right now, the template only has the Pylons dependency in
> its setup.py).
>
> So, a proposal for Pylons 1.1 or later: remove all deps from Pylons'
> setup.py that are not used directly by Pylons. Add those deps instead
> to projects created by `paster create`. I haven't completely thought
> this through, so I don't no what all the ramifications might be.
> Thoughts?

I tend to agree with this. It's too late to make such a far-reaching
change in Pylons 1.0, but it's doable in 1.1. There are some
inconveniences, however.

What we're seeing is a conflict between out-of-the-box simplicity for
newbies, vs flexibility for advanced uses and compatibility for old
applications.

Moving the dependencies to the application is more correct and more
flexible, but it also means that "pip install Pylons" won't install a
full stack. The only way around this is to have a separate
"Pylons-minimal" and "Pylons-full" distribution. Perhaps the
componentization with Marco will make this more desirable anyway.

As for Pylons' dependencies (this is off the top of my head and may
not be 100% accurate):

- Beaker: optional (activated in middleware.py)
- decorator: optional, required for ``pylons.decorator`` utilities
- FormEncode: optional
- Nose: optional, required for tests
- Paste: required
- PasteDeploy: required, Pylons uses some utilities internally (asbool)
- PasteScript: required, for "paster create" etc.
- Routes: required. (Strictly speaking, RoutesMiddleware or a
compatible alternative is required)
- simplejson: optional, required for ``pylons.decorator`` utilities.
(Included in Python 2.6.)
- Tempita: required by Paste
- WebError: required?  (May be deactivated in middleware.py?)
- WebHelpers: optional
- WebOb: required
- WebTest: required?  Required for tests.

-- 
Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to