Re: [ZODB-Dev] I would like to know if api exists nowadays to get list of all objects which where modified in a transaction ?

2011-07-29 Thread Pedro Ferreira
Dear Stephane,

 some time ago, someone ask how to get list of all objects which where 
 modified in a transaction : 
 http://article.gmane.org/gmane.comp.web.zope.zodb/5734
 
 Jim Fulton said « there isn't a public API for this ».
 
 I would like to know if this api exists nowadays ?

I do not know if this is what you are looking for:

https://gist.github.com/1113786

It's a small thing that i hacked some months ago, and that provides a
detailed log on what is going on behind the scenes (client-side).

I agree that something like this would be useful, maybe as an add-on to
ZODB just for debugging?

I hope it helps.

Cheers,

Pedro

-- 
José Pedro Ferreira

Software Developer, Indico Project
http://indico-software.org

+---+
+  '``'--- `+  CERN - European Organization for Nuclear Research
+ |CERN|  / +  1211 Geneve 23, Switzerland
+ ..__. \.  +  IT-UDS-AVC
+  \\___.\  +  Office: 513-1-005
+  /+  Tel. +41227677159
+---+
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] I would like to know if api exists nowadays to get list of all objects which where modified in a transaction ?

2011-07-29 Thread Marius Gedminas
On Fri, Jul 29, 2011 at 03:21:23PM +0200, Pedro Ferreira wrote:
  some time ago, someone ask how to get list of all objects which where 
  modified in a transaction : 
  http://article.gmane.org/gmane.comp.web.zope.zodb/5734
 
 I do not know if this is what you are looking for:
 
 https://gist.github.com/1113786
 
 It's a small thing that i hacked some months ago, and that provides a
 detailed log on what is going on behind the scenes (client-side).

I've a smaller hack in zodbbrowser (sorry for the long URL, launchpad
sucks):
http://bazaar.launchpad.net/~zodbbrowser-dev/zodbbrowser/trunk/view/head:/src/zodbbrowser/browser.py#L84

Basically, if you don't mind peeking in private attributes of
transaction and connection objects, you can easily find out what objects
were added/modified.

I wouldn't hesitate use this for debugging, but I would not build
business logic on top of this.

Marius Gedminas
-- 
It also makes sense in the case of 1872, where most of Horace Greenly's
electors came to the sensible conclusion that the death of their candidate made
him unfit for office.
-- matthewwdaly explains the workings of the US Electoral College


signature.asc
Description: Digital signature
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] I would like to know if api exists nowadays to get list of all objects which where modified in a transaction ?

2011-07-28 Thread Stéphane Klein
Le 26/07/2011 09:55, Stéphane Klein a écrit :
 Hi,

 some time ago, someone ask how to get list of all objects which where
 modified in a transaction :
 http://article.gmane.org/gmane.comp.web.zope.zodb/5734

 Jim Fulton said « there isn't a public API for this ».

 I would like to know if this api exists nowadays ?

No idea ?


-- 
Stéphane Klein steph...@harobed.org
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


[ZODB-Dev] I would like to know if api exists nowadays to get list of all objects which where modified in a transaction ?

2011-07-26 Thread Stéphane Klein
Hi,

some time ago, someone ask how to get list of all objects which where 
modified in a transaction : 
http://article.gmane.org/gmane.comp.web.zope.zodb/5734

Jim Fulton said « there isn't a public API for this ».

I would like to know if this api exists nowadays ?

Regards,
Stephane
-- 
Stéphane Klein steph...@harobed.org
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] I would like to know if api exists nowadays to get list of all objects which where modified in a transaction ?

2011-07-26 Thread Alexandru Plugaru
Hi,
I would interested in this as well. Sometimes debugging
becomes difficult for big transactions where multiple different objects are
modified. Usually than happens from different parts of the code through
subscribers to events. It would be great if this kind of feature existed so
you could have an overview of what happens during a transaction.
Alex.

On 26 July 2011 10:55, Stéphane Klein steph...@harobed.org wrote:

 Hi,

 some time ago, someone ask how to get list of all objects which where
 modified in a transaction :
 http://article.gmane.org/gmane.comp.web.zope.zodb/5734

 Jim Fulton said « there isn't a public API for this ».

 I would like to know if this api exists nowadays ?

 Regards,
 Stephane
 --
 Stéphane Klein steph...@harobed.org
 blog: http://stephane-klein.info
 Twitter: http://twitter.com/klein_stephane
 pro: http://www.is-webdesign.com

 ___
 For more information about ZODB, see the ZODB Wiki:
 http://www.zope.org/Wikis/ZODB/

 ZODB-Dev mailing list  -  ZODB-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zodb-dev

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] I would like to know if api exists nowadays to get list of all objects which where modified in a transaction ?

2011-07-26 Thread Jim Fulton
On Tue, Jul 26, 2011 at 3:55 AM, Stéphane Klein steph...@harobed.org wrote:
 Hi,

 some time ago, someone ask how to get list of all objects which where
 modified in a transaction :
 http://article.gmane.org/gmane.comp.web.zope.zodb/5734

 Jim Fulton said « there isn't a public API for this ».

 I would like to know if this api exists nowadays ?

No. Is your goal the same as before? Is it that
you want to make sure that a transaction is read-only?

If so, maybe it would be better to express this directly.
Something like:

   transaction.get().assert_read_only()

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] I would like to know if api exists nowadays to get list of all objects which where modified in a transaction ?

2011-07-26 Thread Jim Fulton
On Tue, Jul 26, 2011 at 4:12 AM, Alexandru Plugaru
alexandru.plug...@gmail.com wrote:
 Hi,
 I would interested in this as well. Sometimes debugging
 becomes difficult for big transactions where multiple different objects are
 modified. Usually than happens from different parts of the code through
 subscribers to events. It would be great if this kind of feature existed so
 you could have an overview of what happens during a transaction.

You don't need a public API for debugging.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev