[Zope-Checkins] SVN: Zope/trunk/inst/versions.py 2.8.0 b1

2005-04-24 Thread Andreas Jung
Log message for revision 30141:
  2.8.0 b1
  

Changed:
  U   Zope/trunk/inst/versions.py

-=-
Modified: Zope/trunk/inst/versions.py
===
--- Zope/trunk/inst/versions.py 2005-04-24 07:03:12 UTC (rev 30140)
+++ Zope/trunk/inst/versions.py 2005-04-24 07:03:22 UTC (rev 30141)
@@ -4,4 +4,4 @@
 
 # always start prerelease branches with '0' to avoid upgrade
 # issues in RPMs
-VERSION_RELEASE_TAG = 'a2'
+VERSION_RELEASE_TAG = 'b1'

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


[Zope-Coders] Zope Bugs, Features, and Patches Collector: Open Issues

2005-04-24 Thread tseaver
The following supporters have open issues assigned to them in this collector
(http://www.zope.org/Collectors/Zope).

Assigned and Open


  Brian

- ZPT not being processed with text/vnd.wap.wml mime type,
  [Accepted] http://www.zope.org/Collectors/Zope/968


  Caseman

- ZCTextUndex should not hold a reference to a lexicon,
  [Accepted] http://www.zope.org/Collectors/Zope/505

- locale based sorting in ZCatalog,
  [Accepted] http://www.zope.org/Collectors/Zope/738


  LRA

- FileUpload not iterable,
  [Accepted] http://www.zope.org/Collectors/Zope/1199


  Tiran

- Zope 2.7 doesnot serve pages to some accept-charset request headers,
  [Accepted] http://www.zope.org/Collectors/Zope/1492


  ajung

- manage_catalogIndexes: '# objects' is misleading,
  [Accepted] http://www.zope.org/Collectors/Zope/1587

- Multilingual search gives a wrong results.,
  [Accepted] http://www.zope.org/Collectors/Zope/1343

- WebDAV broken in 2.7.0-b3,
  [Accepted] http://www.zope.org/Collectors/Zope/1145

- Mount-Points: documentation incomplete, behaviour surprising,
  [Accepted] http://www.zope.org/Collectors/Zope/1487

- Need a way to include non-xml valid structure in ZPT attributes,
  [Accepted] http://www.zope.org/Collectors/Zope/1281


  chrism

- ZODBMountPoint should not monkey-patch ZODB,
  [Accepted] http://www.zope.org/Collectors/Zope/1525

- poor error reporting on product initialization failure under windows,
  [Accepted] http://www.zope.org/Collectors/Zope/1020

- Potential bug in Python cgi.FieldStorage can lead to problematic memory 
growth,
  [Accepted] http://www.zope.org/Collectors/Zope/1685

- TemporaryStorage should be made MVCC-capable on HEAD,
  [Accepted] http://www.zope.org/Collectors/Zope/1526

- Lurking CPU eater in Transience,
  [Accepted] http://www.zope.org/Collectors/Zope/1633


  chrisw

- security.declareObjectProtected('View') appears to be buggy,
  [Accepted] http://www.zope.org/Collectors/Zope/1264

- Zope 2.7.3b1 DAV server doesn't provide DAV header,
  [Accepted] http://www.zope.org/Collectors/Zope/1518

- VHM and ZCatalog absolute paths,
  [Accepted] http://www.zope.org/Collectors/Zope/608

- default page encoding hardcoded to latin1,
  [Accepted] http://www.zope.org/Collectors/Zope/1490

- Debug Information Illegible,
  [Accepted] http://www.zope.org/Collectors/Zope/1736

- Windows Linefeeds in ZPT,
  [Accepted] http://www.zope.org/Collectors/Zope/1464


  ctheune

- hasattr_unacquired,
  [Accepted] http://www.zope.org/Collectors/Zope/742

- Shutdown ZEO Server under Windows,
  [Accepted] http://www.zope.org/Collectors/Zope/1508


  dreamcatcher

- PropertySheets xml_escape method with hardcoded encoding,
  [Accepted] http://www.zope.org/Collectors/Zope/1561


  efge

- default page encoding hardcoded to latin1,
  [Accepted] http://www.zope.org/Collectors/Zope/1490

- ZCatalog getObject broken,
  [Accepted] http://www.zope.org/Collectors/Zope/1713


  evan

- Cant declare classes in Scripts with 2.7 and Python 2.3,
  [Accepted] http://www.zope.org/Collectors/Zope/1074


  fdrake

- ZCTextUndex should not hold a reference to a lexicon,
  [Accepted] http://www.zope.org/Collectors/Zope/505

- [Weakness] analysis of Zope startup problems (log hidden),
  [Accepted] http://www.zope.org/Collectors/Zope/1285

- FTP server does not implement MLSD or MLST,
  [Accepted] http://www.zope.org/Collectors/Zope/1161

- Make possible to configure non-default logger hierarchies via zope.conf,
  [Accepted] http://www.zope.org/Collectors/Zope/1555


  htrd

- startup ConflictError,
  [Deferred] http://www.zope.org/Collectors/Zope/300


  jeremy

- Transaction Manager Brokenness,
  [Accepted] http://www.zope.org/Collectors/Zope/701

- ZODB load state error,
  [Accepted] http://www.zope.org/Collectors/Zope/1204


  jim

- aq_acquire on u'aq_parent',
  [Accepted] http://www.zope.org/Collectors/Zope/1738


  mcdonc

- filestream_iterator handling is not implemented for FastCGI protocol.,
  [Accepted] http://www.zope.org/Collectors/Zope/1647


  mj

- expectMultipleRanges test should use email package,
  [Accepted] http://www.zope.org/Collectors/Zope/579


  mjablonski

- Error in zmi when an object is named 'URL' or 'URL1',
  [Accepted] http://www.zope.org/Collectors/Zope/1217


  slinkp

- AcceleratedHTTPCacheManager doesn't PURGE correctly for virtual hosts,
  [Accepted] http://www.zope.org/Collectors/Zope/1447


  tim_one

- Zope 2.8/ZODB 3.3: Update all cPickle.Pickler instances to use protocal 
2,
  [Accepted] http://www.zope.org/Collectors/Zope/1519

- ZCTextUndex should not hold a reference to a lexicon,
  [Accepted] http://www.zope.org/Collectors/Zope/505

- ZODB load state 

[Zope-dev] 2.8.0b1 issues with plone 2.0.5

2005-04-24 Thread Tim Hicks
Apologies if this is already known about...

I just installed 2.8.0b1 (using python 2.3.5), fired it up, then tried to
add a 'plone site' (2.0.5).  The plone site actually did get added, but
here's what I got as well:


2005-04-24 12:57:32 ERROR Zope.ZCatalog Recataloging object at
/test/test/index_html failed
Traceback (most recent call last):
  File /home/tim/zope/2.8.0b1/lib/python/Products/ZCatalog/ZCatalog.py,
line 298, in refreshCatalog
self.catalog_object(obj, p, pghandler=pghandler)
TypeError: catalog_object() got an unexpected keyword argument 'pghandler'
2005-04-24 12:57:34 ERROR Zope.SiteErrorLog
http://glenmore.dyndns.org:7080/test/test/index_html
Traceback (most recent call last):
  File /home/tim/zope/2.8.0b1/lib/python/ZPublisher/Publish.py, line
113, in publish
request, bind=1)
  File /home/tim/zope/2.8.0b1/lib/python/ZPublisher/mapply.py, line 88,
