Re: [Repoze-dev] System Error; Transaction closed

2010-02-23 Thread Darryl Cousins
Hi George,

On Tue, Feb 23, 2010 at 7:15 AM, georgehu  wrote:
> On 2/20/2010 3:33 PM, Darryl Cousins wrote:
>
> Hi Chris,
>
> On Sat, Feb 20, 2010 at 5:03 PM, Chris McDonough  wrote:
>
>
> It looks like repoze.tm2 is committing the transaction before beaker has a
> chance to do a write.  Or something.  I'd move beaker below repoze.tm2 in
> paste.ini as a first shot at solving it.
>
>
> Thanks for the reply. I gave that a go (I've previously tried swapping
> the pipeline parts around to find a solution). Unfortunately to no
> avail (and I'm using beaker in memory so it's no real surprise).
>
> Wickert, Thanks for your reply. I had also wondered about that, but
> usually an sqlalchemy error will come through in the traceback. Of
> course it may be masked in some way (in a try/except statement). I'll
> continue to investigate.
>
> Thanks again for your replies.
>
> Best,
> Darryl
>
> On Sat, Feb 20, 2010 at 5:03 PM, Chris McDonough  wrote:
>
>
> It looks like repoze.tm2 is committing the transaction before beaker has a
> chance to do a write.  Or something.  I'd move beaker below repoze.tm2 in
> paste.ini as a first shot at solving it.
>
> On 2/19/10 8:39 PM, Darryl Cousins wrote:
>
>
> Hi,
>
> I'm frequently coming across a problem with the transaction. A typical
> traceback is included below.
>
> Relevant section of paste.ini:
>
> [pipeline:main]
> pipeline =
>     responselogger
>     browserid
>     deliverance
>     beaker
>     egg:repoze.tm2#tm
>     who
>     myapp
>
> I don't call session.commit() anywhere in my code. And on refresh the
> error disappears (usually the first refresh, sometimes on second or
> third refresh).
>
> Has anyone else come across this problem and if so what was the
> solution or source of the problem?
>
> Thanks in advance,
> Darryl Cousins
>
> Traceback (most recent call last):
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/Paste-1.7.2-py2.6.egg/paste/httpserver.py",
> line 1062, in process_request_in_thread
>     self.finish_request(request, client_address)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py",
> line 320, in finish_request
>     self.RequestHandlerClass(request, client_address, self)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py",
> line 615, in __init__
>     self.handle()
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/Paste-1.7.2-py2.6.egg/paste/httpserver.py",
> line 436, in handle
>     BaseHTTPRequestHandler.handle(self)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py",
> line 329, in handle
>     self.handle_one_request()
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/Paste-1.7.2-py2.6.egg/paste/httpserver.py",
> line 431, in handle_one_request
>     self.wsgi_execute()
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/Paste-1.7.2-py2.6.egg/paste/httpserver.py",
> line 287, in wsgi_execute
>     self.wsgi_start_response)
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/repoze.debug-0.7-py2.6.egg/repoze/debug/responselogger.py",
> line 59, in __call__
>     app_iter = self.application(environ, replace_start_response)
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/repoze.browserid-0.2-py2.6.egg/repoze/browserid/middleware.py",
> line 92, in __call__
>     return self.app(environ, start_response)
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/parts/svneggs/deliverance/deliverance/security.py",
> line 89, in replacement_app
>     return app(environ, start_response)
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/parts/svneggs/deliverance/deliverance/middleware.py",
> line 87, in __call__
>     resp = req.get_response(self.app)
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/WebOb-0.9.8-py2.6.egg/webob/request.py",
> line 919, in get_response
>     application, catch_exc_info=False)
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/WebOb-0.9.8-py2.6.egg/webob/request.py",
> line 887, in call_application
>     app_iter = application(self.environ, start_response)
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/Beaker-1.5.1-py2.6.egg/beaker/middleware.py",
> line 152, in __call__
>     return self.wrap_app(environ, session_start_response)
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/repoze.tm2-1.0a5-py2.6.egg/repoze/tm/__init__.py",
> line 47, in __call__
>     self.commit()
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/repoze.tm2-1.0a5-py2.6.egg/repoze/tm/__init__.py",
> line 52, in commit
>     t.commit()
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/transaction-1.0.0-py2.6.egg/transaction/_transaction.py",
> line 322, in commit
>     self._commitResources()
>   File
> "/Users/darrylcousins/vortex/buildout/vortex/eggs/transaction-1.0.0-py2.6.egg/transaction/_transaction.py",
> line 419, in _commitResources
>     rm.tpc_vote(self)
>   File
> "/Users/dar

Re: [Repoze-dev] BFG PyCon BOF Summary

