[Zope-dev] Re: RFC: Locale-specific Text Collation

2005-12-12 Thread Philipp von Weitershausen
Jim Fulton wrote:
 When presenting users with ordered text (e.g. sorted lists of options),
 simply sorting Unicode strings doesn't provide an ordering that
 users in a given locale will find useful.  Various languages have
 text sorting conventions that don't agree with the ordering of
 Unicode code points. (This is even true for English.  Generally,
 users prefer to see text sorted without regard to case.)
 
 A proposal to address this problem is here:
 
   http://dev.zope.org/Zope3/LocaleSpecificTextCollation
 
 Comments are welcome.

+1

I especially like the easy handling of this adapter, given Python 2.4's
improved sorting API (that one went totally unnoticed by me up until
now!). See http://wiki.python.org/moin/HowTo/Sorting for a nice howto.

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 )


[Zope-dev] Re: [Zope3-dev] RFC: Locale-specific Text Collation

2005-12-12 Thread Christian Theune
Hi,

Am Freitag, den 09.12.2005, 08:58 -0500 schrieb Jim Fulton:
 When presenting users with ordered text (e.g. sorted lists of options),
 simply sorting Unicode strings doesn't provide an ordering that
 users in a given locale will find useful.  Various languages have
 text sorting conventions that don't agree with the ordering of
 Unicode code points. (This is even true for English.  Generally,
 users prefer to see text sorted without regard to case.)
 
 A proposal to address this problem is here:
 
http://dev.zope.org/Zope3/LocaleSpecificTextCollation
 
 Comments are welcome.

I wondered whether the method key will always be computable, but
discussing that with zagy I found out that doing __cmp__ requires one to
be able to normalize the string for a different comparison anyway, so
they key method would be the one doing that.

Eventually you might want to mention that the key() method would be
useful to implement as basis for __cmp__ anyway as it does the
normalization work, so __cmp__ should in any case be possible to derive
from key() ...

So, from me as well: +1

Christian

-- 
gocept gmbh  co. kg - schalaunische str. 6 - 06366 koethen - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 3496 30 99 112 -
fax +49 3496 30 99 118 - zope and plone consulting and development


signature.asc
Description: This is a digitally signed message part
___
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] make test fails on 2.9.0-b1?

2005-12-12 Thread Paul Winkler
On Mon, Dec 12, 2005 at 05:40:27AM +0100, Andreas Jung wrote:
 The build process changed in 2.9.
 Perhaps make inplace; make test should work.
 -aj

Good thought, but there is no inplace target anymore.

What is now the canonical way of running tests in a release
tarball?  Is there one?

-PW
 
-- 

Paul Winkler
http://www.slinkp.com
___
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] Imports broken on 2.9.0-b1?

2005-12-12 Thread Paul Winkler
On Mon, Dec 12, 2005 at 07:57:43AM +0100, Tino Wildenhain wrote:
 I suspect its the feature which got introduced in 2.8? or so which
 has a browser for packets to import so you dont have to
 guess and type the name correctly. And to not have to
 copy the exaples to every instance home, it
 looks in Software-home too. 

Yes, apparently so.
 
 2 questions araise, though:
 
 1) why is Softwarehome/import not there?

I suspect that it's supposed to be created by make install
by copying the one in skel; I don't yet know why it's not,
will investigate.
make install under 2.7.x and 2.8.x used to do this.

Incidentally, this raises the point that some included docs are out of
date.  I'll file a separate collector issue about that, since I can't
figure out what they're supposed to say now so I can't fix them ;-)

 2) why is the test not skipping the non existant
directory.

#2 is trivial, I will check in a fix as soon as I figure out 
a test to demonstrate the issue.
 
-- 

Paul Winkler
http://www.slinkp.com
___
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: make test fails on 2.9.0-b1?

2005-12-12 Thread Philipp von Weitershausen
Andreas Jung wrote:
 The build process changed in 2.9.
 Perhaps make inplace; make test should work.

He explicity said in a tarball. make inplace only exists in SVN. As a
reminder:

  SVN repo != release tarball

I know it's always been '==' for every other Zope 2 version, but 2.9 is
different because it's packaged by zpkgutils.

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 )


[Zope-dev] Re: make test fails on 2.9.0-b1?

2005-12-12 Thread Philipp von Weitershausen
Paul Winkler wrote:
 On Mon, Dec 12, 2005 at 05:40:27AM +0100, Andreas Jung wrote:
 
The build process changed in 2.9.
Perhaps make inplace; make test should work.
-aj
 
 
 Good thought, but there is no inplace target anymore.

Yup, Andreas was referring to the SVN checkout.

 What is now the canonical way of running tests in a release
 tarball?  Is there one?

make test *is* the canonical way of running tests. It's only that the
Zope/releases/Zope2/test.py script has a bug. It imports
zope.app.testing.test which doesn't exist in Zope 3.2 anymore. The
reason it has that bug is that it was copied from Zope 3 without much
thinking. Neither I nor the release managers of Zope 2 and 3 seemed to
have run make test before and after the betas, otherwise this problem
would have been apparent right away.

I guess it should use zope.testing.testrunner instead of
zope.app.testing.test, though I'm not sure how the parameters and
options convert.

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] Re: make test fails on 2.9.0-b1?

2005-12-12 Thread Paul Winkler
On Mon, Dec 12, 2005 at 04:54:24PM +0100, Philipp von Weitershausen wrote:
 Andreas Jung wrote:
  The build process changed in 2.9.
  Perhaps make inplace; make test should work.
 
 He explicity said in a tarball. make inplace only exists in SVN. As a
 reminder:
 
   SVN repo != release tarball
 
 I know it's always been '==' for every other Zope 2 version, but 2.9 is
 different because it's packaged by zpkgutils.

Aha, that explains a lot of things. Thanks.

This complicates docs somewhat. Not sure how we can handle this.
We may need to change doc/INSTALL.txt to include separate instructions
for SVN checkouts vs. tarball releases.
Filed here:  http://www.zope.org/Collectors/Zope/1967
 
-- 

Paul Winkler
http://www.slinkp.com
___
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: Imports broken on 2.9.0-b1?

2005-12-12 Thread Philipp von Weitershausen
Tino Wildenhain wrote:
 Am Sonntag, den 11.12.2005, 23:19 -0500 schrieb Paul Winkler:
 
Another quickie problem report - no time to investigate further right
now, but can anybody else reproduce?  If so, I'll try to fix tomorrow...

In a fresh 2.9.0-b1 instance, made via bin/mkzopeinstance, I get this
when I click the Import/Export button in the ZMI:

Site Error

An error was encountered while publishing this resource.

Error Type: OSError
Error Value: [Errno 2] No such file or directory:
'/home/pw/Zope-2.9.0b1-SoftwareHome/import'

And the traceback is:
 
 ...
 
OSError: [Errno 2] No such file or directory:
'/home/pw/Zope-2.9.0b1-SoftwareHome/import'


Well, err, why are you looking there? That's not my instance home :-\
 
 I suspect its the feature which got introduced in 2.8? or so which
 has a browser for packets to import so you dont have to
 guess and type the name correctly. And to not have to
 copy the exaples to every instance home, it
 looks in Software-home too. 

Thanks for the explanation.

 2 questions araise, though:
 
 1) why is Softwarehome/import not there?

Because it was conflicting with an in-place instance in a checkout which
would also install an 'import' directory.

 2) why is the test not skipping the non existant
directory.

I think supporting $SOFTWARE_HOME/import is yagni and just complicates
things. Let's rip it out.

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 )


[Zope-dev] Re: make test fails on 2.9.0-b1?

2005-12-12 Thread Paul Winkler
On Mon, Dec 12, 2005 at 05:01:35PM +0100, Philipp von Weitershausen wrote:
 I guess it should use zope.testing.testrunner instead of
 zope.app.testing.test, though I'm not sure how the parameters and
 options convert.

I don't think that's the problem:

[EMAIL PROTECTED] Zope-2.9-branch $ svn up test.py 
At revision 40739.
[EMAIL PROTECTED] Zope-2.9-branch $ grep import test.py 
import os.path, sys
from zope.testing import testrunner
import Zope2
[EMAIL PROTECTED] Zope-2.9-branch $ make test
/usr/bin/python /home/pw/Downloads/Apps/Net/Zope-2.9-branch/setup.py
\
build_ext -i
running build_ext
running build_headers
/usr/bin/python /home/pw/Downloads/Apps/Net/Zope-2.9-branch/test.py
-v
Traceback (most recent call last):
  File /home/pw/Downloads/Apps/Net/Zope-2.9-branch/test.py, line 83,
in ?
from zope.testing import testrunner
ImportError: No module named zope.testing
make: *** [test] Error 1


Looks to me like it's a simple PYTHONPATH problem:


[EMAIL PROTECTED] Zope-2.9-branch $ export 
PYTHONPATH=$PYTHONPATH:/home/pw/Downloads/Apps/Net/Zope-2.9-branch/lib/python/
[EMAIL PROTECTED] Zope-2.9-branch $ make test
/usr/bin/python /home/pw/Downloads/Apps/Net/Zope-2.9-branch/setup.py
\
build_ext -i
running build_ext
running build_headers
/usr/bin/python /home/pw/Downloads/Apps/Net/Zope-2.9-branch/test.py
-v
Running tests at level 1
/usr/lib/python2.4/whrandom.py:38: DeprecationWarning: the whrandom
module is deprecated; please use the random module
  DeprecationWarning)
/home/pw/ZopeSoftwareHome/lib/python/SearchIndex/__init__.py:19:
DeprecationWarning: The usage of the SearchIndex package is deprecated
since Zope 2.4.
This package is only kept for backwards compatibility for a while
and will go away in a future release.

Please use instead the re-factored modules in Products/PluginIndexes.

  warnings.warn(The usage of the SearchIndex package is deprecated
since \
Test-module import failures:

Module: BDBStorage.tests.testall

TypeError: Invalid test_suite, None, in BDBStorage.tests.testall


Running unit tests:
  Running:
..
..
(snip etc.)



-- 

Paul Winkler
http://www.slinkp.com
___
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: make test fails on 2.9.0-b1?

2005-12-12 Thread Paul Winkler
On Mon, Dec 12, 2005 at 12:43:35PM -0500, Paul Winkler wrote:
 Looks to me like it's a simple PYTHONPATH problem:
(snip)

OK, is Makefile.in the right place to fix that? 
This patch seems to work:

[EMAIL PROTECTED] Zope-2.9-branch $ svn diff inst/Makefile.in 
Index: inst/Makefile.in
===
--- inst/Makefile.in(revision 40735)
+++ inst/Makefile.in(working copy)
@@ -80,7 +80,7 @@
 
 # test:Do an inplace build and run the Zope test suite.
 test: inplace
-   ${PYTHON} ${BASE_DIR}/test.py ${TESTOPTS}
+   PYTHONPATH=${PYTHONPATH}:${BASE_DIR}/lib/python ${PYTHON}
${BASE_DIR}/test.py ${TESTOPTS}
 
 # clean:   Delete the build files and any binaries/bytecode files
 # in
 #  the source directory for good measure.




But I do get some odd output - what's this about BDBStorage
at the end?


[EMAIL PROTECTED] Zope-2.9-branch $ make test
/usr/bin/python /home/pw/Downloads/Apps/Net/Zope-2.9-branch/setup.py
\
build_ext -i
running build_ext
running build_headers
PYTHONPATH=/usr/lib/portage/pym:/usr/local/lib/python:/usr/local/lib/python/piddle:/home/pw/bin/python:/home/pw/Downloads/Apps/Net/Zope-2.9-branch/lib/python
/usr/bin/python /home/pw/Downloads/Apps/Net/Zope-2.9-branch/test.py
-v
Running tests at level 1

(snip)

  Ran 1432 tests with 0 failures and 0 errors in 283.344 seconds.

Test-modules with import problems:
  BDBStorage.tests.testall
make: *** [test] Error 1


-- 

Paul Winkler
http://www.slinkp.com
___
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: make test fails on 2.9.0-b1?

2005-12-12 Thread Paul Winkler
Just to clarify - sorry for confusing the issue (and myself):

There are two separate problems here.
make test doesn't work in a sandbox *or* a release tarball.
The patch below addresses only the former.
Phillip is right about the latter, it's got a broken import.

-PW

On Mon, Dec 12, 2005 at 12:52:24PM -0500, Paul Winkler wrote:
 On Mon, Dec 12, 2005 at 12:43:35PM -0500, Paul Winkler wrote:
  Looks to me like it's a simple PYTHONPATH problem:
 (snip)
 
 OK, is Makefile.in the right place to fix that? 
 This patch seems to work:
 
 [EMAIL PROTECTED] Zope-2.9-branch $ svn diff inst/Makefile.in 
 Index: inst/Makefile.in
 ===
 --- inst/Makefile.in(revision 40735)
 +++ inst/Makefile.in(working copy)
 @@ -80,7 +80,7 @@
  
  # test:Do an inplace build and run the Zope test suite.
  test: inplace
 -   ${PYTHON} ${BASE_DIR}/test.py ${TESTOPTS}
 +   PYTHONPATH=${PYTHONPATH}:${BASE_DIR}/lib/python ${PYTHON}
 ${BASE_DIR}/test.py ${TESTOPTS}
  
  # clean:   Delete the build files and any binaries/bytecode files
  # in
  #  the source directory for good measure.
 
 
 
 
 But I do get some odd output - what's this about BDBStorage
 at the end?
 
 
 [EMAIL PROTECTED] Zope-2.9-branch $ make test
 /usr/bin/python /home/pw/Downloads/Apps/Net/Zope-2.9-branch/setup.py
 \
 build_ext -i
 running build_ext
 running build_headers
 PYTHONPATH=/usr/lib/portage/pym:/usr/local/lib/python:/usr/local/lib/python/piddle:/home/pw/bin/python:/home/pw/Downloads/Apps/Net/Zope-2.9-branch/lib/python
 /usr/bin/python /home/pw/Downloads/Apps/Net/Zope-2.9-branch/test.py
 -v
 Running tests at level 1
 
 (snip)
 
   Ran 1432 tests with 0 failures and 0 errors in 283.344 seconds.
 
 Test-modules with import problems:
   BDBStorage.tests.testall
 make: *** [test] Error 1
 
 
 -- 
 
 Paul Winkler
 http://www.slinkp.com
 ___
 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 )

-- 

Paul Winkler
http://www.slinkp.com
___
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: make test fails on 2.9.0-b1?

2005-12-12 Thread Paul Winkler
On Mon, Dec 12, 2005 at 01:08:16PM -0500, Paul Winkler wrote:
 Phillip is right about the latter, it's got a broken import.

OK, I have a patch for make test that allows it to at least run,
but with lots of test errors. I think I will have to pass on this
one and leave it to somebody who's more familiar with the new test
runner.  Collector issue is here:
http://www.zope.org/Collectors/Zope/1968

-- 

Paul Winkler
http://www.slinkp.com
___
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] New testrunner is confusing the heck out of me

2005-12-12 Thread Paul Winkler
I'm assuming this is operator error, but I can't make head nor tail of
the following (in a zope 2 trunk sandbox).  Note the number of tests run
by each command:

[EMAIL PROTECTED] Zope-Trunk $ python lib/python/OFS/tests/testObjectManager.py 
.No handlers could be found for logger Zope
.
--
Ran 22 tests in 7.545s

OK
[EMAIL PROTECTED] Zope-Trunk $ python test.py --all -m testObjectManager
Running tests at all levels
/usr/lib/python2.4/whrandom.py:38: DeprecationWarning: the whrandom
module is deprecated; please use the random module
  DeprecationWarning)
Running unit tests:
  Running:

  Ran 12 tests with 0 failures and 0 errors in 0.010 seconds.


-- 

Paul Winkler
http://www.slinkp.com
___
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] New testrunner is confusing the heck out of me

2005-12-12 Thread Paul Winkler
On Mon, Dec 12, 2005 at 03:31:08PM -0500, Paul Winkler wrote:
 I'm assuming this is operator error

And so it was.  I had SOFTWARE_HOME set pointing to a 2.7 installation!

remembering-to-check-what-crap-is-in-my-environment-next-time-ly-y'rs,

-PW

-- 

Paul Winkler
http://www.slinkp.com
___
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: Imports broken on 2.9.0-b1?

2005-12-12 Thread Paul Winkler
On Mon, Dec 12, 2005 at 06:05:48PM +0100, Philipp von Weitershausen wrote:
 I think supporting $SOFTWARE_HOME/import is yagni and just complicates
 things. Let's rip it out.

I'm gonna punt on that: I can imagine hosting providers might be using
that feature already, and I do'nt feel like doing the research to find
out. Feel free to write a proposal :-)

Meanwhile, I've fixed the trivial error with list_imports()
and I'm checking it in on trunk and 2.9 in a moment.

-- 

Paul Winkler
http://www.slinkp.com
___
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 )