Re: [Zope-dev] Refresh makes all imported modules = None

2002-06-03 Thread Florent Guillaume

Shane Hathaway  <[EMAIL PROTECTED]> wrote:
> William Trenker wrote:
> > Lennart Regebro wrote:
> > 
> >> Suddenly when I refresh products it seems that all imported modules in 
> >> the refreshed product are set to None, because after a refresh, 
> >> anything I try to do always ends up with an error message like "None 
> >> has no attribute foobar" or "None is not callable",
> > 
> > 
> > I get this problem too (specifically, "None is not callable").  I've had 
> > to solve it by brute force -- shutting down Zope and restarting.  (Zope 
> > 2.5.1 (binary release, python 2.1, win32-x86), python 2.1.3, win32)  
> > After the restart, the product works fine.
> 
> This happens when you create references to the product outside the 
> product.  Most Zope products don't need to.  Those that do (like 
> CallProfiler and other monkey patch products) should not be considered 
> refreshable.

It happens to me also. I have a product who uses as a base class
something defined in another product. When I refresh the second product,
I have to refresh the first one afterwards.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:[EMAIL PROTECTED]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Refresh makes all imported modules = None

2002-06-03 Thread Shane Hathaway

William Trenker wrote:
> At 09:36 AM 6/3/02 -0400, Shane Hathaway wrote:
> 
>> Are you working with products that use the old style [of product 
>> initialization]?  Are they still around? ;-)
> 
> 
> I'm developing a Zope Database Adapter (DA) for the SQLite 
> (http://www.hwaci.com/sw/sqlite) embedded database.  Although a DA isn't 
> a Product in the usual sense, the front-end is registered like a product 
> and has a Management interface.
> 
> I've noticed that existing DA's that I'm studying for reference, 
> including DCOracle2, don't use the "new" method of Product 
> initialization / registration.  Are DA's considered "monkey patch" 
> products?  Is it possible to use the Refresh feature during development 
> of a DA?

Ah, good point.  I don't know whether it's possible.  You probably 
shouldn't maintain an open connection to the database durng refresh.

Shane



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Refresh makes all imported modules = None

2002-06-03 Thread William Trenker

At 09:36 AM 6/3/02 -0400, Shane Hathaway wrote:
>Are you working with products that use the old style [of product 
>initialization]?  Are they still around? ;-)

I'm developing a Zope Database Adapter (DA) for the SQLite 
(http://www.hwaci.com/sw/sqlite) embedded database.  Although a DA isn't a 
Product in the usual sense, the front-end is registered like a product and 
has a Management interface.

I've noticed that existing DA's that I'm studying for reference, including 
DCOracle2, don't use the "new" method of Product initialization / 
registration.  Are DA's considered "monkey patch" products?  Is it possible 
to use the Refresh feature during development of a DA?

Thanks,
Bill
http://pysqlite.sourceforge.net



--
"The commandments of the LORD are right, bringing joy to the heart. The 
commands of the LORD are clear, giving insight to life . . . For this is 
the love of God, that we keep His commandments. And His commandments are 
not burdensome." (Psalm 19:8, 1John 
5:3)torahteacher.com



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.363 / Virus Database: 201 - Release Date: 5/21/02



Re: [Zope-dev] Refresh makes all imported modules = None

2002-06-03 Thread Shane Hathaway

William Trenker wrote:
> Lennart Regebro wrote:
> 
>> Suddenly when I refresh products it seems that all imported modules in 
>> the refreshed product are set to None, because after a refresh, 
>> anything I try to do always ends up with an error message like "None 
>> has no attribute foobar" or "None is not callable",
> 
> 
> I get this problem too (specifically, "None is not callable").  I've had 
> to solve it by brute force -- shutting down Zope and restarting.  (Zope 
> 2.5.1 (binary release, python 2.1, win32-x86), python 2.1.3, win32)  
> After the restart, the product works fine.

This happens when you create references to the product outside the 
product.  Most Zope products don't need to.  Those that do (like 
CallProfiler and other monkey patch products) should not be considered 
refreshable.

> I have searched the documentation and zope.org but am having trouble 
> finding the requirements for using Refresh (other than I know that the 
> product directory has to have a refresh.txt file in it).
> 
> Is it required that the product use the "new" method of product 
> initialization, i.e.:
> def initialize(context):
> context.registerClass(

Are you working with products that use the old style?  Are they still 
around? ;-)

Shane



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Refresh makes all imported modules = None

2002-06-02 Thread William Trenker

Lennart Regebro wrote:
>Suddenly when I refresh products it seems that all imported modules in the 
>refreshed product are set to None, because after a refresh, anything I try 
>to do always ends up with an error message like "None has no attribute 
>foobar" or "None is not callable",

I get this problem too (specifically, "None is not callable").  I've had to 
solve it by brute force -- shutting down Zope and restarting.  (Zope 2.5.1 
(binary release, python 2.1, win32-x86), python 2.1.3, win32)  After the 
restart, the product works fine.

I have searched the documentation and zope.org but am having trouble 
finding the requirements for using Refresh (other than I know that the 
product directory has to have a refresh.txt file in it).

Is it required that the product use the "new" method of product 
initialization, i.e.:
def initialize(context):
 context.registerClass(
etc.

Thanks,
Bill



--
"The commandments of the LORD are right, bringing joy to the heart. The 
commands of the LORD are clear, giving insight to life . . . For this is 
the love of God, that we keep His commandments. And His commandments are 
not burdensome." (Psalm 19:8, 1John 
5:3)torahteacher.com



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.363 / Virus Database: 201 - Release Date: 5/21/02



Re: [Zope-dev] Refresh makes all imported modules = None

2002-06-02 Thread Lennart Regebro

From: "Adrian Hungate" <[EMAIL PROTECTED]>
> I've seen this under 2.5.0, but I don't recall seeing it under 2.3.x or
> 2.4.x

 Any ideas to why it's happening? (I'm using Zope 2.5.1).





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Refresh makes all imported modules = None

2002-06-02 Thread Adrian Hungate

I've seen this under 2.5.0, but I don't recall seeing it under 2.3.x or
2.4.x

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

"All programs evolve until they can send email. Except Microsoft Exchange."
   -- alt.sysadmin.recovery

- Original Message -
From: "Lennart Regebro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 01, 2002 4:21 PM
Subject: [Zope-dev] Refresh makes all imported modules = None


> Suddenly when I refresh products it seems that all imported modules in the
> refreshed product are set to None, because after a refresh, anything I try
> to do always ends up with an error message like "None has no attribute
> foobar" or "None is not callable", and this always happend when I try to
> access something that is imported.
>
> Has anybody seen this?
>
> Zope 2.5.1/Python 2.1.3
>
>
> Best Regards
>
> Lennart Regebro
> Torped Strategi och Kommunikation AB
>
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Refresh makes all imported modules = None

2002-06-01 Thread Lennart Regebro

Suddenly when I refresh products it seems that all imported modules in the
refreshed product are set to None, because after a refresh, anything I try
to do always ends up with an error message like "None has no attribute
foobar" or "None is not callable", and this always happend when I try to
access something that is imported.

Has anybody seen this?

Zope 2.5.1/Python 2.1.3


Best Regards

Lennart Regebro
Torped Strategi och Kommunikation AB




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )