[Zope-dev] proxydict problems in 2.8b2 with Localizer

2005-05-23 Thread Lennart Regebro
I get TypeError: object does not support item assignment in lin 46 och class_init.py. The offending code is d['_implicit__name__'] = 1 and this is because d is a proxydict. This in turn is caused by Localizer having a class as a class attribute: manage_attributesForm = LocalDTMLFile

[Zope-dev] Zope 2.8b2 problems part 2: WingDBG and subtransactions.

2005-05-23 Thread Lennart Regebro
WingDBG does this: tx = get_transaction().sub() That fails because 'Transaction' object has not attribute 'sub'. This is obviously an effect of the moving from subtransactions to checkpoints. Question: Is it Zope2.8 taht is wrong or WingDBG? -- Lennart Regebro, Nuxeo http://www.nuxeo.com/

[Zope-dev] Possible 2.8b2 bug part 3:

2005-05-23 Thread Lennart Regebro
DateTime.DateTime.strftime(fmt) used to use strftime, which accepts a unicode string as fmt. In 2.8 it uses datetime.datetime.strftime which does not accept unicode. This both breaks backwards compatibility, and prevents you from using non-ascii characters in the format string. Thoughts,

Re: [Zope-dev] Possible 2.8b2 bug part 3:

2005-05-23 Thread Andreas Jung
--On Montag, 23. Mai 2005 19:22 Uhr +0200 Lennart Regebro [EMAIL PROTECTED] wrote: DateTime.DateTime.strftime(fmt) used to use strftime, which accepts a unicode string as fmt. In 2.8 it uses datetime.datetime.strftime which does not accept unicode. This both breaks backwards compatibility,

Re: [Zope-dev] Possible 2.8b2 bug part 3:

2005-05-23 Thread Lennart Regebro
On 5/23/05, Andreas Jung [EMAIL PROTECTED] wrote: I am pretty sure you can build a workaround easily. In my point of view the reason for the change (support for dates outside the usual 1970..2038 scope) is more important. Well, I don't think we personally use any non-ascii characters, so we

Re: [Zope-dev] proxydict problems in 2.8b2 with Localizer

2005-05-23 Thread Dieter Maurer
Lennart Regebro wrote at 2005-5-23 13:29 +0200: I get TypeError: object does not support item assignment in lin 46 och class_init.py. The offending code is d['_implicit__name__'] = 1 and this is because d is a proxydict. This in turn is caused by Localizer having a class as a class attribute:

Re: [Zope-dev] Possible 2.8b2 bug part 3:

2005-05-23 Thread Andreas Jung
--On Montag, 23. Mai 2005 20:22 Uhr +0200 Lennart Regebro [EMAIL PROTECTED] wrote: The translation tools will typically return unicode, and bam! it stops working. So, if we can't properly support unicode, I'd actually prefer that we cast the format string to string, perhaps with a deprecated

Re: [Zope-dev] Possible 2.8b2 bug part 3:

2005-05-23 Thread Lennart Regebro
On 5/23/05, Andreas Jung [EMAIL PROTECTED] wrote: A deprecation warning could do the job. To be honest I would have never thought about such a usecase :-) However we could convert unicode to utf8 and use this as argument for strftime() and converting the result back to unicode. Yeah, that

Re: [Zope-dev] proxydict problems in 2.8b2 with Localizer

2005-05-23 Thread Lennart Regebro
On 5/23/05, Dieter Maurer [EMAIL PROTECTED] wrote: Lennart Regebro wrote at 2005-5-23 13:29 +0200: I get TypeError: object does not support item assignment in lin 46 och class_init.py. The offending code is d['_implicit__name__'] = 1 and this is because d is a proxydict. This in turn is

Re: [Zope-dev] Possible 2.8b2 bug part 3:

2005-05-23 Thread Andreas Jung
--On Montag, 23. Mai 2005 20:40 Uhr +0200 Lennart Regebro [EMAIL PROTECTED] wrote: On 5/23/05, Andreas Jung [EMAIL PROTECTED] wrote: A deprecation warning could do the job. To be honest I would have never thought about such a usecase :-) However we could convert unicode to utf8 and use

Re: [Zope] Still. Zope date datatype and TimeZone formatting problems.

2005-05-23 Thread Tino Wildenhain
Am Sonntag, den 22.05.2005, 13:01 -0500 schrieb Felipe Barousse Boue: Zopistas: I am experiencing the same problem you described by Mr. Hong Yuan in his post a few from last March. I have Zope 2.7.4, python 2.3.4 and PostgreSQL 8.0 and psycopg as DB adapter. All my dates stores in

Re: [Zope] How can I get context property in DTML ? (example)

2005-05-23 Thread Hugo Ramos
Yellow, Just place an index_html object inside dir1 with this code: dtml-var bar Then call the following URL's: http://yourserver/dir1/ http://yourserver/dir2/ http://yourserver/dir3/ Regards hr On 5/23/05, KLEIN Stphane [EMAIL PROTECTED] wrote: Hello, In DTML I would like to do that :

[Zope] UnicodeDecodeError

2005-05-23 Thread Joern Wallstabe
Hello, i would like to feed a zpt form with data from a python dictionary via a python script zpt snippet: textarea name=title:record:ulines rows=3 cols=65 tal:span content=python:context.printDict(here.dict)/ /textarea python script prinDict: keys_ = dict.keys() keys_.sort() lines=[]

Re: [Zope] How can I get context property in DTML ? (example)

2005-05-23 Thread Tino Wildenhain
Am Montag, den 23.05.2005, 10:37 +0200 schrieb KLEIN Stéphane: Hello, In DTML I would like to do that : I've this directory : dir1 | dir2 | dir3 dir1 has property bar=1 dir2 has property bar=2 dir3 has property bar=3 I would like a foo_html DTML Document file which

Fwd: [Zope] How can I get context property in DTML ? (example)

2005-05-23 Thread Hugo Ramos
Sorry... Forgot to say that the index_html obect should be a DTML Method!!! Regards hr -- Forwarded message -- From: Hugo Ramos [EMAIL PROTECTED] Date: May 23, 2005 9:44 AM Subject: Re: [Zope] How can I get context property in DTML ? (example) To: zope@zope.org Yellow, Just

Re: [Zope] UnicodeDecodeError

2005-05-23 Thread Andreas Jung
--On Montag, 23. Mai 2005 10:35 Uhr +0200 Joern Wallstabe [EMAIL PROTECTED] wrote: I'm always getting a UnicodeDecodeError. To every error message belongs a traceback where you can see *where* the error occurs...another try? -aj pgpo0qQ4ukTs7.pgp Description: PGP signature

Re: [Zope] UnicodeDecodeError

2005-05-23 Thread Joern Wallstabe
Andreas Jung wrote: --On Montag, 23. Mai 2005 10:35 Uhr +0200 Joern Wallstabe [EMAIL PROTECTED] wrote: I'm always getting a UnicodeDecodeError. To every error message belongs a traceback where you can see *where* the error occurs...another try? -aj the script decodes unicode

Re: [Zope] UnicodeDecodeError

2005-05-23 Thread Andreas Jung
--On Montag, 23. Mai 2005 11:18 Uhr +0200 Joern Wallstabe [EMAIL PROTECTED] wrote: the script decodes unicode 'Spécification' - utf8 'Sp\xc3\xa9cification' the error is raised during zpt processing. by the way python default default encoding is set to ascii. hm...I can't reproduce

[Zope] Re: How can I get context property in DTML ? (example)

2005-05-23 Thread KLEIN Stéphane
Tino Wildenhain a écrit : Am Montag, den 23.05.2005, 10:37 +0200 schrieb KLEIN Stéphane: Hello, In DTML I would like to do that : I've this directory : dir1 | dir2 | dir3 dir1 has property bar=1 dir2 has property bar=2 dir3 has property bar=3 I would like a foo_html DTML

Re: [Zope] UnicodeDecodeError

2005-05-23 Thread Tino Wildenhain
Am Montag, den 23.05.2005, 10:35 +0200 schrieb Joern Wallstabe: Hello, i would like to feed a zpt form with data from a python dictionary via a python script zpt snippet: textarea name=title:record:ulines rows=3 cols=65 tal:span content=python:context.printDict(here.dict)/ This is

Re: [Zope] UnicodeDecodeError

2005-05-23 Thread Joern Wallstabe
Thank you all for replying - now it works I got utf-8 string in my form. Seem Zopes ZPT system is trying to do the encoding, depending on on setHeader() method. So if this header is set you can simply return unicode strings. Strange setting cmf default charset to utf-8 doesn't work :-( Am

Re: [Zope] Re: Keyword index search

2005-05-23 Thread Garito
Tres Seaver escribió: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Garito wrote: Dieter Maurer escribió: Garito wrote at 2005-5-20 12:41 +0200: ... I have a ZCatalog object with a keywordindex called keywords I would like to search some objects with keywords ['k1', 'k2',

[Zope] Help support the open-source day

2005-05-23 Thread chalu
Help support a day for the open-source movement. http://opensourceday.contagiousmedia.org/ This is a part of Contagious Media showdown project. There is an open-source day entry where you can vote one of days for the open-source. The Contagious Media showdown is mentioned in the New York

Re: [Zope] UnicodeDecodeError

2005-05-23 Thread Dieter Maurer
Joern Wallstabe wrote at 2005-5-23 11:18 +0200: ... the error is raised during zpt processing. by the way python default default encoding is set to ascii. FSControllerPageTemplate at /cmf/edit_form used for /cmf/Members/wal/myid Module StringIO, line 203, in getvalue UnicodeDecodeError:

Re: [Zope] Equivalent of context ZPT variable in DTML ?

2005-05-23 Thread J Cameron Cooper
KLEIN Stéphane wrote: What is the equivalent in DTML of ZPT context variable ? There is no precise equivalent. The current context in DTML is folded into the DTML namespace, along with the request and call parameters and anything else that might be put in the namespace. --jcc --

Re: [Zope] Re: HTML post processing in Zope

2005-05-23 Thread Chris Withers
Cyrille Bonnet wrote: Hi all, I got the filter to work. I just added 3 lines of code in ZPublisher.HTTPResponse.HTTPResponse (thanks for your suggestion, Dieter): doctype_str_search = re.compile(r'!DOCTYPE.*') body = doctype_str_search.sub('!DOCTYPE HTML PUBLIC -//W3C//DTD

[Zope] Re: HTML post processing in Zope

2005-05-23 Thread Cyrille Bonnet
Hi Chris, Well, you'd better believe it :-) It works for me so far. But if you have specific examples that I can use to improve the filter, they would be very welcome. Two additional things that I had to do to be HTML 4.01 compliant: * replace html ... with html (remove the namespace

Re: [Zope] Hiding HTML URL

2005-05-23 Thread David H
Chris, I didn't address any of the points you made, but I've decided to address two: (1) When I asked what was inherently defective about a stable URL you answered: a) It's grim to debug Chris, do you really depend on their users to report URLS to support when things go wrong? I use

Re: [Zope] Can ZPT form call a url?

2005-05-23 Thread Andreas Jung
--On Montag, 23. Mai 2005 22:36 Uhr -0400 James O'Keefe [EMAIL PROTECTED] wrote: On our website we have a form where by a person can subscribe to our announcements list. It is the standard mailman form. We would like to expand on that form such that a user can enter their email address