in mapply
if debug is not None: return debug(object,args,context)
  File /home/tim/zope/2.8.0b1/lib/python/ZPublisher/Publish.py, line 40,
in call_object
result=apply(object,args) # Type scr to step into published object.
  File /home/tim/zope/2.7.4b2/Products/CMFCore/PortalContent.py, line
116, in __call__
return view()
  File /home/tim/zope/2.8.0b1/lib/python/Shared/DC/Scripts/Bindings.py,
line 311, in __call__
return self._bindAndExec(args, kw, None)
  File /home/tim/zope/2.8.0b1/lib/python/Shared/DC/Scripts/Bindings.py,
line 348, in _bindAndExec
return self._exec(bound_data, args, kw)
  File /home/tim/zope/2.7.4b2/Products/CMFCore/FSPageTemplate.py, line
191, in _exec
result = self.pt_render(extra_context=bound_names)
  File /home/tim/zope/2.7.4b2/Products/CMFCore/FSPageTemplate.py, line
124, in pt_render
result = FSPageTemplate.inheritedAttribute('pt_render')(
  File
/home/tim/zope/2.8.0b1/lib/python/Products/PageTemplates/PageTemplate.py,
line 96, in pt_render
c = self.pt_getContext()
TypeError: unbound method pt_getContext() must be called with
ZopePageTemplate instance as first argument (got nothing instead)

___
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] 2.8.0b1 issues with plone 2.0.5

2005-04-24 Thread Andreas Jung
Plone requires currently Zope 2.7 and does not support Zope 2.8 yet.
-aj
--On Sonntag, 24. April 2005 13:44 Uhr +0100 Tim Hicks 
[EMAIL PROTECTED] wrote:

Apologies if this is already known about...
I just installed 2.8.0b1 (using python 2.3.5), fired it up, then tried to
add a 'plone site' (2.0.5).  The plone site actually did get added, but
here's what I got as well:
2005-04-24 12:57:32 ERROR Zope.ZCatalog Recataloging object at
/test/test/index_html failed
Traceback (most recent call last):
  File /home/tim/zope/2.8.0b1/lib/python/Products/ZCatalog/ZCatalog.py,
line 298, in refreshCatalog
self.catalog_object(obj, p, pghandler=pghandler)
TypeError: catalog_object() got an unexpected keyword argument 'pghandler'
2005-04-24 12:57:34 ERROR Zope.SiteErrorLog
http://glenmore.dyndns.org:7080/test/test/index_html
Traceback (most recent call last):
  File /home/tim/zope/2.8.0b1/lib/python/ZPublisher/Publish.py, line
113, in publish
request, bind=1)
  File /home/tim/zope/2.8.0b1/lib/python/ZPublisher/mapply.py, line 88,
in mapply
if debug is not None: return debug(object,args,context)
  File /home/tim/zope/2.8.0b1/lib/python/ZPublisher/Publish.py, line 40,
in call_object
result=apply(object,args) # Type scr to step into published object.
  File /home/tim/zope/2.7.4b2/Products/CMFCore/PortalContent.py, line
116, in __call__
return view()
  File /home/tim/zope/2.8.0b1/lib/python/Shared/DC/Scripts/Bindings.py,
line 311, in __call__
return self._bindAndExec(args, kw, None)
  File /home/tim/zope/2.8.0b1/lib/python/Shared/DC/Scripts/Bindings.py,
line 348, in _bindAndExec
return self._exec(bound_data, args, kw)
  File /home/tim/zope/2.7.4b2/Products/CMFCore/FSPageTemplate.py, line
191, in _exec
result = self.pt_render(extra_context=bound_names)
  File /home/tim/zope/2.7.4b2/Products/CMFCore/FSPageTemplate.py, line
124, in pt_render
result = FSPageTemplate.inheritedAttribute('pt_render')(
  File
/home/tim/zope/2.8.0b1/lib/python/Products/PageTemplates/PageTemplate.py
, line 96, in pt_render
c = self.pt_getContext()
TypeError: unbound method pt_getContext() must be called with
ZopePageTemplate instance as first argument (got nothing instead)
___
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 )




pgp3s1A4CIOWb.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] 2.8.0b1 issues with plone 2.0.5

2005-04-24 Thread Tim Hicks
Tim Hicks said:



   File /home/tim/zope/2.8.0b1/lib/python/ZPublisher/Publish.py, line 40,
 in call_object
 result=apply(object,args) # Type scr to step into published object.
   File /home/tim/zope/2.7.4b2/Products/CMFCore/PortalContent.py, line
 116, in __call__
 return view()

Eek, just noticed that for some reason I seem to have some 2.7.4b2 mixed
up in here.  Not sure how/why that would happen.  I have one copy of all
my products and then symlink to them for each of my zope instances.  Could
it be the cause of my problem?

tim
___
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] 2.8.0b1 issues with plone 2.0.5

2005-04-24 Thread Andreas Jung

--On Sonntag, 24. April 2005 13:49 Uhr +0100 Tim Hicks 
[EMAIL PROTECTED] wrote:

Tim Hicks said:

  File /home/tim/zope/2.8.0b1/lib/python/ZPublisher/Publish.py, line
  40, in call_object
result=apply(object,args) # Type scr to step into published object.
  File /home/tim/zope/2.7.4b2/Products/CMFCore/PortalContent.py, line
116, in __call__
return view()
Eek, just noticed that for some reason I seem to have some 2.7.4b2 mixed
up in here.  Not sure how/why that would happen.  I have one copy of all
my products and then symlink to them for each of my zope instances.  Could
it be the cause of my problem?
As said you should stick with the supported and recommended software 
versions
(for now).

-aj

pgpFWHuvA3NGX.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: BTreeFolder2 for Zope 2.8?

2005-04-24 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:
 Any objections to move BTreeFolder2 into the Zope core for Zope 2.8?
 BTF is widely used in  the Zope, CMF  Plone world and it would not hurt
 to ship it with Zope.

Shane, OK with you?

Tres.
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  Zope Dealers   http://www.zope.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCbBezGqWXf00rNCgRAizWAJ9jdHC2Tme0P4VzQTCk5zrLWW85owCeJSQH
EluHyriviB/oigsaFDFSNDg=
=ZXcn
-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] Re: BTreeFolder2 for Zope 2.8?

2005-04-24 Thread Shane Hathaway
Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Andreas Jung wrote:
 
Any objections to move BTreeFolder2 into the Zope core for Zope 2.8?
BTF is widely used in  the Zope, CMF  Plone world and it would not hurt
to ship it with Zope.
 
 
 Shane, OK with you?

By all means, go ahead!

Shane
___
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] Zope Starting Error

2005-04-24 Thread Jonathan Goldberg
Can someone please help me resolve the following error:

Error: The object named by DBTab.ClassFactories.autoClassFactory could not be imported
(line 903 in file:///home/jgoldberg/my_zope/etc/zope.conf)
For help, use /opt/Zope-2.7/lib/python/Zope/Startup/zopectl.py -h

Thank you,
Jonathan Goldberg
___
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] [ANN] Zope 2.8.0 beta 1 released

2005-04-24 Thread Andreas Jung

Dear Zope Community,
on behalf of Zope Corporation and all Zope 2 developers and contributors
I am pleased to announce the release of Zope 2.8.0 b1.
Zope 2.8.0 b1 can be downloaded from
  http://www.zope.org/Products/Zope/2.8.0b1
The release notes can be found at
  http://www.zope.org/Products/Zope/2.8.0b1/CHANGES.txt
For information on using Python 2.4 with Zope 2.8: see doc/INSTALL.txt
Every developer is strongly encouraged to test Zope 2.8 beta 1 *now* and not
to wait until the final Zope 2.8 release...that's why we have beta releases 
:-)
The quality and stability of the final release depends on *your* testing 
*now*.

This release is a major step towards Zope 2.8.0 final (scheduled for the 
3rd week of May
2005) and now includes for the first time the Five framework to make some
Zope 3 technologies available within Zope 2. So you will be able to use Z3
technologies like interfaces, adapters, schemas and views within your Zope
2 installation and have hopefully the best from the Zope 2 and the Zope 3 
world.

Andreas Jung
Zope 2 Release Manager

pgprgXOZv7cd2.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] CMF 1.5.1 Released

2005-04-24 Thread Jens Vagelpohl
Zope Corporation is pleased to announce the release of version 1.5.1 of 
the Zope Content Management Framework (CMF). This release marks the 
latest stable release in the CMF 1.5 series and should be suitable for 
production use.

What is the CMF?
The Zope Content Management Framework provides a set of
services and content objects useful for building highly
dynamic, content-oriented portal sites.  As packaged, the
CMF generates a site much like the Zope.org site.  The CMF is
intended to be easily customizable, in terms of both the
types of content used and the policies and services it
provides.
Where do I get it?
Download it from http://zope.org/Products/CMF/CMF-1.5.1
Points of interest include:
- Windows ZIP file,
  http://zope.org/Products/CMF/CMF-1.5.1/CMF-1.5.1.zip
- Unix tar/gzip archive,
  http://zope.org/Products/CMF/CMF-1.5.1/CMF-1.5.1.tar.gz
- Release notes,
  http://zope.org/Products/CMF/CMF-1.5.1/README.txt
- Change history,
  http://zope.org/Products/CMF/CMF-1.5.1/CHANGES.txt
- Installation instructions,
  http://zope.org/Products/CMF/CMF-1.5.1/INSTALL.txt
Where do I go to learn more?
The CMF mailing list:mailto:[EMAIL PROTECTED] has many
participants who are active in supporting the CMF.
...to report bugs?
The CMF Collector:http://zope.org/Collectors/CMF
is ths place to report bugs (please search for existing
reports of your issue first!)

---
Jens Vagelpohl  [EMAIL PROTECTED]
Zetwork GmbHhttp://www.zetwork.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] How to convert Zope instance charset?

2005-04-24 Thread Daniel Dekany
I have a Zope instance that uses utf-8 for everything. Since
Python/Zope/etc practically doesn't support utf-8, I would like to
switch over to ISO-8859-2 (for everything). The problem is that this
instance is a fat site that is on-line for several months, so I have to
convert the strings stored inside the lot of already existing objects of
the ZODB. Any idea how to do it, like an already existing tool for it?

-- 
Best regards,
 Daniel Dekany

___
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] How to convert Zope instance charset?

2005-04-24 Thread Andreas Jung

--On Sonntag, 24. April 2005 14:18 Uhr +0200 Daniel Dekany 
[EMAIL PROTECTED] wrote:

I have a Zope instance that uses utf-8 for everything. Since
Python/Zope/etc practically doesn't support utf-8,
Please explain in which sense Zope would not support utf-8. For your 
information:
Plone has UTF8 as default charset. In general Zope does not care much about
encoded strings except for some conversions. Dealing with utf8 might be 
tricky
in some cases but saying Zope does not support Utf-8 is wrong.

-aj


pgpGiUxj5L8zA.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] How to convert Zope instance charset?

2005-04-24 Thread Daniel Dekany
Sunday, April 24, 2005, 2:36:24 PM, Andreas Jung wrote:

 --On Sonntag, 24. April 2005 14:18 Uhr +0200 Daniel Dekany
 [EMAIL PROTECTED] wrote:

 I have a Zope instance that uses utf-8 for everything. Since
 Python/Zope/etc practically doesn't support utf-8,

 Please explain in which sense Zope would not support utf-8. For your 
 information:

It can't sort strings alphabetically *anywhere* (concretely: the
accented letters will go to the end of the list -- I guess because 0x80
is mathematically greater than the code of the US-ASCII characters).
Kind of basic fundamental thing for a portal, or for text handling in
general. I have asked here earlier how to solve it, but there was no
answer that could be applied in practice (i.e. the answer was that I
should write custom fixes for each individual products, and/or write a
patch for Zope, and then maybe for Python... If so, this is equal of
saying that UTF-8 is not supported yet).

 Plone has UTF8 as default charset.

Aha. Then this is why this Plone site I should fix/maintain used UTF-8
everywhere. I believed it was a bad decision of my predecessor. (But
then this problem is even more mysterious for me: *if* it doesn't
working (yet), then why did the Plone authors chose that?)

 In general Zope does not care much about
 encoded strings except for some conversions. Dealing with utf8 might be
 tricky
 in some cases but saying Zope does not support Utf-8 is wrong.

Believe me, I really hope I'm wrong. So how could I achieve that strings
are sorted correctly? If it works for someone, how? (I have locale
hu_HU.UTF-8 in zope.conf, I have even printed
locale.getlocale(locale.LC_COLLATE) from products and external methods,
and it was hu_HU.UTF-8. Note that at least on Python level sorting with
hu_HU.ISO-8859-2 works... so I hope it would work with Plone as well.)

 -aj

-- 
Best regards,
 Daniel Dekany

___
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] How to convert Zope instance charset?

2005-04-24 Thread Andreas Jung

--On Sonntag, 24. April 2005 16:03 Uhr +0200 Daniel Dekany 
[EMAIL PROTECTED] wrote:

Sunday, April 24, 2005, 2:36:24 PM, Andreas Jung wrote:
--On Sonntag, 24. April 2005 14:18 Uhr +0200 Daniel Dekany
[EMAIL PROTECTED] wrote:
I have a Zope instance that uses utf-8 for everything. Since
Python/Zope/etc practically doesn't support utf-8,
Please explain in which sense Zope would not support utf-8. For your
information:
It can't sort strings alphabetically *anywhere* (concretely: the
accented letters will go to the end of the list -- I guess because 0x80
is mathematically greater than the code of the US-ASCII characters).
This is neither a problem of Zope nor of Python! A Python string has no
notion an an encoding. The sort method can not smell the encoding. Instead
use Python unicode strings and depend on the sorting order defined by
the Unicode standard. This is an application-level problem but not a
server-side problem.

Plone has UTF8 as default charset.
Believe me, I really hope I'm wrong. So how could I achieve that strings
are sorted correctly? If it works for someone, how? (I have locale
hu_HU.UTF-8 in zope.conf, I have even printed
locale.getlocale(locale.LC_COLLATE) from products and external methods,
and it was hu_HU.UTF-8. Note that at least on Python level sorting with
hu_HU.ISO-8859-2 works... so I hope it would work with Plone as well.)
see above..Also the standard sort() methods of Python does not care about 
your
locales (why should it)strings are streams of bytes...nothing else...
sort() accepts a user-defined comparison method of implement user-specific
sorting. And there are also methods in Python locale module to perform
locale-dependent comparison.

Once again: you must solve your problem on the application layer...Zope does
not help you at this point because it can't.
-aj


pgp079YlETq1G.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] How to convert Zope instance charset?

2005-04-24 Thread Daniel Dekany
Sunday, April 24, 2005, 4:22:10 PM, Andreas Jung wrote:



 --On Sonntag, 24. April 2005 16:03 Uhr +0200 Daniel Dekany 
 [EMAIL PROTECTED] wrote:

 Sunday, April 24, 2005, 2:36:24 PM, Andreas Jung wrote:

 --On Sonntag, 24. April 2005 14:18 Uhr +0200 Daniel Dekany
 [EMAIL PROTECTED] wrote:

 I have a Zope instance that uses utf-8 for everything. Since
 Python/Zope/etc practically doesn't support utf-8,

 Please explain in which sense Zope would not support utf-8. For your
 information:

 It can't sort strings alphabetically *anywhere* (concretely: the
 accented letters will go to the end of the list -- I guess because 0x80
 is mathematically greater than the code of the US-ASCII characters).

 This is neither a problem of Zope nor of Python! A Python string has no
 notion an an encoding. The sort method can not smell the encoding.

First of all, in this thread I don't care whose mistake it is. My
concern is if I can use Zope with UTF-8 (in fact, Plone) in reality or
not. Assume that I'm using a few non-US-ASCII characters, and I want
sometimes show things alphabetically sorted...

Then, of course if something wants to collate string for human reading,
it will use locale.strcoll, which do consider charset and locale. That
locale.strcoll is wrong with UTF-8, that's certainly the mistake of
Python, right?

 Instead use Python unicode strings and depend on the sorting order
 defined by the Unicode standard.

I take that advice, but unfortunately it's not about my Python code, but
about other people's Python code.

 This is an application-level problem but not a server-side problem.

Zope itself gives a method for sorting strings:
DocumentTemplate.sequence.sort. Many of the products relies on that for
sorting. And that sorts UTF-8 incorrectly (I guess because
locale.strcoll does it incorrectly). Also, ZCatalog sorts incorrectly
(surely for the same reason), which is also the part of the standard
Zope distribution.

 Plone has UTF8 as default charset.

 Believe me, I really hope I'm wrong. So how could I achieve that strings
 are sorted correctly? If it works for someone, how? (I have locale
 hu_HU.UTF-8 in zope.conf, I have even printed
 locale.getlocale(locale.LC_COLLATE) from products and external methods,
 and it was hu_HU.UTF-8. Note that at least on Python level sorting with
 hu_HU.ISO-8859-2 works... so I hope it would work with Plone as well.)


 see above..Also the standard sort() methods of Python does not care about
 your
 locales (why should it)strings are streams of bytes...nothing else...

I know, and I have referred to locale.strcoll, which does care about
encoding and locale. Seems many products use that (indirectly) when they
want to sort something.

 sort() accepts a user-defined comparison method of implement user-specific
 sorting.

Yes, but this doesn't help, unless I write an UTF-8 comparison method,
and then find all sort() and locale.sort() calls in Zope, Plone, and in
other products, and patch them all...

 And there are also methods in Python locale module to perform
 locale-dependent comparison.

Which I can't get working with UTF-8, it puts non-US-ASCII letters at
the end of the list. Somebody did? How? I'm all ears. I guess the Plone
site should suddenly sort correctly then, at least on the places where
the programmer of the Zope product was wise enough not to use raw
sort().

 Once again: you must solve your problem on the application layer...

(Anyway string collation is not an application level problem in
principle. It is the same for a book store application and for a first
person shooter, there is nothing application specific in it. If Python
is not mature enough to take this task, that's a different question.)

 Zope does not help you at this point because it can't.

So however I formulate it, the end is that you *practically* can't use
UTF-8 with Zope, unless you are using a language that doesn't use
non-US-ASCII characters, in which case you don't utilize UTF-8. Hence, I
said it is not supported... It doesn't mean that it is the mistake of
Zope, it just means that you can't use it.

So, back to the topic... Since UTF-8 is not working (it seems), how
could I convert that already filled instance to use ISO-8859-2 instead
of UTF-8? Some tool helps me in it done relatively easy?

 -aj

-- 
Best regards,
 Daniel Dekany

___
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: How to convert Zope instance charset?

2005-04-24 Thread Max M
Daniel Dekany wrote:
Sunday, April 24, 2005, 4:22:10 PM, Andreas Jung wrote:

Zope itself gives a method for sorting strings:
DocumentTemplate.sequence.sort. Many of the products relies on that for
sorting. And that sorts UTF-8 incorrectly

Then it will probably be easiest to just patch it up to sort correctly. 
Or file a bug in the collector.


--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
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] How to convert Zope instance charset?

2005-04-24 Thread Andreas Jung

--On Sonntag, 24. April 2005 17:45 Uhr +0200 Daniel Dekany 
[EMAIL PROTECTED] wrote:

Sunday, April 24, 2005, 4:22:10 PM, Andreas Jung wrote:
First of all, in this thread I don't care whose mistake it is. My
concern is if I can use Zope with UTF-8 (in fact, Plone) in reality or
not. Assume that I'm using a few non-US-ASCII characters, and I want
sometimes show things alphabetically sorted...
You're not getting the point. As long as you handle with Python string
and not with unicode strings then there is no way in Zope deal correctly
with different kind of encodings...As I said...it is an application side
problem.  Zope and Python provide you the tools to deal with UTF8 but
you need to solve such problems on in your application.  That's my last
comment on this issue :-)
-aj

pgpKQwvMkvMQx.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: How to convert Zope instance charset?

2005-04-24 Thread Andreas Jung

--On Sonntag, 24. April 2005 18:01 Uhr +0200 Max M [EMAIL PROTECTED] wrote:
Daniel Dekany wrote:
Sunday, April 24, 2005, 4:22:10 PM, Andreas Jung wrote:

Zope itself gives a method for sorting strings:
DocumentTemplate.sequence.sort. Many of the products relies on that for
sorting. And that sorts UTF-8 incorrectly

Then it will probably be easiest to just patch it up to sort correctly.
Or file a bug in the collector.
A candidate for a reject. I pointed out that the sort method can not smell
your encoding. If you deal with encodings and deal with it in the right way
but don't expect that the underlying framework can smell or guess what kind
of encoding your application uses. Otherwise: use Python unicode strings
*only* and *overall*.
-aj

pgpJUuA2BO8rq.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] Re: How to convert Zope instance charset?

2005-04-24 Thread Max M
Andreas Jung wrote:

Daniel Dekany wrote:
Sunday, April 24, 2005, 4:22:10 PM, Andreas Jung wrote:

Zope itself gives a method for sorting strings:
DocumentTemplate.sequence.sort. Many of the products relies on that for
sorting. And that sorts UTF-8 incorrectly
Then it will probably be easiest to just patch it up to sort correctly.
Or file a bug in the collector.
A candidate for a reject. I pointed out that the sort method can not smell
your encoding. If you deal with encodings and deal with it in the right way
but don't expect that the underlying framework can smell or guess what kind
of encoding your application uses. Otherwise: use Python unicode strings
*only* and *overall*.

Yes. I was thinking in the line of a monkeypatch of the sort method, 
that could be used in eg. Plone.

It should be very possible for it to look up the charset under 
properties, and decode strings from that before sorting.

--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
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] How to convert Zope instance charset?

2005-04-24 Thread Daniel Dekany
Sunday, April 24, 2005, 6:05:42 PM, Andreas Jung wrote:



 --On Sonntag, 24. April 2005 17:45 Uhr +0200 Daniel Dekany 
 [EMAIL PROTECTED] wrote:

 Sunday, April 24, 2005, 4:22:10 PM, Andreas Jung wrote:
 First of all, in this thread I don't care whose mistake it is. My
 concern is if I can use Zope with UTF-8 (in fact, Plone) in reality or
 not. Assume that I'm using a few non-US-ASCII characters, and I want
 sometimes show things alphabetically sorted...


 You're not getting the point. As long as you handle with Python string
 and not with unicode strings then there is no way in Zope deal correctly
 with different kind of encodings...As I said...it is an application side
 problem.  Zope and Python provide you the tools to deal with UTF8 but
 you need to solve such problems on in your application.  That's my last
 comment on this issue :-)

Maybe *you* don't get the point. Python has a virtual machine level
setting that specifies the locale and encoding (the charset). You can
set it for example like: locale.setlocale('hu_HU', 'ISO-8859-2'). And
although there is no charset information attached to strings,
locale.strcoll and such will assume that the string is in the encoding
specified globally like above, right? All the strings (which is not an
unicode string) is assumed to use that encoding. It seems to me that it
works like that until I specify 'UTF-8' in the locale, in which case it
goes mad.

And, to Max M., regarding patching sequence.sort:

a) There is no guarantee that everything uses for sequence.sort.
   Some code may calls locale.strcoll directly and such, which can
   result in all sort of inconsistency. The fix could be done at
   the root of the problem, which is I belive strcoll.

b) If the problem is in Zope (that I doubt) then it should be patched in
   Zope itself, not by everybody individually. That is, for Andreas
   Jung, if the locale.getlocale(locale.LC_COLLATE) indicates that the
   default charset is UTF-8, then it should be sorted like that. But
   again, I think it should be actually fixed in Python level (in
   locale.strcoll), and not on the Zope level.

Anyway, I have already accepted earlier that while Zope will certainly
work with ISO-8859-2 (that locale.strcoll handles correctly), it will
not work with UTF-8. Hence, Zope doesn't work well with UTF-8, while it
works with older charsets (it does without any extra effort, right?).
So I just asked how to switch over ISO-8859-2, and then some start to
tell that it works with UTF-8, and that it should be solved on
application level(!!!)...

 -aj


-- 
Best regards,
 Daniel Dekany

___
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: How to convert Zope instance charset?

2005-04-24 Thread Andreas Jung

--On Sonntag, 24. April 2005 18:26 Uhr +0200 Max M [EMAIL PROTECTED] wrote:

Yes. I was thinking in the line of a monkeypatch of the sort method, that
could be used in eg. Plone.
It should be very possible for it to look up the charset under
properties, and decode strings from that before sorting.
That's implicit ugly magic. If you have to deal with unicode then do it
in the proper way - use unicode strings and don't fiddle around with utf8 
encoded
strings everywhere where you could and should using unicode strings. 
Believe me,
it will improve your application and your life :-)

-aj

pgpvL83fp28dm.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] How to convert Zope instance charset?

2005-04-24 Thread Andreas Jung

--On Sonntag, 24. April 2005 18:34 Uhr +0200 Daniel Dekany 
[EMAIL PROTECTED] wrote:

Maybe *you* don't get the point. Python has a virtual machine level
setting that specifies the locale and encoding (the charset). You can
set it for example like: locale.setlocale('hu_HU', 'ISO-8859-2'). And
although there is no charset information attached to strings,
locale.strcoll and such will assume that the string is in the encoding
specified globally like above, right? All the strings (which is not an
unicode string) is assumed to use that encoding. It seems to me that it
works like that until I specify 'UTF-8' in the locale, in which case it
goes mad.

I am very much aware of the issue (btw. it was me who integrated
sequence.sort()). And if you look carefully at the API of sequence.sort()
then you will see that there is already built-in support locale-aware
comparisons.
-aj



pgpdF59nBPHrt.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] Re: Does anyone care whether we deprecate ZClasses?

2005-04-24 Thread Simon Michael
Sascha Welter wrote:
If the new stuff is so great and easy to use, 
it should also be easy to put some documentation of it in
Hear, hear. +1 insightful.
___
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] How to convert Zope instance charset?

2005-04-24 Thread Daniel Dekany
Sunday, April 24, 2005, 7:22:42 PM, Andreas Jung wrote:



 --On Sonntag, 24. April 2005 18:34 Uhr +0200 Daniel Dekany 
 [EMAIL PROTECTED] wrote:


 Maybe *you* don't get the point. Python has a virtual machine level
 setting that specifies the locale and encoding (the charset). You can
 set it for example like: locale.setlocale('hu_HU', 'ISO-8859-2'). And
 although there is no charset information attached to strings,
 locale.strcoll and such will assume that the string is in the encoding
 specified globally like above, right? All the strings (which is not an
 unicode string) is assumed to use that encoding. It seems to me that it
 works like that until I specify 'UTF-8' in the locale, in which case it
 goes mad.


 I am very much aware of the issue (btw. it was me who integrated
 sequence.sort()).

You are aware of it, so why do you dispute if UTF-8 is supported (read:
can be used in practice)? Just how on the earth should anybody solve
this on the application level? Should everybody use only his own
products (that convert everything to unicode string)? Also everybody
should patch ZCatalog and similar core components which also sorts
non-unicode strings? Simply said, people can't use Zope with UTF-8 in
practice (while I guess they can with ISO-8859-x, right?), with my
original words Since Python/Zope/etc practically doesn't support
utf-8. And I didn't meant to hurt or upbraid Zope fans with it at all,
I just said it as a fact in the middle of a sentence, and then what
happens...

(Why Plone guys use UTF-8 as default, I don't know, maybe they didn't
realized it doesn't work for people who really utilize utf-8. I'm for
too long in the business to be surprised. :) I think I will ask them...)

 And if you look carefully at the API of sequence.sort()
 then you will see that there is already built-in support locale-aware
 comparisons.

Yeah, I tried to use that earlier, but as I said for many times here, it
can't sort utf-8 encoded strings, despite that I have set the global
locale to something.utf8, certainly because Python locale.strcoll
can't. So at the end: You Can Not Use UTF-8 with Zope. Right? S,
then back to the original question: converting and utf-8 instance to
ISO-8859-2 instance, any idea? (Or is it still the standpoint that I
should not??? D-%)

 -aj

-- 
Best regards,
 Daniel Dekany

___
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: developer docs

2005-04-24 Thread Simon Michael
Since it wasn't mentioned: you may want to check out 
http://zopewiki.org/ZopeDevelopment and
http://zopewiki.org/DiskBasedProduct . Pretty much all the known 
relevant links should be there, and if you know others, please add them.

___
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] How to convert Zope instance charset?

2005-04-24 Thread Andreas Jung

--On Sonntag, 24. April 2005 21:31 Uhr +0200 Daniel Dekany 
[EMAIL PROTECTED] wrote:

Yeah, I tried to use that earlier, but as I said for many times here, it
can't sort utf-8 encoded strings, despite that I have set the global
locale to something.utf8, certainly because Python locale.strcoll
can't.
If this method does not work as expected then this is likely a bug
or a problem of the underlying implementation in the C lib. locale.strcoll
is just a *thin* layer on top of the libc  of your operating system. Means:
Python just passed the data to the libc strcoll() method and returns the 
result.
And again my hint: if you want to deal in a reasonable way with different 
charsets:
use unicode strings.

-aj



pgpuqLggOTetL.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] Sequence sorting module from a Python script

2005-04-24 Thread Leticia Larrosa

Hi all:

I want to order a sequence using the Sequence sorting module from a Python 
script.
I have the following code:
"
seq = [['Bruzon', 'CUB'], ['Anand', 'IND'], ['Kasparov', 'RUS']]
def test(oneElem, twoElem):
if oneElem[0] == twoElem[0]:
return 0
if oneElem[0] > twoElem[0]:
return 1
else:
return -1
sort_on =(('self', test, 'desc'))
return sequence.sort(seq, sort_on)
"

and i get the error:
"
Error Type: SyntaxError
Error Value: sort option must contains no more than 2 fields
"

the Traceback:
"
Traceback (innermost last): 
Module ZPublisher.Publish, line 101, in publish 
Module ZPublisher.mapply, line 88, in mapply 
Module ZPublisher.Publish, line 39, in call_object 
Module Shared.DC.Scripts.Bindings, line 306, in __call__ 
Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec 
Module Products.PythonScripts.PythonScript, line 323, in _exec 
Module None, line 22, in orderBy

Line 22 
Module DocumentTemplate.sequence.SortEx, line 66, in sort 
Module DocumentTemplate.sequence.SortEx, line 161, in make_sortfunctions 
SyntaxError: sort option must contains no more than 2 fields 
"

what i'm doing wrong?

Thanks in advance.

___
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] Sequence sorting module from a Python script

2005-04-24 Thread Leticia Larrosa


Hi all: 


I 
want to order a sequence using the Sequence sorting module from a Python 
script. 
I 
have the following code: "seq = [['Bruzon', 'CUB'], ['Anand', 
'IND'], ['Kasparov', 'RUS']]def test(oneElem, twoElem):
 if oneElem[0] == twoElem[0]:
 return 0 
elif oneElem[0]  twoElem[0]:
 return 1 
else: return -1

sort_on =(('self', test, 'desc'))return sequence.sort(seq, sort_on)
"

and i get the error:"Error Type: SyntaxErrorError Value: sort 
option must contains no more than 2 fields"and Traceback:"
Traceback (innermost last):Module ZPublisher.Publish, line 101, in 
publishModule ZPublisher.mapply, line 88, in mapplyModule 
ZPublisher.Publish, line 39, in call_objectModule 
Shared.DC.Scripts.Bindings, line 306, in __call__Module 
Shared.DC.Scripts.Bindings, line 343, in _bindAndExecModule 
Products.PythonScripts.PythonScript, line 323, in _execModule None, line 
21, in orderBy- - Line 21Module 
DocumentTemplate.sequence.SortEx, line 66, in sortModule 
DocumentTemplate.sequence.SortEx, line 161, in make_sortfunctions
SyntaxError: sort option must contains no more than 2 fields"



what i'm doing wrong? 

any suggestion?



Thanks in advance.

___
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-2.8, i18n and global locales catalog

2005-04-24 Thread Sascha Ottolski
Hi,

does anybody know if and how I could build a global locales catalog in 
zope-2.8? I'm already through the i18n chapter in the zope-3 book, and think 
to know how to set one up on a per product level. I made a locales dir in my 
INSTANCE_HOME, but that doesn't seem to do the trick. However, I'm not sure 
if I might need some zcml-magic to use the i18n stuff globally and/or in a 
zope-2 product, and how I would have to do it.

Having asked that, I hope I'm correct to assume that it is possible to use 
zope-3's i18n services in a zope-2.8 via Five...

BTW, has the i18n service in zope3 something like I've seen in 
PlacelessTranslationServices, that would assist in collecting untranslated 
strings on the fly (PTS can append those strings to .missing files and/or 
present those strings via ZMI)?


Thanks,

Sascha
___
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: Zope Starting Error

2005-04-24 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan Goldberg wrote:
 Can someone please help me resolve the following error:
 
 Error: The object named by DBTab.ClassFactories.autoClassFactory could not 
 be imported
 (line 903 in file:///home/jgoldberg/my_zope/etc/zope.conf)
 For help, use /opt/Zope-2.7/lib/python/Zope/Startup/zopectl.py -h

The DBTab product is not compatible with Zope 2.7.x;  it has been
subsumed by the mountpoint support in ZConfig.


Tres.
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  Zope Dealers   http://www.zope.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCbBXIGqWXf00rNCgRAmvOAKCiZTgWNHrGLWMmzWcXERd0hqX+NgCaAh3l
U6v8pykUIFkkzjEH2qyjokk=
=HRsP
-END 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] Sequence sorting module from a Python script

2005-04-24 Thread David H




Leticia Larrosa wrote:

  Hi
all: 
  

  I
want to order a sequence using the Sequence sorting module from a
Python script. 
  I
have the following code: 
"
seq = [['Bruzon', 'CUB'], ['Anand', 'IND'], ['Kasparov', 'RUS']]
def test(oneElem, twoElem):
 if oneElem[0] == twoElem[0]:
 return 0
 elif oneElem[0]  twoElem[0]:
 return 1
 else:
 return -1
  
sort_on =(('self', test, 'desc'))
return sequence.sort(seq, sort_on)
"
  
and i get the error:
"
Error Type: SyntaxError
Error 

Value:
sort option must contains no more than 2 fields

Leticia,
I tested this using a python script in Zope - and it seems to work.
Nice to see someone doing something with Chess and Zope!


def test(x,y):
 if x[0] == y[0]:
 return 0
 elif x[0]  y[0]:
 return 1
 else:
 return -1

request = container.REQUEST

seq = [['Bruzon', 'CUB'], ['Anand', 'IND'], ['Kasparov', 'RUS']]

seq.sort(test)
print seq

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] Sequence sorting module from a Python script

2005-04-24 Thread Andreas Jung

--On Sonntag, 24. April 2005 17:36 Uhr -0400 Leticia Larrosa 
[EMAIL PROTECTED] wrote:
sort_on =(('self', test, 'desc'))
As documented the 'sort_on_ parameter must be a *sequence* of sorting 
definitions and a *single* sorting
definition. This should work:

 sort_on =(('self', test, 'desc'),)
-aj

pgp51rKhSGV4U.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] How to convert Zope instance charset?

2005-04-24 Thread Andreas Jung
One last note from myside. I have experiences with unicode since over 7 
years while
working with multilingual documents in the e-publishing business. It is 
good practice
to perform *any* unicode related work *only* on unicode datatypes (Python 
unicode strings!!!)
and *not* some byte-encoded unicode strings as utf8 or whatever. These 
encodings
should only be used on the output level when presenting unicode data to the 
user - either
through-the-web,  as export format etc. This is a strong advice you should 
follow.

-aj
--On Sonntag, 24. April 2005 21:31 Uhr +0200 Daniel Dekany 
[EMAIL PROTECTED] wrote:

Sunday, April 24, 2005, 7:22:42 PM, Andreas Jung wrote:

--On Sonntag, 24. April 2005 18:34 Uhr +0200 Daniel Dekany
[EMAIL PROTECTED] wrote:
Maybe *you* don't get the point. Python has a virtual machine level
setting that specifies the locale and encoding (the charset). You can
set it for example like: locale.setlocale('hu_HU', 'ISO-8859-2'). And
although there is no charset information attached to strings,
locale.strcoll and such will assume that the string is in the encoding
specified globally like above, right? All the strings (which is not an
unicode string) is assumed to use that encoding. It seems to me that it
works like that until I specify 'UTF-8' in the locale, in which case it
goes mad.

I am very much aware of the issue (btw. it was me who integrated
sequence.sort()).
You are aware of it, so why do you dispute if UTF-8 is supported (read:
can be used in practice)? Just how on the earth should anybody solve
this on the application level? Should everybody use only his own
products (that convert everything to unicode string)? Also everybody
should patch ZCatalog and similar core components which also sorts
non-unicode strings? Simply said, people can't use Zope with UTF-8 in
practice (while I guess they can with ISO-8859-x, right?), with my
original words Since Python/Zope/etc practically doesn't support
utf-8. And I didn't meant to hurt or upbraid Zope fans with it at all,
I just said it as a fact in the middle of a sentence, and then what
happens...
(Why Plone guys use UTF-8 as default, I don't know, maybe they didn't
realized it doesn't work for people who really utilize utf-8. I'm for
too long in the business to be surprised. :) I think I will ask them...)
And if you look carefully at the API of sequence.sort()
then you will see that there is already built-in support locale-aware
comparisons.
Yeah, I tried to use that earlier, but as I said for many times here, it
can't sort utf-8 encoded strings, despite that I have set the global
locale to something.utf8, certainly because Python locale.strcoll
can't. So at the end: You Can Not Use UTF-8 with Zope. Right? S,
then back to the original question: converting and utf-8 instance to
ISO-8859-2 instance, any idea? (Or is it still the standpoint that I
should not??? D-%)
-aj
--
Best regards,
 Daniel Dekany




pgpzts351xRHE.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] The Zope Book

2005-04-24 Thread Dieter Maurer
Lennart Regebro wrote at 2005-4-8 10:59 +0200:
 ...
On Apr 8, 2005 8:48 AM, Chris Withers [EMAIL PROTECTED] wrote:
 ...
 Which The Zope Book are you referring to?
 
 The 2.6 one on Zope.org?
 The 2.7 one on Plope.com?
 The 3.whatever one somewhere-I-don't-know?

I would expect it to be featured, that is mentioned as a recommended
practice, in a Zope2.9 book, should one appear. I also thonk that with
2.8 a 2.8 book should be released, which main feature could be to move
the ZClass part to an appendix.

Indead, something along this line...

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