[ZODB-Dev] Closing databases with open connections with uncommitted changes

2010-07-14 Thread Jim Fulton
Currently, an exception is raised if a connection with uncommitted
changes is closed.

There is no error if the connection's database is closed, or if the
program simply exits.

I think it's reasonable to treat a program exit as an implicit abort.

I'm not so sure about closing a database.  If a transaction has
changes in two databases and you close one, should the transaction be
implicitly aborted?

The cleanest thing would be to raise an error if a database being
closed has uncommitted changes.  Unfortunately, this change would
cause lots of existing tests (in and) outside of ZODB to break.

I'm included to stick with the current behavior for now.

Jim

--
Jim Fulton
___
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 released 3.10.0b2 this morning

2010-07-14 Thread Jim Fulton
On Wed, Jul 14, 2010 at 10:29 AM, Hanno Schlichting  wrote:
> On Wed, Jul 14, 2010 at 2:47 PM, Jim Fulton  wrote:
>> It got a lot larger recently when someone moved a bunch of
>> reports from the Zope 2 lists.  A lot of these bugs are obsolete.
>
> That one was me. I tried hard to only move those bugs, which were
> indeed pure ZODB problems. A lot of them looked like they were
> edge-cases and feature requests more than anything else. But if any of
> them are Zope2 specific, feel free to reassign them back.

I'm sure they're all ZODB specific. Some of them are even ZODB 3.2 specific. :)

Jim

-- 
Jim Fulton
___
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] 3.10.0b2 seems to break FunctionalTestSetup?

2010-07-14 Thread Guilherme Salgado
On Wed, 2010-07-14 at 10:12 -0400, Jim Fulton wrote:
> On Wed, Jul 14, 2010 at 10:04 AM, Guilherme Salgado
>  wrote:
> > Hi there,
> >
> > I've just tried running the tests on a freshly built zope.app.apidoc
> > tree and got the following error, while all tests pass fine when using
> > 3.9.5.
> >
> >Error in test testMenu
> >(zope.app.apidoc.zcmlmodule.tests.ZCMLModuleTests)
> >Traceback (most recent call last):
> >  File "/usr/lib/python2.6/unittest.py", line 270, in run
> >self.setUp()
> >  File
> >
> > "/home/salgado/.buildout/eggs/zope.app.testing-3.7.5-py2.6.egg/zope/app/testing/functional.py",
> >  line 391, in setUp
> >FunctionalTestSetup().setUp()
> >  File
> >
> > "/home/salgado/.buildout/eggs/zope.app.testing-3.7.5-py2.6.egg/zope/app/testing/functional.py",
> >  line 288, in setUp
> >for name in self._database_names
> >  File
> >
> > "/home/salgado/.buildout/eggs/zope.app.appsetup-3.14.0-py2.6.egg/zope/app/appsetup/appsetup.py",
> >  line 213, in multi_database
> >db = factory.open()
> >  File
> >
> > "/home/salgado/.buildout/eggs/zope.app.testing-3.7.5-py2.6.egg/zope/app/testing/functional.py",
> >  line 160, in open
> >return DB(self.storage, database_name=self.name)
> >  File
> >
> > "/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/DB.py",
> >  line 454, in __init__
> >temp_storage.load(z64, '')
> >  File
> >
> > "/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/DemoStorage.py",
> >  line 158, in load
> >return self.base.load(oid, version)
> >  File
> >
> > "/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/DemoStorage.py",
> >  line 156, in load
> >return self.changes.load(oid, version)
> >  File
> >
> > "/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/utils.py",
> >  line 252, in __call__
> >precondition.__doc__.strip())
> >AssertionError: ('Failed precondition: ', 'The storage is open')
> >
> > I don't have time/knowledge to debug this further, but I thought I
> > should let you know anyway.
> 
> Could you at least provide instructions for reproducing it. Like:
> 
> - use this buildout
> - run this command

Sure; this is what I did after fetching zope.app.apidoc's trunk:

  $ virtualenv --no-site-packages foo
  $ foo/bin/python bootstrap.py
  $ ./bin/buildout
  $ ./bin/test

Please let me know if there's anything else that I can do to help.

Cheers,

-- 
Guilherme Salgado 


signature.asc
Description: This is a digitally signed message part
___
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 released 3.10.0b2 this morning

2010-07-14 Thread Hanno Schlichting
On Wed, Jul 14, 2010 at 2:47 PM, Jim Fulton  wrote:
> It got a lot larger recently when someone moved a bunch of
> reports from the Zope 2 lists.  A lot of these bugs are obsolete.

That one was me. I tried hard to only move those bugs, which were
indeed pure ZODB problems. A lot of them looked like they were
edge-cases and feature requests more than anything else. But if any of
them are Zope2 specific, feel free to reassign them back.

Hanno
___
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] 3.10.0b2 seems to break FunctionalTestSetup?

2010-07-14 Thread Jim Fulton
On Wed, Jul 14, 2010 at 10:04 AM, Guilherme Salgado
 wrote:
> Hi there,
>
> I've just tried running the tests on a freshly built zope.app.apidoc
> tree and got the following error, while all tests pass fine when using
> 3.9.5.
>
>        Error in test testMenu
>        (zope.app.apidoc.zcmlmodule.tests.ZCMLModuleTests)
>        Traceback (most recent call last):
>          File "/usr/lib/python2.6/unittest.py", line 270, in run
>            self.setUp()
>          File
>        
> "/home/salgado/.buildout/eggs/zope.app.testing-3.7.5-py2.6.egg/zope/app/testing/functional.py",
>  line 391, in setUp
>            FunctionalTestSetup().setUp()
>          File
>        
> "/home/salgado/.buildout/eggs/zope.app.testing-3.7.5-py2.6.egg/zope/app/testing/functional.py",
>  line 288, in setUp
>            for name in self._database_names
>          File
>        
> "/home/salgado/.buildout/eggs/zope.app.appsetup-3.14.0-py2.6.egg/zope/app/appsetup/appsetup.py",
>  line 213, in multi_database
>            db = factory.open()
>          File
>        
> "/home/salgado/.buildout/eggs/zope.app.testing-3.7.5-py2.6.egg/zope/app/testing/functional.py",
>  line 160, in open
>            return DB(self.storage, database_name=self.name)
>          File
>        
> "/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/DB.py",
>  line 454, in __init__
>            temp_storage.load(z64, '')
>          File
>        
> "/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/DemoStorage.py",
>  line 158, in load
>            return self.base.load(oid, version)
>          File
>        
> "/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/DemoStorage.py",
>  line 156, in load
>            return self.changes.load(oid, version)
>          File
>        
> "/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/utils.py",
>  line 252, in __call__
>            precondition.__doc__.strip())
>        AssertionError: ('Failed precondition: ', 'The storage is open')
>
> I don't have time/knowledge to debug this further, but I thought I
> should let you know anyway.

Could you at least provide instructions for reproducing it. Like:

- use this buildout
- run this command

Jim


-- 
Jim Fulton
___
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] 3.10.0b2 seems to break FunctionalTestSetup?

2010-07-14 Thread Guilherme Salgado
Hi there,

I've just tried running the tests on a freshly built zope.app.apidoc
tree and got the following error, while all tests pass fine when using
3.9.5. 

Error in test testMenu
(zope.app.apidoc.zcmlmodule.tests.ZCMLModuleTests)
Traceback (most recent call last):
  File "/usr/lib/python2.6/unittest.py", line 270, in run
self.setUp()
  File

"/home/salgado/.buildout/eggs/zope.app.testing-3.7.5-py2.6.egg/zope/app/testing/functional.py",
 line 391, in setUp
FunctionalTestSetup().setUp()
  File

"/home/salgado/.buildout/eggs/zope.app.testing-3.7.5-py2.6.egg/zope/app/testing/functional.py",
 line 288, in setUp
for name in self._database_names
  File

"/home/salgado/.buildout/eggs/zope.app.appsetup-3.14.0-py2.6.egg/zope/app/appsetup/appsetup.py",
 line 213, in multi_database
db = factory.open()
  File

"/home/salgado/.buildout/eggs/zope.app.testing-3.7.5-py2.6.egg/zope/app/testing/functional.py",
 line 160, in open
return DB(self.storage, database_name=self.name)
  File

"/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/DB.py",
 line 454, in __init__
temp_storage.load(z64, '')
  File

"/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/DemoStorage.py",
 line 158, in load
return self.base.load(oid, version)
  File

"/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/DemoStorage.py",
 line 156, in load
return self.changes.load(oid, version)
  File

"/home/salgado/.buildout/eggs/ZODB3-3.10.0b2-py2.6-linux-x86_64.egg/ZODB/utils.py",
 line 252, in __call__
precondition.__doc__.strip())
AssertionError: ('Failed precondition: ', 'The storage is open')

I don't have time/knowledge to debug this further, but I thought I
should let you know anyway.

Cheers,

-- 
Guilherme Salgado 



signature.asc
Description: This is a digitally signed message part
___
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 released 3.10.0b2 this morning

2010-07-14 Thread Jim Fulton
On Wed, Jul 14, 2010 at 1:33 AM, Christian Theune  wrote:
> Morning,
>
> On 07/13/2010 09:11 PM, Jim Fulton wrote:
>> I need to get back to finishing 3.10. :)
>
> Heh. Are any particular bugs you'd like to get solved? Today is a bug
> day and I might look at one or two.

Not really.  I plan to just work my way through the bug list.

It got a lot larger recently when someone moved a bunch of
reports from the Zope 2 lists.  A lot of these bugs are obsolete.

Jim

-- 
Jim Fulton
___
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