Re: [Repoze-dev] imperative configuration prevents application extension?

2010-04-29 Thread Chris McDonough
On 04/28/2010 03:07 PM, Chris Withers wrote: > Hi All, > > In the BFG book their are copious references to the fact that using > imperative configuration (or the decorators, my preferred choice) is > "bad" if you plan to write apps that might be extended by others. > > Am I right in understanding t

Re: [Repoze-dev] LMS a BFG application

2010-04-29 Thread Chris McDonough
On 04/29/2010 03:08 AM, Srikanth T wrote: > Hi Chris > > http://comments.gmane.org/gmane.comp.web.zope.repoze.devel/3082 > > In the above link, our organisation's logo is there. But, it's not > visible properly. Can a better logo of Mahiti be uploaded there? Oh. No. We have no control over that.

Re: [Repoze-dev] LMS a BFG application

2010-04-29 Thread Chris McDonough
On 04/29/2010 03:55 AM, Srikanth T wrote: > Thanks Chris, for the reply. Actually , I filled in a reply in that > particular thread of gmane, and the mail came to you and malthe . I had > no idea that, it would come to you people. I will get in touch with > gmane people. > > Can you add a line or t

Re: [Repoze-dev] LMS a BFG application

2010-04-29 Thread Srikanth T
Hi Chris Thanks a lot. On Thu, Apr 29, 2010 at 1:43 PM, Chris McDonough wrote: > On 04/29/2010 03:55 AM, Srikanth T wrote: > >> Thanks Chris, for the reply. Actually , I filled in a reply in that >> particular thread of gmane, and the mail came to you and malthe . I had >> no idea that, it woul

Re: [Repoze-dev] LMS a BFG application

2010-04-29 Thread Charlie Clark
Am 27.04.2010, 05:52 Uhr, schrieb Srikanth T : > We would like to share with you, an application we have developed using > Repoze.BFG and KARL as basis. We want to contribute this project for Open > Source Community. The application, is named as *LMS*( Leave management > System ). We wish , LMS ca

Re: [Repoze-dev] imperative configuration prevents application extension?

2010-04-29 Thread Chris Withers
Chris McDonough wrote: > No. You can always override an individual registration (obtained via > imperative configuration, a scan, or via ZCML) with a subsequent > imperative registration. Okay, but how would I override a decorator with another decorator? What happens if a scan finds two decor

Re: [Repoze-dev] "membership" for BFG and composing multiple apps

2010-04-29 Thread Charlie Clark
Am 28.04.2010, 21:10 Uhr, schrieb Chris Withers : > If I wanted to write such a similar lump of non-app-specific > functionality, how would I do so in such a way that plugging in the > views and other code would be as easy as possible? > (and also easy for the consumer to override my choice of htm

Re: [Repoze-dev] imperative configuration prevents application extension?

2010-04-29 Thread Charlie Clark
Am 29.04.2010, 13:32 Uhr, schrieb Chris Withers : > So why the big warnings in the book? They're not warnings but reasoned guidance and developer preference. External configuration à la ZCML was not invented by Zope. XML is verbose but good editor support makes things a lot easier. >> A poor

[Repoze-dev] SAML2 in repoze.who

2010-04-29 Thread Roland Hedberg
Hi! I just released PySAML2 on Pypi. It's a SAML2.0 implementation intended for use within a WSGI frameworks. When I developed it I used repoze.who as the WSGI framework. Any comments are appreciated. --Roland ___ Repoze-dev mailing list Repoze-dev@li

Re: [Repoze-dev] imperative configuration prevents application extension?

2010-04-29 Thread Chris Withers
Charlie Clark wrote: >> Decorators are a little harder 'cos you can't safely rely on the "last >> one wins" philosophy so you end up needing some kind of ordering, or >> raising an exception if "something" is defined more than once, which >> precludes one package customising stuff from another if t

Re: [Repoze-dev] [sqlalchemy] Re: session lifecycle and wsgi

2010-04-29 Thread Chris Withers
Laurence Rowe wrote: > On Apr 28, 4:38 pm, Chris Withers wrote: >> Laurence Rowe wrote: >>> Chris, >>> This is what the combination of repoze.tm2/transaction and >>> zope.sqlalchemy does for you. You don't have to do anything special >>> other than that. >> It doesn't do the .remove(). >> BFG curr

[Repoze-dev] bfg_alchemy template and handle_teardown

2010-04-29 Thread Laurence Rowe
Hi, I'm trying to work out why the following code is in the bfg_alchemy template (http://repoze.org/viewcvs/repoze.bfg/trunk/repoze/bfg/paster_templates/alchemy): def handle_teardown(event): environ = event.request.environ if isActive(environ): t = transaction.get() a

Re: [Repoze-dev] bfg_alchemy template and handle_teardown

2010-04-29 Thread Thomas G. Willis
Agreed, I haven''t noticed any session wierdnessin any of my naive bfg implementations either. On Thu, Apr 29, 2010 at 10:20 AM, Laurence Rowe wrote: > Hi, > > I'm trying to work out why the following code is in the bfg_alchemy > template > (http://repoze.org/viewcvs/repoze.bfg/trunk/repoze/bf

Re: [Repoze-dev] imperative configuration prevents application extension?

2010-04-29 Thread Chris McDonough
On 04/29/2010 07:32 AM, Chris Withers wrote: > Chris McDonough wrote: >> No. You can always override an individual registration (obtained via >> imperative configuration, a scan, or via ZCML) with a subsequent >> imperative registration. > > Okay, but how would I override a decorator with another d

Re: [Repoze-dev] bfg_alchemy template and handle_teardown

2010-04-29 Thread Chris McDonough
On 04/29/2010 10:20 AM, Laurence Rowe wrote: > Hi, > > I'm trying to work out why the following code is in the bfg_alchemy > template > (http://repoze.org/viewcvs/repoze.bfg/trunk/repoze/bfg/paster_templates/alchemy): > > handler=".run.handle_teardown" > /> > > def handle_teardown(

[Repoze-dev] providing utilities

2010-04-29 Thread Chris Withers
Hi All, What's the "correct" way to provide utilities in BFG imperatively? My guess would be: from repoze.bfg.configuration import Configurator from somewhere import ISomething from zope.component import provideUtility def factory(): return ...yada... def app(global_config, **settings):

Re: [Repoze-dev] bfg_alchemy template and handle_teardown

2010-04-29 Thread Chris Withers
Chris McDonough wrote: >> As far as I know this is unnecessary. It's not in the repoze.cluegun >> app, nor in the app I worked on at Jarn. Are there any problems when >> you remove it? > > No idea. Withers, can you confirm? With the current setup, we end up doing both a .remove() in the subscri

[Repoze-dev] threadpooling things

2010-04-29 Thread Chris Withers
Not strictly speaking a repoze question, but the people who live here have likely bumped into this, and I value your wise opinions :-) So, SQLAlchemy takes care of having one session per thread and a connection pool for you, however what about resources where that's not the case. For me, it's

Re: [Repoze-dev] providing utilities

2010-04-29 Thread Chris McDonough
On 04/29/2010 10:37 AM, Chris Withers wrote: > Hi All, > > What's the "correct" way to provide utilities in BFG imperatively? > > My guess would be: > > from repoze.bfg.configuration import Configurator > from somewhere import ISomething > from zope.component import provideUtility > > def factory()

Re: [Repoze-dev] bfg_alchemy template and handle_teardown

2010-04-29 Thread Chris McDonough
On 04/29/2010 10:39 AM, Chris Withers wrote: > Chris McDonough wrote: >>> As far as I know this is unnecessary. It's not in the repoze.cluegun >>> app, nor in the app I worked on at Jarn. Are there any problems when >>> you remove it? >> >> No idea. Withers, can you confirm? > > With the current se

Re: [Repoze-dev] threadpooling things

2010-04-29 Thread Chris Rossi
This currently lives in a specific project but I have considered pulling it out and making it more general: http://bfg.repoze.org/pastebin/715 The main thing you would need to do to make it a general purpose ResourcePool would be to pass a resource_factory callable into the constructor and, optio

Re: [Repoze-dev] providing utilities

2010-04-29 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Withers wrote: > Hi All, > > What's the "correct" way to provide utilities in BFG imperatively? > > My guess would be: > > from repoze.bfg.configuration import Configurator > from somewhere import ISomething > from zope.component import provid

Re: [Repoze-dev] threadpooling things

2010-04-29 Thread Chris Withers
Chris Rossi wrote: > This currently lives in a specific project but I have considered > pulling it out and making it more general: > > http://bfg.repoze.org/pastebin/715 Any reason you don't just use SQLAlchemy? Chris ___ Repoze-dev mailing list Repoz

Re: [Repoze-dev] bfg_alchemy template and handle_teardown

2010-04-29 Thread Laurence Rowe
2010/4/29 Chris McDonough : > On 04/29/2010 10:39 AM, Chris Withers wrote: >> >> Chris McDonough wrote: As far as I know this is unnecessary. It's not in the repoze.cluegun app, nor in the app I worked on at Jarn. Are there any problems when you remove it? >>> >>> No idea. Withe

Re: [Repoze-dev] bfg_alchemy template and handle_teardown

2010-04-29 Thread Chris McDonough
On 04/29/2010 11:21 AM, Laurence Rowe wrote: > 2010/4/29 Chris McDonough: >> On 04/29/2010 10:39 AM, Chris Withers wrote: >>> >>> Chris McDonough wrote: > > As far as I know this is unnecessary. It's not in the repoze.cluegun > app, nor in the app I worked on at Jarn. Are there any prob

Re: [Repoze-dev] providing utilities

2010-04-29 Thread Chris Withers
Chris McDonough wrote: > You could do: > > def app(global_config, **settings): > config = Configurator(settings=settings) > config.begin() > config.registry.provideUtility(factory(), ISomething) > config.scan() > config.end() > return config.make_wsgi_app() > >> ...or do I

Re: [Repoze-dev] providing utilities

2010-04-29 Thread Chris McDonough
On 04/29/2010 11:41 AM, Chris Withers wrote: > Chris McDonough wrote: >> You could do: >> >> def app(global_config, **settings): >> config = Configurator(settings=settings) >> config.begin() >> config.registry.provideUtility(factory(), ISomething) >> config.scan() >> config.end() >> return config.m

Re: [Repoze-dev] form generation package recommended for use with BFG?

2010-04-29 Thread Darryl Cousins
Hi, I happily use FormEncode with BFG. http://formencode.org/Design.html Best, Darryl On Thu, Apr 29, 2010 at 10:23 AM, Rob Miller wrote: > Chris Withers wrote: >> Hi All, >> >> Is there anything akin to Django's form generation and handling stuff >> that's recommended for use with BFG? > > re

Re: [Repoze-dev] SAML2 in repoze.who

2010-04-29 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roland Hedberg wrote: > I just released PySAML2 on Pypi. > It's a SAML2.0 implementation intended for use within a WSGI frameworks. > When I developed it I used repoze.who as the WSGI framework. > > Any comments are appreciated. This looks really co

Re: [Repoze-dev] SAML2 in repoze.who

2010-04-29 Thread Roland Hedberg
On Apr 30, 2010, at 5:31, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Roland Hedberg wrote: > >> I just released PySAML2 on Pypi. >> It's a SAML2.0 implementation intended for use within a WSGI frameworks. >> When I developed it I used repoze.who as the WSGI framewo