Re: [Zope-DB] RelStorage and Zope 2.9.8

2009-03-08 Thread JeanMichel FRANCOIS
not really, this is a big project with a lot of csutomer's specific code. I m 
just trying to optimize the application.

I will look if the patch can be applied on ZODB 3.6 and make some test next 
week.

Jean-Michel FRANCOIS

Le Friday 06 March 2009 10:47:24 Shane Hathaway, vous avez écrit :

 JeanMichel FRANCOIS wrote:
  I have tested RelStorage with Zope3.4 and i m happy with it. I would
  like to know if it's usable with Zope 2.9. I'm not sure, but Zope2.9 is
  release with a ZODB==3.6 and RelStorage need ZODB==3.7, isn't it ?

 I think RelStorage could work with ZODB 3.6, but the combination hasn't
 been tested yet.  Would it be possible for you to upgrade to Zope 2.10?

 Shane


___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] RelStorage and Zope 2.9.8

2009-03-05 Thread JeanMichel FRANCOIS
Hi,

  I have tested RelStorage with Zope3.4 and i m happy with it. I would like to 
know if it's usable with Zope 2.9. I'm not sure, but Zope2.9 is release with a 
ZODB==3.6 and RelStorage need ZODB==3.7, isn't it ? 

-- 
Cordialement,
Jean-Michel FRANCOIS
Makina Corpus

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope] chameleon.zpt and zope3.4

2009-03-01 Thread JeanMichel FRANCOIS
This raise a Bad version error:

Installing app.
The version, 3.4.0, is not consistent with the requirement, 'zope.i18n==3.5'.
While:
  Installing app.
Error: Bad version 3.4.0

Le Sunday 01 March 2009 07:35:46 Andreas Jung, vous avez écrit :

 On 28.02.2009 22:54 Uhr, JeanMichel FRANCOIS wrote:
  Hi,
 
  chameleon require zope.i18n = 3.5. I m using zope3.4 throw KGS, so i
  have zope.i18n == 3.4. Is there a way to use chameleon on 3.4 ?

 pin zope.i18n==3.5 within your buildout.cfg

 -aj


___
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] chameleon.zpt and zope3.4

2009-02-28 Thread JeanMichel FRANCOIS
Hi,
 
  chameleon require zope.i18n = 3.5. I m using zope3.4 throw KGS, so i have 
zope.i18n == 3.4. Is there a way to use chameleon on 3.4 ?

-JeanMichel
___
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] analyse ZODBUtilities/space.py results

2008-10-21 Thread JeanMichel FRANCOIS
Hi,

  I have a plone2.5 web site in production on zope2.9 with more than 100 000 
objects. I would like to analyse the content of the zodb to optimize the web 
site, find problems and better understand the ZODB.

  So i have started using space.py script, and got the results in the joined 
csv file. BTrees.XX classes are the most important results. So  i would like 
to understand what are those BTrees stuffs:

BTrees._IOBTree.IOBucket
BTrees._IIBTree.IISet
BTrees._OIBTree.OIBucket
BTrees._OOBTree.OOBTree
BTrees._OOBTree.OOBucket
BTrees._IIBTree.IIBucket
BTrees._IIBTree.IITreeSet
BTrees._IOBTree.IOBTree
BTrees._IIBTree.IIBTree
BTrees._OIBTree.OIBTree

according to me, btrees are folders that support a large numbers of entries. 
why they are totalize 50% of the database (585MO of 1.3Go Data.fs)

I have a Members folder that contains about 8500 folders, got something like 
8500 btrees for a simple mail product (one per members), got the PLoneGazette 
product that store 1 btree folder, but not enough to make 50% of the database, 
or i have missed sth.

Can anyone help me to understand those results ?
 
-- 
JeanMichel FRANCOIS
Makina Corpus

___
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] Five and editform

2008-10-17 Thread JeanMichel FRANCOIS
Hi Mark Gibson,

Do you develop this with egg ? throw Products namespace ?
The zcml seems good. If you develop outside of the Products namespace don't 
forget to include your package in the site.zcml. You can verify this by making 
a mistake in the zcml and try to start zope.

Does you content implements boring.interfaces.IBoring ?

-- 
JeanMichel FRANCOIS
Makina Corpus

Le Friday 17 October 2008 05:51:34 Mark Gibson, vous avez écrit :

 I created a simple content type.  I can create an object, but I can't
 call my view or edit form on it.   If I try object/boring_editform or
 object/index.html I get a Not Found error.  Here's what I have in my
 configure.zcml:

 ---

   browser:editform
  schema=boring.interfaces.IBoring
  for=boring.interfaces.IBoring
  name=boring_editform
  label=Edit Boring Folder
  permission=boring.ManageBoring
/

   browser:page for=boring.interfaces.IBoring
 name=index.html
 template=view.pt
 permission=zope2.View
 menu=zmi_views title=View
   /browser:page
 ---

 What am I missing?

 Thanks,
 Mark


 ___
 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 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] Stepper1.5.0: more steps !!!!

2008-10-17 Thread JeanMichel FRANCOIS
Thx Marco
I don't know what was the pb, but after having this issue, my instance was not 
able to start. So i have re-buildout it and now, all is OK. Stepper work with 
those Products/__init__.py files.

In fact i m adding __init__ file to every Products folder because Pydev index 
source in it only in that case (to make it as areal python package)
So now every things is fine.

so, I m asking a new question about stepper now, is there more steps somewhere 
for plone. I have writting many steps to replace my old way of migrating data:
- a Password class to change every password of every users to a new password 
set in arg (DONE)
- a Profile class to apply a genericsetup profile (DONE)
- a EMail class to change mail of every users set in arg (DONE)


If there is no package that get all that step classes, i can put it on plone 
collective. May i need to ask this on plone mailing list before.

-- 
JeanMichel FRANCOIS
Makina Corpus

Le Thursday 16 October 2008 18:20:57 Marco Bizzarri, vous avez écrit :

 Yes.

 You've a __init__.py inside your $INSTANCE_HOME/Products directory.

 Try removing it, and I think it will work.

 Regards
 Marco

___
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] Stepper1.5.0 failed to run

2008-10-16 Thread JeanMichel FRANCOIS
/lib/python/Zope2/Startup/datatypes.py,
 line 21, in ?
import OFS.Uninstalled
  File 
/home/toutpt/workspace/minitage/zope/plone25-guerir-dev/parts/zope2/lib/python/OFS/Uninstalled.py,
 line 20, in ?
import SimpleItem, Globals, Acquisition
  File 
/home/toutpt/workspace/minitage/zope/plone25-guerir-dev/parts/zope2/lib/python/OFS/SimpleItem.py,
 line 26, in ?
import AccessControl.Role, AccessControl.Owned, App.Common
  File 
/home/toutpt/workspace/minitage/zope/plone25-guerir-dev/parts/zope2/lib/python/AccessControl/Role.py,
 line 21, in ?
import Globals, ExtensionClass, PermissionMapping, Products
  File 
/home/toutpt/workspace/minitage/zope/plone25-guerir-dev/parts/zope2/lib/python/AccessControl/PermissionMapping.py,
 line 29, in ?
from Owned import UnownableOwner
  File 
/home/toutpt/workspace/minitage/zope/plone25-guerir-dev/parts/zope2/lib/python/AccessControl/Owned.py,
 line 276, in ?
Globals.default__class_init__(Owned)
  File 
/home/toutpt/workspace/minitage/zope/plone25-guerir-dev/parts/zope2/lib/python/App/class_init.py,
 line 69, in default__class_init__
AccessControl.Permission.registerPermissions(self.__ac_permissions__)
  File 
/home/toutpt/workspace/minitage/zope/plone25-guerir-dev/parts/zope2/lib/python/AccessControl/Permission.py,
 line 132, in registerPermissions
Products.__ac_permissions__=(
AttributeError: 'module' object has no attribute '__ac_permissions__'

Have you any idea of what happens ?

-- 
JeanMichel FRANCOIS
Makina Corpus

___
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] Is someone read browser.contents ?

2008-10-14 Thread JeanMichel FRANCOIS
Hi J. Lukesh,

  No, no, i speak about doctest using Products.Five.testbrowser and not real 
web site parsing from external pages. may i was not clear enough. While 
writing doctest with that testbrowser, i m not really confortable to read the 
html tags on the consol outpout by doing browser.contents. So That was the 
reason why i have doing this small openInFirefox method.

-- 
JeanMichel FRANCOIS
Makina Corpus

Le Monday 13 October 2008 18:23:30 Jaroslav Lukesh, vous avez écrit :

 Hi JeanMichel,

 Did you save content from external pages into ZODB? I was thinking in past
 about it to make little automated archive with squishdot.

 If you will have success, would you like to publish your zexp and products,
 please?

 Many thanks, J. Lukesh

___
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] Is someone read browser.contents ?

2008-10-13 Thread JeanMichel FRANCOIS
Hi,

  Today i have added a piece of code in my fct test class to be able to open 
browser.contents inside a real browser:

def openInFirefox(self, contents, firefox_path='firefox'):
d, fn = mkstemp('.html')
f = open(fn, 'w')
f.write(contents)
os.popen('%s %s'%(firefox_path, fn))

I would like to know if there is something similar or already done in the a 
zope egg, cause i m sure nobody read the html with their eyes :)

-- 
JeanMichel FRANCOIS
Makina Corpus

___
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] Proxy Error on Squishdot Re-catalog.

2008-10-10 Thread JeanMichel FRANCOIS
Hi,

  I don't like the zmi (or any web interface) for this kind of operation, i 
prefer scripting them. Check the two attached files.

How to use it ?
push them on the server
cd path/tomyscripts
zopepy recatalog.py -c path/to/etc/zope.conf --recatalog --commit

zopepy is a python interpreter with all zope modules in its PYTHONPATH 
common.py is used in production on our servers
recatalog.py is a kind of template adapted to fit your needs (not tested, but 
should work) I m using this to perform migrations of datas (objects)

-- 
JeanMichel FRANCOIS
Makina Corpus

Le Thursday 09 October 2008 22:20:05 Laurence Rowe, vous avez écrit :

 This is only a timeout and nothing to worry about. Either connect
 directly to the zope instance to perform the recatalog or just leave it
 and wait. You can tell it's done when python is no longer using all your
 cpu.

 Laurence

 Ignacio Valdes wrote:
  Hello all, Linux Medical News http://www.linuxmednews.com is a quite
  large Squishdot based website. I am attempting to re-catalog all
  postings which is a fairly lengthy process. When I try to do this, it
  works for a period of time then gives this message:
 
  Proxy Error
 
  The proxy server received an invalid response from an upstream server.
  The proxy server could not handle the request POST /.
 
  Reason: Error reading from remote server
 
  Apache/2.2.6 (Fedora) Server at linuxmednews.com Port 80
 
  What should I do?
 
  -- IV
  ___
  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 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 )


#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (C) 2008, Mathieu PASQUET [EMAIL PROTECTED] aka kiorky
# Copyright (C) 2008, Jeanmichel Francois [EMAIL PROTECTED] aka toutpt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

import os
import sys
import logging

from Testing.makerequest import makerequest
import Zope2

def connect(zopeconf):
options is an options optparser object.
os.environ['ZOPE_COMPATIBLE_STARTUP'] =  
os.environ['ZOPE_CONFIG'] = zopeconf
app = makerequest(Zope2.app())
logger = logging.getLogger('20080624 migration')
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager

plone = app.anticancer.get('www.anticancer.fr')
user = plone.acl_users.getUser('webmestre').__of__(plone.acl_users)
newSecurityManager(app, plone.acl_users.getUser('webmestre'))
import Products
return plone, user

def initLogging():
# logging to stdout
logging.root.setLevel(logging.INFO)
lformatter = logging.Formatter(%(asctime)s %(name)-1s %(levelname)-2s - %(message)s)
lhandler = logging.StreamHandler(sys.stdout)
lhandler.setFormatter(lformatter)
logging.root.addHandler(lhandler)

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (C) 2008, Mathieu PASQUET [EMAIL PROTECTED] aka kiorky
# Copyright (C) 2008, Jeanmichel Francois [EMAIL PROTECTED] aka toutpt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

import sys
import logging
import transaction
import pdb

from Acquisition import aq_base
from optparse import OptionParser
from DateTime import DateTime
from common import connect, initLogging

initLogging()

logger = logging.getLogger(migration)
parser = OptionParser()
parser.add_option(-c,
  action=store, dest=zopeconf, default=parts/guerir2-1/etc/zope.conf,
  help=Zope.conf path)
parser.add_option(--all,
  action=store_true, dest=all, default=False,
  help=Launch all