Re: [Zope] __bobo_traverse__ or similiar with python tales expression?

2015-07-12 Thread Sebastian Tänzer
As I’m still experimenting with this maybe someone here could answer that one:

I have PythonScripts or PageTemplates inside a folderish container in the tree:

root
- folder1
— object1
— folder2
—— script1
—— script2
—— template1

I’d like object1 to acquire script1, script2 and template1 from folder2 as if 
they were attributes/methods of object1, though they’re not.

I’ve played around with modifying __of__ and tried some stuff with __getattr__ 
and __getattribute__, but no success so far.

A simple 

def __of__(self, parent):
   ... 
  return self.__of__(self.folder2)

in the class of object1 is not working as it always returns The object at 
root.folder2 has an empty or missing docstring. Objects must have a docstring 
to be published.“

the object1 class definitely has a docstring.

Any hints how to achieve what I’m trying? Wrong approach?

Best, Sebastian

 Anfang der weitergeleiteten Nachricht:
 
 Von: Sebastian Tänzer s...@taenzer.me
 Betreff: __bobo_traverse__ or similiar with python tales expression?
 Datum: 11. Juli 2015 19:53:29 MESZ
 An: zope@zope.org
 
 Hello fellow Zopees,
 
 the product we’re using (ZMS) allows methods as attributes to custom object 
 models. These methodes (PythonScript) are created inside a metamanager 
 container as „Wiki.mymethod“, where Wiki is the meta type of the custom 
 object.
 
 The pathhandler method of these custom objects modifies __bobo_traversal__ 
 for normal http requests and maps these non-existing methods in that context 
 to existing methods in the metaobj_manager container using the context 
 meta_id.
 
 Calling the same method from a PageTemplate or other PythonScript does not 
 reflect that and - not surprisingly - returns an AttributeError:
 
 File 
 /opt/python/zope2-pip/lib/python2.7/site-packages/Products/PageTemplates/ZRPythonExpr.py,
  line 
 48, in __call__
return eval(self._code, vars, {})
  File PythonExpr, line 1, in expression
 AttributeError: dummyFunction
 
 Is there a way to modify traversal behaviour from the Product or somehow 
 different?
 
 Best
 Sebastian


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] __bobo_traverse__ or similiar with python tales expression?

2015-07-11 Thread Sebastian Tänzer
Hello fellow Zopees,

the product we’re using (ZMS) allows methods as attributes to custom object 
models. These methodes (PythonScript) are created inside a metamanager 
container as „Wiki.mymethod“, where Wiki is the meta type of the custom object.

The pathhandler method of these custom objects modifies __bobo_traversal__ for 
normal http requests and maps these non-existing methods in that context to 
existing methods in the metaobj_manager container using the context meta_id.

Calling the same method from a PageTemplate or other PythonScript does not 
reflect that and - not surprisingly - returns an AttributeError:

File 
/opt/python/zope2-pip/lib/python2.7/site-packages/Products/PageTemplates/ZRPythonExpr.py,
 line 
48, in __call__
return eval(self._code, vars, {})
  File PythonExpr, line 1, in expression
AttributeError: dummyFunction

Is there a way to modify traversal behaviour from the Product or somehow 
different?

Best
Sebastian
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope in The Netherlands

2015-07-09 Thread Sebastian Tänzer
OT: Chris, no offence, but your „Job Market“ doesn’t really give a reputable 
impression. As a business I would not submit any data there. At last, your 
privacy policy really sounds somewhat „strange“ and should get approval by a 
lawyer maybe. Besides that, the information on you is really very vague and not 
really helpful. All in all the whole site looks very unfinished „under 
construction“.

Lots of room for improvement.

