[Zope-dev] Re: [Zope-Coders] Proposal: put i18n into 2.6

2002-09-18 Thread Lennart Regebro

From: Florent Guillaume [EMAIL PROTECTED]
 As Jim said, If we want to get this into 2.6, we need to move quickly.

I want it in. It's so amazingly useful, that I want it. 2.6 is moving so
slow anyway, that I don't see it as a big problem.

Best Regards

Lennart Regebro, Torped
http://www.easypublisher.com/


___
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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Lennart Regebro

Once again I have the problem that all references to imported
modules/objects/whatever dissapear when refreshing.

It seems like sometimes some modules are not refreshed, even though they
really are. Could it be that not all modules are properly purged from
memory, and then when Zope core calls our newly refreshed system, it calls
old versions of the modules, which now have lost all connection to the outer
world, since they no longer exist?

Or what?

Having to restart each time I make a change is slowing down my development
to a complete halt. I don't have time with this, PLEASE I need all help I
can get. Any stupid ideas or thoughts are welcome. I HAVE to fix this.

Best Regards

Lennart Regebro, Torped
http://www.easypublisher.com/


___
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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Shane Hathaway

Lennart Regebro wrote:
 Once again I have the problem that all references to imported
 modules/objects/whatever dissapear when refreshing.
 
 It seems like sometimes some modules are not refreshed, even though they
 really are. Could it be that not all modules are properly purged from
 memory, and then when Zope core calls our newly refreshed system, it calls
 old versions of the modules, which now have lost all connection to the outer
 world, since they no longer exist?

Known bug, no known way to fix it, sorry.  Objects created from the old 
modules that stick around after refresh will suddenly be bound to the 
module None.  You're likely to run into this if your product does 
anything more than simply define and register classes that derive from 
SimpleItem.  However, there are ways to get around this, though they are 
all very dependent on your particular code.  Which of the following are 
you doing?

- Using threads (other than the way Zope uses them)

- Opening independent database connections

- Making one product depend on another using import statements

- Storing a module-level cache

- Monkey-patching

- others...?

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 )



[Zope-dev] Re: [Zope-Coders] Proposal: put i18n into 2.6

2002-09-18 Thread James Johnson

We had to wait this long, why not wait for a bit longer.  I just hope it 
doesn't give some the excuse to drag it on more.  That was one of the things 
I loved about Zope was Release Early/often mantra.  Now with the 2.6 dabacle 
lasting over 3 months.  This better not happen again people :-)  We already 
know how some people get uneasy when I project starts to languish for 
months. It only hurts the opensource movement.


Peace,
-- James



From: Florent Guillaume [EMAIL PROTECTED]
As Jim said, If we want to get this into 2.6, we need to move quickly.

I want it in. It's so amazingly useful, that I want it. 2.6 is moving so
slow anyway, that I don't see it as a big problem.

Best Regards

Lennart Regebro, Torped
http://www.easypublisher.com/




Peace,
-- James
I am a Washington State Citizen.
Spamming this Email Address may be against Washington State Law
Chapter 19.86, and 19.190 RCW. http://www.wa.gov/ago/junkemail/protect.html


_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


___
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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Florent Guillaume

Shane Hathaway  [EMAIL PROTECTED] wrote:
 - Making one product depend on another using import statements

I'm doing that, and I observe the problem Lennart is describing (objects
turning into None). Any idea for a workaround?

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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Lennart Regebro

From: Shane Hathaway [EMAIL PROTECTED]
 You're likely to run into this if your product does
 anything more than simply define and register classes that derive from
 SimpleItem.

Strangely enough we do this all the time, but we only get problems with the
core EasyPublisher products.

 Which of the following are you doing?

 - Making one product depend on another using import statements
 - Monkey-patching
 - Storing a module-level cache

The we of course do tons of semi-magick things, but these we typically do in
products that we don't have any problems with. :-)

Best Regards

Lennart Regebro, Torped
http://www.easypublisher.com/



___
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] Re: [Zope-Coders] Proposal: put i18n into 2.6

2002-09-18 Thread Lennart Regebro

From: James Johnson [EMAIL PROTECTED]
 We had to wait this long, why not wait for a bit longer.  I just hope it
 doesn't give some the excuse to drag it on more.  That was one of the
things
 I loved about Zope was Release Early/often mantra.  Now with the 2.6
dabacle
 lasting over 3 months.  This better not happen again people :-)  We
already
 know how some people get uneasy when I project starts to languish for
 months. It only hurts the opensource movement.

True. But in true XP fashion, each release could simply contain the features
that are finished. And if this i18n is finished, then it can be included. I
think that would also prevent some drag, because now we decided on which
features should be included, and several of them wasn't finished.


Best Regards

Lennart Regebro, Torped
http://www.easypublisher.com/


___
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] Re: [Zope-Coders] Proposal: put i18n into 2.6

2002-09-18 Thread Casey Duncan

Truth is that the Zope code has done anything but languish in the last few 
months. Unfortunately most people are bound by our release cycle, which has 
given that impression.

As for i18n in 2.6, The Zope Pope gave the nod, so I consider it a done deal, 
assuming it gets checked in.

-Casey

On Wednesday 18 September 2002 11:43 am, James Johnson wrote:
 We had to wait this long, why not wait for a bit longer.  I just hope it 
 doesn't give some the excuse to drag it on more.  That was one of the things 
 I loved about Zope was Release Early/often mantra.  Now with the 2.6 dabacle 
 lasting over 3 months.  This better not happen again people :-)  We already 
 know how some people get uneasy when I project starts to languish for 
 months. It only hurts the opensource movement.
 
 
 Peace,
 -- James
 
 
 
 From: Florent Guillaume [EMAIL PROTECTED]
 As Jim said, If we want to get this into 2.6, we need to move quickly.
 
 I want it in. It's so amazingly useful, that I want it. 2.6 is moving so
 slow anyway, that I don't see it as a big problem.
 
 Best Regards
 
 Lennart Regebro, Torped
 http://www.easypublisher.com/
 
 
 
 
 Peace,
 -- James
 I am a Washington State Citizen.
 Spamming this Email Address may be against Washington State Law
 Chapter 19.86, and 19.190 RCW. http://www.wa.gov/ago/junkemail/protect.html


___
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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Shane Hathaway

Lennart Regebro wrote:
 From: Shane Hathaway [EMAIL PROTECTED]
 
You're likely to run into this if your product does
anything more than simply define and register classes that derive from
SimpleItem.
 
 
 Strangely enough we do this all the time, but we only get problems with the
 core EasyPublisher products.
 
 
Which of the following are you doing?

- Making one product depend on another using import statements
- Monkey-patching
- Storing a module-level cache
 
 
 The we of course do tons of semi-magick things, but these we typically do in
 products that we don't have any problems with. :-)

The first thing you need to make sure you do is set up dependencies.  If 
FooProduct imports EasyPublisher, set FooProduct to be auto-refreshable, 
then visit EasyPublisher and specify the dependency.  Then, every time 
EasyPublisher gets refreshed, FooProduct will be refreshed immediately 
after.

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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Toby Dickenson

On Wednesday 18 Sep 2002 4:23 pm, Lennart Regebro wrote:

 Having to restart each time I make a change is slowing down my development
 to a complete halt. 

Something is wrong here. You should be able to restart Zope within a few 
seconds.

Are you using FileStorage? I guess you are not shutting Zope down cleanly. An 
unclean shutdown means FileStorage needs to rebuild its in-memory index at 
the next startup, which is a slow process.

Even with a clean shutdown that preserves the index, startup can be slower if 
your database is huge. Using ZEO eliminates this.



___
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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Lennart Regebro

From: Shane Hathaway [EMAIL PROTECTED]
 The first thing you need to make sure you do is set up dependencies.  If
 FooProduct imports EasyPublisher, set FooProduct to be auto-refreshable,
 then visit EasyPublisher and specify the dependency.  Then, every time
 EasyPublisher gets refreshed, FooProduct will be refreshed immediately
 after.

Of course. I can refresh every product in the universe, but it doens't help.
:-)
The code called is still old, non-refreshed, and has all imports set to
None.

Best Regards

Lennart Regebro, Torped
http://www.easypublisher.com/


___
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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Lennart Regebro

A new idea:

Could the problem appear when you have circular product imports, i.e.:

In Product.ProductA.ProductA.py:
from Product.ProductB.SupportModule import Supportmodule

In Product.ProductB.ProductB.py:
from Product.ProductB.AnotherModule import AnotherModule

Maybe the refresh gets confused by this?

Best Regards

Lennart Regebro, Torped
http://www.easypublisher.com/



___
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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Shane Hathaway

Lennart Regebro wrote:
 A new idea:
 
 Could the problem appear when you have circular product imports, i.e.:
 
 In Product.ProductA.ProductA.py:
 from Product.ProductB.SupportModule import Supportmodule
 
 In Product.ProductB.ProductB.py:
 from Product.ProductB.AnotherModule import AnotherModule


I assume you mean ProductA here.

 Maybe the refresh gets confused by this?

It might.  In general, it's not a good thing to have circular imports in 
your code anyway, since it's brittle.

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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Leonardo Rochael Almeida

On Wed, 2002-09-18 at 13:09, Toby Dickenson wrote:
 On Wednesday 18 Sep 2002 4:23 pm, Lennart Regebro wrote:
 
  Having to restart each time I make a change is slowing down my development
  to a complete halt. 
 
 Something is wrong here. You should be able to restart Zope within a few 
 seconds.
 
 Are you using FileStorage? I guess you are not shutting Zope down cleanly. An 
 unclean shutdown means FileStorage needs to rebuild its in-memory index at 
 the next startup, which is a slow process.
 
 Even with a clean shutdown that preserves the index, startup can be slower if 
 your database is huge. Using ZEO eliminates this.

True! I had a Zope with a Huge Data.fs that took up to 5 mins to
(re)start. With ZEO, this time dropped to between 2 and 10 secs.

I highly recommend ZEO for development. It's great for debugging too,
when you have to freeze debug Zope (i.e. inside pdb or gdb), you can
keep another ZEO client running.

Cheers, Leo

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.


___
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] PANIC!!! That old refresh bug again.

2002-09-18 Thread Lennart Regebro

From: Shane Hathaway [EMAIL PROTECTED]
 I assume you mean ProductA here.

Yes.

 It might.  In general, it's not a good thing to have circular imports in
 your code anyway, since it's brittle.

They are not circular on a module-level, just on a product level, and
indeed, it seems to help to factor out the common modules to a third
product. :-)

Best Regards

Lennart Regebro, Torped
http://www.easypublisher.com/


___
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] persistence and lists

2002-09-18 Thread Arndt Droullier


Hello,
I´m working on a product which contains custom data in a list of multiple
dictionaries.
How can I save the list/dictionaries after changes? Persistence is enabled
(and works for other types), and _p_changed is set, also
get_transaction().commit() is called.

A second problem is that multiple instances of the product reference the
same list. So if I change the list of one of the instances the other
changes,
too.
The list and dictionaries are stored in a class variable(in the product)
and not global.

Thanks, Arndt.

___
DV electric [EMAIL PROTECTED] http://www.dvelectric.com
Fon 0221/2725782Fax 0221/2725783  Burgmauer 20,  50667 Köln
___


___
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] persistence and lists

2002-09-18 Thread Casey Duncan

Sounds like you are trying to persist a class attribute value. This is not 
possible because instance are persistent, not classes. This is also the 
reason that the values change over all the instances. You are changing a 
mutable attribute of the class in place.

I would suggest setting the value in the constructor of your objects, to make 
sure it is an instance attribute rather than a class attr.

This:

class foo:
   def __init__(self):
   self.alist = []

   def append(self ,v)
   self.alist.append(v) # changes instance attr
   self._p_changed = 1 # will work

Instead of:

class foo:
alist = []

def append(self ,v)
self.alist.append(v) # changes class(!) attr
self._p_changed = 1 # Will not work, the instance was not changed!

hth,

Casey

On Wednesday 18 September 2002 03:27 pm, Arndt Droullier wrote:
 Hello,
 I´m working on a product which contains custom data in a list of multiple
 dictionaries.
 How can I save the list/dictionaries after changes? Persistence is enabled
 (and works for other types), and _p_changed is set, also
 get_transaction().commit() is called.
 
 A second problem is that multiple instances of the product reference the
 same list. So if I change the list of one of the instances the other
 changes,
 too.
 The list and dictionaries are stored in a class variable(in the product)
 and not global.
 
 Thanks, Arndt.
 
 ___
 DV electric [EMAIL PROTECTED] http://www.dvelectric.com
 Fon 0221/2725782Fax 0221/2725783  Burgmauer 20,  50667 Köln
 ___



___
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] persistence and lists

2002-09-18 Thread Lennart Regebro

From: Arndt Droullier [EMAIL PROTECTED]
 How can I save the list/dictionaries after changes?

The easiest thing to do is to is to use PersistentMapping and
PersistentList.
Create them in __init__ with self.dictionary = PersistentMapping() instead
of setting them as a class attribute.



___
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] Plone, PageTemplates and Zope2.6

2002-09-18 Thread alan runyan

using chrism-install-branch and caring much less than
I have in my past life - I have run ab against Plone
in Zope2.6.  It appears that Zope2.6 is significantly 
slower than Zope2.5.1.  I ran ab from my Windows 
XP machine on a local network.

300Mhz Celeron w/ 256MB RAM

Zope2.5.1 Python 2.1.3
ab -n 10 http://mysite/plone
1.30 Requests per second

Zope2.6 Python 2.1.3
ab -n 10 http://mysite/plone
0.87 Requests per second

I ran the tests a few times and picked the highest number.
In both 2.5.1 and 2.6 the target cache setting is higher
than 4000 (and I am only requesting the first plone page). 

Also Andy McKay did some quick benchmarks using
a simplified PageTemplate skin and he is getting ugly results 
(he is migrating from DTML to PageTempaltes).

cheers,
~runyaga



___
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] Taking over PHParser

2002-09-18 Thread Wei He

Hi,

I've seen you announcement. Too bad you quit. :)
But to me, the mission integrating PHP and Zope never seems to 
finish. Especially when Zend 2's coming out. I would 
expect to see someday a product like Script(PHP) to appear.

Anyway, I would like to take over PHParser under the
same name. And publish the patches I sent you over the past few days.

Can you or someone give me some ideas, according to previous
like instances, how to do that: Create a new member/product space
or just simply use your existing one?

Thanks for your product again.

Best,

Wei He



___
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 )