Re: [Twisted-Python] Volunteering for Release Manager

2009-07-14 Thread Jonathan Lange
On Tue, Jul 7, 2009 at 8:07 PM,  wrote:
>
> On 07:54 am, j...@mumak.net wrote:
>>Hello all,
>>
>>With some trepidation and a complete willingness to fail, I'm offering
>>my services as Twisted release manager, starting Tuesday next week.
>
> Hooray!
>>I have only two questions:
>>  - Am I accepted?
>
> MWAHAHAHAHAHA, WELCOME TO YOUR DOOM!
>
> By which I mean, "yes".  radix and exarkun have both dedicated some
> effort to making this release happen, and I'm sure we'll all continue to
> help you in this role, but there has been a discernable ... lack of
> enthusiasm for anyone to wear the official "release manager" hat.  We
> all appreciate your brave sacrifice.

Why, thank you. I can only hope it's something of a sub-prime doom.

>>  - Where do I begin?
>
> There is a ticket, , which
> you will now find is assigned to you.
>

Rock and roll.

> Some work has already taken place to update the NEWS files on a branch
> for that ticket, which is the bulk of the work associated with the
> releases, but it's not complete.  Also, since this branch was made, some
> features have been added and some regressions fixed, so it should be
> merged forward.
>

I'll try to get started on this tonight.

Also, unless you object, I'll try to send weekly emails on the status
of the release until it's actually out.

jml

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Possible Twisted sprint

2009-07-14 Thread Jonathan Lange
On Thu, Jul 9, 2009 at 1:26 PM,  wrote:
>
> On 8 Jul, 04:31 am, j...@mumak.net wrote:
>>
>> I've recently returned from EuroPython where I got a chance to work
>> with Thomas Hervé on Twisted. In the giddy rush of success I thought,
>> "Wouldn't it be great if we could get a whole week to do this?".
>
> Yay!

Thanks everyone for your replies & enthusiasm!

Rather than reply to emails individually, I'm just going to reply to this one.

I've also set up http://twistedmatrix.com/trac/wiki/Sprint2009 to
track all of the details.

>>
>> I propose that:
>>  - we arrange a week long sprint in Boston this year.
>>  - we ask the PSF & the TSF to assist with travel expenses for some
>> of the more distant community members
>>  - the Boston folk arrange a venue
>>  - individuals figure out how to get the time to attend.
>>  - we determine a date asap.
>
> Sounds like a good proposal to me, but I recommend getting individuals to
> accept responsibilities for parts of this so that there are fewer "we"s in
> it.

To clarify:

- jml arranges a week-long Twisted sprint.
- People who want the TSF or PSF to assist with travel expenses say so
on the wiki page. I'll then speak to the TSF & PSF on behalf of the
sprint as a whole.
- Individuals figure out how they can get the time to attend
- *** I need a volunteer to arrange a venue in Boston. ***

READ THIS BIT!

1. If you are attending, add your name; if you are attending subject
to other conditions (funding, leave etc) then add your name & say
'tentative'; if you are _not_ attending, add your name to the not
attending list.

2. This really is a meeting of individuals.  I cannot promise who will
be there or how good it will be. I can promise that as of Friday, July
17th, the date & city will be set in concrete, even if I can't attend.

3. Put your attendance information on the wiki asap & keep it up to
date. This will help others.

>>
>> In the absence of any better ideas, I suggest that the theme of the
>> sprint be "fix as many bugs as possible".
>
> Good goals are as arbitrary as possible, so how about this to modify your
> proposal:
>
> "Under 1000 Open Tickets"
>

Yes, that's much better :)

> Even more specifically: I recommend that we dedicate at least one day of the
> sprint purely to triage.  Being together in person will allow us to quickly
> discuss the relative priority of different goals for Twisted, as well as
> identify duplicates.  It's much easier to yell out "does anybody remember a
> ticket like this" in a sprint room than to fight with Trac, or even Google,
> search.

In the context of Twisted's bug tracker, I don't really know what
"triage" would mean. Care to clarify (perhaps on the wiki page?)

>>
>> As for the date, it should be no sooner than September 7. As a
>> starting point, let's say Sep 28-Oct 2.
>
> This should be a pretty good time for me, and it's in my calendar now.
> Anyone else going to have problems making it to an end-of-September sprint?

This seems to be as good a date as any.

jml

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] Re adbapi and multiple queries in single transaction.

2009-07-14 Thread Vishal Shetye
Hi,

I went through several posts and blogs regarding long lived transactions in 
twisted.

Some of them are

-A bug with current status won't fix. 
http://twistedmatrix.com/trac/ticket/303

-Laxdb from sandbox. 
http://archives.free.net.ph/message/20050831.235536.440061b8.en.html#twisted-python

-A blog entry by glyph. 
http://glyph.twistedmatrix.com/2008/12/databases-and-twisted-when-threads-are.html


I have a scenario as given below. All the steps to be done sequentially and in 
a single transaction.
1. do some db queries.
2. interact with some module that uses twisted framework.
3. do some db queries.

As I can see adbapi's runInteraction runs the interaction in a new thread.
I read that most of the twisted code is not thread safe so it is recommended 
not to use anything except for the reactor.callFromThread in the threads other 
than reactor's main thread.
Does this mean that only approach remains is something similar to laxdb?

The bug mentioned above says patch provided has a DOS problem and solution is 
to use separate threadpools. Does the same problem exist with laxdb?

Regards,
vishal

DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] Cancel/stop Deferred() at any time

2009-07-14 Thread vitaly
Hello,

is there any way to cancel the Deferred callback in those examples?

1.
d = defer.Deferred()
d.addCallback(methodA).addErrback(methodErr)
d.callback(None)

2.
d = methodB().addErrback(methodErr)
wfd = defer.waitForDeferred(d)



Appreciate any help.


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Cancel/stop Deferred() at any time

2009-07-14 Thread Jean-Paul Calderone
On Tue, 14 Jul 2009 11:10:10 -0400, vit...@synapticvision.com wrote:
>Hello,
>
>is there any way to cancel the Deferred callback in those examples?
>
>1.
>d = defer.Deferred()
>d.addCallback(methodA).addErrback(methodErr)
>d.callback(None)
>
>2.
>d = methodB().addErrback(methodErr)
>wfd = defer.waitForDeferred(d)
>
>
>
>Appreciate any help.
>

Deferred doesn't have any cancellation features.  You can generally achieve
some sort of cancellation by supporting this in the application code creating
and consuming the Deferreds involved.

The details of how to do this depend on what exactly you want to happen when
you "cancel" the operation.

You can find one example of this in the implementation of Twisted's internal
thread-based name resolver:

http://twistedmatrix.com/trac/browser/trunk/twisted/internet/base.py#L193

You can find other examples in the implementation of any other Deferred-
returning API which also supports timeouts, eg the web client:

http://twistedmatrix.com/trac/browser/trunk/twisted/web/client.py#L198

Hope this helps,

Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Cancel/stop Deferred() at any time

2009-07-14 Thread vitaly
Thank you,

"cancel" callback - stop running now what you've been asked to exec.
Example: some SQL query that takes 5 min and I need to cancel it  
anywhere in the middle and it, of course, it doesn't matter what the  
result set.

As far as I see from base.py and client.py, some sort of timeout now  
could achieve the cancel operation ?


Quoting "Jean-Paul Calderone" :

> On Tue, 14 Jul 2009 11:10:10 -0400, vit...@synapticvision.com wrote:
>> Hello,
>>
>> is there any way to cancel the Deferred callback in those examples?
>>
>> 1.
>> d = defer.Deferred()
>> d.addCallback(methodA).addErrback(methodErr)
>> d.callback(None)
>>
>> 2.
>> d = methodB().addErrback(methodErr)
>> wfd = defer.waitForDeferred(d)
>>
>>
>>
>> Appreciate any help.
>>
>
> Deferred doesn't have any cancellation features.  You can generally achieve
> some sort of cancellation by supporting this in the application code creating
> and consuming the Deferreds involved.
>
> The details of how to do this depend on what exactly you want to happen when
> you "cancel" the operation.
>
> You can find one example of this in the implementation of Twisted's internal
> thread-based name resolver:
>
> http://twistedmatrix.com/trac/browser/trunk/twisted/internet/base.py#L193
>
> You can find other examples in the implementation of any other Deferred-
> returning API which also supports timeouts, eg the web client:
>
> http://twistedmatrix.com/trac/browser/trunk/twisted/web/client.py#L198
>
> Hope this helps,
>
> Jean-Paul
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>



___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Possible Twisted sprint

2009-07-14 Thread Jamu Kakar
Hi,

On Tue, Jul 14, 2009 at 2:54 AM, Jonathan Lange wrote:
> 1. If you are attending, add your name; if you are attending subject
> to other conditions (funding, leave etc) then add your name & say
> 'tentative'; if you are _not_ attending, add your name to the not
> attending list.

I logged into the wiki and, it's very likely that it's obvious, but
I could find a way to edit the page.  I'm (tenative/Probably not).

Thanks,
J.

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Possible Twisted sprint

2009-07-14 Thread Jean-Paul Calderone
On Tue, 14 Jul 2009 11:33:03 -0700, Jamu Kakar  wrote:
>Hi,
>
>On Tue, Jul 14, 2009 at 2:54 AM, Jonathan Lange wrote:
>> 1. If you are attending, add your name; if you are attending subject
>> to other conditions (funding, leave etc) then add your name & say
>> 'tentative'; if you are _not_ attending, add your name to the not
>> attending list.
>
>I logged into the wiki and, it's very likely that it's obvious, but
>I could find a way to edit the page.  I'm (tenative/Probably not).

Oops.  You probably can't, because wiki editing is disabled, even for
registered accounts unless you have a special wiki editing permission,
as a spam prevention measure.

Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Cancel/stop Deferred() at any time

2009-07-14 Thread David Bolen
vit...@synapticvision.com writes:

> "cancel" callback - stop running now what you've been asked to exec.
> Example: some SQL query that takes 5 min and I need to cancel it  
> anywhere in the middle and it, of course, it doesn't matter what the  
> result set.

Note that the Deferred itself has no notion of the underlying
operation - it's just a placeholder for the callback chain to run.  So
trying to get from the deferred back to, for example, the database
query that will eventually use it for the result, is sort of like the
classic Python question of asking what name refers to an object, when
the object really has no idea who holds a reference to it.

If you actually want to try to interrupt a specific operation, then
you'll have to go to the actual application code performing the
operation, and that code will have to have a way to actually cancel an
ongoing activity.  It can then trigger the deferred chain with an
appropriate result (or probably Failure) that indicates cancellation.
That's going to be application-code specific, as Jean-Paul suggested.
In the database case, some database wrappers may support requesting an
interruption of an active query, but some might not.

If, however, you just want to avoid any existing deferred callback
chain from being triggered, but can let the operation proceed while
ignoring its result, I'd think you could just pause the deferred and
never resume it.  That will keep the deferred from triggering any
further callbacks past the point when it was paused, but won't
actually interrupt any currently active operations that the deferred
represents.  If you have code blocked waiting on that deferred (your
second example) it'll never complete without additional cheating -
perhaps initiating a fake callback on the chain first, though you'd
have to use some internals of Deferred or else risk a pause during the
callback opening up a window where the original source could attempt
to re-trigger the callback.

-- David


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python