Re: [Zope-dev] I agree that ZClasses should stay. I will volunteer

2006-03-25 Thread Dieter Maurer
Andreas Jung wrote at 2006-3-24 19:32 +0100:
> ...
>> I am also very interested in versions, and maintaining versions.
>
>I think versions are history and have gone in Zope 2.8 or even Zope 2.7.

"FileStorage" still supports them -- thus it is still easy to
use them in a separate product.

I am not sure, whether the "Version" hook in "ZPublisher"
has been removed. If it happened, it would not be difficult
to get it back...

> ...
>Fast is only one point of successful software development. How to you meet 
>the goals extensibility &  maintenance with ZClasses or do you write only
>write-once-throw-away apps?

You can easily extend ZClasses (in the same way you created them).
You can also maintain them -- what you loose it the version
history a revision control system would provide.
For many situations, this is not necessary...


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


Re: [Zope-dev] IMO ZClasses should stay

2006-03-25 Thread Dieter Maurer
Andreas Jung wrote at 2006-3-25 08:19 +0100:
> ...
>> I am very happy to read this...
>>
>
>I still have no idea why you are behind ZClasses?

It is nice to have an UI supported way to build applications.
ZClasses are in many cases easier than Python based product
development.

> ...
>ZClasses will stay for the time 
>being but they should be regarded as a bad solution for new projects.

Only because the thread is pending to remove them...
Otherwise, they are nice for some types of projects.

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


Re: XML export/import is cool! (Was Re: [Zope-dev] Deprecating XML export/import?)

2006-03-25 Thread Yoshinori Okuji
On Saturday 25 March 2006 15:56, Andreas Jung wrote:
> Zope 2.7 throws a BadPickleGet, 12 exception, Zope 2.8 throws
> BadPickleGet, 13 and Zope 2.9 raises the described UnicodeDecodeError.
> I don't expect that the import functionality works for even more complex
> objects. So I consider the whole functionality as totally broken. The
> generated XML might be useful to perform any processing outside Zope but
> using it for re-importing it into another Zope systems definitely does
> _not_  work. So if the functionality should remain in Zope then it should
> be fixed
> for Zope 2.10 lately.

Here is a quick patch for this problem (against 2.9.1). There were two 
different problems:

- the id attributes were not generated, because the conditional was reverse.

- unlike xmllib, expat always returns Unicode data, so simply concatenating 
binary values generates Unicode objects with non-ascii characters.

For the latter problem, I'm not sure if my patch is enough. But this patch 
works with a simple dtml export/import.

YO
-- 
Yoshinori Okuji, Nexedi CTO
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com
ERP5 Wiki: Developer Zone for ERP5 Community
http://wiki.erp5.org
diff -urN Zope-2.9.1.orig/Dependencies/Shared-Zope-2.9.1/Shared/DC/xml/ppml.py Zope-2.9.1/Dependencies/Shared-Zope-2.9.1/Shared/DC/xml/ppml.py
--- Zope-2.9.1.orig/Dependencies/Shared-Zope-2.9.1/Shared/DC/xml/ppml.py	2006-03-15 17:11:00.0 +0100
+++ Zope-2.9.1/Dependencies/Shared-Zope-2.9.1/Shared/DC/xml/ppml.py	2006-03-25 21:31:25.183545415 +0100
@@ -414,14 +414,14 @@
 def load_binput(self):
 i = mloads('i' + self.read(1) + '\000\000\000')
 last = self.stack[-1]
-if getattr(last, 'id', last) is not last:
+if getattr(last, 'id', last) is last:
 last.id = self.idprefix + `i`
 dispatch[BINPUT] = load_binput
 
 def load_long_binput(self):
 i = mloads('i' + self.read(4))
 last = self.stack[-1]
-if getattr(last, 'id', last) is not last:
+if getattr(last, 'id', last) is last:
 last.id = self.idprefix + `i`
 dispatch[LONG_BINPUT] = load_long_binput
 
@@ -643,10 +643,10 @@
 'pickle': lambda self, tag, attrs: [tag, attrs],
 }
 end_handlers={
-'pickle': lambda self, tag, data: data[2]+'.',
+'pickle': lambda self, tag, data: str(data[2])+'.',
 'none': lambda self, tag, data: 'N',
 'int': save_int,
-'long': lambda self, tag, data: 'L'+data[2]+'L\012',
+'long': lambda self, tag, data: 'L'+str(data[2])+'L\012',
 'float': save_float,
 'string': save_string,
 'reference': save_reference,
___
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: XML export/import is cool! (Was Re: Deprecating XML export/import?)

2006-03-25 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:

> --On 24. März 2006 11:07:06 -0500 Jim Fulton <[EMAIL PROTECTED]> wrote:
> 
>>
>>> - it was broken multiple times in the past, it still has problems
>>
>> How so?
> 
> The import functionality seem to be broken since at least Zope 2.7.
> 
> I created a DTML method exported it and _tried_ to reimport it.
> 
> Zope 2.7 throws a BadPickleGet, 12 exception,

I just exported the stock 'standard_error_message' as XML and
re-imported it successfully in a brand new Zope-2_7-branch instance.

> Zope 2.8 throws> BadPickleGet, 13

Likewise, my import succeeded in a Zope-2_8-instance, both with the XML
file exported from 2.7 and with one created from 2.8.

> Zope 2.9 raises the described UnicodeDecodeError.

My Zope-2_9-branch instance was successfully able to import the XML file
from 2.7, but raises a UnicodeDecode error on the file it produces, as
well as the one created from 2.8.  The stack trace here makes it seem as
though Python 2.4.2's expat parser is at fault:  it is introducing
non-ASCII characters into the stream where none exist in the source:

(Pdb) u
/home/tseaver/projects/Zope-CVS/Zope-2_9-branch/lib/python/OFS/XMLExportImport.py(114)importXML()
- -> r=p.Parse(data)
(Pdb) print [x for x in data if ord(x) > 127]
[]
(Pdb) d
>
/home/tseaver/projects/Zope-CVS/Python-2.4.3c1/Modules/pyexpat.c(639)EndElement()
- -> ("(N)", string_intern(self, name)))
(Pdb) d
>
/home/tseaver/projects/Zope-CVS/Zope-2_9-branch/lib/python/Shared/DC/xml/xyap.py(58)unknown_endtag()
- -> top = end[tag](self, tag, top)
(Pdb) print [type(x) for x in top]
[, , , ]
(Pdb) print [x for x in top[-1] if ord(x) > 127]
['\xcb']
(Pdb) print [chr(ord(x)) for x in top[-1][10:25]]
['U', '\x03', 'r', 'a', 'w', 'T', '\xcb', '\x04', '\x00', '\x00', '<',
'd', 't', 'm', 'l']

That output seems to me to indicate that the start of the CDATA section
is the problem.

> I don't expect that the import functionality works for even more complex
> objects. So I consider the whole functionality as totally broken. The
> generated XML might be useful to perform any processing outside Zope but
> using it for re-importing it into another Zope systems definitely does
> _not_  work. So if the functionality should remain in Zope then it
> should be fixed for Zope 2.10 lately.

I've just tried again, running with Python 2.4.3c1, because several of
the changelog entries for the release suggest that unicode / encoding /
expat stuff may have been fixed:  the decode error is still present.


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

iD8DBQFEJZsA+gerLs4ltQ4RArirAKC+a8k1GBTrujZ2uu5hygxnkSk9HACeLiAK
n+8RTUlzAnsdBAkTDQ730mk=
=6CcM
-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] Re: Wishlist Item

2006-03-25 Thread Andreas Jung



--On 25. März 2006 13:14:06 -0500 Tres Seaver <[EMAIL PROTECTED]> 
wrote:


FileSystemSite

  This is a repackaging of the CMF's FileSystem Directory Views such
  that it is independent of the CMF.


CMF or not - if one need such a functionality one can download CMF or
a related product. If such functionality should belong into the core than 
it should be implemented in a reusable way and frameworks like CMF should 
be build on top of it. So -1 for the request.


-aj


pgpkVUVgUfzeS.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] Re: Wishlist Item

2006-03-25 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:
> 
> 
> --On 24. März 2006 16:20:07 -0500 [EMAIL PROTECTED] wrote:
> 
>> I don't particularly care one way or the other about ZClasses.
>>
>> However, I would like to see FileSystemSite made part of the
>> base distribution.
>>
> 
> AFAIK FileSystemSite is something CMF-ish..so it does not belong
> to the Zope core.

- From the tarball in the Debian package[1]:

FileSystemSite

  This is a repackaging of the CMF's FileSystem Directory Views such
  that it is independent of the CMF.


This is basically like Chris McDonough's StandaloneSkins package[2].


[1] http://packages.debian.org/testing/web/zope-filesystemsite

[2] http://www.plope.com/Members/chrism/standalone_skins/newsitem_view


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

iD8DBQFEJYhu+gerLs4ltQ4RAvOyAKC2oycfK1aJR1tJPWVyUBM6+NnT2wCeOvu9
dl63SEAGswhcOT8m4NI61PU=
=NtDw
-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: XML export/import is cool! (Was Re: [Zope-dev] Deprecating XML export/import?)

2006-03-25 Thread Andreas Jung



--On 24. März 2006 11:07:06 -0500 Jim Fulton <[EMAIL PROTECTED]> wrote:



- it was broken multiple times in the past, it still has problems


How so?


The import functionality seem to be broken since at least Zope 2.7.

I created a DTML method exported it and _tried_ to reimport it.

Zope 2.7 throws a BadPickleGet, 12 exception, Zope 2.8 throws
BadPickleGet, 13 and Zope 2.9 raises the described UnicodeDecodeError.
I don't expect that the import functionality works for even more complex
objects. So I consider the whole functionality as totally broken. The 
generated XML might be useful to perform any processing outside Zope but 
using it for re-importing it into another Zope systems definitely does 
_not_  work. So if the functionality should remain in Zope then it should 
be fixed

for Zope 2.10 lately.

Andreas

pgpDsKQKSvaGQ.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] Re: Upcoming Zope 2.X releases

2006-03-25 Thread Philipp von Weitershausen
Andreas Jung wrote:
> As announced earlier I plan to release Zope 2.8.7 and 2.9.2 by
> next Monday...so as always: any pending fixes should be commited
> until Monday.

Can we have a Zope 3.2.1 along with Zope 2.9.2? There are a few bugfixes
on the Zope 3.2 branch (e.g. involving widgets, formlib, testbrowser)
that are relevant for Zope 2 as well.

If Stephan has no time and all it takes to generate a Zope 3.2 release
is running zpkg, I'd be willing to do it Sunday night.

Philipp
___
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] IMO ZClasses should stay

2006-03-25 Thread Stefan H. Holek

+1

I have handed systems with a thin ZClass layer on top to semi- 
developers and they were *easily* able to take it from there. These  
are people who would never have grokked (and bothered with) disk- 
based Python development and all the mumbo-jumbo it entails.


No other system has anything even remotely like this. People are  
*blown away* by the power of building objects TTW (define some  
properties, write a few scripts and templates, done!). Take that RoR,  
Django, Vignette, Broadvision, ... ;-)


Of course ZClasses have their limitations, but I fully agree that  
this is first and foremost a documentation problem.


Stefan


On 24. Mär 2006, at 17:25, Jim Fulton wrote:


On the subject of deprecation, for the record, I think removing
ZClasses is a mistake.  They have legitimate uses.  They have major
flaws too.  It would help if we would more clearly document their
limitations and pitfalls, rather than get rid of them, at least
until we have something better,


--
Anything that happens, happens.  --Douglas Adams


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