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

2010-05-06 Thread Chris Withers
Chris Rossi wrote:
 FWIW, I can imagine something spelled sort of like:
 
 @bfg_view(name='something', overrides='baseapp.views.someview')
 def my_view(request):

+lots

Yeah, I hadn't replied 'cos I couldn't think of how to spell what I was 
after.

This is spot on, and would, in theory, allow an app to override a 
library that overrides a framework.

cool :-)

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


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

2010-05-06 Thread Charlie Clark
Am 06.05.2010, 10:10 Uhr, schrieb Chris Withers ch...@simplistix.co.uk:

 This is spot on, and would, in theory, allow an app to override a
 library that overrides a framework.

Cue lots of Jim like wooah! comments and it's all Chris' fault in the  
code! ;-)

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Bug(s) when not using paste?

2010-05-06 Thread Chris Withers
Chris McDonough wrote:
 app = get_app('some_config_file.ini', 'myapp')
 Fair enough, but it's the .ini that the powers that be don't want here ;-)
 
 Why not?

Believe it or not, they're fairly allergic to anything other than Python 
and Genshi, even for config, which is a little distressing...

 I'm calling it from within the module called run.py in the right package 
 (as per the demo). Should I report it as a bug that the wrong package is 
 picked as the base?
 
 Sure.  If you provide a reproducible test case, I can try to look at it.

Where can I find tests in the same area already?
(ie: what file(s) would you like me to provide a patch against)

cheers,

Chris

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] [PATCH] Added the skip_authentication to repoze.what-quickstart config files

2010-05-06 Thread Néstor Salceda
On Wed, 2010-05-05 at 23:35 +0100, Gustavo Narea wrote:
 ¡Hola, Néstor!

Hola Gustavo :D

 Thank you very much for the patch! It looked good to me, so I applied it 
 after 
 writing a test to make sure skip_authentication = False also works:
 http://what.repoze.org/docs/plugins/quickstart/News.html

I was tempted to do it, but I prefer ask for feedback because the other
tests was working too :)

Nice work dudes!

Un saludo.
Néstor.

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Bug(s) when not using paste?

2010-05-06 Thread Chris McDonough
  Sure.  If you provide a reproducible test case, I can try to look at it.
 
 Where can I find tests in the same area already?
 (ie: what file(s) would you like me to provide a patch against)

Just create a tarball of an app that fails and attach it to a bug at
http://bugs.repoze.org

- C


___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] BFG and GAE

2010-05-06 Thread Fernando Correa Neto
Hey

On Thu, May 6, 2010 at 9:43 AM, Tres Seaver tsea...@palladion.com wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Chris McDonough wrote:
  On Thu, 2010-05-06 at 08:30 -0400, Tres Seaver wrote:
 
  To ask for another $AU .25:  can somebody point to the currently-best
  docs on doing BFG on GAE?  There are a number of somewhat-contractictory
  writeups out in the wild, which leads to some confusion when folks want
  to try it out:  I talked to a user at the D.C. ZPUG the other night who
  was intereested in evaluating it, but couldn't figure out what was
  supposed to work, and how.
 
  AFAIK, this is 100% correct:
 
 
 http://docs.repoze.org/bfg/1.2/tutorials/gae/index.html#appengine-tutorial


 That procedure might work, but it relies on appengine-monkey, which was
 a big fat warning plastered across its homepage[1]:


It may work 100% correct on the first time only though.
While playing with it, I tried to create another bfg on gae project and
for my surprise it didn't work because appengine-monkey patched my system's
python distutils putting a hardcoded value for [install] in my distutils.cfg
(which happens to be installed in my $HOME/bin).

With that said, I believe appengine-monkey is not the best way to get BFG on
GAE and it would be better if people that have a sane process of achieving
this tried to document and hopefully advertise that approach.

Cheers,
-Fernando
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] Issue with enabling the ZCA Global API by Using The ZCA Global Registry

2010-05-06 Thread Tim Hoffman
Hi

