Re: [Zope-dev] trying out the buildout-based Zope 2.12...

2009-03-28 Thread Yoshinori Okuji
On Saturday 28 March 2009 06:11:30 Chris Withers wrote:
 Andreas Jung wrote:
  Stop with your approach right now until we have understood what's going
  wrong. Working with a SVN checkout from the trunk works (as said).

 I'm interested in actually solving what's wrong ;-)

 This feels like buildout doing something wrong, at the very least. It
 has a hard-nailed version for zope.app.security and appears to be
 ignoring that...

I don't think zope.app.security is nailed down in your buildout.cfg, because 
it is listed in extras_require in setup.py, so the version specification is 
not taken into account, if you specify just zope2. In fact, this works 
well:

[buildout]
parts = zopetest

[zopetest]
recipe = zc.recipe.egg
interpreter = py
eggs =
   zope2[zope_app]

I cannot say if this is a bug, since I don't know how zc.buildout is supposed 
to deal with versions for extras.

Regards,
YO
-- 
Yoshinori Okuji, Nexedi KK President
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.co.jp/
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com/
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org/
___
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: [Fwd: XML export/import is cool! (Was Re: [Zope-dev] Deprecating XML export/import?)]

2006-10-28 Thread Yoshinori Okuji
On Friday 27 October 2006 16:46, Lennart Regebro wrote:
 I would propose that somone that uses this heavily (like the Nexedi
 people), joins the Zope Foundation as a commiter, gets commiter rights
 and holds his or her hands over this functionality. :)

We are definitely willing to help the maintenance of this feature, but I am 
not sure what should be done. IIRC, Jim noted that it would be better to 
backport zope3's, while our patches are for zope2's. I don't have much time 
for now, so I don't think I can do that. If it is acceptable to simply fix 
the current code, we can provide patches.

 And if they could write some unittests that would be even better. :)

Sure, it is a good thing to write tests.

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://www.erp5.org
___
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 )


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

2006-03-24 Thread Yoshinori Okuji
On Friday 24 March 2006 17:33, Andreas Jung wrote:
  - it has no maintainer, nobody wants to touch it without gloves
 
  Is that any more true than for lots of other things?

 Right, but for duplicate functionality that is not widely used and that I
 consider buggy it is legitimate to propose the deprecation. But as usually
 I am open to good arguments :-)

We have been using XML export/import with ERP5[1] in many production systems 
for a long time. Only this feature allows us to understand changes among 
different versions in a human readable format, and even to edit the contents 
by ordinary text editors. Without this feature, it is nearly impossible to 
work on large systems in a distributed way. XML export/import is so valuable 
to make a bridge between TTW development and distributed development with the 
technology Business Template[2,3].

To make the feature more convenient, we have locally developed some monkey 
patches[4,5] to Zope so that:

- the output is more stable (i.e. the order of tags and the reference numbers 
are more stable) to make diff usable for human

- unicode objects work fine, assuming that data should be encoded in UTF-8

We would be happy to submit our patches, if you think they are generally 
useful.

[1] http://www.erp5.org
[2] http://wiki.erp5.org/HowToCreateBusinessTemplates
[3] http://wiki.erp5.org/HowToCreateBusinessTemplates
[4] http://cvs.erp5.org/ERP5Type/patches/XMLExportImport.py
[5] http://cvs.erp5.org/ERP5Type/patches/ppml.py

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