2010-02-23 Thread Thomas G. Willis
On Tue, Feb 23, 2010 at 10:11 AM, Andrey Popp <8may...@gmail.com> wrote:
> On Tue, Feb 23, 2010 at 5:58 PM, Wichert Akkerman  wrote:
>> Thanks for the writeup!
>>
>> On 2/23/10 14:14 , Chris McDonough wrote:
>>> Documentation
>>> -
>>>
>>> - People would like to see a tutorial which hand-held people through
>>>     the process of moving from a imperative configuration to a
>>>     declarative configuration, and perhaps vice versa.
>>
>> Interesting - I would have expected the other direction to be more
>> popular. Do you know why people seem to prefer declarative?
>
> From my expirience, many people become scared of using ZCML. Maybe
> this is because ZCML is XML... But for me declarative configuration is
> more preferable, cause it leads to less errors and better
> extensibility.
> ___
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev
>

Yeah zcml isn't the first thing you should show someone when they are
new to the bfg. I actually like how the bfg book puts it off (i think)
until around chapter 5 or 6 or so.

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


Re: [Repoze-dev] BFG PyCon BOF Summary

2010-02-23 Thread Andrey Popp
On Tue, Feb 23, 2010 at 5:58 PM, Wichert Akkerman  wrote:
> Thanks for the writeup!
>
> On 2/23/10 14:14 , Chris McDonough wrote:
>> Documentation
>> -
>>
>> - People would like to see a tutorial which hand-held people through
>>     the process of moving from a imperative configuration to a
>>     declarative configuration, and perhaps vice versa.
>
> Interesting - I would have expected the other direction to be more
> popular. Do you know why people seem to prefer declarative?

From my expirience, many people become scared of using ZCML. Maybe
this is because ZCML is XML... But for me declarative configuration is
more preferable, cause it leads to less errors and better
extensibility.
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] BFG PyCon BOF Summary

2010-02-23 Thread Wichert Akkerman
Thanks for the writeup!

On 2/23/10 14:14 , Chris McDonough wrote:
> Documentation
> -
>
> - People would like to see a tutorial which hand-held people through
> the process of moving from a imperative configuration to a
> declarative configuration, and perhaps vice versa.

Interesting - I would have expected the other direction to be more 
popular. Do you know why people seem to prefer declarative?


> DVCS
> 
>
> There was some general agitation to move from SVN to a DVCS.  I think
> there's general consensus that this is a good idea.  My reservations
> are these:
>
> - Any choice about which DVCS we make will be "wrong": it's still
> unclear which DVCS systems will "win" and which ones will "lose".
> If the DVCS we choose turns out to be the "wrong" one, we'll need to
> switch VC systems again in a couple of years.
>
> - I don't know how we'd handle contributor agreements.
>
> Even with these outstanding concerns and questions, I think we should
> probably indeed move to a DVCS sometime soon -- maybe within the next
> six months or so.  When we do, Agendaless will play the role of tyrant
> and choose which DVCS that will be and how it gets set up, and how
> contributor agreements are handled.  There's no way I can stop you
> from expressing an opinion about how this process should work and the
> concrete choice of DVCS, but personally I'm unlikely to respond;
> please don't be disappointed if there isn't a resulting negotiation.

 From a personal perspective I'm likely to only contribute in the form 
of emailing patches if you move away from svn. Luckily I only contribute 
small things, so feel free to ignore me.

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


[Repoze-dev] BFG PyCon BOF Summary

2010-02-23 Thread Chris McDonough
BFG Open Space Summary
==

There was a BFG BOF at a PyCon Open Space this year.  I'll summarize
what we talked about here.

Website
---

Folks expressed a desire for the following website improvements:

- Make documentation pages commentable.

- Create a section on the bfg.repoze.org website about which
   production sites are using BFG.

- Provide better support for allowing contributed snippets about how
   to do "X" with repoze.bfg.

- Improve Google search rankings for documentation terms.

- Indicate on older docs pages that a newer release has come out.

Documentation
-

- People would like to see a tutorial which hand-held people through
   the process of moving from a imperative configuration to a
   declarative configuration, and perhaps vice versa.

Cooperation
---

- General interest in continuing cooperation with Pylons to see what
   bits we can share.  Some effort is being made at the PyCon sprints
   to do just this.

DVCS


There was some general agitation to move from SVN to a DVCS.  I think
there's general consensus that this is a good idea.  My reservations
are these:

- Any choice about which DVCS we make will be "wrong": it's still
   unclear which DVCS systems will "win" and which ones will "lose".
   If the DVCS we choose turns out to be the "wrong" one, we'll need to
   switch VC systems again in a couple of years.

- I don't know how we'd handle contributor agreements.

Even with these outstanding concerns and questions, I think we should
probably indeed move to a DVCS sometime soon -- maybe within the next
six months or so.  When we do, Agendaless will play the role of tyrant
and choose which DVCS that will be and how it gets set up, and how
contributor agreements are handled.  There's no way I can stop you
from expressing an opinion about how this process should work and the
concrete choice of DVCS, but personally I'm unlikely to respond;
please don't be disappointed if there isn't a resulting negotiation.

-- 
Chris McDonough
Agendaless Consulting, Fredericksburg VA
The repoze.bfg Web Application Framework Book: http://bfg.repoze.org/book
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev