[Zope-dev] configuration error

2008-08-23 Thread Bristow Thankachan
hi all,

We are stuck with a configuration error in porting zope2 to python2.5. Can
anybody help us in fixing configuration error in the module Zope2.  The full
log of error message is given below.

Running tests at level 1
/home/zope/ztrunk25/lib/python/ZPublisher/HTTPResponse.py:19:
RuntimeWarning: Python C API version mismatch for module zlib: This Python
has API version 1013, module zlib has version 1012.
  import zlib, struct
Running unit tests:
  Running:
6/43 (14.0%) testStringException1
(testExceptionHook.ExceptionHookTest)/home/zope/ztrunk25/lib/python/Zope2/App/tests/testExceptionHook.py:120:
DeprecationWarning: raising a string exception is deprecated
  raise 'unauthorized', 'x'
/home/zope/ztrunk25/lib/python/Zope2/App/startup.py:182: DeprecationWarning:
raising a string exception is deprecated
  raise
7/43 (16.3%) testStringException2
(testExceptionHook.ExceptionHookTest)/home/zope/ztrunk25/lib/python/Zope2/App/tests/testExceptionHook.py:125:
DeprecationWarning: raising a string exception is deprecated
  raise 'redirect', 'x'
41/43 (95.3%) test_behavior
(...artup.tests.test_warnfilter.TestWarnFilter)

Error in test test_behavior
(Zope2.Startup.tests.test_warnfilter.TestWarnFilter)
Traceback (most recent call last):
  File /home/zope/usr/lib/python2.5/unittest.py, line 260, in run
testMethod()
  File
/home/zope/ztrunk25/lib/python/Zope2/Startup/tests/test_warnfilter.py,
line 90, in test_behavior
)
  File
/home/zope/ztrunk25/lib/python/Zope2/Startup/tests/test_warnfilter.py,
line 69, in load_config_text
conf, handler = ZConfig.loadConfigFile(schema, sio)
  File /home/zope/ztrunk25/lib/python/ZConfig/loader.py, line 41, in
loadConfigFile
return _get_config_loader(schema, overrides).loadFile(file, url)
  File /home/zope/ztrunk25/lib/python/ZConfig/loader.py, line 75, in
loadFile
return self.loadResource(r)
  File /home/zope/ztrunk25/lib/python/ZConfig/loader.py, line 229, in
loadResource
self._parse_resource(sm, resource)
  File /home/zope/ztrunk25/lib/python/ZConfig/loader.py, line 280, in
_parse_resource
parser.parse(matcher)
  File /home/zope/ztrunk25/lib/python/ZConfig/cfgparser.py, line 57, in
parse
section = self.end_section(section, line[2:-1])
  File /home/zope/ztrunk25/lib/python/ZConfig/cfgparser.py, line 112, in
end_section
self.error(e[0])
  File /home/zope/ztrunk25/lib/python/ZConfig/cfgparser.py, line 177, in
error
raise ZConfig.ConfigurationSyntaxError(message, self.url, self.lineno)
ConfigurationSyntaxError: invalid warning category:
'Zope2.Startup.tests.test_warnfilter.TestSchemaWarning' (line 8)


  Ran 43 tests with 0 failures and 1 errors in 15.046 seconds.

Tests with errors:
   test_behavior (Zope2.Startup.tests.test_warnfilter.TestWarnFilter)


regards

Bristow
___
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] Zope Tests: 4 OK, 1 Unknown

2008-08-23 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Fri Aug 22 11:00:00 2008 UTC to Sat Aug 23 11:00:00 2008 UTC.
There were 5 messages: 5 from Zope Tests.


Unknown
---

Subject: UNKNOWN : Zope-2.8 Python-2.3.6 : Linux
From: Zope Tests
Date: Fri Aug 22 20:41:42 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-August/010050.html


Tests passed OK
---

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Tests
Date: Fri Aug 22 20:43:12 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-August/010051.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Tests
Date: Fri Aug 22 20:44:42 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-August/010052.html

Subject: OK : Zope-2.11 Python-2.4.4 : Linux
From: Zope Tests
Date: Fri Aug 22 20:46:12 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-August/010053.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Tests
Date: Fri Aug 22 20:47:43 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-August/010054.html

___
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] zope.component: calling an Interface and calling queryAdapter give differing results

2008-08-23 Thread Dieter Maurer
Chris Withers wrote at 2008-8-19 18:30 +0100:
 ...
  class ISomething(Interface): pass
...
  class MyClass: implements(ISomething)
...
  m = MyClass()

Right, so this does make sense:

  ISomething(m)
__main__.MyClass instance at 0x00BED6E8

This does not:
  repr(queryAdapter(m,ISomething))
'None'

why the difference?

Jim is heavily defending this difference.

I am convinced that the difference should not be there
but meanwhile have found a use case for it.

  Suppose, you have a class C that implements I.

  If queryAdapter would behave like I(...), you
  would have no way to override the implementation
  of I by C.

  With the current behavior, you can use
  queryAdapter(c, I) to check whether some special
  requirements apply and in this case use the special purpose
  adapter.

Not that this use case had been able to convince me that
the difference were justified.



-- 
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] zope.component: calling an Interface and calling queryAdapter give differing results

2008-08-23 Thread Dieter Maurer
Jim Fulton wrote at 2008-8-19 17:57 -0400:
 
 While I respect that this feature may have been chosen carefully, it
 nevertheless seems more like a misfeature.  Chris' expectation was
 reasonable and ought not to be violated without a good cause.

queryAdapter is used to look up named adapters.  It is also a simpler  
version of queryMultiAdapter, which looks up adapters for multiple  
objects. In neither of these cases does it make sense to consider the  
interfaces already provided by the object being adapted.  It makes no  
sense to me for queryAdapter to have different semantics depending on  
whether the name argument is provided (and is non-blank).

As the implements directive does not specify a name,
one could think that the default name is declared.
Then, your naming argument would go away.


As the I(obj, ...) syntax is more comfortable and more natural than
the get[Multi]Adapter(obj, I, ...), it may even be adequate
to give I(...) an optional name parameter.

Then, we could get rid of the {get|query}[Multi]Adapter altogether
and consistently use I() with appropriate optional parameters --
what a simplification and homogenization :-)



-- 
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] How to put , in HTML attributes?

2008-08-23 Thread Dieter Maurer
Hermann Himmelbauer wrote at 2008-8-20 19:34 +0200:
Hi,
I have a page template, that should have the characters  and  in the 
resulting HTML code, e.g.:

input type=hidden, name=xyz, value=ABC /

HTML forbids  in attributes: it must be represented there as lt;.

Thus, Zope does the correct thing (as standard conformity is a good thing).



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