I am trying to run a combined global zca registry as per the docs
http://docs.repoze.org/bfg/1.2/narr/zca.html.

I am using the Enabling the ZCA Global API by Using The ZCA Global
Registry option

globalreg = getGlobalSiteManager()
config = Configurator(registry=globalreg)
config.setup_registry(settings=settings)

Unfortunately Configurator.make_wsgi_app calls self.registry.notify
(line 418 of Configurator.py)
however a zope.component.globalregistry.BaseGlobalComponents doesn't
have a notify method so it barfs ;-)


 File /home/timh/qtrack/qtrack/pages_handler.py, line 88, in main
application = config.make_wsgi_app()
  File 
/home/timh/qtrack/lib/python2.5/site-packages/repoze.bfg-1.2.1-py2.5.egg/repoze/bfg/configuration.py,
line 418, in make_wsgi_app
self.registry.notify(WSGIApplicationCreatedEvent(app))
AttributeError: 'BaseGlobalComponents' object has no attribute 'notify'


I am going to wrap the registry to give it the notify method before I
stick the registry in the configurator  (I do want want subscribers
notified),
but as it stands what is documented won't work.

Regards

T
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


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

2010-05-06 Thread Chris Rossi
On Thu, May 6, 2010 at 4:14 AM, Charlie Clark
charlie.cl...@clark-consulting.eu wrote:
 Am 06.05.2010, 10:10 Uhr, schrieb Chris Withers ch...@simplistix.co.uk:

 This is spot on, and would, in theory, allow an app to override a
 library that overrides a framework.

 Cue lots of Jim like wooah! comments and it's all Chris' fault in the
 code! ;-)

I hate to just make more work for Chris M.  I'm happy to add this to
my todo list.  I have a lot on my plate right now, so don't expect a
timely implementation, but I'll try to get to it . . . . sometime.

Chris R
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] BFG and GAE

2010-05-06 Thread Chris McDonough
On Thu, 2010-05-06 at 11:08 -0300, Fernando Correa Neto wrote:

 It may work 100% correct on the first time only though.
 While playing with it, I tried to create another bfg on gae project
 and for my surprise it didn't work because appengine-monkey patched my
 system's python distutils putting a hardcoded value for [install] in
 my distutils.cfg (which happens to be installed in my $HOME/bin).
 
 
 With that said, I believe appengine-monkey is not the best way to get
 BFG on GAE and it would be better if people that have a sane process
 of achieving this tried to document and hopefully advertise that
 approach.

No disagreement here.  When I say it's the best way, I mean it's a way
that is documented and that is known to work.  If there's another better
way that is also documented and works, we should use that.  Would you be
willing to take on the task of figuring out what that is and documenting
it ala the existing tutorial.

- C




___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


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

2010-05-06 Thread Chris McDonough
On Thu, 2010-05-06 at 10:36 -0400, Chris Rossi wrote:
 On Thu, May 6, 2010 at 4:14 AM, Charlie Clark
 charlie.cl...@clark-consulting.eu wrote:
  Am 06.05.2010, 10:10 Uhr, schrieb Chris Withers ch...@simplistix.co.uk:
 
  This is spot on, and would, in theory, allow an app to override a
  library that overrides a framework.
 
  Cue lots of Jim like wooah! comments and it's all Chris' fault in the
  code! ;-)
 
 I hate to just make more work for Chris M.  I'm happy to add this to
 my todo list.  I have a lot on my plate right now, so don't expect a
 timely implementation, but I'll try to get to it . . . . sometime.

I'm actually not 100% confident that I understand the syntax, so I don't
think I could implement it yet anyway.

With ovverides='some.funcion.or.method', is the function or method
being overridden assumed to have a view configuration attached to it
that matches the overriding view configuration?  If so, that's a little
weird.  What if it has different view configuration arguments or or no
view configuration arguments at all?

A good number of view configuration overrides as performed via ZCML
don't require creatign separate view callable (like changing the
rendererer), so constructing one just to be able to decorate it, then
delegating to the original, seems a little suspect.

I'm also not sure that this can be advertised as an overrides strategy
100% comparable to ZCML unless all the various ZCML directives get
Python declarative equivalents.

So.. yeah, I think there's a cool idea lurking in here, but I'm not sure
we found it yet.


___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


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

2010-05-06 Thread Chris Rossi
On Thu, May 6, 2010 at 10:49 AM, Chris McDonough chr...@plope.com wrote:
 On Thu, 2010-05-06 at 10:36 -0400, Chris Rossi wrote:
 On Thu, May 6, 2010 at 4:14 AM, Charlie Clark
 charlie.cl...@clark-consulting.eu wrote:
  Am 06.05.2010, 10:10 Uhr, schrieb Chris Withers ch...@simplistix.co.uk:
 
  This is spot on, and would, in theory, allow an app to override a
  library that overrides a framework.
 
  Cue lots of Jim like wooah! comments and it's all Chris' fault in the
  code! ;-)
 
 I hate to just make more work for Chris M.  I'm happy to add this to
 my todo list.  I have a lot on my plate right now, so don't expect a
 timely implementation, but I'll try to get to it . . . . sometime.

 I'm actually not 100% confident that I understand the syntax, so I don't
 think I could implement it yet anyway.

 With ovverides='some.funcion.or.method', is the function or method
 being overridden assumed to have a view configuration attached to it
 that matches the overriding view configuration?  If so, that's a little
 weird.  What if it has different view configuration arguments or or no
 view configuration arguments at all?

 A good number of view configuration overrides as performed via ZCML
 don't require creatign separate view callable (like changing the
 rendererer), so constructing one just to be able to decorate it, then
 delegating to the original, seems a little suspect.

 I'm also not sure that this can be advertised as an overrides strategy
 100% comparable to ZCML unless all the various ZCML directives get
 Python declarative equivalents.

 So.. yeah, I think there's a cool idea lurking in here, but I'm not sure
 we found it yet.




Good point.
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] BFG and GAE

2010-05-06 Thread Alex Clark
On 2010-05-05, Charlie Clark charlie.cl...@clark-consulting.eu wrote:
 Am 05.05.2010, 17:10 Uhr, schrieb Alex Clark acl...@aclark.net:

 However I'll mention I see guys like philikon (http://i-luuv.appspot.com)
 and davisagli (http://buildthreat.appspot.com/) building cool apps on  
 GAE
 and I can't help but wonder what it would be like if the BFG/GAE story  
 was complete and in place.

 Please forgive the ignorance but is actually cool about those two sites?

Heh, just that you can knock together scalable toy apps for fun. In the
case of philikon's http://i-luuv.appspot.com/ he used WebOb and some
HTML5 IIRC, and davisagli appears to have used straight Python:
http://pypi.python.org/pypi/buildout.threatlevel

 Charlie

-- 
Alex Clark · http://aclark.net
Author of Plone 3.3 Site Administration · http://aclark.net/plone-site-admin

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


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

2010-05-06 Thread Shane Hathaway
On 05/06/2010 08:49 AM, Chris McDonough wrote:
 I'm also not sure that this can be advertised as an overrides strategy
 100% comparable to ZCML unless all the various ZCML directives get
 Python declarative equivalents.

 So.. yeah, I think there's a cool idea lurking in here, but I'm not sure
 we found it yet.

IMHO, the ZCML support for overrides is sufficient already.  If I need 
to override anything in my app, I expect to write at least 2 ZCML files.

configure.zcml:

   configure
 scan module=.views /
 includeOverrides file=overrides.zcml /
   /configure

overrides.zcml:

   configure
 scan module=.overrides /
   /configure

I will put most of my views in views.py.  When ZCML detects a conflict, 
I'll move the conflicting view declarations to overrides.py.

This doesn't currently work because bfg_view decorators cause imperative 
configuration.  If bfg_view decorators caused declarative configuration 
instead, I expect that ZCML overrides would just work, as would 
automatic conflict detection.

Shane
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev