Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: DB

Error in Shared.ZRDB.Connection.__setstate__ in 2.9.4

 

 

Zope db RSS feed   Index | Next | Previous | View Threaded


charlie at egenix

Oct 16, 2006, 7:47 AM

Post #1 of 5 (1953 views)
Permalink
Error in Shared.ZRDB.Connection.__setstate__ in 2.9.4

Hi,

the following code will throw a key error on "error"

def __setstate__(self, state):
Globals.Persistent.__setstate__(self, state)
if self.connection_string:
try: self.connect(self.connection_string)
except:
logger.error('Error connecting to relational database.',
error=exc_info())

While I couldn't find any trace in the collector, I did see that this has
already been corrected in Zope 2.10.0

Is it still worth submitting the error?

def __setstate__(self, state):
Globals.Persistent.__setstate__(self, state)
if self.connection_string:
try: self.connect(self.connection_string)
except:
logger.error('Error connecting to relational database.',
exc_info=exc_info())

Charlie
--
Charlie Clark
eGenix.com

Professional Python Services directly from the Source
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
Try mxODBC.Zope.DA for Windows, Mac OS, Linux, Solaris, FreeBSD for free!
_______________________________________________
Zope-DB mailing list
Zope-DB [at] zope
http://mail.zope.org/mailman/listinfo/zope-db


chris at simplistix

Oct 16, 2006, 7:52 AM

Post #2 of 5 (1846 views)
Permalink
Re: Error in Shared.ZRDB.Connection.__setstate__ in 2.9.4 [In reply to]

Charlie Clark wrote:
> While I couldn't find any trace in the collector, I did see that this
> has already been corrected in Zope 2.10.0
>
> Is it still worth submitting the error?
>
> def __setstate__(self, state):
> Globals.Persistent.__setstate__(self, state)
> if self.connection_string:
> try: self.connect(self.connection_string)
> except:
> logger.error('Error connecting to relational database.',
> exc_info=exc_info())

And this is STILL wrong... FFS...

How hard is "exc_info=True" to grasp as a concept?

Chris

--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
_______________________________________________
Zope-DB mailing list
Zope-DB [at] zope
http://mail.zope.org/mailman/listinfo/zope-db


charlie at egenix

Oct 16, 2006, 7:55 AM

Post #3 of 5 (1843 views)
Permalink
Re: Error in Shared.ZRDB.Connection.__setstate__ in 2.9.4 [In reply to]

Am 16.10.2006, 16:52 Uhr, schrieb Chris Withers <chris [at] simplistix>:

> While I couldn't find any trace in the collector, I did see that this
> has already been corrected in Zope 2.10.0
> Is it still worth submitting the error?
> def __setstate__(self, state):
> Globals.Persistent.__setstate__(self, state)
> if self.connection_string:
> try: self.connect(self.connection_string)
> except:
> logger.error('Error connecting to relational database.',
> exc_info=exc_info())
> And this is STILL wrong... FFS...
> How hard is "exc_info=True" to grasp as a concept?

Don't shoot the messenger! I've hardly touched the logging module so I'll
plead ignorance (as well as stupidity ;-). But for 2.10 it is a big error
if zLog is officially being deprecated. I'll submit a bug.

Charlie

--
Charlie Clark
eGenix.com

Professional Python Services directly from the Source
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
Try mxODBC.Zope.DA for Windows, Mac OS, Linux, Solaris, FreeBSD for free!
_______________________________________________
Zope-DB mailing list
Zope-DB [at] zope
http://mail.zope.org/mailman/listinfo/zope-db


chris at simplistix

Oct 16, 2006, 8:30 AM

Post #4 of 5 (1832 views)
Permalink
Re: Error in Shared.ZRDB.Connection.__setstate__ in 2.9.4 [In reply to]

Charlie Clark wrote:
>> And this is STILL wrong... FFS...
>> How hard is "exc_info=True" to grasp as a concept?
>
> Don't shoot the messenger!

Don't worry, that wasn't aimed at you ;-)

> I've hardly touched the logging module so
> I'll plead ignorance (as well as stupidity ;-). But for 2.10 it is a big
> error if zLog is officially being deprecated. I'll submit a bug.

zLOG is gone, this shouldn't have been a big deal, but it would have
been nice had whoever did the global search'n'replace to use the logging
module instead of the zLOG module had bothered to rtfm first.

It would have been even nicer had whoever fixed the original bug
bothered to rtfm as well...

*sigh*

Chris

--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
_______________________________________________
Zope-DB mailing list
Zope-DB [at] zope
http://mail.zope.org/mailman/listinfo/zope-db


charlie at egenix

Oct 16, 2006, 8:43 AM

Post #5 of 5 (1850 views)
Permalink
Re: Error in Shared.ZRDB.Connection.__setstate__ in 2.9.4 [In reply to]

Am 16.10.2006, 17:30 Uhr, schrieb Chris Withers <chris [at] simplistix>:

> Don't worry, that wasn't aimed at you I've hardly touched the logging
> module so I'll plead ignorance (as well as stupidity ;-). But for 2.10
> it is a big error if zLog is officially being deprecated. I'll submit a
> bug.
> zLOG is gone, this shouldn't have been a big deal, but it would have
> been nice had whoever did the global search'n'replace to use the logging
> module instead of the zLOG module had bothered to rtfm first.
> It would have been even nicer had whoever fixed the original bug
> bothered to rtfm as well...

Oops, I submitted a duplicate bug (I did try looking beforehand) which has
been rejected "as already fixed" - it certainly isn't in the 2.10 which
can be downloaded. Will this automatically get the change which _has_ been
made to trunk?

Charlie
--
Charlie Clark
eGenix.com

Professional Python Services directly from the Source
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
Try mxODBC.Zope.DA for Windows, Mac OS, Linux, Solaris, FreeBSD for free!
_______________________________________________
Zope-DB mailing list
Zope-DB [at] zope
http://mail.zope.org/mailman/listinfo/zope-db

Zope db RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.