Re: transaction: getting hooks and synchronizers to work

2013-03-03 Thread Laurence Rowe
On Sunday, 17 February 2013 22:54:30 UTC-8, cguardia wrote: > Hi, > > there were some problems with the code snippets in the book. I updated > them here: > > http://zodb.readthedocs.org/en/latest/transactions.html#before-commit-hooks > > For some reason I could only get synch to work using cla

Re: transaction: getting hooks and synchronizers to work

2013-03-03 Thread Laurence Rowe
On 3 March 2013 08:37, Carlos de la Guardia wrote: > Laurence, did you get it to work like that? I tried before using > classmethod and wasn't able to make it work. Ah, you need to implement all methods on ISynchronizer: >>> class MySynch(object): ... def newTransaction(self, transaction): .

Re: transaction: getting hooks and synchronizers to work

2013-03-03 Thread Laurence Rowe
On Sunday, March 3, 2013 4:59:58 PM UTC-8, Sid K wrote: > > Ok, it looks like the synchronizer instance needs to remain in the calling > scope for the synchronizer to work. This code (Laurence) works: > > synch = MySynch() > transaction.manager.registerSynch(synch) > > while this code (what we w

Pyramid and Web Services open space at PyCon?

2013-03-05 Thread Laurence Rowe
I'd like to propose holding a Pyramid and Web Services open space at PyCon later this month. If there's interest, I'll try and pre-register it with the PyCon organisers. Some of the topics I'd like to discuss are: I've found merging the context factory and view class can make sense when buildin

Re: Pyramid and Web Services open space at PyCon?

2013-03-14 Thread Laurence Rowe
On Tuesday, 5 March 2013 11:34:47 UTC-8, Laurence Rowe wrote: > I'd like to propose holding a Pyramid and Web Services open space at PyCon > later this month. If there's interest, I'll try and pre-register it with > the PyCon organisers. > We have room 209, 2-4pm

An alternative approach to view predicates

2013-04-25 Thread Laurence Rowe
This is an attempt at a formal description of Pyramid's view predicate system in order to find possible avenues for optimization. It was prompted by concern over the approach currently taken to fix #768_. An alternative implementation approach is suggested using adapter registry subscribers. .. _

Re: is the current sqlalchemy scaffold 'correct' ?

2013-07-22 Thread Laurence Rowe
Responses inline. On Monday, 15 July 2013 14:14:04 UTC-7, Jonathan Vanasco wrote: > > > Someone posted a docs suggestion to -devel, which made me look at the > current sqlalchemy scaffold. > > > I'm not sure it's 'correct' > > > a few weeks ago I asked Mike Bayer (sqlalchemy) what the best prac

[pylons-devel] Re: Stopping a waitress thread

2014-08-10 Thread Laurence Rowe
On Thursday, 7 August 2014 14:30:57 UTC-7, Ram Rachum wrote: > > I have a thread running `waitress.serve`. How can I stop it from serving > without killing the thread? (Which is not recommended generally.) > WebTest has a waitress subclass, StopableWSGIServer: https://github.com/Pylons/webtest/b

Re: [pylons-devel] suggestion - internal lifecycle logging

2014-10-06 Thread Laurence Rowe
On Monday, 6 October 2014 10:44:59 UTC-7, Jonathan Vanasco wrote: > > > On Thursday, October 2, 2014 11:01:33 PM UTC-4, Bert JW Regeer wrote: >> >> This seems like functionality that any ol’ profiler should be able to >> give you, and wouldn’t require any changes in Pyramid. > > > Mostly, yes.

[pylons-devel] Re: Testing a Pyramid app with Jenkins

2015-09-25 Thread Laurence Rowe
On Wednesday, 23 September 2015 11:18:43 UTC-7, alain.d...@nrc-cnrc.gc.ca wrote: > > Before I run the the unit tests, I need restart the tdddemoPyramidApp.py > script so that it runs the most recent version of the app. When I run the > tests outside of Jenkins, I just Ctrl-C the script and re-is

[pylons-devel] Re: wsgi server of choice?

2015-09-25 Thread Laurence Rowe
Have you tried mod_wsgi-express? https://pypi.python.org/pypi/mod_wsgi Presumably the problems you're seeing come from Apache being started by the init system rather than the user's shell in which the module system is installed. Laurence On Thursday, 24 September 2015 09:25:14 UTC-7, Chris Wit