Just my 2 cents… 

 Am 09.07.2015 um 20:33 schrieb Christopher Lozinski 
 lozin...@freerecruiting.com:
 
 
 
 On 7/8/15 3:10 PM, Kees de Brabander wrote:
 Hi there,
 I desperately need a zope server, at least for a transition period. Is there 
 in The Netherlands a company that still uses zope or has experience with 
 zope that can help or advise me?
 
 I can happily come to the Netherlands.  I am an EU Citizen.
 
 Here is my old Zope 2 website:
 
 http://zope.specialtyjobmarkets.com/
 
 And here is its much more modern replacement.
 http://www.privacv.com/markets/zope2
 
 PrivaCV is built on top of ZODB, ZTK, Grok, and Zopache.
 
 I invite you to post your job there.  I will email it out to my
 candidates on the old job boards. 
 
 You can read my blog about all things Zope at:
 
 zopache.com
 
 What exactly do you need?
 
 Regards
 Chris
 
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope in The Netherlands

2015-07-08 Thread Sebastian Tänzer
We offer ZOPE2 hosting on our Proxmox cluster.

Unfortunately in Germany only (never thought I’d say that one day… ;-) )

Kind regards
Sebastian

-
tänzermedien GmbH - Agentur für Online-Medien
Kekuléstr. 39 | 53115 Bonn, Germany
E-Mail: s...@taenzer.me | Web: http://www.taenzer.me  
Tel.: 0228-304134-0 | Fax.: 0228-304134-99

 Am 08.07.2015 um 15:10 schrieb Kees de Brabander cj.de.braban...@hccnet.nl:
 
 Hi there,
 I desperately need a zope server, at least for a transition period. Is there 
 in The Netherlands a company that still uses zope or has experience with zope 
 that can help or advise me?
 tia, Cornelis J. de Brabander
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] issue with authentication

2015-06-27 Thread Sebastian Tänzer
Yamana,

did you try to login with the recovery user/password?

To do so you have to create an emerceny user using the zpasswd.py script 
(locatet either at site-packages/Zope2/Startup/misc/zpasswd.py or 
site-packages/Zope2/utilities/zpasswd.py I Zope was installed from egg.

Example in command line/terminal on our systems (virtualenv used):

cd —path to your zope instance --
/opt/python/zope2-pip/lib/python2.7/site-packages/Zope2/utilities/zpasswd.py -u 
user -p password access

This creates an access file in the bin folder. Move this file to the root of 
the instance:

cd bin
mv access ..

Now restart Zope and you should be able to login using the new credentials.
Correct what you broke then ;-)

Best
Sebastian

 Am 27.06.2015 um 10:56 schrieb Yamana santhosh kumar 
 y.santhosh32ku...@gmail.com:
 
 Hello to all zope users...
 
  I have been facing a problem with authentication in zope, i.e when i try 
 to access the zope with localhost:8080/manage it is showing that the username 
 and password , it is shown below.
 image.png
 even though i am giving correct username and password, it is showing that you 
 are not autherised person to access this resource ..(note:i have changed 
 some check boxes in authentications in acl_users folder)
 
 I hope that any body can help me to this issue
 
 Thanks in advance.
 
 
 
 
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] PAS scripted auth

2015-06-01 Thread Sebastian Tänzer
Hello Tres (maintainer of PAS) and Zope community,

I’m trying to get PAS replace CookieCrumpler to do authentication to Zope2 from 
a python script/Product or external method.

Is there a how-to or tutorial somewhere how to get started on this?

What I want is to authenticate a user through a web login form as Cookie 
Crumbler does (but I’d like to to it from my own script that does other 
things,too).

I’ve

- installed PAS
- replaced the default acl_users in my folder
- added a ZODB user folder
- added a CookieAuthHelper

Now, how do I authenticate the user to Zope if I have a username and password 
(i.e. from request.get(‚username‘) etc.)

Best regards
Sebastian
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZCatalog queries performance

2015-05-19 Thread Sebastian Tänzer
Thanks, this answered all of my questions :-)

