[Zope-Checkins] SVN: Zope/branches/2.10/setup.py Forward-port out-of-tree build fix.

2006-09-05 Thread Tres Seaver
Log message for revision 69979:
  Forward-port out-of-tree build fix.

Changed:
  U   Zope/branches/2.10/setup.py

-=-
Modified: Zope/branches/2.10/setup.py
===
--- Zope/branches/2.10/setup.py 2006-09-05 17:37:23 UTC (rev 69978)
+++ Zope/branches/2.10/setup.py 2006-09-05 18:10:10 UTC (rev 69979)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.3
+#!/usr/bin/env python2.4
 
 ##
 #
@@ -49,7 +49,8 @@
 from distutils.command.install_data import install_data
 from distutils.util import convert_path
 
-sys.path.insert(0, 'inst')
+where = os.path.split(__file__)[0]
+sys.path.insert(0, os.path.join(where, 'inst'))
 import versions
 del sys.path[0]
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-dev] Re: I am starting to hate Zope/Plone development and its bl**dy lack of refresh.

2006-09-05 Thread Max M

Max M wrote:


I am not sure what is causing the problems. I am mostly a developer of
end user tools. Not a core Zope/Plone developer. And I am not really
interested in becoming one either. There must be a niche for developers 
like me that focus on end users.



Well ok. I have researched a bit more. All the speedup suggestions gave 
at maximum 5-10 seconds. Not nearly enough. (Didn't try to buy a new 
computer though. Will do that next week ;-)


I also tried to run Zope as a zeo client from a usb flash disk.

As expected the initial compilation to byte code was slw. I then 
expected it to run fast after that. It didn't!

*clever* configuration clearly wasn't clever enough for me.


So I made a site with a standard Zope tool:

class simple_tool(UniqueObject, PropertyManager,
   SimpleItem.SimpleItem, ActionProviderBase):


And I added a simple Plone skin.

Now refresh worked like a charm. Both when changing the code in the tool 
and the page templates in the skin.


So the problem only exists for me in Archetype based products. Anytime I 
do a change in any AT content type I need to restart the site.


Can anybody confirm this behavior?


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


I'm starting to get bored of people complaining about Zope (was: Re: [Zope-dev] Re: I am starting to hate Zope/Plone development and its bl**dy lack of refresh.)

2006-09-05 Thread Sidnei da Silva
On Tue, Sep 05, 2006 at 03:39:14PM +0200, Max M wrote:
| So the problem only exists for me in Archetype based products. Anytime I 
| do a change in any AT content type I need to restart the site.
| 
| Can anybody confirm this behavior?

That's a known-(at least to me)-issue. 

   When you refresh an Archetypes-based product you need to refresh
   Archetypes as well. You can do this by marking the product as
   dependent on Archetypes and then refresh Archetypes (which will
   refresh it's dependencies, refreshing your product).

If you don't know what I'm talking about go research more about the
refresh functionality in Zope 2.

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: I'm starting to get bored of people complaining about Zope

2006-09-05 Thread Max M

Sidnei da Silva wrote:

On Tue, Sep 05, 2006 at 03:39:14PM +0200, Max M wrote:
| So the problem only exists for me in Archetype based products. Anytime I 
| do a change in any AT content type I need to restart the site.
| 
| Can anybody confirm this behavior?


That's a known-(at least to me)-issue. 


   When you refresh an Archetypes-based product you need to refresh
   Archetypes as well. You can do this by marking the product as
   dependent on Archetypes and then refresh Archetypes (which will
   refresh it's dependencies, refreshing your product).


I have tried that. It doesn't work.


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: I am starting to hate Zope/Plone development and its bl**dy lack of refresh.

2006-09-05 Thread Lennart Regebro

One problem with fixing the refresh is that the more you fix, the
longer the refresh will take. To fix Five to be stable in refresh, we
may very well have to kill all things registered by ZCML, and
re-register all of it. It's highly unlikely that we get a real stable
refresh by just refreshing one products ZCML. What happens if there
are overrides, and so on.

So, in the end, you end up with refreshing everything, which would
take just as long as stopping and starting the ZEO client.

We can probably make it possible to make the refresh somewhat more
stable and support a wider range of cases. But you still have to make
very careful configuration of the refresh in most of this cases, and
if you don't do it just right, it won't work.

So I'm not sure it's worth the effort.

Doing tests is a good idea especially if you take a bit of care. The
calendar products I'm working on have that care taken automatically,
as it's split into three products, one pure python, one Zope layer
with the persistance and UI and one CPS integration. Most tests are on
the python product, or the Zope product. The python tests take 0.8
seconds to run, the Zope tests 4 seconds.

With CPS it gets worse, because the tests need to create a CPS site.
It's the same with Plone. In those cases tests will not be faster than
refreshing. Running all of them takes a bit less than a minute I
think, and running just one isn't that much faster. But the amount of
tests needed there is very low, as most is done on the CalCore and
CalZope layer.

This way development is pretty fast, and doesn't need much refreshing.
Then comes a part where you need to get it to actually work, and not
just pass the tests. Here you need to refresh a bit. And then most of
the work is UI-fixing, which doesn't need refresh again, because it's
mostly HTML.

I find this mode of development faster than when I had working
refresh, beause the existance of the tests stop me from shooting my
foot. ;)
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] buildbot failure in Zope branches 2.10 2.4 Linux zc-buildbot

2006-09-05 Thread buildbot
The Buildbot has detected a failed build of Zope branches 2.10 2.4 Linux 
zc-buildbot.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7427
Blamelist: ctheune,jim,jukart,shh

BUILD FAILED: failed svn

sincerely,
 -The Buildbot

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


[Zope-dev] buildbot failure in Zope branches 2.9 2.4 Linux zc-buildbot

2006-09-05 Thread buildbot
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Linux 
zc-buildbot.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7427
Blamelist: shh

BUILD FAILED: failed svn

sincerely,
 -The Buildbot

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


[Zope-dev] buildbot failure in Zope trunk 2.4 Linux zc-buildbot

2006-09-05 Thread buildbot
The Buildbot has detected a failed build of Zope trunk 2.4 Linux zc-buildbot.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7428
Blamelist: andreasjung,ctheune,jim,jukart,shh

BUILD FAILED: failed svn

sincerely,
 -The Buildbot

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


[Zope-dev] buildbot failure in Zope trunk 2.4 Windows 2000 zc-bbwin6

2006-09-05 Thread buildbot
The Buildbot has detected a failed build of Zope trunk 2.4 Windows 2000 
zc-bbwin6.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7428
Blamelist: andreasjung

BUILD FAILED: failed compile

sincerely,
 -The Buildbot

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


[Zope-dev] buildbot failure in Zope branches 2.9 2.4 Windows 2000 zc-bbwin2

2006-09-05 Thread buildbot
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Windows 2000 
zc-bbwin2.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7427
Blamelist: shh

BUILD FAILED: failed compile

sincerely,
 -The Buildbot

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


[Zope-dev] buildbot failure in Zope branches 2.10 2.4 Windows 2000 zc-bbwin2

2006-09-05 Thread buildbot
The Buildbot has detected a failed build of Zope branches 2.10 2.4 Windows 2000 
zc-bbwin2.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7427
Blamelist: ctheune,jim,jukart,shh

BUILD FAILED: failed compile

sincerely,
 -The Buildbot

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


Re: [Zope-dev] Re: I'm starting to get bored of people complaining about Zope

2006-09-05 Thread Sidnei da Silva
On Tue, Sep 05, 2006 at 04:34:14PM +0200, Max M wrote:
| I have tried that. It doesn't work.

Maybe you didn't try hard enough. This has always worked for me.

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] buildbot failure in Zope branches 2.9 2.4 Linux zc-buildbot

2006-09-05 Thread buildbot
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Linux 
zc-buildbot.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7469
Blamelist: 
alga,andreasjung,flox,gintautasm,jukart,mgedmin,oestermeier,poster,shh,srichter,tseaver

BUILD FAILED: failed svn

sincerely,
 -The Buildbot

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


[Zope-dev] buildbot failure in Zope branches 2.9 2.4 Windows 2000 zc-bbwin2

2006-09-05 Thread buildbot
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Windows 2000 
zc-bbwin2.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7469
Blamelist: 
alga,andreasjung,flox,gintautasm,jukart,mgedmin,oestermeier,poster,shh,srichter,tseaver

BUILD FAILED: failed compile

sincerely,
 -The Buildbot

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


[Zope-dev] buildbot failure in Zope branches 2.10 2.4 Windows 2000 zc-bbwin2

2006-09-05 Thread buildbot
The Buildbot has detected a failed build of Zope branches 2.10 2.4 Windows 2000 
zc-bbwin2.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7470
Blamelist: 
alga,andreasjung,flox,gintautasm,jukart,mgedmin,oestermeier,poster,shh,srichter,tseaver

BUILD FAILED: failed compile

sincerely,
 -The Buildbot

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


Re: I'm starting to get bored of people complaining about Zope (was: Re: [Zope-dev] Re: I am starting to hate Zope/Plone development and its bl**dy lack of refresh.)

2006-09-05 Thread Dieter Maurer
Sidnei da Silva wrote at 2006-9-5 10:46 -0300:
 ...
That's a known-(at least to me)-issue. 

   When you refresh an Archetypes-based product you need to refresh
   Archetypes as well. You can do this by marking the product as
   dependent on Archetypes and then refresh Archetypes (which will
   refresh it's dependencies, refreshing your product).

If you don't know what I'm talking about go research more about the
refresh functionality in Zope 2.

We are refreshing AT contents types without a need to refresh AT
itself (in Zope 2.8.1, AT 1.3.x).



-- 
Dieter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Documentation on get_transaction().commit(...)

2006-09-05 Thread zope-dev

Where would I find API documentation on get_transaction().commit(...)?

I am calling get_transaction().commit(1) at various points in my program
and it seems like it's not actually committing those transactions.

I'd be grateful on a quick explanation for how this works.

I'd like to commit sub-transactions as I go, but I don't want to stop
the execution of the script (without the 1, it seems to arrest
execution).  I do not care about the ability to roll back the
transaction.

Best,
Brian

Brian Rosenthal
General Partner, RoboCommerce, LLC
[EMAIL PROTECTED]
http://www.robocommerce.com
800-644-7626

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


[Zope-dev] get_transaction().commit() stops execution

2006-09-05 Thread zope-dev

In my custom Zope Product (in python), get_transaction().commit() halts
execution (without throwing an exception).

Is this the proper behavior?

If it is, then how do you commit what you've done so far without halting
execution?
And, if not, what would cause it to halt execution?

Thank you in advance,
Brian

Brian Rosenthal
General Partner, RoboCommerce, LLC
[EMAIL PROTECTED]
http://www.robocommerce.com
800-644-7626

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


Re: [ZWeb] Re: website design discussion

2006-09-05 Thread Martijn Faassen

Tom Von Lahndorff wrote:


semi-stretchable

Would be nice if IE supported min-width and max-width in css. It 
doesn't. The only way I've seen anyone get that to work in IE is with 
some nasty javascript hack. We can keep going down this road though, 
fine with me. We'll be here for literally weeks and months going through 
all of the pros and cons of fixed vs. fluid layouts that have been 
debated for years. There is no right answer.


I'm not out to discuss this stuff for weeks and months at all, I'm just 
asking fairly reasonable questions from the perspective of someone who 
doesn't know much about the intricacies of web site layouts. To answer 
my own question, it's clear from your response it *is* very difficult to 
make it semi stretchable, so we will let it be for now. We can always 
come back to it later.


[snip]
p.p.s. I will be working on the Linux rendering issues which is actually 
a good example of the real challenges with web design. Getting a 
standards based site to look good on IE an Firefox on a PC is a 
(nightmarish at times) challenge alone (mostly thanks to IE's lack of 
standards support). Getting it to work on every browser on every OS and 
look good is a boatload of work. My focus is to do just that while 
keeping the html and css *clean* and free of hacks and javascript as 
much as possible. Also, keeping the html reusable to easily implement 
future design changes and as maintenance free as possible.


I'm surprised Firefox on linux is so different from Firefox on other 
platforms.


[snip]

Right now the biggest problem that Zope, zope.org as well as other zope 
products/properties suffers from is useability and marketing. The least 
of any problems is what color the sites are, whether the pages are fluid 
or fixed width or whatever. The real problem is that no knows what Zope 
is, how it works or how to use the sites. 


Look, you're doing a web design and you can reasonably expect some 
feedback from people. It's not a complete disaster. Ranting about how 
terrible I am for asking a few simple questions is not very productive 
either. If something is hard to do or unwise, I'm sure it can be 
communicated in a way that's a little bit less confrontational. Sorry 
for the rant back. :)


Lets get past these basic design issues, get a test site up and running 
and start getting our hands dirty. Lets implement the html and css and 
then get down to brass tacks and start the *real* work of editorializing 
the content so that it's understandable to newcomers as well as 
veterans, making content easily accessible and clearly labeled, 
providing easy to use interfaces and functionality. 


This is exactly what I'm doing. I'm already editorializing content, it's 
just that nobody seems to be very interested in discussing *that* on 
this mailing list so far.


Anyway, quite apart from this mini-debate, I'm still grateful for your 
efforts, so thank you again.


Regards,

Martijn

___
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web


Re: [ZWeb] Zope Foundation Design 1 Version2

2006-09-05 Thread Lennart Regebro

I prefer the fluid layout from a visual perspective, and the fixed,
from a usability/readablity persepctive. Hence, I don't are which you
choose. :)

Stop bickering and Just Do It (tm). ;)
___
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web


Re: [ZWeb] Zope Foundation Design 1 Version2

2006-09-05 Thread Tom Von Lahndorff

+1

On Sep 5, 2006, at 6:31 AM, Lennart Regebro wrote:


I prefer the fluid layout from a visual perspective, and the fixed,
from a usability/readablity persepctive. Hence, I don't are which you
choose. :)

Stop bickering and Just Do It (tm). ;)


___
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web


Re: [Zope] Can't stop Zope, machine hanging

2006-09-05 Thread Ken Ara
One and a half days later, I am again unable to stop,
restart or kill Zope. My ISP host is making changes on
their network and I believe the problem is with them.
I am in a FreeBSD jail, sharing the machine with a DNS
server. It's 3am over there, and I wish I could do
something while waiting for them to wake up. Then, we
need to find out what is causing this problem.

Andreas, I figured out that the netstat -p option
required a protocol argument. So, 'netstat -anp TCP'
gives me a very long list of IPs trying to connect. It
does not display the pid of the hanging process, maybe
some other option would do, but the problem seems to
be a python2.3 process stuck in STOP state. I can't
kill it, and I can't even restart the machine with the
shutdown command.

Is there no alternative to physically restarting this
machine? While we are stuck, is there anything I can
do to diagnose the problem?

Thanks,
Ken


--- Dieter Maurer [EMAIL PROTECTED] wrote:

 Ken Ara wrote at 2006-9-2 23:43 -0700:
  ...
 I can't restart or stop Zope -
 '/usr/local/www/Zope/zope01/bin/zopectl stop' just
 produces '' for a long time - should I
 wait? I
 was unable to kill one of the python2.3 processes,
 and
 can't even reboot the machine, using 'shutdown -r
 now', as I have done previously in extremis.
 
 This indicates a severe problem with your operating
 system
 (or maybe your computer).
 
 There are situations where a press on the reset
 button is
 necessary. Looks like you are in such a situation...
 
 
 
 -- 
 Dieter
 



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] searching zope free hosting

2006-09-05 Thread Fabio Marcone

Hi to all!

I'm searching a zope free hosting to publish my homepage. Unfortunately 
freezope.org and objectis.net are unavailable.


is there another service like these?

Thanks in advance,
Fabio
--

Dott. Fabio Marcone

2T srl
Telefono+39 - 0871- 540154
Fax +39 - 0871- 571594
Email   [EMAIL PROTECTED]   
Indirizzo   Viale B. Croce 573
66013 Chieti Scalo (CH)
GNU/Linux registered user   #400424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Can't stop Zope, machine hanging

2006-09-05 Thread Chris Withers

Ken Ara wrote:

One and a half days later, I am again unable to stop,
restart or kill Zope. My ISP host is making changes on
their network and I believe the problem is with them.
I am in a FreeBSD jail, sharing the machine with a DNS
server. It's 3am over there, and I wish I could do
something while waiting for them to wake up. Then, we
need to find out what is causing this problem.


Move hosters. FreeBSD for all its robustness is not something I'd 
recommend running Zope on...



Is there no alternative to physically restarting this
machine? While we are stuck, is there anything I can
do to diagnose the problem?


You may have more luck on a FreeBSD list...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TinyTablesPlus How To??

2006-09-05 Thread Chris Withers

beno wrote:
Strange. I have version 0.9 and I could not find it! So, I just now 
downloaded a new copy and untarred it and there it was. Must have gotten 
deleted somehow.


You still alive? Damn... want some more rope?

As for Dennis Allison's comment, of course, I just want to know about 
this feature so I can add it to my toolbox :)


Don't bother with it, it is not what you want as a solution to any 
problem...


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] MailBoxer Problem Found...But Not Solved

2006-09-05 Thread Chris Withers

beno wrote:
down. Frankly, I though (and still suspect) that the fact that the site 
2012.vi:7080 doesn't resolve because of the Pound/Squid/Zope interface 


name resolution has fuckall to do with Pound, Squid or Zope.

but 202.71.106.119:7080 does combined with the fact that I have to send 


202.71.106.119 is an ip address, therefore no name resolution is necessary.


with no luck. Where else should I be looking?


If you removed your head from your arse you might see a lot more...

*sigh*

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change language with PTS

2006-09-05 Thread Chris Withers

Peter Bengtsson wrote:

I'm still a i18n newbie.


Don't use PTS!


Ideas?


If you have a google, you'll see i've just recently done the 
language-selection-from-cookies dance in Zope 2 but using Zope 3's 
infinitely better translation machinery ;-)


There's even a sx.translations package which will help with providing 
you with a list of languages to pick from...


Lemme know if you want me to release it once you've had a read of the 
relevant threads...


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] searching zope free hosting

2006-09-05 Thread Chris Withers

Fabio Marcone wrote:
I'm searching a zope free hosting to publish my homepage. Unfortunately 
freezope.org and objectis.net are unavailable.


http://register.freezope.org/ looks like it's working to me...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change language with PTS

2006-09-05 Thread Peter Bengtsson

On 9/5/06, Chris Withers [EMAIL PROTECTED] wrote:

Peter Bengtsson wrote:
 I'm still a i18n newbie.

Don't use PTS!


I'll try Localizer


 Ideas?

If you have a google, you'll see i've just recently done the
language-selection-from-cookies dance in Zope 2 but using Zope 3's
infinitely better translation machinery ;-)

There's even a sx.translations package which will help with providing
you with a list of languages to pick from...

Lemme know if you want me to release it once you've had a read of the
relevant threads...


Does this work for Zope 2.8?


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )




--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Help! I Screwed Up a Source File

2006-09-05 Thread beno

Hi;
I inherited this box so I don't know exactly how this file got built; 
however, it's python 2.3.5 and zope 2.7.8. I apparently screwed up this 
file:

278/lib/python/Zope/Startup/zeoctl
which incorrectly reads like this:

#!/bin/sh
# ZEO instance control script

# The following two lines are for chkconfig.  On Red Hat Linux (and
# some other systems), you can copy or symlink this script into
# /etc/rc.d/init.d/ and then use chkconfig(8) to automatically start
# ZEO at boot time.

# chkconfig: 345 90 10
# description: start a ZEO server

PYTHON=/usr/local/zope/py235/bin/python
ZODB3_HOME=/usr/local/zope/278/lib/python

CONFIG_FILE=/usr/local/zope/instance2/var/zeo/etc/zeo.conf

PYTHONPATH=$ZODB3_HOME
export PYTHONPATH

ZEOCTL=$ZODB3_HOME/ZEO/zeoctl.py

exec $PYTHON $ZEOCTL -C $CONFIG_FILE ${1+$@}
~

Where can I grab a copy of the correct file?
TIA,
beno
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] searching zope free hosting

2006-09-05 Thread Fabio Marcone

Chris Withers wrote:

Fabio Marcone wrote:
I'm searching a zope free hosting to publish my homepage. 
Unfortunately freezope.org and objectis.net are unavailable.


http://register.freezope.org/ looks like it's working to me...

Chris



Thanks, within 2 days they accept or reject my subscription.

Fabio

--

Dott. Fabio Marcone

2T srl
Telefono+39 - 0871- 540154
Fax +39 - 0871- 571594
Email   [EMAIL PROTECTED]   
Indirizzo   Viale B. Croce 573
66013 Chieti Scalo (CH)
GNU/Linux registered user   #400424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Can't stop Zope, machine hanging

2006-09-05 Thread Kirk Strauser
On Tuesday 05 September 2006 3:58 am, Chris Withers wrote:

 Move hosters. FreeBSD for all its robustness is not something I'd
 recommend running Zope on...

Seriously?  Why so?  I've been running Zope exclusively on FreeBSD since 
2001 without any known problems.
-- 
Kirk Strauser
The Day Companies
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Hmm... Localizer or Localizer

2006-09-05 Thread Peter Bengtsson

What's going on here?? Which is which?

http://www.ikaaro.org/localizer
or
http://www.j-david.net/software/localizer/

They're both zope products and both with the same name.
Perhaps the author of the deprecated page could put a redirect or
something to the new one.

--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Hmm... Localizer or Localizer

2006-09-05 Thread Philipp von Weitershausen

Peter Bengtsson wrote:

What's going on here?? Which is which?

http://www.ikaaro.org/localizer
or
http://www.j-david.net/software/localizer/

They're both zope products and both with the same name.
Perhaps the author of the deprecated page could put a redirect or
something to the new one.


Do yourself a favour and do what ChrisW suggested: use Five's i18n 
machinery. Comes with Zope 2.9 included. For Zope 2.8, simply install 
Five 1.2. It's a no-brainer (isntalling Five 1.2).


Philipp

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski

Hi!

I'm using Zope 2.9.4 with Five1.4 (linux box).
I'm trying to use DateDisplayWidget (from 
/zope/app/form/browser/textwidgets.py)


I get:
*Error Type: AttributeError*
*Error Value: locale
...
Module Products.PageTemplates.Expressions, line 180, in _eval
Module Products.PageTemplates.Expressions, line 85, in render
Module zope.app.form.browser.textwidgets, line 538, in __call__
Module ZPublisher.HTTPRequest, line 1219, in __getattr__

Which is caused by this line:

formatter = self.request.locale.dates.getFormatter(
   self._category, (self.displayStyle or None))

So is this something with my Zope that I don't have request.locale
or is that a bug?

--
Maciej Wisniowski
*
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Help! I Screwed Up a Source File

2006-09-05 Thread Martijn Pieters

On 9/5/06, beno [EMAIL PROTECTED] wrote:

I inherited this box so I don't know exactly how this file got built;
however, it's python 2.3.5 and zope 2.7.8. I apparently screwed up this
file:
278/lib/python/Zope/Startup/zeoctl
Where can I grab a copy of the correct file?


Download 2.7.8 from Zope.org and extract that one file?

--
Martijn Pieters
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Martijn Pieters

On 9/5/06, Maciej Wisniowski [EMAIL PROTECTED] wrote:

I'm using Zope 2.9.4 with Five1.4 (linux box).
I'm trying to use DateDisplayWidget (from
/zope/app/form/browser/textwidgets.py)

[snip]

So is this something with my Zope that I don't have request.locale
or is that a bug?


I'd say it's a bug. The Zope3 request has the locale attribute, but
the Zope2 request implementation doesn't.

--
Martijn Pieters
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski

 I'd say it's a bug. The Zope3 request has the locale attribute, but
 the Zope2 request implementation doesn't.
Yeah, I supposed that but was not sure. Thanks.

I've submitted an issue:

http://www.zope.org/Collectors/Zope/2184

--
Maciej Wisniowski
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Andreas Jung



--On 5. September 2006 15:35:36 +0200 Maciej Wisniowski 
[EMAIL PROTECTED] wrote:



  I'd say it's a bug. The Zope3 request has the locale attribute, but
  the Zope2 request implementation doesn't.
Yeah, I supposed that but was not sure. Thanks.

I've submitted an issue:

http://www.zope.org/Collectors/Zope/2184



That's basically a Zope 3 issue and belongs into the Zope 3 bugtracker :-)

-aj

pgp9W8EwffH6b.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski


That's basically a Zope 3 issue and belongs into the Zope 3 bugtracker 
:-)


Why Zope 3? I'm using Zope 2.9.4. This code is ported
directly form Zope 3 or what?

--
Maciej Wisniowski
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Hmm... Localizer or Localizer

2006-09-05 Thread Peter Bengtsson

On 9/5/06, Philipp von Weitershausen [EMAIL PROTECTED] wrote:

Peter Bengtsson wrote:
 What's going on here?? Which is which?

 http://www.ikaaro.org/localizer
 or
 http://www.j-david.net/software/localizer/

 They're both zope products and both with the same name.
 Perhaps the author of the deprecated page could put a redirect or
 something to the new one.

Do yourself a favour and do what ChrisW suggested: use Five's i18n
machinery. Comes with Zope 2.9 included. For Zope 2.8, simply install
Five 1.2. It's a no-brainer (isntalling Five 1.2).



But how do you use it? I installed Five 1.2.6
In my product's directory I created a configure.zcml that looks like this::
configure xmlns=http://namespaces.zope.org/zope;
  xmlns:browser=http://namespaces.zope.org/browser;
  xmlns:i18n=http://namespaces.zope.org/i18n;
  package=Products.RememberYourFriends

 i18n:registerTranslations directory=i18n /

/configure

Starts without errors. My ryf-sv.po file isn't automatically compiled
to .mo and I tried changing the HTTP_ACCEPT_LANGUAGE variable but
still just the old default English.

Either I've missed something big and crucial or there's a bug in lack
of errors or alerts.

Pulling my hair :(


Philipp

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )




--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Andreas Jung



--On 5. September 2006 15:49:46 +0200 Maciej Wisniowski 
[EMAIL PROTECTED] wrote:





That's basically a Zope 3 issue and belongs into the Zope 3 bugtracker
:-)


Why Zope 3? I'm using Zope 2.9.4. This code is ported
directly form Zope 3 or what?



The REQUEST in Zope 2 never had a 'locale' attribute and Zope 2 does not 
claim to be compatible with every kind of Zope 3 infrastructure. If 
request.locale is a very important feature in the Zope 3 world, one might 
backport this somehow to Zope 2 (if it makes sense). I consider this a 
feature request but not as a bug.


-aj

pgpAtCJXDstOS.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Hmm... Localizer or Localizer

2006-09-05 Thread Philipp von Weitershausen

Peter Bengtsson wrote:

But how do you use it? I installed Five 1.2.6
In my product's directory I created a configure.zcml that looks like this::
configure xmlns=http://namespaces.zope.org/zope;
  xmlns:browser=http://namespaces.zope.org/browser;
  xmlns:i18n=http://namespaces.zope.org/i18n;
  package=Products.RememberYourFriends

 i18n:registerTranslations directory=i18n /

/configure

Starts without errors. My ryf-sv.po file isn't automatically compiled
to .mo


Right. The Zope 3 machinery doesn't do that. Use msgfmt from the gettext 
utilities to compile catalogs.


You're also using PTS's non-standard directory layout. The standard 
gettext layout is somedir/LC_MESSAGES/lang/domain.mo. PTS supports 
this as well but Plone continues not to go standard here and set a bad 
example :(



and I tried changing the HTTP_ACCEPT_LANGUAGE variable but
still just the old default English.


HTTP_ACCEPT_LANGUAGE isn't a variable. It's an HTTP header 
(Accept-Language) that you really shouldn't modify. The request should 
be treated as read-only.


To test languages, either write your own IUserPreferredLanguages adapter 
that returns the language you want or simply configure your browser to 
send a different Accept-Language header. In Firefox, you can simply do 
this by entering about:config in the URL bar and changing the setting 
of the intl.accept_languages variable (e.g. to se, en).



Either I've missed something big and crucial or there's a bug in lack
of errors or alerts.


You simply didn't read Five/doc/i18n.txt 
(http://codespeak.net/z3/five/i18n.html). Googling five i18n gives you 
that as a first hit. RTFM is all I can say here.


Philipp
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski

 I consider this a feature request but not as a bug.
Ehm... I'm not sure whether we understand each other.

I mean the bug is that DateDisplayWidget in Zope2.9.4 uses request.locale
which as you said is from Zope3 world. So, as far as I understand, reference
to 'request.locale' shouldn't appear in Zope 2.9.4 code at all but it 
does...

Do you mean it is correct??

--
Maciej Wisniowski
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen

Martijn Pieters wrote:
On 9/5/06, Maciej Wisniowski 
[EMAIL PROTECTED] wrote:

I'm using Zope 2.9.4 with Five1.4 (linux box).
I'm trying to use DateDisplayWidget (from
/zope/app/form/browser/textwidgets.py)

[snip]

So is this something with my Zope that I don't have request.locale
or is that a bug?


I'd say it's a bug.


No it's not.


The Zope3 request has the locale attribute, but the Zope2 request
implementation doesn't.


Right. Who ever said that the Zope 2 request is compatible with the Zope 
3 request?


We can't even just make the Zope 2 request have that attribute because 
of potential backward incompatibilities. Why? Because you can do 
request.locale in Zope 2 right now which is an equivalent spelling of 
request['locale'] (it looks up request variables). If existing 
applications use the attribute access instead of the item access (which 
should clearly be the preferred way, but there's lots of Zope 2 legacy), 
they would break because request.locale would now find something else.


It's not a bug. It's Zope 2's obscenity with __getattr__ APIs instead of 
__getitem__ APIs that's preventing the harmonizing of the two 
implementations, that's all. Both the ObjectManager and the request are 
very good examples of how Zope 2 got this wrong, but Zope 3 got it right.


Philipp

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Martijn Pieters

On 9/5/06, Philipp von Weitershausen [EMAIL PROTECTED] wrote:

Maciej Wisniowski wrote:
   I consider this a feature request but not as a bug.
 Ehm... I'm not sure whether we understand each other.

 I mean the bug

There is no bug.


Sure there is. The Five integration includes code that expects an
IBrowserRequest. Either Zope2 should implement that correctly, or Five
should not include that widget, or Five should register a widget that
doesn't use request.locale.

This should be at a minimum be named as a known issue.

--
Martijn Pieters
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski


DateDisplayWidget expects an IBrowserRequest. Zope 2's request only 
pretends to be an IBrowserRequest. At the current state, it can't 
implement the whole interface.


That's a known issue, but we can't do anything about it, at least not 
in DateDisplayWidget (and numerous other places where request.locale 
is used). The problem's roots go deeper.


I just thought that if there is DateDisplayWidget class in Zope2.9.4 code
then it may be used. It is a bit strange for me that Zope contains code
that is unuseable. But ok, I'll use something different.

--
Maciej Wisniowski

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Can't stop Zope, machine hanging

2006-09-05 Thread Ken Ara
OK, once again, after many hours of costly down time,
we have restarted our Zope machine.

Chris, could state your reasons for recommending
against FreeBSD? I have had no trouble in over five
years that I can directly attribute to FreeBSD, but I
am open-minded. That said, I don't mean to reopen the
'best os' debate.

This time I am pretty convinced that our problem had
to do with changes due to the physical move of some
equipment and reconfiguration at the ISP.

Of immediate concern to me is whether I can do
anything to prevent this happening again. From time to
time, my Zope hangs, usually because of an attack by a
bad robot requesting lots of complex pages and sending
no-cache headers. Then I am able to restart Zope and
all is well. For a while, when these attacks were
frequent, I had a crontab to zopectl restart every
hour. 

But this event was different and I would like to know
if anyone thinks that something I am doing wrong could
cause the Zope process to become 'unkillable' and
require a reset of the machine. Has anyone else had
this problem?

I would have liked to perform some diagnostic on the
machine in its stuck state, but neither I nor the ISP
knew where to start. I can accept that, as Dieter
said, there are times when the only choice is to
switch off and on the box - which I can't do remotely
- but wonder if I could have done more... 

--- Chris Withers [EMAIL PROTECTED] wrote:

 Ken Ara wrote:
  One and a half days later, I am again unable to
 stop,
  restart or kill Zope. My ISP host is making
 changes on
  their network and I believe the problem is with
 them.
  I am in a FreeBSD jail, sharing the machine with a
 DNS
  server. It's 3am over there, and I wish I could do
  something while waiting for them to wake up. Then,
 we
  need to find out what is causing this problem.
 
 Move hosters. FreeBSD for all its robustness is not
 something I'd 
 recommend running Zope on...
 
  Is there no alternative to physically restarting
 this
  machine? While we are stuck, is there anything I
 can
  do to diagnose the problem?
 
 You may have more luck on a FreeBSD list...
 
 Chris
 
 -- 
 Simplistix - Content Management, Zope  Python
 Consulting
 - http://www.simplistix.co.uk
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen

Maciej Wisniowski wrote:
DateDisplayWidget expects an IBrowserRequest. Zope 2's request only 
pretends to be an IBrowserRequest. At the current state, it can't 
implement the whole interface.


That's a known issue, but we can't do anything about it, at least not 
in DateDisplayWidget (and numerous other places where request.locale 
is used). The problem's roots go deeper.


I just thought that if there is DateDisplayWidget class in Zope2.9.4 code
then it may be used. It is a bit strange for me that Zope contains code
that is unuseable. But ok, I'll use something different.


It is not unusable if your request correctly implements IBrowserRequest. 
And even though it is in Zope 2.9.4, it comes from a Zope 3 based 
library. Five never gave you a guarantee that *all* Zope 3 components 
would instantly work in Zope 2 as soon as they're shipped with it.


Philipp
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Can't stop Zope, machine hanging

2006-09-05 Thread Andreas Jung



--On 5. September 2006 07:47:05 -0700 Ken Ara [EMAIL PROTECTED] wrote:


OK, once again, after many hours of costly down time,
we have restarted our Zope machine.

Chris, could state your reasons for recommending
against FreeBSD? I have had no trouble in over five
years that I can directly attribute to FreeBSD, but I
am open-minded. That said, I don't mean to reopen the
'best os' debate.


This remark was just stupid. There is nothing with BSD except
there are some known issues you need to consider when compiling Python
(at least there were some issues in the past).


-aj

pgpuQziGgCmWn.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] UnicodeDecodeError inside ZMI

2006-09-05 Thread Remy Pinsonnault
Hello,

With Zope 2.8.7 and Python 2.3.5 (Plone 2.1.3 installer), when I search inside the ZMI for the spanish 
ñ character (inside a Plone site object), I get an UnicodeDecodeError:


Site Error
An error was encountered while publishing this resource. 
UnicodeDecodeErrorSorry, a site error occurred. 

Traceback (innermost last): 

Module ZPublisher.Publish, line 188, in publish_module_standard 
Module Products.PlacelessTranslationService.PatchStringIO, line 34, in new_publish 
Module ZPublisher.Publish, line 145, in publish 
Module Zope2.App.startup, line 216, in zpublisher_exception_hook 
Module ZPublisher.Publish, line 114, in publish 
Module ZPublisher.mapply, line 88, in mapply 
Module ZPublisher.Publish, line 40, in call_object 
Module Shared.DC.Scripts.Bindings, line 311, in __call__ 
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec 
Module App.special_dtml, line 175, in _exec 
Module DocumentTemplate.DT_With, line 61, in render 
Module DocumentTemplate.DT_Util, line 196, in eval__traceback_info__: _ 
Module string, line 0, in ? 
Module OFS.FindSupport, line 112, in ZopeFind UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 0: ordinal not in range(128) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: 'portlet_intranet') 

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Problems with lists

2006-09-05 Thread larrymcdonnell





Hi,

I am trying to create five list to collect student scores. As you can see I am using simple html to create them.

1)  SELECT NAME="student_score1_temp" option value=""/option OPTION VALUE="0"0 OPTION VALUE="2"1 OPTION VALUE="3"2 OPTION VALUE="3"3 OPTION VALUE="4"4 OPTION VALUE="5"5 OPTION VALUE="6"6 /OPTION/SELECT2)  SELECT NAME="student_score2_temp" option value=""/option OPTION VALUE="0"0 OPTION VALUE="2"1 
 ;OPTIO
N VALUE="3"2 OPTION VALUE="3"3 OPTION VALUE="4"4 OPTION VALUE="5"5 OPTION VALUE="6"6 /OPTION/SELECT..
5)  SELECT NAME="student_score5_temp" option value=""/option OPTION VALUE="0"0 OPTION VALUE="2"1 OPTION VALUE="3"2 OPTION VALUE="3"3 OPTION VALUE="4"4 OPTION VALUE="5"5 OPTION VALUE="6"6 /OPTION/SELECT

I use the the following dtml commands to populate the db. 

 dtml-call "REQUEST.set('counter', REQUEST.SESSION['counter'])"
 dtml-call "REQUEST.set('loop_counter_temp', '0')" dtml-call "string_to_int(loop_counter_temp ,REQUEST)" dtml-call "REQUEST.set('loop_counter', y)" dtml-call "REQUEST.set('loop_counter', 1)"
dtml-in expr="_.range(counter)"dtml-call "REQUEST.set('student_score1', student_score1_temp[loop_counter])"dtml-call "REQUEST.set('student_score2', student_score2_temp[loop_counter])"dtml-call "REQUEST.set('student_score3', student_score3_temp[loop_counter])"dtml-call "REQUEST.set('student_score4', student_score4_temp[loop_counter])"dtml-call "REQUEST.set('student_score5', student_score5_temp[loop_counter])" /dtml-in dtml-call expr="create_holistic_score_record(REQUEST)"

But these are the results:

REQUESTformstudent_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] Submit 'Submit' student_score2_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] 

Any ideas where I am going wrong. 

Thanks,

Larry McDonnell




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Problems with lists

2006-09-05 Thread larrymcdonnell






Hi,

I cleaned my glasses and saw that I fat fingered some keys. I am glad it was that easy to fix.

Larry
-- Original message from [EMAIL PROTECTED]: -- 
Hi,

I am trying to create five list to collect student scores. As you can see I am using simple html to create them.

1)  SELECT NAME="student_score1_temp" option value=""/option OPTION VALUE="0"0 OPTION VALUE="2"1 OPTION VALUE="3"2 OPTION VALUE="3"3 OPTION VALUE="4"4 OPTION VALUE="5"5 OPTION VALUE="6"6 /OPTION/SELECT2)  SELECT NAME="student_score2_temp" option value=""/option OPTION VALUE="0"0 OPTION VALUE="2"1 
 ; ;OPT
IO N VALUE="3"2 OPTION VALUE="3"3 OPTION VALUE="4"4 OPTION VALUE="5"5 OPTION VALUE="6"6 /OPTION/SELECT..
5)  SELECT NAME="student_score5_temp" option value=""/option OPTION VALUE="0"0 OPTION VALUE="2"1 OPTION VALUE="3"2 OPTION VALUE="3"3 OPTION VALUE="4"4 OPTION VALUE="5"5 OPTION VALUE="6"6 /OPTION/SELECT

I use the the following dtml commands to populate the db. 

 dtml-call "REQUEST.set('counter', REQUEST.SESSION['counter'])"
 dtml-call "REQUEST.set('loop_counter_temp', '0')" dtml-call "string_to_int(loop_counter_temp ,REQUEST)" dtml-call "REQUEST.set('loop_counter', y)" dtml-call "REQUEST.set('loop_counter', 1)"
dtml-in expr="_.range(counter)"dtml-call "REQUEST.set('student_score1', student_score1_temp[loop_counter])"dtml-call "REQUEST.set('student_score2', student_score2_temp[loop_counter])"dtml-call "REQUEST.set('student_score3', student_score3_temp[loop_counter])"dtml-call "REQUEST.set('student_score4', student_score4_temp[loop_counter])"dtml-call "REQUEST.set('student_score5', student_score5_temp[loop_counter])" /dtml-in dtml-call expr="create_holistic_score_record(REQUEST)"

But these are the results:

REQUESTformstudent_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] Submit 'Submit' student_score2_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] 

Any ideas where I am going wrong. 

Thanks,

Larry McDonnell




---BeginMessage---
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )
---End Message---
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Can't stop Zope, machine hanging

2006-09-05 Thread Dieter Maurer
Ken Ara wrote at 2006-9-5 01:14 -0700:
 ...
and I can't even restart the machine with the
shutdown command.

If you cannot shutdown your system, then something seriously
is wrong with it. It will have nothing to do with Zope.

You may try the reboot command. It is similar to shutdown
but start rebooting immediately while shutdown (even with -r)
does something before it.

You might even try kill 1 or kill -9 1 (this the initialization
process; if killed, you *nix will go down).

*BUT* I have not much hope for you...
There are situations where only the reset button is able to
bring the system again in a sane state. And your description
seems to indicate such a situation...


By the way, there are tools like RemoteConsole which allows
you to press the reset button remotely.
Our administrators use such tools.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Problems with lists

2006-09-05 Thread Jonathan


- Original Message - 
From: [EMAIL PROTECTED]

To: zope@zope.org
Sent: Tuesday, September 05, 2006 1:30 PM
Subject: [Zope] Problems with lists
I use the the following  dtml commands to populate the db.

snip

   dtml-call REQUEST.set('counter', REQUEST.SESSION['counter'])
   dtml-call REQUEST.set('loop_counter_temp', '0')
   dtml-call string_to_int(loop_counter_temp ,REQUEST)
   dtml-call REQUEST.set('loop_counter', y)
   dtml-call REQUEST.set('loop_counter', 1)
dtml-in expr=_.range(counter)
 dtml-call REQUEST.set('student_score1', 
student_score1_temp[loop_counter])
 dtml-call REQUEST.set('student_score2', 
student_score2_temp[loop_counter])
 dtml-call REQUEST.set('student_score3', 
student_score3_temp[loop_counter])
 dtml-call REQUEST.set('student_score4', 
student_score4_temp[loop_counter])
 dtml-call REQUEST.set('student_score5', 
student_score5_temp[loop_counter])

   /dtml-in
   dtml-call expr=create_holistic_score_record(REQUEST)

But these are the results:

REQUEST
form
student_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2']
Submit 'Submit'
student_score2_temp ['3', '3', '3', '3', '3', '3', '3', '3']
student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3']
student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4']
student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5']
/snip

I can't figure out what your dtml prior to the loop is trying to accomplish, 
however inside the loop your 'loop_counter' variable is a constant value (it 
does not change, so you keep referring to the same list element).  You need 
something like:


dtml-in expr=_.range(counter)
dtml-call REQUEST.set('student_score1', 
student_score1_temp[_['sequence-item']])


The _['sequence-item'] will contain the current iteration result of your 
_.range(counter) statement.


Better yet, do this in a python script (way easier).


hth

Jonathan



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Hmm... Localizer or Localizer

2006-09-05 Thread Peter Bengtsson

On 9/5/06, Philipp von Weitershausen [EMAIL PROTECTED] wrote:

Peter Bengtsson wrote:
 But how do you use it? I installed Five 1.2.6
 In my product's directory I created a configure.zcml that looks like this::
 configure xmlns=http://namespaces.zope.org/zope;
   xmlns:browser=http://namespaces.zope.org/browser;
   xmlns:i18n=http://namespaces.zope.org/i18n;
   package=Products.RememberYourFriends

  i18n:registerTranslations directory=i18n /

 /configure

 Starts without errors. My ryf-sv.po file isn't automatically compiled
 to .mo

Right. The Zope 3 machinery doesn't do that. Use msgfmt from the gettext
utilities to compile catalogs.

You're also using PTS's non-standard directory layout. The standard
gettext layout is somedir/LC_MESSAGES/lang/domain.mo. PTS supports
this as well but Plone continues not to go standard here and set a bad
example :(


Seems awefully academic to me but if that's the standard, let's do it.
I now have a file called:
locales/LC_MESSAGES/sv/ryf.mo


 and I tried changing the HTTP_ACCEPT_LANGUAGE variable but
 still just the old default English.

HTTP_ACCEPT_LANGUAGE isn't a variable. It's an HTTP header
(Accept-Language) that you really shouldn't modify. The request should
be treated as read-only.

To test languages, either write your own IUserPreferredLanguages adapter
that returns the language you want or simply configure your browser to
send a different Accept-Language header. In Firefox, you can simply do
this by entering about:config in the URL bar and changing the setting
of the intl.accept_languages variable (e.g. to se, en).

 Either I've missed something big and crucial or there's a bug in lack
 of errors or alerts.

You simply didn't read Five/doc/i18n.txt
(http://codespeak.net/z3/five/i18n.html). Googling five i18n gives you
that as a first hit. RTFM is all I can say here.


Don't RTFM me! I've read that page and unless you have a PhD in
physics and indept experience of Zope 3 is really doesn't make a lot
of sense. Plus, I've got your cookbook at home :)

So, should I use PTS or not??
The default behaviour for choosing languages in Five is the one of
Zope 3: analyze the Accept-Language HTTP header and nothing more.
This is not good enough. When I send out email alerts to people in my
app, that's a wget script that kicks if off, not a Mozilla browser.
Besides, what if an Englishman is using a Swedish
internetcafe-computer when on holiday; in that case I want to allow
him to manually configure his user profile on my site.

I have no idea what this does or what I'm supposed to do with:
adapter
   for=zope.publisher.interfaces.http.IHTTPRequest
   provides=zope.i18n.interfaces.IUserPreferredLanguages
   factory=Products.Five.i18n.PTSLanguages
   /

Please tell me there's a function or something that works like this::

 def index_html(self):
  uid = self._getLoggedinUID()
  wants_lang = self._getUserPreference(uid, default='en')
  setCurrentLanguage(wants_lang)
  return _(I wish it was easier)

def manage_setUserPreference(self, uid, lang):
 if lang in getAvailableLanguages():
 self._setUserPreference(uid, lang)

Where _getUserPreference() and _setUserPreference() is something I'm
expected to write for my app.

--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] MailBoxer Problem Found...But Not Solved

2006-09-05 Thread Dieter Maurer
beno wrote at 2006-9-4 16:41 -0400:
 ...
Frankly, I though (and still suspect) that the fact that the site 
2012.vi:7080 doesn't resolve because of the Pound/Squid/Zope interface 
but 202.71.106.119:7080 does combined with the fact that I have to send 
my email to [EMAIL PROTECTED] (mail being the SMTP) was causing the 
problem.

What does not resolve mean precisely (you need to be *VERY* precise
when you report problems)?

As you use it, one would repect a DNS (Domain Name Service) problem:

It is the task of the DNS to resolve 2012.vi into its IP address
(apparently 202.71.106.119).

If you are using virtual hosting (I do not know the Pound details,
only that of Apache), then additional requirements (beside
a working DNS) may be necessary. For Apache named virtual hosts,
e.g., not only the external DNS must map the name to the IP address
but the internal DNS as well.

 ...
Where else should I be looking?

Maybe, you look in your neighbourhood whether you find
a knowledgable person, pay his travel to visit you and
help you in setting up the system.

There are cases, where a mailing list cannot solve all problems
and direct personal interaction becomes necessary...



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Dieter Maurer
Philipp von Weitershausen wrote at 2006-9-5 16:28 +0200:
Maciej Wisniowski wrote:
   I consider this a feature request but not as a bug.
 Ehm... I'm not sure whether we understand each other.
 
 I mean the bug

There is no bug.

Seems a funny interpretation of no bug for me...

 is that DateDisplayWidget in Zope2.9.4 uses
 request.locale which as you said is from Zope3 world. So, as far as I
 understand, reference to 'request.locale' shouldn't appear in Zope
 2.9.4 code at all but it does... Do you mean it is correct??

DateDisplayWidget expects an IBrowserRequest. Zope 2's request only 
pretends to be an IBrowserRequest.

If that is not a bug (pretending to implement IBrowserRequest but not
doing so) what is a bug?

At the current state, it can't 
implement the whole interface.

Which means, that there is a bug but you have currently little chance
to fix it...


By the way, you could introduce a configuration option
that allows the user to determine whether he is more interested
in a true IBrowserRequest request or a more backward compatible
request.


That's a known issue, but we can't do anything about it, at least not in 
DateDisplayWidget (and numerous other places where request.locale is 
used). The problem's roots go deeper.

That you know it and do not want to change it does not mean that
bug is not an appropriate term...



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Problems with lists

2006-09-05 Thread Jonathan



Pls keep your posts on the list...


Regarding python scripts: the best place to 
start would be the Basic Scripting section of the Zope Book, which you can find 
here:

http://www.plope.com/Books/2_7Edition/BasicScripting.stx


For examples, have a look at the Python(Script) 
section of: 

http://zopelabs.com/



Jonathan



  - Original Message - 
  From: 
  [EMAIL PROTECTED] 
  To: Jonathan 
  Sent: Tuesday, September 05, 2006 2:23 
  PM
  Subject: Re: [Zope] Problems with 
  lists
  
  
  Hi,
  
  I am sending this to you versus the list. Everyone says to use Python but I 
  am the kind of guy who needs an example. But I am having a hard time finding 
  the Zope/Python related examples. If you could point me in the right direction 
  or one of your site that would be great.
  
  Thanks for the pointers,
  
  Larry
  -- 
Original message from "Jonathan" [EMAIL PROTECTED]: -- 
  - Original Message -  From: 
[EMAIL PROTECTED]  To: zope@zope.org  Sent: Tuesday, 
September 05, 2006 1:30 PM  Subject: [Zope] Problems with lists 
 I use the the following dtml commands to populate the db.  
   
  But these are 
the results:   REQUEST  form  
student_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2']  Submit 
'Submit'  student_score2_temp ['3', '3', '3', '3', '3', '3', '3', 
'3']  student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] 
 student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] 
 student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] 
   I can't figure out what your dtml prior to 
the loop is trying to accomplish,  however inside the loop your 
'loop_counter' variable is a constant value (it  does not change, so 
you keep referring to the same list element). You need  something 
like:
  The 
_['sequence-item'] will contain the current iteration result of your 
 _.range(counter) statement.   Better yet, do this 
in a python script (way easier).hth  
 Jonathan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Dieter Maurer
Philipp von Weitershausen wrote at 2006-9-5 16:44 +0200:
 ...
It's an issue, not a bug.

According to Wikipedia:

A software bug is an error, flaw, mistake, failure, or fault in a
computer program that prevents it from working as intended, or
produces an incorrect result.

A request object that declares to implement IBrowserRequest but
does not, is not working as intended -- and constitutes a bug.


-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] UnicodeDecodeError inside ZMI

2006-09-05 Thread Dieter Maurer
Remy Pinsonnault wrote at 2006-9-5 11:18 -0400:
With Zope 2.8.7 and Python 2.3.5 (Plone 2.1.3 installer), when I search
inside the ZMI for the spanish ñ character (inside a Plone site object), I
get an UnicodeDecodeError:

 Site Error

An error was encountered while publishing this resource.

*UnicodeDecodeError*
Sorry, a site error occurred.

Traceback (innermost last):
 ...
   - Module OFS.FindSupport, line 112, in ZopeFind

UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 0:
ordinal not in range(128)

This means that unicode and (non ASCII) byte strings are mixed together.

Search the mailing list for UnicodeDecodeError (or setdefaultencoding)
to find out how you can approach this problem.


-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen

Dieter Maurer wrote:

Philipp von Weitershausen wrote at 2006-9-5 16:28 +0200:

Maciej Wisniowski wrote:

  I consider this a feature request but not as a bug.
Ehm... I'm not sure whether we understand each other.

I mean the bug

There is no bug.


Seems a funny interpretation of no bug for me...


It's an unfortunate situation. That's what it is.


is that DateDisplayWidget in Zope2.9.4 uses
request.locale which as you said is from Zope3 world. So, as far as I
understand, reference to 'request.locale' shouldn't appear in Zope
2.9.4 code at all but it does... Do you mean it is correct??
DateDisplayWidget expects an IBrowserRequest. Zope 2's request only 
pretends to be an IBrowserRequest.


If that is not a bug (pretending to implement IBrowserRequest but not
doing so) what is a bug?


I'll call this an issue for now, but I won't argue semantics here. All 
I can say is that the Five project's promises were never that everything 
from Zope 3 works instantly. And it has also been Five's policy to make 
a quick lie here and there just to get things going. Five usually gives 
you 95% of a certain technology you know from Zope 3. The remaining 5% 
are friction loss due to Zope 2isms like Acquisition, etc.


In order to sell Zope 2's request to the Zope 3 machinery, Five 
originally made Zope 2's request an IBrowserRequest -- even though that 
was a lie. When Five was integrated into Zope 2, that lie was carried on 
in Zope 2. I was neither the one to make that initial lie nor was I 
there when Five was integrated.


At the current state, it can't 
implement the whole interface.


Which means, that there is a bug but you have currently little chance
to fix it...


The problem with going forward with this and fixing it is the following 
(quoting myself from an earlier email on this thread):


  We can't even just make the Zope 2 request have that attribute
  because of potential backward incompatibilities. Why? Because you
  can do request.locale in Zope 2 right now which is an equivalent
  spelling of request['locale'] (it looks up request variables). If
  existing applications use the attribute access instead of the item
  access (which should clearly be the preferred way, but there's lots
  of Zope 2 legacy), they would break because request.locale would now
  find something else.

  It's not a bug. It's Zope 2's obscenity with __getattr__ APIs
  instead of __getitem__ APIs that's preventing the harmonizing of the
  two implementations, that's all. Both the ObjectManager and the
  request are very good examples of how Zope 2 got this wrong, but
  Zope 3 got it right.


By the way, you could introduce a configuration option
that allows the user to determine whether he is more interested
in a true IBrowserRequest request or a more backward compatible
request.


I'm not sure that that will work. In complicated systems like Plone, you 
might end up with some products that rely on the old way of doing things 
while Plone uses Zope 3 components that obviously want the true 
IBrowserRequest request at same time.


Note that I'm well aware of this issue and have thought hard about it. I 
think the only long term solution out of this mess is to get rid of the 
__getattr__ spelling once and for all.


That's a known issue, but we can't do anything about it, at least not in 
DateDisplayWidget (and numerous other places where request.locale is 
used). The problem's roots go deeper.


That you know it and do not want to change it does not mean that
bug is not an appropriate term...


You're claiming that I don't *want* to change it. That's not true. I am 
thinking hard about this, but I see no easy solution. Of course, I'd be 
more than happy if an easy solution can be found.


Philipp
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen

Dieter Maurer wrote:

Philipp von Weitershausen wrote at 2006-9-5 16:44 +0200:

...
It's an issue, not a bug.


According to Wikipedia:

A software bug is an error, flaw, mistake, failure, or fault in a
computer program that prevents it from working as intended, or
produces an incorrect result.

A request object that declares to implement IBrowserRequest but
does not, is not working as intended -- and constitutes a bug.


Fine. Call it a bug. I don't care.

Arguing semantics won't solve that problem now, will it. Remove the 
IBrowserRequest declaration and see Five break. Perhaps it was the wrong 
thing to do at the time (it certainly wasn't me who did it), but that's 
just how it is. We'll have to live with it now.


Philipp
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Hmm... Localizer or Localizer

2006-09-05 Thread Philipp von Weitershausen

Peter Bengtsson wrote:

HTTP_ACCEPT_LANGUAGE isn't a variable. It's an HTTP header
(Accept-Language) that you really shouldn't modify. The request should
be treated as read-only.

To test languages, either write your own IUserPreferredLanguages adapter
that returns the language you want or simply configure your browser to
send a different Accept-Language header. In Firefox, you can simply do
this by entering about:config in the URL bar and changing the setting
of the intl.accept_languages variable (e.g. to se, en).

 Either I've missed something big and crucial or there's a bug in lack
 of errors or alerts.

You simply didn't read Five/doc/i18n.txt
(http://codespeak.net/z3/five/i18n.html). Googling five i18n gives you
that as a first hit. RTFM is all I can say here.


Don't RTFM me! I've read that page and unless you have a PhD in
physics and indept experience of Zope 3 is really doesn't make a lot
of sense. Plus, I've got your cookbook at home :)


You must be confusing me. I don't have a PhD in physics and I didn't 
write a cookbook. That was the other German ;).



So, should I use PTS or not??


No. I think I've answered that question before.


The default behaviour for choosing languages in Five is the one of
Zope 3: analyze the Accept-Language HTTP header and nothing more.
This is not good enough.


Then implement your own IUserPreferredLanguages adapter. This is 
documented in my book which you may or may not have, not sure ;)



When I send out email alerts to people in my
app, that's a wget script that kicks if off, not a Mozilla browser.
Besides, what if an Englishman is using a Swedish
internetcafe-computer when on holiday; in that case I want to allow
him to manually configure his user profile on my site.


Sure. That's possible. With a custom IUserPReferredLanguages adapter.


I have no idea what this does or what I'm supposed to do with:
adapter
   for=zope.publisher.interfaces.http.IHTTPRequest
   provides=zope.i18n.interfaces.IUserPreferredLanguages
   factory=Products.Five.i18n.PTSLanguages
   /


Nothing. The docs say that this is only for users who use PTS for 
legacy. You're not one of them.


Philipp
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski


I'll call this an issue for now, but I won't argue semantics here. 
All I can say is that the Five project's promises were never that 
everything from Zope 3 works instantly. And it has also been Five's 
policy to make a quick lie here and there just to get things going. 
Five usually gives you 95% of a certain technology you know from Zope 
3. The remaining 5% are friction loss due to Zope 2isms like 
Acquisition, etc. 


I don't catch one thing. There is Five/formlib/formbase.py where Five
overrides handle_edit_action. Why it is overriden? To remove
dependecy on request.locale.

Why can't be same thing done with DateDisplayWidget?
Isn't this a simple solution?

--
Maciej Wisniowski
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Dieter Maurer
Philipp von Weitershausen wrote at 2006-9-5 20:57 +0200:
 ...
Note that I'm well aware of this issue and have thought hard about it. I 
think the only long term solution out of this mess is to get rid of the 
__getattr__ spelling once and for all.

The __getattr__ may be a stumbling block in principle.

Practically, it will very rarely hinder you to add attributes (such as
locale) to the request.

True: you can use REQUEST.locale or REQUEST.debug and expect
to access in fact REQUEST['locale'] and REQUEST['debug'] respectively.

But, it is rare that the attribute access syntax is used and if it indeed
results in the wrong result (because the request grew additional attributes),
then it is easy to fix.

Adding the configuration option would (perhaps) make the administrator
aware of the potential cause when he gets informed about wrong values
read from the request.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen

Dieter Maurer wrote:

Philipp von Weitershausen wrote at 2006-9-5 20:57 +0200:

...
Note that I'm well aware of this issue and have thought hard about it. I 
think the only long term solution out of this mess is to get rid of the 
__getattr__ spelling once and for all.


The __getattr__ may be a stumbling block in principle.

Practically, it will very rarely hinder you to add attributes (such as
locale) to the request.


I think locale and debug are just common enough to be form variables.


True: you can use REQUEST.locale or REQUEST.debug and expect
to access in fact REQUEST['locale'] and REQUEST['debug'] respectively.

But, it is rare that the attribute access syntax is used


You'd be surprised (I was too). Plus, TALES path expressions first try 
attribute access, then item access.



and if it indeed results in the wrong result (because the request
grew additional  attributes), then it is easy to fix.


Sure, but it's a BBB foul. It's not *me* who has the legacy code, so I 
wouldn't mind. But I'm sure others would.



Adding the configuration option would (perhaps) make the administrator
aware of the potential cause when he gets informed about wrong values
read from the request.


Perhaps. A configuration option (that would usually be turned to 'off') 
would surely be a quick way of finding out where you have code that uses 
request.foo. It may be a good step leading an actual deprecation of the 
__getattr__ spelling (which I think is necessary for eliminating the 
reuquest.foo spelling once and for all, especially in newly created code).


Philipp
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen

Maciej Wisniowski wrote:


I'll call this an issue for now, but I won't argue semantics here. 
All I can say is that the Five project's promises were never that 
everything from Zope 3 works instantly. And it has also been Five's 
policy to make a quick lie here and there just to get things going. 
Five usually gives you 95% of a certain technology you know from Zope 
3. The remaining 5% are friction loss due to Zope 2isms like 
Acquisition, etc. 


I don't catch one thing. There is Five/formlib/formbase.py where Five
overrides handle_edit_action. Why it is overriden? To remove
dependecy on request.locale.

Why can't be same thing done with DateDisplayWidget?
Isn't this a simple solution?


Sure. As I said earlier, we are happy to accept patches :)

Philipp

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] zope 3 invisibility

2006-09-05 Thread Carlos de la Guardia
Hello everyone,I frequently blog about Zope, and recently posted a list of 10 reasons why I think Zope 3 is kind of invisible to the Python community (see my blog at http://blog.delaguardia.com.mx
). One of the things that I talk about in that post is that the Zope community tends to interact more through its mailing lists than its blogs, as opposed to other so-called modern frameworks, like Django and Turbogears. 
I have been following the efforts of the Zope 3 developers and sometimes wonder why this invisibility effect takes place. That's why I decided to see if anyone on this list feels like commenting about this, or any of my other 10 points. I am very interested in the dynamics of the Zope community and the place of Zope in the larger Python community, and would be very thankful for any comments, here or on the blog.
Thanks very much.Carlos de la Guardia
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope 3 invisibility

2006-09-05 Thread David H




David H wrote:

  
Carlos de la Guardia wrote:
  Hello everyone,

I frequently blog about Zope, and recently posted a list of 10 reasons
why I think Zope 3 is kind of invisible to the Python community (see my
blog at http://blog.delaguardia.com.mx
). One of the things that I talk about in that post is that the
Zope community tends to interact more through its mailing lists than
its blogs, as opposed to other so-called modern frameworks, like Django
and Turbogears. 

I have been following the efforts of the Zope 3 developers and
sometimes wonder why this invisibility effect takes place. That's why I
decided to see if anyone on this list feels like commenting about this,
or any of my other 10 points. I am very interested in the dynamics of
the Zope community and the place of Zope in the larger Python
community, and would be very thankful for any comments, here or on the
blog. 

Thanks very much.

Carlos de la Guardia
  
My invisibility with Zope 3 is Zope 2. When I think of something Zope
2 is failing to provide I will try Zope 3 . I see Django and
Turbogears as "toys" by comparison
:-) 
  
David
  




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope 3 invisibility

2006-09-05 Thread Fred Drake

On 9/5/06, Carlos de la Guardia [EMAIL PROTECTED] wrote:

I frequently blog about Zope, and recently posted a list of 10 reasons why I
think Zope 3 is kind of invisible to the Python community (see my blog at
http://blog.delaguardia.com.mx ). One of the things that I talk about in
that post is that the Zope community tends to interact more through its
mailing lists than its blogs, as opposed to other so-called modern
frameworks, like Django and Turbogears.


Interesting.  I've always considered blogs to be fairly invisible
since I have to go look for them, whereas for mailing lists I can sign
up for things I'm interested in.


 -Fred

--
Fred L. Drake, Jr.fdrake at gmail.com
Every sin is the result of a collaboration. --Lucius Annaeus Seneca
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change the encoding of a single ZPT page

2006-09-05 Thread Luiz Fernando Bernardes Ribeiro
2006/8/31, Andreas Jung [EMAIL PROTECTED]:
--On 31. August 2006 19:28:54 +0200 Dieter Maurer [EMAIL PROTECTED]wrote: Luiz Fernando Bernardes Ribeiro wrote at 2006-8-30 14:08 -0300: 2006/8/29, Andreas Jung 
[EMAIL PROTECTED]: ... After trying a lot of things, I found the problem is really in the zpublisher realm, no matter what kind of encoding trick I use, even with
 a python script, the output is converted to the default encoding if I use any variable or dynamic value from the database. If you were right (which I still hope you won't) than someone
 severely misunderstood the meaning of default.I think he is not right.-ajZope did respect the default setting when I changed the charset header in the file. 


The lesson learned is: Working with
two encoding charsets is very trick, and even trickier if you use
the ZMI to edit files. I had to create a simple ZPT file with the initial XML block
and inject the rest of the xml data, including variables and database, using a tal:content pointing
to a python script encoding everything to utf-8. The ZPT file was
needed as simple way to change the charset header trough the ZMI.When you change the charset trough the ZMI Zope trows an exception if it find any non-conforming character, the problem is that since the default charset is set to iso Zope reencodes my file to iso when it generates the editing form field so when I submit it back Zope raises an exception.

Considering I can't change everything to utf-8 I
will have to live with it and maybe find a simpler pattern to change the charset without raising an exception (maybe the dummy tal:define?).I hope it help others.

Thanks for your help and time,
-- Luiz Fernando B. Ribeiro
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )