Re: [Zope] Re: ZSyncer and Zope-2.8.0

2005-08-21 Thread Paul Winkler
 Paul Winkler wrote at 2005-8-14 18:07 -0500:

Finally, Dieter, if you want to get your changes into zsyncer
without working through an intermediary, I´d be happy to give you
 checkin privileges. Do you have a Sourceforge account?

 Yes: dmaurer.

I'm back now - and I've just added dmaurer on sourceforge.

 However, my time currently is quite pressed.

I probably will just make our version work with Zope 2.8.1
and report what I did -- without even looking at
your current version.

Fair enough.

-PW


___
Zope maillist  -  [EMAIL PROTECTED]
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: ZSyncer and Zope-2.8.0

2005-08-21 Thread Paul Winkler
 Am Montag, 15. August 2005 22:20 schrieb Sascha Ottolski:
 To make a long story short, i append a small diff against the trunk
 that seems to work for me (not thoroughly tested, though, and not
 perfect about authorization).

 sorry for replying to myself, just noticed that while browsing of
 ZClasses via  ZSyncer works with my patch, diffing and syncing of
 methods still doesn't.  the problem seems to lie in

   traverseFromRoot(self, relative_path)

 but I wasn't able to fix it. I think something about how to acces an
 attribute  belonging to someZClass.propertysheets.methods.

Thanks for the update... but I'm still unlikely to get a chance to
investigate
issues running under 2.8 soon. I would like to do so before zsyncer 0.7
final, but I don't know when that will be.
I think with my deadlines, I may be forced to wait for Dieter's
experiences with patching whatever version he's working on, and see if I
can apply similar fixes to the trunk.


___
Zope maillist  -  [EMAIL PROTECTED]
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: ZSyncer and Zope-2.8.0

2005-08-15 Thread Dieter Maurer
Paul Winkler wrote at 2005-8-14 18:07 -0500:

Finally, Dieter, if you want to get your changes into zsyncer
without working through an intermediary, I´d be happy to give you
checkin privileges. Do you have a Sourceforge account?

Yes: dmaurer.

However, my time currently is quite pressed.

   I probably will just make our version work with Zope 2.8.1
   and report what I did -- without even looking at
   your current version.


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


Re: [Zope] Re: ZSyncer and Zope-2.8.0

2005-08-15 Thread Sascha Ottolski
Am Montag, 15. August 2005 00:54 schrieb Paul Winkler:
 The trunk should now be in usable condition, I hope. I´m sorry it was
 broken for so long.
 I am on vacation now, and unlikely to respond in this thread again
 until I return on 8/21.
 Within a week thereafter, I hope to tag and release zsyncer 0.7-beta1.

Hi Paul,

thanks for the info. Just to let you know, I just cvs upped to the trunk, but 
unfortunately syncing didn't work for me.

To make a long story short, i append a small diff against the trunk that seems 
to work for me (not thoroughly tested, though, and not perfect about 
authorization).

Heres what happened: I've always seen this error:

Module Products.ZSyncer.ZSyncer, line 1503, in call_
Module copy_reg, line 69, in _reduce_ex
TypeError: can't pickle function objects

Which I can get around by changing line 1501 of ZSyncer.py from

result = sys.exc_info()[:2]
to
result = (str(sys.exc_info()[0]), str(sys.exc_info()[1]))


Which in turn tells me, that security bites me. This happens no matter if I 
use the current account or the http://username:[EMAIL PROTECTED]/. I double 
checked permissions, Manager Role is Allowed to User ZSyncer and View 
Management Screens.

Good news is, Dieter gave a hint about to exchange validateValue with 
validate, which seems to help (at least for the username:password thingy; 
it still wont sync with the current user for me).

Incidentally, I stumbled about a problem when an object is on the remote 
syncer, but not the local, which seems to be fixed by an addition to an 
except clause; and finally I found that if you want to browse ZClasses for 
syncing, a reordering of an if/elif is necessary.

Hope someone finds it useful.


Cheers, Sascha
diff -u -r1.69 ZSyncer.py
--- ZSyncer.py  11 Aug 2005 20:31:29 -  1.69
+++ ZSyncer.py  15 Aug 2005 20:03:19 -
@@ -649,10 +649,10 @@
 else:
 obj_info = {}
 # Get the sub-objects.
-if getattr(aq_base(path_object), 'isPrincipiaFolderish', 0):
-sub_objects = path_object.objectValues()
-elif _isZClassFolder(path_object):
+if _isZClassFolder(path_object):
 sub_objects = path_object.propertysheets.methods.objectValues()
+elif getattr(aq_base(path_object), 'isPrincipiaFolderish', 0):
+sub_objects = path_object.objectValues()
 else:
 sub_objects = []
 for ob in sub_objects:
@@ -759,7 +759,7 @@
 # not guaranteed to be correct when virtual hosting.
 # Someday this should go away.
 full = '/'+obj.absolute_url(relative=1)
-except (KeyError, NotFound):
+except (ZSyncerObjNotFound, KeyError, NotFound):
 # No object found, maybe Extra. Fall back to the original.
 full = relative = path
 request = self.REQUEST
@@ -1322,7 +1322,7 @@
 obj = self.traverseFromRoot(path)
 method = getattr(obj, method_name)
 sm = getSecurityManager()