Best, Sebastian 

 Am 19.05.2015 um 12:50 schrieb Tres Seaver tsea...@palladion.com:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 05/19/2015 04:54 AM, Sebastian Tänzer wrote:
 
 Let’s say I want to display an accordion with all events of a month 
 displaying quite a lot of data about the event (30-50 events on one 
 page, collapsible jQuery accordion). At the moment I get the results
 and put the objects into the result set via unrestrictedTraverse
 using getPath(). Would it be better to only get the path and get the
 object in the template? Does this make any difference performance
 wise?
 
 Nope.  Doing it in trusted code (an actual method, and ExternalMethod, or
 a view) would be faster than either a script or a template.  Measure it
 to decide whether to switch, however.
 
 Which data of the event objects would I keep as ZCatalog meta columns 
 and which not? Documentation is not really helpful on this.
 
 It is super application-dependent.  The costs for maintaining extra
 columns of metaata are relatively small (bloating the Record object, and
 therefore its pickle, mostly).
 
 The tricky part is that events are linked with different locations 
 (event location, selling points) that are not children of the event 
 object but objects in a different folder. The event object itself
 only keeps the links to these location objects and I get them when
 iterating over the result set in the template.
 
 If you can define a URL-addressible method of the event which returns or
 redirects to those objects, you can get away with hard-wiring that in
 your template, using 'brain.getPath()' as a prefix.
 
 Any advice what would be the best way for this performance-wise? Is
 it okay to get the object itself via traversal? Is there a faster way
 to get the object data?
 
 Fetching the object is fast if it is already in the ZODB cache, but slow
 if not, nd may cause other, more popular / important objects to be
 evicted.  Where possible, design for catalog queries which don't need to
 fetch the object.
 
 
 
 Tres.
 - -- 
 ===
 Tres Seaver  +1 540-429-0999  tsea...@palladion.com
 Palladion Software   Excellence by Designhttp://palladion.com
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAEBAgAGBQJVWxWLAAoJEPKpaDSJE9HY0aQP/1mC0Ll5//c24XQPcvMwS18Y
 /gZfOe/IeL61CRrI2Sv+RMQ6N6gXpL8oM/KsWU2wphfPVYC96VxiD28ubhmWVk+f
 GFbmN4YchYSNHND2kzcjxyHd1+U6+c/NhkcfgL9GtLZBsSNtMZut2pV7sN7VvjhJ
 0F1Kwu6HxZ5yvEjZOk0tzDfrhh0I4Y3elFTwJkHXq/Z/3xN+NTVNpYXRAw5AWGJC
 A0Y/ll/cx1+JIKlMbjhMNqG+k61JGD8MdZXIvBwJ7jij1VIGYfYG5/7wZieMjCTL
 /SBMkOnODchSzSk2wV1B0ZgpbgTf+DYuZRzKCrYc7QOktfQhqEBOS5ljIjpWkDcq
 wqsxPBD0uyu/K3+dd4egL3Fcvg5DDfm9//Qo2B8JAkLWO5XeJ4UiyZHLYWZXSpXI
 SdjL2zFnhTZhp9pxIv+V4W/XrzMEDAr3UOFlrikiGd4oxTBffFuxuSr2mvpqshTQ
 TaS8Vgty9SmqMaPuvMZPc7FoPExsC4k4sNO9XgSXKT/5xo3FErLTWVCL1/qVHN3I
 6wHvSrh8n1Z/m60P6OaUzIHF/97sjbxOO75d0RZCnaTFWt2TizrrsrwaBZ2p6Yyo
 83l5QxPLDge6EZNb1MMewZ9vW8EamDhkR2pKTsQTEVDj2p4gVhmh+J5pjN6BKj50
 D98HPv4JrWhf965/Pay4
 =Sv38
 -END PGP SIGNATURE-
 
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ZCatalog queries performance

2015-05-17 Thread Sebastian Tänzer
Hello,

I’m querying a ZCatalog with a lot of indexes and some meta data for event 
objects to get related events by tags.
These need to be displayed with a title image (which itself is a sub object of 
the event object) and a pre-defined short text.

My python query script gets the results, I then loop over them and get the 
object with unrestrictedTraverse(x.getPath(), None).
I understood getObject is not really performant, but getting the objects with 
unrestrictedTraverse is not a lot faster.

What would be the best way to query for these objects and then display the 
results with the image?
Should I add the url of the image as meta data (title_image etc.)?

What is the best way to display search results? 
Is getting the whole object via unrestrictedTraverse() a good idea?
What are the alternatives?

Best,
Sebastian
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZEO manageUndo not working - DisconnectedError

2015-05-06 Thread Sebastian Tänzer
Good morning all,

after further testing we noticed our Zope2 virtualenv setup was done with the 
ZMS3 (CMS) install routine using pip install ZMS3 --process-dependency-links. 
This installed different package versions.

The original pip Zope2 uses these versions: http://pastebin.com/ZEwhVba0
The ZMS3 people use these versions: http://pastebin.com/iu43Ss5w

For example, the ZMS3 setup uses:

• ZopeUndo==4.0
• ZODB==4.1.0
• ZODB3==3.11.0

as the original Zope2 uses:

• ZODB3==3.10.5

No ZEO, no ZODB packages.

Why is Zope2 using the old 3.10 ZODB version and why is there no ZODB4 
installed? ZEO server and clients still work fine without these packages.

The thing is, I notice a lot worse performance with the ZODB, especially with 
traversal, using the native Zope2 setup routine. Catalog search takes almost 
2-3 seconds compared to the ZMS3 versions with a local non-ZEO-Zope instance. 
With the ZMS3 versions ZODB usage is a LOT faster, but there are problems with 
Undo for example in combination with ZEO.

Any ideas on this? I don’t get this version jungle...

Best
Sebastian

 Am 06.05.2015 um 07:42 schrieb Niels Dettenbach (Syndicat IT  Internet) 
 n...@syndicat.com:
 
 Am 6. Mai 2015 01:24:50 MESZ, schrieb Sebastian Tänzer s...@taenzer.me:
 2015-05-06 01:16:46 WARNING ZEO.zrpc (19205) CW: error connecting to
 ('::1', ): ECONNREFUSED
 2015-05-06 01:16:46 INFO ZEO.ClientStorage zeostorage Testing
 connection ManagedClientConnection ('127.0.0.1', )
 2015-05-06 01:16:46 INFO ZEO.zrpc.Connection('C') (127.0.0.1:)
 hmm,
 
 just a small shot in the dark: Even if this should work too - why the 
 client tries to connect the IPv4 address of loopback and the error gives the 
 IPv6 of it back?
 
 I would try to eleminate this if possible and bring Zope down to IPv4 
 completely, because there are still many software libraries and applications 
 around (even some underlying os parts) which are not well tested with IPv6.
 
 If this solves your prob - no idea...
 
 
 hth a bit.
 cheerioh,
 
 
 Niels.
 -- 
 Niels Dettenbach
 Syndicat IT  Internet
 http://www.syndicat.com


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZEO manageUndo not working - DisconnectedError

2015-05-06 Thread Sebastian Tänzer
thanks for the „shot“, yet disabling IPv6 locally on the VM does not help, same 
error:

(server):

2015-05-06T10:05:51 INFO ZEO.StorageServer (127.0.0.1:44833) disconnected
--
2015-05-06T10:05:51 INFO ZEO.zrpc.Connection('S') (127.0.0.1:44835) received 
handshake 'Z3101'
--
2015-05-06T10:06:35 ERROR ZEO.zrpc (3040) can't decode message: 
'(K\x05I00\nU\x08undoInfo(K\x00K\x14}U\x0bdescriptioncco...'
--
2015-05-06T10:06:35 ERROR ZEO.zrpc.Connection('S') (127.0.0.1:44835) Error 
caught in asyncore
Traceback (most recent call last):
 File /opt/python/2.7.9/lib/python2.7/asyncore.py, line 83, in read
   obj.handle_read_event()
 File /opt/python/2.7.9/lib/python2.7/asyncore.py, line 449, in 
handle_read_event
   self.handle_read()
 File /opt/python/zope2-latest/lib/python2.7/site-packages/ZEO/zrpc/smac.py, 
line 240, in handle_read
   self.message_input(msg)
 File 
/opt/python/zope2-latest/lib/python2.7/site-packages/ZEO/zrpc/connection.py, 
line 417, in message_input
   msgid, async, name, args = self.decode(message)
 File 
/opt/python/zope2-latest/lib/python2.7/site-packages/ZEO/zrpc/marshal.py, 
line 80, in server_decode
   return unpickler.load() # msgid, flags, name, args
 File 
/opt/python/zope2-latest/lib/python2.7/site-packages/ZEO/zrpc/marshal.py, 
line 120, in server_find_global
   raise ZRPCError(import error %s: %s % (module, msg))
ZRPCError: import error copy_reg: 
--
2015-05-06T10:06:35 INFO ZEO.StorageServer (127.0.0.1:44835) disconnected
--
2015-05-06T10:06:35 INFO ZEO.zrpc.Connection('S') (127.0.0.1:44837) received 
handshake ‚Z3101'

More ideas? :-)

 Am 06.05.2015 um 07:42 schrieb Niels Dettenbach (Syndicat IT  Internet) 
 n...@syndicat.com:
 
 Am 6. Mai 2015 01:24:50 MESZ, schrieb Sebastian Tänzer s...@taenzer.me:
 2015-05-06 01:16:46 WARNING ZEO.zrpc (19205) CW: error connecting to
 ('::1', ): ECONNREFUSED
 2015-05-06 01:16:46 INFO ZEO.ClientStorage zeostorage Testing
 connection ManagedClientConnection ('127.0.0.1', )
 2015-05-06 01:16:46 INFO ZEO.zrpc.Connection('C') (127.0.0.1:)
 hmm,
 
 just a small shot in the dark: Even if this should work too - why the 
 client tries to connect the IPv4 address of loopback and the error gives the 
 IPv6 of it back?
 
 I would try to eleminate this if possible and bring Zope down to IPv4 
 completely, because there are still many software libraries and applications 
 around (even some underlying os parts) which are not well tested with IPv6.
 
 If this solves your prob - no idea...
 
 
 hth a bit.
 cheerioh,
 
 
 Niels.
 -- 
 Niels Dettenbach
 Syndicat IT  Internet
 http://www.syndicat.com


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZEO manageUndo not working - DisconnectedError

2015-05-06 Thread Sebastian Tänzer
After more „research“ I see that the ZMS3 pip packages uses completely 
different versions that don’t seem to be compatible with ZEO (at least Undo is 
not working). I’m aware „undo“ is not a really used feature at all as revisions 
most of the time are beeing implemented by products. My only fear is that we’re 
running into other problems with the ZODB if the base setup is using wrong 
versions and I’d like to avoid that.

Examples:

zope2 via pip uses Aquisition 2.13.8
zope2 via ZMS3 installed via pip uses Aquisition 4.1

zope2 via pip uses ZopeUndo 2.12.0
zope2 via ZMS3 installed via pip uses ZopeUndo 4.0

Most packages with ZMS3 install are newer versions.

So, basic question: What is the recommended way to setup Zope2 with ZEO. Which 
versions work? It seems almost impossible to understand what versions should be 
used. The Zope2 egg uses way older versions. Any problems with that? Which 
packages are safe to update?

Also, there were some patches by the ZMS people last year 
(https://github.com/zopefoundation/Zope/pull/13) - but Zope2 installed via pip 
works just fine here.
Using newer package versions require the patches though.

What is the „best“ setup if I’m using ZEO to connect with Zope2 ZEO clients AND 
from other remote setups (non Zope-Clients, Python command line code working 
with the ZODB via ClientStorage).

Maybe Tres could give me some insight on this?

Best,
Sebastian

 Am 06.05.2015 um 07:42 schrieb Niels Dettenbach (Syndicat IT  Internet) 
 n...@syndicat.com:
 
 Am 6. Mai 2015 01:24:50 MESZ, schrieb Sebastian Tänzer s...@taenzer.me:
 2015-05-06 01:16:46 WARNING ZEO.zrpc (19205) CW: error connecting to
 ('::1', ): ECONNREFUSED
 2015-05-06 01:16:46 INFO ZEO.ClientStorage zeostorage Testing
 connection ManagedClientConnection ('127.0.0.1', )
 2015-05-06 01:16:46 INFO ZEO.zrpc.Connection('C') (127.0.0.1:)
 hmm,
 
 just a small shot in the dark: Even if this should work too - why the 
 client tries to connect the IPv4 address of loopback and the error gives the 
 IPv6 of it back?
 
 I would try to eleminate this if possible and bring Zope down to IPv4 
 completely, because there are still many software libraries and applications 
 around (even some underlying os parts) which are not well tested with IPv6.
 
 If this solves your prob - no idea...
 
 
 hth a bit.
 cheerioh,
 
 
 Niels.
 -- 
 Niels Dettenbach
 Syndicat IT  Internet
 http://www.syndicat.com


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZEO manageUndo not working - DisconnectedError

2015-05-06 Thread Sebastian Tänzer
After further testing I was able to sort this one out by downgrading ZopeUndo 
to 2.12.0 (pip install ZopeUndo==2.12.0 --force —upgrade).
PyPi only said 4.0 brought Py3 compability. Should I expect any problems using 
ZopeUndo 2.12 + ZEO/ZODB4/ZODB3 with their latest versions?

Best, Sebastian

 Am 06.05.2015 um 07:42 schrieb Niels Dettenbach (Syndicat IT  Internet) 
 n...@syndicat.com:
 
 Am 6. Mai 2015 01:24:50 MESZ, schrieb Sebastian Tänzer s...@taenzer.me:
 2015-05-06 01:16:46 WARNING ZEO.zrpc (19205) CW: error connecting to
 ('::1', ): ECONNREFUSED
 2015-05-06 01:16:46 INFO ZEO.ClientStorage zeostorage Testing
 connection ManagedClientConnection ('127.0.0.1', )
 2015-05-06 01:16:46 INFO ZEO.zrpc.Connection('C') (127.0.0.1:)
 hmm,
 
 just a small shot in the dark: Even if this should work too - why the 
 client tries to connect the IPv4 address of loopback and the error gives the 
 IPv6 of it back?
 
 I would try to eleminate this if possible and bring Zope down to IPv4 
 completely, because there are still many software libraries and applications 
 around (even some underlying os parts) which are not well tested with IPv6.
 
 If this solves your prob - no idea...
 
 
 hth a bit.
 cheerioh,
 
 
 Niels.
 -- 
 Niels Dettenbach
 Syndicat IT  Internet
 http://www.syndicat.com


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] manage_renameObjects with remote ZEO

2015-05-05 Thread Sebastian Tänzer
Tres, thanks for the reply.

In my case, meta_type of both objects is „Folder“ and further checking showed 
both are OFS.Folder classes. My test ist trying to rename a folder inside 
another folder.
obj.all_meta_types() always returns an empty list, which isn’t empty when using 
the same command from inside a normal Zope2 product with the same object.

I was able to bypass the problem by writing my own rename routine using 
_setObject, _getObject but still would like to know why manage_renameObject 
fails.

Best, Sebastian

 Am 06.05.2015 um 00:52 schrieb Tres Seaver tsea...@palladion.com:
 
 
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 05/05/2015 01:42 PM, Sebastian Tänzer wrote:
 Hello Zope community,
 
 does anyone know how to rename a OFS.Folder object from a remote
 python script (i.e. command line)? I’m trying this via
 ZEO.ClientStorage, but it fails with The object emrenametest1/em
 does not support this operation.“ ,triggered by OFS/CopySupport.py,
 line 537, in _verifyObjectPaste.
 
 That error occurs because the object being pasted is of a meta_type which
 cannot be created within the target folder.
 
 
 Tres.
 - -- 
 ===
 Tres Seaver  +1 540-429-0999  tsea...@palladion.com
 Palladion Software   Excellence by Designhttp://palladion.com
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAEBAgAGBQJVSUmpAAoJEPKpaDSJE9HYjR8P/0EJQ1qublRfPp2OGHewEezI
 mBXBdtibaXDb2VG6P4nThMFmqmbkHS/kmvGzn3grqTHIYXsevrU/NMoESMp2lrbn
 Mcfv3fx0OGp/Fuge2HuRs4M8fSV4mPP8l+0jom4LadQ+wKicFaIdjKr326CpIDH9
 Ee/vi3uWNOYCVV0OGbmsfQBSmTXrQWDbAQkyPHq5UDzSp+sQjjl3yv6oGhz4Ddip
 f9AeY2FpsY57ylEN4Y85fbA+HxSadYeKyY0zW5f8sZc+rOFi9DJyNqov2xcAiV3N
 UnN39nyfsF0ZBdu8EKXQaBKVQZO/udLjz4UY97kuatL4QBOYXEYA5u6ZLlZ1e2BF
 jH3zOqgIuPF+R5TDy2K/SQGYUE/U4VwPl+ybVgC0xCmG7VyVMIAAa6Kk5DscM+mY
 Ced9ZC+8dOXDvt6AXRJlto5kEQjdbnljZHU5syCqGNsRm31c5+6/lOh+xKMG0OWL
 e8CGsFw9xKu6nmV67YHqWgXYOOK2wARtvg3Di9gY/gW3mArybWvDUXsLNDo+Qd3F
 U15Q2MmP6tQ6n1lnJRjMff1M4MQer/E/KAG4BMXHXP4GTY56oIHrN6KDJ+Lo0X5a
 6z9LJf4A9Dk54AXMZTvXxJQHMg6OJBITiiewc4ETbuHSPM7emjwHJ1x5eRv2+cst
 Mtnm6wIjy9R4pVHxn+5m
 =9rg7
 -END PGP SIGNATURE-
 


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] manage_renameObjects with remote ZEO

2015-05-05 Thread Sebastian Tänzer
Hello Zope community,

does anyone know how to rename a OFS.Folder object from a remote python script 
(i.e. command line)? I’m trying this via ZEO.ClientStorage, but it fails with 
The object emrenametest1/em does not support this operation.“ ,triggered 
by OFS/CopySupport.py, line 537, in _verifyObjectPaste.

Full test case code is at http://pastebin.com/j9HY3PVJ

At first I thought this is because of a missing REQUEST and/or authentication 
problem, as _verifyObjectPaste does some security checks or else fails with 
this message. Still, using makerequest and newSecurityManager doesn’t work.

Any help would be greatly appreciated :-)

Best
Sebastian

-
tänzermedien GmbH - Agentur für Online-Medien
Kekuléstr. 39 | 53115 Bonn, Germany
E-Mail: s...@taenzer.me | Web: http://www.taenzer.me  
Tel.: 0228-304134-0 | Fax.: 0228-304134-99
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Start up failing with ZopeCtlOptions instance has no attribute 'transcript'

2015-04-01 Thread Sebastian Tänzer
Hello all,

latest Zope2 releases (2.13.23.dev0) seem top have a bug in 
Zope2/Startup/zopectl.py and zdaemon/zdctl.py leading to this error on zopectl 
start (zopectl fg works fine):

Traceback (most recent call last):
  File /opt/python/zope2/bin/zopectl, line 9, in module
load_entry_point('Zope2==2.13.23.dev0', 'console_scripts', 'zopectl')()
  File 
/opt/python/zope2/lib/python2.7/site-packages/Zope2/Startup/zopectl.py, line 
488, in run
exitstatus = main()
  File 
/opt/python/zope2/lib/python2.7/site-packages/Zope2/Startup/zopectl.py, line 
447, in main
c.onecmd( .join(options.args))
  File /opt/python/2.7.9/lib/python2.7/cmd.py, line 221, in onecmd
return func(arg)
  File 
/opt/python/zope2/lib/python2.7/site-packages/Zope2/Startup/zopectl.py, line 
241, in do_start
ZDCmd.do_start(self, arg)
  File /opt/python/zope2/lib/python2.7/site-packages/zdaemon/zdctl.py, line 
305, in do_start
args += self._get_override(-t, transcript)
  File 
/opt/python/zope2/lib/python2.7/site-packages/Zope2/Startup/zopectl.py, line 
223, in _get_override
value = getattr(self.options, name)
AttributeError: ZopeCtlOptions instance has no attribute 'transcript'

I repeated my setup multiple times and was able to reproduce this every time 
with every setup, so I don't think this is a configuration error on my side 
(yet if it is please tell me what might be wrong). Zope2 was installed using a 
simple pip install Zope2. Imho this bug comes up as in Startup/zopectl.py the 
ZopeCtlOptions class is beeing emulated but so. missed the transcript attribute 
(as before this happend with the startup-time attribute, too).

I created a patch that's attached to this mail and should be run inside the 
virtualenv python dir (i.e. where bin, include, lib etc. reside):

patch -p0  patch-zope2-startup.diff

Maybe someone could confirm that this bug exists and this fixes it?

Best
Sebastian

-
tänzermedien GmbH - Agentur für Online-Medien
Kekuléstr. 39 | 53115 Bonn, Germany
E-Mail: s...@taenzer.me | Web: http://www.taenzer.me  
Tel.: 0228-304134-0 | Fax.: 0228-304134-99



patch-zope2-startup.diff
Description: Binary data
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope2 - pro/contra

2015-03-06 Thread Sebastian Tänzer
I do share some of the point of views, especially in regards to bad marketing 
about Zopes future versions and lack of documentation. I don't share the 
criticism on ZPT/TAL - actually I love Page Templates and the approach to 
templating it brought to the web world. Chameleon is one of my favourite 
templating engines around.

Descriping Zope as mature is what I think fits best at the moment. Personally, 
I don't think Zope2 and a limited set of quite good Products is anywhere near 
dying - it's just not widely spread in the media but still I happen to come 
across many projects that work with the ZMS CMS for example where you don't 
expect it. 

My practical experience at least for the last 2-3 years was extremely positive 
about Zope2. We did not have any project where Zope2 was not able to do what 
was needed and do it well, too. Even some external coders were surprised about 
the flexiblity and extensibility.

I'm not saying Zope2 and especially ZMS (which is our primary CMS products 
beeing used) fits every project, but we never ran into any trouble and weren't 
able to do the job. I did do some jobs with Pyramid and the development time 
and performance was (at least with our limited projects) about the same.

Btw, we never really used neither the ZMI nor the TTWE functions really (close 
to never at all). For the last years we're working with our own Cocoa+python 
based MacOS app that uses WebDAV + FTP for local syncing and things like 
compass/sass integration. This is insanely fast despite the protocols (and 
thanks to local development setups and SSDs nowadays) and made us almost forget 
we're working inside the ZODB and not the local file system in the end. Using 
sockets we also sync down remote changes inside ZOPE locally almost instantly. 
It's a little bit like a FTP client on steriods ;-)

Thank you all for your opinions and the open discussion. It's nice to hear 
about other people still using it in production despite its reputation ;-)

Best
Sebastian





___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope2 - pro/contra

2015-03-06 Thread Sebastian Tänzer
I just ran into that a few days ago looking for documentation about the 
PUT_factory which has not been copied from the original documenation to the new 
one at http://docs.zope.org/zope2/. But: It still existed and took about 15 
seconds to google it. 

Who's maintaining docs.zope.org/zope2 at the moment? I'd love to add partly 
missing stuff and complete stuff missing at all. Unfortunately these docs don't 
have a CMS behind. I already thought about porting them to a ZMS based site so 
editing and extending would be easier.

 Am 04.03.2015 um 12:35 schrieb Niels Dettenbach n...@syndicat.com:
 
 3.) Zope documentation was partly very bad - at least when it comes to 
 installation and system administration, updating etc.pp.

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope2 - pro/contra

2015-03-04 Thread Sebastian Tänzer
Hello ZOPE community,

we're still developing websites using Zope2 + ZMS3 (www.zms-publishing.com) for 
years now and never ran into any real problems (compared to, let's say, 
Wordpress, typo3, Drupal etc. which had serious security problems over the 
years) and our clients are quite happy with ZMS. 

A few days ago on a barcamp the discussion lead to Zope and the usual comments, 
i.e. Zope is dead, I would not use that, Too complicated, Too old, 
Outdated, and so on.

My personal opinion is, that Zope2 is still rock-solid and gets the job done. 
I've never heard of any serious issues compared to the big competitors from the 
PHP or Java world. I looked into Pyramid and Django for different projects and 
always came back to Zope2 itself.

I did not ask that question for quite some time now as there was no reason. 
Sure, sometimes we get comments like never heard of it etc., but nothing 
serious. Still, are there any specific reasons (beside personal favors) not to 
use Zope2 anymore? Any reason not to use Zope2 + ZODB for new projects? Are 
other frameworks like flask, Django, pyramid etc. that much better compared to 
Zope?

Best
Sebastian
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )