[Zope-dev] Zope 2 trunk OFS tests failing

2005-10-04 Thread Florent Guillaume
The OFS.testObjectManager tests are failing when run in isolation on  
the Zope 2 trunk (also on the 2.8 branch). Any idea? I'll look at it  
anyway, but if someone's seen this already...


bin/zopectl test -v --libdir lib/python --dir lib/python/OFS  
testObjectManager

EF.
==
ERROR: test_delObject_exception_debug_manager  
(OFS.tests.testObjectManager.ObjectManagerTests)

--
Traceback (most recent call last):
  File /Users/fguillaume/zope/zope2/lib/python/OFS/tests/ 
testObjectManager.py, line 290, in  
test_delObject_exception_debug_manager

om._delObject(ob.getId())
  File /Users/fguillaume/zope/zope2/lib/python/OFS/ 
ObjectManager.py, line 350, in _delObject

if not getSecurityManager().getUser().has_role('Manager'):
AttributeError: 'NoneType' object has no attribute 'has_role'

==
FAIL: test_setObject_set_owner_with_emergency_user  
(OFS.tests.testObjectManager.ObjectManagerTests)

--
Traceback (most recent call last):
  File /Users/fguillaume/zope/zope2/lib/python/OFS/tests/ 
testObjectManager.py, line 104, in  
test_setObject_set_owner_with_emergency_user

, om._setObject, 'should_fail', si )
  File /usr/local/lib/python2.3/unittest.py, line 295, in  
failUnlessRaises

raise self.failureException, excName
AssertionError: EmergencyUserCannotOwn

--
Ran 19 tests in 0.077s

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]


___
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 2 trunk OFS tests failing

2005-10-04 Thread Jens Vagelpohl
Both those tests point to a wrong user running them, most likely due  
to some tests switching users and then not cleaning up properly.


jens


On 4 Oct 2005, at 11:38, Florent Guillaume wrote:

The OFS.testObjectManager tests are failing when run in isolation  
on the Zope 2 trunk (also on the 2.8 branch). Any idea? I'll look  
at it anyway, but if someone's seen this already...


bin/zopectl test -v --libdir lib/python --dir lib/python/OFS  
testObjectManager

EF.
==
ERROR: test_delObject_exception_debug_manager  
(OFS.tests.testObjectManager.ObjectManagerTests)

--
Traceback (most recent call last):
  File /Users/fguillaume/zope/zope2/lib/python/OFS/tests/ 
testObjectManager.py, line 290, in  
test_delObject_exception_debug_manager

om._delObject(ob.getId())
  File /Users/fguillaume/zope/zope2/lib/python/OFS/ 
ObjectManager.py, line 350, in _delObject

if not getSecurityManager().getUser().has_role('Manager'):
AttributeError: 'NoneType' object has no attribute 'has_role'

==
FAIL: test_setObject_set_owner_with_emergency_user  
(OFS.tests.testObjectManager.ObjectManagerTests)

--
Traceback (most recent call last):
  File /Users/fguillaume/zope/zope2/lib/python/OFS/tests/ 
testObjectManager.py, line 104, in  
test_setObject_set_owner_with_emergency_user

, om._setObject, 'should_fail', si )
  File /usr/local/lib/python2.3/unittest.py, line 295, in  
failUnlessRaises

raise self.failureException, excName
AssertionError: EmergencyUserCannotOwn

--
Ran 19 tests in 0.077s

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]


___
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 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: Zope 2 trunk OFS tests failing

2005-10-04 Thread Florent Guillaume

Correction: it works on the 2.8 branch, but not the trunk.

Florent


On 4 Oct 2005, at 12:38, Florent Guillaume wrote:

The OFS.testObjectManager tests are failing when run in isolation  
on the Zope 2 trunk (also on the 2.8 branch). Any idea? I'll look  
at it anyway, but if someone's seen this already...


bin/zopectl test -v --libdir lib/python --dir lib/python/OFS  
testObjectManager

EF.
==
ERROR: test_delObject_exception_debug_manager  
(OFS.tests.testObjectManager.ObjectManagerTests)

--
Traceback (most recent call last):
  File /Users/fguillaume/zope/zope2/lib/python/OFS/tests/ 
testObjectManager.py, line 290, in  
test_delObject_exception_debug_manager

om._delObject(ob.getId())
  File /Users/fguillaume/zope/zope2/lib/python/OFS/ 
ObjectManager.py, line 350, in _delObject

if not getSecurityManager().getUser().has_role('Manager'):
AttributeError: 'NoneType' object has no attribute 'has_role'

==
FAIL: test_setObject_set_owner_with_emergency_user  
(OFS.tests.testObjectManager.ObjectManagerTests)

--
Traceback (most recent call last):
  File /Users/fguillaume/zope/zope2/lib/python/OFS/tests/ 
testObjectManager.py, line 104, in  
test_setObject_set_owner_with_emergency_user

, om._setObject, 'should_fail', si )
  File /usr/local/lib/python2.3/unittest.py, line 295, in  
failUnlessRaises

raise self.failureException, excName
AssertionError: EmergencyUserCannotOwn

--
Ran 19 tests in 0.077s

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]






--
Florent Guillaume, Nuxeo (Paris, France)   Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]


___
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: Allowing @ in object ids

2005-10-04 Thread Florent Guillaume

Checked in for 2.8 and trunk:
http://svn.zope.org/Zope/?view=revrev=38738

Florent

Florent Guillaume wrote:
Today @ is forbidden in object ids. That's controlled by the bad_id  
regexp in OFS.ObjectManager, which tries to ensure that ids will be  
useable as URL components.


However, there's no reason to disallow this, as the URL spec (http:// 
www.ietf.org/rfc/rfc1738.txt) says:


   An HTTP URL takes the form:
  http://host:port/path?searchpart
   [...]
   Within the path and searchpart components, /, ;, ? are
   reserved.  The / character may be used within HTTP to designate a
   hierarchical structure.

Note that somewhere else in the spec, it says that @ (and others) MAY  
be reserved by some schemes, but HTTP doesn't actually make it reserved.


Furthermore, many projects have monkey-patched bad_id to allow @ and  
see no ill-effects.
Having @ in ids is very useful for various things, one of them being  to 
have email-like identifiers (think jabber for instance). There are  
other uses.


Unless there's opposition, I'll change the code to allow it.

Florent




--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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] log levels

2005-10-04 Thread Florent Guillaume
Now in Zope 2 trunk, more and more components use the standard python  
logging framework.


For instance the transaction code logs at DEBUG level every  
transaction start and end (self.log.debug(...)). This makes the logs  
very verbose, and any other code I write that logs at DEBUG level  
gets drowned in it. Previously transaction logs were at TRACE level  
but this doesn't exist anymore, and the python logging framework  
doesn't have anything between INFO and DEBUG or below DEBUG.


I don't have a solution really, I can log at level BLATHER and limit  
my logs at that, but that's not very satisfying. And if zLOG is  
deprecated I'd rather avoid it.


Any idea?

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]



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