-if not sm.validateValue(method):
+if not sm.validate(self, self, method_name, method):
 user = sm.getUser().getId()
 err =User %s is not allowed to call %s here % (user,
  method_name)
@@ -1486,7 +1486,7 @@
 method_name, args, kw= loads(request)
 try:
 method = getattr(self, method_name)
-if not getSecurityManager().validateValue(method):
+if not getSecurityManager().validate(self, self, method_name, method):
 raise Unauthorized
 result = method(*args, **kw)
 ok = 1
@@ -1498,7 +1498,7 @@
 # informative about it.
 self._logException('Exception in call_')
 # We want to send back the exception.
-result = sys.exc_info()[:2]
+result = (str(sys.exc_info()[0]), str(sys.exc_info()[1]))
 ok = 0
 return dumps((ok, result), 1)
___
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: ZSyncer and Zope-2.8.0

2005-08-15 Thread Sascha Ottolski
Am Montag, 15. August 2005 22:20 schrieb Sascha Ottolski:
 To make a long story short, i append a small diff against the trunk that
 seems to work for me (not thoroughly tested, though, and not perfect about
 authorization).

sorry for replying to myself, just noticed that while browsing of ZClasses via 
ZSyncer works with my patch, diffing and syncing of methods still doesn't. 
the problem seems to lie in 

traverseFromRoot(self, relative_path)

but I wasn't able to fix it. I think something about how to acces an attribute 
belonging to someZClass.propertysheets.methods.


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


Re: [Zope] Re: ZSyncer and Zope-2.8.0

2005-08-14 Thread Paul Winkler
 Am Samstag, 13. August 2005 02:11 schrieb Simon Michael:
 If I try Sascha's username:password@ workaround, I get::

 it may well be that the username:password thingy was introduced in the
 CVS at  some point, but not in any release so far. sad thing is, last
 time I checked  the HEAD wasn't usable. I'm running a checkout with
 (date-)tag
 D2005.06.03.08.13.48.

 having said that, it look as if there were checkins just two day ago,
 may be  the HEAD is in order again...?

The trunk should now be in usable condition, I hope. I´m sorry it was
broken for so long.
I am on vacation now, and unlikely to respond in this thread again
until I return on 8/21.
Within a week thereafter, I hope to tag and release zsyncer 0.7-beta1.

-PW



___
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: ZSyncer and Zope-2.8.0

2005-08-14 Thread Paul Winkler

 Note, that we use a ZSyncer version which no longer uses XML-RPC
 but ZPublisher.Client to make its remote requests.
 When I remember right, Paul incorporated this change in some
 recent ZSyncer version.

correct. I don´t remember right now which was the first release to
feature your zpublisher.client code, possibly it was 0.6.0.

note that Alan Milligan subsequently contributed another
transport back-end, as he was having problems with ZPublisher.Client not
working over SSL as I recall.
Alan´s ConnectionMgr seems to work well, nobody has  reported problems
with it so it´s now the default since at least 0.6.1.
The ZPublisher.Client code is still a configurable option and still works
AFAIK.

The old XML-RPC code is still there, but it has not worked in a long time
and will likely be removed soon. It is a poor choice for the application
anyway IMHO, as there´s nothing to gain and many resources to lose by
encoding and decoding large blobs as XML.

Also note, Dieter, the zsyncer trunk is substantially different from the
0.6 series, with lots of internal changes, some new methods, and some
public method signature changes.
So if you want to work on zope 2.8 support I would strongly
encourage you to take a look at the trunk. One major improvement is that
there are some unit tests now, over 30 at last count. There is still a lot
of cleaning up to do, but the tests should hopefully make that easier to
do.

Finally, Dieter, if you want to get your changes into zsyncer
without working through an intermediary, I´d be happy to give you
checkin privileges. Do you have a Sourceforge account?


-PW



___
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: ZSyncer and Zope-2.8.0

2005-08-13 Thread Sascha Ottolski
Am Samstag, 13. August 2005 02:11 schrieb Simon Michael:
 If I try Sascha's username:password@ workaround, I get::

it may well be that the username:password thingy was introduced in the CVS at 
some point, but not in any release so far. sad thing is, last time I checked 
the HEAD wasn't usable. I'm running a checkout with (date-)tag 
D2005.06.03.08.13.48.

having said that, it look as if there were checkins just two day ago, may be 
the HEAD is in order again...?


Hope that helps,

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: ZSyncer and Zope-2.8.0

2005-08-12 Thread Simon Michael

In my, similar, situation it is::

 Traceback (innermost last):
  Module ZPublisher.Publish, line 113, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module Products.ZSyncer.ZSyncer, line 1199, in call_
 Unauthorized: You are not allowed to access 'manage_listObjects' in 
this context


If I try Sascha's username:password@ workaround, I get::

 ...
 File /zope1/Products/ZSyncer/ZSyncer.py, line 1050, in _getRemoteList
 return serverconn.manage_listObjects(path)
 File /zope1/Products/ZSyncer/ConnectionMgr.py, line 164, in __call__
 raise IOError, msg
 IOError: http://user:[EMAIL PROTECTED]/zsyncer/call_: 400 - Bad 
Request

 Bad Request (Invalid Hostname)

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