Re: [Zope-dev] zope.testrunner and nose count doctests differently

2011-11-08 Thread Raphael Ritz
On 11/3/11 12:13 PM, Chris Withers wrote:
 On 03/11/2011 11:05, Jim Fulton wrote:
 On Thu, Nov 3, 2011 at 5:14 AM, Chris Withersch...@simplistix.co.uk   
 wrote:
 Hi Michael,

 On 03/11/2011 09:12, Michael Howitz wrote:
 Run both test runners with the option -vv to see which tests are run.
 (I did this for your code and the list of tests seems to be equal.)

 It would be interesting for the rest of us to know the length of that list.

 $ bin/test -m testfixtures.tests.test_docs -vv
 Running tests at level 1
 Running zope.testrunner.layer.UnitTests tests:
 Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
 Running:
testfixtures/docs/api.txt
testfixtures/docs/changes.txt
testfixtures/docs/comparing.txt
testfixtures/docs/components.txt
testfixtures/docs/datetime.txt
testfixtures/docs/description.txt
testfixtures/docs/development.txt
testfixtures/docs/exceptions.txt
testfixtures/docs/files.txt
testfixtures/docs/index.txt
testfixtures/docs/installation.txt
testfixtures/docs/license.txt
testfixtures/docs/logging.txt
testfixtures/docs/mocking.txt
testfixtures/docs/streams.txt
testfixtures/docs/utilities.txt


Note that the above are 16 files ...

 Ran 316 tests with 0 failures and 0 errors in 0.150 seconds.

... containing what zope.testrunner considers 316 individual tests.

 Tearing down left over layers:
 Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.

 $ bin/nosetests testfixtures/tests/test_docs.py -vv
 nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
 testfixtures_nose/docs/api.txt ... ok
 testfixtures_nose/docs/changes.txt ... ok
 testfixtures_nose/docs/comparing.txt ... ok
 testfixtures_nose/docs/components.txt ... ok
 testfixtures_nose/docs/datetime.txt ... ok
 testfixtures_nose/docs/description.txt ... ok
 testfixtures_nose/docs/development.txt ... ok
 testfixtures_nose/docs/exceptions.txt ... ok
 testfixtures_nose/docs/files.txt ... ok
 testfixtures_nose/docs/index.txt ... ok
 testfixtures_nose/docs/installation.txt ... ok
 testfixtures_nose/docs/license.txt ... ok
 testfixtures_nose/docs/logging.txt ... ok
 testfixtures_nose/docs/mocking.txt ... ok
 testfixtures_nose/docs/streams.txt ... ok
 testfixtures_nose/docs/utilities.txt ... ok

These are the same 16 files (I assume) that nose considers one
test each irrespective of their content. The individual tests
in there are run but not counted separately.

Is it this what's confusing you? It certainly confused me
when I noticed this for the first time. I'd even consider
this a bug in node's reporting but never dared to file a
ticket.

Raphael


 --
 Ran 16 tests in 0.141s

 My guess is that when you're using the zope testruner, you're somehow
 picking up zope.testing.doctest, which counts each doctest example as
 a  test.

 The code uses Manuel, under both nose and zope.testrunner:

 from doctest import REPORT_NDIFF,ELLIPSIS
 from glob import glob
 from manuel import doctest,codeblock,capture
 from manuel.testing import TestSuite
 from os.path import dirname,join,pardir

 def test_suite():
   m =  doctest.Manuel(optionflags=REPORT_NDIFF|ELLIPSIS)
   m += codeblock.Manuel()
   m += capture.Manuel()
   return TestSuite(
   m,
   *glob(join(dirname(__file__),pardir,pardir,'docs','*.txt'))
   )

 cheers,

 Chris



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


Re: [Zope-dev] [Plone-developers] experimental.broken - Graceful handling of broken interfaces and components in the ZODB

2011-11-07 Thread Raphael Ritz
On 11/7/11 10:36 AM, Malthe Borch wrote:
 On 7 November 2011 09:17, Ross Pattersonm...@rpatterson.net  wrote:
 The intention of this package is to see if the implementation of broken
 object handling is correct and robust enough to merge into
 zope.interface and zope.component themselves.  Is this the right
 approach?  If not why and what would be better?  How might this approach
 be improved?

 (removed plone-dev from cc).

 Isn't it symptom treatment though?

Yes, it is but the symptom is severe and not uncommon.
The problem Ross is addressing here just happens way too often
in the real world to simply say Sorry, user error.

Just my 2 cents,

Raphael


 If you've got an add-on which adds
 marker interfaces to general objects, shouldn't that add-on remove –
 or no longer provide – those same interfaces when it's uninstalled? At
 least in Plone, you can easily query content objects providing a
 particular set of interfaces.

 I think it's a non-goal to be able to run a system without all the
 required software – which is how I understand it when you just do a
 hard remove of an add-on without a prior soft remove.

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


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


Re: [Zope-CMF] GenericSetup backport

2011-05-27 Thread Raphael Ritz
On 5/26/11 10:39 PM, Godefroid Chapelle wrote:

[..]


 Further, I think it is a real advantage for the product developers if
 they can migrate their tests to p.a.testing while keeping Plone 3
 compatibility.

FWIW: whatever the solution ends up being I'd welcome
such an option as well.

Raphael



 Hanno

 Gotcha
 ___
 Zope-CMF maillist  -  Zope-CMF@zope.org
 https://mail.zope.org/mailman/listinfo/zope-cmf

 See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


___
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


Re: [Zope-dev] CSRF protection for z3c.form

2011-04-06 Thread Raphael Ritz
On 4/6/11 7:43 PM, Roger wrote:
[..]
 I think to protect the form is just a part of a concept.
 Another part must be to prevent to inject JavaScript in
 user generated content. If an application allows to post
 JS in a blog post or comment etc. it should be possible to
 use easydmx to read and re-use the secure form token.
 (not approved but should work)

For that reason both CMF as well as Plone clean
user input by stripping nasty tags and such - at
least per default.

Raphael


 One of my bigger concern is also that such a token will
 break a lot of our tests which whould force us to use
 custom non security token generating form classes.

 I'm fine in general for implement such a concept
 in z3c.form but it should be optional.
 Why not offer additional form classes or a mixin
 for support such token?

 Regards
 Roger Ineichen

 Laurence


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



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


Re: [Zope-CMF] Problem with offline buildout

2010-01-20 Thread Raphael Ritz
Charlie Clark wrote:
 Hi,

Hi Charlie,

 
 I'm testing deploying a current project using buildout's offline mode. I  
 have a complete download cache but I'm still getting errors:
 
 We have no distributions for products.cmfcore that satisfies  
 'products.cmfcore'.
 
 Neither this nor the subsequent traceback give much of a clue as to  
 exactly what is needed to satisfy the constraint. Any ideas?

Depending on what you mean by complete download cache and whether
or not you are using 'extends' for some version pinning (or the like)
it may help to add an 'extends-cache' setting to your buildout cache
and/or make sure you use zc.buildout 1.4.1 (or higher).

That's at least how I understand
 
http://manage.plone.org/documentation/manual/developer-manual/managing-projects-with-buildout/creating-a-buildout-defaults-file

HTH

Raphael


 
 Charlie

___
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


[Zope] Re: the grand reunion

2008-04-11 Thread Raphael Ritz

Yuri wrote:

Hi!



Hi Yuri,

[..]



I would like to have an easy way to develop without having to be subject 
to dependencies from other envinroment, minimize the effort to mantain 
it and focus on doing things :)




Maybe not exactly what you are asking for but I recommend you play
with buildout a bit - I'm sure you'll appreciate the ease with which
you can manage independent installations in a repeatable and easily
modifiable way.

Is one big zope installation, with multiple instances, well suited for 
this tasks? Or is better different zope versions? What about the various 
Data.fs, is better to have them separated by application or by zope 
envinroment? I mean all the Plone in a single Data.fs or each one in a 
separated Data.fs?




Without further knowing how these sites might be related or not
this is hard to answer but often times I prefer to have separate
Zope instances (- different ZODBs) for different Plone sites.
Even if they share substantial configuration/add-ons etc.
Again, using buildout makes it a snap to create and maintain
as many Zope instances as you want. And using a common buildout
cache they can also mostly share the basic installation.

Just my 2 cents,

Raphael


So, what is the best approach to migrate the three servers?
___
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] Re: You are not allowed to access 'a particular str' in this context

2008-01-25 Thread Raphael Ritz

Gerhard Schmidt wrote:

[..]



Any Idea how to fix this.



What happens when you add

__allow_access_to_unprotected_subobjects__ = 1

to your type definition? (Good old Zope 2 magic, yeah ...)

Raphael





Gerhard




___
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-dev] Re: more on stacked component registries

2008-01-15 Thread Raphael Ritz

Chris Withers wrote:

[..]

Actually, it doesn't. The handling of __bases__ appears to be done in 
the functions of the mysterious zope.interface.ro module.

(that ro thing takes the biscuit for obscure naming :-( )



Without having a clue my first guess would be that this means
'Resolution Order' as we have 'mro' (Method Resolution Order)
and 'iro' (Interface Resolution Order) for instance.

But I could be completely off track ;-)

Raphael



Am I off base here? If so, more info please! :-)



___
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] Re: Intercept request

2008-01-07 Thread Raphael Ritz

David Chelimsky wrote:



[..]


BTW - I'm using ZPT, not DTML. I'm guessing I can do this with a
simple script that I include on every page, yes? That could work, but
seems a bit error prone - that's why I'm looking for some sort of
request hook. But maybe that's my best option within Zope. Thoughts?



Are you saying you want an access rule?

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ZopeServices.stx


Raphael

___
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: pointers on predicting ZODB size based on size of files to be imported?

2007-12-05 Thread Raphael Ritz

michael nt milne wrote:

Hi

Is there any documentation anywhere or advice on being able to estimate 
the size of a potential Zope ZODB instance based on the size of a 
current site? For example if you were to have a site of say 5 gb 
consisting of HTML pages, graphics, images, pdfs, word docs, excel files 
etc : are there any pointers anywhere on roughly how many gigs of ZODB 
this would take up? Obviously word, excel and other binary formats will 
likely translate to more weight...


Also are there any ZODB growth prediction charts at all?



There is no general answer to this question other than it depends ;-)

In addition to the raw amount of data that you listed the most
important additional piece of information you didn't provide
is how busy people will be changing things.

As any change or edit to an object causes this object to be written
to the ZODB again your ZODB can grow (almost) arbitrarily fast until
you pack it again. As packing removes the history (up to a point) it
is again a policy decision on your side how much history you want
or need to keep.

With regard to the overhead added by having a file live in the ZODB
versus being on the file system I think you shouldn't even worry.
For a first estimate this difference shouldn't matter.
There are exceptions, of course, like when you add Archetypes to
the picture as AT tends to add a lot of overhead but that's not
really a ZODB issue.

Just my 2 cents.

Raphael



--
michael




___
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] Re: storing python objects

2007-10-26 Thread Raphael Ritz

David Bear wrote:

I need to run an external method to use some python functions that are
restricted within zope. I'm thinking an easy way to get the data back
would be to just store basic python objects within zodb; tupples,
lists, dictionaries.

but I've never seen this documented anywhere. Is it possible to store
basic python objects directly in zodb? AND then use a zpt to read the
data?

I'm thinking a simple thing would be to create an external method that
returns a dictionary.

Then I could have script call the method, and stored the dictionary on
zodb.

Then have a zpt publish the dictionary.

Is this even easily possible, or are there alternatives to doing
something similar?



Google for 'PersistentList' and/or 'PersistentMapping'

Raphael

___
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-dev] Re: Undeprecation of manage_afterAdd and manage_beforeDelete?

2007-10-08 Thread Raphael Ritz

Hanno Schlichting wrote:

Hi.


[..]



Thoughts?



+1

Raphael

PS: ... not to mention the 700 add-ons that are out
there for Plone alone ...


Hanno

___
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] Re: [Fwd: zope error] Install issues - build errors

2007-05-14 Thread Raphael Ritz

Dapo Ladimeji wrote:

Hi
I am having trouble installing Zope on a redhat linux. I seem to always 
get build errors whether trying Zope 2.10 or Zope 3.
At first it seems Ok - I attach the initial lines. the full verbose 
error message is in the attached email. This is frustrating as it has 
taken many hours trying to resolve.

I trust someone knows what the problem is:




yum install python2.4-dev

(or something similar)

Raphael

___
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: Conditional import of annotations for Zope 2.9 and 2.10: how?

2007-05-14 Thread Raphael Ritz

Maurits van Rees wrote:

Hi,


[..]


What other options are there to do this in zcml?

Or should I take my loss and translate the
zope/(app/)annotations/configure.zcml file (which only registers one
adapter) into python code?



More a workaround than a solution but have you tried
doing it the new way (Zope-2.10) and introducing
backwards compatibility via a module alias to make
zope.annotations also available as zope.app.annotations?

Raphael

___
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: How can I make class variables store in the zodb??

2005-04-26 Thread Raphael Ritz
Stephen How wrote:
[...]
Originally, I wanted to use a lot of class variables, as this was my 
perspective from plain-old python.  However, I've learned that I really 
want to put everything possible into the schema, as it makes the AT 
future proof, and more robust.  It automatically creates accessors and 
mutators for these fields as well, which is preferred programming 
style.  I typically just change the visibility attributes of the field 
for privacy, and style in base_view.  However, I don't think there's a 
FieldType for a dictionary or array, so I use plain-old class variables 
for them.

There is the RecordField (for handling dicts) and
RecordsField (for handling lists of dicts) available
from ATExtensions
 http://www.neuroinf.de/LabTools/ATExtensions-0_5.tgz
Raphael
PS: Does anyone know how to move a project from
one svn repository (our own) to another one
(svn.plone.org) without loosing history?
Then I could move it there.
___
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-dev] Re: Site Error

2004-04-02 Thread Raphael Ritz


AP Meyer wrote:
Is this a known bug?

Yes.

But Dieter fixed in recently in CVS HEAD (I think)

Raphael

Working without automatic refresh is very unhandy ;-)

thanks
Andre



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )