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

2006-07-17 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: 6657
Blamelist: adamg,alecm,andreasjung,dobe,fdrake,jim,poster,sidnei,tseaver

BUILD FAILED: failed test

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-07-17 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: 6657
Blamelist: adamg,alecm,andreasjung,dobe,fdrake,jim,poster,sidnei,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: [Zope-dev] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-17 Thread Tino Wildenhain
Andreas Jung wrote:
> 
> 
> --On 17. Juli 2006 17:11:54 +0100 Chris Withers <[EMAIL PROTECTED]>
> wrote:
> 
>> Andreas Jung wrote:
>>>
>>> Zope 2.10 comes with the ZPT implementation of Zope 3 which works nicely
>>> with unicode strings. However the 2.10 won't enforce the use of unicode
>>> strings for backward compatibility. However (at least)  the
>>> ZopePageTemplate
>>> class constructor has a flag 'strict' to enforce the use of unicode.
>>
>> Okay, but what actually gets stored in the ZPT when editing it via ZMI or
>> WebDAV?
> 
> Here's the code:
> 
>security.declareProtected(change_page_templates, 'PUT')
>def PUT(self, REQUEST, RESPONSE):
>""" Handle HTTP PUT requests """
>self.dav__init(REQUEST, RESPONSE)
>self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
>## XXX this should be unicode or we must pass an encoding
>self.pt_edit(REQUEST.get('BODY', ''))
>RESPONSE.setStatus(204)
>return RESPONSE
> 
> As you can see from the comment..there is some work to do. AFAIK
> WevDAV the encoding is not available from a WebDAV request?!

But it is - in fact my local copies have the hack where I used
management_page_charset here. Now I'm seeing we dont even need
that - default_zpublisher_encoding is much better here.

Kate (as webdav editor client) plays very well with that.

> On the other hand there is code available that tries to obtain
> the encoding from the XML preamble (sniffEncoding)...and the very other
> hand

Yes this double encoder marking is a mess. We need to be able to
provide a fixup (just like the infamous -tag)

> there is still a problem with this method since the encoding can be
> determined by the BOM (if available)...this currently not handled through
> the code...I think I'll have a closer look at the code once again this
> week.

BOM is only for filesystem "unicode" of some 16-bit variants. Nothing
you really want to send over the wire (although you can).
But after all its just another encoding so it would be a matter
of setting the encoding correctly.

Regards
Tino
___
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] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-17 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 17 Jul 2006, at 12:24, Andreas Jung wrote:

What about loading FS ZPT's and things like CMF's FSZPT?



Ask Tres or Jens :-)


CMFCore/FSPageTemplate does not do anything special, it defers to the  
PageTemplate implementation.


jens


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEu/iERAx5nvEhZLIRAgsUAJ41ezK8o4XP6+/ff/cuiOMZPuatKACfUcy4
R1175YukgMw1oXQsj+seahs=
=RLQm
-END PGP SIGNATURE-
___
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] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-17 Thread Andreas Jung



--On 17. Juli 2006 17:11:54 +0100 Chris Withers <[EMAIL PROTECTED]> 
wrote:



Andreas Jung wrote:


Zope 2.10 comes with the ZPT implementation of Zope 3 which works nicely
with unicode strings. However the 2.10 won't enforce the use of unicode
strings for backward compatibility. However (at least)  the
ZopePageTemplate
class constructor has a flag 'strict' to enforce the use of unicode.


Okay, but what actually gets stored in the ZPT when editing it via ZMI or
WebDAV?


Here's the code:

   security.declareProtected(change_page_templates, 'PUT')
   def PUT(self, REQUEST, RESPONSE):
   """ Handle HTTP PUT requests """
   self.dav__init(REQUEST, RESPONSE)
   self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
   ## XXX this should be unicode or we must pass an encoding
   self.pt_edit(REQUEST.get('BODY', ''))
   RESPONSE.setStatus(204)
   return RESPONSE

As you can see from the comment..there is some work to do. AFAIK
WevDAV the encoding is not available from a WebDAV request?!
On the other hand there is code available that tries to obtain
the encoding from the XML preamble (sniffEncoding)...and the very other hand
there is still a problem with this method since the encoding can be 
determined by the BOM (if available)...this currently not handled through

the code...I think I'll have a closer look at the code once again this week.





What about loading FS ZPT's and things like CMF's FSZPT?



Ask Tres or Jens :-)

-aj

pgpKMKwhhkvb4.pgp
Description: PGP signature
___
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] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-17 Thread Chris Withers

Andreas Jung wrote:


Zope 2.10 comes with the ZPT implementation of Zope 3 which works nicely 
with unicode strings. However the 2.10 won't enforce the use of unicode 
strings for backward compatibility. However (at least)  the 
ZopePageTemplate

class constructor has a flag 'strict' to enforce the use of unicode.


Okay, but what actually gets stored in the ZPT when editing it via ZMI 
or WebDAV?


What about loading FS ZPT's and things like CMF's FSZPT?

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
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] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-17 Thread Chris Withers

Tino Wildenhain wrote:

This would be my next question too regarding the management_page_charset
cleanup I'm currently playing with. My vote would be to store unicode
where possible - so you dont screw up everything when you change
default_zpublisher_encoding in zope.conf.


Yeah, unicode is good...

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
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] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-17 Thread Andreas Jung



--On 17. Juli 2006 16:55:42 +0100 Chris Withers <[EMAIL PROTECTED]> 
wrote:



Andreas Jung wrote:



I've had problems when it's an encoded string, but that seems to be what
is stored when you save a ZPT via the ZMI or WebDAV...


ZPT in pre-Zope 2.10 knows nothing about unicode...it can be anything :-)


And what about 2.10?


Zope 2.10 comes with the ZPT implementation of Zope 3 which works nicely 
with unicode strings. However the 2.10 won't enforce the use of unicode 
strings for backward compatibility. However (at least)  the 
ZopePageTemplate

class constructor has a flag 'strict' to enforce the use of unicode.

-aj



FWIW, this seems to be problematic due to Zope 3's i18n stuff returning
unicodes.

Prior to that, everything was a happy utf-8 encoded string.

What does Zope 2.10 do with all of this?

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk




--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting


pgptSINhMNku9.pgp
Description: PGP signature
___
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] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-17 Thread Tino Wildenhain

Chris Withers wrote:

Andreas Jung wrote:



I've had problems when it's an encoded string, but that seems to be what
is stored when you save a ZPT via the ZMI or WebDAV...


ZPT in pre-Zope 2.10 knows nothing about unicode...it can be anything :-)


And what about 2.10?

FWIW, this seems to be problematic due to Zope 3's i18n stuff returning 
unicodes.


Prior to that, everything was a happy utf-8 encoded string.

What does Zope 2.10 do with all of this?



This would be my next question too regarding the management_page_charset
cleanup I'm currently playing with. My vote would be to store unicode
where possible - so you dont screw up everything when you change
default_zpublisher_encoding in zope.conf.

Regards
Tino
___
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] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-17 Thread Chris Withers

Andreas Jung wrote:



I've had problems when it's an encoded string, but that seems to be what
is stored when you save a ZPT via the ZMI or WebDAV...


ZPT in pre-Zope 2.10 knows nothing about unicode...it can be anything :-)


And what about 2.10?

FWIW, this seems to be problematic due to Zope 3's i18n stuff returning 
unicodes.


Prior to that, everything was a happy utf-8 encoded string.

What does Zope 2.10 do with all of this?

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
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] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-17 Thread Andreas Jung



--On 17. Juli 2006 16:32:08 +0100 Chris Withers <[EMAIL PROTECTED]> 
wrote:



The subject line says it all really ;-)

I've had problems when it's an encoded string, but that seems to be what
is stored when you save a ZPT via the ZMI or WebDAV...



ZPT in pre-Zope 2.10 knows nothing about unicode...it can be anything :-)

-aj

pgpp8PDwhpBdy.pgp
Description: PGP signature
___
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] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-17 Thread Chris Withers

The subject line says it all really ;-)

I've had problems when it's an encoded string, but that seems to be what 
is stored when you save a ZPT via the ZMI or WebDAV...


Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
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: port number for HTTPServer

2006-07-17 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Miles Waller wrote:
> Hi,
> 
> I am trying to find out the port number for the HTTP service running in
> a zope instance.  I tried using socket_map as used in the Control_Panel
> interface to report on running network services, but abandoned this
> because I need to get the same information when running in a debug
> instance as through the web.

I don't know what you mean by "debug isntance":  is that from within the
process started by 'zopectl debug'?  from a script run via 'zopectl run'?

> My next approach uses App.config.getConfiguration().servers to get the
> information fromn zope.conf directly.  But a few things seem not quite
> right:
> 
>  - getConfiguration().servers gives me different lists through the debug
> prompt and through the web.  why is this?
> 
>  - what is the most robust way to determine which of the listed servers
> is the HTTPServer?

Use 'isinstance HTTPServer'.

>  - is it ever possible that the servers list would contain more than one
> HTTPServer?

Yes.  There will be one instance per '' directive in your
zope.conf file.

> The reason for doing this is so that zope can call out to an external
> program, and give it a notification url that the external program can
> call back on.  Unfortunately I can't change this method of integration.
> 
> Thanks for your help!

Rather than guess, I would make the "callback URL" an explicit
configuration item.  You could set an environment variable with the
information you need, or add a custom stanza to zope.conf, e.g.::


   callback_url http://zope.example.com:1234/path/to/callback_method


You would then use this value via
'getConfiguration().product_config["your_product_name"]["callback_url"]'.

See the bottom of $ZOPE_HOME/skel/etc/zope.conf.in for more information.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEu5lc+gerLs4ltQ4RAjqnAKCFGGYyMaBEuog5xQwUenhz4E51GwCeJJ9j
MgZe+4ryWKSW/rnL5+Z4iv0=
=3k5M
-END PGP SIGNATURE-

___
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] port number for HTTPServer

2006-07-17 Thread Miles Waller

Hi,

I am trying to find out the port number for the HTTP service running in 
a zope instance.  I tried using socket_map as used in the Control_Panel 
interface to report on running network services, but abandoned this 
because I need to get the same information when running in a debug 
instance as through the web.


My next approach uses App.config.getConfiguration().servers to get the 
information fromn zope.conf directly.  But a few things seem not quite 
right:


 - getConfiguration().servers gives me different lists through the 
debug prompt and through the web.  why is this?


 - what is the most robust way to determine which of the listed servers 
is the HTTPServer?


 - is it ever possible that the servers list would contain more than 
one HTTPServer?


The reason for doing this is so that zope can call out to an external 
program, and give it a notification url that the external program can 
call back on.  Unfortunately I can't change this method of integration.


Thanks for your help!

Miles

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